[plt-scheme] Making a distribution in 372

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jan 17 15:18:32 EST 2008

At Thu, 17 Jan 2008 19:21:10 +0000, Filipe Cabecinhas wrote:
> Hi
> On 17 Jan, 2008, at 18:49, Erich Rast wrote:
> > 1.) File types: right now, the machine-dependent standalone app  
> > doesn't recognize its own files. I have installed an application- 
> > file-handler, but this only seems to work when a document window is  
> > already open, it doesn't open the file when it is double-clicked  
> > from the Finder. Drag & drop of the file on the .app bundle doesn't  
> > work either.
> >
> > 2.) Application file icons: Is there a way to programmatically set  
> > the path to a .icns to be used as the file icons of application  
> > documents?
> >
> > 3.) Executable bundle icon: Is there a way to programmatically set  
> > the path to an .icns to be used as the application icon?
> >
> These 3 things are configurable (not programmatically beacause you  
> want them to happen even when your program is not running ;-)) by  
> editing the file *.app/Contents/Info.plist
> You can read further at
> http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/08Config
> uring/chapter_8_section_2.html
> The rest is on the PLT Scheme side and I don't know much about that.  

On the PLT Scheme side, you can set these pieces in one of two ways:

 * If you're using `mzc --gui-exe' to build the executable, and if the
   main module file is "prog.scm" then create

       - "prog.filetypes" (in the same directory) to provide
         file-type information, including icons for document types

       - "prog.icns" (in the same directory) for the application icon

   The details on these are currently in collects/launcher/doc.txt and

 * If you're using the `create-embedding-executable' Scheme API, then
   this information is provided via the `aux' argument. You can build
   up that argument by using `build-aux-from-path', which uses the same
   pieces as `mzc --gui-exe'.


Posted on the users mailing list.