python-3.6.zip added from Github

README.cosmo contains the necessary links.
This commit is contained in:
ahgamut 2021-08-08 09:38:33 +05:30 committed by Justine Tunney
parent 75fc601ff5
commit 0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions

543
third_party/python/Tools/msi/README.txt vendored Normal file
View file

@ -0,0 +1,543 @@
Quick Build Info
================
For testing, the installer should be built with the Tools/msi/build.bat
script:
build.bat [-x86] [-x64] [--doc]
For an official release, the installer should be built with the
Tools/msi/buildrelease.bat script and environment variables:
set PYTHON=<path to Python 2.7 or 3.4>
set SPHINXBUILD=<path to sphinx-build.exe>
set PATH=<path to Mercurial (hg.exe)>;
<path to HTML Help Compiler (hhc.exe)>;%PATH%
buildrelease.bat [-x86] [-x64] [-D] [-B]
[-o <output directory>] [-c <certificate name>]
See the Building the Installer section for more information.
Overview
========
Python is distributed on Windows as an installer that will configure the
user's system. This allows users to have a functioning copy of Python
without having to build it themselves.
The main tasks of the installer are:
* copy required files into the expected layout
* configure system settings so the installation can be located by
other programs
* add entry points for modifying, repairing and uninstalling Python
* make it easy to launch Python, its documentation, and IDLE
Each of these is discussed in a later section of this document.
Structure of the Installer
==========================
The installer is structured as a 'layout', which consists of a number of
CAB and MSI files and a single EXE.
The EXE is the main entry point into the installer. It contains the UI
and command-line logic, as well as the ability to locate and optionally
download other parts of the layout.
Each MSI contains the logic required to install a component or feature
of Python. These MSIs should not be launched directly by users. MSIs can
be embedded into the EXE or automatically downloaded as needed.
Each CAB contains the files making up a Python installation. CABs are
embedded into their associated MSI and are never seen by users.
MSIs are only required when the related feature or component is being
installed. When components are not selected for installation, the
associated MSI is not downloaded. This allows the installer to offer
options to install debugging symbols and binaries without increasing
the initial download size by separating them into their own MSIs.
Building the Installer
======================
Before building the installer, download extra build dependencies using
Tools\msi\get_externals.bat. (Note that this is in addition to the
similarly named file in PCBuild.)
One of the dependencies used in builds is WiX, a toolset that lets developers
create installers for Windows Installer, the Windows installation engine. WiX
has a dependency on the Microsoft .NET Framework Version 3.5 (which may not be
configured on recent versions of Windows, such as Windows 10). If you are
building on a recent Windows version, use the Control Panel (Programs | Programs
and Features | Turn Windows Features on or off) and ensure that the entry
".NET Framework 3.5 (includes .NET 2.0 and 3.0)" is enabled.
For testing, the installer should be built with the Tools/msi/build.bat
script:
build.bat [-x86] [-x64] [--doc] [--test-marker] [--pack]
This script will build the required configurations of Python and
generate an installer layout in PCBuild/(win32|amd64)/en-us.
Specify -x86 and/or -x64 to build for each platform. If neither is
specified, both platforms will be built. Currently, both the debug and
release versions of Python are required for the installer.
Specify --doc to build the documentation (.chm) file. If the file is not
available, it will simply be excluded from the installer. Ensure
%PYTHON% and %SPHINXBUILD% are set when passing this option. You may
also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC on
your PATH or in externals/.
Specify --test-marker to build an installer that works side-by-side with
an official Python release. All registry keys and install locations will
include an extra marker to avoid overwriting files. This marker is
currently an 'x' prefix, but may change at any time.
Specify --pack to build an installer that does not require all MSIs to
be available alongside. This takes longer, but is easier to share.
For an official release, the installer should be built with the
Tools/msi/buildrelease.bat script:
set PYTHON=<path to Python 2.7 or 3.4>
set SPHINXBUILD=<path to sphinx-build.exe>
set PATH=<path to Mercurial (hg.exe)>;
<path to HTML Help Compiler (hhc.exe)>;%PATH%
buildrelease.bat [-x86] [-x64] [-D] [-B]
[-o <output directory>] [-c <certificate name>]
Specify -x86 and/or -x64 to build for each platform. If neither is
specified, both platforms will be built. Currently, both the debug and
release versions of Python are required for the installer.
Specify -D to skip rebuilding the documentation. The documentation is
required for a release and the build will fail if it is not available.
Specify -B to skip rebuilding Python. This is useful to only rebuild the
installer layout after a previous call to buildrelease.bat.
Specify -o to set an output directory. The installer layouts will be
copied to platform-specific subdirectories of this path.
Specify -c to choose a code-signing certificate to be used for all the
signable binaries in Python as well as each file making up the
installer. Official releases of Python must be signed.
Ensure %PYTHON% and %SPHINXBUILD% are set when passing this option. You
may also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC
on your PATH or in externals/. You will also need Mercurial (hg.exe) on
your PATH.
If WiX is not found on your system, it will be automatically downloaded
and extracted to the externals/ directory.
To manually build layouts of the installer, build one of the projects in
the bundle folder.
msbuild bundle\snapshot.wixproj
msbuild bundle\releaseweb.wixproj
msbuild bundle\releaselocal.wixproj
msbuild bundle\full.wixproj
snapshot.wixproj produces a test installer versioned based on the date.
releaseweb.wixproj produces a release installer that does not embed any
of the layout.
releaselocal.wixproj produces a release installer that embeds the files
required for a default installation.
full.wixproj produces a test installer that embeds the entire layout.
The following properties may be passed when building these projects.
/p:BuildForRelease=(true|false)
When true, adds extra verification to ensure a complete installer is
produced. For example, binutils is required when building for a release
to generate MinGW-compatible libraries, and the build will be aborted if
this fails. Defaults to false.
/p:ReleaseUri=(any URI)
Used to generate unique IDs for the installers to allow side-by-side
installation. Forks of Python can use the same installer infrastructure
by providing a unique URI for this property. It does not need to be an
active internet address. Defaults to $(ComputerName).
Official releases use http://www.python.org/(architecture name)
/p:DownloadUrlBase=(any URI)
Specifies the base of a URL where missing parts of the installer layout
can be downloaded from. The build version and architecture will be
appended to create the full address. If omitted, missing components will
not be automatically downloaded.
/p:DownloadUrl=(any URI)
Specifies the full URL where missing parts of the installer layout can
be downloaded from. Should normally include '{2}', which will be
substituted for the filename. If omitted, missing components will not be
automatically downloaded. If specified, this value overrides
DownloadUrlBase.
/p:SigningCertificate=(certificate name)
Specifies the certificate to sign the installer layout with. If omitted,
the layout will not be signed.
/p:RebuildAll=(true|false)
When true, rebuilds all of the MSIs making up the layout. Defaults to
true.
Uploading the Installer
=======================
For official releases, the uploadrelease.bat script should be used.
You will require PuTTY so that plink.exe and pscp.exe can be used, and your
SSH key can be activated in pageant.exe. PuTTY should be either on your path
or in %ProgramFiles(x86)%\PuTTY.
To include signatures for each uploaded file, you will need gpg2.exe on your
path or have run get_externals.bat. You may also need to "gpg2.exe --import"
your key before running the upload script.
uploadrelease.bat --host <host> --user <username> [--dry-run] [--no-gpg]
The host is the URL to the server. This can be provided by the Release
Manager. You should be able to SSH to this address.
The username is your own username, which you have permission to SSH into
the server containing downloads.
Use --dry-run to display the generated upload commands without executing
them. Signatures for each file will be generated but not uploaded unless
--no-gpg is also passed.
Use --no-gpg to suppress signature generation and upload.
The default target directory (which appears in uploadrelease.proj) is
correct for official Python releases, but may be overridden with
--target <path> for other purposes. This path should generally not include
any version specifier, as that will be added automatically.
Modifying the Installer
=======================
The code for the installer is divided into three main groups: packages,
the bundle and the bootstrap application.
Packages
--------
Packages appear as subdirectories of Tools/msi (other than the bundle/
directory). The project file is a .wixproj and the build output is a
single MSI. Packages are built with the WiX Toolset. Some project files
share source files and use preprocessor directives to enable particular
features. These are typically used to keep the sources close when the
files are related, but produce multiple independent packages.
A package is the smallest element that may be independently installed or
uninstalled (as used in this installer). For example, the test suite has
its own package, as users can choose to add or remove it after the
initial installation.
All the files installed by a single package should be related, though
some packages may not install any files. For example, the pip package
executes the ensurepip package, but does not add or remove any of its
own files. (It is represented as a package because of its
installed/uninstalled nature, as opposed to the "precompile standard
library" option, for example.) Dependencies between packages are handled
by the bundle, but packages should detect when dependencies are missing
and raise an error.
Packages that include a lot of files may use an InstallFiles element in
the .wixproj file to generate sources. See lib/lib.wixproj for an
example, and msi.targets and csv_to_wxs.py for the implementation. This
element is also responsible for generating the code for cleaning up and
removing __pycache__ folders in any directory containing .py files.
All packages are built with the Tools/msi/common.wxs file, and so any
directory or property in this file may be referenced. Of particular
interest:
REGISTRYKEY (property)
The registry key for the current installation.
InstallDirectory (directory)
The root install directory for the current installation. Subdirectories
are also specified in this file (DLLs, Lib, etc.)
MenuDir (directory)
The Start Menu folder for the current installation.
UpgradeTable (property)
Every package should reference this property to include upgrade
information.
OptionalFeature (Component)
Packages that may be enabled or disabled should reference this component
and have an OPTIONAL_FEATURES entry in the bootstrap application to
properly handle Modify and Upgrade.
The .wxl_template file is specially handled by the build system for this
project to perform {{substitutions}} as defined in msi.targets. They
should be included in projects as <WxlTemplate> items, where .wxl files
are normally included as <EmbeddedResource> items.
Bundle
------
The bundle is compiled to the main EXE entry point that for most users
will represent the Python installer. It is built from Tools/msi/bundle
with packages references in Tools/msi/bundle/packagegroups.
Build logic for the bundle is in bundle.targets, but should be invoked
through one of the .wixproj files as described in Building the
Installer.
The UI is separated between Default.thm (UI layout), Default.wxl
(strings), bundle.wxs (properties) and the bootstrap application.
Bundle.wxs also contains the chain, which is the list of packages to
install and the order they should be installed in. These refer to named
package groups in bundle/packagegroups.
Each package group specifies one or more packages to install. Most
packages require two separate entries to support both per-user and
all-users installations. Because these reuse the same package, it does
not increase the overall size of the package.
Package groups refer to payload groups, which allow better control over
embedding and downloading files than the default settings. Whether files
are embedded and where they are downloaded from depends on settings
created by the project files.
Package references can include install conditions that determine when to
install the package. When a package is a dependency for others, the
condition should be crafted to ensure it is installed.
MSI packages are installed or uninstalled based on their current state
and the install condition. This makes them most suitable for features
that are clearly present or absent from the user's machine.
EXE packages are executed based on a customisable condition that can be
omitted. This makes them suitable for pre- or post-install tasks that
need to run regardless of whether features have been added or removed.
Bootstrap Application
---------------------
The bootstrap application is a C++ application that controls the UI and
installation. While it does not directly compile into the main EXE of
the installer, it forms the main active component. Most of the
installation functionality is provided by WiX, and so the bootstrap
application is predominantly responsible for the code behind the UI that
is defined in the Default.thm file. The bootstrap application code is in
bundle/bootstrap and is built automatically when building the bundle.
Installation Layout
===================
There are two installation layouts for Python on Windows, with the only
differences being supporting files. A layout is selected implicitly
based on whether the install is for all users of the machine or just for
the user performing the installation.
The default installation location when installing for all users is
"%ProgramFiles%\Python3X" for the 64-bit interpreter and
"%ProgramFiles(x86)%\Python3X-32" for the 32-bit interpreter. (Note that
the latter path is equivalent to "%ProgramFiles%\Python3X-32" when
running a 32-bit version of Windows.) This location requires
administrative privileges to install or later modify the installation.
The default installation location when installing for the current user
is "%LocalAppData%\Programs\Python\Python3X" for the 64-bit interpreter
and "%LocalAppData%\Programs\Python\Python3X-32" for the 32-bit
interpreter. Only the current user can access this location. This
provides a suitable level of protection against malicious modification
of Python's files.
(Default installation locations are set in Tools\msi\bundle\bundle.wxs.)
Within this install directory is the following approximate layout:
.\python[w].exe The core executable files
.\DLLs Stdlib extensions (*.pyd) and dependencies
.\Doc Documentation (*.chm)
.\include Development headers (*.h)
.\Lib Standard library
.\Lib\test Test suite
.\libs Development libraries (*.lib)
.\Scripts Launcher scripts (*.exe, *.py)
.\tcl Tcl dependencies (*.dll, *.tcl and others)
.\Tools Tool scripts (*.py)
When installed for all users, the following files are installed to
either "%SystemRoot%\System32" or "%SystemRoot%\SysWOW64" as
appropriate. For the current user, they are installed in the Python
install directory.
.\python3x.dll The core interpreter
.\python3.dll The stable ABI reference
When installed for all users, the following files are installed to
"%SystemRoot%" (typically "C:\Windows") to ensure they are always
available on PATH. (See Launching Python below.) For the current user,
they are installed in "%LocalAppData%\Programs\Python\PyLauncher".
.\py[w].exe PEP 397 launcher
System Settings
===============
On installation, registry keys are created so that other applications
can locate and identify installations of Python. The locations of these
keys vary based on the install type.
For 64-bit interpreters installed for all users, the root key is:
HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X
For 32-bit interpreters installed for all users on a 64-bit operating
system, the root key is:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\3.X-32
For 32-bit interpreters installed for all users on a 32-bit operating
system, the root key is:
HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X-32
For 64-bit interpreters installed for the current user:
HKEY_CURRENT_USER\Software\Python\PythonCore\3.X
For 32-bit interpreters installed for the current user:
HKEY_CURRENT_USER\Software\Python\PythonCore\3.X-32
When the core Python executables are installed, a key "InstallPath" is
created within the root key with its default value set to the
executable's install directory. A value named "ExecutablePath" is added
with the full path to the main Python interpreter, and a key
"InstallGroup" is created with its default value set to the product
name "Python 3.X".
When the Python standard library is installed, a key "PythonPath" is
created within the root key with its default value set to the full path
to the Lib folder followed by the path to the DLLs folder, separated by
a semicolon.
When the documentation is installed, a key "Help" is created within the
root key, with a subkey "Main Python Documentation" with its default
value set to the full path to the installed CHM file.
The py.exe launcher is installed as part of a regular Python install,
but using a separate mechanism that allows it to more easily span
versions of Python. As a result, it has different root keys for its
registry entries:
When installed for all users on a 64-bit operating system, the
launcher's root key is:
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\Launcher
When installed for all users on a 32-bit operating system, the
launcher's root key is:
HKEY_LOCAL_MACHINE\Software\Python\Launcher
When installed for the current user:
HKEY_CURRENT_USER\Software\Python\Launcher
When the launcher is installed, a key "InstallPath" is created within
its root key with its default value set to the launcher's install
directory. File associations are also created for .py, .pyw, .pyc and
.pyo files.
Launching Python
================
When a feature offering user entry points in the Start Menu is
installed, a folder "Python 3.X" is created. Every shortcut should be
created within this folder, and each shortcut should include the version
and platform to allow users to identify the shortcut in a search results
page.
The core Python executables creates a shortcut "Python 3.X (32-bit)" or
"Python 3.X (64-bit)" depending on the interpreter.
The documentation creates a shortcut "Python 3.X 32-bit Manuals" or
"Python 3.X 64-bit Manuals". The documentation is identical for all
platforms, but the shortcuts need to be separate to avoid uninstallation
conflicts.
Installing IDLE creates a shortcut "IDLE (Python 3.X 32-bit)" or "IDLE
(Python 3.X 64-bit)" depending on the interpreter.
For users who often launch Python from a Command Prompt, an option is
provided to add the directory containing python.exe to the user or
system PATH variable. If the option is selected, the install directory
and the Scripts directory will be added at the start of the system PATH
for an all users install and the user PATH for a per-user install.
When the user only has one version of Python installed, this will behave
as expected. However, because Windows searches the system PATH before
the user PATH, users cannot override a system-wide installation of
Python on their PATH. Further, because the installer can only prepend to
the path, later installations of Python will take precedence over
earlier installations, regardless of interpreter version.
Because it is not possible to automatically create a sensible PATH
configuration, users are recommended to use the py.exe launcher and
manually modify their PATH variable to add Scripts directories in their
preferred order. System-wide installations of Python should consider not
modifying PATH, or using an alternative technology to modify their
users' PATH variables.
The py.exe launcher is recommended because it uses a consistent and
sensible search order for Python installations. User installations are
preferred over system-wide installs, and later versions are preferred
regardless of installation order (with the exception that py.exe
currently prefers 2.x versions over 3.x versions without the -3 command
line argument).
For both 32-bit and 64-bit interpreters, the 32-bit version of the
launcher is installed. This ensures that the search order is always
consistent (as the 64-bit launcher is subtly different from the 32-bit
launcher) and also avoids the need to install it multiple times. Future
versions of Python will upgrade the launcher in-place, using Windows
Installer's upgrade functionality to avoid conflicts with earlier
installed versions.
When installed, file associations are created for .py, .pyc and .pyo
files to launch with py.exe and .pyw files to launch with pyw.exe. This
makes Python files respect shebang lines by default and also avoids
conflicts between multiple Python installations.
Repair, Modify and Uninstall
============================
After installation, Python may be modified, repaired or uninstalled by
running the original EXE again or via the Programs and Features applet
(formerly known as Add or Remove Programs).
Modifications allow features to be added or removed. The install
directory and kind (all users/single user) cannot be modified. Because
Windows Installer caches installation packages, removing features will
not require internet access unless the package cache has been corrupted
or deleted. Adding features that were not previously installed and are
not embedded or otherwise available will require internet access.
Repairing will rerun the installation for all currently installed
features, restoring files and registry keys that have been modified or
removed. This operation generally will not redownload any files unless
the cached packages have been corrupted or deleted.
Removing Python will clean up all the files and registry keys that were
created by the installer, as well as __pycache__ folders that are
explicitly handled by the installer. Python packages installed later
using a tool like pip will not be removed. Some components may be
installed by other installers and these will not be removed if another
product has a dependency on them.

79
third_party/python/Tools/msi/build.bat vendored Normal file
View file

@ -0,0 +1,79 @@
@echo off
setlocal
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set BUILDX86=
set BUILDX64=
set BUILDDOC=
set BUILDTEST=--test-marker
set BUILDPACK=
set REBUILD=
:CheckOpts
if "%~1" EQU "-h" goto Help
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
call "%D%get_externals.bat"
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
if defined BUILDX86 (
call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
if errorlevel 1 goto :eof
)
if defined BUILDDOC (
call "%PCBUILD%..\Doc\make.bat" htmlhelp
if errorlevel 1 goto :eof
)
rem Build the launcher MSI separately
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86
set BUILD_CMD="%D%bundle\snapshot.wixproj"
if defined BUILDTEST (
set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
)
if defined BUILDPACK (
set BUILD_CMD=%BUILD_CMD% /p:Pack=true
)
if defined REBUILD (
set BUILD_CMD=%BUILD_CMD% /t:Rebuild
)
if defined BUILDX86 (
%MSBUILD% %BUILD_CMD%
if errorlevel 1 goto :eof
)
if defined BUILDX64 (
%MSBUILD% /p:Platform=x64 %BUILD_CMD%
if errorlevel 1 goto :eof
)
exit /B 0
:Help
echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
echo.
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo --doc Build CHM documentation
echo --no-test-marker Build without test markers
echo --pack Embed core MSIs into installer
echo -r Rebuild rather than incremental build

View file

@ -0,0 +1,234 @@
@setlocal
@echo off
rem This script is intended for building official releases of Python.
rem To use it to build alternative releases, you should clone this file
rem and modify the following three URIs.
rem These two will ensure that your release can be installed
rem alongside an official Python release, by modifying the GUIDs used
rem for all components.
rem
rem The following substitutions will be applied to the release URI:
rem Variable Description Example
rem {arch} architecture amd64, win32
set RELEASE_URI=http://www.python.org/{arch}
rem This is the URL that will be used to download installation files.
rem The files available from the default URL *will* conflict with your
rem installer. Trust me, you don't want them, even if it seems like a
rem good idea.
rem
rem The following substitutions will be applied to the download URL:
rem Variable Description Example
rem {version} version number 3.5.0
rem {arch} architecture amd64, win32
rem {releasename} release name a1, b2, rc3 (or blank for final)
rem {msi} MSI filename core.msi
set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
if "%Py_OutDir%"=="" set Py_OutDir=%PCBUILD%
set EXTERNALS=%D%..\..\externals\windows-installer\
set BUILDX86=
set BUILDX64=
set TARGET=Rebuild
set TESTTARGETDIR=
set PGO=-m test -q --pgo
set BUILDNUGET=1
set BUILDZIP=1
:CheckOpts
if "%1" EQU "-h" goto Help
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
if "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
if not exist "%GIT%" where git > "%TEMP%\git.loc" 2> nul && set /P GIT= < "%TEMP%\git.loc" & del "%TEMP%\git.loc"
if not exist "%GIT%" echo Cannot find Git on PATH && exit /B 1
call "%D%get_externals.bat"
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
:builddoc
if "%SKIPBUILD%" EQU "1" goto skipdoc
if "%SKIPDOC%" EQU "1" goto skipdoc
call "%D%..\..\doc\make.bat" htmlhelp
if errorlevel 1 goto :eof
:skipdoc
where dlltool /q && goto skipdlltoolsearch
set _DLLTOOL_PATH=
where /R "%EXTERNALS%\" dlltool > "%TEMP%\dlltool.loc" 2> nul && set /P _DLLTOOL_PATH= < "%TEMP%\dlltool.loc" & del "%TEMP%\dlltool.loc"
if not exist "%_DLLTOOL_PATH%" echo Cannot find binutils on PATH or in external && exit /B 1
for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
set _DLLTOOL_PATH=
:skipdlltoolsearch
if defined BUILDX86 (
call :build x86
if errorlevel 1 exit /B
)
if defined BUILDX64 (
call :build x64 "%PGO%"
if errorlevel 1 exit /B
)
if defined TESTTARGETDIR (
call "%D%testrelease.bat" -t "%TESTTARGETDIR%"
)
exit /B 0
:build
@setlocal
@echo off
if "%1" EQU "x86" (
set PGO=
set BUILD=%Py_OutDir%win32\
set BUILD_PLAT=Win32
set OUTDIR_PLAT=win32
set OBJDIR_PLAT=x86
) else (
set BUILD=%Py_OutDir%amd64\
set PGO=%~2
set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64
set OBJDIR_PLAT=x64
)
if exist "%BUILD%en-us" (
echo Deleting %BUILD%en-us
rmdir /q/s "%BUILD%en-us"
if errorlevel 1 exit /B
)
if exist "%D%obj\Debug_%OBJDIR_PLAT%" (
echo Deleting "%D%obj\Debug_%OBJDIR_PLAT%"
rmdir /q/s "%D%obj\Debug_%OBJDIR_PLAT%"
if errorlevel 1 exit /B
)
if exist "%D%obj\Release_%OBJDIR_PLAT%" (
echo Deleting "%D%obj\Release_%OBJDIR_PLAT%"
rmdir /q/s "%D%obj\Release_%OBJDIR_PLAT%"
if errorlevel 1 exit /B
)
if not "%CERTNAME%" EQU "" (
set CERTOPTS="/p:SigningCertificate=%CERTNAME%"
) else (
set CERTOPTS=
)
if not "%PGO%" EQU "" (
set PGOOPTS=--pgo-job "%PGO%"
) else (
set PGOOPTS=
)
if not "%SKIPBUILD%" EQU "1" (
@echo call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS%
@if errorlevel 1 exit /B
@rem build.bat turns echo back on, so we disable it again
@echo off
@echo call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
@call "%PCBUILD%build.bat" -d -e -p %BUILD_PLAT% -t %TARGET%
@if errorlevel 1 exit /B
@rem build.bat turns echo back on, so we disable it again
@echo off
)
if "%OUTDIR_PLAT%" EQU "win32" (
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
if errorlevel 1 exit /B
) else if not exist "%Py_OutDir%win32\en-us\launcher.msi" (
%MSBUILD% "%D%launcher\launcher.wixproj" /p:Platform=x86 %CERTOPTS% /p:ReleaseUri=%RELEASE_URI%
if errorlevel 1 exit /B
)
set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%
%MSBUILD% "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true
if errorlevel 1 exit /B
%MSBUILD% "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
if errorlevel 1 exit /B
if defined BUILDZIP (
%MSBUILD% "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"
if errorlevel 1 exit /B
)
if defined BUILDNUGET (
%MSBUILD% "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
if errorlevel 1 exit /B
)
if not "%OUTDIR%" EQU "" (
mkdir "%OUTDIR%\%OUTDIR_PLAT%"
mkdir "%OUTDIR%\%OUTDIR_PLAT%\binaries"
mkdir "%OUTDIR%\%OUTDIR_PLAT%\symbols"
robocopy "%BUILD%en-us" "%OUTDIR%\%OUTDIR_PLAT%" /XF "*.wixpdb"
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\binaries" *.exe *.dll *.pyd /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\symbols" *.pdb /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
)
exit /B 0
:Help
echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip] [--skip-pgo]
echo [--download DOWNLOAD URL] [--test TARGETDIR]
echo [-h]
echo.
echo --out (-o) Specify an additional output directory for installers
echo -x86 Build x86 installers
echo -x64 Build x64 installers
echo --build (-b) Incrementally build Python rather than rebuilding
echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-doc (-D) Do not build documentation
echo --pgo Specify PGO command for x64 installers
echo --skip-pgo Build x64 installers without using PGO
echo --skip-nuget Do not build Nuget packages
echo --skip-zip Do not build embeddable package
echo --download Specify the full download URL for MSIs
echo --test Specify the test directory to run the installer tests
echo -h Display this help information
echo.
echo If no architecture is specified, all architectures will be built.
echo If --test is not specified, the installer tests are not run.
echo.
echo For the --pgo option, any Python command line can be used, or 'default' to
echo use the default task (-m test --pgo).
echo.
echo The following substitutions will be applied to the download URL:
echo Variable Description Example
echo {version} version number 3.5.0
echo {arch} architecture amd64, win32
echo {releasename} release name a1, b2, rc3 (or blank for final)
echo {msi} MSI filename core.msi

