view contrib/packaging/wix/readme.rst @ 51402:2e10ddbb9faa

phases: check secret presence the right way during discovery There is an official function for this, lets use it. This will prevent the code to break in the future while we refactor the phase code.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 20 Feb 2024 17:17:54 +0100
parents 90f7d8276e26
children 905bc9d0a149
line wrap: on
line source

WiX Installer
=============

The files in this directory are used to produce an MSI installer using
the WiX Toolset (http://wixtoolset.org/).

The MSI installers require elevated (admin) privileges due to the
installation of MSVC CRT libraries into the Windows system store. See
the Inno Setup installers in the ``inno`` sibling directory for installers
that do not have this requirement.

Requirements
============

Building the WiX installer requires a Windows machine.

The following system dependencies must be installed:

* Python 3.6+ (to run the ``packaging.py`` script)

Building
========

The ``packaging.py`` script automates the process of producing an MSI
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 MSI installer.::

   $ py -3 contrib\packaging\packaging.py \
       wix --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 wix --help``
to see a list of program flags.

Relationship to TortoiseHG
==========================

TortoiseHG uses the WiX files in this directory.

The code for building TortoiseHG installers lives at
https://foss.heptapod.net/mercurial/tortoisehg/thg-winbuild and is maintained by
Steve Borho (steve@borho.org).

When changing behavior of the WiX installer, be sure to notify
the TortoiseHG Project of the changes so they have ample time
provide feedback and react to those changes.