Next Prev Up Top Contents Index

9.1.1 Writing a delivery script

The next task is to create a delivery script. This is a Lisp file that, when loaded into the image, loads your compiled application code into the image, then calls the delivery function deliver to produce a standalone image.

The first delivery should be at delivery level 0. A successful delivery at this level proves that the code is suitable for delivery as a standalone application. After assuring yourself of this, you can look into removing code from the image to make it smaller.

If the delivered image is small enough for your purposes, there is no need to pursue a smaller image. An application delivered at level 0 contains a lot more in the way of debugging information and aids, and so is in some ways preferable to a leaner image.

The startup function in the Othello game is CL-USER:play-othello . The initial delivery script therefore looks like this:

(in-package "CL-USER")
 
;; Load the compiled file othello. Should be in the same
;; directory as this script.
 
(load "othello")
 
;; Now deliver the application itself to create the image othello
 
(deliver 'play-othello "othello" 0 :interface :capi)
 
(quit)

Save this script in the newly created othello directory as script.lsp .


LispWorks Delivery User Guide - 11 Dec 2001

Next Prev Up Top Contents Index