All Manuals > LispWorks® User Guide and Reference Manual > 1 Starting LispWorks

1.2 Passing arguments to LispWorks

Occasionally you may need to start LispWorks with certain arguments. This section describes the most frequent of these occasions.

1.2.1 Saving a new image

Note: If you use the LispWorks IDE, you may find a saved session more convenient than saving an image as described in this section. See 13.4 Saved sessions for more information.

To save a new image "by hand", create a suitable file save-config.lisp as described in the section "Saving and testing the configured image" in the Release Notes and Installation Guide. Such a file should load any desired configuration, modules and application code, and lastly call save-image.

Then you run LispWorks with a command line which passes your file as a build script.

On macOS, run to get a shell, and enter a line like this at the prompt:

% lispworks-8-0-0-macos64-universal -build /tmp/save-config.lisp

On Microsoft Windows, run Command Prompt to get a DOS shell, and enter a line like this:

C:\Program Files\LispWorks>lispworks-8-0-0-x86-win32.exe -build C:\temp\save-config.lisp

On Linux, get a shell and enter a line like this:

% lispworks-8-0-0-x86-linux -build /tmp/save-config.lisp

When the command exits, a new image has been saved. You can run this new image directly from the command line, or create a shortcut or symbolic link to make it convenient to run.

With all the command lines above, if you perform the task frequently, make a script or a shortcut containing the command line, and run that.

Note that save-config.lisp no longer needs to do (load-all-patches) because -build calls load-all-patches automatically in LispWorks 6.1 and later versions. However, if save-config.lisp does call load-all-patches, this is harmless.

1.2.2 Saving a console mode image

To save a LispWorks image which does not start the LispWorks IDE by default, make a script similar to save-config.lisp above, but where you call:

(save-image "my-console-lispworks" :environment nil)

The resulting new image, my-console-lispworks, can be made to start the LispWorks IDE either by calling env:start-environment or by passing -env or -environment on the command line.

1.2.3 Bypassing initialization files

If you do not want to load your personal initialization file, for example to discover if the behavior of LispWorks is due to some setting of yours, pass -init - on the command line.

To start LispWorks without loading either the personal or site initialization files, start it like this:

lispworks -init - -siteinit -

1.2.4 Other command line options

Other less commonly-used LispWorks command line arguments are described in 27.4 The Command Line.

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:18