CMake: Use Info.plist template for macOS bundle

Define and use a template for Info.plist for the macOS bundle. The template
uses the previously defined RPCS3_GIT_TAG variable for automatically
generating the version strings, and also enables proper HiDPI support.
This commit is contained in:
Alex James 2019-02-13 14:11:44 -06:00 committed by Ani
parent 923700a167
commit f5163cc4ff
2 changed files with 33 additions and 7 deletions

View File

@ -40,14 +40,10 @@ file(GLOB RPCS3_SRC "*.cpp")
if(WIN32)
add_executable(rpcs3 WIN32 ${RPCS3_SRC})
elseif(APPLE)
set(MACOSX_BUNDLE_BUNDLE_NAME rpcs3)
set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.rpcs3.rpcs3")
set(MACOSX_BUNDLE_INFO_STRING "Open-source Sony PlayStation 3 emulator")
set(MACOSX_BUNDLE_ICON_FILE "rpcs3.icns")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "0.0.5")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "0.0.5")
set(MACOSX_BUNDLE_BUNDLE_VERSION "0.0.5")
add_executable(rpcs3 MACOSX_BUNDLE ${RPCS3_SRC} "${RPCS3_SRC_DIR}/rpcs3.icns")
set_target_properties(rpcs3
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${RPCS3_SRC_DIR}/rpcs3.plist.in")
else()
add_executable(rpcs3 ${RPCS3_SRC})
endif()

30
rpcs3/rpcs3.plist.in Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>rpcs3</string>
<key>CFBundleGetInfoString</key>
<string>Open-source Sony PlayStation 3 emulator</string>
<key>CFBundleIconFile</key>
<string>rpcs3.icns</string>
<key>CFBundleIdentifier</key>
<string>net.rpcs3.rpcs3</string>
<key>CFBundleLongVersionString</key>
<string>${RPCS3_GIT_TAG}</string>
<key>CFBundleName</key>
<string>RPCS3</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${RPCS3_GIT_TAG}</string>
<key>CFBundleVersion</key>
<string>${RPCS3_GIT_TAG}</string>
<key>NSHumanReadableCopyright</key>
<string>Licensed under GPLv2</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>