On 2 Aug 2009, at 13:36, Martin Kalbfuß wrote:
I'm creating a game using my sdl wrapper library. So there is no gui
stuff.
I`m using the tool project type. But how can I install resources
like images
with my game?
You need to use
xxx_HAS_RESOURCE_BUNDLE = yes
that will turn on our support for tool resource bundles. To be clear,
that only works with gnustep-base - ie, it won't work on Apple Mac OS X.
If you need to support Apple Mac OS X, then you probably need to
create a separate bundle or framework with your resources, and link
the tool to it.
If you use xxx_HAS_RESOURCE_BUNDLE, you can then add resources to the
tool, any sort of, with the usual
xxx_RESOURCE_FILES,
xxx_LOCALIZED_RESOURCE_FILES, x
xx_LANGUAGES, etc.
The tool resource bundle (and all resources inside it) can be accessed
at runtime very comfortably, by using gnustep-base's
[NSBundle +mainBundle]
(exactly as you would do for a gui application).
So ... if you want to do this,
My current Makefile looks like this:
include $(GNUSTEP_MAKEFILES)/common.make
[...]
TOOL_NAME = raubvogel
[...]
You should add
raubvogel_HAS_RESOURCE_BUNDLE = yes
Thanks
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep