contrib/packaging/wix/readme.rst
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 08 Jun 2023 01:07:00 +0200
branchstable
changeset 50647 7c5edf6fbf01
parent 49173 90f7d8276e26
child 51836 905bc9d0a149
permissions -rw-r--r--
tests: check `pulled-delta-reuse-policy=forced` without general delta If general delta is not available, the amount of delta we can reuse at all will be more limited. We check that application still work and does not corrupt the repository.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     1
WiX Installer
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     2
=============
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     3
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     4
The files in this directory are used to produce an MSI installer using
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     5
the WiX Toolset (http://wixtoolset.org/).
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     6
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     7
The MSI installers require elevated (admin) privileges due to the
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     8
installation of MSVC CRT libraries into the Windows system store. See
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
     9
the Inno Setup installers in the ``inno`` sibling directory for installers
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    10
that do not have this requirement.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    11
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    12
Requirements
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    13
============
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    14
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    15
Building the WiX installer requires a Windows machine.
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    16
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    17
The following system dependencies must be installed:
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    18
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    19
* Python 3.6+ (to run the ``packaging.py`` script)
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    20
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    21
Building
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    22
========
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    23
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
    24
The ``packaging.py`` script automates the process of producing an MSI
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    25
installer. It manages fetching and configuring non-system dependencies
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    26
(such as gettext, and various Python packages).  It can be run from a
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    27
basic cmd.exe Window (i.e. activating the MSBuildTools environment is
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    28
not required).
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    29
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    30
From the prompt, change to the Mercurial source directory. e.g.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    31
``cd c:\src\hg``.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    32
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    33
Next, invoke ``packaging.py`` to produce an MSI installer.::
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    34
46450
e933e66153f3 packaging: replace a documentation reference to `python3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 43513
diff changeset
    35
   $ py -3 contrib\packaging\packaging.py \
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    36
       wix --pyoxidizer-target x86_64-pc-windows-msvc
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    37
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    38
If everything runs as intended, dependencies will be fetched and
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    39
configured into the ``build`` sub-directory, Mercurial will be built,
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    40
and an installer placed in the ``dist`` sub-directory. The final line
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    41
of output should print the name of the generated installer.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    42
49080
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    43
Additional options may be configured. Run ``packaging.py wix --help``
b44678aeb460 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com>
parents: 46450
diff changeset
    44
to see a list of program flags.
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    45
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    46
Relationship to TortoiseHG
10502
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
    47
==========================
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
    48
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    49
TortoiseHG uses the WiX files in this directory.
10502
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
    50
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    51
The code for building TortoiseHG installers lives at
49173
90f7d8276e26 contrib: migrate off of a couple of bitbucket URLs
Matt Harbison <matt_harbison@yahoo.com>
parents: 49080
diff changeset
    52
https://foss.heptapod.net/mercurial/tortoisehg/thg-winbuild and is maintained by
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    53
Steve Borho (steve@borho.org).
10502
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
    54
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    55
When changing behavior of the WiX installer, be sure to notify
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    56
the TortoiseHG Project of the changes so they have ample time
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
    57
provide feedback and react to those changes.