opensubscriber
   Find in this group all groups
 
Unknown more information…

d : discuss-gnustep@gnu.org 2 August 2009 • 10:02PM -0400

Re: Install resources for a tool
by Nicola Pero

REPLY TO AUTHOR
 
REPLY TO GROUP





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
Discuss-gnustep@gnu....
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.