Monday, May 12, 2008

GtkMozEmbed challenge

One of the biggest things missing from Ports' GNOME is GtkMozEmbed, nowadays often provided by XULRunner. This would allow adding, updating, or new features for the following packages, among others:
Devhelp
Epiphany
Galeon
Kazehakase
Liferea
MonoDevelop
Yelp
Mozilla::DOM
Gtk2::MozEmbed
pygtkmozembed
ruby-gtkmozembed
Besides being extremely large (34MB source), Mozilla has always abused Cygwin as a build platform for MinGW/MSVC. I really don't like it when people do that. Cygwin is a fairly capable platform of its own accord, not just a means to an unrelated end, and treating it otherwise is not just insulting to those of us who use and develop it, but confuses new users to no end. (Which is why I'd be glad to see the end of -mno-cygwin as well.)

But since GNOME starting using GtkMozEmbed a few years ago, I've taken a few attempts at removing all the anti-Cygwin hacks, all ending without a successful build. A recent (partially successful) experiment with Netscape plugins in Konqueror inspired me to try again. Thanks to Gentoo's ebuild, I managed to get a successful build, but it just crashes (although sometimes a window appears for a split second). My gut feeling is that it's a problem in the XPCOM initialization, but at this point it's way beyond me.

So here's the challenge for anyone who chooses to accept it: get XULRunner to run. To get you started, here's my cygport and patch. You'll need GTK+ and the GNOME libs from Ports (with their -devel packages) as prerequisites. The build can be tested with the included TestGtkEmbed.exe, or build and install both Mozilla::DOM and Gtk2::MozEmbed and try the examples. (The latter require a recent patch to cygport.)

If you do succeed, please drop a note to the mailing list with your modified cygport and patch.

No comments: