I own a PowerBook G4 running Mac OS X that leads a dual life. Sometimes, it's just plain old OS X, but the rest of the time, it's a KDE desktop running under a fullscreen XFree86 session. I use fink but am thinking of switching to DarwinPorts.
For hacking around, I thought it would be useful to compile SWT/GTK+ against the GTK+ from fink. The port was trivial, and I'm thinking of merging the patch in upstream or getting it into fink/darwinports.
For the lazy, I built a tarball of the .jnilib files for SWT 3.1.
Here are the exact steps I used to compile with fink:
. /sw/bin/init.sh # Initialize fink paths mkdir swtgtk cd swtgtk unzip ../swt-3.1-gtk-linux-x86.zip rm *.so *.so.1 mkdir src cd src unzip ../src.zip patch < ../../swt-darwin.diff make -f make_linux.mak mv *.jnilib .. cd .. |
Now that we have the .jnilib files and the swt.jar file for GTK+, we can run a test app. I wrote a quick little SWT snippet that can help here. Grab it and put it in the directory with swt.jar and the .jnilib files.
javac -classpath swt.jar Test.java java -Djava.library.path=. -classpath swt.jar:. Test |
And here's the result:
Files: