Gibbering Terrors
Every so often, I try to tangle with Mozilla. I mean like writing a
XUL page, building a Firefox extension, or most lately, trying to
write a XULRunner app.
Mozilla is seriously complicated and very difficult to
debug. Thankfully, the documentation is at getting somewhat better. I
thought I'd do my part and record some of what I figured out about
building XULRunner apps.
First of all, if you have a Mac, you're in for a bit of a
surprise. You can't use the standard "xulrunner
someapp/application.ini" or "xulrunner someapp.zip" invocation.
Macs need to have the apps bundled first. Unfortunately, the bundling
process is quite tricky and made even worse by the fact that there
are no error messages when you screw up. The key is to do this
exactly like this (you can get the clock demo here):
$ /Library/Frameworks/XUL.framework/Versions/Current/xulrunner-bin --install-app clock .This will generate a clock.app for you. Why is this tricky? Well, you typically launch a xulrunner app by specifying either a zip file or an application.ini file. Both of these will fail silently with --install-app. You need to specify the folder that contains the application.ini for it to work. I finally figured this out by reading this thread. Also note, XULRunner does not appear to overwrite old apps (again, silently), so make sure and delete before each rebuild. That's all for tonight, more about XUL later.
posted on: 07/31/2006 | path: /tech