mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-08 15:20:45 +01:00
Merge pull request #13210 from OatmealDome/fix-scmrevgen
ScmRevGen: Don't generate Info.plist files directly
This commit is contained in:
commit
8d9ec2fde9
24
CMake/DolphinInjectVersionInfo.cmake
Normal file
24
CMake/DolphinInjectVersionInfo.cmake
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
function(dolphin_inject_version_info target)
|
||||||
|
set(INFO_PLIST_PATH "$<TARGET_BUNDLE_DIR:${target}>/Contents/Info.plist")
|
||||||
|
add_custom_command(TARGET ${target}
|
||||||
|
POST_BUILD
|
||||||
|
|
||||||
|
COMMAND /usr/libexec/PlistBuddy -c
|
||||||
|
"Delete :CFBundleShortVersionString"
|
||||||
|
"${INFO_PLIST_PATH}"
|
||||||
|
|| true
|
||||||
|
|
||||||
|
COMMAND /usr/libexec/PlistBuddy -c
|
||||||
|
"Delete :CFBundleLongVersionString"
|
||||||
|
"${INFO_PLIST_PATH}"
|
||||||
|
|| true
|
||||||
|
|
||||||
|
COMMAND /usr/libexec/PlistBuddy -c
|
||||||
|
"Delete :CFBundleVersion"
|
||||||
|
"${INFO_PLIST_PATH}"
|
||||||
|
|| true
|
||||||
|
|
||||||
|
COMMAND /usr/libexec/PlistBuddy -c
|
||||||
|
"Merge '${CMAKE_BINARY_DIR}/Source/Core/VersionInfo.plist'"
|
||||||
|
"${INFO_PLIST_PATH}")
|
||||||
|
endfunction()
|
@ -65,6 +65,5 @@ endfunction()
|
|||||||
configure_source_file("Source/Core/Common/scmrev.h")
|
configure_source_file("Source/Core/Common/scmrev.h")
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
configure_source_file("Source/Core/DolphinQt/Info.plist")
|
configure_source_file("Source/Core/VersionInfo.plist")
|
||||||
configure_source_file("Source/Core/MacUpdater/Info.plist")
|
|
||||||
endif()
|
endif()
|
||||||
|
@ -783,14 +783,9 @@ if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt)
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core)
|
||||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist)
|
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist)
|
||||||
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist)
|
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/VersionInfo.plist)
|
||||||
endif()
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater)
|
|
||||||
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist)
|
|
||||||
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -573,12 +573,11 @@ endif()
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
include(BundleUtilities)
|
include(BundleUtilities)
|
||||||
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DolphinQt.app)
|
|
||||||
|
|
||||||
# Ask for an application bundle.
|
# Ask for an application bundle.
|
||||||
set_target_properties(dolphin-emu PROPERTIES
|
set_target_properties(dolphin-emu PROPERTIES
|
||||||
MACOSX_BUNDLE true
|
MACOSX_BUNDLE true
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
|
||||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
|
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ""
|
||||||
OUTPUT_NAME DolphinQt
|
OUTPUT_NAME DolphinQt
|
||||||
)
|
)
|
||||||
@ -615,6 +614,9 @@ if(APPLE)
|
|||||||
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}")
|
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
include(DolphinInjectVersionInfo)
|
||||||
|
dolphin_inject_version_info(dolphin-emu)
|
||||||
|
|
||||||
# Copy MoltenVK into the bundle
|
# Copy MoltenVK into the bundle
|
||||||
if(ENABLE_VULKAN)
|
if(ENABLE_VULKAN)
|
||||||
if(USE_BUNDLED_MOLTENVK)
|
if(USE_BUNDLED_MOLTENVK)
|
||||||
@ -649,7 +651,7 @@ if(APPLE)
|
|||||||
COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh"
|
COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh"
|
||||||
"-e" "${CMAKE_CURRENT_SOURCE_DIR}/DolphinEmu$<$<CONFIG:Debug>:Debug>.entitlements"
|
"-e" "${CMAKE_CURRENT_SOURCE_DIR}/DolphinEmu$<$<CONFIG:Debug>:Debug>.entitlements"
|
||||||
"${MACOS_CODE_SIGNING_IDENTITY}"
|
"${MACOS_CODE_SIGNING_IDENTITY}"
|
||||||
"${BUNDLE_PATH}"
|
"$<TARGET_BUNDLE_DIR:dolphin-emu>"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -39,12 +39,6 @@
|
|||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>${DOLPHIN_WC_DESCRIBE}</string>
|
|
||||||
<key>CFBundleLongVersionString</key>
|
|
||||||
<string>${DOLPHIN_WC_REVISION}</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Licensed under GPL version 2 or later (GPLv2+)</string>
|
<string>Licensed under GPL version 2 or later (GPLv2+)</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
|
@ -16,7 +16,7 @@ add_dependencies(MacUpdater dolphin_scmrev)
|
|||||||
|
|
||||||
set_target_properties(MacUpdater PROPERTIES
|
set_target_properties(MacUpdater PROPERTIES
|
||||||
MACOSX_BUNDLE true
|
MACOSX_BUNDLE true
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist"
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
|
||||||
OUTPUT_NAME "Dolphin Updater")
|
OUTPUT_NAME "Dolphin Updater")
|
||||||
|
|
||||||
target_compile_options(MacUpdater PRIVATE -x objective-c++)
|
target_compile_options(MacUpdater PRIVATE -x objective-c++)
|
||||||
@ -53,6 +53,9 @@ foreach(sb ${STORYBOARDS})
|
|||||||
COMMENT "Compiling Storyboard ${sb}...")
|
COMMENT "Compiling Storyboard ${sb}...")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
include(DolphinInjectVersionInfo)
|
||||||
|
dolphin_inject_version_info(MacUpdater)
|
||||||
|
|
||||||
if(NOT SKIP_POSTPROCESS_BUNDLE)
|
if(NOT SKIP_POSTPROCESS_BUNDLE)
|
||||||
# Update library references to make the bundle portable
|
# Update library references to make the bundle portable
|
||||||
include(DolphinPostprocessBundle)
|
include(DolphinPostprocessBundle)
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
<string>Dolphin Updater</string>
|
<string>Dolphin Updater</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>${DOLPHIN_WC_DESCRIBE}</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}</string>
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
13
Source/Core/VersionInfo.plist.in
Normal file
13
Source/Core/VersionInfo.plist.in
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<!-- This plist file is merged with the application's Info.plist to set its version info. -->
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>${DOLPHIN_WC_DESCRIBE}</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string>${DOLPHIN_WC_REVISION}</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Loading…
Reference in New Issue
Block a user