Search code examples
htmlmozillaxulrunnergeckogeckofx

Building a leaner XulRunner for HTML/JavaScript usage?


Is there a way to make a leaner HTML/Javascript -oriented build/package of the Mozilla XulRunner components, excluding some of the heavier XUL-platform features?

Background:

We are building a cross-platform application with a HTML/JavaScript GUI. The host app is running on .NET/Mono, and the GUI is rendered using Mozilla XulRunner via the GeckoFx wrapper. Everything is working great.

We have one issue: the XulRunner (9.0.x) components weighing at 28MB make the application installer a bit larger than we'd like. The XulRunner does not need to be deployed separately if the user already has Firefox installed, but we would want to reduce the footprint for the users who don't.

We've already excluded all XulRunner executables from the official release build to get the package down to its current size.

It occurs to me that we are only using a small subset of the XulRunner platform. We do not require any of the XUL features, only HTML, JavaScript and CSS. This leads me to think that we might be able to make a custom build which excludes some of the parts we don't need, but I'm not well-versed in the Mozilla build arcana.

Any help would be greatly appreciated!


Solution

  • You will typically use build options like --disable-tests (don't build those test executables) and --enable-optimize/--disable-debug. Also, you should be able to use --disable-xul option. However, you need to be aware that options like --disable-xul create builds that aren't quite as well tested as the official XULRunner. Other options that should be ok in a simple application:

    --disable-jsd           Disable JavaScript debug library
    --disable-plugins       Disable plugins support
    --disable-view-source   Disable view source support
    --disable-accessibility Disable accessibility support
    --disable-printing      Disable printing support
    --disable-crashreporter Disable breakpad crash reporting
    --disable-mathml        Disable MathML support
    --disable-installer     Disable building of installer
    --disable-updater       Disable building of updater
    --disable-activex       Disable building of ActiveX control
    --disable-activex-scripting  Disable building of ActiveX scripting support (win32)
    --disable-feeds         Disable feed handling and processing components
    

    You can find other options by searching for MOZ_ARG_DISABLE_BOOL in configure.in.