1.2.1 Picking an image path and a kernel path
When GNU Smalltalk is invoked, it first chooses two paths, the “image path”
and the “kernel path”. The image path is set by considering these
paths in succession:
- the directory part of the --image-file option if it is
given;
- the value of the
SMALLTALK_IMAGE
environment variable
if it is defined and readable; this step will disappear in a future
release;
- the path compiled in the binary (usually, under Unix systems,
/usr/local/var/lib/smalltalk or a similar path under /var)
if it exists and it is readable;
- the current directory. The current directory is also used if
the image has to be rebuilt but you cannot write to a directory
chosen according to the previous criteria.
The “kernel path” is the directory in which to look for Smalltalk code
compiled into the base image. The possibilities in this case are:
- the argument to the --kernel-dir option if it is given;
- the value of the
SMALLTALK_KERNEL
environment variable
if it is defined and readable; this step will disappear in a future
release;
- the path compiled in the binary (usually, under Unix systems,
/usr/local/share/smalltalk/kernel or a similar data file path)
if it exists and it is readable;
- a subdirectory named kernel of the image path.