mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-25 12:13:00 +01:00
Fix linux compilation
- Downgrade to stable Qt for now, because linux mirrors are not yet updated - Launch.json linux "type": "lldb" does not work for some reason...
This commit is contained in:
parent
8e72488f62
commit
4dab506b41
22
.vscode/launch.json
vendored
22
.vscode/launch.json
vendored
@ -21,13 +21,17 @@
|
||||
"value": "${env:Path};${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\bin\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\modules\\;${workspaceFolder}\\..\\aqt\\6.5.0\\msvc2019_64\\qml\\;"
|
||||
}
|
||||
],
|
||||
"type": "cppvsdbg",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_MSVC_Debug/bin/ScreenPlay.exe"
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay",
|
||||
"type": "lldb"
|
||||
},
|
||||
"linux": {
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlay",
|
||||
"type": "lldb"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -53,6 +57,10 @@
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlay.app/Contents/MacOS/ScreenPlay",
|
||||
"type": "lldb"
|
||||
},
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo/bin/ScreenPlay",
|
||||
"type": "lldb"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -77,6 +85,10 @@
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper",
|
||||
"type": "lldb"
|
||||
},
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlayWallpaper",
|
||||
"type": "lldb"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -103,6 +115,10 @@
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_RelWithDebInfo/bin/ScreenPlayWallpaper.app/Contents/MacOS/ScreenPlayWallpaper",
|
||||
"type": "lldb"
|
||||
},
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo/bin/ScreenPlayWallpaper",
|
||||
"type": "lldb"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -129,6 +145,10 @@
|
||||
"MIMode": "lldb",
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.5.0_Clang_Debug/bin/ScreenPlayWidget.app/Contents/MacOS/ScreenPlayWidget",
|
||||
"type": "lldb"
|
||||
},
|
||||
"linux": {
|
||||
"program": "${workspaceFolder}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug/bin/ScreenPlayWidget",
|
||||
"type": "lldb"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -74,7 +74,7 @@
|
||||
"displayName": "ScreenPlay 64bit Debug Linux",
|
||||
"description": "Linux only!",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_Debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_Debug",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
@ -91,7 +91,7 @@
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_PREFIX_PATH": "$env{qt_path}/6.5.0/gcc_64",
|
||||
"CMAKE_PREFIX_PATH": "$env{qt_path}/6.4.2/gcc_64",
|
||||
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"VCPKG_TARGET_TRIPLET": "x64-linux"
|
||||
}
|
||||
@ -100,7 +100,7 @@
|
||||
"name": "linux-relwithdebinfo",
|
||||
"displayName": "ScreenPlay 64bit RelWithDebInfo Linux",
|
||||
"inherits":"linux-debug",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.0_GCC_RelWithDebInfo",
|
||||
"binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.4.2_GCC_RelWithDebInfo",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
|
||||
}
|
||||
|
@ -1,55 +1,25 @@
|
||||
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
|
||||
#include "linuxwindow.h"
|
||||
|
||||
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)
|
||||
|
||||
ScreenPlay::WallpaperExitCode LinuxWindow::start()
|
||||
{
|
||||
m_window.setWidth(1920);
|
||||
m_window.setHeight(1080);
|
||||
|
||||
if(!debugMode()){
|
||||
connect(m_sdk.get(), &ScreenPlaySDK::sdkDisconnected, this, &LinuxWindow::destroyThis);
|
||||
}
|
||||
|
||||
Qt::WindowFlags flags = m_window.flags();
|
||||
m_window.setFlags(flags | Qt::FramelessWindowHint | Qt::Desktop);
|
||||
auto* screen = QGuiApplication::screens().at(activeScreensList().at(0));
|
||||
m_window.setGeometry(screen->geometry());
|
||||
m_window.show();
|
||||
|
||||
bool ok = false;
|
||||
float volumeParsed = volume.toFloat(&ok);
|
||||
if (!ok) {
|
||||
qFatal("Could not parse volume");
|
||||
}
|
||||
|
||||
setVolume(volumeParsed);
|
||||
setFillMode(fillmode);
|
||||
|
||||
// Ether for one Screen or for all
|
||||
if ((QApplication::screens().length() == activeScreensList.length()) && (activeScreensList.length() != 1)) {
|
||||
setupWallpaperForAllScreens();
|
||||
} else if (activeScreensList.length() == 1) {
|
||||
setupWallpaperForOneScreen(activeScreensList.at(0));
|
||||
setCanFade(true);
|
||||
} else if (activeScreensList.length() > 1) {
|
||||
setupWallpaperForMultipleScreens(activeScreensList);
|
||||
}
|
||||
|
||||
setWidth(m_window.width());
|
||||
setHeight(m_window.height());
|
||||
|
||||
m_window.setResizeMode(QQuickView::ResizeMode::SizeRootObjectToView);
|
||||
qmlRegisterSingletonInstance<LinuxWindow>("ScreenPlayWallpaper", 1, 0, "Wallpaper", this);
|
||||
m_window.setTextRenderType(QQuickWindow::TextRenderType::NativeTextRendering);
|
||||
m_window.setSource(QUrl("qrc:/ScreenPlayWallpaper/qml/Wallpaper.qml"));
|
||||
return ScreenPlay::WallpaperExitCode::Ok;
|
||||
}
|
||||
|
||||
void LinuxWindow::setupWallpaperForOneScreen(int activeScreen)
|
||||
|
@ -17,17 +17,9 @@
|
||||
|
||||
class LinuxWindow : public BaseWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
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);
|
||||
ScreenPlay::WallpaperExitCode start() override;
|
||||
|
||||
signals:
|
||||
|
||||
|
@ -21,7 +21,7 @@ SCREENPLAY_VERSION = "0.15.0-RC4"
|
||||
|
||||
|
||||
QT_PATH = Path.cwd().parent.parent.joinpath("aqt")
|
||||
QT_VERSION = "6.5.0"
|
||||
QT_VERSION = "6.5.0" if sys.platform != "linux" else "6.4.2"
|
||||
QT_BIN_PATH = QT_PATH.joinpath(f"{QT_VERSION}/{QT_PLATFORM}/bin")
|
||||
QT_TOOLS_PATH = QT_PATH.joinpath("Tools/")
|
||||
QT_IFW_VERSION = "4.5"
|
||||
|
Loading…
Reference in New Issue
Block a user