17
Jan
Creating Cocoa app bundles from fink programs

With MacOSX the Finder and the BSD/fink subsystem have a different understanding what an application really is. If you want to launch for example “gv” from Firefox to view postscript files, it is not enough to select /sw/bin/gv in the Firefox open dialog. What you have to do, is to create an .app bundle from a fink shell script. Platypus makes that quite easy:
- Installl and launch Platypus
- Set intepreter to
/bin/sh - Click on the “New” button below the “Script Path”.
- Click on “Edit” and write something like:
#!/bin/sh
shift 1
export DISPLAY=:0.0
. /sw/bin/init.sh
exec /sw/bin/gv "$@"
shift 1
export DISPLAY=:0.0
. /sw/bin/init.sh
exec /sw/bin/gv "$@"
It’s important that you write it, not only copy it from here. Copy&paste creates ^M (DOS like?) line ending such that the script is not runnable afterwards.
- Select “Is droppable”
- Change the “App Name” to something sensible, e.g. “gv”
- Click on “Create”
- Store the
gv.appin~/Applications.

Now you can open a postscript file in Firefox and select the new gv.app in the “Open with” dialog. Voila: “shell applications” in your Mac programs.
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack Website




