mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 10:40:01 +01:00
Merge pull request #12866 from Florin9doi/mac_bundle_vers
iOS/macOS : set bundle version
This commit is contained in:
4 files changed
+43
No files matched your search
@@ -2065,6 +2065,7 @@ if(IOS)
|
||||
add_custom_command(TARGET PPSSPP POST_BUILD
|
||||
COMMAND mkdir -p \"${APP_DIR_NAME}\"
|
||||
COMMAND tar -c -C ${CMAKE_CURRENT_BINARY_DIR} --exclude .DS_Store --exclude .git assets *.png | tar -x -C \"${APP_DIR_NAME}\"
|
||||
COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/ios/macbundle.sh" \"${APP_DIR_NAME}\"
|
||||
)
|
||||
set(MACOSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET})
|
||||
set_target_properties(${TargetBin} PROPERTIES
|
||||
|
||||
@@ -15,4 +15,15 @@ plutil -replace NSLocationWhenInUseUsageDescription -string "Your location may b
|
||||
plutil -replace NSCameraUsageDescription -string "Your camera may be used to emulate Go!Cam, a camera accessory" ${PPSSPP}/Contents/Info.plist
|
||||
plutil -replace NSMicrophoneUsageDescription -string "Your microphone may be used to emulate Go!Cam/Talkman, a microphone accessory" ${PPSSPP}/Contents/Info.plist
|
||||
|
||||
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp")
|
||||
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
|
||||
LONG_VERSION_MATCH='.*"v(.*)";'
|
||||
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
|
||||
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
||||
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
||||
else
|
||||
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Contents/Info.plist
|
||||
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Contents/Info.plist
|
||||
fi
|
||||
|
||||
# TODO: install SDL and Qt frameworks
|
||||
@@ -25,3 +25,14 @@ SDLNAME=$(basename "${SDL}")
|
||||
mkdir -p "${PPSSPP}/Contents/Frameworks" || exit 0
|
||||
cp -r "$SDL" "${PPSSPP}/Contents/Frameworks" || exit 0
|
||||
install_name_tool -change "${SDL}" "@executable_path/../Frameworks/${SDLNAME}" "${PPSSPPSDL}" || exit 0
|
||||
|
||||
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp")
|
||||
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
|
||||
LONG_VERSION_MATCH='.*"v(.*)";'
|
||||
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
|
||||
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
||||
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
|
||||
else
|
||||
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Contents/Info.plist
|
||||
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Contents/Info.plist
|
||||
fi
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
PPSSPP="${1}"
|
||||
PPSSPPiOS="${PPSSPP}/PPSSPP"
|
||||
|
||||
if [ ! -f "${PPSSPPiOS}" ]; then
|
||||
echo "No such file: ${PPSSPPiOS}!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp")
|
||||
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
|
||||
LONG_VERSION_MATCH='.*"v(.*)";'
|
||||
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
|
||||
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Info.plist
|
||||
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Info.plist
|
||||
else
|
||||
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Info.plist
|
||||
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Info.plist
|
||||
fi
|
||||
Reference in new issue
Block a user