Download Latest Version makeBundle.scptd.zip (16.5 kB)
Email in envelope

Get an email when there's a new version of makeBundle

Home
Name Modified Size InfoDownloads / Week
Contents 2009-10-29
makeBundle.scptd.zip 2009-10-29 16.5 kB
README 2009-10-29 4.0 kB
makeBundle.app.zip 2009-10-29 35.9 kB
Totals: 4 Items   56.3 kB 0
README

#Why have I done this?

I was trying to go through some of the wxHaskell examples, and they wouldn't work on my (Tiger) mac. Same thing happened with a few other wx apps I downloaded from Hackage. Turns out it's an issue with wxMac[1], needing to put the haskell executable in an Application Bundle.

Since I don't know how to use XCode (and quickly got bored of trying to find what I needed to do with it for my needs) I setup an applescript that builds a barebones app bundle, with a basic plist file too.

#Why is there a .sctpd and a .app version?

Either you've downloaded the .app version or the .scptd version. The difference is that makeBundle.scptd is a “script bundle”, which means it’s an Applescript with some extra stuff thrown in – some Perl scripts, a template plist file, an a yaml file for standard settings, but it's still considered to be an applescript by the system.

To run this you have to put it in an application's script menu folder - I put mine into TextWrangler (my text editor of choice) at /Users/YourUserName/Library/Application\ Support/TextWrangler/Scripts/

makeBundle.app is an "application bundle", which means it's an applescript that acts like an application - you can double-click it or Open it and it will run without needing any other application to run it. You can put it wherever you like as it doesn't rely on the application's script menu. All the other things (settings files, perl scripts etc) that it needs are exactly the same as the .sctpd version, it's just a different way to run it.

##Installation

Firstly, download and unzip it.

Once you’ve done that, right-click on it (alt + click) and select “Show Package Contents”. Browse to Contents/Resources/Settings and open makeBundle.yaml with your text editor of choice. 

There’s only 2 settings in there, the author’s name, and the default directory you’d like your bundles to be placed. Change them to whatever suits you best. The directory is relative to your home directory, at the moment it’s set to Documents, so any bundles you create will end up in $HOME/Directory.

Ok, save it. Close that window and you are using the .app version you are good to go. 

If you're using the .sctpd version then place it in ~/Library/Application Support/TextWrangler/Scripts/ (see below if you're not using TextWrangler) or your editor's script menu folder. Now you are good to go! :)

########
##!!Make sure you’ve changed the author name to your name or department/company whatever, or else it will have my name on it!!##
########

Btw, you don’t have to run this from TextWrangler – place it in ~/Library/Scripts/ and you can access it from the scripts menu on the OSX menu bar. If you don’t have a scripts menu then open Applescript Utility and tick the box for it.

#What happens when you run it?

Upon running it, it will prompt you for the name of the application, and where you want to put it (defaulting to the setting you made earlier). And it will setup the dirs and plist for you, just the bare bones, but enough to get things working.

#What do I do next?
All you have to do to use this as an app is put your executable in AppName/Contents/MacOS and ".app" to the name of the Appname folder, and it magically becomes a useable application.

#Some notes

You'll need Perl to run this, OSX comes with a pre installed version (5.8.6) in /usr/bin/perl, but like a lot of people, I've installed a newer version (5.10) into /usr/local/bin/perl. The shebangs on the perl files point to the newer install. If you want, just change them to point to the default installation.

Also, getYaml.pl depends on the YAML::Tiny package. You can install it via cpan, just run:

sudo perl -eshell -MCPAN

and then:

install YAML::Tiny

and "quit".


If you have any comments or problems, please contact me via the Sourceforge site http://makebundle.sourceforge.net

Iain Barnett

[1] http://wiki.wxwidgets.org/WxMac_Issues#My_app_can.27t_be_brought_to_the_front.2
Source: README, updated 2009-10-29