Re: Adding Resource Bundles
Re: Adding Resource Bundles
- Subject: Re: Adding Resource Bundles
- From: David Dunham <email@hidden>
- Date: Fri, 26 Aug 2005 08:47:16 -0700
Achal
#ifdef LINUX
loadTexture("images/image.bmp");
#else
loadTexture("MyApp.app/Contents/Resources/image.bmp");
#endif
I'm just curios now if there's a cleaner way of doing this? Perhaps
some preprocessor variable for "MyApp.app/Contents/Resources"?
This will fail if any user renames your application (which they will do).
I guess you could write Mac-specific code to set the working
directory to the Resources directory, using CFBundle routines.
I also recommend creating an images directory inside Resources, for
better cross-platform compatibility (the #ifdef above would no longer
be needed). I think Xcode can do this directly, but you can always
make a script.
--
David Dunham A Sharp, LLC
Voice/Fax: 206 783 7404 http://a-sharp.com
Efficiency is intelligent laziness.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden