-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
b-appstore.sh
executable file
·48 lines (35 loc) · 1.25 KB
/
b-appstore.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Build script for iOS app store
echo "PPSSPP App Store XCode generator script"
# Set the development team ID as a DEVTEAM env variable.
if [[ -z "${DEVTEAM}" ]]; then
echo "DEVTEAM not in environment, exiting"
exit 1
fi
if [[ -z "${GOLD}" ]]; then
echo "GOLD is not set (should be YES or NO), exiting"
exit 1
fi
FOLDER_NAME="build-ios"
if [[ "$GOLD" = "YES" ]]; then
echo "GOLD is set to YES, setting folder to build-ios-gold"
FOLDER_NAME="build-ios-gold"
else
echo "Non-GOLD build."
fi
echo "Clearing and re-creating output directory"
rm -rf $FOLDER_NAME
mkdir $FOLDER_NAME
pushd $FOLDER_NAME
BUILD_TYPE=Release
cmake .. -DIOS_APP_STORE=ON -DGOLD=$GOLD -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/ios.cmake -DDEVELOPMENT_TEAM_ID=${DEVTEAM} -DIOS_PLATFORM=OS -GXcode
# TODO: Get a MoltenVK somewhere.
#cp ../MoltenVK/iOS/Frameworks/libMoltenVK.dylib PPSSPP.app/Frameworks
popd
# Very gross hack
# Avoid XCode race condition (???) by pre-generating git-version.cpp
cmake -DSOURCE_DIR=. -DOUTPUT_DIR=$FOLDER_NAME -P git-version.cmake
echo
echo "*** Done. Now run the following command to open in XCode, then run or archive:"
echo " open $FOLDER_NAME/PPSSPP.xcodeproj"
# To open the xcode project:
# open build-ios/PPSSPP.xcodeproj