[SDL] Appending resources to executables (was: Lightweight GUI libraries?)

Christian Walther cwalther at gmx.ch
Sat Jan 13 02:58:38 PST 2007


Andre Krause wrote:
> is it possible to append data to a linux executable binary without linux
> complaining that the binary afterwards is invalid?
> 
> and same question goes for macos? is it possible there?

I don't know, but the point is moot because a Mac OS X application is 
not just an executable. It's a "bundle", i.e. a folder structure (that 
is displayed as if it was a file in the Finder) containing the 
executable and all its necessary support files. See 
<http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html>.
So you just throw your resource files in 
Gravytris.app/Contents/Resources/, the path to which you can find using 
[[[NSBundle mainBundle] resourcePath] fileSystemRepresentation] (that's 
Objective-C/Cocoa, probably there's also a C/CoreFoundation way if you 
don't want to introduce an ObjC file into your project).

  -Christian





More information about the SDL mailing list