diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 923aabc2d..1d5b8faa9 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -152,6 +152,7 @@ macro(configurePackingResources) set(MACOSX_BUNDLE_ICON_FILE "AppIcon.icns") set(MACOSX_BUNDLE_INFO_STRING "WerWolv") set(MACOSX_BUNDLE_BUNDLE_NAME "ImHex") + set(MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist.in") set(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.WerWolv.ImHex") set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}-${GIT_COMMIT_HASH}") @@ -283,7 +284,10 @@ macro(createPackage) endif() if (CREATE_PACKAGE) - include(apple) + set (CPACK_BUNDLE_NAME "ImHex") + set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/AppIcon.icns" ) + set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist") + include(CPack) endif() endmacro() diff --git a/cmake/modules/apple.cmake b/cmake/modules/apple.cmake deleted file mode 100644 index bbc80d6ed..000000000 --- a/cmake/modules/apple.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set (CPACK_BUNDLE_NAME "ImHex") -set (CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/AppIcon.icns" ) -set (CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/ImHex.app/Contents/Info.plist") diff --git a/resources/Info.plist.in b/resources/Info.plist.in new file mode 100644 index 000000000..f2c063f48 --- /dev/null +++ b/resources/Info.plist.in @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleGetInfoString + ${MACOSX_BUNDLE_INFO_STRING} + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + CFBundleTypeExtensions + + * + + 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} + +