diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 54fa754..aa97e0d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -213,28 +213,34 @@ jobs: uses: actions/cache@v3 with: path: build - key: macos-cmake-v3 + key: macos-cmake-v4 - name: Configure run: | cmake \ -B build \ - -D CMAKE_BUILD_TYPE=RelWithDebInfo \ + -G Xcode \ + -D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \ # EOL - name: Build run: | cmake \ --build build \ + --config RelWithDebInfo \ -j $(sysctl -n hw.physicalcpu) \ - --target package \ # EOL + - name: Pack + run: | + cd build + cpack -C RelWithDebInfo + - name: Upload uses: actions/upload-artifact@v3 with: name: fallout2-ce-macos.dmg - path: build/fallout2-ce.dmg + path: build/Fallout II Community Edition.dmg retention-days: 7 windows: diff --git a/CMakeLists.txt b/CMakeLists.txt index d7da510..5fc81b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -318,16 +318,30 @@ if(APPLE) XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.alexbatalov.fallout2-ce" XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2" ) + + set(MACOSX_BUNDLE_BUNDLE_NAME "${EXECUTABLE_NAME}") + set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout 2") else() - set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/macos/Info.plist") - target_sources(${EXECUTABLE_NAME} PUBLIC "os/macos/fallout2-ce.icns") - set_source_files_properties("os/macos/fallout2-ce.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + set(RESOURCES + "os/macos/fallout2-ce.icns" + ) + + target_sources(${EXECUTABLE_NAME} PUBLIC ${RESOURCES}) + set_source_files_properties(${RESOURCES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") + + set_target_properties(${EXECUTABLE_NAME} PROPERTIES + OUTPUT_NAME "Fallout II Community Edition" + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/os/macos/Info.plist" + XCODE_ATTRIBUTE_EXECUTABLE_NAME "${EXECUTABLE_NAME}" + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.alexbatalov.fallout2-ce" + ) + set(MACOSX_BUNDLE_ICON_FILE "fallout2-ce.icns") + set(MACOSX_BUNDLE_BUNDLE_NAME "Fallout II: Community Edition") + set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout II") endif() set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.alexbatalov.fallout2-ce") - set(MACOSX_BUNDLE_BUNDLE_NAME "${EXECUTABLE_NAME}") - set(MACOSX_BUNDLE_DISPLAY_NAME "Fallout 2") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "1.2.0") set(MACOSX_BUNDLE_BUNDLE_VERSION "1.2.0") endif() @@ -360,22 +374,17 @@ if(APPLE) set(CPACK_ARCHIVE_FILE_EXTENSION "ipa") else() install(TARGETS ${EXECUTABLE_NAME} DESTINATION .) - install(CODE " - include(BundleUtilities) - fixup_bundle(${CMAKE_BINARY_DIR}/${MACOSX_BUNDLE_BUNDLE_NAME}.app \"\" \"\") - " - COMPONENT Runtime) if (CPACK_BUNDLE_APPLE_CERT_APP) install(CODE " - execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/${MACOSX_BUNDLE_BUNDLE_NAME}.app) + execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/Fallout II Community Edition.app) " COMPONENT Runtime) endif() set(CPACK_GENERATOR "DragNDrop") set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON) - set(CPACK_PACKAGE_FILE_NAME "fallout2-ce") + set(CPACK_PACKAGE_FILE_NAME "Fallout II Community Edition") endif() include(CPack) diff --git a/os/macos/Info.plist b/os/macos/Info.plist index 5d5b555..38b9b8d 100644 --- a/os/macos/Info.plist +++ b/os/macos/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - English + en CFBundleDisplayName ${MACOSX_BUNDLE_DISPLAY_NAME} CFBundleExecutable @@ -28,6 +28,8 @@ ${MACOSX_BUNDLE_COPYRIGHT} NSHighResolutionCapable True + LSApplicationCategoryType + public.app-category.role-playing-games LSMinimumSystemVersion 10.11 SDL_FILESYSTEM_BASE_DIR_TYPE