This is an archive of the discontinued Mercurial Phabricator instance.

packaging: stage installed files for Inno
ClosedPublic

Authored by indygreg on Oct 23 2019, 9:54 PM.

Details

Summary

Previously, the Inno installer maintained its own mapping of
source files to install location. (We have to maintain a
similar mapping in the WiX installer.)

Managing the explicit file layout for Windows packages is
cumbersome and redundant. Every time you want to change the
layout you need to change N locations. We frequently forget
to do this and we only find out when people install Mercurial
from our packages at release time.

This commit starts the process of consolidating and simplifying
the logic for managing the install layout on Windows.

We introduce a list of install layout rules. These are simply
source filenames (which can contain wildcards) and destination
paths.

The Inno packaging code has been updated to assemble all
files into a staging directory that mirrors the final install
layout. The list of files to add to the installer is derived
by walking this staging directory and dynamically emitting
the proper entries for the Inno Setup script.

I diffed the file layout before and after this commit and
there is no difference.

Another benefit of this change is that it facilitates easier
testing of the Windows install layout. Before, in order to
test the final install layout, you needed to build an installer
and run it. Now, you can stage files into the final layout
and test from there, without running the installer. This
should cut down on overhead when changing Windows code.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Oct 23 2019, 9:54 PM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.