Merge pull request #249 from mpelos/master

Fixed build script for iOS
This commit is contained in:
Squarepusher 2013-07-08 15:22:05 -07:00
commit dedc8e8ee3
3 changed files with 14 additions and 17 deletions

View File

@ -10,7 +10,7 @@ Once you have all of this stuff, getting RetroArch on a non-jailbroken device is
## Config
RetroArch needs to know a couple things when building the app. You can configure these under `ios/script/build.config` inside the RetroArch repo. Once you initially clone down the repo, go into this file and make the changes.
RetroArch needs to know a couple things when building the app. You can configure these under `apple/script/build.config` inside the RetroArch repo. Once you initially clone down the repo, go into this file and make the changes.
### CODE\_SIGN\_IDENTITY
@ -24,14 +24,14 @@ Adding the name of the account will make sure it uses the exact codesigning iden
### PROVISIONING
Before you build the app, you'll need to download the provisioning profile you want to use for the app into the `ios` directory. Just drop it in there, and add the file name to the config.
Before you build the app, you'll need to download the provisioning profile you want to use for the app into the `apple` directory. Just drop it in there, and add the file name to the config.
When RetroArch is built into an IPA, it will embed this provisioning profile into the IPA so you can just install the IPA right onto your phone.
## Building
After you've configured the right things, you're ready for building. You'll want to run these from the `ios` directory of the RetroArch project.
After you've configured the right things, you're ready for building. You'll want to run these from the `apple` directory of the RetroArch project.
### Emulator Cores
@ -60,7 +60,7 @@ Run the libretro-super iOS build script to build the emulator cores.
This will clone down their repos, build them into the `libretro-super/dist/ios` directory. Once this is complete, you need to copy them into the appropriate directory for RetroArch iOS. The path is:
`RetroArch/ios/modules`
`RetroArch/apple/modules`
### Build RetroArch iOS app
@ -72,7 +72,7 @@ script/build
This will build the iOS app, codesign everything that needs to, and package it into a distributable IPA.
Once completed, you can find the IPA inside the `ios/build/Release-iphoneos` directory.
Once completed, you can find the IPA inside the `apple/build/Release-iphoneos` directory. Excecute the IPA file and then open iTunes, with you device connected, click in your device, then Applications, find de RetroArch in the list, click install and syncronize with you device.
## Roms

View File

@ -4,25 +4,22 @@ set -e
. script/build.config
xcodebuild clean
rm -rf build
PROJECT_NAME="RetroArch_iOS.xcodeproj"
# xcodebuild clean -project $PROJECT_NAME
# rm -rf build
if [ -z "$NOCODESIGN" ] ; then
# Fetch the UUID of the provisioning profile and install the profile
# https://github.com/sharpland/mobileprovisionParser
# http://idevblog.info/mobileprovision-files-structure-and-reading/
PROVISION_UUID=`script/mobileprovisionParser -f "$PROVISIONING_PROFILE" -o UUID`
cp "$PWD/$PROVISIONING_PROFILE" ~/Library/MobileDevice/Provisioning\ Profiles/"$PROVISION_UUID".mobileprovision
# PROVISION_UUID=`script/mobileprovisionParser -f "$PROVISIONING" -o UUID`
# cp "$PWD/$PROVISIONING" ~/Library/MobileDevice/Provisioning\ Profiles/"$PROVISION_UUID".mobileprovision
xcodebuild -verbose -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="${CODE_SIGN_IDENTITY}" PROVISIONING_PROFILE="$PROVISION_UUID"
# xcodebuild -verbose -sdk iphoneos -configuration Release CODE_SIGN_IDENTITY="${CODE_SIGN_IDENTITY}" PROVISIONING_PROFILE="$PROVISION_UUID" -project $PROJECT_NAME
echo "CODESIGNING DYNAMIC LIBRARIES AND BUILDING IPA"
for file in $(find "$BUILD_PATH/RetroArch.app/modules/" -name "*.dylib") ; do
codesign -fs "$CODE_SIGN_IDENTITY" "$file"
done
# echo "CODESIGNING DYNAMIC LIBRARIES AND BUILDING IPA"
# codesign -fs "$CODE_SIGN_IDENTITY" $BUILD_PATH/RetroArch.app/modules/*.dylib
xcrun -sdk iphoneos PackageApplication "$BUILD_PATH/RetroArch.app" -o "$BUILD_PATH/RetroArch.ipa" --sign "$CODE_SIGN_IDENTITY" --embed "$BUILD_PATH/RetroArch.app/embedded.mobileprovision"
else

View File

@ -1,3 +1,3 @@
CODE_SIGN_IDENTITY="iPhone Distribution"
CODE_SIGN_IDENTITY="iPhone Developer"
PROVISIONING="distribution.mobileprovision"
BUILD_PATH="$PWD/build/Release-iphoneos"