Re: Adding Resource Bundles
Re: Adding Resource Bundles
- Subject: Re: Adding Resource Bundles
- From: Achal Oza <email@hidden>
- Date: Thu, 25 Aug 2005 22:08:47 -0400
Thanks for the advice Scott. I'm trying to stay away from adding too
many OS X specific calls though since I'd like this project to remain
cross-platform. I've been able to access the images so far by
changing the path so now I have a setup like this:
#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"?
Thanks again,
Achal
On Aug 24, 2005, at 5:01 PM, Scott Tooker wrote:
On Mac OS X, if you have a bundle of any type (which includes
applications and frameworks), the standard thing to do is to place
any resources in the Resources folder of the bundle itself.
In your case, just add the images to the "Copy Bundle Resources"
build phase of the application target and then use CFBundle APIs to
get at the images.
Scott
On Aug 24, 2005, at 1:44 PM, Achal Oza wrote:
I recently ported over an OpenGL SDL application from Linux to OS
X. The development environment is up and running but I'm having
trouble figuring out what to do with my images.
For my Linux application I had the images stored under /MyApp/
images. However, this approach does not work with Xcode. Instead I
copy the image directory to either /MyApp/build/Deployment/images
or /MyApp/build/Development/images depending on my build
configuration. I don't think this is correct.
I get the impression that I should create a resource bundle that
contains all my images and then when I compile, this bundle is
placed inside the /MyApp/build/Deployment/MyApp.app directory
automatically. Is that correct? Any ideas on how to do it?
Thanks,
Achal Oza
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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