mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +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()
|
void Settings::setupWidgetAndWindowPaths()
|
||||||
{
|
{
|
||||||
QDir workingDir(QGuiApplication::applicationDirPath());
|
QDir workingDir(QGuiApplication::applicationDirPath());
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget" + ScreenPlayUtil::executableBinEnding()));
|
m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget" + ScreenPlayUtil::executableBinEnding()));
|
||||||
m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper" + ScreenPlayUtil::executableBinEnding()));
|
m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper" + ScreenPlayUtil::executableBinEnding()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget"));
|
||||||
|
m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper"));
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_OSX
|
#ifdef Q_OS_OSX
|
||||||
|
|
||||||
workingDir.cdUp();
|
workingDir.cdUp();
|
||||||
@ -157,9 +163,11 @@ void Settings::setupWidgetAndWindowPaths()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!QFileInfo::exists(m_globalVariables->widgetExecutablePath().toString())) {
|
if (!QFileInfo::exists(m_globalVariables->widgetExecutablePath().toString())) {
|
||||||
|
qInfo() << "widgetExecutablePath:" << m_globalVariables->widgetExecutablePath().toString();
|
||||||
qFatal("widget executable not found!");
|
qFatal("widget executable not found!");
|
||||||
}
|
}
|
||||||
if (!QFileInfo::exists(m_globalVariables->wallpaperExecutablePath().toString())) {
|
if (!QFileInfo::exists(m_globalVariables->wallpaperExecutablePath().toString())) {
|
||||||
|
qInfo() << "wallpaperExecutablePath:" << m_globalVariables->wallpaperExecutablePath().toString();
|
||||||
qFatal("wallpaper executable not found!");
|
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 }, "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);
|
//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)
|
#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)
|
#elif defined(Q_OS_OSX)
|
||||||
MacWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
MacWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
|
||||||
#endif
|
#endif
|
||||||
@ -82,11 +82,13 @@ int main(int argc, char* argv[])
|
|||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
LinuxWindow window(
|
LinuxWindow window(
|
||||||
activeScreensList.value(),
|
activeScreensList.value(),
|
||||||
projectPath,
|
projectFilePath,
|
||||||
appID,
|
appID,
|
||||||
fillmode,
|
|
||||||
volume,
|
volume,
|
||||||
checkWallpaperVisible);
|
fillmode,
|
||||||
|
type,
|
||||||
|
checkWallpaperVisible,
|
||||||
|
debugMode);
|
||||||
#elif defined(Q_OS_OSX)
|
#elif defined(Q_OS_OSX)
|
||||||
MacWindow window(
|
MacWindow window(
|
||||||
activeScreensList.value(),
|
activeScreensList.value(),
|
||||||
|
@ -1,15 +1,28 @@
|
|||||||
#include "linuxwindow.h"
|
#include "linuxwindow.h"
|
||||||
|
|
||||||
LinuxWindow::LinuxWindow(QVector<int> activeScreensList, QString projectPath, QString id, QString volume, const QString fillmode, const bool checkWallpaperVisible, QObject* parent)
|
LinuxWindow::LinuxWindow(
|
||||||
: BaseWindow(projectPath, activeScreensList, checkWallpaperVisible)
|
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.setWidth(1920);
|
||||||
m_window.setHeight(1080);
|
m_window.setHeight(1080);
|
||||||
|
|
||||||
m_window.show();
|
m_window.show();
|
||||||
|
|
||||||
setAppID(id);
|
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
float volumeParsed = volume.toFloat(&ok);
|
float volumeParsed = volume.toFloat(&ok);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
@ -50,7 +50,16 @@
|
|||||||
class LinuxWindow : public BaseWindow {
|
class LinuxWindow : public BaseWindow {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
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:
|
signals:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user