September 6, 2005

Flat chrome in a jarred world (or vice versa)

XULRunner is a bit intolerant in its chrome.manifest files when it comes to jarred chrome versus flat chrome. For example, I filed bug 295023 because I typically build with flat chrome, and the sample app insisted that its chrome was jarred.

There's actually a simple, undocumented way to avoid this problem. You force the build process to use a particular chrome format just for your XUL application. If you want to force jarred chrome, add this line to your Makefile.in file, after the autoconf.mk line:

MOZ_CHROME_FILE_FORMAT = jar

That's it. The build process will take that, and override the user's default setting. Alternatively, if you insist on flat chrome:

MOZ_CHROME_FILE_FORMAT = flat

XULRunner apps should use one of these settings for any Makefile.in tied to their chrome.manifest. Of course, it's not a nice thing to do in a traditional SeaMonkey application, where jar.mn rules. In this case, you're forcing your choice format on the developer building. If you can use jar.mn instead of chrome.manifest, please do.

Posted by WeirdAl at September 6, 2005 9:28 PM