On Thu, 18 May 2006, Arjan Molenaar wrote:
I'm Arjan Molenaar, maintainer of the Gaphor (http://gaphor.sourceforge.net), a GTK+ based UML modeling tool.
I'm getting several requests for an easy to install package (.dmg) for OS X.
Since Inkscpae is also a pure GTK+ based application having a OSX package, I was wondering if one could tell me how to build such a package. I have an iBook at my disposal and have Gaphor up and running on OSX.
Hi Arjan,
I've been the main person working on the OS X app build system, with help from several others...
The Inkscape.app OS X package uses some modified code from the Gimp.app project (http://gimp-app.sourceforge.net/) which in turn uses a modified version of some code from the Platypus project (http://sveinbjorn.sytes.net/platypus), which is code for launching command line apps as a application in OS X (so you can drop files on the dock icon to open them for example).
The other key thing is we recursively suck in all the dylibs from fink (though that could be darwin ports) by looking at the output of "otool -L". This allows us to put all the libraries into the app bundle so the end user doesn't need to have the relevant libraries included.
The basic process is similar to that described in the Gimp.app documentation: http://gimp-app.sourceforge.net/gimp.app.howto.txt
The relevant files are (in our SVN repository):
packaging/osx-app.sh A script that can be used to build the app bundle, given a compiled Inkscape workspace.
packaging/macosx/ScriptExec/ Contains our modified version of the launcher. Does things like check X11 is installed, make sure the fontcache is up to date, launch X11 before launching Inkscape. This is an Xcods project, though the script builds it using the command line.
packaging/macosx/Resources/ This contains the app bundle skeleton to which we add the actual executable, all the dylibs, and other GTK dependencies using the osx-app.sh script. The most interesting files are: packaging/macosx/Resources/script and packaging/macosx/Resources/bin/inkscape (both shell scripts) It also contains information for OSX like the filetypes associated with OS X
Please feel free to send me questions about the process or anything you don't understand (probably off-list, and I will update the documentation to reflect any clarification you require).
Cheers, Michael