Bundling Rebol Scripts
A rough guide to wrapping REBOL scripts in an OS X App Bundle.

Structure
This is the minimal setup for an application bundle:
MyScript.app/
Contents/
MacOS/
MyScript
Resources/
my-script.r
REBOL/
ViewBoth MyScript and View must have executable permissions, e.g. chmod 755
MyScript is just a plain text shell script:
#!/bin/sh
BASEDIR=$(dirname $(dirname $0))/Resources
exec $BASEDIR/REBOL/View $BASEDIR/my-script.rView is the REBOL executable. Unless you create an Info.plist file for your app, MyScript should match your MyScript.app bundle name. Your working path will be MyScript.app/Contents/Resources/ — you can put all your images and support files there.
Future
I’d like to devise a way to pass arguments, specifically to assign filetypes. My fear is that it may get to complex (note: this is not the same as assigning .r types to REBOL)
More
- Take a look at Ashley’s CookBook for bundling encapped SDK applications as well as adding metadata to your bundle.
- Robert has created an AppleScript bundle that will assign specified filetypes to REBOL.
- An unofficial REBOL icns icon file for use (requires the
Info.plistto set). system/optionsshould give you access to all important directories, such assystem/options/home,system/options/pathorclean-path system/options/script.
