MacOS X (10.2.2) standalone ghc app

Andre Pang ozone@algorithm.com.au
Tue, 3 Dec 2002 14:07:42 -0800


On Mon, Dec 02, 2002 at 11:47:41PM +0100, Wolfgang Thaller wrote:

> >I'm trying to deliver a self contained app that I developed with ghc 
> >5.04.1 on Mac OS X (10.2.2). It all works well if ghc is installed on 
> >the machine, but on a user-machine w/o ghc, the following file is 
> >needed:
> >
> >HaskellSupport.framework/Versions/A/HaskellSupport
> 
> 1) Distribute HaskellSupport.framework along with your app, with 
> instructions on how to install it or with an installer.
> It should go into /Libraries/Frameworks/
> 
> 2) If you already have a MacOS X-Style .app-package for your 
> application, you can put HaskellSupport.framework into 
> MyApplication.app/Contents/Frameworks/. Unfortunately, .app-packages 
> aren't very useful for non-graphical applications.

If you don't have a .app-style package for your program, bundle
the HaskellSupport.framework file with your tarball and use
a shell script launcher to tell dyld(1) where the framework is.

e.g. if you install your package to /opt/MyHaskellProgram, dump
the HaskellSupport.framework directory in
/opt/MyHaskellProgram/Frameworks and use something like this:

    #!/bin/sh
    DYLD_FRAMEWORK_PATH=/opt/MyHaskellProgram/Frameworks
    export DYLD_FRAMEWORK_PATH
    exec /opt/MyHaskellProgram/bin/MyHaskellProgram "$@"

"man dyld" for other fun experiences in linking :)


-- 
#ozone/algorithm <ozone@algorithm.com.au>          - trust.in.love.to.save