View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
<Window Width="670" Height="412" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Font Id="0" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
<Font Id="1" Height="-26" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
<Font Id="2" Height="-24" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
<Font Id="3" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
<Font Id="4" Height="-14" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
<Font Id="5" Height="-14" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
<Page Name="Help">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Hypertext X="185" Y="50" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Hypertext>
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
</Page>
<Page Name="Install">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
<Button Name="InstallButton" X="185" Y="101" Width="-11" Height="109" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallButton)</Button>
<Button Name="InstallCustomButton" X="185" Y="221" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
<Checkbox Name="InstallLauncherAllUsers" X="185" Y="-37" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortInstallLauncherAllUsersLabel)</Checkbox>
<Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Upgrade">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallUpgradeHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallUpgradeMessage)</Text>
<Button Name="InstallUpgradeButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeButton)</Button>
<Button Name="InstallUpgradeCustomButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeCustomButton)</Button>
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="SimpleInstall">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Button Name="InstallSimpleButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Custom1">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom1Header)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Checkbox Name="Include_doc" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_docLabel)</Checkbox>
<Text X="205" Y="76" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_docHelpLabel)</Text>
<Checkbox Name="Include_pip" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_pipLabel)</Checkbox>
<Text X="205" Y="126" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_pipHelpLabel)</Text>
<Checkbox Name="Include_tcltk" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_tcltkLabel)</Checkbox>
<Text X="205" Y="176" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_tcltkHelpLabel)</Text>
<Checkbox Name="Include_test" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_testLabel)</Checkbox>
<Text X="205" Y="226" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_testHelpLabel)</Text>
<Checkbox Name="Include_launcher" X="185" Y="251" Width="100" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_launcherLabel)</Checkbox>
<Checkbox Name="CustomInstallLauncherAllUsers" X="285" Y="251" Width="-11" Height="24" TabStop="yes" FontId="3">#(loc.InstallLauncherAllUsersLabel)</Checkbox>
<Text Name="Include_launcherHelp" X="205" Y="276" Width="-11" Height="24" TabStop="no" FontId="5"></Text>
<Button Name="Custom1BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
<Button Name="CustomNextButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomNextButton)</Button>
<Button Name="Custom1CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Custom2">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom2Header)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Checkbox Name="InstallAllUsers" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
<Checkbox Name="AssociateFiles" X="185" Y="76" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
<Checkbox Name="Shortcuts" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.ShortcutsLabel)</Checkbox>
<Checkbox Name="PrependPath" X="185" Y="126" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
<Checkbox Name="CompileAll" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
<Checkbox Name="Include_symbols" X="185" Y="176" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
<Checkbox Name="Include_debug" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
<Text X="185" Y="256" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
<Editbox Name="TargetDir" X="185" Y="277" Width="-101" Height="27" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
<Button Name="CustomBrowseButton" X="-11" Y="276" Width="85" Height="27" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
<Text Name="CustomBrowseButtonLabel" X="185" Y="306" Width="-91" Height="35" FontId="5" HideWhenDisabled="yes">#(loc.CustomLocationHelpLabel)</Text>
<Button Name="Custom2BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
<Button Name="CustomInstallButton" X="-101" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
<Button Name="Custom2CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Progress">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Text X="185" Y="111" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="185" Y="146" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Progressbar Name="OverallCalculatedProgressbar" X="185" Y="171" Width="-11" Height="24" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Modify">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Button Name="ModifyButton" X="185" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.ModifyModifyButton)</Button>
<Button Name="RepairButton" X="185" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyRepairButton)</Button>
<Button Name="UninstallButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyUninstallButton)</Button>
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
</Page>
<Page Name="Success">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Hypertext Name="SuccessText" X="205" Y="71" Width="-71" Height="150" FontId="3" DisablePrefix="yes"></Hypertext>
<Button Name="SuccessMaxPathButton" X="185" Y="-70" Width="-11" Height="81" TabStop="yes" FontId="3" HexStyle="0xE" HideWhenDisabled="yes">#(loc.SuccessMaxPathButton)</Button>
<Text Name="SuccessRestartText" X="205" Y="-40" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
<Button Name="SuccessRestartButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
</Page>
<Page Name="Failure">
<Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.FailureHeader)</Text>
<Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
<Hypertext Name="FailureLogFileLink" X="205" Y="71" Width="-11" Height="60" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
<Hypertext Name="FailureMessageText" X="205" Y="151" Width="-11" Height="120" FontId="3" TabStop="yes" HideWhenDisabled="yes"></Hypertext>
<Text Name="FailureRestartText" X="205" Y="-40" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
<Button Name="FailureRestartButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
<Button Name="FailureCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
</Page>
</Theme>

