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 5.0/Othello.app"
;; Do not copy Lisp Source File
;; associations from LispWorks.app
:document-types nil)
#-: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 4.4.5/LispWorks.app/Contents/MacOS 6 % ./lispworks-4-4-5-darwin -init ~/Desktop/script.lisp
LispWorks(R): The Common Lisp Programming Environment
Copyright (C) 1987-2005 LispWorks Ltd. All rights reserved.
Version 4.4.5
Saved by LispWorks as lispworks-4-4-5-darwin, at 11 Mar 2005 17:37
User dubya on mymac
; Loading text file /Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/config/siteinit.lisp
; Loading text file /Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/private-patches/load.lisp
; Loading text file /u/ldisk/dubya/Desktop/script.lisp
; Loading text file /Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/private-patches/load.lisp
; Loading fasl file /u/ldisk/dubya/Desktop/othello.nfasl
;;; Compiling file /Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/examples/configuration/macos-application-bundle ...
;;; Safety = 3, Speed = 1, Space = 1, Float = 1, Interruptible = 0
;;; Compilation speed = 1, Debug = 2, Fixnum safety = 3
;;; Source level debugging is on
;;; Source file recording is on
;;; Cross referencing is on
; (TOP-LEVEL-FORM 1)
; (TOP-LEVEL-FORM 2)
;;;*** Warning in WRITE-MACOS-APPLICATION-BUNDLE: ROLE is bound but not referenced
; WRITE-MACOS-APPLICATION-BUNDLE
; CHOOSE-TEMPLATE-BUNDLE-PATH
; MAKE-APPLICATION-SUBPATHS
; COPY-MODIFIED-INFO-PLIST
; WRITE-DOCUMENT-TYPES
; WRITE-MODIFIED-INFO-VALUE
; COPY-FILES
; COPY-FILE
; (TOP-LEVEL-FORM 3)
; Loading fasl file /Applications/LispWorks 4.4.5/Library/lib/4-4-0-0/examples/configuration/macos-application-bundle.nfasl
; Loading fasl file /Applications/LispWorks 4.4.5/Library/lib/4-4-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 4.4.5/Othello.app/Contents/MacOS/Othello
mymac:/Applications/LispWorks 5.0/LispWorks.app/Contents/MacOS 7 %
The last line of the
deliver
output shows the full path to the executable, but you should run the Application /Applications/LispWorks 5.0/Othello.app via the Finder.