XPI infrastructure
XPI infrastructure ensures quick and easy porting of extensions for Mozilla-based applications. XPI or XPInstall is a package project, developed at mozilla.org. Project page, Wikipedia article.
It currently supports only the newer extensions and apps (Gecko 1.8+). XPI usage is not limited to browser extensions. It's a versatile format which can be used for any tasks, like packaging. Many apps from mozilla.org are available as xpi packages. At some point in time XPI infrastructure can be extended to actually support (a part of) XPInstall spec. For now it just considers any xpi package to be a simple zip archive.
To experience all the benefits of the infrastructure, support must be introduced into both extension ports (miniports) and application ports (apps):
- Miniports should be developed using xpi macro package (Makefile.xpi)
- Apps should exec the following actions, both when installed from ports and as packages:
- on install: cp -R %%LOCALBASE%%/lib/xpi/symlinks/%%APP_NAME%%/ %D/lib/%%APP_NAME%%/extensions/
- on deinstall: find %D/lib/%%APP_NAME%%/extensions/ -depth 1 -type l -delete
Makefile.xpi
Implementation is located at ports/www/xpi-adblock/Makefile.xpi