View file

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Caption">[WixBundleName] Setup</String>
<String Id="Title">[WixBundleName]</String>
<String Id="Installing">Installing</String>
<String Id="Installation">Setup</String>
<String Id="Modifying">Updating</String>
<String Id="Modification">Modify</String>
<String Id="Repairing">Repairing</String>
<String Id="Repair">Repair</String>
<String Id="Uninstalling">Removing</String>
<String Id="Uninstallation">Uninstall</String>
<String Id="ElevateForCRTInstall">You will be prompted for Administrator privileges to install a C Runtime Library update (KB2999226).
Continue?</String>
<String Id="CancelButton">&amp;Cancel</String>
<String Id="CloseButton">&amp;Close</String>
<String Id="InstallHeader">Install [WixBundleName]</String>
<String Id="InstallMessage">Select Install Now to install Python with default settings, or choose Customize to enable or disable features.</String>
<String Id="InstallVersion">Version [WixBundleVersion]</String>
<String Id="InstallUpgradeHeader">Upgrade to [WixBundleName]</String>
<String Id="InstallUpgradeMessage">Select Upgrade Now to keep your current settings, or choose Customize to enable or disable features.</String>
<String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
<String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
<String Id="HelpHeader">Setup Help</String>
<String Id="HelpText">Visit &lt;a href="http://docs.python.org/[ShortVersion]/using/windows.html"&gt;docs.python.org/[ShortVersion]/using/windows.html&lt;/a&gt; for the full list of options, including the ability to enable and disable specific features.
"/passive" to display progress without requiring user interaction
"/quiet" to install/uninstall without displaying any UI
"/simple" to prevent user customization
"/uninstall" to remove Python (without confirmation)
"/layout [\[]directory[\]]" to pre-download all components
"/log [\[]filename[\]]" to specify log files location</String>
<String Id="InstallLicenseLinkText">[WixBundleName] &lt;a href="#"&gt;license terms&lt;/a&gt;.</String>
<String Id="InstallAcceptCheckbox">I &amp;agree to the license terms and conditions</String>
<String Id="InstallButton">&amp;Install Now</String>
<String Id="InstallButtonNote">[TargetDir]
Includes IDLE, pip and documentation
Creates shortcuts and file associations</String>
<String Id="InstallCustomButton">C&amp;ustomize installation</String>
<String Id="InstallCustomButtonNote">Choose location and features</String>
<String Id="InstallSimpleButton">&amp;Install</String>
<String Id="InstallSimpleButtonNote">Use settings preselected by your administrator
[SimpleInstallDescription]</String>
<String Id="InstallUpgradeButton">Up&amp;grade Now</String>
<String Id="InstallUpgradeButtonNote">[TargetDir]
Replaces your existing installation without changing settings.
Select Customize to review current options.</String>
<String Id="InstallUpgradeCustomButton">C&amp;ustomize installation</String>
<String Id="InstallUpgradeCustomButtonNote">Choose location and features</String>
<String Id="Custom1Header">Optional Features</String>
<String Id="Custom2Header">Advanced Options</String>
<String Id="CustomLocationLabel">Customize install location</String>
<String Id="CustomLocationHelpLabel">You will require write permissions for the selected location.</String>
<String Id="CustomInstallButton">&amp;Install</String>
<String Id="CustomNextButton">&amp;Next</String>
<String Id="CustomBackButton">&amp;Back</String>
<String Id="CustomBrowseButton">B&amp;rowse</String>
<String Id="Include_docLabel">&amp;Documentation</String>
<String Id="Include_docHelpLabel">Installs the Python documentation file.</String>
<String Id="Include_pipLabel">&amp;pip</String>
<String Id="Include_pipHelpLabel">Installs pip, which can download and install other Python packages.</String>
<String Id="Include_tcltkLabel">tcl/tk and &amp;IDLE</String>
<String Id="Include_tcltkHelpLabel">Installs tkinter and the IDLE development environment.</String>
<String Id="Include_testLabel">Python &amp;test suite</String>
<String Id="Include_testHelpLabel">Installs the standard library test suite.</String>
<String Id="Include_launcherLabel">py &amp;launcher</String>
<String Id="Include_launcherHelp">Installs the global 'py' launcher to make it easier to start Python.</String>
<String Id="Include_launcherRemove">Use Programs and Features to remove the 'py' launcher.</String>
<String Id="Include_launcherUpgrade">Upgrades the global 'py' launcher from the previous version.</String>
<String Id="AssociateFilesLabel">Associate &amp;files with Python (requires the py launcher)</String>
<String Id="ShortcutsLabel">Create shortcuts for installed applications</String>
<String Id="PrependPathLabel">Add Python to &amp;environment variables</String>
<String Id="ShortPrependPathLabel">Add &amp;Python [ShortVersion] to PATH</String>
<String Id="InstallAllUsersLabel">Install for &amp;all users</String>
<String Id="InstallLauncherAllUsersLabel">for &amp;all users (requires elevation)</String>
<String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
<String Id="PrecompileLabel">&amp;Precompile standard library</String>
<String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
<String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2015 or later)</String>
<String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
<String Id="ProgressLabel">[ActionLikeInstalling]:</String>
<String Id="OverallProgressPackageText">Initializing...</String>
<String Id="ModifyHeader">Modify Setup</String>
<String Id="ModifyModifyButton">&amp;Modify</String>
<String Id="ModifyButtonNote">Add or remove individual features.</String>
<String Id="ModifyRepairButton">&amp;Repair</String>
<String Id="RepairButtonNote">Ensure all current features are correctly installed.</String>
<String Id="ModifyUninstallButton">&amp;Uninstall</String>
<String Id="UninstallButtonNote">Remove the entire [WixBundleName] installation.</String>
<String Id="SuccessHeader">[ActionLikeInstallation] was successful</String>
<String Id="SuccessLaunchButton">&amp;Launch</String>
<String Id="SuccessRestartText">You may need to restart your computer to finish updating files.</String>
<String Id="SuccessRestartButton">&amp;Restart</String>
<String Id="SuccessInstallMessage">Special thanks to Mark Hammond, without whose years of freely shared Windows expertise, Python for Windows would still be Python for DOS.
New to Python? Start with the &lt;a href="https://docs.python.org/[ShortVersion]/tutorial/index.html"&gt;online tutorial&lt;/a&gt; and &lt;a href="https://docs.python.org/[ShortVersion]/index.html"&gt;documentation&lt;/a&gt;.
See &lt;a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html"&gt;what's new&lt;/a&gt; in this release.</String>
<String Id="SuccessModifyMessage">Thank you for using [WixBundleName].</String>
<String Id="SuccessRepairMessage">Thank you for using [WixBundleName].
Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you continue to encounter issues.</String>
<String Id="SuccessRemoveMessage">Thank you for using [WixBundleName].
Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you encountered problems.</String>
<String Id="FailureHeader">Setup failed</String>
<String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.</String>
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
<String Id="FailureRestartButton">&amp;Restart</String>
<String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
<String Id="FailureWin7MissingSP1">Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName].
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
<String Id="FailureVistaMissingSP2">Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName].
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
<String Id="FailureXPOrEarlier">Windows Vista or later is required to install and use [WixBundleName].
Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
<String Id="FailureWS2K8R2MissingSP1">Windows Server 2008 R2 Service Pack 1 and all applicable updates are required to install [WixBundleName].
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20r2%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
<String Id="FailureWS2K8MissingSP2">Windows Server 2008 Service Pack 2 and all applicable updates are required to install [WixBundleName].
Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20server%202008%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
<String Id="FailureWS2K3OrEarlier">Windows Server 2008 SP2 or later is required to install and use [WixBundleName].
Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
<String Id="SuccessMaxPathButton">Disable path length limit</String>
<String Id="SuccessMaxPathButtonNote">Changes your machine configuration to allow programs, including Python, to bypass the 260 character "MAX_PATH" limitation.</String>
</WixLocalization>

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View file

