Bug 1461364 - Update installer build documentation to cover recent changes. r?agashlin draft
authorMatt Howell <mhowell@mozilla.com>
Tue, 15 May 2018 08:47:18 -0700
changeset 795327 e5b1aeb7339327587d411d34e31f8faa5e836bf7
parent 795256 cf3ee14023483cbbb57129479537c713e22c1980
push id109934
push usermhowell@mozilla.com
push dateTue, 15 May 2018 15:47:56 +0000
reviewersagashlin
bugs1461364
milestone62.0a1
Bug 1461364 - Update installer build documentation to cover recent changes. r?agashlin MozReview-Commit-ID: HnTDPxSEVtO
browser/installer/windows/docs/InstallerBuild.rst
--- a/browser/installer/windows/docs/InstallerBuild.rst
+++ b/browser/installer/windows/docs/InstallerBuild.rst
@@ -1,16 +1,16 @@
 ===============
 Installer Build
 ===============
 
 How to build the installers
 ---------------------------
 
-The easiest way to build an installer in your local tree is to run ``mach build installer``. The finished installers will be in ``$OBJDIR/dist/install/sea/``. You have to have a build of the application already done before that will work, but `artifact builds <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds>`_ are supported, so that can save you a lot of time if you're only doing installer work.
+The easiest way to build an installer in your local tree is to run ``mach package``. The finished installers will be in ``$OBJDIR/dist/install/sea/``. You have to have a build of the application already done before that will work, but `artifact builds <https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds>`_ are supported, so that can save you a lot of time if you're only doing installer work.
 
 You'll also need to be on a Windows machine; the installer build depends on tools that aren't available for other platforms.
 
 Stub installer
 ~~~~~~~~~~~~~~
 
 The stub installer probably won't be built by default in a local tree; normally unless the build has been set to use one of the official update channels, only the full installer is built. If you need to work on the stub installer, you can override the default and get one built along with the full installer by adding ``export MOZ_STUB_INSTALLER=1`` to your mozconfig.
 
@@ -28,19 +28,19 @@ But sometimes you'll need to test instal
 
 You can build installers (and the entire application) with official branding by adding ``ac_add_options --with-branding=browser/branding/{nightly|aurora|official}`` to your mozconfig (the default branding is ``browser/branding/unofficial``).
 
 Build process
 -------------
 
 Both the full and stub installers are built through a similar process, which is summarized here along with references to the relevant bits of code.
 
-Most of this procedure is done in `makensis.mk <http://searchfox.org/mozilla-central/source/toolkit/mozapps/installer/windows/nsis/makensis.mk>`_.
+Most of this procedure is done in `makensis.mk <http://searchfox.org/mozilla-central/source/toolkit/mozapps/installer/windows/nsis/makensis.mk>`_ and in the `mach repackage <https://searchfox.org/mozilla-central/rev/2b9779c59390ecc47be7a70d99753653d8eb5afc/python/mozbuild/mozbuild/mach_commands.py#2166>`_ command.
 
-0. The application has to be in a packaged state, so the equivalent of ``mach package`` is run.
+0. A prerequisite is for the application to be in a packaged state, so ``mach package`` first creates a release-style package and puts it in ``$OBJDIR/dist/firefox``.
 1. All required files are copied into the instgen directory. This includes .nsi and .nsh script files, plugin DLL files, image and icon files, and the 7-zip SFX module and its configuration files.
 2. The NSIS scripts are compiled, resulting in setup.exe and setup-stub.exe (if building the stub is enabled).
 3. The 7-zip SFX module is run through UPX.
 4. The application files and the full installer setup.exe are compressed together into one 7-zip file.
 5. The stub installer is compressed into its own 7-zip file.
 6. The (UPX-packed) 7-zip SFX module, the correct configuration data, and the 7-zip file containing the application files and setup.exe are concatenated together. This results in the final full installer.
 7. The (still UPX-packed) 7-zip SFX module, the correct configuration data, and the 7-zip file containing the stub installer are concatenated together. This results in the final stub installer.