Next Prev Up Top Contents Index

save-image

Function
Summary

Saves the image to a new file.

Package

hcl

Signature

save-image filename &key gc type normal-gc restart-function console environment remarks clean-down => nil

Arguments

filename

A string. It is the name of the file that the image is saved as. This name should not be the same as the original name of the image.

gc

If non- nil , there is a garbage collection before the image is saved. The default value is t .

type

Determines if some global variables are cleared before the image is saved. You can generally use the default value, which is :user .

normal-gc

If this is t the function normal-gc is called before the image is saved. The default is t .

restart-function

Specifies a function (with no arguments) to be called when the image is started. The default is nil . The restart-function is called after the init-file is loaded.

console

console controls whether the new image will be a Console or GUI application and when, if ever, to make a console window in the latter case. Possible values are discussed below.

environment

environment controls whether the LispWorks environment is started on restart. Possible values are discussed below.

remarks

remarks adds a comment to the save history. The value should be a string.

clean-down

When t , calls (clean-down t) .

Values

Returns nil .

Description

Using this function, you can make modifications to the image, and then save the image with the modifications inside. This is particularly important when patches are sent by Xanalys.

Do not use this function when the programming environment is running. Instead, create an initialization script.

The possible values for console are as follows:

:default

Unchanged since previous save.

t

A Console application is saved, else a Windows application is saved which create its own console according to the other possible values.

:input , :output , :io

Whenever input, output or any io is attempted on *terminal-io* .

:init

At startup, if input and output are not redirected

:always

At startup, even if input and output are redirected.

The LispWorks image shipped by Xanalys has it set to :input .

The possible values for environment are as follows:

:default

Unchanged since previous save.

nil

Start with just the TTY listener.

t

Start the environment automatically, no TTY listener.

:with-tty-listener

Start the environment automatically, but still have a TTY listener.

The LispWorks image shipped by Xanalys has it set to t .

You should not try to save a new image over an existing one on SPARC based machines. Always save images using a unique image name, and then, if necessary, replace the new image with the old one after the call to save-image has returned.

Example

Here is an example initialization script. Save this to a file such as my-file.lisp , then run LispWorks with the command line argument -init c:/my-file.lisp to build the image my-image.exe .

(load "my-application")
(save-image "my-image")
(quit)

LispWorks Reference Manual (Windows version) - 14 Dec 2001

Next Prev Up Top Contents Index