1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Fix linux compilation

This commit is contained in:
Elias Steurer 2019-04-01 13:03:49 +02:00
parent 032ac18518
commit ac1eee9d27
9 changed files with 17 additions and 51 deletions

View File

@ -1,8 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
SUBDIRS += \
ScreenPlay/ScreenPlay.pro \
ScreenPlaySDK/ScreenPlaySDK.pro \
ScreenPlaySysInfo/ScreenPlaySysInfo.pro \
ScreenPlayWindow/ScreenPlayWindow.pro \
ScreenPlayWidget/ScreenPlayWidget.pro \
ScreenPlay/ThirdParty/stomt-qt-sdk/sdk/stomt-qt-sdk.pro \
@ -10,3 +9,8 @@ SUBDIRS = \
ScreenPlayWindow.depends = ScreenPlaySDK
ScreenPlayWidget.depends = ScreenPlaySDK
win32 {
SUBDIRS += \
ScreenPlaySysInfo/ScreenPlaySysInfo.pro \
}

View File

@ -1,7 +0,0 @@
SOURCES += \
$$PWD/screenplay-sdk_plugin.cpp \
$$PWD/screenplaysdk.cpp
HEADERS += \
$$PWD/screenplay-sdk_plugin.h \
$$PWD/screenplaysdk.h

View File

@ -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

View File

@ -4,11 +4,9 @@
#include <QDebug>
#include <QTimer>
#include <QString>
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
// https://github.com/rainmeter/rainmeter/blob/master/Library/MeasureCPU.cpp
class CPU : public QObject {

View File

@ -1,5 +1,7 @@
#pragma once
#ifdef Q_OS_WIN
#include <qt_windows.h>
#include <QObject>
uint64_t FileTimeToInt64( const FILETIME& ft ) {
@ -8,3 +10,4 @@ uint64_t FileTimeToInt64( const FILETIME& ft ) {
uli.HighPart = ft.dwHighDateTime;
return uli.QuadPart;
}
#endif

View File

@ -6,8 +6,9 @@
#ifdef Q_OS_WIN
#include <qt_windows.h>
#endif
#include <sysinfoapi.h>
//#include <sysinfoapi.h>
#define DWORDLONG unsigned long long
class RAM : public QObject {
Q_OBJECT

View File

@ -17,7 +17,7 @@ INCLUDEPATH += \
$$PWD/../../ThirdParty/ \
$$PWD/../../src/ \
include(../ScreenPlaySDK/Screenplaysdk.pri)
include(../ScreenPlaySDK/ScreenPlaySDK.pri)
macx: {
QMAKE_LIBDIR += $$OUT_PWD/
@ -26,7 +26,7 @@ macx: {
!macx: {
CONFIG(debug, debug|release) {
LIBS += -lScreenplaysdkd
LIBS += -lScreenPlaySDK
install_it.path = $${OUT_PWD}/debug/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
} else {

View File

@ -8,7 +8,7 @@ WidgetWindow::WidgetWindow(QString projectPath, QString appid, QObject* parent)
m_appID = appid;
m_hwnd = reinterpret_cast<HWND>(m_window.winId());
Qt::WindowFlags flags = m_window.flags();
m_window.setWidth(300);
m_window.setHeight(300);
@ -17,6 +17,7 @@ WidgetWindow::WidgetWindow(QString projectPath, QString appid, QObject* parent)
m_window.setColor(Qt::transparent);
#ifdef Q_OS_WIN
m_hwnd = reinterpret_cast<HWND>(m_window.winId());
SetWindowBlur(m_hwnd);
#endif

View File

@ -32,7 +32,7 @@ INCLUDEPATH += \
$$PWD/../../ThirdParty/ \
$$PWD/../../src/ \
include(../ScreenPlaySDK/Screenplaysdk.pri)
include(../ScreenPlaySDK/ScreenPlaySDK.pri)
macx: {
QMAKE_LIBDIR += $$OUT_PWD/
@ -51,7 +51,7 @@ macx: {
!macx: {
CONFIG(debug, debug|release) {
LIBS += -lScreenplaysdkd
LIBS += -lScreenPlaySDK
install_it.path = $${OUT_PWD}/debug/
QMAKE_LIBDIR += $$OUT_PWD/../ScreenPlaySDK/debug
} else {