mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 02:32:29 +01:00
Fix linux compilation
This commit is contained in:
parent
032ac18518
commit
ac1eee9d27
@ -1,8 +1,7 @@
|
|||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
SUBDIRS = \
|
SUBDIRS += \
|
||||||
ScreenPlay/ScreenPlay.pro \
|
ScreenPlay/ScreenPlay.pro \
|
||||||
ScreenPlaySDK/ScreenPlaySDK.pro \
|
ScreenPlaySDK/ScreenPlaySDK.pro \
|
||||||
ScreenPlaySysInfo/ScreenPlaySysInfo.pro \
|
|
||||||
ScreenPlayWindow/ScreenPlayWindow.pro \
|
ScreenPlayWindow/ScreenPlayWindow.pro \
|
||||||
ScreenPlayWidget/ScreenPlayWidget.pro \
|
ScreenPlayWidget/ScreenPlayWidget.pro \
|
||||||
ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \
|
ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \
|
||||||
@ -10,3 +9,8 @@ SUBDIRS = \
|
|||||||
ScreenPlayWindow.depends = ScreenPlaySDK
|
ScreenPlayWindow.depends = ScreenPlaySDK
|
||||||
ScreenPlayWidget.depends = ScreenPlaySDK
|
ScreenPlayWidget.depends = ScreenPlaySDK
|
||||||
|
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
SUBDIRS += \
|
||||||
|
ScreenPlaySysInfo/ScreenPlaySysInfo.pro \
|
||||||
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
SOURCES += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.cpp \
|
|
||||||
$$PWD/screenplaysdk.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.h \
|
|
||||||
$$PWD/screenplaysdk.h
|
|
@ -1,34 +0,0 @@
|
|||||||
TEMPLATE = lib
|
|
||||||
TARGET = ScreenPlaySDK
|
|
||||||
QT += qml quick
|
|
||||||
CONFIG += plugin c++11
|
|
||||||
|
|
||||||
TARGET = $$qtLibraryTarget($$TARGET)
|
|
||||||
uri = net.aimber.screenplaysdk
|
|
||||||
|
|
||||||
# Input
|
|
||||||
SOURCES += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.cpp \
|
|
||||||
$$PWD/screenplaysdk.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
$$PWD/screenplay-sdk_plugin.h \
|
|
||||||
$$PWD/screenplaysdk.h
|
|
||||||
|
|
||||||
DISTFILES = qmldir
|
|
||||||
|
|
||||||
!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
|
|
||||||
copy_qmldir.target = $$OUT_PWD/qmldir
|
|
||||||
copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
|
|
||||||
copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
|
|
||||||
QMAKE_EXTRA_TARGETS += copy_qmldir
|
|
||||||
PRE_TARGETDEPS += $$copy_qmldir.target
|
|
||||||
}
|
|
||||||
|
|
||||||
qmldir.files = qmldir
|
|
||||||
|
|
||||||
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
|
|
||||||
qmldir.path = $$installPath
|
|
||||||
target.path = $$installPath
|
|
||||||
INSTALLS += target qmldir
|
|
||||||
|
|
@ -4,11 +4,9 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp
|
// https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp
|
||||||
|
|
||||||
class CPU : public QObject {
|
class CPU : public QObject {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
uint64_t FileTimeToInt64( const FILETIME& ft ) {
|
uint64_t FileTimeToInt64( const FILETIME& ft ) {
|
||||||
@ -8,3 +10,4 @@ uint64_t FileTimeToInt64( const FILETIME& ft ) {
|
|||||||
uli.HighPart = ft.dwHighDateTime;
|
uli.HighPart = ft.dwHighDateTime;
|
||||||
return uli.QuadPart;
|
return uli.QuadPart;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -6,8 +6,9 @@
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sysinfoapi.h>
|
//#include <sysinfoapi.h>
|
||||||
|
|
||||||
|
#define DWORDLONG unsigned long long
|
||||||
|
|
||||||
class RAM : public QObject {
|
class RAM : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -17,7 +17,7 @@ INCLUDEPATH += \
|
|||||||
$$PWD/../../ThirdParty/ \
|
$$PWD/../../ThirdParty/ \
|
||||||
$$PWD/../../src/ \
|
$$PWD/../../src/ \
|
||||||
|
|
||||||
include(../ScreenPlaySDK/Screenplaysdk.pri)
|
include(../ScreenPlaySDK/ScreenPlaySDK.pri)
|
||||||
|
|
||||||
macx: {
|
macx: {
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/
|
QMAKE_LIBDIR += $$OUT_PWD/
|
||||||
@ -26,7 +26,7 @@ macx: {
|
|||||||
|
|
||||||
!macx: {
|
!macx: {
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lScreenplaysdkd
|
LIBS += -lScreenPlaySDK
|
||||||
install_it.path = $${OUT_PWD}/debug/
|
install_it.path = $${OUT_PWD}/debug/
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
||||||
} else {
|
} else {
|
||||||
|
@ -8,7 +8,7 @@ WidgetWindow::WidgetWindow(QString projectPath, QString appid, QObject* parent)
|
|||||||
|
|
||||||
m_appID = appid;
|
m_appID = appid;
|
||||||
|
|
||||||
m_hwnd = reinterpret_cast<HWND>(m_window.winId());
|
|
||||||
Qt::WindowFlags flags = m_window.flags();
|
Qt::WindowFlags flags = m_window.flags();
|
||||||
m_window.setWidth(300);
|
m_window.setWidth(300);
|
||||||
m_window.setHeight(300);
|
m_window.setHeight(300);
|
||||||
@ -17,6 +17,7 @@ WidgetWindow::WidgetWindow(QString projectPath, QString appid, QObject* parent)
|
|||||||
m_window.setColor(Qt::transparent);
|
m_window.setColor(Qt::transparent);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
m_hwnd = reinterpret_cast<HWND>(m_window.winId());
|
||||||
SetWindowBlur(m_hwnd);
|
SetWindowBlur(m_hwnd);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ INCLUDEPATH += \
|
|||||||
$$PWD/../../ThirdParty/ \
|
$$PWD/../../ThirdParty/ \
|
||||||
$$PWD/../../src/ \
|
$$PWD/../../src/ \
|
||||||
|
|
||||||
include(../ScreenPlaySDK/Screenplaysdk.pri)
|
include(../ScreenPlaySDK/ScreenPlaySDK.pri)
|
||||||
|
|
||||||
macx: {
|
macx: {
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/
|
QMAKE_LIBDIR += $$OUT_PWD/
|
||||||
@ -51,7 +51,7 @@ macx: {
|
|||||||
|
|
||||||
!macx: {
|
!macx: {
|
||||||
CONFIG(debug, debug|release) {
|
CONFIG(debug, debug|release) {
|
||||||
LIBS += -lScreenplaysdkd
|
LIBS += -lScreenPlaySDK
|
||||||
install_it.path = $${OUT_PWD}/debug/
|
install_it.path = $${OUT_PWD}/debug/
|
||||||
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user