contrib/packaging/inno/readme.rst
author Matt Harbison <matt_harbison@yahoo.com>
Mon, 30 Sep 2024 23:50:40 -0400
changeset 51935 77e2994bd617
parent 51836 905bc9d0a149
permissions -rw-r--r--
mdiff: convert a few block definitions from lists to tuples These were flagged by adding type hints. Some places were using a tuple of 4 ints to define a block, and others were using a list of 4. A tuple is better for typing, because we can define the length and the type of each entry. One of the places had to redefine the tuple, since writing to a tuple at an index isn't supported. This change spills out into the tests, and archeology says it was added to the repo in this state. There was no reason given for the divergence, and I suspect it wasn't intentional. It looks like `splitblock()` is completely unused in the codebase.

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.8+ (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.