2002-01-03 13:17:30 +00:00
|
|
|
<?xml version="1.0"?>
|
2004-06-22 22:14:09 +00:00
|
|
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.1//EN" "http://www.gnustep.org/gsdoc-1_0_1.xml">
|
2005-07-15 22:51:23 +00:00
|
|
|
<!--
|
|
|
|
Copying and distribution of this file, with or without modification,
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
notice and this notice are preserved.
|
|
|
|
-->
|
2002-01-03 13:17:30 +00:00
|
|
|
<gsdoc base="Base">
|
|
|
|
<head>
|
|
|
|
<title>GNUstep Base</title>
|
|
|
|
<author name="Richard Frith-Macdonald">
|
|
|
|
<email address="rfm@gnu.org"/>
|
|
|
|
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
|
|
|
</author>
|
|
|
|
<version>$Revision$</version>
|
|
|
|
<date>$Date$</date>
|
2005-07-15 22:51:23 +00:00
|
|
|
<copy>2005 Free Software Foundation, Inc.</copy>
|
2002-01-03 13:17:30 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<chapter>
|
|
|
|
<heading>Base</heading>
|
|
|
|
<p>
|
2004-06-22 22:14:09 +00:00
|
|
|
The GNUstep Base library is a free software package implementing
|
2002-01-03 13:17:30 +00:00
|
|
|
the API of the OpenStep Foundation Kit (tm), including later
|
2003-01-23 10:51:51 +00:00
|
|
|
additions. This documentation package describes the core of the
|
2004-06-22 22:14:09 +00:00
|
|
|
Base library, for documentation on additional classes, see the
|
2003-01-23 10:51:51 +00:00
|
|
|
BaseAdditions documentation package.
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
2004-06-14 22:27:22 +00:00
|
|
|
<p>
|
|
|
|
Read the
|
|
|
|
<uref url="../ReleaseNotes/ReleaseNotes.html">Release Notes</uref>
|
|
|
|
for the current release.
|
|
|
|
</p>
|
2002-01-03 13:17:30 +00:00
|
|
|
<section>
|
|
|
|
<heading>Compatibility</heading>
|
|
|
|
<p>
|
|
|
|
GNUstep is generally compatible with the OpenStep specification and
|
|
|
|
with recent developments of the MacOS (cocoa) API. Where MacOS
|
|
|
|
deviates from the OpenStep API, GNUstep generally attempts to
|
|
|
|
support both versions. In some cases the newer MacOS APIs are
|
|
|
|
incompatible with OpenStep, and GNUstep usually supports the richer
|
2003-04-04 03:56:14 +00:00
|
|
|
version. See the
|
2004-05-28 19:44:29 +00:00
|
|
|
<uref url="../General/OpenStepCompliance.html">OpenStep Compliance</uref> section
|
2003-04-04 03:56:14 +00:00
|
|
|
for more information on OpenStep Compliance.
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
In order to deal with compatiblity issues, GNUstep uses two
|
|
|
|
mechanisms - it provides conditionally compiled sections of
|
|
|
|
the library header files, so that software can be built that
|
|
|
|
will conform strictly to a particular API, and it provides
|
|
|
|
user default settings to control the behavior of the library
|
|
|
|
at runtime.
|
|
|
|
</p>
|
|
|
|
<subsect>
|
|
|
|
<heading>Conditional compilation</heading>
|
|
|
|
<p>
|
|
|
|
Adding an option to a makefile to define one of the following
|
|
|
|
preprocessor constants will modify the API visible to software
|
|
|
|
being compiled -
|
|
|
|
</p>
|
|
|
|
<deflist>
|
2005-06-05 05:24:45 +00:00
|
|
|
<term>GS_GNUSTEP_V</term>
|
|
|
|
<desc>
|
|
|
|
Specifies the software version of the header being included.<br />
|
|
|
|
Features in that header which are declared as having been
|
|
|
|
introduced at or before the specified version, and not being
|
|
|
|
removed until or after the specified version are available.<br />
|
|
|
|
The version consists of five or six digits ...
|
|
|
|
a major number (0-99) followed by a minor number (00-99) and
|
|
|
|
a subminor number (00-00).<br />
|
|
|
|
Features in the header file are marked as belonging to different
|
|
|
|
version ranges using the GS_API_VERSION macro.<br />
|
|
|
|
NB. This is the <em>native</em> versioning of the library being
|
|
|
|
used via the header file. You can use this mechanism in your
|
|
|
|
own libraries and frameworks.
|
|
|
|
</desc>
|
|
|
|
<term>GS_OPENSTEP_V</term>
|
|
|
|
<desc>
|
|
|
|
Used only for the software version in sequence of OpenStep
|
|
|
|
specification and the NeXT/Apple implementation of that
|
|
|
|
specification and its extensions.<br />
|
|
|
|
Features in the header being included which are declared
|
|
|
|
as having been introduced at or before the specified version,
|
|
|
|
and not being removed until or after the specified version
|
|
|
|
are available.<br />
|
|
|
|
The version consists of five or six digits ...
|
|
|
|
a major number (1-99) followed by a minor number (00-99) and
|
|
|
|
a subminor number (00-00).<br />
|
|
|
|
A major number of 1 indicates the OpenStep specification ...
|
|
|
|
available as the GS_API_OSSPEC preprocessor constant.<br />
|
|
|
|
A major number of 4 indicates the OPENSTEP implementation ...
|
|
|
|
available as the GS_API_OPENSTEP preprocessor constant.<br />
|
|
|
|
A major number of 10 indicates the MacOS-X implementation ...
|
|
|
|
available as the GS_API_MACOSX preprocessor constant.<br />
|
|
|
|
Features in the header file are marked as belonging to different
|
|
|
|
version ranges using the OS_API_VERSION macro.<br />
|
|
|
|
</desc>
|
2002-01-03 13:17:30 +00:00
|
|
|
<term>NO_GNUSTEP</term>
|
|
|
|
<desc>
|
|
|
|
GNUstep specific extensions to the OpenStep and MacOS cocoa
|
2005-06-05 05:24:45 +00:00
|
|
|
APIs are excluded from the headers.<br />
|
|
|
|
This is obsolete .. setting GS_OPENSTEP_V should exclude
|
|
|
|
GNUstep extensions.
|
2002-01-03 13:17:30 +00:00
|
|
|
</desc>
|
|
|
|
<term>STRICT_MACOS_X</term>
|
|
|
|
<desc>
|
2005-06-05 05:24:45 +00:00
|
|
|
Only methods and classes that are part of the oriignal MacOS
|
|
|
|
cocoa API are made available in the headers.<br />
|
|
|
|
This is obsolete .. setting GS_OPENSTEP_V to GS_API_MACOSX should
|
|
|
|
do this.
|
2002-01-03 13:17:30 +00:00
|
|
|
</desc>
|
|
|
|
<term>STRICT_OPENSTEP</term>
|
|
|
|
<desc>
|
|
|
|
Only methods and classes that are part of the OpenStep
|
2005-06-05 05:24:45 +00:00
|
|
|
specification are made available in the headers.<br />
|
|
|
|
This is obsolete .. setting GS_OPENSTEP_V to GS_API_OPENSTEP
|
|
|
|
should do this.
|
2002-01-03 13:17:30 +00:00
|
|
|
</desc>
|
|
|
|
</deflist>
|
2002-08-30 14:54:07 +00:00
|
|
|
<p>
|
|
|
|
<em>NB</em> These preprocessor constants are used in
|
|
|
|
<em>developer code</em> (ie the code that users of GNUstep write)
|
2004-06-22 22:14:09 +00:00
|
|
|
rather than by the GNUstep software itself. They permit a
|
2002-08-30 14:54:07 +00:00
|
|
|
developer to ensure that he/she does not write code which depends
|
|
|
|
upon API not present on other implementations (in practice,
|
|
|
|
MacOS-X or some old OPENSTEP systems).<br />
|
|
|
|
The actual GNUstep libraries are always built with the full
|
|
|
|
GNUstep API in place, so that the feature set is as consistent
|
|
|
|
as possible.
|
|
|
|
</p>
|
2002-01-03 13:17:30 +00:00
|
|
|
</subsect>
|
|
|
|
<subsect>
|
|
|
|
<heading>User defaults</heading>
|
|
|
|
<deflist>
|
2003-07-17 09:27:31 +00:00
|
|
|
<term>GNU-Debug</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
An array of strings that lists debug levels to be used
|
|
|
|
within the program. These debug levels are merged with
|
|
|
|
any which were set on the command line or added programmatically
|
|
|
|
to the set given by the [NSProcessInfo-debugSet] method.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-01-03 13:17:30 +00:00
|
|
|
<term>GSLogSyslog</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Setting the user default <code>GSLogSyslog</code> to
|
|
|
|
<code>YES</code> will cause log/debug output to be sent to
|
|
|
|
the syslog facility (on systems which support it), rather
|
|
|
|
than to the standard error stream. This is useful in
|
|
|
|
environments where stderr has been re-used strangely for
|
2005-10-09 09:32:54 +00:00
|
|
|
some reason.<br />
|
|
|
|
On mswindows, where syslog does not exist, this flag instead
|
|
|
|
controls whether log/debug output is sent to the windows
|
|
|
|
event log.
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
|
|
|
</desc>
|
2005-02-22 14:06:28 +00:00
|
|
|
<term>GSLogThread</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Setting the user default <code>GSLogThread</code> to
|
|
|
|
<code>YES</code> will cause NSLog and debug output to
|
|
|
|
include the current thread in the logged message.<br />
|
|
|
|
This is useful for debugging multi-threaded applications.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-01-03 13:17:30 +00:00
|
|
|
<term>GSMacOSXCompatible</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Setting the user default <code>GSMacOSXCompatible</code> to
|
|
|
|
<code>YES</code> will cause MacOS compatible behavior to be
|
|
|
|
the default at runtime. This default may however be overridden
|
|
|
|
to provide more fine grained control of system behavior.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GSOldStyleGeometry</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Specifies whether the functions for producing strings
|
|
|
|
describing geometric structures (NSStringFromPoint(),
|
|
|
|
NSStringFromSize(), and NSStringFromRect()) should produce
|
|
|
|
strings conforming to the OpenStep specification or to
|
|
|
|
MacOS-X behavior. The functions for parsing those strings
|
|
|
|
should cope with both cases anyway.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-06-12 12:02:48 +00:00
|
|
|
<term>GSSOCKS</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
May be used to specify a default SOCKS5 server (and optionally
|
|
|
|
a port separated from the server by a colon) to which tcp/ip
|
|
|
|
connections made using the NSFileHandle extension methods
|
|
|
|
should be directed.<br />
|
|
|
|
This default overrides the SOCKS5_SERVER and SOCKS_SERVER
|
|
|
|
environment variables.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-10-11 11:30:45 +00:00
|
|
|
<term>Local Time Zone</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the name of the timezone to be used by the
|
|
|
|
<ref type="class" id="NSTimeZone">NSTimeZone</ref> class.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-01-03 13:17:30 +00:00
|
|
|
<term>NSWriteOldStylePropertyLists</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Specifies whether text property-list output should be in
|
|
|
|
the default MacOS-X format (XML), or in the more human
|
|
|
|
readable (but less powerful) original OpenStep format.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Reading of property lists is supported in either format,
|
|
|
|
but <em>only</em> if GNUstep is built with the libxml
|
|
|
|
library (which is needed to handle XML parsing).
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
NB. MacOS-X generates illegal XML for some strings - those
|
|
|
|
which contain characters not legal in XML. GNUstep always
|
|
|
|
generates legal XML, at the cost of a certain degree of
|
|
|
|
compatibility. GNUstep XML property lists use a backslash
|
|
|
|
to escape illegal chatracters, and consequently any string
|
|
|
|
containing either a backslash or an illegal character will
|
|
|
|
be written differently to the same string on MacOS-X.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>NSLanguages</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
An array of strings that lists the users prefered languages,
|
|
|
|
in order or preference. If not found the default is just
|
|
|
|
English.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</deflist>
|
|
|
|
</subsect>
|
|
|
|
<subsect>
|
|
|
|
<heading>Environment variables</heading>
|
|
|
|
<p>
|
|
|
|
There are some environment variables used by GNUstep base, where
|
2004-06-22 22:14:09 +00:00
|
|
|
there would be problems obtaining data from the defaults system.
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
|
|
|
<deflist>
|
|
|
|
<term>CRASH_ON_ABORT</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
The default exception handler will either cause the program to
|
|
|
|
simply terminate, or to crash - leaving a core dump. The
|
|
|
|
standard behavior is to leave a core dump if the library was
|
|
|
|
built for debugging, and to simply exit if it was not.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The CRASH_ON_ABORT environment variable can be used to
|
|
|
|
override this behavior. If this is defined to <em>NO</em>,
|
|
|
|
<em>FALSE</em>, or <em>0</em> then the program will simply
|
|
|
|
exit when an exception occurs. Any other value of the
|
|
|
|
variable will cause the program to generate a core dump.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_STRING_ENCODING</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
This is used to specify the default encoding for 8-bit
|
2004-04-27 11:55:34 +00:00
|
|
|
strings (those used by 'cstring' methods of NSString).<br />
|
|
|
|
It may be any of the 8-bit encodings supported
|
|
|
|
by your system.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
If this environment variable is not set, GNUstep attempts
|
|
|
|
to use the characterset specified by your operating systems,
|
|
|
|
locale information (using the standard nl_langinfo function)
|
|
|
|
if possible.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
If there is no usable operating system defined characterset,
|
|
|
|
GNUstep defaults to NSISOLatin1StringEncoding.
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_HOST_CPU</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used in place of GNUSTEP_TARGET_CPU if the other is missing.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_HOST_DIR</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used in place of GNUSTEP_TARGET_DIR if the other is missing.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_HOST_OS</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used in place of GNUSTEP_TARGET_OS if the other is missing.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_LOCAL_ROOT</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the GNUstep root directory for local
|
|
|
|
(non-system) resources. Typically all locally produced
|
|
|
|
or contributed software is installed relative to this.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_NETWORK_ROOT</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the GNUstep root directory for local
|
|
|
|
(non-system) resources that are intended to be shared
|
|
|
|
across a local network. Typically this is an NFS exported
|
|
|
|
directory shared by many machines. It provides an
|
|
|
|
alternative to GNUSTEP_LOCAL_ROOT.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_SYSTEM_ROOT</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the GNUstep system root directory ... all
|
|
|
|
system libraries, tools, applications, headers, resources
|
|
|
|
in general are located relative to this.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_USER_ROOT</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
2002-05-10 09:07:10 +00:00
|
|
|
This environment variable, commonly set by the make system,
|
|
|
|
is <strong>not</strong> used by GNUstep programs. Instead
|
2005-10-12 06:15:15 +00:00
|
|
|
values from the GNUstep configuration file are used (see later).
|
2002-01-03 13:17:30 +00:00
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_TARGET_CPU</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Overrides the default value of the machine (hardware)
|
|
|
|
name used on this system.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_TARGET_DIR</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Overrides the default path used to locate subdirectories
|
|
|
|
for GNUstep binaries withing bundles and applications.
|
|
|
|
This is normally equivalent to a path made up of the
|
|
|
|
GNUSTEP_TARGET_CPU and GNUSTEP_TARGET_OS
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_TARGET_OS</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Overrides the default value of the operating system
|
|
|
|
name used on this system.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>GNUSTEP_TZ</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the timezone to be used if there is no
|
|
|
|
timezone specified in the user defaults system.
|
|
|
|
The preferred
|
|
|
|
mechanism is to use the 'Local Time Zone' value from the
|
|
|
|
user defaults system.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>HOMEDRIVE</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used on windoze to locate the home directory.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>HOMEPATH</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used on windoze to locate the home directory.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>LANGUAGES</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
If there is no NSLanguages user default set, and there is
|
|
|
|
no language infromation available in the native system locale
|
|
|
|
mechanism, then this environment variable is used to provide
|
|
|
|
a list of the languages that the user prefers to use.
|
|
|
|
languages listed in this variable must be separated by
|
|
|
|
semicolons.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>LOGNAME</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
This is used as the default value for the current user
|
|
|
|
(as returned by the NSUserName() functions). If it is not
|
|
|
|
specified, or contains an illegal value, other methods are
|
|
|
|
used to get the user name.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>LIBRARY_COMBO</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to override the default value of the combination
|
|
|
|
of standard libraries used to build binaries. This
|
|
|
|
value locates the final subdirectory used to locate binaries.
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-05-10 17:05:10 +00:00
|
|
|
<term>NSDeallocateZombies</term>
|
|
|
|
<desc>
|
2002-10-11 11:30:45 +00:00
|
|
|
<p>
|
|
|
|
This may be used in conjunction with NSZombieEnabled to specify
|
|
|
|
whether the objects should really be deallocated. If you set
|
|
|
|
this to YES, the zombie logging will only work until the
|
|
|
|
deallocated memory is re-used.
|
|
|
|
</p>
|
2002-05-10 17:05:10 +00:00
|
|
|
</desc>
|
|
|
|
<term>NSZombieEnabled</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
If this is set to YES, then deallocation of an object causes
|
2002-10-11 11:30:45 +00:00
|
|
|
the object to be morphed into a Zombie ... a special object
|
2002-05-10 17:05:10 +00:00
|
|
|
which will call the GNUstep specific GSLogZombie() function
|
|
|
|
to log the method call.<br />
|
|
|
|
You can set a breakpoint in this function and examine the
|
2002-10-11 11:30:45 +00:00
|
|
|
process memory if you are running under a debugger.<br />
|
2002-05-10 17:05:10 +00:00
|
|
|
As this overrides actual object deallocation, all memory
|
|
|
|
allocated for objects will be leaked!
|
|
|
|
</p>
|
|
|
|
</desc>
|
2002-06-12 12:02:48 +00:00
|
|
|
<term>SOCKS5_SERVER</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Specifies the default socks server to be used when making
|
|
|
|
outgoing tcp/ip connections using NSFileHandle. This may
|
|
|
|
also specify a port after the host name (and spearated
|
|
|
|
from it by a colon).<br />
|
|
|
|
This environment variable is used only if the GSSOCKS
|
|
|
|
user default is not set.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<term>SOCKS_SERVER</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Equivalent to SOCKS5_SERVER, but used only if that is not
|
|
|
|
defined.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
|
2002-01-03 13:17:30 +00:00
|
|
|
<term>TZ</term>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Used to specify the timezone to be used if there is no
|
|
|
|
timezone specified by any other mechanism. The preferred
|
|
|
|
mechanism is to use the 'Local Time Zone' value from the
|
|
|
|
user defaults system.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
|
|
|
|
</deflist>
|
|
|
|
</subsect>
|
2005-03-15 04:24:26 +00:00
|
|
|
|
|
|
|
<subsect>
|
|
|
|
<heading>GNUstep Configuration File</heading>
|
|
|
|
<p>
|
|
|
|
This file is the master configuration file for GNUstep. It
|
|
|
|
can be used to set the base location of all the standard
|
|
|
|
paths that GNUstep programs use or know about. The
|
|
|
|
location of this file depends on how the Base library was
|
2005-10-12 06:15:15 +00:00
|
|
|
configured and/or what operating system it was configured
|
2005-03-15 04:24:26 +00:00
|
|
|
on. On a GNU/Linux system, the default would be
|
2005-10-12 17:40:40 +00:00
|
|
|
/etc/GNUstep/GNUstep.conf, for instance.<br />
|
|
|
|
The location of this file can be overridden using the
|
2005-10-15 07:19:11 +00:00
|
|
|
GNUSTEP_CONFIG_FILE environment variable.<br />
|
2005-10-16 14:20:14 +00:00
|
|
|
The configuration file is not actually required to exist.
|
|
|
|
If it does not exist, then default values will be used
|
|
|
|
for the standard path locations.<br />
|
|
|
|
System paths are defined by the following:
|
2005-03-15 04:24:26 +00:00
|
|
|
</p>
|
|
|
|
<deflist>
|
|
|
|
<term>GNUSTEP_SYSTEM_ROOT</term>
|
|
|
|
<desc>path in the file heirarchy for system/os things.</desc>
|
|
|
|
<term>GNUSTEP_NETWORK_ROOT</term>
|
|
|
|
<desc>path to network mounted resources.</desc>
|
|
|
|
<term>GNUSTEP_LOCAL_ROOT</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>path for non-system resources for the specific
|
|
|
|
machine.</desc>
|
2005-03-15 04:24:26 +00:00
|
|
|
</deflist>
|
|
|
|
<p>
|
|
|
|
Paths for each user are defined by the following:
|
|
|
|
</p>
|
2005-10-15 07:19:11 +00:00
|
|
|
<deflist>
|
|
|
|
<term>GNUSTEP_USER_DIR</term>
|
|
|
|
<desc>Path for user specific GNUstep resources (eg. 'GNUstep').
|
|
|
|
Relative to the user's home directory.</desc>
|
|
|
|
<term>GNUSTEP_USER_CONFIG_FILE</term>
|
|
|
|
<desc>Name of user configuration file (eg. '.GNUsteprc')
|
|
|
|
relative to the user's home directory.</desc>
|
|
|
|
<term>GNUSTEP_USER_DEFAULTS_DIR</term>
|
|
|
|
<desc>Name of directory for user defaults files.
|
2005-10-23 06:35:33 +00:00
|
|
|
Relative to the user's home directory.<br />
|
|
|
|
On mswindows this may be set to be ':REGISTRY:' to have defaults
|
|
|
|
stored in the windows registry rather than in the standard file
|
|
|
|
format.</desc>
|
2005-10-15 07:19:11 +00:00
|
|
|
</deflist>
|
|
|
|
<p>
|
2005-10-17 05:44:18 +00:00
|
|
|
The user's home directory is taken to be the standard
|
|
|
|
home directory for that user on the system<br />
|
|
|
|
On unix, that is the user's home directory from the password file,
|
|
|
|
while on windows it's the value given by the
|
|
|
|
Win32GetUserProfileDirectory() function.
|
2005-10-15 07:19:11 +00:00
|
|
|
</p>
|
2005-03-15 04:24:26 +00:00
|
|
|
<p>
|
|
|
|
Support is provided to locate OS/PLATFORM directories. A conf file
|
|
|
|
may provide the definitions below:
|
|
|
|
</p>
|
2005-10-12 06:15:15 +00:00
|
|
|
<deflist>
|
|
|
|
<term>SYS_PREFS</term>
|
|
|
|
<desc>Place for system/os preferences (eg. '/etc')</desc>
|
|
|
|
<term>SYS_APPS</term>
|
|
|
|
<desc>Place for system/os applications (eg. '/bin')</desc>
|
|
|
|
<term>SYS_LIBS</term>
|
|
|
|
<desc>Place for system/os shared libraries (eg. '/lib')</desc>
|
|
|
|
<term>SYS_ADMIN</term>
|
|
|
|
<desc>Place for system administration tools (eg. '/sbin')</desc>
|
|
|
|
<term>PLATFORM_APPS</term>
|
|
|
|
<desc>Place for non-gnustep applications (eg. '/usr/bin')</desc>
|
|
|
|
<term>PLATFORM_LIBS</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for application shared libraries
|
|
|
|
(eg. '/usr/lib')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
<term>PLATFORM_RESOURCES</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for shared application resources
|
|
|
|
(eg. '/usr/share')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
<term>PLATFORM_ADMIN</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for non-critical administrative tools
|
|
|
|
(eg. '/usr/sbin')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
<term>PLATFORM_LOCAL_APPS</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for machine local applications
|
|
|
|
(eg. '/usr/local/bin')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
<term>PLATFORM_LOCAL_LIBS</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for machine local shared libraries
|
|
|
|
(eg. '/usr/local/lib/')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
<term>PLATFORM_LOCAL_RESOURCES</term>
|
2005-10-15 07:19:11 +00:00
|
|
|
<desc>Place for machine local resources.
|
|
|
|
(eg. '/usr/local/share')</desc>
|
2005-10-12 06:15:15 +00:00
|
|
|
</deflist>
|
|
|
|
<p>
|
|
|
|
These add to the path for NSSystemDomainMask, or
|
|
|
|
NSLocalDomainMask as appropriate.
|
|
|
|
</p>
|
|
|
|
</subsect>
|
2005-10-16 14:20:14 +00:00
|
|
|
<subsect>
|
|
|
|
<heading>Relocatable packages</heading>
|
|
|
|
<p>
|
|
|
|
The configuration files system has two features which make
|
|
|
|
it possible to build standalone packages containing the
|
|
|
|
entire GNUstep system in a form which can be moved anywhere
|
|
|
|
and just run.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Firstly, wariables in the configuration file which define
|
|
|
|
paths, are expected to by full path specifications, except
|
|
|
|
for the special case in which they begin with dot-slash (./).
|
|
|
|
In this case the dot-slash is replaced by the path to the
|
|
|
|
directory containing the configuration file (or specified to
|
|
|
|
contain the configuration file if no configuration file exists).
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Secondly, If the value specified by GNUSTEP_CONFIG_FILE (or
|
|
|
|
built into the base library) itself begins with a dot and
|
2005-10-17 05:44:18 +00:00
|
|
|
slash (./) then the path used for that file is made relative
|
|
|
|
to the base library.<br />
|
|
|
|
ie the dot-slash is replaced by the path to the directory
|
|
|
|
containing the gnustep-base library.
|
2005-10-16 14:20:14 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
So you can bundle the whole lot together in one directory,
|
|
|
|
and configure various relative paths in that directory, then
|
|
|
|
move the directory around wherever you like.
|
|
|
|
</p>
|
|
|
|
</subsect>
|
2002-05-10 09:07:10 +00:00
|
|
|
<subsect>
|
2005-10-15 07:19:11 +00:00
|
|
|
<heading>.GNUstep.conf files</heading>
|
2005-10-15 09:18:02 +00:00
|
|
|
<p>
|
|
|
|
The user specific configuration file is read after the system
|
|
|
|
configuration file and may generally override values from the
|
|
|
|
main file. To prevent the use specific file from being read,
|
|
|
|
the system manager may define GNUSTEP_USER_CONFIG_FILE in the
|
|
|
|
main file to be an empty string.<br />
|
|
|
|
In any case, the user specific file is <em>not</em> read if a
|
|
|
|
program is running setuid.
|
|
|
|
</p>
|
2002-05-10 09:07:10 +00:00
|
|
|
<p>
|
|
|
|
The locations of the directories in which user specific files and
|
2005-10-12 06:15:15 +00:00
|
|
|
the user defaults database are stored may be defined in the
|
2005-10-15 07:19:11 +00:00
|
|
|
file given by GNUSTEP_USER_CONFIG_FILE (by default,
|
|
|
|
<code>.GNUstep.conf</code>).<br />
|
2002-05-10 09:07:10 +00:00
|
|
|
If no location is given for user specific files, they are stored
|
2005-10-15 07:19:11 +00:00
|
|
|
in the locaton given by GNUSTEP_USER_DIR (by default, the
|
2005-10-12 06:15:15 +00:00
|
|
|
<code>GNUstep</code> subdirectory of the users home
|
|
|
|
directory).<br />
|
2002-05-10 09:07:10 +00:00
|
|
|
If a separate location is not given for the defaults database, it
|
2005-10-15 07:19:11 +00:00
|
|
|
is stored in the subdirectory of the users home directory given by
|
|
|
|
GNUSTEP_USER_DEFAULTS_DIR (by default, the
|
|
|
|
<code>GNUstep/Defaults</code> subdirectory).<br />
|
2002-05-10 09:07:10 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
2005-10-15 07:19:11 +00:00
|
|
|
The presence of a <code>.GNUstep.conf</code> file in a users home
|
|
|
|
directory permits the user to customize file locations using all
|
|
|
|
the same commands as the system directory, though any attempt
|
|
|
|
to redefine GNUSTEP_USER_CONFIG_FILE is of course ignored.<br />
|
|
|
|
Attempts to redefine the users home directory at this level
|
|
|
|
are also ignored.
|
2002-05-10 09:07:10 +00:00
|
|
|
</p>
|
|
|
|
</subsect>
|
2002-01-03 13:17:30 +00:00
|
|
|
</section>
|
|
|
|
</chapter>
|
|
|
|
<back>
|
2004-06-22 22:14:09 +00:00
|
|
|
<chapter>
|
|
|
|
<heading>API Documentation</heading>
|
|
|
|
<list>
|
|
|
|
<item><uref url="Functions.html">Functions</uref></item>
|
|
|
|
<item><uref url="TypesAndConstants.html">Types and Constants</uref></item>
|
|
|
|
</list>
|
|
|
|
</chapter>
|
2002-01-05 09:54:28 +00:00
|
|
|
<index scope="project" type="class" />
|
|
|
|
<index scope="project" type="protocol" />
|
2004-06-22 22:14:09 +00:00
|
|
|
<!-- <index scope="project" type="title" /> -->
|
2002-01-03 13:17:30 +00:00
|
|
|
</back>
|
|
|
|
</body>
|
|
|
|
</gsdoc>
|