mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-23 03:02:30 +01:00
Add linux compatiblity
This commit is contained in:
parent
e90544b5a9
commit
6be22d8f0b
@ -3,6 +3,6 @@ SUBDIRS = \
|
|||||||
ScreenPlay/ScreenPlay.pro \
|
ScreenPlay/ScreenPlay.pro \
|
||||||
ScreenPlaySDK/Screenplaysdk.pro \
|
ScreenPlaySDK/Screenplaysdk.pro \
|
||||||
ScreenPlayWindow/ScreenPlayWindow.pro \
|
ScreenPlayWindow/ScreenPlayWindow.pro \
|
||||||
ScreenPlayWidget
|
ScreenPlayWidget/
|
||||||
|
|
||||||
ScreenPlayWindow.depends = ScreenPlaySDK
|
ScreenPlayWindow.depends = ScreenPlaySDK
|
||||||
|
@ -86,3 +86,13 @@ win32 {
|
|||||||
win32: LIBS += -L$$PWD/ThirdParty/Steam/redistributable_bin/win64/ -lsteam_api64
|
win32: LIBS += -L$$PWD/ThirdParty/Steam/redistributable_bin/win64/ -lsteam_api64
|
||||||
DEPENDPATH += $$PWD/ThirdParty/Steam/redistributable_bin/win64
|
DEPENDPATH += $$PWD/ThirdParty/Steam/redistributable_bin/win64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unix {
|
||||||
|
LIBS += -L$$PWD/ThirdParty/steam/redistributable_bin/linux64/ -lsteam_api
|
||||||
|
DEPENDPATH += $$PWD/ThirdParty/steam/redistributable_bin/linux64
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/ThirdParty/steam/lib/linux64
|
||||||
|
DEPENDPATH += $$PWD/ThirdParty/steam/lib/linux64s
|
||||||
|
|
||||||
|
LIBS += -L$$PWD/ThirdParty/steam/lib/linux64/ -lsdkencryptedappticket
|
||||||
|
}
|
||||||
|
@ -20,8 +20,10 @@
|
|||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QWindow>
|
#include <QWindow>
|
||||||
#include <QtQuick/QQuickItem>
|
#include <QtQuick/QQuickItem>
|
||||||
#include <qt_windows.h>
|
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
#include <qt_windows.h>
|
||||||
|
#endif
|
||||||
#include "qmlutilities.h"
|
#include "qmlutilities.h"
|
||||||
#include "installedlistfilter.h"
|
#include "installedlistfilter.h"
|
||||||
#include "installedlistmodel.h"
|
#include "installedlistmodel.h"
|
||||||
|
@ -234,10 +234,13 @@ void Settings::setScreenPlayWindowPath(const QUrl& screenPlayWindowPath)
|
|||||||
|
|
||||||
void Settings::checkForOtherFullscreenApplication()
|
void Settings::checkForOtherFullscreenApplication()
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
HWND hWnd = GetForegroundWindow();
|
HWND hWnd = GetForegroundWindow();
|
||||||
RECT appBounds;
|
RECT appBounds;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
GetWindowRect(GetDesktopWindow(), &rc);
|
GetWindowRect(GetDesktopWindow(), &rc);
|
||||||
|
#endif
|
||||||
// if(hWnd =! (HWND)GetDesktopWindow() && hWnd != (HWND)GetShellWindow())
|
// if(hWnd =! (HWND)GetDesktopWindow() && hWnd != (HWND)GetShellWindow())
|
||||||
// {
|
// {
|
||||||
// GetWindowRect(hWnd, &appBounds);
|
// GetWindowRect(hWnd, &appBounds);
|
||||||
|
@ -28,8 +28,9 @@
|
|||||||
#include "projectsettingslistmodel.h"
|
#include "projectsettingslistmodel.h"
|
||||||
#include "sdkconnector.h"
|
#include "sdkconnector.h"
|
||||||
#include "steam/steam_api.h"
|
#include "steam/steam_api.h"
|
||||||
#include "qt_windows.h"
|
#ifdef Q_OS_WIN
|
||||||
|
#include <qt_windows.h>
|
||||||
|
#endif
|
||||||
/*!
|
/*!
|
||||||
\class Settings
|
\class Settings
|
||||||
\brief Used for:
|
\brief Used for:
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#include "src/SPWmainwindow.h"
|
#include "src/SPWmainwindow.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include "qt_windows.h"
|
#ifdef Q_OS_WIN
|
||||||
|
#include <qt_windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "SPWmainwindow.h"
|
#include "SPWmainwindow.h"
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
BOOL WINAPI SearchForWorkerWindow(HWND hwnd, LPARAM lparam)
|
BOOL WINAPI SearchForWorkerWindow(HWND hwnd, LPARAM lparam)
|
||||||
{
|
{
|
||||||
// 0xXXXXXXX "" WorkerW
|
// 0xXXXXXXX "" WorkerW
|
||||||
@ -12,11 +12,11 @@ BOOL WINAPI SearchForWorkerWindow(HWND hwnd, LPARAM lparam)
|
|||||||
*reinterpret_cast<HWND*>(lparam) = FindWindowExW(nullptr, hwnd, L"WorkerW", nullptr);
|
*reinterpret_cast<HWND*>(lparam) = FindWindowExW(nullptr, hwnd, L"WorkerW", nullptr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
MainWindow::MainWindow(int i, QString projectPath, QScreen* parent)
|
MainWindow::MainWindow(int i, QString projectPath, QScreen* parent)
|
||||||
: QWindow(parent)
|
: QWindow(parent)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
setOpacity(0);
|
setOpacity(0);
|
||||||
m_projectPath = projectPath;
|
m_projectPath = projectPath;
|
||||||
|
|
||||||
@ -118,12 +118,15 @@ MainWindow::MainWindow(int i, QString projectPath, QScreen* parent)
|
|||||||
emit playQmlScene(tmpPath);
|
emit playQmlScene(tmpPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void MainWindow::init()
|
void MainWindow::init()
|
||||||
{
|
{
|
||||||
setOpacity(0);
|
setOpacity(0);
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
ShowWindow(m_worker_hwnd, SW_SHOWDEFAULT);
|
ShowWindow(m_worker_hwnd, SW_SHOWDEFAULT);
|
||||||
ShowWindow(m_hwnd, SW_SHOWDEFAULT);
|
ShowWindow(m_hwnd, SW_SHOWDEFAULT);
|
||||||
|
#endif
|
||||||
m_quickRenderer.data()->show();
|
m_quickRenderer.data()->show();
|
||||||
//this->setVisible(true);
|
//this->setVisible(true);
|
||||||
setOpacity(0);
|
setOpacity(0);
|
||||||
@ -143,8 +146,10 @@ void MainWindow::destroyThis()
|
|||||||
animation->start();
|
animation->start();
|
||||||
|
|
||||||
QObject::connect(animation, &QPropertyAnimation::finished, [&]() {
|
QObject::connect(animation, &QPropertyAnimation::finished, [&]() {
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
ShowWindow(m_worker_hwnd, SW_HIDE);
|
ShowWindow(m_worker_hwnd, SW_HIDE);
|
||||||
ShowWindow(m_hwnd, SW_HIDE);
|
ShowWindow(m_hwnd, SW_HIDE);
|
||||||
|
#endif
|
||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qt_windows.h"
|
#ifdef Q_OS_WIN
|
||||||
|
#include <qt_windows.h>
|
||||||
|
#endif
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QEasingCurve>
|
#include <QEasingCurve>
|
||||||
@ -50,8 +52,10 @@ signals:
|
|||||||
void projectConfigChanged(QString projectConfig);
|
void projectConfigChanged(QString projectConfig);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
HWND m_hwnd;
|
HWND m_hwnd;
|
||||||
HWND m_worker_hwnd;
|
HWND m_worker_hwnd;
|
||||||
|
#endif
|
||||||
QSharedPointer<QQuickView> m_quickRenderer = nullptr;
|
QSharedPointer<QQuickView> m_quickRenderer = nullptr;
|
||||||
QUrl m_projectPath;
|
QUrl m_projectPath;
|
||||||
QString m_projectFile;
|
QString m_projectFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user