Creating a Mac bundle that uses Java 7

I'd like to share some experiences on creating a Mac bundle for Java 7. I'd also like to thank the Forge team for pushing through with the upgrade to Java 7, it was a lot easier to do the same for Magarena after seeing what Forge has done.
I've tried Oracle's appbundler as well but ran into problems, I didn't manage to debug it as I don't have access to a Mac. After more research I came across http://mjhutchinson.com/journal/2010/01 ... or_gtk_app. The idea of using shell script (instead of using a Mac binary like what the bundlers do) appeals to me.
I've modified the launcher script from the site for Magarena 1.42, see https://code.google.com/p/magarena/sour ... auncher.sh and changed the Info.plist file to refer to MagarenaLauncher.sh as the CFBundleExecutable property.
Finally the app bundle is a zip of a directory with a special structure, in Magarena's case it looks like the following
I've tried Oracle's appbundler as well but ran into problems, I didn't manage to debug it as I don't have access to a Mac. After more research I came across http://mjhutchinson.com/journal/2010/01 ... or_gtk_app. The idea of using shell script (instead of using a Mac binary like what the bundlers do) appeals to me.
I've modified the launcher script from the site for Magarena 1.42, see https://code.google.com/p/magarena/sour ... auncher.sh and changed the Info.plist file to refer to MagarenaLauncher.sh as the CFBundleExecutable property.
Finally the app bundle is a zip of a directory with a special structure, in Magarena's case it looks like the following
- Code: Select all
Magarena-<version>.app
- Contents
- Info.plist
- PkgInfo
- MacOS
- MagarenaLauncher.sh
- Java
- <contents of the Win/Linux release zip>