2013-05-28 02:39:21 +00:00
|
|
|
#!/bin/bash
|
2013-03-25 16:08:34 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2013-03-26 14:36:40 +00:00
|
|
|
. script/build.config
|
|
|
|
|
2013-07-08 21:48:33 +00:00
|
|
|
PROJECT_NAME="RetroArch_iOS.xcodeproj"
|
2013-03-26 14:36:40 +00:00
|
|
|
|
2013-07-08 22:26:41 +00:00
|
|
|
xcodebuild clean -project $PROJECT_NAME
|
|
|
|
rm -rf build
|
2013-03-26 14:36:40 +00:00
|
|
|
|
2013-05-28 02:39:21 +00:00
|
|
|
if [ -z "$NOCODESIGN" ] ; then
|
2013-05-31 06:02:39 +00:00
|
|
|
# Fetch the UUID of the provisioning profile and install the profile
|
|
|
|
# https://github.com/sharpland/mobileprovisionParser
|
|
|
|
# http://idevblog.info/mobileprovision-files-structure-and-reading/
|
2013-07-08 22:26:41 +00:00
|
|
|
PROVISION_UUID=`script/mobileprovisionParser -f "$PROVISIONING" -o UUID`
|
|
|
|
cp "$PWD/$PROVISIONING" ~/Library/MobileDevice/Provisioning\ Profiles/"$PROVISION_UUID".mobileprovision
|
2013-05-31 06:02:39 +00:00
|
|
|
|
2013-07-08 22:26:41 +00:00
|
|
|
xcodebuild -verbose -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="${CODE_SIGN_IDENTITY}" PROVISIONING_PROFILE="$PROVISION_UUID" -project $PROJECT_NAME
|
2013-05-31 06:02:39 +00:00
|
|
|
|
2013-07-08 22:26:41 +00:00
|
|
|
echo "CODESIGNING DYNAMIC LIBRARIES AND BUILDING IPA"
|
2014-05-22 16:54:10 +00:00
|
|
|
codesign -fs "$CODE_SIGN_IDENTITY" $BUILD_PATH/RetroArch.app/iOS/modules/*.dylib
|
2013-05-31 06:02:39 +00:00
|
|
|
|
|
|
|
xcrun -sdk iphoneos PackageApplication "$BUILD_PATH/RetroArch.app" -o "$BUILD_PATH/RetroArch.ipa" --sign "$CODE_SIGN_IDENTITY" --embed "$BUILD_PATH/RetroArch.app/embedded.mobileprovision"
|
2013-05-28 02:39:21 +00:00
|
|
|
else
|
2013-08-13 17:54:24 +00:00
|
|
|
xcodebuild -verbose -sdk iphoneos -configuration Release -project $PROJECT_NAME
|
2013-05-28 02:39:21 +00:00
|
|
|
echo "Building for Jailbroken system"
|
2013-03-26 14:36:40 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "######### RetroArch build Complete!! #########"
|
|
|
|
echo "You can find the resulting app in the $BUILD_PATH directory.\n"
|