Hello,

in 19c, ext:*command-line-switches* is still nil when the first function 
from ext:*after-save-initializations* is run; by the time the 
read-eval-print loop is running, it works as advertised.  Is there an 
alternative way to access the path of the current lisp image (the value 
of the "core" switch) at that early point, or possibly from a later 
stage during the *after-save-initializations*?

Background:  I'd like to distribute a dump that depends on foreign 
libraries, together with these libraries.  The absolute path where the 
dump will reside on the target system is not known in advance.  The 
location of the foreign libraries will be known relative to the location 
of the dump.  My idea was to fixup the lib-paths before 
reload-global-table (see 
http://thread.gmane.org/gmane.lisp.cmucl.general/1365 ) depending on the 
value of the "core" switch, but this does not seem to work because that 
info is not available at that point.

A possible workaround could be to use the value of 
ext:*command-line-utility-name* (which is indeed available even at that 
early point) as base path.  This should work because the lisp executable 
will be distributed together with the dump, too.  On the downside, this 
would require us to copy the lisp executable into the dump directory 
even in the non-distribution case, and always run it from there.  Is 
this the recommended way of doing this, or is there a better way?

Thanks in advance,
Andreas


Reply via email to