Next: Applications, Previous: The GNUstep Filesystem Layout, Up: Structure of a Domain [Contents]
In order to install and run software that uses some resources, you need to be able to install the resources in the appropriate location, and your software needs to be able to locate these resources when it’s running.
Since domain locations can be mapped to arbitrary locations on disk, you must use the appropriate gnustep-make and gnustep-base facilities to install things in the right place and to find things at runtime.
GNUstep-make creates makefile variables for all the domain locations.
If you need to perform some custom installation for your software, you
must use these variables to make sure your installation will work with
all filesystem layouts. For example, the Applications location
for the domain where the software will be installed is available as
the GNUSTEP_APPS
variable. You can also access the locations
for specific domains by using the variables
GNUSTEP_SYSTEM_APPS
, GNUSTEP_NETWORK_APPS
,
GNUSTEP_LOCAL_APPS
and GNUSTEP_USER_APPS
.
GNUstep-base provides you with the
NSSearchPathForDirectoriesInDomains()
function that allows you
to retrieve the domain locations at runtime. You must lookup
resources only via this function. For example, the
Applications location can be found by using the
NSApplicationDirectory
directory key, so you can use it in your
software to iterate over all the Applications directories in
the various domains searching for an application.
In general, all interesting domain locations have a set of variables
defined in gnustep-make (such as GNUSTEP_APPS
,
GNUSTEP_SYSTEM_APPS
, GNUSTEP_NETWORK_APPS
,
GNUSTEP_LOCAL_APPS
and GNUSTEP_USER_APPS
) and a
corresponding directory key in gnustep-base (such as
NSApplicationDirectory
).
When examining the various domain locations, we will explicitly mention the gnustep-make variables and the gnustep-base directory keys that can be used to access them.
Next: Applications, Previous: The GNUstep Filesystem Layout, Up: Structure of a Domain [Contents]