Note how this script calls deliver with the executable path returned by
hcl:create-macos-application-bundle
:
(in-package "CL-USER")
(load-all-patches)
;; Compile and load othello example code
(compile-file (example-file "capi/applications/othello")
:output-file :temp
:load t)
;; Create Othello.app and deliver the executable inside it
(deliver 'play-othello
#+:cocoa (create-macos-application-bundle
"~/Desktop/Othello.app"
;; Do not copy file associations
;; from LispWorks.app
: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 Terminal.app:
mymac:/Applications/LispWorks 6.1/LispWorks.app/Contents/MacOS % ./lispworks-6-1-0-macos-universal -build ~/script.lisp
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2011 LispWorks Ltd. All rights reserved.
Version 6.1.0
Saved by LispWorks as lispworks-6-1-0-x86-darwin, at 03 Nov 2011 16:03
User dubya on mymac
; Loading text file /Applications/LispWorks 6.1/Library/lib/6-1-0-0/private-patches/load.lisp
; Loading text file /u/dubya/script.lisp
; Loading text file /Applications/LispWorks 6.1/Library/lib/6-1-0-0/private-patches/load.lisp
;;; Compiling file /Applications/LispWorks 6.1/Library/lib/6-1-0-0/examples/capi/applications/othello ...
;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 1
[... full compilation and delivery output not shown...]
Shaking stage : Saving image
Build saving image: /Users/dubya/Desktop/Othello.app/Contents/MacOS/Othello
Build saved image: /Users/dubya/Desktop/Othello.app/Contents/MacOS/Othello
Delivery successful - /Users/dubya/Desktop/Othello.app/Contents/MacOS/Othello
The last line of the
deliver
output shows the full path to the executable, but you should run the application bundle Othello.app via the Finder.
LispWorks Delivery User Guide - 13 Dec 2011