@ -0,0 +1,25 @@
This license applies to the bootstrapper application that is embedded within the installer. It has no impact on the licensing for the rest of the installer or Python itself, as no code covered by this license exists in any other part of the product.
---
Microsoft Reciprocal License (MS-RL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.
2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
3. Conditions and Limitations
(A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose.
(B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
(C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
#include "pch.h"

View file

@ -0,0 +1,60 @@
//-------------------------------------------------------------------------------------------------
// <copyright file="precomp.h" company="Outercurve Foundation">
// Copyright (c) 2004, Outercurve Foundation.
// This software is released under Microsoft Reciprocal License (MS-RL).
// The license and further copyright text can be found in the file
// LICENSE.TXT at the root directory of the distribution.
// </copyright>
//
// <summary>
// Precompiled header for standard bootstrapper application.
// </summary>
//-------------------------------------------------------------------------------------------------
#pragma once
#include <windows.h>
#include <gdiplus.h>
#include <Uxtheme.h>
#include <msiquery.h>
#include <objbase.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <stdlib.h>
#include <strsafe.h>
#include <stddef.h>
#include <versionhelpers.h>
#include "dutil.h"
#include "memutil.h"
#include "dictutil.h"
#include "dirutil.h"
#include "fileutil.h"
#include "locutil.h"
#include "logutil.h"
#include "pathutil.h"
#include "resrutil.h"
#include "shelutil.h"
#include "strutil.h"
#include "thmutil.h"
#include "uriutil.h"
#include "xmlutil.h"
#include "IBootstrapperEngine.h"
#include "IBootstrapperApplication.h"
#include "BalBaseBootstrapperApplication.h"
#include "balinfo.h"
#include "balcondition.h"
HRESULT CreateBootstrapperApplication(
__in HMODULE hModule,
__in BOOL fPrereq,
__in HRESULT hrHostInitialization,
__in IBootstrapperEngine* pEngine,
__in const BOOTSTRAPPER_COMMAND* pCommand,
__out IBootstrapperApplication** ppApplication
);
#include "IBootstrapperBAFunction.h"

View file

@ -0,0 +1,76 @@
//-------------------------------------------------------------------------------------------------
// <copyright file="wixstdba.cpp" company="Outercurve Foundation">
// Copyright (c) 2004, Outercurve Foundation.
// This software is released under Microsoft Reciprocal License (MS-RL).
// The license and further copyright text can be found in the file
// LICENSE.TXT at the root directory of the distribution.
// </copyright>
//
// <summary>
// Setup chainer/bootstrapper standard UI for WiX toolset.
// </summary>
//-------------------------------------------------------------------------------------------------
#include "pch.h"
static HINSTANCE vhInstance = NULL;
extern "C" BOOL WINAPI DllMain(
IN HINSTANCE hInstance,
IN DWORD dwReason,
IN LPVOID /* pvReserved */
)
{
switch(dwReason)
{
case DLL_PROCESS_ATTACH:
::DisableThreadLibraryCalls(hInstance);
vhInstance = hInstance;
break;
case DLL_PROCESS_DETACH:
vhInstance = NULL;
break;
}
return TRUE;
}
extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
__in IBootstrapperEngine* pEngine,
__in const BOOTSTRAPPER_COMMAND* pCommand,
__out IBootstrapperApplication** ppApplication
)
{
HRESULT hr = S_OK;
BalInitialize(pEngine);
hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pCommand, ppApplication);
BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
LExit:
return hr;
}
extern "C" void WINAPI BootstrapperApplicationDestroy()
{
BalUninitialize();
}
extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
__in HRESULT hrHostInitialization,
__in IBootstrapperEngine* pEngine,
__in const BOOTSTRAPPER_COMMAND* pCommand,
__out IBootstrapperApplication** ppApplication
)
{
return E_NOTIMPL;
}
extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
{ }

View file

@ -0,0 +1,18 @@
;-------------------------------------------------------------------------------------------------
; <copyright file="wixstdba.def" company="Outercurve Foundation">
; Copyright (c) 2004, Outercurve Foundation.
; This software is released under Microsoft Reciprocal License (MS-RL).
; The license and further copyright text can be found in the file
; LICENSE.TXT at the root directory of the distribution.
; </copyright>
;
; <summary>
; WiX Standard Bootstrapper Application DLL entry points.
; </summary>
;-------------------------------------------------------------------------------------------------
EXPORTS
BootstrapperApplicationCreate
BootstrapperApplicationDestroy
MbaPrereqBootstrapperApplicationCreate
MbaPrereqBootstrapperApplicationDestroy

View file

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonba", "pythonba.vcxproj", "{7A09B132-B3EE-499B-A700-A4B2157FEA3D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.ActiveCfg = Debug|Win32
{7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.Build.0 = Debug|Win32
{7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.ActiveCfg = Release|Win32
{7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<copyright file="wixstdba.vcxproj" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</PlatformToolset>
<ProjectGuid>{7A09B132-B3EE-499B-A700-A4B2157FEA3D}</ProjectGuid>
<TargetName>PythonBA</TargetName>
</PropertyGroup>
<Import Project="..\..\wix.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<Py_IntDir Condition="'$(Py_IntDir)' == ''">$(PySourcePath)PCbuild\obj\</Py_IntDir>
<IntDir>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\msi_$(ProjectName)\</IntDir>
<IntDir>$(IntDir.Replace(`\\`, `\`))</IntDir>
<OutDir>$(IntDir)</OutDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(WixInstallPath)sdk\inc</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v140'">$(WixInstallPath)sdk\vs2015\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v120'">$(WixInstallPath)sdk\vs2013\lib\x86</AdditionalLibraryDirectories>
<ModuleDefinitionFile>pythonba.def</ModuleDefinitionFile>
<GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="PythonBootstrapperApplication.cpp" />
<ClCompile Include="pythonba.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<None Include="pythonba.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View file

@ -0,0 +1,25 @@
//-------------------------------------------------------------------------------------------------
// <copyright file="resource.h" company="Outercurve Foundation">
// Copyright (c) 2004, Outercurve Foundation.
// This software is released under Microsoft Reciprocal License (MS-RL).
// The license and further copyright text can be found in the file
// LICENSE.TXT at the root directory of the distribution.
// </copyright>
//-------------------------------------------------------------------------------------------------
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
//
#define IDC_STATIC -1
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1003
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View file

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="DownloadUrl">
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>Bundle</OutputType>
<BootstrapConfiguration Condition="'$(BootstrapConfiguration)' == ''">Release</BootstrapConfiguration>
<LinkerSuppressSpecificWarnings>1132;1135;1140</LinkerSuppressSpecificWarnings>
<OutputName Condition="$(BuildForRelease)">$(OutputName)-$(PythonVersion)</OutputName>
<OutputName Condition="!$(BuildForRelease)">$(OutputName)-$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber).$(RevisionNumber)</OutputName>
<OutputName Condition="$(Platform) == 'x64'">$(OutputName)-amd64</OutputName>
<OutputName Condition="'$(OutputSuffix)' != ''">$(OutputName)-$(OutputSuffix)</OutputName>
<OutputName Condition="'$(Configuration)' == 'Debug'">$(OutputName)-d</OutputName>
<TargetName>$(OutputName)</TargetName>
<OutputPath>$(OutputPath)en-us\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<!-- See Tools/msi/buildrelease.bat for help on configuring the download URL -->
<DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/{version}/{arch}{releasename}/{msi}</DownloadUrl>
<DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, `{2}`))</DefineConstants>
<DefineConstants Condition="'$(DownloadUrl)' == ''">$(DefineConstants);DownloadUrl={2}</DefineConstants>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>WixUtilExtension</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixDependencyExtension">
<HintPath>WixDependencyExtension</HintPath>
<Name>WixDependencyExtension</Name>
</WixExtension>
<WixExtension Include="WixBalExtension">
<HintPath>WixBalExtension</HintPath>
<Name>WixBalExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Compile Include="bundle.wxs" />
<Compile Include="packagegroups\*.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="Default.thm" />
<Content Include="Default.wxl" />
<Content Include="SideBar.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="bundle.wxl" />
<WxlTemplate Include="*_en-US.wxl_template" />
</ItemGroup>
<ItemGroup>
<LinkerBindInputPaths Include="$(OutputPath)">
<BindName></BindName>
</LinkerBindInputPaths>
</ItemGroup>
<ItemDefinitionGroup>
<Package>
<Properties>BuildForRelease=$(BuildForRelease)</Properties>
</Package>
</ItemDefinitionGroup>
<ItemGroup>
<Package Include="..\core\core*.wixproj" />
<Package Include="..\dev\dev*.wixproj" />
<Package Include="..\doc\doc*.wixproj" />
<Package Include="..\exe\exe*.wixproj" />
<Package Include="..\lib\lib*.wixproj" />
<Package Include="..\path\path*.wixproj" />
<Package Include="..\pip\pip*.wixproj" />
<Package Include="..\tcltk\tcltk*.wixproj" />
<Package Include="..\test\test*.wixproj" />
<Package Include="..\tools\tools*.wixproj" />
</ItemGroup>
<PropertyGroup>
<BuildPackagesTargets>Build</BuildPackagesTargets>
</PropertyGroup>
<Target Name="_SetRebuildTarget" BeforeTargets="BeforeRebuild">
<PropertyGroup>
<BuildPackagesTargets>Rebuild</BuildPackagesTargets>
</PropertyGroup>
</Target>
<Target Name="BuildPackages" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
<MSBuild Projects="@(Package)" Targets="$(BuildPackagesTargets)" BuildInParallel="true" />
</Target>
<Target Name="BuildBootstrapApplication" BeforeTargets="BeforeBuild">
<Message Text="Building bootstrap app" Importance="high" />
<MSBuild Projects="bootstrap\pythonba.vcxproj"
Targets="Build;GetNativeTargetPath"
UseResultsCache="true"
Properties="Configuration=$(BootstrapConfiguration);Platform=Win32">
<Output TaskParameter="TargetOutputs" PropertyName="BootstrapAppPath" />
</MSBuild>
<PropertyGroup>
<DefineConstants>$(DefineConstants);BootstrapApp=$(BootstrapAppPath)</DefineConstants>
</PropertyGroup>
</Target>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="CRTDescription">C Runtime Update (KB2999226)</String>
<String Id="CompileAllDescription">Precompiling standard library</String>
<String Id="CompileAllODescription">Precompiling standard library (-O)</String>
<String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
</WixLocalization>

View file

@ -0,0 +1,112 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension">
<Bundle Name="!(loc.FullProductName)"
UpgradeCode="$(var.CoreUpgradeCode)"
Version="$(var.Version)"
IconSourceFile="..\..\..\PC\icons\setup.ico"
Manufacturer="!(loc.Manufacturer)"
AboutUrl="http://www.python.org/"
Compressed="no"
dep:ProviderKey="CPython-$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
<BootstrapperApplication Id="PythonBA" SourceFile="$(var.BootstrapApp)">
<Payload Compressed='yes' SourceFile='Default.thm' />
<Payload Compressed='yes' SourceFile='Default.wxl' />
<Payload Compressed='yes' SourceFile='SideBar.png' />
</BootstrapperApplication>
<!-- May be set to "Removing" or "Repairing" -->
<Variable Name="ActionLikeInstalling" Value="Installing" />
<!-- May be set to "Uninstallation" or "Repair" -->
<Variable Name="ActionLikeInstallation" Value="Setup" />
<Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" />
<Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
<Variable Name="WinVer" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
<Variable Name="WinVerNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
<Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
<?if "$(var.PyTestExt)"="" ?>
<Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
<?else ?>
<Variable Name="InstallLauncherAllUsers" Value="0" />
<?endif ?>
<Variable Name="TargetDir" Value="" bal:Overridable="yes" />
<?if $(var.Platform)~="x64" ?>
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="TargetPlatform" Value="x64" />
<?else ?>
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="TargetPlatform" Value="x86" />
<?endif ?>
<Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\Python\Python[WinVerNoDot]" bal:Overridable="yes" />
<Variable Name="OptionalFeaturesRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstalledFeatures" />
<Variable Name="TargetDirRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstallPath" />
<!--
An empty string will use the other defaults based on InstallAllUsers
(and switch dynamically in the UI). To get the old default, pass
this property on the command line:
DefaultCustomTargetDir=[WindowsVolume]Python[ShortVersionNoDot]
-->
<Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
<Variable Name="InstallAllUsersState" Value="enabled" bal:Overridable="yes" />
<?if "$(var.PyTestExt)"="" ?>
<Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
<?else ?>
<Variable Name="InstallLauncherAllUsersState" Value="disable" bal:Overridable="yes" />
<?endif ?>
<Variable Name="CustomInstallLauncherAllUsersState" Value="[InstallLauncherAllUsersState]" />
<Variable Name="TargetDirState" Value="enabled" />
<Variable Name="CustomBrowseButtonState" Value="enabled" />
<Variable Name="Include_core" Value="1" />
<Variable Name="Include_exe" Value="1" bal:Overridable="yes" />
<Variable Name="Include_dev" Value="1" bal:Overridable="yes" />
<Variable Name="Include_lib" Value="1" bal:Overridable="yes" />
<Variable Name="Include_test" Value="1" bal:Overridable="yes" />
<Variable Name="Include_doc" Value="1" bal:Overridable="yes" />
<Variable Name="Include_tools" Value="1" bal:Overridable="yes" />
<Variable Name="Include_tcltk" Value="1" bal:Overridable="yes" />
<Variable Name="Include_pip" Value="1" bal:Overridable="yes" />
<?if "$(var.PyTestExt)"="" ?>
<Variable Name="Include_launcher" Value="1" bal:Overridable="yes" />
<Variable Name="Include_launcherState" Value="enabled" bal:Overridable="yes" />
<?else ?>
<Variable Name="Include_launcher" Value="0" />
<Variable Name="Include_launcherState" Value="disable" />
<?endif ?>
<Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
<Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
<Variable Name="LauncherOnly" Value="0" bal:Overridable="yes" />
<Variable Name="DetectedLauncher" Value="0" />
<Variable Name="DetectedOldLauncher" Value="0" />
<Variable Name="AssociateFiles" Value="1" bal:Overridable="yes" />
<Variable Name="Shortcuts" Value="1" bal:Overridable="yes" />
<Variable Name="PrependPath" Value="0" bal:Overridable="yes" />
<Variable Name="CompileAll" Value="0" bal:Overridable="yes" />
<Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
<Variable Name="SimpleInstallDescription" Value="" bal:Overridable="yes" />
<Chain ParallelCache="yes">
<PackageGroupRef Id="crt" />
<PackageGroupRef Id="core" />
<PackageGroupRef Id="dev" />
<PackageGroupRef Id="exe" />
<PackageGroupRef Id="lib" />
<PackageGroupRef Id="test" />
<PackageGroupRef Id="doc" />
<PackageGroupRef Id="tools" />
<PackageGroupRef Id="tcltk" />
<PackageGroupRef Id="launcher" />
<PackageGroupRef Id="pip" />
<PackageGroupRef Id="packageinstall" />
<PackageGroupRef Id="postinstall" />
</Chain>
</Bundle>
</Wix>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{3E204ADD-238D-4D10-852C-4F859325C839}</ProjectGuid>
<OutputName>python</OutputName>
<OutputSuffix>full</OutputSuffix>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DefineConstants>
$(DefineConstants);
CompressMSI=yes;
CompressPDB=yes;
CompressMSI_D=yes;
</DefineConstants>
</PropertyGroup>
<Import Project="bundle.targets" />
</Project>

View file

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="core">
<MsiPackage Id="core_AllUsers"
SourceFile="core.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="core_AllUsers_pdb"
SourceFile="core_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="core_AllUsers_d"
SourceFile="core_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="core_JustForMe"
SourceFile="core.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="core_JustForMe_pdb"
SourceFile="core_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="core_JustForMe_d"
SourceFile="core_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="crt">
<PackageGroupRef Id="crt_14.0_v6.0" />
<PackageGroupRef Id="crt_14.0_v6.1" />
<PackageGroupRef Id="crt_14.0_v6.2" />
<PackageGroupRef Id="crt_14.0_v6.3" />
</PackageGroup>
</Fragment>
<?foreach ver in v6.0;v6.1;v6.2;v6.3 ?>
<?if "$(var.ver)" = "v6.0" ?>
<?define msuver=6.0 ?>
<?elseif "$(var.ver)" = "v6.1" ?>
<?define msuver=6.1 ?>
<?elseif "$(var.ver)" = "v6.2" ?>
<?define msuver=8-RT ?>
<?elseif "$(var.ver)" = "v6.3" ?>
<?define msuver=8.1 ?>
<?else ?>
<?error unknown version $(var.ver) ?>
<?endif ?>
<Fragment>
<PackageGroup Id="crt_14.0_$(var.ver)">
<MsuPackage Id="crt_14.0_$(var.ver)_x86"
KB="2999226"
SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x86.msu"
DisplayName="!(loc.CRTDescription)"
Description="!(loc.CRTDescription)"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="not CRTInstalled and VersionNT = $(var.ver) and not VersionNT64 and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
<MsuPackage Id="crt_14.0_$(var.ver)_x64"
KB="2999226"
SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x64.msu"
DisplayName="!(loc.CRTDescription)"
Description="!(loc.CRTDescription)"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="not CRTInstalled and VersionNT64 = $(var.ver) and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
</PackageGroup>
</Fragment>
<?undef msuver ?>
<?endforeach ?>
</Wix>

View file

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="dev">
<MsiPackage Id="dev_AllUsers"
SourceFile="dev.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_dev and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="dev_AllUsers_d"
SourceFile="dev_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="dev_JustForMe"
SourceFile="dev.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_dev and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="dev_JustForMe_d"
SourceFile="dev_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,28 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="doc">
<MsiPackage Id="doc_AllUsers"
SourceFile="doc.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
EnableFeatureSelection="yes"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_doc and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="doc_JustForMe"
SourceFile="doc.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
EnableFeatureSelection="yes"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_doc and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,64 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="exe">
<MsiPackage Id="exe_AllUsers"
SourceFile="exe.msi"
ForcePerMachine="yes"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
EnableFeatureSelection="yes"
InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="exe_AllUsers_pdb"
SourceFile="exe_pdb.msi"
ForcePerMachine="yes"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="exe_AllUsers_d"
SourceFile="exe_d.msi"
ForcePerMachine="yes"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="exe_JustForMe"
SourceFile="exe.msi"
ForcePerMachine="no"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
EnableFeatureSelection="yes"
InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="exe_JustForMe_pdb"
SourceFile="exe_pdb.msi"
ForcePerMachine="no"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="exe_JustForMe_d"
SourceFile="exe_d.msi"
ForcePerMachine="no"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="launcher">
<!-- The All Users launcher is always the 32-bit version -->
<MsiPackage Id="launcher_AllUsers"
SourceFile="!(bindpath.build32)en-us\launcher.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
EnableFeatureSelection="yes"
Permanent="yes"
Visible="yes"
InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
<MsiPackage Id="launcher_JustForMe"
SourceFile="!(bindpath.build32)en-us\launcher.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
EnableFeatureSelection="yes"
Permanent="yes"
Visible="yes"
InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="lib">
<MsiPackage Id="lib_AllUsers"
SourceFile="lib.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_lib and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="lib_AllUsers_pdb"
SourceFile="lib_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="lib_AllUsers_d"
SourceFile="lib_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="lib_JustForMe"
SourceFile="lib.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_lib and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="lib_JustForMe_pdb"
SourceFile="lib_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="lib_JustForMe_d"
SourceFile="lib_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="packageinstall">
<!--
This is an example of installing a package using pip as part of main install.
For a network-only install, remove the Payload element and change the install
command to specify the package and (optionally) version specifier.
<ExePackage Id="requests"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-[WinVer] -m pip install requests-2.7.0-py2.py3-none-any.whl'
UninstallCommand='-[WinVer] -m pip uninstall -y requests'
Vital="no"
InstallCondition="Include_pip and not LauncherOnly">
<Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)" />
</ExePackage>
-->
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="pip">
<MsiPackage Id="pip_AllUsers"
SourceFile="pip.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_pip and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="pip_JustForMe"
SourceFile="pip.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_pip and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,88 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="postinstall">
<MsiPackage Id="path_AllUsers"
SourceFile="path.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and PrependPath and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="path_JustForMe"
SourceFile="path.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and PrependPath and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
<ExePackage Id="compileall_AllUsers"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-[WinVer] $(var.CompileAllCommand)'
RepairCommand='-[WinVer] $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="yes"
Vital="no"
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
<ExePackage Id="compileallO_AllUsers"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllODescription)"
InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="yes"
Vital="no"
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
<ExePackage Id="compileallOO_AllUsers"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllOODescription)"
InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="yes"
Vital="no"
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
<ExePackage Id="compileall_JustForMe"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-[WinVer] $(var.CompileAllCommand)'
RepairCommand='-[WinVer] $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="no"
Vital="no"
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
<ExePackage Id="compileallO_JustForMe"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllODescription)"
InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="no"
Vital="no"
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
<ExePackage Id="compileallOO_JustForMe"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllOODescription)"
InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
Permanent="yes"
PerMachine="no"
Vital="no"
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,68 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="tcltk">
<MsiPackage Id="tcltk_AllUsers"
SourceFile="tcltk.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
EnableFeatureSelection="yes"
InstallCondition="InstallAllUsers and Include_tcltk and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tcltk_AllUsers_pdb"
SourceFile="tcltk_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
EnableFeatureSelection="yes"
InstallCondition="InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tcltk_AllUsers_d"
SourceFile="tcltk_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
EnableFeatureSelection="yes"
InstallCondition="InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tcltk_JustForMe"
SourceFile="tcltk.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
EnableFeatureSelection="yes"
InstallCondition="not InstallAllUsers and Include_tcltk and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tcltk_JustForMe_pdb"
SourceFile="tcltk_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
EnableFeatureSelection="yes"
InstallCondition="not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tcltk_JustForMe_d"
SourceFile="tcltk_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
EnableFeatureSelection="yes"
InstallCondition="not InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="test">
<MsiPackage Id="test_AllUsers"
SourceFile="test.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_test and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="test_AllUsers_pdb"
SourceFile="test_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="test_AllUsers_d"
SourceFile="test_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="test_JustForMe"
SourceFile="test.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_test and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="test_JustForMe_pdb"
SourceFile="test_pdb.msi"
Compressed="$(var.CompressPDB)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="test_JustForMe_d"
SourceFile="test_d.msi"
Compressed="$(var.CompressMSI_D)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="tools">
<MsiPackage Id="tools_AllUsers"
SourceFile="tools.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and Include_tools and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="tools_JustForMe"
SourceFile="tools.msi"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and Include_tools and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{FCD43AC9-969F-49A1-8AC5-EDC27599D1EB}</ProjectGuid>
<OutputName>python</OutputName>
<OutputSuffix></OutputSuffix>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DefineConstants>
$(DefineConstants);
CompressMSI=yes;
CompressPDB=no;
CompressMSI_D=no
</DefineConstants>
</PropertyGroup>
<Import Project="bundle.targets" />
</Project>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{71CDE213-CB39-4BD9-B89D-BBB878689144}</ProjectGuid>
<OutputName>python</OutputName>
<OutputSuffix>webinstall</OutputSuffix>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DefineConstants>
$(DefineConstants);
CompressMSI=no;
CompressPDB=no;
CompressMSI_D=no
</DefineConstants>
</PropertyGroup>
<Import Project="bundle.targets" />
</Project>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{8A4A1162-4BF9-4FF6-9A98-315F01E44932}</ProjectGuid>
<OutputName>python</OutputName>
<OutputSuffix></OutputSuffix>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DefineConstants Condition="'$(Pack)' != 'true'">
$(DefineConstants);CompressMSI=no;
</DefineConstants>
<DefineConstants Condition="'$(Pack)' == 'true'">
$(DefineConstants);CompressMSI=yes;
</DefineConstants>
<DefineConstants>
$(DefineConstants);
CompressPDB=no;
CompressMSI_D=no;
</DefineConstants>
</PropertyGroup>
<Import Project="bundle.targets" />
</Project>

122
third_party/python/Tools/msi/common.wxs vendored Normal file
View file

@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Property Id="ROOTREGISTRYKEY" Value="Software\Python\PythonCore" />
</Fragment>
<Fragment>
<Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
</Fragment>
<Fragment>
<Component Id="OptionalFeature" Guid="*" Directory="InstallDirectory">
<Condition>OPTIONALFEATURESREGISTRYKEY</Condition>
<RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
<RegistryValue Type="string" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" KeyPath="yes" />
</RegistryKey>
</Component>
</Fragment>
<Fragment>
<Property Id="UpgradeTable" Value="1" />
<?ifndef SuppressUpgradeTable ?>
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" />
<UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
</Upgrade>
<?endif ?>
<?ifdef CoreUpgradeCode ?>
<?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
<Upgrade Id="$(var.CoreUpgradeCode)">
<UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
</Upgrade>
<Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
<?endif ?>
<?endif ?>
<Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
<Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts>
</InstallExecuteSequence>
</Fragment>
<Fragment>
<!-- Include an icon for the Programs and Features dialog -->
<Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\python.ico" />
<Property Id="ARPPRODUCTICON" Value="ARPIcon" />
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
</Fragment>
<Fragment>
<?ifdef InstallDirectoryGuidSeed ?>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
</Directory>
<?endif ?>
</Fragment>
<!-- Top-level directories -->
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="DLLs" Name="DLLs">
<Directory Id="Catalogs" />
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="Doc" Name="Doc" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="include" Name="include" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="Lib" Name="Lib" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="libs" Name="libs" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="Scripts" Name="Scripts" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="tcl" Name="tcl" />
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="InstallDirectory">
<Directory Id="Tools" Name="Tools" />
</DirectoryRef>
</Fragment>
<!-- Start Menu folder -->
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="ProgramMenuFolder">
<Directory Id="MenuDir" Name="!(loc.ProductName)" />
</Directory>
</DirectoryRef>
</Fragment>
</Wix>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="LCID">1033</String>
<String Id="Culture">en-us</String>
<String Id="ProductName">Python {{ShortVersion}}</String>
<String Id="FullProductName">Python {{LongVersion}} ({{Bitness}})</String>
<String Id="Title">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}})</String>
<String Id="Description">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}})</String>
<String Id="TitlePdb">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} symbols)</String>
<String Id="DescriptionPdb">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} symbols)</String>
<String Id="Title_d">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} debug)</String>
<String Id="Description_d">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} debug)</String>
<String Id="Manufacturer">Python Software Foundation</String>
<String Id="NoDowngrade">A newer version of !(loc.ProductName) is already installed.</String>
<String Id="IncorrectCore">An incorrect version of a prerequisite package is installed. Please uninstall any other versions of !(loc.ProductName) and try installing this again.</String>
<String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
<String Id="ManufacturerSupportUrl">http://www.python.org/</String>
</WixLocalization>

View file

@ -0,0 +1,127 @@
'''
Processes a CSV file containing a list of files into a WXS file with
components for each listed file.
The CSV columns are:
source of file, target for file, group name
Usage::
py txt_to_wxs.py [path to file list .csv] [path to destination .wxs]
This is necessary to handle structures where some directories only
contain other directories. MSBuild is not able to generate the
Directory entries in the WXS file correctly, as it operates on files.
Python, however, can easily fill in the gap.
'''
__author__ = "Steve Dower <steve.dower@microsoft.com>"
import csv
import re
import sys
from collections import defaultdict
from itertools import chain, zip_longest
from pathlib import PureWindowsPath
from uuid import uuid1
ID_CHAR_SUBS = {
'-': '_',
'+': '_P',
}
def make_id(path):
return re.sub(
r'[^A-Za-z0-9_.]',
lambda m: ID_CHAR_SUBS.get(m.group(0), '_'),
str(path).rstrip('/\\'),
flags=re.I
)
DIRECTORIES = set()
def main(file_source, install_target):
with open(file_source, 'r', newline='') as f:
files = list(csv.reader(f))
assert len(files) == len(set(make_id(f[1]) for f in files)), "Duplicate file IDs exist"
directories = defaultdict(set)
cache_directories = defaultdict(set)
groups = defaultdict(list)
for source, target, group, disk_id, condition in files:
target = PureWindowsPath(target)
groups[group].append((source, target, disk_id, condition))
if target.suffix.lower() in {".py", ".pyw"}:
cache_directories[group].add(target.parent)
for dirname in target.parents:
parent = make_id(dirname.parent)
if parent and parent != '.':
directories[parent].add(dirname.name)
lines = [
'<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">',
' <Fragment>',
]
for dir_parent in sorted(directories):
lines.append(' <DirectoryRef Id="{}">'.format(dir_parent))
for dir_name in sorted(directories[dir_parent]):
lines.append(' <Directory Id="{}_{}" Name="{}" />'.format(dir_parent, make_id(dir_name), dir_name))
lines.append(' </DirectoryRef>')
for dir_parent in (make_id(d) for group in cache_directories.values() for d in group):
lines.append(' <DirectoryRef Id="{}">'.format(dir_parent))
lines.append(' <Directory Id="{}___pycache__" Name="__pycache__" />'.format(dir_parent))
lines.append(' </DirectoryRef>')
lines.append(' </Fragment>')
for group in sorted(groups):
lines.extend([
' <Fragment>',
' <ComponentGroup Id="{}">'.format(group),
])
for source, target, disk_id, condition in groups[group]:
lines.append(' <Component Id="{}" Directory="{}" Guid="*">'.format(make_id(target), make_id(target.parent)))
if condition:
lines.append(' <Condition>{}</Condition>'.format(condition))
if disk_id:
lines.append(' <File Id="{}" Name="{}" Source="{}" DiskId="{}" />'.format(make_id(target), target.name, source, disk_id))
else:
lines.append(' <File Id="{}" Name="{}" Source="{}" />'.format(make_id(target), target.name, source))
lines.append(' </Component>')
create_folders = {make_id(p) + "___pycache__" for p in cache_directories[group]}
remove_folders = {make_id(p2) for p1 in cache_directories[group] for p2 in chain((p1,), p1.parents)}
create_folders.discard(".")
remove_folders.discard(".")
if create_folders or remove_folders:
lines.append(' <Component Id="{}__pycache__folders" Directory="TARGETDIR" Guid="{}">'.format(group, uuid1()))
lines.extend(' <CreateFolder Directory="{}" />'.format(p) for p in create_folders)
lines.extend(' <RemoveFile Id="Remove_{0}_files" Name="*" On="uninstall" Directory="{0}" />'.format(p) for p in create_folders)
lines.extend(' <RemoveFolder Id="Remove_{0}_folder" On="uninstall" Directory="{0}" />'.format(p) for p in create_folders | remove_folders)
lines.append(' </Component>')
lines.extend([
' </ComponentGroup>',
' </Fragment>',
])
lines.append('</Wix>')
# Check if the file matches. If so, we don't want to touch it so
# that we can skip rebuilding.
try:
with open(install_target, 'r') as f:
if all(x.rstrip('\r\n') == y for x, y in zip_longest(f, lines)):
print('File is up to date')
return
except IOError:
pass
with open(install_target, 'w') as f:
f.writelines(line + '\n' for line in lines)
print('Wrote {} lines to {}'.format(len(lines), install_target))
if __name__ == '__main__':
main(sys.argv[1], sys.argv[2])

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{5F23F608-D74B-4259-A0CE-8DC65CC7FE53}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName Condition="'$(OutputName)' == ''">dev</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DefineConstants Condition="$(BuildForRelease)">
$(DefineConstants);
IncludeMinGWLib=1;
</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="dev.wxs" />
<Compile Include="dev_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<ItemGroup>
<InstallFiles Include="$(PySourcePath)include\*.h">
<SourceBase>$(PySourcePath)</SourceBase>
<Source>!(bindpath.src)</Source>
<TargetBase>$(PySourcePath)</TargetBase>
<Target_></Target_>
<Group>dev_include</Group>
</InstallFiles>
</ItemGroup>
<Target Name="BuildMinGWLib"
Inputs="$(BuildPath)$(PyDllName).dll"
Outputs="$(BuildPath)lib$(PyDllName).a"
AfterTargets="PrepareForBuild"
Condition="$(BuildForRelease)">
<!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
<PropertyGroup>
<_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>
<_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts>
</PropertyGroup>
<Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" &gt; "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
<Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' />
</Target>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="dev_include" />
<ComponentGroupRef Id="dev_pyconfig" />
<ComponentGroupRef Id="dev_libs" />
<?ifdef IncludeMinGWLib ?>
<ComponentGroupRef Id="dev_mingw" />
<?endif ?>
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{C11B4945-76BD-4137-B2E3-649460117A77}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>dev_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="dev_d.wxs" />
<Compile Include="dev_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="dev_libs_d" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Development Libraries</String>
<String Id="ShortDescriptor">dev</String>
</WixLocalization>

View file

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="dev_pyconfig">
<Component Id="include_pyconfig.h" Directory="include" Guid="*">
<File Id="include_pyconfig.h" Name="pyconfig.h" Source="!(bindpath.src)PC\pyconfig.h" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="dev_libs">
<Component Id="libs_python3.lib" Directory="libs" Guid="*">
<File Id="libs_python_stable.lib" Name="python$(var.MajorVersionNumber).lib" KeyPath="yes" />
</Component>
<Component Id="libs_python.lib" Directory="libs" Guid="*">
<File Id="libs_python.lib" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).lib" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="dev_libs_d">
<Component Id="libs_python3_d.lib" Directory="libs" Guid="*">
<File Id="libs_python_stable_d.lib" Name="python$(var.MajorVersionNumber)_d.lib" />
</Component>
<Component Id="libs_python_d.lib" Directory="libs" Guid="*">
<File Id="libs_python_d.lib" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.lib" />
</Component>
</ComponentGroup>
</Fragment>
<?ifdef IncludeMinGWLib ?>
<Fragment>
<ComponentGroup Id="dev_mingw">
<Component Id="libs_libpython.a" Directory="libs" Guid="*">
<File Id="libs_libpython.a" Name="libpython$(var.MajorVersionNumber)$(var.MinorVersionNumber).a" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<?endif ?>
</Wix>

View file

@ -0,0 +1,23 @@
"""distutils.command.bdist_wininst
Suppresses the 'bdist_wininst' command, while still allowing
setuptools to import it without breaking."""
from distutils.core import Command
from distutils.errors import DistutilsPlatformError
class bdist_wininst(Command):
description = "create an executable installer for MS Windows"
# Marker for tests that we have the unsupported bdist_wininst
_unsupported = True
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
raise DistutilsPlatformError("bdist_wininst is not supported "
"in this Python distribution")

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0D62A2BB-5F71-4447-8C8C-9708407B3674}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>doc</OutputName>
<OutputType>Package</OutputType>
<!-- Shortcut validation is not necessary -->
<SuppressICEs>ICE43</SuppressICEs>
</PropertyGroup>
<Import Project="..\msi.props" />
<PropertyGroup>
<DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
<IncludeDocFile>false</IncludeDocFile>
<IncludeDocFile Condition="$(BuildForRelease) or Exists('$(PySourcePath)Doc\build\htmlhelp\$(DocFilename)')">true</IncludeDocFile>
</PropertyGroup>
<PropertyGroup Condition="$(IncludeDocFile)">
<DefineConstants>$(DefineConstants);DocFilename=$(DocFilename);</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="doc.wxs" />
<Compile Include="doc_files.wxs" Condition="$(IncludeDocFile)" />
<Compile Include="doc_no_files.wxs" Condition="!$(IncludeDocFile)" />
</ItemGroup>
<ItemGroup>
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Property Id="HHExe" Value="C:\Windows\hh.exe" />
<CustomAction Id="SetHHExe" Property="HHCExe" Value='[WindowsFolder]\hh.exe' Execute="immediate" />
<InstallExecuteSequence>
<Custom Action="SetHHExe" Before="CostFinalize">1</Custom>
</InstallExecuteSequence>
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="doc" Primary="yes" />
<ComponentRef Id="OptionalFeature" />
</Feature>
<Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="doc" />
<?ifdef DocFilename ?>
<Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
<RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
<RegistryValue Name="$(var.OptionalFeatureName)_shortcut" Type="string" Value="$(var.Version)" KeyPath="yes" />
</RegistryKey>
<Shortcut Id="python.chm"
Target="[HHExe]"
Arguments="[#python.chm]"
Name="!(loc.ShortcutName)"
Description="!(loc.ShortcutDescription)"
WorkingDirectory="InstallDirectory"
Show="maximized" />
<RemoveFolder Id="Remove_MenuDir" On="uninstall" />
</Component>
<?endif ?>
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="ShortDescriptor">doc</String>
<String Id="Descriptor">Documentation</String>
<String Id="ShortcutName">Python {{ShortVersion}} Manuals ({{Bitness}})</String>
<String Id="ShortcutDescription">View the !(loc.ProductName) documentation.</String>
</WixLocalization>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PropertyRef Id="REGISTRYKEY" />
<ComponentGroup Id="doc">
<Component Id="python.chm" Directory="Doc" Guid="*">
<File Id="python.chm" Name="$(var.DocFilename)" KeyPath="yes" />
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="doc">
<!--
This file is included when the CHM is not available.
This way, snapshot builds can succeed without having to
build the docs.
-->
<Component Id="EmptyDocFolder" Directory="Doc" Guid="{22FD42DB-EC66-4B1C-B1FC-44E0CF7B2462}">
<CreateFolder />
<RemoveFolder Id="Remove_EmptyDocFolder" On="uninstall" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,41 @@
Additional Conditions for this Windows binary build
---------------------------------------------------
This program is linked with and uses Microsoft Distributable Code,
copyrighted by Microsoft Corporation. The Microsoft Distributable Code
is embedded in each .exe, .dll and .pyd file as a result of running
the code through a linker.
If you further distribute programs that include the Microsoft
Distributable Code, you must comply with the restrictions on
distribution specified by Microsoft. In particular, you must require
distributors and external end users to agree to terms that protect the
Microsoft Distributable Code at least as much as Microsoft's own
requirements for the Distributable Code. See Microsoft's documentation
(included in its developer tools and on its website at microsoft.com)
for specific details.
Redistribution of the Windows binary build of the Python interpreter
complies with this agreement, provided that you do not:
- alter any copyright, trademark or patent notice in Microsoft's
Distributable Code;
- use Microsoft's trademarks in your programs' names or in a way that
suggests your programs come from or are endorsed by Microsoft;
- distribute Microsoft's Distributable Code to run on a platform other
than Microsoft operating systems, run-time technologies or application
platforms; or
- include Microsoft Distributable Code in malicious, deceptive or
unlawful programs.
These restrictions apply only to the Microsoft Distributable Code as
defined above, not to Python itself or any programs running on the
Python interpreter. The redistribution of the Python interpreter and
libraries is governed by the Python Software License included with this
file, or by other licenses as marked.

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{6BD53305-B03E-49DC-85FB-5551B8CCC843}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>exe</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup>
<!-- Shortcut validation is not necessary -->
<SuppressICEs>ICE43</SuppressICEs>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="exe.wxs" />
<Compile Include="exe_files.wxs" />
<Compile Include="exe_reg.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Target Name="_GenerateLicense" AfterTargets="PrepareForBuild">
<ItemGroup>
<LicenseFiles Include="$(PySourcePath)LICENSE;
crtlicense.txt;
$(bz2Dir)LICENSE;
$(opensslDir)LICENSE;
$(tclDir)license.terms;
$(tkDir)license.terms;
$(tixDir)license.terms" />
<_LicenseFiles Include="@(LicenseFiles)">
<Content>$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
</_LicenseFiles>
</ItemGroup>
<WriteLinesToFile File="$(BuildPath)LICENSE"
Overwrite="true"
Lines="@(_LicenseFiles->'%(Content)')" />
</Target>
<Target Name="_CopyMiscNews" AfterTargets="PrepareForBuild" Condition="Exists('$(PySourcePath)Misc\NEWS')">
<Copy SourceFiles="$(PySourcePath)Misc\NEWS" DestinationFiles="$(BuildPath)NEWS.txt" />
</Target>
<Target Name="_MergeMiscNewsWithBlurb" AfterTargets="PrepareForBuild" Condition="$(Blurb) != '' and !Exists('$(PySourcePath)Misc\NEWS')">
<Exec Command="$(Blurb) merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCBuild)" />
</Target>
<Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')">
<ItemGroup>
<HostPython Include="$(ExternalsDir)python*\tools\python.exe" />
<HostPython Include="@(HostPython)" Condition="Exists(%(FullPath))" />
<HostPython Include="py" Condition="@(HostPython) == ''" />
</ItemGroup>
<PropertyGroup>
<HostPython>@(HostPython)</HostPython>
<HostPython Condition="$(HostPython.Contains(';'))">$(HostPython.Remove($(HostPython.IndexOf(';'))))</HostPython>
</PropertyGroup>
<Exec Command="&quot;$(HostPython)&quot; -m pip install -U blurb" WorkingDirectory="$(PCBuild)" />
<Exec Command="&quot;$(HostPython)&quot; -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCBuild)" />
</Target>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="exe_python" Primary="yes" />
<ComponentGroupRef Id="exe_reg" Primary="yes" />
<ComponentGroupRef Id="exe_txt" />
<ComponentGroupRef Id="exe_icons" />
<ComponentRef Id="OptionalFeature" />
</Feature>
<Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="exe_python" />
<Component Id="exe_shortcut" Directory="MenuDir" Guid="*">
<Shortcut Id="python.exe"
Target="[#python.exe]"
Name="!(loc.ShortcutName)"
Description="!(loc.ShortcutDescription)"
WorkingDirectory="InstallDirectory" />
<RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Key="InstalledFeatures" Name="Shortcuts" Type="string" Value="$(var.Version)" />
</RegistryKey>
</Component>
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{B1CA739C-8DB0-403B-9010-D79507507CE9}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>exe_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="exe_d.wxs" />
<Compile Include="exe_files.wxs" />
<Compile Include="exe_reg.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="exe_python_d" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Executables</String>
<String Id="ShortDescriptor">executable</String>
<String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
<String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
<String Id="SupportUrl">http://www.python.org/</String>
</WixLocalization>

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="exe_txt">
<Component Id="LICENSE.txt" Directory="InstallDirectory" Guid="*">
<File Name="LICENSE.txt" Source="LICENSE" KeyPath="yes" />
</Component>
<Component Id="NEWS.txt" Directory="InstallDirectory" Guid="*">
<File Name="NEWS.txt" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<PropertyRef Id="REGISTRYKEY" />
<ComponentGroup Id="exe_python">
<Component Id="python.exe" Directory="InstallDirectory" Guid="$(var.PythonExeComponentGuid)">
<File Name="python.exe" KeyPath="yes" />
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Key="InstallPath" Type="string" Value="[InstallDirectory]" KeyPath="no" />
<RegistryValue Key="InstallPath" Name="ExecutablePath" Type="string" Value="[#python.exe]" KeyPath="no" />
</RegistryKey>
</Component>
<Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
<File Name="pythonw.exe" KeyPath="yes" />
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Key="InstallPath" Name="WindowedExecutablePath" Type="string" Value="[#pythonw.exe]" KeyPath="no" />
</RegistryKey>
</Component>
<Component Id="vcruntime140.dll" Directory="InstallDirectory" Guid="*">
<File Name="vcruntime140.dll" Source="!(bindpath.redist)vcruntime140.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="exe_python_symbols">
<Component Id="python.pdb" Directory="InstallDirectory" Guid="*">
<File Name="python.pdb" />
</Component>
<Component Id="pythonw.pdb" Directory="InstallDirectory" Guid="*">
<File Name="pythonw.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="exe_python_d">
<Component Id="python_d.exe" Directory="InstallDirectory" Guid="*">
<File Name="python_d.exe" />
</Component>
<Component Id="python_d.pdb" Directory="InstallDirectory" Guid="*">
<File Name="python_d.pdb" />
</Component>
<Component Id="pythonw_d.exe" Directory="InstallDirectory" Guid="*">
<File Name="pythonw_d.exe" />
</Component>
<Component Id="pythonw_d.pdb" Directory="InstallDirectory" Guid="*">
<File Name="pythonw_d.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="exe_icons">
<Component Id="py.ico" Directory="DLLs" Guid="*">
<File Name="py.ico" Source="!(bindpath.src)PC\icons\py.ico" KeyPath="yes" />
</Component>
<Component Id="pyc.ico" Directory="DLLs" Guid="*">
<File Name="pyc.ico" Source="!(bindpath.src)PC\icons\pyc.ico" KeyPath="yes" />
</Component>
<Component Id="pyd.ico" Directory="DLLs" Guid="*">
<File Name="pyd.ico" Source="!(bindpath.src)PC\icons\pyd.ico" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{4A1F7045-8EE2-4276-ABB8-5E0C40E5F38B}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>exe_pdb</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="exe_pdb.wxs" />
<Compile Include="exe_files.wxs" />
<Compile Include="exe_reg.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
<ComponentGroupRef Id="exe_python_symbols" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PropertyRef Id="ROOTREGISTRYKEY" />
<PropertyRef Id="REGISTRYKEY" />
<ComponentGroup Id="exe_reg">
<Component Id="CommonPythonRegistration" Directory="InstallDirectory" Guid="$(var.CommonPythonRegComponentGuid)">
<RegistryKey Root="HKMU" Key="[ROOTREGISTRYKEY]">
<RegistryValue Name="DisplayName" Type="string" Value="!(loc.Manufacturer)" KeyPath="yes" />
<RegistryValue Name="SupportUrl" Type="string" Value="!(loc.ManufacturerSupportUrl)" KeyPath="no" />
</RegistryKey>
</Component>
<Component Id="PythonRegistration" Directory="InstallDirectory" Guid="$(var.PythonRegComponentGuid)">
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Name="DisplayName" Type="string" Value="!(loc.ShortcutName)" KeyPath="yes" />
<RegistryValue Name="SupportUrl" Type="string" Value="!(loc.SupportUrl)" KeyPath="no" />
<RegistryValue Name="Version" Type="string" Value="$(var.LongVersion)" KeyPath="no" />
<RegistryValue Name="SysVersion" Type="string" Value="$(var.ShortVersion)" KeyPath="no" />
<RegistryValue Name="SysArchitecture" Type="string" Value="$(var.PlatformArchitecture)" KeyPath="no" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,27 @@
import hashlib
import os
import sys
def main():
filenames, hashes, sizes = [], [], []
for file in sys.argv[1:]:
if not os.path.isfile(file):
continue
with open(file, 'rb') as f:
data = f.read()
md5 = hashlib.md5()
md5.update(data)
filenames.append(os.path.split(file)[1])
hashes.append(md5.hexdigest())
sizes.append(str(len(data)))
print('{:40s} {:<32s} {:<9s}'.format('File', 'MD5', 'Size'))
for f, h, s in zip(filenames, hashes, sizes):
print('{:40s} {:>32s} {:>9s}'.format(f, h, s))
if __name__ == "__main__":
sys.exit(int(main() or 0))

View file

@ -0,0 +1,91 @@
@echo off
setlocal
rem Simple script to fetch source for external libraries
set HERE=%~dp0
if "%PCBUILD%"=="" (set PCBUILD=%HERE%..\..\PCbuild\)
if "%EXTERNALS_DIR%"=="" (set EXTERNALS_DIR=%HERE%..\..\externals\windows-installer)
if "%NUGET%"=="" (set NUGET=%EXTERNALS_DIR%\..\nuget.exe)
if "%NUGET_URL%"=="" (set NUGET_URL=https://aka.ms/nugetclidl)
set DO_FETCH=true
set DO_CLEAN=false
:CheckOpts
if "%~1"=="--python" (set PYTHON=%2) & shift & shift & goto CheckOpts
if "%~1"=="--organization" (set ORG=%2) & shift & shift & goto CheckOpts
if "%~1"=="-c" (set DO_CLEAN=true) & shift & goto CheckOpts
if "%~1"=="--clean" (set DO_CLEAN=true) & shift & goto CheckOpts
if "%~1"=="--clean-only" (set DO_FETCH=false) & goto clean
if "x%~1" NEQ "x" goto usage
if "%DO_CLEAN%"=="false" goto fetch
:clean
echo.Cleaning up external libraries.
if exist "%EXTERNALS_DIR%" (
rem Sometimes this fails the first time; try it twice
rmdir /s /q "%EXTERNALS_DIR%" || rmdir /s /q "%EXTERNALS_DIR%"
)
if "%DO_FETCH%"=="false" goto end
:fetch
if "%ORG%"=="" (set ORG=python)
call "%PCBUILD%\find_python.bat" "%PYTHON%"
echo.Fetching external libraries...
set libraries=
for %%e in (%libraries%) do (
if exist "%EXTERNALS_DIR%\%%e" (
echo.%%e already exists, skipping.
) else (
echo.Fetching %%e...
%PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -O %ORG% %%e
)
)
echo.Fetching external tools...
set binaries=
rem We always use whatever's latest in the repo for these
set binaries=%binaries% binutils
set binaries=%binaries% gpg
set binaries=%binaries% htmlhelp
set binaries=%binaries% nuget
set binaries=%binaries% redist
set binaries=%binaries% wix
for %%b in (%binaries%) do (
if exist "%EXTERNALS_DIR%\%%b" (
echo.%%b already exists, skipping.
) else (
echo.Fetching %%b...
%PYTHON% "%PCBUILD%get_external.py" -e "%EXTERNALS_DIR%" -b -O %ORG% %%b
)
)
echo Finished.
goto end
:usage
echo.Valid options: -c, --clean, --clean-only, --organization, --python,
echo.--no-tkinter, --no-openssl
echo.
echo.Pull all sources and binaries necessary for compiling optional extension
echo.modules that rely on external libraries.
echo.
echo.The --organization option determines which github organization to download
echo.from, the --python option determines which Python 3.6+ interpreter to use
echo.with PCbuild\get_external.py.
echo.
echo.Use the -c or --clean option to remove the entire externals directory.
echo.
echo.Use the --clean-only option to do the same cleaning, without pulling in
echo.anything new.
echo.
exit /b -1
:end

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{921CF0E6-AEBC-4376-BA1D-CD46EBFE6DA5}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>launcher</OutputName>
<OutputType>Package</OutputType>
<DefineConstants>UpgradeCode=1B68A0EC-4DD3-5134-840E-73854B0863F1;SuppressUpgradeTable=1;$(DefineConstants)</DefineConstants>
<IgnoreCommonWxlTemplates>true</IgnoreCommonWxlTemplates>
<SuppressICEs>ICE80</SuppressICEs>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="launcher.wxs" />
<Compile Include="launcher_files.wxs" />
<Compile Include="launcher_reg.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Target Name="_EnsurePyEx86" Condition="!Exists('$(BuildPath32)py.exe')" BeforeTargets="PrepareForBuild">
<MSBuild Projects="$(PySourcePath)PCBuild\pylauncher.vcxproj" Properties="Platform=Win32" />
</Target>
<Target Name="_EnsurePywEx86" Condition="!Exists('$(BuildPath32)pyw.exe')" BeforeTargets="PrepareForBuild">
<MSBuild Projects="$(PySourcePath)PCBuild\pywlauncher.vcxproj" Properties="Platform=Win32" />
</Target>
<Target Name="_EnsurePyShellExt86" Condition="!Exists('$(BuildPath32)pyshellext.dll')" BeforeTargets="PrepareForBuild">
<MSBuild Projects="$(PySourcePath)PCBuild\pyshellext.vcxproj" Properties="Platform=Win32" />
</Target>
<Target Name="_EnsurePyShellExt64" Condition="!Exists('$(BuildPath64)pyshellext.dll')" BeforeTargets="PrepareForBuild">
<MSBuild Projects="$(PySourcePath)PCBuild\pyshellext.vcxproj" Properties="Platform=x64" />
</Target>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<Property Id="Suppress_TARGETDIR_Check" Value="1" />
<Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\launcher.ico" />
<Property Id="ARPPRODUCTICON" Value="ARPIcon" />
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="launcher_exe" Primary="yes" />
</Feature>
<Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="launcher_exe" />
<ComponentGroupRef Id="launcher_reg" />
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="LauncherInstallDirectory" />
</Directory>
<CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
<CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
<InstallExecuteSequence>
<Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
<Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
<RemoveExistingProducts After="InstallValidate">UPGRADE or REMOVE_350_LAUNCHER or REMOVE_360A1_LAUNCHER</RemoveExistingProducts>
</InstallExecuteSequence>
<!-- Upgrade all versions of the launcher -->
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" />
<UpgradeVersion Property="UPGRADE" Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
</Upgrade>
<!-- Python 3.5.0 shipped with a different UpgradeCode -->
<Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
<UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_350_LAUNCHER" />
</Upgrade>
<!-- Python 3.6.0a1 shipped with a different UpgradeCode -->
<Upgrade Id="394750C0-7880-5A8F-999F-933965FBCFB4">
<UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_360A1_LAUNCHER" />
</Upgrade>
</Product>
</Wix>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="LCID">1033</String>
<String Id="Culture">en-us</String>
<String Id="ProductName">Python Launcher</String>
<String Id="Title">Python Launcher</String>
<String Id="Description">Python Launcher</String>
<String Id="Manufacturer">Python Software Foundation</String>
<String Id="NoDowngrade">A newer version of the Python launcher is already installed.</String>
<String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
<String Id="PythonFileDescription">Python File</String>
<String Id="PythonNoConFileDescription">Python File (no console)</String>
<String Id="PythonCompiledFileDescription">Compiled Python File</String>
<String Id="PythonExtensionDescription">Python Extension Module</String>
<String Id="PythonArchiveFileDescription">Python Zip Application File</String>
<String Id="PythonNoConArchiveFileDescription">Python Zip Application File (no console)</String>
</WixLocalization>

View file

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="launcher_exe">
<Component Id="py.exe" Directory="LauncherInstallDirectory" Guid="{B5107402-6958-461B-8B0A-4037D3327160}">
<File Id="py.exe" Name="py.exe" Source="py.exe" KeyPath="yes" />
<RegistryValue Root="HKMU" Key="Software\Python\PyLauncher" Value="[#py.exe]" Type="string" />
</Component>
<Component Id="pyw.exe" Directory="LauncherInstallDirectory" Guid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}">
<File Id="pyw.exe" Name="pyw.exe" Source="pyw.exe" KeyPath="yes" />
</Component>
<Component Id="launcher_path_cu" Directory="LauncherInstallDirectory" Guid="{95AEB930-367C-475C-A17E-A89BFCD4C670}">
<Condition>NOT ALLUSERS=1</Condition>
<RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
<Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[LauncherInstallDirectory]" />
</Component>
<Component Id="launcher_path_lm" Directory="LauncherInstallDirectory" Guid="{4A41C365-4E27-4D38-A6D1-4A01B4A6500C}">
<Condition>ALLUSERS=1</Condition>
<RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
</Component>
<Component Id="pyshellext_amd64.dll" Directory="LauncherInstallDirectory" Guid="{E7411EFD-F1DD-40EB-B0C7-4BA02BF3E75F}" Win64="yes">
<Condition>VersionNT64</Condition>
<File Id="pyshellext_amd64.dll" Name="pyshellext.amd64.dll" Source="!(bindpath.Build64)\pyshellext.dll">
<Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
</File>
</Component>
<Component Id="pyshellext_win32.dll" Directory="LauncherInstallDirectory" Guid="{C5936696-9A5A-45A0-A830-D172C3329282}">
<Condition>NOT VersionNT64</Condition>
<File Id="pyshellext_win32.dll" Name="pyshellext.win32.dll" Source="!(bindpath.Build32)\pyshellext.dll">
<Class Id="{BEA218D2-6950-497B-9434-61683EC065FE}" Advertise="no" Context="InprocServer32" ThreadingModel="apartment" />
</File>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="launcher_reg">
<Component Id="file_association" Directory="LauncherInstallDirectory" Guid="{5AF84D9A-D820-456B-B230-6E0105A50276}">
<RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
<ProgId Id="Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
<Extension Id="py" ContentType="text/plain">
<Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
</Extension>
</ProgId>
<RegistryValue Root="HKCR" Key="Python.File\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
<ProgId Id="Python.NoConFile" Description="!(loc.PythonNoConFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
<Extension Id="pyw" ContentType="text/plain">
<Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
</Extension>
</ProgId>
<RegistryValue Root="HKCR" Key="Python.NoConFile\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
<ProgId Id="Python.CompiledFile" Description="!(loc.PythonCompiledFileDescription)" Advertise="no" Icon="py.exe" IconIndex="2">
<Extension Id="pyc">
<Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
</Extension>
<Extension Id="pyo" />
</ProgId>
<RegistryValue Root="HKCR" Key="Python.CompiledFile\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
<ProgId Id="Python.Extension" Description="!(loc.PythonExtensionDescription)" Advertise="no" Icon="py.exe" IconIndex="3">
<Extension Id="pyd" />
</ProgId>
<ProgId Id="Python.ArchiveFile" Description="!(loc.PythonArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="5">
<Extension Id="pyz" ContentType="application/x-zip-compressed">
<Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
</Extension>
</ProgId>
<RegistryValue Root="HKCR" Key="Python.ArchiveFile\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
<ProgId Id="Python.NoConArchiveFile" Description="!(loc.PythonNoConArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="5">
<Extension Id="pyzw" ContentType="application/x-zip-compressed">
<Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
</Extension>
</ProgId>
<RegistryValue Root="HKCR" Key="Python.NoConArchiveFile\shellex\DropHandler" Value="{BEA218D2-6950-497B-9434-61683EC065FE}" Type="string" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{11367E76-3337-4602-8F1E-77DB4F370D7E}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>lib</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="lib.wxs" />
<Compile Include="lib_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<ItemGroup>
<ExcludeFolders Include="Lib\test;Lib\tests;Lib\tkinter;Lib\idlelib;Lib\turtledemo" />
<InstallFiles Include="$(PySourcePath)Lib\**\*"
Exclude="$(PySourcePath)Lib\**\*.pyc;
$(PySourcePath)Lib\**\*.pyo;
$(PySourcePath)Lib\site-packages\README;
@(ExcludeFolders->'$(PySourcePath)%(Identity)\*');
@(ExcludeFolders->'$(PySourcePath)%(Identity)\**\*')">
<SourceBase>$(PySourcePath)Lib</SourceBase>
<Source>!(bindpath.src)Lib\</Source>
<TargetBase>$(PySourcePath)Lib</TargetBase>
<Target_>Lib\</Target_>
<Group>lib_py</Group>
<IncludeInCat>true</IncludeInCat>
</InstallFiles>
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="lib_py" />
<ComponentGroupRef Id="lib_files" />
<ComponentGroupRef Id="lib_extensions" />
<ComponentGroupRef Id="lib_cat" />
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{6C443CD3-8258-4335-BA03-49DA9C34CE4D}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>lib_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="lib_d.wxs" />
<Compile Include="lib_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="lib_extensions_d" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Standard Library</String>
<String Id="ShortDescriptor">lib</String>
</WixLocalization>

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_msi;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_distutils_findvs ?>
<Fragment>
<ComponentGroup Id="lib_extensions">
<?foreach ext in $(var.exts)?>
<Component Id="$(var.ext).pyd" Directory="DLLs" Guid="*">
<File Name="$(var.ext).pyd" KeyPath="yes" />
</Component>
<?endforeach ?>
<Component Id="sqlite3.dll" Directory="DLLs" Guid="*">
<File Name="sqlite3.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="lib_extensions_symbols">
<?foreach ext in $(var.exts)?>
<Component Id="$(var.ext).pdb" Directory="DLLs" Guid="*">
<File Name="$(var.ext).pdb" />
</Component>
<?endforeach ?>
<Component Id="sqlite3.pdb" Directory="DLLs" Guid="*">
<File Name="sqlite3.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="lib_extensions_d">
<?foreach ext in $(var.exts)?>
<Component Id="$(var.ext)_d.pyd" Directory="DLLs" Guid="*">
<File Name="$(var.ext)_d.pyd" />
</Component>
<Component Id="$(var.ext)_d.pdb" Directory="DLLs" Guid="*">
<File Name="$(var.ext)_d.pdb" />
</Component>
<?endforeach ?>
<Component Id="sqlite3_d.dll" Directory="DLLs" Guid="*">
<File Name="sqlite3_d.dll" KeyPath="yes" />
</Component>
<Component Id="sqlite3_d.pdb" Directory="DLLs" Guid="*">
<File Name="sqlite3_d.pdb" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<PropertyRef Id="REGISTRYKEY" />
<ComponentGroup Id="lib_files">
<Component Id="PythonPathRegistry" Directory="Lib" Guid="*">
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
<RegistryValue Key="PythonPath" Type="string" Value="[Lib];[DLLs]" />
</RegistryKey>
</Component>
<Component Id="Lib2to3_pickle_remove" Directory="Lib_lib2to3" Guid="$(var.RemoveLib2to3PickleComponentGuid)">
<RemoveFile Id="Lib2to3_pickle_remove_files" Name="*.pickle" On="uninstall" />
<RemoveFolder Id="Lib2to3_pickle_remove_folder" On="uninstall" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="lib_cat">
<Component Id="lib_cat" Directory="Catalogs" Guid="*">
<File Name="python_lib.cat" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{5E0BCE93-D1AC-4591-BBCB-3A2BE5A4B3D1}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>lib_pdb</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="lib_pdb.wxs" />
<Compile Include="lib_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
<ComponentGroupRef Id="lib_extensions_symbols" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
<OutputName>python</OutputName>
<OutputSuffix></OutputSuffix>
<SupportSigning>false</SupportSigning>
</PropertyGroup>
<Import Project="msi.props" />
<PropertyGroup>
<SignOutput>false</SignOutput>
<TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
<TargetExt>.zip</TargetExt>
<TargetPath>$(OutputPath)\$(TargetName)$(TargetExt)</TargetPath>
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -b "$(BuildPath.TrimEnd(`\`))"</Arguments>
<Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>
<Environment>$(Environment)%0D%0Aset PYTHONPATH=$(PySourcePath)Lib</Environment>
<Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>
</PropertyGroup>
<Target Name="_Build">
<Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(CleanCommand)%0D%0A$(Arguments)" />
</Target>
<Target Name="AfterBuild" />
<Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
<Target Name="ShowHashes">
<ItemGroup>
<UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
</ItemGroup>
<Exec Command="&quot;$(PythonExe)&quot; generate_md5.py @(UserFiles->'&quot;%(FullPath)&quot;',' ')" />
</Target>
</Project>

252
third_party/python/Tools/msi/make_zip.py vendored Normal file
View file

@ -0,0 +1,252 @@
import argparse
import py_compile
import re
import sys
import shutil
import stat
import os
import tempfile
from itertools import chain
from pathlib import Path
from zipfile import ZipFile, ZIP_DEFLATED
import subprocess
TKTCL_RE = re.compile(r'^(_?tk|tcl).+\.(pyd|dll)', re.IGNORECASE)
DEBUG_RE = re.compile(r'_d\.(pyd|dll|exe|pdb|lib)$', re.IGNORECASE)
PYTHON_DLL_RE = re.compile(r'python\d\d?\.dll$', re.IGNORECASE)
DEBUG_FILES = {
'_ctypes_test',
'_testbuffer',
'_testcapi',
'_testconsole',
'_testimportmultiple',
'_testmultiphase',
'xxlimited',
'python3_dstub',
}
EXCLUDE_FROM_LIBRARY = {
'__pycache__',
'idlelib',
'pydoc_data',
'site-packages',
'tkinter',
'turtledemo',
}
EXCLUDE_FROM_EMBEDDABLE_LIBRARY = {
'ensurepip',
'venv',
}
EXCLUDE_FILE_FROM_LIBRARY = {
'bdist_wininst.py',
}
EXCLUDE_FILE_FROM_LIBS = {
'liblzma',
'ssleay',
'libeay',
'python3stub',
}
EXCLUDED_FILES = {
'pyshellext',
}
def is_not_debug(p):
if DEBUG_RE.search(p.name):
return False
if TKTCL_RE.search(p.name):
return False
return p.stem.lower() not in DEBUG_FILES and p.stem.lower() not in EXCLUDED_FILES
def is_not_debug_or_python(p):
return is_not_debug(p) and not PYTHON_DLL_RE.search(p.name)
def include_in_lib(p):
name = p.name.lower()
if p.is_dir():
if name in EXCLUDE_FROM_LIBRARY:
return False
if name == 'test' and p.parts[-2].lower() == 'lib':
return False
if name in {'test', 'tests'} and p.parts[-3].lower() == 'lib':
return False
return True
if name in EXCLUDE_FILE_FROM_LIBRARY:
return False
suffix = p.suffix.lower()
return suffix not in {'.pyc', '.pyo', '.exe'}
def include_in_embeddable_lib(p):
if p.is_dir() and p.name.lower() in EXCLUDE_FROM_EMBEDDABLE_LIBRARY:
return False
return include_in_lib(p)
def include_in_libs(p):
if not is_not_debug(p):
return False
return p.stem.lower() not in EXCLUDE_FILE_FROM_LIBS
def include_in_tools(p):
if p.is_dir() and p.name.lower() in {'scripts', 'i18n', 'pynche', 'demo', 'parser'}:
return True
return p.suffix.lower() in {'.py', '.pyw', '.txt'}
BASE_NAME = 'python{0.major}{0.minor}'.format(sys.version_info)
FULL_LAYOUT = [
('/', '$build', 'python.exe', is_not_debug),
('/', '$build', 'pythonw.exe', is_not_debug),
('/', '$build', 'python{}.dll'.format(sys.version_info.major), is_not_debug),
('/', '$build', '{}.dll'.format(BASE_NAME), is_not_debug),
('DLLs/', '$build', '*.pyd', is_not_debug),
('DLLs/', '$build', '*.dll', is_not_debug_or_python),
('include/', 'include', '*.h', None),
('include/', 'PC', 'pyconfig.h', None),
('Lib/', 'Lib', '**/*', include_in_lib),
('libs/', '$build', '*.lib', include_in_libs),
('Tools/', 'Tools', '**/*', include_in_tools),
]
EMBED_LAYOUT = [
('/', '$build', 'python*.exe', is_not_debug),
('/', '$build', '*.pyd', is_not_debug),
('/', '$build', '*.dll', is_not_debug),
('{}.zip'.format(BASE_NAME), 'Lib', '**/*', include_in_embeddable_lib),
]
if os.getenv('DOC_FILENAME'):
FULL_LAYOUT.append(('Doc/', 'Doc/build/htmlhelp', os.getenv('DOC_FILENAME'), None))
if os.getenv('VCREDIST_PATH'):
FULL_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
EMBED_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
def copy_to_layout(target, rel_sources):
count = 0
if target.suffix.lower() == '.zip':
if target.exists():
target.unlink()
with ZipFile(str(target), 'w', ZIP_DEFLATED) as f:
with tempfile.TemporaryDirectory() as tmpdir:
for s, rel in rel_sources:
if rel.suffix.lower() == '.py':
pyc = Path(tmpdir) / rel.with_suffix('.pyc').name
try:
py_compile.compile(str(s), str(pyc), str(rel), doraise=True, optimize=2)
except py_compile.PyCompileError:
f.write(str(s), str(rel))
else:
f.write(str(pyc), str(rel.with_suffix('.pyc')))
else:
f.write(str(s), str(rel))
count += 1
else:
for s, rel in rel_sources:
dest = target / rel
try:
dest.parent.mkdir(parents=True)
except FileExistsError:
pass
if dest.is_file():
dest.chmod(stat.S_IWRITE)
shutil.copy(str(s), str(dest))
if dest.is_file():
dest.chmod(stat.S_IWRITE)
count += 1
return count
def rglob(root, pattern, condition):
dirs = [root]
recurse = pattern[:3] in {'**/', '**\\'}
while dirs:
d = dirs.pop(0)
for f in d.glob(pattern[3:] if recurse else pattern):
if recurse and f.is_dir() and (not condition or condition(f)):
dirs.append(f)
elif f.is_file() and (not condition or condition(f)):
yield f, f.relative_to(root)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
parser.add_argument('-o', '--out', metavar='file', help='The name of the output archive', type=Path, default=None)
parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
parser.add_argument('-b', '--build', help='Specify the build directory', type=Path, default=None)
ns = parser.parse_args()
source = ns.source or (Path(__file__).resolve().parent.parent.parent)
out = ns.out
build = ns.build or Path(sys.exec_prefix)
assert isinstance(source, Path)
assert not out or isinstance(out, Path)
assert isinstance(build, Path)
if ns.temp:
temp = ns.temp
delete_temp = False
else:
temp = Path(tempfile.mkdtemp())
delete_temp = True
if out:
try:
out.parent.mkdir(parents=True)
except FileExistsError:
pass
try:
temp.mkdir(parents=True)
except FileExistsError:
pass
layout = EMBED_LAYOUT if ns.embed else FULL_LAYOUT
try:
for t, s, p, c in layout:
if s == '$build':
fs = build
else:
fs = source / s
files = rglob(fs, p, c)
extra_files = []
if s == 'Lib' and p == '**/*':
extra_files.append((
source / 'tools' / 'msi' / 'distutils.command.bdist_wininst.py',
Path('distutils') / 'command' / 'bdist_wininst.py'
))
copied = copy_to_layout(temp / t.rstrip('/'), chain(files, extra_files))
print('Copied {} files'.format(copied))
if ns.embed:
with open(str(temp / (BASE_NAME + '._pth')), 'w') as f:
print(BASE_NAME + '.zip', file=f)
print('.', file=f)
print('', file=f)
print('# Uncomment to run site.main() automatically', file=f)
print('#import site', file=f)
if out:
total = copy_to_layout(out, rglob(temp, '**/*', None))
print('Wrote {} files to {}'.format(total, out))
finally:
if delete_temp:
shutil.rmtree(temp, True)
if __name__ == "__main__":
sys.exit(int(main() or 0))

188
third_party/python/Tools/msi/msi.props vendored Normal file
View file

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">
<PropertyGroup>
<TargetName>$(OutputName)</TargetName>
<DefineSolutionProperties>false</DefineSolutionProperties>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces>
<CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings>
<BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease>
<SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<Platform Condition="'$(Platform)' == ''">x86</Platform>
<InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope>
<_MakeCatCommand Condition="'$(_MakeCatCommand)' == ''">makecat</_MakeCatCommand>
</PropertyGroup>
<Import Project="wix.props" />
<Import Project="..\..\PCBuild\tcltk.props" />
<PropertyGroup>
<!--
This URI is used to generate the various GUIDs used by the installer.
Installers built with the same URI will upgrade each other or block
when attempting to downgrade.
By default, this is the local computer name, which will produce
installers that do not interfere with other installers. Products
that intend to bundle Python should rebuild these modules with their
own URI to avoid conflicting with the official releases.
The official releases use "http://www.python.org/$(ArchName)"
This is not the same as the DownloadUrl property used in the bundle
projects.
-->
<ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri>
<ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
<WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
<WixExtension Include="WixUtilExtension">
<HintPath>WixUtilExtension</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
</ItemGroup>
<PropertyGroup>
<IntermediateOutputPath>$(Py_IntDir)\$(MajorVersionNumber)$(MinorVersionNumber)$(ArchName)_$(Configuration)\msi_$(OutputName)</IntermediateOutputPath>
<IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
<OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<ReuseCabinetCache>true</ReuseCabinetCache>
<CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist>
<CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>
<DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
<InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>
</PropertyGroup>
<PropertyGroup Condition="!$(BuildForRelease)">
<RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
<PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>
<InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>
</PropertyGroup>
<PropertyGroup>
<Bitness>32-bit</Bitness>
<Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
<PlatformArchitecture>32bit</PlatformArchitecture>
<PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture>
<DefineConstants>
$(DefineConstants);
Version=$(InstallerVersion);
ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);
LongVersion=$(PythonVersion);
MajorVersionNumber=$(MajorVersionNumber);
MinorVersionNumber=$(MinorVersionNumber);
UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
Bitness=$(Bitness);
PlatformArchitecture=$(PlatformArchitecture);
PyDebugExt=$(PyDebugExt);
PyArchExt=$(PyArchExt);
PyTestExt=$(PyTestExt);
OptionalFeatureName=$(OutputName);
</DefineConstants>
<DefineConstants Condition="'$(CRTRedist)' != ''">
$(DefineConstants);CRTRedist=$(CRTRedist);
</DefineConstants>
<DefineConstants Condition="$(Platform) != 'x64'">
$(DefineConstants);Suffix32=-32;
</DefineConstants>
<DefineConstants Condition="$(Platform) == 'x64'">
$(DefineConstants);Suffix32=;
</DefineConstants>
</PropertyGroup>
<ItemDefinitionGroup>
<InstallFiles>
<Group>generated_filelist</Group>
<Condition></Condition>
<DiskId></DiskId>
<IncludeInCat>false</IncludeInCat>
</InstallFiles>
<LinkerBindInputPaths>
<Visible>false</Visible>
</LinkerBindInputPaths>
</ItemDefinitionGroup>
<ItemGroup>
<LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">
<BindName></BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">
<BindName></BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(PySourcePath)">
<BindName>src</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(tcltkDir)">
<BindName>tcltk</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">
<BindName>redist</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
<BindName>redist</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(BuildPath32)">
<BindName>build32</BindName>
</LinkerBindInputPaths>
<LinkerBindInputPaths Include="$(BuildPath64)">
<BindName>build64</BindName>
</LinkerBindInputPaths>
</ItemGroup>
<Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
<Error Text="Platform '$(Platform)' is not supported. Use 'x86' or 'x64'." Condition="$(Platform) != 'x86' and $(Platform) != 'x64'" />
</Target>
<ItemGroup>
<_Uuid Include="CoreUpgradeCode">
<Uri>upgradecode</Uri>
</_Uuid>
<_Uuid Include="UpgradeCode">
<Uri>upgradecode/$(OutputName)</Uri>
</_Uuid>
<_Uuid Include="InstallDirectoryGuidSeed">
<Uri>installdirectoryseed</Uri>
</_Uuid>
<_Uuid Include="PythonExeComponentGuid">
<Uri>python.exe</Uri>
</_Uuid>
<_Uuid Include="PythonwExeComponentGuid">
<Uri>pythonw.exe</Uri>
</_Uuid>
<_Uuid Include="RemoveLib2to3PickleComponentGuid">
<Uri>lib2to3/pickles</Uri>
</_Uuid>
<_Uuid Include="CommonPythonRegComponentGuid">
<Uri>registry</Uri>
</_Uuid>
<_Uuid Include="PythonRegComponentGuid">
<Uri>registry/$(OutputName)</Uri>
</_Uuid>
</ItemGroup>
<Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
<PropertyGroup>
<_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
<_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
</PropertyGroup>
<Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" &gt; "$(IntermediateOutputPath)$(OutputName)guids.txt"'
WorkingDirectory="$(MSBuildThisFileDirectory)"
IgnoreExitCode="false" />
<ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
<Output TaskParameter="Lines" ItemName="_UuidValue" />
</ReadLinesFromFile>
<PropertyGroup>
<DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
</PropertyGroup>
</Target>
</Project>

View file

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ProcessInstallFiles" AfterTargets="PrepareForBuild" Condition="@(InstallFiles) != ''">
<PropertyGroup>
<_FileListTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.csv</_FileListTarget>
<_InstallFilesTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.wxs</_InstallFilesTarget>
</PropertyGroup>
<ItemGroup>
<InstallFiles>
<_Source>%(Source)$([msbuild]::MakeRelative(%(SourceBase), %(FullPath)))</_Source>
<_Target>%(Target_)$([msbuild]::MakeRelative(%(TargetBase), %(FullPath)))</_Target>
</InstallFiles>
<_CatalogFiles Include="@(InstallFiles)" Condition="%(InstallFiles.IncludeInCat) and ''!=$([System.IO.File]::ReadAllText(%(InstallFiles.FullPath)))" />
</ItemGroup>
<WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'&quot;%(_Source)&quot;,&quot;%(_Target)&quot;,&quot;%(Group)&quot;,&quot;%(DiskId)&quot;,&quot;%(Condition)&quot;')" Overwrite="true" />
<Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"'
WorkingDirectory="$(MSBuildThisFileDirectory)" />
<ItemGroup>
<FileWrites Include="$(_FileListTarget);$(_InstallFilesTarget)" />
<Compile Include="$(_InstallFilesTarget)" />
</ItemGroup>
</Target>
<Target Name="GenerateCatalog" AfterTargets="ProcessInstallFiles" Condition="'@(_CatalogFiles)' != ''">
<PropertyGroup>
<_CatFileSourceTarget>$(IntermediateOutputPath)$(MSBuildProjectName).cdf</_CatFileSourceTarget>
<_CatFileTarget>$(IntermediateOutputPath)python_$(MSBuildProjectName).cat</_CatFileTarget>
<_CatFile>[CatalogHeader]
Name=$([System.IO.Path]::GetFileName($(_CatFileTarget)))
ResultDir=$([System.IO.Path]::GetDirectoryName($(_CatFileTarget)))
PublicVersion=1
CatalogVersion=2
HashAlgorithms=SHA256
PageHashes=false
EncodingType=
[CatalogFiles]
@(_CatalogFiles->'&lt;HASH&gt;%(Filename)%(Extension)=%(FullPath)','
')
</_CatFile>
</PropertyGroup>
<WriteLinesToFile File="$(_CatFileSourceTarget)" Lines="$(_CatFile)" Overwrite="true" />
<Exec Command='$(_MakeCatCommand) "$(_CatFileSourceTarget)"' WorkingDirectory="$(MSBuildThisFileDirectory)" />
<Exec Command='$(_SignCommand) "$(_CatFileTarget)"' WorkingDirectory="$(MSBuildThisFileDirectory)"
Condition="Exists($(_CatFileTarget)) and '$(_SignCommand)' != ''" />
<ItemGroup>
<FileWrites Include="$(_CatFileSourceTarget);$(_CatFileTarget)" />
</ItemGroup>
</Target>
<Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
<PropertyGroup Condition="'@(WxlTemplate)' != ''">
<_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
<_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
</PropertyGroup>
<WriteLinesToFile File="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl"
Lines="$(_Content)"
Overwrite="true"
Condition="$(_Content) != $(_ExistingContent)" />
<ItemGroup Condition="'@(WxlTemplate)' != ''">
<EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
<FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
</ItemGroup>
</Target>
<Import Project="$(WixTargetsPath)" />
<Target Name="SignCabs">
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command="$(_SignCommand) @(SignCabs->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
</Target>
<Target Name="SignMsi">
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command="$(_SignCommand) @(SignMsi->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
</Target>
<Target Name="SignBundleEngine">
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command="$(_SignCommand) @(SignBundleEngine->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
</Target>
<Target Name="SignBundle">
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command="$(_SignCommand) @(SignBundle->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
</Target>
</Project>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{91C99298-8E2E-4422-A5AF-CC4FFF9A58D3}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>path</OutputName>
<OutputType>Package</OutputType>
<SuppressIces>ICE71</SuppressIces>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="*.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<Component Id="PrependPath_CU" Directory="InstallDirectory" Guid="*">
<Condition>NOT ALLUSERS=1</Condition>
<RegistryKey Root="HKCU" Key="[REGISTRYKEY]">
<RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
</RegistryKey>
<CreateFolder Directory="Scripts" />
<RemoveFolder Id="Remove_Scripts_CU" Directory="Scripts" On="uninstall" />
<Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" />
<Environment Id="SCRIPTS_PATH_CU" Action="set" Name="PATH" Part="first" Value="[Scripts]" />
</Component>
<Component Id="PrependPath_LM" Directory="InstallDirectory" Guid="*">
<Condition>ALLUSERS=1</Condition>
<RegistryKey Root="HKLM" Key="[REGISTRYKEY]">
<RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
</RegistryKey>
<CreateFolder Directory="Scripts" />
<RemoveFolder Id="Remove_Scripts_LM" Directory="Scripts" On="uninstall" />
<Environment Id="PATH_LM" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" System="yes" />
<Environment Id="SCRIPTS_PATH_LM" Action="set" Name="PATH" Part="first" Value="[Scripts]" System="yes" />
<Environment Id="PY_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PY" System="yes" />
<Environment Id="PYW_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PYW" System="yes" />
</Component>
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Add to Path</String>
<String Id="ShortDescriptor">Path</String>
<String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
</WixLocalization>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{91C99298-8E2E-4422-A5AF-CC4FFF9A58D3}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>pip</OutputName>
<OutputType>Package</OutputType>
<SuppressIces>ICE71</SuppressIces>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="*.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Property Id="PYTHON_EXE" Secure="yes">
<ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
<FileSearch Name="python.exe" />
</ComponentSearch>
</Property>
<Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentRef Id="OptionalFeature" />
</Feature>
<?if $(var.Platform)~="x64" ?>
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
<?else ?>
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
<?endif ?>
<!-- Install/uninstall pip -->
<CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
<CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
<InstallExecuteSequence>
<Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
<Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
<Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
</InstallExecuteSequence>
</Product>
</Wix>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">pip Bootstrap</String>
<String Id="ShortDescriptor">pip</String>
<String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
</WixLocalization>

74
third_party/python/Tools/msi/purge.py vendored Normal file
View file

@ -0,0 +1,74 @@
# Purges the Fastly cache for Windows download files
#
# Usage:
# py -3 purge.py 3.5.1rc1
#
__author__ = 'Steve Dower <steve.dower@python.org>'
__version__ = '1.0.0'
import re
import sys
from urllib.request import *
VERSION_RE = re.compile(r'(\d+\.\d+\.\d+)(\w+\d+)?$')
try:
m = VERSION_RE.match(sys.argv[1])
if not m:
print('Invalid version:', sys.argv[1])
print('Expected something like "3.5.1rc1"')
sys.exit(1)
except LookupError:
print('Missing version argument. Expected something like "3.5.1rc1"')
sys.exit(1)
URL = "https://www.python.org/ftp/python/{}/".format(m.group(1))
REL = m.group(2) or ''
FILES = [
"core.msi",
"core_d.msi",
"core_pdb.msi",
"dev.msi",
"dev_d.msi",
"doc.msi",
"exe.msi",
"exe_d.msi",
"exe_pdb.msi",
"launcher.msi",
"lib.msi",
"lib_d.msi",
"lib_pdb.msi",
"path.msi",
"pip.msi",
"tcltk.msi",
"tcltk_d.msi",
"tcltk_pdb.msi",
"test.msi",
"test_d.msi",
"test_pdb.msi",
"tools.msi",
"Windows6.0-KB2999226-x64.msu",
"Windows6.0-KB2999226-x86.msu",
"Windows6.1-KB2999226-x64.msu",
"Windows6.1-KB2999226-x86.msu",
"Windows8.1-KB2999226-x64.msu",
"Windows8.1-KB2999226-x86.msu",
"Windows8-RT-KB2999226-x64.msu",
"Windows8-RT-KB2999226-x86.msu",
]
PATHS = [
"python-{}.exe".format(m.group(0)),
"python-{}-webinstall.exe".format(m.group(0)),
"python-{}-amd64.exe".format(m.group(0)),
"python-{}-amd64-webinstall.exe".format(m.group(0)),
] + ["win32{}/{}".format(REL, f) for f in FILES] + ["amd64{}/{}".format(REL, f) for f in FILES]
print('Purged:')
for n in PATHS:
u = URL + n
with urlopen(Request(u, method='PURGE', headers={'Fastly-Soft-Purge': 1})) as r:
r.read()
print(' ', u)

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{DB350600-186C-4E52-BA98-26A7CECB067F}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>tcltk</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup>
<!-- Shortcut validation is not necessary -->
<SuppressICEs>ICE43</SuppressICEs>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="tcltk.wxs" />
<Compile Include="tcltk_files.wxs" />
<Compile Include="tcltk_reg.wxs" />
</ItemGroup>
<ItemGroup>
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<ItemGroup>
<InstallFiles Include="$(tcltkDir)bin\*.dll" Exclude="$(tcltkDir)bin\*g.dll">
<SourceBase>$(tcltkDir)</SourceBase>
<Source>!(bindpath.tcltk)</Source>
<TargetBase>$(tcltkDir)bin</TargetBase>
<Target_>DLLs\</Target_>
<Group>tcltk_dlls</Group>
</InstallFiles>
<InstallFiles Include="$(tcltkDir)lib\**\*">
<SourceBase>$(tcltkDir)</SourceBase>
<Source>!(bindpath.tcltk)</Source>
<TargetBase>$(tcltkDir)lib</TargetBase>
<Target_>tcl\</Target_>
<Group>tcltk_lib</Group>
</InstallFiles>
<InstallFiles Include="$(PySourcePath)Lib\tkinter\**\*;$(PySourcePath)Lib\idlelib\**\*;$(PySourcePath)Lib\turtledemo\**\*"
Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
<SourceBase>$(PySourcePath)</SourceBase>
<Source>!(bindpath.src)</Source>
<TargetBase>$(PySourcePath)</TargetBase>
<Target_></Target_>
<Group>tkinter_lib</Group>
</InstallFiles>
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Property Id="PYTHON_EXE" Secure="yes">
<ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
<FileSearch Name="python.exe" />
</ComponentSearch>
</Property>
<Property Id="PYTHONW_EXE" Secure="yes">
<ComponentSearch Id="PythonwExe" Guid="$(var.PythonwExeComponentGuid)">
<FileSearch Name="pythonw.exe" />
</ComponentSearch>
</Property>
<Condition Message="!(loc.NoPython)">PYTHON_EXE and PYTHONW_EXE</Condition>
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="tkinter_extension" />
<ComponentGroupRef Id="tcltk_dlls" />
<ComponentGroupRef Id="tcltk_lib" />
<ComponentGroupRef Id="tkinter_lib" Primary="yes" />
<Component Id="idle_reg" Directory="InstallDirectory">
<RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
</Component>
<ComponentRef Id="OptionalFeature" />
</Feature>
<Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="tkinter_lib" />
<ComponentGroupRef Id="idle_reg" />
</Feature>
<Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="tkinter_lib" />
<Component Id="idle_shortcut" Directory="MenuDir">
<RegistryValue Root="HKMU" Key="[REGISTRYKEY]\IdleShortcuts" Type="integer" Value="1" KeyPath="yes" />
<RemoveFolder Id="Remove_MenuDir" On="uninstall" />
<Shortcut Id="IDLE"
Directory="MenuDir"
Name="!(loc.ShortcutName)"
Description="!(loc.ShortcutDescription)"
Target="[PYTHONW_EXE]"
Arguments='"[#Lib_idlelib_idle.pyw]"'
Icon="idle.exe"
WorkingDirectory="InstallDirectory">
<Icon Id="idle.exe" SourceFile="!(bindpath.src)Lib\idlelib\Icons\idle.ico" />
</Shortcut>
<Shortcut Id="pydoc.py"
Target="[PYTHON_EXE]"
Arguments='-m pydoc -b'
Name="!(loc.PyDocShortcutName)"
Description="!(loc.PyDocShortcutDescription)"
Icon="idle.exe"
WorkingDirectory="InstallDirectory" />
</Component>
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{EDA1FA5A-E2AA-4EAF-B49B-87D981CD0F16}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>tcltk_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="tcltk_d.wxs" />
<Compile Include="tcltk_files.wxs" />
</ItemGroup>
<ItemGroup>
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<ItemGroup>
<InstallFiles Include="$(tcltkDir)bin\*g.dll">
<SourceBase>$(tcltkDir)</SourceBase>
<Source>!(bindpath.tcltk)</Source>
<TargetBase>$(tcltkDir)bin</TargetBase>
<Target_>DLLs\</Target_>
<Group>tcltk_dlls_d</Group>
</InstallFiles>
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="tkinter_extension_d" />
<ComponentGroupRef Id="tcltk_dlls_d" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Tcl/Tk Support</String>
<String Id="ShortDescriptor">tcltk</String>
<String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
<String Id="ShortcutName">IDLE (Python {{ShortVersion}} {{Bitness}})</String>
<String Id="ShortcutDescription">Launches IDLE, the interactive environment for !(loc.ProductName).</String>
<String Id="PyDocShortcutName">Python {{ShortVersion}} Module Docs ({{Bitness}})</String>
<String Id="PyDocShortcutDescription">Start the !(loc.ProductName) documentation server.</String>
<String Id="EditMenu">&amp;Edit with IDLE</String>
<String Id="EditSubMenu">Edit with IDLE {{ShortVersion}} ({{Bitness}})</String>
</WixLocalization>

View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="tkinter_extension">
<Component Id="_tkinter.pyd" Directory="DLLs" Guid="*">
<File Name="_tkinter.pyd" KeyPath="yes" />
</Component>
<Component Id="_tkinter.lib" Directory="libs" Guid="*">
<File Name="_tkinter.lib" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="tkinter_extension_symbols">
<Component Id="_tkinter.pdb" Directory="DLLs" Guid="*">
<File Name="_tkinter.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="tkinter_extension_d">
<Component Id="_tkinter_d.pyd" Directory="DLLs" Guid="*">
<File Name="_tkinter_d.pyd" />
</Component>
<Component Id="_tkinter_d.lib" Directory="DLLs" Guid="*">
<File Name="_tkinter_d.lib" />
</Component>
<Component Id="_tkinter_d.pdb" Directory="DLLs" Guid="*">
<File Name="_tkinter_d.pdb" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{02053AFA-1831-499A-B3EA-D8B223D3C40D}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>tcltk_pdb</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="tcltk_pdb.wxs" />
<Compile Include="tcltk_files.wxs" />
</ItemGroup>
<ItemGroup>
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
<ComponentGroupRef Id="tkinter_extension_symbols" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="idle_reg">
<!-- We fix the guid of the Subcommands key so that it is correctly reference counted -->
<Component Id="assoc_subcommands" Directory="InstallDirectory" Guid="{57D47B4C-96E6-40A0-A958-57083D74423F}">
<Condition>VersionNT > 600</Condition>
<RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
<RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
</Component>
<Component Id="assoc_subcommands_nocon" Directory="InstallDirectory" Guid="{07061D85-9151-4FC4-BB78-13628020D026}">
<Condition>VersionNT > 600</Condition>
<RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
<RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
</Component>
<Component Id="assoc_editwithidle" Directory="InstallDirectory">
<Condition>VersionNT > 600</Condition>
<RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
<RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
<RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
</RegistryKey>
</Component>
<Component Id="assoc_editwithidle_nocon" Directory="InstallDirectory">
<Condition>VersionNT > 600</Condition>
<RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
<RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
<RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
</RegistryKey>
</Component>
<Component Id="assoc_editwithidle_vista" Directory="InstallDirectory">
<Condition>VersionNT = 600</Condition>
<RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
<RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
<RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
</RegistryKey>
</Component>
<Component Id="assoc_editwithidle_nocon_vista" Directory="InstallDirectory">
<Condition>VersionNT = 600</Condition>
<RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
<RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
<RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{DE0B7CC2-4358-4131-B3F4-C31C7F2CD468}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>test</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="test.wxs" />
<Compile Include="test_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<ItemGroup>
<InstallFiles Include="$(PySourcePath)Lib\test\**\*"
Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
<SourceBase>$(PySourcePath)</SourceBase>
<Source>!(bindpath.src)</Source>
<TargetBase>$(PySourcePath)</TargetBase>
<Target_></Target_>
<Group>test_py</Group>
</InstallFiles>
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="test_py" />
<ComponentGroupRef Id="test_extensions" />
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{41F5AE8D-24CD-4D03-BE75-AA6F7FAB4097}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>test_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="test_d.wxs" />
<Compile Include="test_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="test_extensions_d" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Test Suite</String>
<String Id="ShortDescriptor">test</String>
<String Id="NativeModulesTitle">!(loc.FullProductName) native libtest</String>
<String Id="NativeModulesDescription">!(loc.ProductName) Native Test Modules</String>
</WixLocalization>

Some files were not shown because too many files have changed in this diff Show more