Unix stub installer

Where does the unix stub installer code reside?

The unix stub installer project resides at: <http://lxr.mozilla.org/seamonkey/sou...ard/unix/src2/>

How do we get setup to debug the unix stub installer?

  1. Build the unix installer (debug or non-debug target) by typing "make" in the src2 directory
  2. Grab a nightly build, say from <http://ftp.mozilla.org/pub/mozilla/n...staller.tar.gz>
  3. Gunzip and untar the build to some temporary location like /tmp.
  4. Copy the installer.ini and config.ini files over into the src2 directory.
  5. If you don't want the installer to download then grab a nightly "full" installer, say from <ftp://ftp.mozilla.org/pub/mozilla/ni...gnu-sea.tar.gz>. Then untar and gunzip this to /tmp. Copy the xpi directory into the src2 directory you are debugging from.
  6. Run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate flags.
  7. If you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt.

How we get setup to debug the XPInstall engine from the unix stub installer?

  1. Build your entire mozilla tree (which should build the installer in the src2 directory as well).
  2. Go to mozilla/xpinstall/packager/unix.
  3. On the shell prompt type "perl deliver.pl".
  4. Now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/installer/raw.
  5. Debug using "gdb mozilla-installer-bin" and set a breakpoint at XPI_Init().
  6. You can step into the XPInstall engine through the xpistub once the xpistub dll is loaded.

How do I add an installer package to the unix installer?

Adding a package involves a few steps:

  1. Add a section named for your <component> to the packages-unix manifest that describes which files from dist belong to which module. For example, see the xpcom section that lists all the shared libraries as seen in dist. These are eventually zipped with the directory structure preserved. Read the top of the packages-unix file for it's simple syntax and semantics.
  2. Add an <component>.jst install script template file (the jst extension stands for javascript template indicating this is a template for the final install.js for the <component>.xpi. Checkin the <component>.jst to the: <http://lxr.mozilla.org/seamonkey/sou.../packager/unix> directory. Note that there are two macro strings in the .jsts:
    1. $Version$ which is replaced at packages time with the browser version.
    2. $SpaceRequired$ which is replaced at package time with the amount of space in KB required for the package when it is fully extracted.
  3. Add a [ComponentX] section to the config.ini template file named config.it found at: <http://lxr.mozilla.org/seamonkey/sou...unix/config.it>. Then add the ComponentX into the appropriate Setup Types so the installer module installs it when users select the Setup Types you choose it to be in.
  4. Finally add a call to generate the xpi at package time by adding a MakeXpiFile("<component>"); call at: <http://lxr.mozilla.org/seamonkey/sou.../makeall.pl#75>
  5. You can test it by changing your current working directory to mozilla/xpinstall/packager/unix and running "perl deliver.pl" on the shell prompt. The resulting stub and full installers will be delivered to "mozilla/installer/{stub,sea}".

Original Document Information