(this page is obsolete, since deployment is now a built-in feature of recent CHICKEN versions)

Similar to the solution for Deploying Linux binaries, we can modify the link-paths of a Scheme application that uses the objc egg to create a fully self-contained Cocoa application bundle.

First, build the "Temperature Converter" application, but adding a small prologue that retrieves the physical location of the current executable and sets the "repository path", the path where extensions are to be loaded at run-time:

After building the application in the objc egg, we can look at the libraries that are used at run-time:

% otool -L TemperatureConverter
TemperatureConverter:
/usr/lib/libchicken.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.0.0)
/usr/lib/libffi.4.dylib (compatibility version 5.0.0, current version 5.1.0)

Then we use install_name_tool to change the load-paths of the two non-system libraries to point to the location where the executable (TemperatureConverter) is located: