[AD] iphone build script

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I wrote an iPhone build script. I had a few bash scripts that used to build Allegro and install it on my system.

I'm from a Windows dev background and I found the transition to Mac development quite a steep learning curve. And what with additional the problems of Xcode 4 and cmake it has been a struggle to automate the builds. Ideally I just want to pull from git to get the latest features and then run a script and it compiles and installs for my cross platform development environment. I want to target OSX (x86_64), iOS (iPhone, iPad), and Windows (currently win32).

I found the best way to set up Xcode projects for iOS was to use universal binaries. You can combine multiple targets architectures into one library archive, using lipo. This is useful for developing on the iPhone simulator (which is really just i386 32-bit on OSX) and iPhone (armv6/7/7s). If the headers are cross platform and the libs contain all of the iOS architectures you only need on lib (not one per architecture). This saves either renaming all the libs xyz-arm.a, xyz-sim.a etc.

Since you can target Allegro at OSX 32-bit (i386) and the base SDK is different it is best not to put the OSX binaries in with the iOS ones. So you have two different targets, which you'll need in your Xcode project anyway as you can't have a target with 2 different base SDKs (unless you get messy with the configs).

So, this is a few scripts mashed together. It is a work in progress, but it is working for me. Perhaps you'd like to try it and give feedback. 

https://github.com/billyquith/allegro5/blob/5.1/apple_build.sh

Cheers, Nick




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/