makexpi.pl

NAME
makexpi.pl - Generates xpi files from the source tree of a XUL application.

SYNOPSIS
makexpi.pl [-c <config-file>] [-d] [-r <revision>] [-?]


DESCRIPTION
makexpi.pl creates xpi files from the source tree of a XUL application, accoring to the parameters defined in a configuration file. makexpi.pl is wholly self-contained, and does not require a Mozilla source tree.

The configuration file used by makexpi.pl is processed in the same manner as a template file used by the new-from-template.pl script. The following variables are used directly by makexpi.pl.

Variable Name Description
workdir workdir is the directory where makexpi.pl should work from. The target xpi file, and chrome/ and xpi/ subdirectories will be created relative to workdir.
mndir mndir is the directory where makexpi.pl can find the jar.mn file for the application to be processed.
installfile installfile is the template file to be used as the install.js file for the resulting xpi. This file will be processed in the same manner as a template file used by new-from-template.pl. A templatized install.js file that works with applications created by the xul-app.tpl template is available as templates/xpi/install.js, in the XULKit package.
mozcfgdir mozcfgdir is the directory where makexpi.pl can find the make-jars.pl script. The XULKit package contains the make-jars.pl script in the bin/ subdirectory.
xpifile xpifile is the name makexpi.pl should use for the resulting xpi file.

makexpi.pl places the resulting xpi in the working directory specified by the configuration file. An xpi/ subdirectory will be created to hold the contents of the xpi before jarring, and a chrome/ subdirectory will contain the application as processed by the make-jars.pl script. The chrome/ subdirectory can be used in Mozilla's installed-chrome.txt file in order to run the application in ``flat mode''.

For example, appending the following lines to installed-chrome.txt will make the sample application run from the chrome subdirectory of the XULKit package, instead of a jar file.
content,install,url,file:/home/rginda/src/xulkit/sample-app/chrome/sampleapp/content/sampleapp/
skin,install,url,file:/home/rginda/src/xulkit/sample-app/chrome/sampleapp/skin/modern/sampleapp/
locale,install,url,file:/home/rginda/src/xulkit/sample-app/chrome/sampleapp/locale/en-US/sampleapp/
OPTIONS
-c FILE
Specify the configuration file to use.

-d
Don't remake the jar, just package the existing contents of the chrome/ directory as an XPI.

-r REVISION
Specify the value of the ${revision} variable. This will override any value specified in the configuration file, and defaults to ``0.01''. Typically, this number is used in the install.js script, and as part of the xpi filename.

-?
Show usage information and exit.

SEE ALSO
new-from-template.pl

BUGS
There are two known problems on Windows systems...
  1. In makexpi.conf, your workdir should be relative to xulkit/bin, ie. ../sample-app/.
  2. You'll have to hack makexpi.pl to use zip, if you don't have jar installed.


REQUIREMENTS
makexpi.pl requires the make-jars.pl script, provided by the XULKit package, or the mozilla source tree.

EXAMPLES

perl makexpi.pl
Make the xpi described by makexpi.conf in the current directory.

perl makexpi.pl -c ~/xulapps/chatzilla/makexpi.conf -r 0.8.5-pre8
Make the xpi described by ~/xulapps/chatzilla/makexpi.conf. The ${revision} variable will be set to ``0.8.5-pre8''.