Sunday, February 26, 2012

Compiling ScummVM for iOS (iPhone/iPad) with Xcode

It's a shame that there is no official release of the excellent ScummVM engine available at the AppStore. Although there is an official port of the ScummVM for Apple's iOS platform available for download, this makes only the ones with a jail brake happy.

I'm very happy with my un-jailbroken iPhone/iPad combination and have no plans for jailbraking. The main reason for this decision is, that I'm just too lazy for rejailbraking my devices after every OS update.

So for all non-jailbrakers the only chance to get ScummVM on you device is to build it yourself, sign it with an official developer certificate (only available from Apple) and sync it to your device manually.

There's a short explanation how to compile in the wiki.

Getting the source from ScummVM is no problem at all.

Just open the command line and enter
git clone scummvm
This gets you a fresh copy directly out of the developer branch. You'll find the Xcode project files at /dists/iphone. You can get the needed external libraries from here. Just extract them to /dists/iphone

Unfortunately the Xcode project is (intentionally) outdated and doesn't build.

All my efforts to get it up and running led to nowhere. Well, this is just my fault. Missing experience with Xcode, you know.

Fortunately someone else managed to build a working Xcode project. So here is how I got a fresh ScummVM build for my iOS devices:

Get the fork with the working Xcode project from github by entering:
git clone scummvm
Select the correct branch (this may vary) by entering:
git checkout remotes/origin/aspectRatio
Now open /dists/iphone/scummvm.xcodeproj and build (Cmd-B) the binary.

Attention! Get the result out of /tmp/scumm-dst. There should be a
Use Xcode Organizer (Shift-Cmd-2) to install to your device. Copy compatible games to the Documents directory with XCode Organizer or use iExplorer and experience ScummVM on your iOS device.

If you're too lazy to compile it yourself, download ScummVM 1.5git as an IPA here.

To install you need to resign it with a valid code signing certificate. You can easily resign the package with iModResign.