NextPrevUpTopContentsIndex

2.2 Delivering the program

Having compiled the program, the next step is to attempt delivery, where you will load the compiled file in a fresh LispWorks session.

Programs are delivered with the function deliver . This function takes three mandatory arguments. There are also many optional keyword arguments to help Delivery make the smallest image possible.

You can read more about this function in Delivering your Application. Keywords to the Delivery Function, describes all the optional keywords available.

In this example, we use just one keyword, and of course we provide the mandatory arguments. These are:

Continuing with the example:

  1. Write a delivery script file ( deliver.lisp ) that compiles and loads the program, and then calls deliver :
  2. (in-package "CL-USER")
    (load-all-patches)
    (example-compile-file "delivery/hello/hello" :load t)
    #+:cocoa
    (example-compile-file 
      "configuration/macos-application-bundle" :load t)
    (deliver 'hello-world 
             #+:cocoa 
             (write-macos-application-bundle
              "~/Desktop/Hello.app"
              ;; Do not copy Lisp Source File
              ;;  association from LispWorks.app
              :document-types nil)
             #-:cocoa "~/hello" 
             5 
             :interface :capi)
  3. Run the lisp image passing your file as the build script. For example, on Microsoft Windows open a DOS window. Ensure you are in the folder containing the LispWorks image and type:
  4. lispworks-5-1-0-x86-win32.exe -build deliver.lisp

    On UNIX, Linux or FreeBSD type the following into a shell:

    % lispworks-5-1-0-x86-linux -build deliver.lisp

    Note: the image name varies between the supported platforms.

    On Mac OS X, use Terminal.app. Ensure you're in the directory of the image first:

    % cd "/Applications/LispWorks 5.1/LispWorks.app/Contents/MacOS"
    % lispworks-5-1-0-macos-universal -build deliver.lisp

    If you want to see the output, you can redirect the output with > to a file or use | , if it works on your system.

  5. Run the application, which is saved in hello.exe on Microsoft Windows, hello on UNIX/Linux/FreeBSD, and Hello.app on Mac OS X.

2.2.1 Further example


LispWorks Delivery User Guide - 14 Mar 2008

NextPrevUpTopContentsIndex