annotate contrib/packaging/wix/readme.rst @ 47512:769037a279ec

dirstate-entry: add a `state` property (and use it) This replace the [0] access. Ultimately is we should probably get ride of this in its current form. However this is a good transitional solution to move away for tuple indexing for now. Differential Revision: https://phab.mercurial-scm.org/D10954
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 04 Jul 2021 03:29:20 +0200
parents e933e66153f3
children b44678aeb460
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
15 Building the WiX installers requires a Windows machine. The following
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
16 dependencies must be installed:
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
17
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
18 * Python 2.7 (download from https://www.python.org/downloads/)
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
19 * Microsoft Visual C++ Compiler for Python 2.7
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
20 (https://www.microsoft.com/en-us/download/details.aspx?id=44266)
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
21 * Python 3.5+ (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
22
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
23 Building
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
24 ========
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
25
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
26 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
27 installer. It manages fetching and configuring non-system dependencies
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
28 (such as py2exe, gettext, and various Python packages).
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 The script requires an activated ``Visual C++ 2008`` command prompt.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
31 A shortcut to such a prompt was installed with ``Microsoft Visual
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
32 C++ Compiler for Python 2.7``. From your Start Menu, look for
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
33 ``Microsoft Visual C++ Compiler Package for Python 2.7`` then
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
34 launch either ``Visual C++ 2008 32-bit Command Prompt`` or
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
35 ``Visual C++ 2008 64-bit Command Prompt``.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
36
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
37 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
38 ``cd c:\src\hg``.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
39
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
40 Next, invoke ``packaging.py`` to produce an MSI installer. You will need
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
41 to supply the path to the Python interpreter to use.::
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
42
46450
e933e66153f3 packaging: replace a documentation reference to `python3` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 43513
diff changeset
43 $ py -3 contrib\packaging\packaging.py \
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
44 wix --python c:\python27\python.exe
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 .. note::
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
47
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
48 The script validates that the Visual C++ environment is active and
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
49 that the architecture of the specified Python interpreter matches the
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
50 Visual C++ environment. An error is raised otherwise.
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
51
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
52 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
53 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
54 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
55 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
56
43513
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
57 Additional options may be configured. Run ``packaging.py wix --help`` to
081a77df7bc6 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41921
diff changeset
58 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
59
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
60 Relationship to TortoiseHG
10502
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
61 ==========================
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
62
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
63 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
64
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
65 The code for building TortoiseHG installers lives at
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
66 https://bitbucket.org/tortoisehg/thg-winbuild and is maintained by
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
67 Steve Borho (steve@borho.org).
10502
1e022c88a0a5 Add WiX installer scripts to contrib/wix
Steve Borho <steve@borho.org>
parents:
diff changeset
68
41921
4371f543efda wix: functionality to automate building WiX installers
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41920
diff changeset
69 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
70 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
71 provide feedback and react to those changes.