From 3cd5d619a7f8b7304f2276a578fc83ed618432fa Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Mon, 24 May 2021 14:27:54 +0200 Subject: [PATCH] Fix steam plugin missing folder --- ScreenPlay/CMakeLists.txt | 8 ++++---- ScreenPlayWallpaper/CMakeLists.txt | 5 ----- ScreenPlayWidget/CMakeLists.txt | 9 ++++----- ScreenPlayWidget/Info.plist | 28 ++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 ScreenPlayWidget/Info.plist diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index 01c4b82e..c5cd7336 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -86,10 +86,6 @@ endif() add_executable(${PROJECT_NAME} ${src} ${headers} ${resources} ${qml} ${fonts}) -if(APPLE) - #set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE true) -endif() - if(WIN32) # Icon target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc) @@ -132,6 +128,8 @@ endif() if(APPLE) + + # Creates a ScreenPlay.app set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME} @@ -145,6 +143,8 @@ if(APPLE) XCODE_ATTRIBUTE_EXECUTABLE_NAME ${PROJECT_NAME} ) + # Needed for the Steam Workshop qml plugin + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/Workshop) add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index 0b1789cf..791009aa 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -46,9 +46,4 @@ if(APPLE) MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) -#add_custom_command(TARGET ${PROJECT_NAME} -# POST_BUILD -# COMMENT "Copying into ScreenPlay.app bundle" -# COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME} -# ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/${PROJECT_NAME}) endif() diff --git a/ScreenPlayWidget/CMakeLists.txt b/ScreenPlayWidget/CMakeLists.txt index 2aae4c99..a0ee22ee 100644 --- a/ScreenPlayWidget/CMakeLists.txt +++ b/ScreenPlayWidget/CMakeLists.txt @@ -28,11 +28,10 @@ if(WIN32) endif() if(APPLE) -add_custom_command(TARGET ${PROJECT_NAME} - POST_BUILD - COMMENT "Copying into ScreenPlay.app bundle" - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/${PROJECT_NAME} - ${CMAKE_BINARY_DIR}/bin/ScreenPlay.app/Contents/MacOS/${PROJECT_NAME}) + set_target_properties(${PROJECT_NAME} PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist + ) endif() target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core ScreenPlaySDK ScreenPlayUtil) diff --git a/ScreenPlayWidget/Info.plist b/ScreenPlayWidget/Info.plist new file mode 100644 index 00000000..3efa504f --- /dev/null +++ b/ScreenPlayWidget/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + app.screen-play.widget + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleVersion + 1.0 + CFBundleDisplayName + ScreenPlayWidget + NSUIElement + 1 + LSUIElement + 1 + +