29 Jan 2003 TheCorruptor   » (Master)

Demos

So, work is progressing on doing something for the demoscene. We have some members and we're just knocking around story boards and ideas. Can't really say much more atm...

I've been wrestling with how to best distribute a demo given I want to use SDL. I don't really want people to have to download the runtime so I had a stab at statically linking it. Apple don't support this as such, only really documenting the dynamic approach, but they mentioned that you could recompile Csu and get a working Crt0.o, which I duely did. Needed a recompile of cctools (indr was missing) and libstreams, but that was easy enough. However, I never did quite crack getting SDL static.

Then it suddenly dawned on me that the OS X application bundle can contain frameworks (I'd noticed this when I was snooping through some other applications a while back), so I took one of my normally linked demos and copied the SDL framework into the .app/Contents/Frameworks folder. Voila! It picks up the local framework and runs on Emily's iBook quite happily.

I've done a couple of tests, running stuff compiled without the local frameworks, versus stuff with it included, and it seems to be the perfect solution. I can also distribute the code when the demo's out without people having to faff around, they can just compile it against their own SDL installs.

I'm a happy man now I've sussed this out, as I don't need to change to a CoreGraphics stub and I don't need to port my code. I can also distribute everything in one nice bundle so the old time Mac abusers won't get confused (learnt that lesson already). Shame it was about two day's effort to figure all this out though! Maybe I should spend more time going through Apple's documentation and begin to memorise it. Heh...

Next on the list, in-line PPC code...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!