mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-20 20:56:22 +00:00
iOS/macOS : set bundle version
This commit is contained in:
parent
f82e7a4e7b
commit
bc948b9b94
@ -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
|
||||
|
20
ios/macbundle.sh
Normal file
20
ios/macbundle.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user