How do I create a Tcl-based "clickable" Mac OS X application?

The term clickable refers to files which are double-clicked to launch from within the Finder. That is, navigating to a particular directory and double-clicking a file in the directory to launch it. Mac OS X's main form of clickable application is a .app bundle which is essentially a specially-structured directory that is treated as a single entity. MacOS X also recognizes shell scripts and binaries as executable, but it will launch a Terminal window in order to execute those types of program if they are double-clicked from the Finder.

The true way to get an application which is clickable on OS X is to create a .app bundle. There are several ways to do this.


Roy Keene's "... starkit2exe [1 ] ... creates a 'clickable' application if the target is Mac OS X."

The ActiveState Tcl Dev Kit will create a "clickable" OS X .app application using TclApp.

A guide to creating Mac application packages with Tclkits Starkits is available at http://anoved.net/2007/12/minimal-tcltk-mac-application-packages/ and a tool that can help do the same automatically is available at http://anoved.net/2007/12/minimal-tcltk-mac-application-packages/ (neither resource is necessarily up to date).

See also http://opensource.codebykevin.com/tutorial.html , which describes "How to Build Tcl/Tk Application Bundles: the Mac Way."

Platypus (http://www.sveinbjorn.org/platypus ) is a general-purpose tool for turning just about anything into a .app bundle. Pretty easy to use and pretty handy.


JOB I also wanted to have a simple solution to create this magic .app fully automated. Could manage it just with one more rule in the Makefile as discussed here: cross-building a starkit


http://tkchat.tclers.tk provides an example of a .dmg containing a .app which in turn contains tclkit (the latest decarbonised version) and tkchat.kit.

It also illustrates how to make the perfect installation scheme work: just drag the application to the link to the Applications folder.


Related material appears as "More MacOS X techniques".