The process of developing and delivering a LispWorks application can typically be broken down as follows:
Develop your application using LispWorks. In addition to the code that you write, you can use third-party libraries and all the functionality of LispWorks apart from that listed in Functionality removed by delivery.
Application development is covered in detail in Writing Code Suitable for Delivery and you should also read Efficiency considerations when coding for delivery.
Read Delivery on Mac OS X, Delivery on Microsoft Windows or Delivery on Linux, FreeBSD, AIX, x86/x64 Solaris and Unix, as appropriate according to your target platform(s).
If you use CLOS, the FLI or the LispWorks editor in your application, you should also read Delivery and Internal Systems.
You can use any defsystem facility to organize your sources. For example:
lw:defsystem
macro, or
You can then use functions lw:load-system
and lw:compile-system
, or the ASDF equivalents, to work with your source files as a whole.
You may discover performance bottlenecks in your application, before or after delivery. LispWorks provides tools to help eliminate these sorts of problems. A profiler is available in LispWorks, in order to help you make critical code more efficient.
You can also tune the behavior of the garbage collector. See the LispWorks User Guide and Reference Manual for details.
There is a TTY-based debugger available to help debug applications broken by severe delivery parameters. You can deliver this debugger in the application so that you can debug it on-line if something goes wrong.
See the LispWorks User Guide and Reference Manual for more information about these facilities.
Once your application is ready, you can deliver it by loading it and then calling deliver. Note that this has to be done in a script, as described in Delivering the program.
deliver takes many keyword arguments for fine-tuning, but it is intended to work well with a minimal number of keywords. You should start by delivering with no more than the following keywords if required: :interface :capi
, or :multiprocessing t
. Only add other keywords when you find that they are needed.
You can also make LispWorks discard unused code, in order to reduce the delivered image size and thereby improve performance. You should not do this until your delivered application is working, though, because discarding certain code impedes debugging.
If you deliver at level 0 the system does not try to get rid of any code and delivery should be straightforward. Delivery at higher levels tries to remove code, which may cause some problems, and in this case you will need to add the appropriate delivery keywords to fix these problems. However, you should not need to use many keywords. If you use 6 or more delivery keywords, please contact Lisp Support with the details to check that you are doing the right thing.
Delivery is covered in Delivering your Application.
Keywords to the Delivery Function, describes the keywords you can pass to the delivery function, deliver, that permit fine control over the delivery process.
Executables and dynamic libraries that are created using Delivery with LispWorks on most platforms do not require a run time license key.
However, executables and libraries generated by LispWorks (32-bit) for SPARC Solaris do require a LispWorks run time license key. See Run time licensing on SPARC Solaris for more information.
You should load all the Lisp modules that your application needs into the LispWorks image before attempting to deliver your application. Do this by calling require
with each module name in your delivery script.
Delivered applications can deal with errors using the Common Lisp and LispWorks-specific Condition System and error handling facilities if so desired. But if you cannot keep the full Common Lisp Condition System because it is too large, you can still use some basic facilities provided for handling errors.
See Error handling in delivered applications for more details.
You should also consider adding a logging mechanism to your application, which logs any error (as well as other useful information). That is needed both because the delivered application does not have the LispWorks IDE debugging tools, and because end-users generally cannot be expected to debug Lisp code.
Troubleshooting, presents a number of explanations and workarounds for problems you might have when delivering your application.
LispWorks Delivery User Guide - 10 Aug 2017