diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index fcd348c..09cf439 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -126,18 +126,35 @@ jobs: fi } >> "$GITHUB_PATH" + - name: Install create-dmg on macOS + if: runner.os == 'macOS' + run: brew install create-dmg + - name: Configure run: cmake --preset ${{ matrix.configure_preset }} - name: Build run: cmake --build --preset ${{ matrix.build_preset }} - - name: Upload the CI artifact + - name: Create macOS DMG + if: runner.os == 'macOS' + run: create-dmg --background dmgBG.png --volname "Moon Child FE" --window-size 640 375 --icon-size 75 --icon "MoonChildFE.app" 200 275 --app-drop-link 430 275 --hide-extension "MoonChildFE.app" Bin/${{ matrix.artifact_platform }}/Release/MoonChildFE-macOSUniversal.dmg Bin/${{ matrix.artifact_platform }}/Release/ + + - name: Upload the CI artifact (non-macOS) uses: actions/upload-artifact@v4 + if: runner.os != 'macOS' with: name: MoonChildFE-${{ matrix.artifact_platform }} path: Bin/${{ matrix.artifact_platform }}/Release/ if-no-files-found: error + + - name: Upload the CI artifact (macOS) + uses: actions/upload-artifact@v4 + if: runner.os == 'macOS' + with: + name: MoonChildFE-${{ matrix.artifact_platform }} + path: Bin/${{ matrix.artifact_platform }}/Release/MoonChildFE-macOSUniversal.dmg + if-no-files-found: error release: name: GitHub Release @@ -179,7 +196,7 @@ jobs: (cd assets/WindowsX64 && zip -r "$GITHUB_WORKSPACE/dist/MoonChildFE-WindowsX64.zip" .) (cd assets/WindowsX86 && zip -r "$GITHUB_WORKSPACE/dist/MoonChildFE-WindowsX86.zip" .) (cd assets/LinuxX64 && tar -czf "$GITHUB_WORKSPACE/dist/MoonChildFE-LinuxX64.tar.gz" .) - (cd assets/macOSUniversal && zip -r "$GITHUB_WORKSPACE/dist/MoonChildFE-macOSUniversal.zip" .) + (cd assets/macosUniversal && cp MoonChildFE-macOSUniversal.dmg "$GITHUB_WORKSPACE/dist/MoonChildFE-macOSUniversal.dmg" .) - name: Create the GitHub Release uses: softprops/action-gh-release@v2 diff --git a/AppIcon.icns b/AppIcon.icns index 25ce3a1..901bec1 100644 Binary files a/AppIcon.icns and b/AppIcon.icns differ diff --git a/Assets.car b/Assets.car new file mode 100644 index 0000000..fa239a9 Binary files /dev/null and b/Assets.car differ diff --git a/CMake/Platforms/macOS.cmake b/CMake/Platforms/macOS.cmake index e213cbf..1c26bbf 100644 --- a/CMake/Platforms/macOS.cmake +++ b/CMake/Platforms/macOS.cmake @@ -4,9 +4,10 @@ target_link_libraries(${EXECUTABLE_NAME} PRIVATE dl) set_target_properties(${EXECUTABLE_NAME} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME ${EXECUTABLE_NAME} MACOSX_BUNDLE_BUNDLE_VERSION ${CMAKE_PROJECT_VERSION} - MACOSX_BUNDLE_GUI_IDENTIFIER com.teamhoi.${EXECUTABLE_NAME} + MACOSX_BUNDLE_GUI_IDENTIFIER com.mors.${EXECUTABLE_NAME} MACOSX_BUNDLE_ICON_FILE AppIcon.icns MACOSX_BUNDLE_SHORT_VERSION_STRING ${CMAKE_PROJECT_VERSION} + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/MoonChild.plist.in" ) add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD @@ -14,3 +15,9 @@ add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD "${CMAKE_CURRENT_SOURCE_DIR}/AppIcon.icns" $/../Resources/AppIcon.icns ) + +add_custom_command(TARGET ${EXECUTABLE_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/Assets.car" + $/../Resources/Assets.car +) diff --git a/MoonChild.plist.in b/MoonChild.plist.in new file mode 100644 index 0000000..077b736 --- /dev/null +++ b/MoonChild.plist.in @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleGetInfoString + ${MACOSX_BUNDLE_INFO_STRING} + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + CFBundleIconName + MC ICN TAHOE + CFBundleIdentifier + ${MACOSX_BUNDLE_GUI_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + ${MACOSX_BUNDLE_LONG_VERSION_STRING} + CFBundleName + ${MACOSX_BUNDLE_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} + CFBundleSignature + ???? + CFBundleVersion + ${MACOSX_BUNDLE_BUNDLE_VERSION} + CSResourcesFileMapped + + NSHumanReadableCopyright + ${MACOSX_BUNDLE_COPYRIGHT} + + diff --git a/dmgBG.png b/dmgBG.png new file mode 100644 index 0000000..69a88c5 Binary files /dev/null and b/dmgBG.png differ