CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Qt/macbundle.sh
Views: 1401
1
#!/bin/bash
2
3
PPSSPP="${1}"
4
PPSSPPQt="${PPSSPP}/Contents/MacOS/PPSSPPQt"
5
6
if [ ! -f "${PPSSPPQt}" ]; then
7
echo "No such file: ${PPSSPPQt}!"
8
exit 0
9
fi
10
11
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp")
12
13
echo "Running Qt macbundle.sh for $PPSSPP/Contents/Info.plist ($GIT_VERSION_LINE)"
14
15
# Why don't we just put these in the template?
16
plutil -replace NSPrincipalClass -string NSApplication ${PPSSPP}/Contents/Info.plist
17
plutil -replace NSHighResolutionCapable -bool YES ${PPSSPP}/Contents/Info.plist
18
19
plutil -replace NSLocationWhenInUseUsageDescription -string "Your location may be used to emulate Go!Explore, a GPS accessory" ${PPSSPP}/Contents/Info.plist
20
plutil -replace NSCameraUsageDescription -string "Your camera may be used to emulate Go!Cam, a camera accessory" ${PPSSPP}/Contents/Info.plist
21
plutil -replace NSMicrophoneUsageDescription -string "Your microphone may be used to emulate Go!Cam/Talkman, a microphone accessory" ${PPSSPP}/Contents/Info.plist
22
23
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
24
LONG_VERSION_MATCH='.*"v(.*)";'
25
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
26
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
27
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Contents/Info.plist
28
else
29
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Contents/Info.plist
30
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Contents/Info.plist
31
fi
32
33
# TODO: install SDL and Qt frameworks
34
35