Windows stub installer

Where does the Windows stub installer code reside?

The windows stub installer project resides at: <>

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

  1. Build your entire mozilla tree, which should build the stub installer in the setup directory as well. (If you need to rebuild stub installer, got to /mozilla/xpinstall/wizard/windows/setup and type "nmake /f")
  2. Go to mozilla/xpinstall/wizard/windows/builder
  3. On the shell prompt type "perl".
  4. Now you will find an installer *and* the xpcom.xpi and other debug xpis delivered to mozilla/dist/WIN32_D.OBJ/install.
  5. Run the stub installer setup.exe from the install directory.
  6. If you need to use VC++ to debug the installer:
    1. Under Project | Settings | Debug
      1. Set "Executable for Debug Session" to be the path to mozilla/dist/WIN32_D.OBJ/install/setup.exe
      2. Set "Working Directory" to be the path to mozilla/dist/WIND32_D.OBJ/install
    2. Press F10 to step into the code

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

This section needs to be added

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

Adding a package involves a few steps:

  1. Add a section named for your <component> to the packages-win 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-win 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: <> directory. Note that there are several macro strings--a macro name wrapped in dollar ($) signs--which may be used in the .jsts, including:
    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. Other macro strings listed in can be found by searching for "Version", which is one of the macro strings, until you find the line
$line =~ s/\$Version\$/$inVersion/i;
Other macro strings are grouped in this section. As with "Version", the macro name will be the first string in the substitution statement on each line.
  1. Add a [Component <component>]</component> section to the config.ini template file named found at: <>. Then add the Component <component> into the appropriate Setup Types so the installer module installs it when users select the Setup Types you choose it to be in.
  2. Finally add <component> to the component list array @gComponentList at: <>
  3. You can test it by changing your current working directory to mozilla/xpinstall/wizard/windows/builder and running "perl" on the shell prompt. The resulting stub installer and packages will be delivered to "mozilla/dist/WIN32OBJ_D/installer". Run setup.exe there to launch the stub installer.

Original Document Information