##// END OF EJS Templates
contrib: add a hint if the Windows dependency MSI is already installed...
contrib: add a hint if the Windows dependency MSI is already installed In the past, I've gotten confused when the script failed on seemingly random python installs (and thus the py3.8 install was commented out from the last time this happened to me, which has been reverted here). This particular error code means the package was already installed. For python, it means the major and minor version are the same, but the micro version may differ. In practice, ignoring the python installation failure will cause the pip installation that happens next to fail, because python.exe for that version is somewhere else on the system. This could probably be fixed by running py.exe with the major and minor version, but that is skipped during the install for some reason. I didn't feel like over complicating this though, and at least there's a better hint when the problem occurs. Differential Revision: https://phab.mercurial-scm.org/D12560
Matt Harbison -
r49955:246ee748 default
Show More
Name Size Modified Last Commit Author
/ contrib / packaging / inno
mercurial.iss Loading ...
modpath.iss Loading ...
readme.rst Loading ...

Requirements

Building the Inno installer requires a Windows machine.

The following system dependencies must be installed:

  • Inno Setup (http://jrsoftware.org/isdl.php) version 5.4 or newer. Be sure to install the optional Inno Setup Preprocessor feature, which is required.
  • Python 3.6+ (to run the packaging.py script)

Building

The packaging.py script automates the process of producing an Inno installer. It manages fetching and configuring non-system dependencies (such as gettext, and various Python packages). It can be run from a basic cmd.exe Window (i.e. activating the MSBuildTools environment is not required).

From the prompt, change to the Mercurial source directory. e.g. cd c:\src\hg.

Next, invoke packaging.py to produce an Inno installer.:

$ py -3 contrib\packaging\packaging.py \
    inno --pyoxidizer-target x86_64-pc-windows-msvc

If everything runs as intended, dependencies will be fetched and configured into the build sub-directory, Mercurial will be built, and an installer placed in the dist sub-directory. The final line of output should print the name of the generated installer.

Additional options may be configured. Run packaging.py inno --help to see a list of program flags.

MinGW

It is theoretically possible to generate an installer that uses MinGW. This isn't well tested and packaging.py and may properly support it. See old versions of this file in version control for potentially useful hints as to how to achieve this.