NextPrevUpTopContentsIndex

4.3 How to deliver a standalone version of your application

There are usually two considerations when delivering an application.

  1. Making the application run standalone.
  2. That is, turn the application into a single executable file that needs no assistance from LispWorks in order to run.

  3. Make the application smaller.
  4. That is, make the application smaller than the development environment plus application code.

We recommend delivering a standalone application first, with no attempt to make the image smaller. Do this by delivering at delivery level 0, which removes very little from the image. You can then look into making the image smaller if you need to.

If you try to do both of these in the first attempt and the delivered application does not work, it is not clear whether the wrong thing was removed from the image, or the application would not have delivered properly even if no image reduction work was done.

Once you have developed and compiled your application, you are ready to deliver it as a standalone application. Delivering a standalone version is done by calling deliver with level 0, which does not try to make the image smaller, but removes the LispWorks environment. To do this modify your deliver.lisp script from Delivering the program as appropriate to your application:

(load-all-patches)
(load-my-application) 	
;;; unless you have it already loaded as suggested in 
;;;Saving the image before attempting delivery
(deliver 'my-function "my-program" 0 :interface :capi)
(quit)

This is assuming your application uses CAPI. If it does not, you can eliminate :interface :capi . In this case, if your application requires multiprocessing, you to need to pass :multiprocessing t :

(deliver `my-function "my-program" 0 :multiprocessing t)

Then run LispWorks with deliver.lisp as an init file.

MS-DOS> lispworks-5-0-0-x86-win32.exe -init deliver.lisp unix% lispworks-5-0-0-x86-linux -init deliver.lisp

Note: the image name varies between the supported UNIX and Linux platforms.

unix% lispworks-5-0-0-darwin -init deliver.lisp

This creates an executable in my-program.exe on Windows, or my-program on UNIX/Linux/Mac OS X. When this executable starts, it calls my-function without arguments.


LispWorks Delivery User Guide - 12 Sep 2005

NextPrevUpTopContentsIndex