LispWorks Delivery User Guide > 12 Delivering CAPI Othello > 12.3 Creating a Mac OS X application bundle


12.3.1 Example application bundle delivery script

Note how this script calls deliver with the executable path returned by write-macos-application-bundle :

(in-package "CL-USER")
;; Compile and load othello example code
(compile-file (example-file "capi/applications/othello")
              :output-file :temp
              :load t)
;; Compile and load Application Bundle example code
 (example-file "configuration/macos-application-bundle")
 :output-file :temp
 :load t)
;; Now deliver the application itself and create the 
;; application
(deliver 'play-othello 
         #+:cocoa (write-macos-application-bundle
                  ;; Do not copy Lisp Source File
                  ;;  associations from
                  :document-types nil)
         #-:cocoa "~/othello"
         0 :interface :capi)

In the session below script.lisp is in the user's home directory. Here is the start and end of the session output in

mymac:/Applications/LispWorks 5.1/ 2 % ./lispworks-5-1-0-macos-universal -build ~/script.lisp 
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2007 LispWorks Ltd.  All rights reserved.
Version 5.1.0
Saved by LispWorks as lispworks-5-1-0-x86-darwin, at 18 Oct 2007 1:41
User dubya on mymac
; Loading text file /u/dubya/deliver-othello.lisp
;  Loading text file /Applications/LispWorks 5.1/Library/lib/5-1-0-0/private-patches/load.lisp
;;; Compiling file /Applications/LispWorks 5.1/Library/lib/5-1-0-0/examples/capi/applications/othello ...
;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 0
[... full compilation and delivery output not shown...]
Shaking stage : Saving image
Build saving image: /u/dubya/Desktop/
Build saved image: /u/ldisk/dubya/Desktop/
Delivery successful - /u/dubya/Desktop/

The last line of the deliver output shows the full path to the executable, but you should run the application bundle via the Finder.

LispWorks Delivery User Guide - 22 Dec 2009