diff --git a/ScreenPlay/src/settings.cpp b/ScreenPlay/src/settings.cpp index 8f4c0472..93d9021c 100644 --- a/ScreenPlay/src/settings.cpp +++ b/ScreenPlay/src/settings.cpp @@ -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!"); } } diff --git a/ScreenPlayWallpaper/main.cpp b/ScreenPlayWallpaper/main.cpp index cb236c7d..c920d6d1 100644 --- a/ScreenPlayWallpaper/main.cpp +++ b/ScreenPlayWallpaper/main.cpp @@ -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(), diff --git a/ScreenPlayWallpaper/src/linuxwindow.cpp b/ScreenPlayWallpaper/src/linuxwindow.cpp index 71180bb9..fab82bd5 100644 --- a/ScreenPlayWallpaper/src/linuxwindow.cpp +++ b/ScreenPlayWallpaper/src/linuxwindow.cpp @@ -1,15 +1,28 @@ #include "linuxwindow.h" -LinuxWindow::LinuxWindow(QVector activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, const bool checkWallpaperVisible, QObject* parent) - : BaseWindow(projectPath, activeScreensList, checkWallpaperVisible) +LinuxWindow::LinuxWindow( + const QVector& 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) { diff --git a/ScreenPlayWallpaper/src/linuxwindow.h b/ScreenPlayWallpaper/src/linuxwindow.h index 5e340a9b..21bebbcd 100644 --- a/ScreenPlayWallpaper/src/linuxwindow.h +++ b/ScreenPlayWallpaper/src/linuxwindow.h @@ -50,7 +50,16 @@ class LinuxWindow : public BaseWindow { Q_OBJECT public: - explicit LinuxWindow(QVector activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, const bool checkWallpaperVisible, QObject* parent = nullptr); + explicit LinuxWindow( + const QVector& 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: