1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01: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")
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") {
return Qt.resolvedUrl(
"file:///" + Wallpaper.windowsDesktopProperties.wallpaperPath)
} else {
return ""
}
}
@ -292,11 +294,6 @@ Rectangle {
text: "Wallpaper.canFade " + Wallpaper.canFade
font.pointSize: 14
}
Text {
text: "imgCover.source " + Qt.resolvedUrl(
"file:///" + Wallpaper.windowsDesktopProperties.wallpaperPath)
font.pointSize: 14
}
Text {
text: "imgCover.status " + imgCover.status
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);
#endif
#if defined(Q_OS_OSX)
MacWindow window({ 0 }, "test", "appid", "1", "fill");
MacWindow window({ 0 }, "test", "appID=test", "1", "fill", "videoWallpaper", true, true);
#endif
return app.exec();
@ -90,25 +90,25 @@ int main(int argc, char* argv[])
#if defined(Q_OS_LINUX)
LinuxWindow window(
activeScreensList.value(),
projectPath,
projectFilePath,
appID,
fillmode,
volume,
checkWallpaperVisible);
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &LinuxWindow::destroyThis);
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &LinuxWindow::messageReceived);
fillmode,
type,
checkWallpaperVisible,
debugMode);
#endif
#if defined(Q_OS_OSX)
MacWindow window(
activeScreensList.value(),
projectPath,
projectFilePath,
appID,
fillmode,
volume,
checkWallpaperVisible);
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &window, &MacWindow::destroyThis);
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &window, &MacWindow::messageReceived);
fillmode,
type,
checkWallpaperVisible,
debugMode);
#endif
return app.exec();

View File

@ -2,13 +2,22 @@
MacWindow::MacWindow(
const QVector<int>& activeScreensList,
const QString& projectPath,
const QString& id,
const QString& projectFilePath,
const QString& appID,
const QString& volume,
const QString& fillmode)
: BaseWindow(projectPath, activeScreensList, false)
const QString& fillmode,
const QString& type,
const bool checkWallpaperVisible,
const bool debugMode)
: BaseWindow(
activeScreensList,
projectFilePath,
type,
checkWallpaperVisible,
appID,
debugMode)
{
setAppID(id);
setAppID(appID);
bool ok = false;
float volumeParsed = volume.toFloat(&ok);
if (!ok) {

View File

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