Wednesday, February 25, 2009

iPhone toolchain continued

After attending a python talk at SCALE7x, I did some googling, and it turns out there is a port of pyobjc for the iPhone - whilst useful, I wanted to get into some proper 2D graphics coding, especially with the excellent Cocos2d framework. My last attempt at building a toolchain on my Debian Lenny box ended in failure. However, I came accross iphonedevonlinux which gives you a neat little bash script that abstracts out all the pain of building the iPhone toolchain on Linux. Worked pretty well, I've just compiled my first HelloWorld to the iPhone and (after calling ldid to "sign" the binary) it worked perfectly. Only requirements are an apple developer login (free) and the iphone sdk from apple (downloadable from apple). The script does the rest, including grabbing the latest firmware if you give it your apple dev id and pass. Only non-obvious but was when it died immediately trying to build the toolchain with a misplaced @ error - turns out I had to install gcc objc support - once I did that it compiled straight off. Good times.

The move to Vancouver is becoming a bit more real - I have an appointment at the embassy next week. I've been doing my research, and I should have an archery club within reach. Once I'm settled up there, I intend to get some low-poundage limbs and spend the long lonely evenings working on my form; my current Samick Extremes are just too heavy to do any kind of meaningful form adjustment.

Labels: , , , ,

Tuesday, February 3, 2009

The iPhone Toolchain

Having jailbroken my iphone using quickpwn, I've been busy compiling the toolchain for Linux. The howto is relatively straight-forward, I've run into some issues with the xcode dmgs and extraction of the headers from the pkg - I'll add more when I've figured it all out. It's rather non-obvious.

UPDATE: Once you have the xcode dmg from Apple, use dmg2img to convert it to an img; one can mount this as hpfs loopback. Grab the pkg file the howto specifies. This is an xar archive, you'll need to grab the xar tool to get at the contents.

The command will look something like this:

(I recommend doing this in its own directory, as it just extracts to the current dir)

xar -xf MacOSX10.4.Universal.pkg


Once that's done, one of the resulting files should be called Payload. This is a gzip compressed cpio archive that contains the headers you need. I used this:

mv Payload payload.gz
gunzip -d < payload.gz | cpio -i


This is as far as I've gotten, as it's time for bed. I'll blog some more when I've finished building the toolchain.

Labels: , , , , ,