mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 10:42:29 +01:00
Fix linux compilation
This commit is contained in:
parent
f54cf14dc5
commit
1d817ae262
@ -140,11 +140,17 @@ void Settings::writeJsonFileFromResource(const QString& filename)
|
||||
void Settings::setupWidgetAndWindowPaths()
|
||||
{
|
||||
QDir workingDir(QGuiApplication::applicationDirPath());
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget" + ScreenPlayUtil::executableBinEnding()));
|
||||
m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper" + ScreenPlayUtil::executableBinEnding()));
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget"));
|
||||
m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper"));
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
|
||||
workingDir.cdUp();
|
||||
@ -157,9 +163,11 @@ void Settings::setupWidgetAndWindowPaths()
|
||||
#endif
|
||||
|
||||
if (!QFileInfo::exists(m_globalVariables->widgetExecutablePath().toString())) {
|
||||
qInfo() << "widgetExecutablePath:" << m_globalVariables->widgetExecutablePath().toString();
|
||||
qFatal("widget executable not found!");
|
||||
}
|
||||
if (!QFileInfo::exists(m_globalVariables->wallpaperExecutablePath().toString())) {
|
||||
qInfo() << "wallpaperExecutablePath:" << m_globalVariables->wallpaperExecutablePath().toString();
|
||||
qFatal("wallpaper executable not found!");
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ int main(int argc, char* argv[])
|
||||
WinWindow window1({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
//WinWindow window1({ 0 }, "C:/Program Files (x86)/Steam/steamapps/workshop/content/672870/_tmp_171806", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
#elif defined(Q_OS_LINUX)
|
||||
LinuxWindow window({ 0 }, "test", "appid", "1", "fill", false);
|
||||
LinuxWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", false, true);
|
||||
#elif defined(Q_OS_OSX)
|
||||
MacWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||
#endif
|
||||
@ -82,11 +82,13 @@ int main(int argc, char* argv[])
|
||||
#elif defined(Q_OS_LINUX)
|
||||
LinuxWindow window(
|
||||
activeScreensList.value(),
|
||||
projectPath,
|
||||
projectFilePath,
|
||||
appID,
|
||||
fillmode,
|
||||
volume,
|
||||
checkWallpaperVisible);
|
||||
fillmode,
|
||||
type,
|
||||
checkWallpaperVisible,
|
||||
debugMode);
|
||||
#elif defined(Q_OS_OSX)
|
||||
MacWindow window(
|
||||
activeScreensList.value(),
|
||||
|
@ -1,15 +1,28 @@
|
||||
#include "linuxwindow.h"
|
||||
|
||||
LinuxWindow::LinuxWindow(QVector<int> activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, const bool checkWallpaperVisible, QObject* parent)
|
||||
: BaseWindow(projectPath, activeScreensList, checkWallpaperVisible)
|
||||
LinuxWindow::LinuxWindow(
|
||||
const QVector<int>& activeScreensList,
|
||||
const QString& projectFilePath,
|
||||
const QString& appID,
|
||||
const QString& volume,
|
||||
const QString& fillmode,
|
||||
const QString& type,
|
||||
const bool checkWallpaperVisible,
|
||||
const bool debugMode,
|
||||
QObject* parent)
|
||||
: BaseWindow(
|
||||
activeScreensList,
|
||||
projectFilePath,
|
||||
type,
|
||||
checkWallpaperVisible,
|
||||
appID,
|
||||
debugMode)
|
||||
{
|
||||
m_window.setWidth(1920);
|
||||
m_window.setHeight(1080);
|
||||
|
||||
m_window.show();
|
||||
|
||||
setAppID(id);
|
||||
|
||||
bool ok = false;
|
||||
float volumeParsed = volume.toFloat(&ok);
|
||||
if (!ok) {
|
||||
|
@ -50,7 +50,16 @@
|
||||
class LinuxWindow : public BaseWindow {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LinuxWindow(QVector<int> activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, const bool checkWallpaperVisible, QObject* parent = nullptr);
|
||||
explicit LinuxWindow(
|
||||
const QVector<int>& activeScreensList,
|
||||
const QString& projectFilePath,
|
||||
const QString& appID,
|
||||
const QString& volume,
|
||||
const QString& fillmode,
|
||||
const QString& type,
|
||||
const bool checkWallpaperVisible,
|
||||
const bool debugMode,
|
||||
QObject* parent = nullptr);
|
||||
|
||||
signals:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user