29 lines
1.1 KiB
Bash
Executable File
29 lines
1.1 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
TARGET=$1
|
|
|
|
STEP=$((STEP+1))
|
|
echo -e "\n> > > > Step №$STEP. Generate iOS project for '$TARGET'"
|
|
|
|
# iOS rendering goes through ghera/raylib-iOS: a raylib fork that adds an
|
|
# iOS platform (rcore_ios.c) rendering OpenGL ES via ANGLE. Its stable
|
|
# releases ship prebuilt xcframeworks (raylib + libEGL + libGLESv2). They are
|
|
# ~46 MB, so they are downloaded on demand and never committed.
|
|
RAYLIB_IOS_TAG=6.0.7-iOS
|
|
FRAMEWORKS=$SDIR/../$TARGET/ver-ios/Frameworks
|
|
if [[ ! -d "$FRAMEWORKS/raylib.xcframework" ]]; then
|
|
echo "Raylib iOS xcframeworks missing, downloading $RAYLIB_IOS_TAG..."
|
|
mkdir -p "$FRAMEWORKS"
|
|
TMP=$(mktemp -d)
|
|
curl -sL -o "$TMP/raylib-ios.zip" \
|
|
"https://github.com/ghera/raylib-iOS/releases/download/$RAYLIB_IOS_TAG/raylib-ios-xcframeworks-$RAYLIB_IOS_TAG.zip"
|
|
unzip -q "$TMP/raylib-ios.zip" -d "$TMP"
|
|
cp -R "$TMP/raylib-ios-xcframeworks/raylib.xcframework" "$FRAMEWORKS/"
|
|
cp -R "$TMP/raylib-ios-xcframeworks/libEGL.xcframework" "$FRAMEWORKS/"
|
|
cp -R "$TMP/raylib-ios-xcframeworks/libGLESv2.xcframework" "$FRAMEWORKS/"
|
|
rm -rf "$TMP"
|
|
fi
|
|
|
|
cd $SDIR/../$TARGET/ver-ios
|
|
xcodegen
|