@@ -62,10 +62,14 @@ the initial download size by separating them into their own MSIs.
6262Building the Installer
6363======================
6464
65+ Before building the installer, download extra build dependencies using
66+ Tools\msi\get_externals.bat. (Note that this is in addition to the
67+ similarly named file in PCBuild.)
68+
6569For testing, the installer should be built with the Tools/msi/build.bat
6670script:
6771
68- build.bat [-x86] [-x64] [--doc]
72+ build.bat [-x86] [-x64] [--doc] [--test-marker] [--pack]
6973
7074This script will build the required configurations of Python and
7175generate an installer layout in PCBuild/(win32|amd64)/en-us.
@@ -80,8 +84,13 @@ available, it will simply be excluded from the installer. Ensure
8084also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC on
8185your PATH or in externals/.
8286
83- If WiX is not found on your system, it will be automatically downloaded
84- and extracted to the externals/ directory.
87+ Specify --test-marker to build an installer that works side-by-side with
88+ an official Python release. All registry keys and install locations will
89+ include an extra marker to avoid overwriting files. This marker is
90+ currently an 'x' prefix, but may change at any time.
91+
92+ Specify --pack to build an installer that does not require all MSIs to
93+ be available alongside. This takes longer, but is easier to share.
8594
8695
8796For an official release, the installer should be built with the
@@ -175,6 +184,38 @@ The following properties may be passed when building these projects.
175184 When true, rebuilds all of the MSIs making up the layout. Defaults to
176185 true.
177186
187+ Uploading the Installer
188+ =======================
189+
190+ For official releases, the uploadrelease.bat script should be used.
191+
192+ You will require PuTTY so that plink.exe and pscp.exe can be used, and your
193+ SSH key can be activated in pageant.exe. PuTTY should be either on your path
194+ or in %ProgramFiles(x86)%\PuTTY.
195+
196+ To include signatures for each uploaded file, you will need gpg2.exe on your
197+ path or have run get_externals.bat. You may also need to "gpg2.exe --import"
198+ your key before running the upload script.
199+
200+ uploadrelease.bat --host <host> --user <username> [--dry-run] [--no-gpg]
201+
202+ The host is the URL to the server. This can be provided by the Release
203+ Manager. You should be able to SSH to this address.
204+
205+ The username is your own username, which you have permission to SSH into
206+ the server containing downloads.
207+
208+ Use --dry-run to display the generated upload commands without executing
209+ them. Signatures for each file will be generated but not uploaded unless
210+ --no-gpg is also passed.
211+
212+ Use --no-gpg to suppress signature generation and upload.
213+
214+ The default target directory (which appears in uploadrelease.proj) is
215+ correct for official Python releases, but may be overridden with
216+ --target <path> for other purposes. This path should generally not include
217+ any version specifier, as that will be added automatically.
218+
178219Modifying the Installer
179220=======================
180221
@@ -298,9 +339,9 @@ based on whether the install is for all users of the machine or just for
298339the user performing the installation.
299340
300341The default installation location when installing for all users is
301- "%ProgramFiles%\Python 3.X " for the 64-bit interpreter and
302- "%ProgramFiles(x86)%\Python 3.X " for the 32-bit interpreter. (Note that
303- the latter path is equivalent to "%ProgramFiles%\Python 3.X " when
342+ "%ProgramFiles%\Python3X " for the 64-bit interpreter and
343+ "%ProgramFiles(x86)%\Python3X-32 " for the 32-bit interpreter. (Note that
344+ the latter path is equivalent to "%ProgramFiles%\Python3X-32 " when
304345running a 32-bit version of Windows.) This location requires
305346administrative privileges to install or later modify the installation.
306347
@@ -311,6 +352,8 @@ interpreter. Only the current user can access this location. This
311352provides a suitable level of protection against malicious modification
312353of Python's files.
313354
355+ (Default installation locations are set in Tools\msi\bundle\bundle.wxs.)
356+
314357Within this install directory is the following approximate layout:
315358
316359.\python[w].exe The core executable files
@@ -487,6 +530,6 @@ Removing Python will clean up all the files and registry keys that were
487530created by the installer, as well as __pycache__ folders that are
488531explicitly handled by the installer. Python packages installed later
489532using a tool like pip will not be removed. Some components may be
490- installed by other installers (such as the MSVCRT) and these will not be
491- removed if another product has a dependency on them.
533+ installed by other installers and these will not be removed if another
534+ product has a dependency on them.
492535
0 commit comments