Note how this script calls
deliver
with the executable path returned by
write-macos-application-bundle
:
(in-package "CL-USER")
(load-all-patches)
;; Load the compiled file othello. Should be in the same
;; directory as this script.
(load (current-pathname "othello" "nfasl"))
;; Load the example code which creates an Application Bundle
#+:cocoa
(compile-file-if-needed
(sys:example-file "configuration/macos-application-bundle")
:load t)
;; Now deliver the application itself and create the
;; application Othello.app
(deliver 'play-othello
#+:cocoa (write-macos-application-bundle
"/Applications/LispWorks/Othello.app")
#-:cocoa "othello"
0 :interface :capi)
(quit)
In the session below both
script.lisp
and
othello.nfasl
are on the Desktop. Here is the start and end of the session output in Terminal.app:
mymac:/Applications/LispWorks/LispWorks.app/Contents/MacOS 8 % lispworks-4-3-0-darwin -init ~/Desktop/script.lisp
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2003 Xanalys LLC. All rights reserved.
Version 4.3.0
Saved by Xanalys as lispworks-4-3-0-darwin, at 19 Jun 2003 16:34
User dubya on mymac
; Loading text file /Applications/LispWorks/Library/hcl/4-3-0-0/config/siteinit.lisp
; Loading text file /Applications/LispWorks/Library/hcl/4-3-0-0/private-patches/load.lisp
; Loading text file /u/ldisk/dubya/Desktop/script.lisp
; Loading text file /Applications/LispWorks/Library/hcl/4-3-0-0/private-patches/load.lisp
; Loading fasl file /u/ldisk/dubya/Desktop/othello.nfasl
; Loading fasl file /Applications/LispWorks/Library/hcl/4-3-0-0/examples/configuration/macos-application-bundle.nfasl
; Loading fasl file /Applications/LispWorks/Library/hcl/4-3-0-0/load-on-demand/nclos/compile-and-delivery.nfasl
[... full module loading and delivery output not shown...]
Shaking stage : Saving image
Delivery successful - /Applications/LispWorks/Othello.app/Contents/MacOS/Othello
mymac:/Applications/LispWorks/LispWorks.app/Contents/MacOS 9 %
The last line of the
deliver
output shows the full path to the executable, but you should run the Application /Applications/LispWorks/Othello.app via the Finder.