NextPrevUpTopContentsIndex

7.4 Saving and testing the configured image

Make a copy of config/configure.lisp called /tmp/my-configuration.lisp . When you have made the desired changes in my-configuration.lisp you can save a new LispWorks image. To do this, follow the instructions below.

  1. Create a configuration and saving script /tmp/save-config.lisp containing:
  2. (load-all-patches)
    (load "/tmp/my-configuration.lisp") 
    #+:cocoa
    (compile-file-if-needed 
     (sys:example-file "configuration/macos-application-bundle") 
     :load t)
    (save-image #+:cocoa
                (write-macos-application-bundle
                 "/Applications/LispWorks 5.1/My LispWorks.app")
                #-:cocoa 
                "my-lispworks-motif")

    Note 1: The use of example code supplied with LispWorks which creates a Mac OS X application bundle. This code is in the example file examples/configuration/macos-application-bundle.lisp

    Note 2: This will create a non-universal binary, containing only the architecture on which you call save-image .

  3. Change directory to the directory containing the LispWorks image to configure. For the native Mac OS X/Cocoa LispWorks image:
  4. % cd "/Applications/LispWorks 5.1/LispWorks.app/Contents/MacOS"

    or for the X11/Motif LispWorks image:

    % cd "/Applications/LispWorks 5.1"
  5. Start the supplied image passing the configuration script the build file. For example enter one of the following commands (on one line of input):
  6. % lispworks-5-1-0-macos-universal -siteinit - -build /tmp/save-config.lisp

    or

    % lispworks-5-1-0-macos-universal-motif -siteinit - -build /tmp/save-config.lisp

    If the image will not run at this stage, it is probably not finding a valid key.

    Note that the command line also suppresses the siteinit because this will be loaded automatically when you start the configured image.

    Saving the image takes some time.

You can now use the new My LispWorks.app application bundle or the my-lispworks-motif image by starting it just as you did the supplied LispWorks. The supplied LispWorks is not required after the configuration process has been successfully completed.

Do not try to save a new image over an image that is currently running. Instead, save an image under a unique name, and then, if necessary, replace the new image with the old one after the call to save-image has returned.

7.4.1 Testing the newly saved image

7.4.2 Saving a non-windowing image


LispWorks Release Notes and Installation Guide - 18 Mar 2008

NextPrevUpTopContentsIndex