Hello,
I just noticed that Sunrise was not Windows-only anymore, and tried to run it on Mac OS X, since Laurens said it might be possible. Here is the how-to, as I couldn't find one :
What you will need :
- Mac OS X 10.4
-
Java 1.5, which requires Mac OS X 10.4
- The
SWT libraries for Mac OS X. Both the 3.1 Stable and 3.2M2 Development versions work, but with the 3.1 Stable one you will get a ~2000-pixel wide About dialog in Sunrise.
In the sunrise-0.42f folder, remove both .so files then go to the lib subfolder and remove swt.jar. From the files you downloaded from Eclipse.org, take all the .jnilib files as well as swt.jar and copy them to the lib folder in the sunrise-0.42f folder.
Next, open the run.sh script in TextEdit (in Plain Text mode, not Rich Text),
TextWrangler or pico in the Terminal. Change its contents to (one long line) :
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java -XstartOnFirstThread -Xmx128m -classpath "/System/Library/Java:/Users/me/NewSofts/sunrise-0.42f/lib/swt.jar:/Users/me/NewSofts/sunrise-0.42f/sunrise-desktop.jar" -Djava.awt.headless=true -Djava.library.path="/Users/me/NewSofts/sunrise-0.42f/lib" -jar sunrise-desktop.jar
Of course, change /Users/me/NewSofts/sunrise-0.42f to the path to the folder containing Sunrise.
After that open Terminal and
cd to the sunrise-0.42f folder, then type
chmod +x run.sh.
To launch Sunrise, type
./run.sh.
Notes :
- Use File -> Exit to quit Sunrise, as Command-Q or SWT -> Quit SWT will freeze Sunrise. Even then, Sunrise might not always completely quit and you will have to Force Quit it (control-click on its icon in the Dock and choose Force Quit)
- Some PNG and GIF images will not be converted. This seems to be because of the option
-Djava.awt.headless=true, as Sunrise throws a
java.awt.HeadlessException: null error for each image not converted, but without this option Sunrise will freeze if you try to convert anything, because of a bug that affects Java applications using SWT and AWT on Mac OS X.
I have tried packaging this in a .app application bundle but due to Sunrise using SWT, it is quite complicated (for an example that works, you can have a look at
Azureus's application bundle). I've read that Eclipse has an application bundle exporter, but I wasn't going to download and install Eclipse just for that. Using Jar Builder which is included in the Apple developer tools, the applications crashes on launch with a
java.lang.NullPointerException.
Hope this was useful/interesting to someone.