[OGo-GNUstep-Port] Re: Patches
Nicola Pero
gnustep-port@opengroupware.org
Wed, 23 Jul 2003 12:03:15 +0100 (BST)
> >> [...] What I really need is a compile
> >> time flag which tells me, whether the produced executable shall use
> >> the
> >> GNUstep environment for resource discovery.
> >
> > What about using intelligently
> > NSSearchPathForDirectoriesInDomains()
> > to locate resources to load.
>
> libFoundation doesn't have that yet. But I think it isn't sufficient
> anyway. Eg config files are usually stored in GNUSTEP_USER_ROOT if
> available, instead of ~home to be able to host two completely separate
> OGo trees (required for ASP installations).
NSSearchPathForDirectoriesInDomains() supports NSUserRootDomain. The
environment variable GNUSTEP_USER_ROOT is not really a good way of finding
the NSUserRootDomain; the cross-platform API is a better way of doing it.
At least if you know that gnustep-base is being used, I recommend using
NSSearchPathForDirectoriesInDomains() to locate resources.