Andrew Jorgensen
It's better than bad, it's good!

XPInstall for Plugins

One of my first assignments on the Moonlight team was to create an installer for Firefox so that users would be able to click on a single link and have the plugin installed and working without having to restart the browser. Thanks to reasonably good documentation on Mozilla's site the installer is done.

XPInstall actually provides you with two ways of installing add-ons (extensions, plugins, themes, etc.). The newer method uses an Install Manifest to describe the add-on. The older method uses an install script. We'd love to use the newer method but unfortunately it requires that the user restart the browser.

At first I got a lot of reports that, even using the older install method, people had to restart their browsers to get the plugin working, or at least open about:plugins. Turns out there's a JavaScript method, refreshPlugins, to reload the plugins, and optionally to reload open pages (to load the content the plugin is supposed to handle).

The current status is that the installer works well for both the Silverlight 1.0 and 1.1 profiles (without and with a CLR). Another cool thing to mention is that the current 64-bit 1.1 installer is under 7MB (compressed) without any real work on optimizing for size.