All Manuals > LispWorks Delivery User Guide > 2 A Short Delivery Example > 2.2 Delivering the program

NextPrevUpTopContentsIndex

2.2.2 Delivering the program using a command shell

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)
    (deliver 'hello-world 
             #+:cocoa 
             (create-macos-application-bundle
              "~/Desktop/Hello.app"
              ;; Do not copy file associations
              ;;  from LispWorks.app
              :document-types nil)
             #-:cocoa "~/hello" 
             0 
             :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-6-1-0-x86-win32.exe -build deliver.lisp

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

    % lispworks-6-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 6.1/LispWorks.app/Contents/MacOS"
    % ./lispworks-6-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.
  6. Now generate a smaller executable by discarding unused code while delivering. Do this by editing your file deliver.lisp to specify a higher level argument in the call to deliver. Try changing it to 5 for the largest effect.

Note: On Mac OS X, if hcl:create-macos-application-bundle does not do what you need, please see Alternative application bundle creation code for an alternative, but also please inform Lisp Support.


LispWorks Delivery User Guide - 13 Dec 2011

NextPrevUpTopContentsIndex