Lisp HUG Maillist Archive

LWM: launching a delivered application and its menubar

Hi

I just delivered (successfully) an application under LWM.

However:

1 - the only way to run such an application seems to be from the shell.
2 - No menubar is installed for the application when launched in that 
way.

Is this correct?

Cheers

--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: LWM: launching a delivered application and its menubar

Marco Antoniotti <marcoxa@cs.nyu.edu> writes:

> However:
> 
> 1 - the only way to run such an application seems to be from the shell.

If Xanalys didn't include any tools since the beta that I'm not aware of,
you need to manually create the application bundle (.app directory).

When I asked for this during beta testing, Xanalys suggested to simply
copy the LispWorks.app directory and replace the appropriate files.

Here's what I did:

1. copied LispWorks.app to MyApp.app (using cp -pr from the command line)

2. replaced MyApp.app/Contents/MacOS/lispworks-4-3-0-darwin with
   my application binary

3. edited MyApp.app/Contents/Info.plist and replaced the appropriate strings

4. replaced the icon file MyApp.app/Contents/Resources/app.icns
   (there's a utility in the Apple dev. tools that will easily make an
    icns file for you from any suitable picture source).
-- 
  (espen)


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: LWM: launching a delivered application and its menubar

Thanks.

That looks like what I needed.

Marco



On Wednesday, Aug 13, 2003, at 03:47 America/New_York, Espen Vestre  
wrote:

> Marco Antoniotti <marcoxa@cs.nyu.edu> writes:
>
>> However:
>>
>> 1 - the only way to run such an application seems to be from the  
>> shell.
>
> If Xanalys didn't include any tools since the beta that I'm not aware  
> of,
> you need to manually create the application bundle (.app directory).
>
> When I asked for this during beta testing, Xanalys suggested to simply
> copy the LispWorks.app directory and replace the appropriate files.
>
> Here's what I did:
>
> 1. copied LispWorks.app to MyApp.app (using cp -pr from the command  
> line)
>
> 2. replaced MyApp.app/Contents/MacOS/lispworks-4-3-0-darwin with
>    my application binary
>
> 3. edited MyApp.app/Contents/Info.plist and replaced the appropriate  
> strings
>
> 4. replaced the icon file MyApp.app/Contents/Resources/app.icns
>    (there's a utility in the Apple dev. tools that will easily make an
>     icns file for you from any suitable picture source).
> --  
>   (espen)
>
>
> _______________________________________________________________________ 
> _
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> _______________________________________________________________________ 
> _
>
--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: LWM: launching a delivered application and its menubar

Unable to parse email body. Email id is 1299

Re: LWM: launching a delivered application and its menubar

Thanks

as usual I suffer from extreme cases of RTFM :)

Cheers

Marco


On Wednesday, Aug 13, 2003, at 09:13 America/New_York, David Fox wrote:

>
>    I just delivered (successfully) an application under LWM.
>
>    However:
>
>    1 - the only way to run such an application seems to be from the  
> shell.
>    2 - No menubar is installed for the application when launched in  
> that
>    way.
>
>    Is this correct?
>
> Your delivered image needs to be wrapped in a Mac OS application
> bundle.
>
> See section 3.4 of your Installation Guide and Release Notes for
> notes on saving an image with a Mac OS application bundle.
>
> The procedure for delivering with an application bundle is similar - I
> put below the relevant section from the latest version of the Delivery
> User Guide.
>
>
> Dave Fox
> Xanalys
> Compass House
> Vision Park
> Chivers Way
> Histon
> Cambridge
> CB4 9AD
> England
>
> Email: davef@xanalys.com
> Tel:   +44 1223 253793
> Fax:   +44 1223 257812
> These opinions are not necessarily those of Xanalys.
>
>
> ----------------------------------------------------------------------
> 9.3 Creating a Mac OS application bundle
>
> The section applies only to users of LispWorks for Macintosh.
>
> The example script in Section 9.1 on page 97 will create an executable
> on your Mac OS system and you can build your non-GUI programs like
> that.
>
> However, you should not simply run a Mac OS GUI application from the
> command line in Terminal.app. Instead you should put the image in a
> suitable Application Bundle and run it using the Finder.
>
> Your LispWorks Library contains example code which constructs a
> suitable Mac OS application bundle for your delivered image. The
> function write-macosapplication- bundle does several things:
>
> * creates the folders comprising an Application Bundle
> * adds the resources from LispWorks.app to the Application Bundle
> * writes a suitable Info.plist file in the Application Bundle
> * returns the path of the executable within the 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)
>
> Note how this script calls deliver with the executable path returned
> by writemacos- application-bundle.
>
> 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.
>
> ----------------------------------------------------------------------
>
>
> _______________________________________________________________________ 
> _
> This email has been scanned for all viruses by the MessageLabs Email
> Security System. For more information on a proactive email security
> service working around the clock, around the globe, visit
> http://www.messagelabs.com
> _______________________________________________________________________ 
> _
>
--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Updated at: 2020-12-10 08:59 UTC