1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00

Fix OSX compilation

This commit is contained in:
Elias Steurer 2021-04-22 18:27:55 +02:00
parent dd3b94c01a
commit ba13492c7e
5 changed files with 44 additions and 36 deletions

View File

@ -43,7 +43,7 @@ if(APPLE)
target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa") target_link_libraries(${PROJECT_NAME} PRIVATE "-framework Cocoa")
endif() endif()
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core Qt5::WebEngine shcore.lib ScreenPlaySDK ScreenPlayUtil) target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core Qt5::WebEngine ScreenPlaySDK ScreenPlayUtil)

View File

@ -146,6 +146,8 @@ Rectangle {
if (Qt.platform.os === "windows") { if (Qt.platform.os === "windows") {
return Qt.resolvedUrl( return Qt.resolvedUrl(
"file:///" + Wallpaper.windowsDesktopProperties.wallpaperPath) "file:///" + Wallpaper.windowsDesktopProperties.wallpaperPath)
} else {
return ""
} }
} }
@ -292,11 +294,6 @@ Rectangle {
text: "Wallpaper.canFade " + Wallpaper.canFade text: "Wallpaper.canFade " + Wallpaper.canFade
font.pointSize: 14 font.pointSize: 14
} }
Text {
text: "imgCover.source " + Qt.resolvedUrl(
"file:///" + Wallpaper.windowsDesktopProperties.wallpaperPath)
font.pointSize: 14
}
Text { Text {
text: "imgCover.status " + imgCover.status text: "imgCover.status " + imgCover.status
font.pointSize: 14 font.pointSize: 14

View File

@ -43,7 +43,7 @@ int main(int argc, char* argv[])
LinuxWindow window({ 0 }, "/home/graphicscore/Desktop/wallpapers/MechaGirl", "appid", "1", "fill", false); LinuxWindow window({ 0 }, "/home/graphicscore/Desktop/wallpapers/MechaGirl", "appid", "1", "fill", false);
#endif #endif
#if defined(Q_OS_OSX) #if defined(Q_OS_OSX)
MacWindow window({ 0 }, "test", "appid", "1", "fill"); MacWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
#endif #endif
return app.exec(); return app.exec();
@ -89,26 +89,26 @@ int main(int argc, char* argv[])
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
LinuxWindow window( LinuxWindow window(
activeScreensList.value(), activeScreensList.value(),
projectPath, projectFilePath,
appID, appID,
fillmode, volume,
volume, fillmode,
checkWallpaperVisible); type,
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &LinuxWindow::destroyThis); checkWallpaperVisible,
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &LinuxWindow::messageReceived); debugMode);
#endif #endif
#if defined(Q_OS_OSX) #if defined(Q_OS_OSX)
MacWindow window( MacWindow window(
activeScreensList.value(), activeScreensList.value(),
projectPath, projectFilePath,
appID, appID,
fillmode, volume,
volume, fillmode,
checkWallpaperVisible); type,
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &MacWindow::destroyThis); checkWallpaperVisible,
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &MacWindow::messageReceived); debugMode);
#endif #endif
return app.exec(); return app.exec();

View File

@ -1,14 +1,23 @@
#include "macwindow.h" #include "macwindow.h"
MacWindow::MacWindow( MacWindow::MacWindow(
const QVector<int>& activeScreensList, const QVector<int>& activeScreensList,
const QString& projectPath, const QString& projectFilePath,
const QString& id, const QString& appID,
const QString& volume, const QString& volume,
const QString& fillmode) const QString& fillmode,
: BaseWindow(projectPath, activeScreensList, false) const QString& type,
const bool checkWallpaperVisible,
const bool debugMode)
: BaseWindow(
activeScreensList,
projectFilePath,
type,
checkWallpaperVisible,
appID,
debugMode)
{ {
setAppID(id); setAppID(appID);
bool ok = false; bool ok = false;
float volumeParsed = volume.toFloat(&ok); float volumeParsed = volume.toFloat(&ok);
if (!ok) { if (!ok) {

View File

@ -51,12 +51,14 @@
class MacWindow : public BaseWindow { class MacWindow : public BaseWindow {
Q_OBJECT Q_OBJECT
public: public:
explicit MacWindow( explicit MacWindow( const QVector<int>& activeScreensList,
const QVector<int>& activeScreensList, const QString& projectFilePath,
const QString& projectPath, const QString& appID,
const QString& id, const QString& volume,
const QString& volume, const QString& fillmode,
const QString& fillmode); const QString& type,
const bool checkWallpaperVisible,
const bool debugMode);
signals: signals: