mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #23260: Update Windows installer
This commit is contained in:
parent
7425f36ee7
commit
bb24087a2c
133 changed files with 7036 additions and 4991 deletions
|
|
@ -1,21 +1,9 @@
|
|||
@rem Used by the buildbot "buildmsi" step.
|
||||
setlocal
|
||||
|
||||
set cwd=%CD%
|
||||
pushd
|
||||
|
||||
@rem build release versions of things
|
||||
call "%~dp0build.bat" -c Release
|
||||
@rem build both snapshot MSIs
|
||||
call "%~dp0..\msi\build.bat" -x86 -x64
|
||||
|
||||
@rem build the documentation
|
||||
call "%~dp0..\..\Doc\make.bat" htmlhelp
|
||||
|
||||
@rem build the MSI file
|
||||
call "%~dp0..\..\PCBuild\env.bat" x86
|
||||
cd "%~dp0..\..\PC"
|
||||
nmake /f icons.mak
|
||||
cd ..\Tools\msi
|
||||
del *.msi
|
||||
nmake /f msisupport.mak
|
||||
%HOST_PYTHON% msi.py
|
||||
|
||||
cd "%cwd%"
|
||||
popd
|
||||
|
|
@ -1,25 +1,488 @@
|
|||
Packaging Python as a Microsoft Installer Package (MSI)
|
||||
=======================================================
|
||||
Quick Build Info
|
||||
================
|
||||
|
||||
Using this library, Python can be packaged as a MS-Windows
|
||||
MSI file. To generate an installer package, you need
|
||||
a build tree. By default, the build tree root directory
|
||||
is assumed to be in "../..". This location can be changed
|
||||
by adding a file config.py; see the beginning of msi.py
|
||||
for additional customization options.
|
||||
For testing, the installer should be built with the Tools/msi/build.bat
|
||||
script:
|
||||
|
||||
The packaging process assumes that binaries have been
|
||||
generated according to the instructions in PCBuild/README.txt,
|
||||
and that you have either Visual Studio or the Platform SDK
|
||||
installed. In addition, you need the Python COM extensions,
|
||||
either from PythonWin, or from ActivePython.
|
||||
build.bat [-x86] [-x64] [--doc]
|
||||
|
||||
To invoke the script, open a cmd.exe window which has
|
||||
cabarc.exe in its PATH (e.g. "Visual Studio .NET 2003
|
||||
Command Prompt"). Then invoke
|
||||
For an official release, the installer should be built with the
|
||||
Tools/msi/buildrelease.bat script and environment variables:
|
||||
|
||||
<path-to-python.exe> msi.py
|
||||
set PYTHON=<path to Python 2.7>
|
||||
set SPHINXBUILD=<path to sphinx-build.exe>
|
||||
set PATH=<path to Mercurial (hg.exe)>;
|
||||
<path to HTML Help Compiler (hhc.exe)>;%PATH%
|
||||
|
||||
If everything succeeds, pythonX.Y.Z.msi is generated
|
||||
in the current directory.
|
||||
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
|
||||
======================
|
||||
|
||||
For testing, the installer should be built with the Tools/msi/build.bat
|
||||
script:
|
||||
|
||||
build.bat [-x86] [-x64] [--doc]
|
||||
|
||||
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/.
|
||||
|
||||
If WiX is not found on your system, it will be automatically downloaded
|
||||
and extracted to the externals/ directory.
|
||||
|
||||
|
||||
For an official release, the installer should be built with the
|
||||
Tools/msi/buildrelease.bat script:
|
||||
|
||||
set PYTHON=<path to Python 2.7>
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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%\Python 3.X" for the 64-bit interpreter and
|
||||
"%ProgramFiles(x86)%\Python 3.X" for the 32-bit interpreter. (Note that
|
||||
the latter path is equivalent to "%ProgramFiles%\Python 3.X" 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.
|
||||
|
||||
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
|
||||
.\appcrt140.dll Microsoft Visual C Runtime
|
||||
.\desktopcrt140.dll Microsoft Visual C Runtime
|
||||
.\vcruntime140.dll Microsoft Visual C Runtime
|
||||
|
||||
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 the Python install directory.
|
||||
|
||||
.\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. Within this key, 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 (such as the MSVCRT) and these will not be
|
||||
removed if another product has a dependency on them.
|
||||
|
||||
|
|
|
|||
46
Tools/msi/build.bat
Normal file
46
Tools/msi/build.bat
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
@echo off
|
||||
setlocal
|
||||
set D=%~dp0
|
||||
set PCBUILD=%D%..\..\PCBuild\
|
||||
|
||||
set BUILDX86=
|
||||
set BUILDX64=
|
||||
set BUILDDOC=
|
||||
|
||||
:CheckOpts
|
||||
if '%1'=='-x86' (set BUILDX86=1) && shift && goto CheckOpts
|
||||
if '%1'=='-x64' (set BUILDX64=1) && shift && goto CheckOpts
|
||||
if '%1'=='--doc' (set BUILDDOC=1) && shift && goto CheckOpts
|
||||
|
||||
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
|
||||
|
||||
call "%PCBUILD%env.bat" x86
|
||||
|
||||
if defined BUILDX86 (
|
||||
call "%PCBUILD%build.bat" -d
|
||||
if errorlevel 1 goto :eof
|
||||
call "%PCBUILD%build.bat"
|
||||
if errorlevel 1 goto :eof
|
||||
)
|
||||
if defined BUILDX64 (
|
||||
call "%PCBUILD%build.bat" -p x64 -d
|
||||
if errorlevel 1 goto :eof
|
||||
call "%PCBUILD%build.bat" -p x64
|
||||
if errorlevel 1 goto :eof
|
||||
)
|
||||
|
||||
if defined BUILDDOC (
|
||||
call "%PCBUILD%..\Doc\make.bat" htmlhelp
|
||||
if errorlevel 1 goto :eof
|
||||
)
|
||||
|
||||
if defined BUILDX86 (
|
||||
"%PCBUILD%win32\python.exe" "%D%get_wix.py"
|
||||
msbuild "%D%bundle\snapshot.wixproj"
|
||||
if errorlevel 1 goto :eof
|
||||
)
|
||||
if defined BUILDX64 (
|
||||
"%PCBUILD%amd64\python.exe" "%D%get_wix.py"
|
||||
msbuild "%D%bundle\snapshot.wixproj" /p:Platform=x64
|
||||
if errorlevel 1 goto :eof
|
||||
)
|
||||
131
Tools/msi/buildrelease.bat
Normal file
131
Tools/msi/buildrelease.bat
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
@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
|
||||
rem The first two will ensure that your release can be installed
|
||||
rem alongside an official Python release, while the second specifies
|
||||
rem the URL that will be used to download installation files. The
|
||||
rem files available from this URL *will* conflict with your installer.
|
||||
rem Trust me, you don't want them, even if it seems like a good idea.
|
||||
|
||||
set RELEASE_URI_X86=http://www.python.org/win32
|
||||
set RELEASE_URI_X64=http://www.python.org/amd64
|
||||
set DOWNLOAD_URL_BASE=https://www.python.org/ftp/python
|
||||
set DOWNLOAD_URL=
|
||||
|
||||
set D=%~dp0
|
||||
set PCBUILD=%D%..\..\PCBuild\
|
||||
|
||||
set BUILDX86=
|
||||
set BUILDX64=
|
||||
set TARGET=Rebuild
|
||||
|
||||
|
||||
:CheckOpts
|
||||
if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
|
||||
if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
|
||||
if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
|
||||
if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
|
||||
if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
|
||||
if "%1" EQU "-b" (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 not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
|
||||
|
||||
: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 2>nul >"%TEMP%\dlltool.loc"
|
||||
if errorlevel 1 dir "%D%..\..\externals\dlltool.exe" /s/b > "%TEMP%\dlltool.loc"
|
||||
if errorlevel 1 echo Cannot find binutils on PATH or in externals & exit /B 1
|
||||
set /P DLLTOOL= < "%TEMP%\dlltool.loc"
|
||||
set PATH=%PATH%;%DLLTOOL:~,-12%
|
||||
set DLLTOOL=
|
||||
del "%TEMP%\dlltool.loc"
|
||||
|
||||
|
||||
if defined BUILDX86 (
|
||||
call :build x86
|
||||
if errorlevel 1 exit /B
|
||||
)
|
||||
|
||||
if defined BUILDX64 (
|
||||
call :build x64
|
||||
if errorlevel 1 exit /B
|
||||
)
|
||||
|
||||
exit /B 0
|
||||
|
||||
:build
|
||||
@setlocal
|
||||
@echo off
|
||||
|
||||
if "%1" EQU "x86" (
|
||||
call "%PCBUILD%env.bat" x86
|
||||
set BUILD=%PCBUILD%win32\
|
||||
set BUILD_PLAT=Win32
|
||||
set OUTDIR_PLAT=win32
|
||||
set OBJDIR_PLAT=x86
|
||||
set RELEASE_URI=%RELEASE_URI_X86%
|
||||
) ELSE (
|
||||
call "%PCBUILD%env.bat" x86_amd64
|
||||
set BUILD=%PCBUILD%amd64\
|
||||
set BUILD_PLAT=x64
|
||||
set OUTDIR_PLAT=amd64
|
||||
set OBJDIR_PLAT=x64
|
||||
set RELEASE_URI=%RELEASE_URI_X64%
|
||||
)
|
||||
|
||||
echo on
|
||||
if exist "%BUILD%en-us" (
|
||||
echo Deleting %BUILD%en-us
|
||||
rmdir /q/s "%BUILD%en-us"
|
||||
if errorlevel 1 exit /B
|
||||
)
|
||||
|
||||
echo on
|
||||
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 "%SKIPBUILD%" EQU "1" (
|
||||
call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -d -t %TARGET% %CERTOPTS%
|
||||
if errorlevel 1 exit /B
|
||||
call "%PCBUILD%build.bat" -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
|
||||
if errorlevel 1 exit /B
|
||||
@rem build.bat turns echo back on, so we disable it again
|
||||
@echo off
|
||||
)
|
||||
|
||||
"%BUILD%python.exe" "%D%get_wix.py"
|
||||
|
||||
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 not "%OUTDIR%" EQU "" (
|
||||
mkdir "%OUTDIR%\%OUTDIR_PLAT%"
|
||||
copy /Y "%BUILD%en-us\*.cab" "%OUTDIR%\%OUTDIR_PLAT%"
|
||||
copy /Y "%BUILD%en-us\*.exe" "%OUTDIR%\%OUTDIR_PLAT%"
|
||||
copy /Y "%BUILD%en-us\*.msi" "%OUTDIR%\%OUTDIR_PLAT%"
|
||||
)
|
||||
|
||||
123
Tools/msi/bundle/Default.thm
Normal file
123
Tools/msi/bundle/Default.thm
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
|
||||
<Window Width="640" Height="382" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
|
||||
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
|
||||
<Font Id="1" Height="-24" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
|
||||
<Font Id="2" Height="-22" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
|
||||
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
|
||||
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
|
||||
<Font Id="5" Height="-12" Weight="500" Foreground="666666" Background="ffffff">Segoe UI</Font>
|
||||
|
||||
<Page Name="Help">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Text X="185" Y="50" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
|
||||
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Install">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
|
||||
|
||||
<Button Name="InstallAllUsersButton" X="175" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.InstallAllUsersButton)</Button>
|
||||
<Button Name="InstallJustForMeButton" X="175" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallJustForMeButton)</Button>
|
||||
<Button Name="InstallCustomButton" X="175" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
|
||||
|
||||
<Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="20" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
|
||||
|
||||
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="SimpleInstall">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Button Name="InstallSimpleButton" X="175" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
|
||||
|
||||
<Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Custom1">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Custom1Header)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Checkbox Name="Include_doc" X="185" Y="51" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_docLabel)</Checkbox>
|
||||
<Text X="205" Y="71" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_docHelpLabel)</Text>
|
||||
|
||||
<Checkbox Name="Include_pip" X="185" Y="96" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_pipLabel)</Checkbox>
|
||||
<Text X="205" Y="116" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_pipHelpLabel)</Text>
|
||||
|
||||
<Checkbox Name="Include_tcltk" X="185" Y="141" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_tcltkLabel)</Checkbox>
|
||||
<Text X="205" Y="161" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_tcltkHelpLabel)</Text>
|
||||
|
||||
<Checkbox Name="Include_test" X="185" Y="186" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_testLabel)</Checkbox>
|
||||
<Text X="205" Y="206" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_testHelpLabel)</Text>
|
||||
|
||||
<Checkbox Name="Include_launcher" X="185" Y="231" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_launcherLabel)</Checkbox>
|
||||
<Text X="205" Y="251" Width="-11" Height="20" TabStop="no" FontId="5">#(loc.Include_launcherHelpLabel)</Text>
|
||||
|
||||
<Button Name="Custom1BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
|
||||
<Button Name="CustomNextButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomNextButton)</Button>
|
||||
<Button Name="Custom1CancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Custom2">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Custom2Header)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Checkbox Name="AssociateFiles" X="185" Y="51" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
|
||||
<Checkbox Name="PrependPath" X="185" Y="76" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
|
||||
<Checkbox Name="InstallAllUsers" X="185" Y="101" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
|
||||
<Checkbox Name="CompileAll" X="185" Y="126" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
|
||||
<Checkbox Name="Include_symbols" X="185" Y="151" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
|
||||
<Checkbox Name="Include_debug" X="185" Y="176" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
|
||||
|
||||
<Text X="185" Y="221" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
|
||||
<Editbox Name="TargetDir" X="185" Y="237" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
|
||||
<Button Name="CustomBrowseButton" X="-11" Y="236" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
|
||||
<Text X="185" Y="261" Width="-91" Height="35" FontId="5">#(loc.CustomLocationHelpLabel)</Text>
|
||||
|
||||
<Button Name="Custom2BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
|
||||
<Button Name="CustomInstallButton" X="-91" Y="-11" Width="95" Height="23" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
|
||||
<Button Name="Custom2CancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Progress">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Text X="185" Y="111" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
|
||||
<Text Name="OverallProgressPackageText" X="185" Y="141" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
|
||||
<Progressbar Name="OverallCalculatedProgressbar" X="185" Y="163" Width="-11" Height="20" />
|
||||
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Modify">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Button Name="ModifyButton" X="175" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.ModifyModifyButton)</Button>
|
||||
<Button Name="RepairButton" X="175" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyRepairButton)</Button>
|
||||
<Button Name="UninstallButton" X="175" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyUninstallButton)</Button>
|
||||
|
||||
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Success">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Hypertext Name="SuccessText" X="205" Y="71" Width="-31" Height="100" FontId="3" DisablePrefix="yes"></Hypertext>
|
||||
|
||||
<Text Name="SuccessRestartText" X="185" Y="-100" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
|
||||
<Button Name="LaunchButton" X="185" Y="-50" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
|
||||
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
|
||||
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
|
||||
</Page>
|
||||
<Page Name="Failure">
|
||||
<Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.FailureHeader)</Text>
|
||||
<Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
|
||||
|
||||
<Hypertext Name="FailureLogFileLink" X="185" Y="71" Width="-11" Height="60" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
|
||||
<Hypertext Name="FailureMessageText" X="185" Y="-100" Width="-11" Height="34" FontId="3" TabStop="yes" HideWhenDisabled="yes">Failure Message</Hypertext>
|
||||
<Text Name="FailureRestartText" X="185" Y="-40" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
|
||||
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
|
||||
<Button Name="FailureCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
|
||||
</Page>
|
||||
</Theme>
|
||||
103
Tools/msi/bundle/Default.wxl
Normal file
103
Tools/msi/bundle/Default.wxl
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<?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="CancelButton">&Cancel</String>
|
||||
<String Id="CloseButton">&Close</String>
|
||||
<String Id="InstallHeader">Install [WixBundleName]</String>
|
||||
<String Id="InstallMessage">Select to location to install Python, or choose Customize to enable or disable features.</String>
|
||||
<String Id="InstallVersion">Version [WixBundleVersion]</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">/uninstall
|
||||
Uninstalls Python without prompting for confirmation.
|
||||
|
||||
/layout [\[]directory[\]]
|
||||
Downloads all components for offline installation.
|
||||
|
||||
/passive
|
||||
Displays progress without requiring user interaction.
|
||||
|
||||
/quiet
|
||||
Performs the requested action without displaying any UI.
|
||||
|
||||
/log [\[]filename[\]]
|
||||
Logs to a specific file. By default, log files are created in %TEMP%.</String>
|
||||
<String Id="InstallLicenseLinkText">[WixBundleName] <a href="#">license terms</a>.</String>
|
||||
<String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
|
||||
<String Id="InstallAllUsersButton">Install for &All Users</String>
|
||||
<String Id="InstallAllUsersButtonNote">[DefaultAllUsersTargetDir]</String>
|
||||
<String Id="InstallJustForMeButton">Install &Just for Me</String>
|
||||
<String Id="InstallJustForMeButtonNote">[DefaultJustForMeTargetDir]</String>
|
||||
<String Id="InstallCustomButton">C&ustomize installation</String>
|
||||
<String Id="InstallCustomButtonNote">Choose location and features</String>
|
||||
<String Id="InstallSimpleButton">&Install</String>
|
||||
<String Id="InstallSimpleButtonNote">Uses setting preselected by your administrator</String>
|
||||
<String Id="Custom1Header">Optional Features</String>
|
||||
<String Id="Custom2Header">Advanced Options</String>
|
||||
<String Id="CustomLocationLabel">Customize install location</String>
|
||||
<String Id="CustomLocationHelpLabel">If not installing as administrator, you will require write permissions for this location.</String>
|
||||
<String Id="CustomInstallButton">&Install</String>
|
||||
<String Id="CustomNextButton">&Next</String>
|
||||
<String Id="CustomBackButton">&Back</String>
|
||||
<String Id="CustomBrowseButton">B&rowse</String>
|
||||
<String Id="Include_docLabel">&Documentation</String>
|
||||
<String Id="Include_docHelpLabel">Installs the Python documentation file.</String>
|
||||
<String Id="Include_pipLabel">&pip</String>
|
||||
<String Id="Include_pipHelpLabel">Installs pip, which can download and install other Python packages.</String>
|
||||
<String Id="Include_tcltkLabel">tcl/tk and &IDLE</String>
|
||||
<String Id="Include_tcltkHelpLabel">Installs tkinter and the IDLE development environment.</String>
|
||||
<String Id="Include_testLabel">Python &test suite</String>
|
||||
<String Id="Include_testHelpLabel">Installs the standard library test suite.</String>
|
||||
<String Id="Include_launcherLabel">py &launcher</String>
|
||||
<String Id="Include_launcherHelpLabel">Installs the global 'py' launcher to make it easier to start Python.</String>
|
||||
|
||||
<String Id="AssociateFilesLabel">Associate &files with Python (requires the py launcher)</String>
|
||||
<String Id="PrependPathLabel">Add Python to &environment variables</String>
|
||||
<String Id="ShortPrependPathLabel">Add &Python [ShortVersion] to PATH</String>
|
||||
<String Id="InstallAllUsersLabel">Install as &Administrator</String>
|
||||
<String Id="PrecompileLabel">&Precompile standard library</String>
|
||||
<String Id="Include_symbolsLabel">Install debugging &symbols</String>
|
||||
<String Id="Include_debugLabel">Install debu&g binaries</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">&Modify</String>
|
||||
<String Id="ModifyButtonNote">Add or remove individual features.</String>
|
||||
<String Id="ModifyRepairButton">&Repair</String>
|
||||
<String Id="RepairButtonNote">Ensure all current features are correctly installed.</String>
|
||||
<String Id="ModifyUninstallButton">&Uninstall</String>
|
||||
<String Id="UninstallButtonNote">Remove the entire [WixBundleName] installation.</String>
|
||||
<String Id="SuccessHeader">[ActionLikeInstallation] was successful</String>
|
||||
<String Id="SuccessLaunchButton">&Launch</String>
|
||||
<String Id="SuccessRestartText">You may need to restart your computer to finish updating files.</String>
|
||||
<String Id="SuccessRestartButton">&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 <a href="https://docs.python.org/[ShortVersion]/tutorial/index.html">online tutorial</a> and <a href="https://docs.python.org/[ShortVersion]/index.html">documentation</a>.
|
||||
|
||||
See <a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html">what's new</a> 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 <a href="mailto:python-list@python.org">python-list@python.org</a> if you continue to encounter issues.</String>
|
||||
<String Id="SuccessRemoveMessage">Thank you for using [WixBundleName].
|
||||
|
||||
Feel free to email <a href="mailto:python-list@python.org">python-list@python.org</a> 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 <a href="#">log file</a>.</String>
|
||||
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
|
||||
<String Id="FailureRestartButton">&Restart</String>
|
||||
</WixLocalization>
|
||||
BIN
Tools/msi/bundle/SideBar.png
Normal file
BIN
Tools/msi/bundle/SideBar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
25
Tools/msi/bundle/bootstrap/LICENSE.txt
Normal file
25
Tools/msi/bundle/bootstrap/LICENSE.txt
Normal 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.
|
||||
2645
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Normal file
2645
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Normal file
File diff suppressed because it is too large
Load diff
1
Tools/msi/bundle/bootstrap/pch.cpp
Normal file
1
Tools/msi/bundle/bootstrap/pch.cpp
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "pch.h"
|
||||
59
Tools/msi/bundle/bootstrap/pch.h
Normal file
59
Tools/msi/bundle/bootstrap/pch.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
//-------------------------------------------------------------------------------------------------
|
||||
// <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 "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"
|
||||
|
||||
76
Tools/msi/bundle/bootstrap/pythonba.cpp
Normal file
76
Tools/msi/bundle/bootstrap/pythonba.cpp
Normal 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()
|
||||
{ }
|
||||
18
Tools/msi/bundle/bootstrap/pythonba.def
Normal file
18
Tools/msi/bundle/bootstrap/pythonba.def
Normal 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
|
||||
22
Tools/msi/bundle/bootstrap/pythonba.sln
Normal file
22
Tools/msi/bundle/bootstrap/pythonba.sln
Normal 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
|
||||
69
Tools/msi/bundle/bootstrap/pythonba.vcxproj
Normal file
69
Tools/msi/bundle/bootstrap/pythonba.vcxproj
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?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="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="..\..\wix.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<IntDir>$(ProjectDir)..\..\obj\$(Configuration)_Bootstrap\</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>
|
||||
25
Tools/msi/bundle/bootstrap/resource.h
Normal file
25
Tools/msi/bundle/bootstrap/resource.h
Normal 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
|
||||
BIN
Tools/msi/bundle/bundle.ico
Normal file
BIN
Tools/msi/bundle/bundle.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
99
Tools/msi/bundle/bundle.targets
Normal file
99
Tools/msi/bundle/bundle.targets
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<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>
|
||||
|
||||
<OutputPath>$(OutputPath)en-us\</OutputPath>
|
||||
<OutDir>$(OutputPath)</OutDir>
|
||||
|
||||
<DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/$(PythonVersion)/$(ArchName)/{2}</DownloadUrl>
|
||||
<DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl)</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>
|
||||
<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="..\crt\crt*.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>
|
||||
|
||||
<Target Name="BuildPackages" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
|
||||
<MSBuild Projects="@(Package)" BuildInParallel="true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildLauncher" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
|
||||
<!-- Build the launcher MSI using Exec rather than MSBuild -->
|
||||
<Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease)'
|
||||
ContinueOnError="false" />
|
||||
</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>
|
||||
80
Tools/msi/bundle/bundle.wxs
Normal file
80
Tools/msi/bundle/bundle.wxs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
|
||||
<Bundle Name="!(loc.FullProductName)"
|
||||
UpgradeCode="$(var.UpgradeCode)"
|
||||
Version="$(var.Version)"
|
||||
IconSourceFile="bundle.ico"
|
||||
Manufacturer="!(loc.Manufacturer)"
|
||||
UpdateUrl="http://www.python.org/"
|
||||
DisableModify="button"
|
||||
Compressed="no">
|
||||
<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="InstallAllUsers" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="TargetDir" Value="" Persisted="yes" bal:Overridable="yes" />
|
||||
<?if $(var.Platform)~="x64" ?>
|
||||
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python [ShortVersion]" bal:Overridable="yes" />
|
||||
<?else ?>
|
||||
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]Python [ShortVersion]" bal:Overridable="yes" />
|
||||
<?endif ?>
|
||||
<Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\Python\Python[ShortVersionNoDot]$(var.Suffix32)" bal:Overridable="yes" />
|
||||
|
||||
<!--
|
||||
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" />
|
||||
<Variable Name="TargetDirState" Value="enabled" />
|
||||
<Variable Name="CustomBrowseButtonState" Value="enabled" />
|
||||
|
||||
<Variable Name="Include_core" Value="1" Persisted="yes" />
|
||||
<Variable Name="Include_exe" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_dev" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_lib" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_test" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_doc" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_tools" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_tcltk" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_pip" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_launcher" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_symbols" Value="0" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="Include_debug" Value="0" Persisted="yes" bal:Overridable="yes" />
|
||||
|
||||
<Variable Name="AssociateFiles" Value="1" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="PrependPath" Value="0" Persisted="yes" bal:Overridable="yes" />
|
||||
<Variable Name="CompileAll" Value="0" Persisted="yes" bal:Overridable="yes" />
|
||||
|
||||
<Variable Name="SimpleInstall" Value="0" 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="postinstall" />
|
||||
</Chain>
|
||||
</Bundle>
|
||||
</Wix>
|
||||
21
Tools/msi/bundle/full.wixproj
Normal file
21
Tools/msi/bundle/full.wixproj
Normal 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>
|
||||
56
Tools/msi/bundle/packagegroups/core.wxs
Normal file
56
Tools/msi/bundle/packagegroups/core.wxs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?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)">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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)">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
25
Tools/msi/bundle/packagegroups/crt.wxs
Normal file
25
Tools/msi/bundle/packagegroups/crt.wxs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<PackageGroup Id="crt">
|
||||
<MsiPackage Id="crt_AllUsers"
|
||||
SourceFile="crt.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="yes"
|
||||
InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)">
|
||||
<!-- TARGETDIR will be ignored, but must still be provided -->
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="crt_JustForMe"
|
||||
SourceFile="crt.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip)">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
40
Tools/msi/bundle/packagegroups/dev.wxs
Normal file
40
Tools/msi/bundle/packagegroups/dev.wxs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="dev_JustForMe"
|
||||
SourceFile="dev.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_dev">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
24
Tools/msi/bundle/packagegroups/doc.wxs
Normal file
24
Tools/msi/bundle/packagegroups/doc.wxs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?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)"
|
||||
ForcePerMachine="yes"
|
||||
InstallCondition="InstallAllUsers and Include_doc">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="doc_JustForMe"
|
||||
SourceFile="doc.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_doc">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
56
Tools/msi/bundle/packagegroups/exe.wxs
Normal file
56
Tools/msi/bundle/packagegroups/exe.wxs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?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)"
|
||||
InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip)">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="exe_JustForMe"
|
||||
SourceFile="exe.msi"
|
||||
ForcePerMachine="no"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip)">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
23
Tools/msi/bundle/packagegroups/launcher.wxs
Normal file
23
Tools/msi/bundle/packagegroups/launcher.wxs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?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="launcher.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="yes"
|
||||
EnableFeatureSelection="yes"
|
||||
InstallCondition="InstallAllUsers and Include_launcher" />
|
||||
|
||||
<MsiPackage Id="launcher_JustForMe"
|
||||
SourceFile="launcher.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
EnableFeatureSelection="yes"
|
||||
InstallCondition="not InstallAllUsers and Include_launcher" />
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
56
Tools/msi/bundle/packagegroups/lib.wxs
Normal file
56
Tools/msi/bundle/packagegroups/lib.wxs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="lib_JustForMe"
|
||||
SourceFile="lib.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_lib">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
62
Tools/msi/bundle/packagegroups/postinstall.wxs
Normal file
62
Tools/msi/bundle/packagegroups/postinstall.wxs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<PackageGroup Id="postinstall">
|
||||
<MsiPackage Id="pip_AllUsers"
|
||||
SourceFile="pip.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="yes"
|
||||
InstallCondition="InstallAllUsers and Include_pip">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
<MsiPackage Id="pip_JustForMe"
|
||||
SourceFile="pip.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_pip">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="path_AllUsers"
|
||||
SourceFile="path.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="yes"
|
||||
InstallCondition="InstallAllUsers and PrependPath">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
<MsiPackage Id="path_JustForMe"
|
||||
SourceFile="path.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and PrependPath">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<?define CompileAllCommand=-$(var.ShortVersion)$(var.Suffix32) -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='$(var.CompileAllCommand)'
|
||||
RepairCommand='$(var.CompileAllCommand)'
|
||||
Permanent="yes"
|
||||
PerMachine="yes"
|
||||
Vital="no"
|
||||
InstallCondition="InstallAllUsers and CompileAll" />
|
||||
<ExePackage Id="compileall_JustForMe"
|
||||
SourceFile="py.exe"
|
||||
Compressed="yes"
|
||||
DisplayName="!(loc.CompileAllDescription)"
|
||||
InstallCommand='$(var.CompileAllCommand)'
|
||||
RepairCommand='$(var.CompileAllCommand)'
|
||||
Permanent="yes"
|
||||
PerMachine="no"
|
||||
Vital="no"
|
||||
InstallCondition="not InstallAllUsers and CompileAll" />
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
62
Tools/msi/bundle/packagegroups/tcltk.wxs
Normal file
62
Tools/msi/bundle/packagegroups/tcltk.wxs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="tcltk_JustForMe"
|
||||
SourceFile="tcltk.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
EnableFeatureSelection="yes"
|
||||
InstallCondition="not InstallAllUsers and Include_tcltk">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
56
Tools/msi/bundle/packagegroups/test.wxs
Normal file
56
Tools/msi/bundle/packagegroups/test.wxs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="test_JustForMe"
|
||||
SourceFile="test.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_test">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
24
Tools/msi/bundle/packagegroups/tools.wxs
Normal file
24
Tools/msi/bundle/packagegroups/tools.wxs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?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">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
|
||||
<MsiPackage Id="tools_JustForMe"
|
||||
SourceFile="tools.msi"
|
||||
Compressed="$(var.CompressMSI)"
|
||||
DownloadUrl="$(var.DownloadUrl)"
|
||||
ForcePerMachine="no"
|
||||
InstallCondition="not InstallAllUsers and Include_tools">
|
||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||
</MsiPackage>
|
||||
</PackageGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
4
Tools/msi/bundle/postinstall_en-US.wxl_template
Normal file
4
Tools/msi/bundle/postinstall_en-US.wxl_template
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
|
||||
<String Id="CompileAllDescription">Precompiling standard library</String>
|
||||
</WixLocalization>
|
||||
21
Tools/msi/bundle/releaselocal.wixproj
Normal file
21
Tools/msi/bundle/releaselocal.wixproj
Normal 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>
|
||||
21
Tools/msi/bundle/releaseweb.wixproj
Normal file
21
Tools/msi/bundle/releaseweb.wixproj
Normal 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>
|
||||
21
Tools/msi/bundle/snapshot.wixproj
Normal file
21
Tools/msi/bundle/snapshot.wixproj
Normal 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>{8A4A1162-4BF9-4FF6-9A98-315F01E44932}</ProjectGuid>
|
||||
<OutputName>python</OutputName>
|
||||
<OutputSuffix></OutputSuffix>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\msi.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<DefineConstants>
|
||||
$(DefineConstants);
|
||||
CompressMSI=no;
|
||||
CompressPDB=no;
|
||||
CompressMSI_D=no;
|
||||
</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="bundle.targets" />
|
||||
</Project>
|
||||
101
Tools/msi/common.wxs
Normal file
101
Tools/msi/common.wxs
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<Property Id="REGISTRYKEY" Value="Software\$(var.TestPrefix)Python\PythonCore\$(var.ShortVersion)$(var.Suffix32)" />
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<Property Id="UpgradeTable" Value="1" />
|
||||
|
||||
<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>
|
||||
|
||||
<?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
|
||||
<Upgrade Id="$(var.CoreUpgradeCode)">
|
||||
<UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" Maximum="$(var.Version)" OnlyDetect="yes" />
|
||||
</Upgrade>
|
||||
<?endif ?>
|
||||
|
||||
<Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
|
||||
<Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
|
||||
<Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<RemoveExistingProducts After="InstallInitialize">UPGRADE</RemoveExistingProducts>
|
||||
</InstallExecuteSequence>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<!-- Include an icon for the Programs and Features dialog -->
|
||||
<Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\pycon.ico" />
|
||||
<Property Id="ARPPRODUCTICON" Value="ARPIcon" />
|
||||
<Property Id="ARPNOMODIFY" Value="1" />
|
||||
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
|
||||
</Directory>
|
||||
</Fragment>
|
||||
|
||||
<!-- Top-level directories -->
|
||||
<Fragment>
|
||||
<DirectoryRef Id="InstallDirectory">
|
||||
<Directory Id="DLLs" Name="DLLs" />
|
||||
</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>
|
||||
17
Tools/msi/common_en-US.wxl_template
Normal file
17
Tools/msi/common_en-US.wxl_template
Normal 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 {{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>
|
||||
</WixLocalization>
|
||||
12
Tools/msi/core/core.props
Normal file
12
Tools/msi/core/core.props
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="*.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="*.wxl" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
11
Tools/msi/core/core.wixproj
Normal file
11
Tools/msi/core/core.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{1B4502D5-B627-4F50-ABEA-4CC5A8E88265}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>core</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<DefineConstants>IncludeDefaultFeature=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="core.props" />
|
||||
</Project>
|
||||
25
Tools/msi/core/core.wxs
Normal file
25
Tools/msi/core/core.wxs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?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" />
|
||||
|
||||
<?ifdef IncludeDefaultFeature ?>
|
||||
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
|
||||
<ComponentGroupRef Id="core_dll" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeSymbols ?>
|
||||
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
|
||||
<ComponentGroupRef Id="core_symbols" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeDebugBinaries ?>
|
||||
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
|
||||
<ComponentGroupRef Id="core_dll_d" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
</Product>
|
||||
</Wix>
|
||||
11
Tools/msi/core/core_d.wixproj
Normal file
11
Tools/msi/core/core_d.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{D3677DCF-098A-4398-9FA5-8E74AC37E0DF}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>core_d</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<DefineConstants>IncludeDebugBinaries=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="core.props" />
|
||||
</Project>
|
||||
5
Tools/msi/core/core_en-US.wxl
Normal file
5
Tools/msi/core/core_en-US.wxl
Normal 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">Core Interpreter</String>
|
||||
<String Id="ShortDescriptor">core</String>
|
||||
</WixLocalization>
|
||||
31
Tools/msi/core/core_files.wxs
Normal file
31
Tools/msi/core/core_files.wxs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<ComponentGroup Id="core_dll">
|
||||
<Component Id="python_stable.dll" Directory="InstallDirectory" Guid="*">
|
||||
<File Id="python_stable.dll" Name="python$(var.MajorVersionNumber).dll" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="python.dll" Directory="InstallDirectory" Guid="*">
|
||||
<File Id="python.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).dll" KeyPath="yes" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
<Fragment>
|
||||
<ComponentGroup Id="core_symbols">
|
||||
<Component Id="python.pdb" Directory="InstallDirectory" Guid="*">
|
||||
<File Id="python.pdb" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).pdb" KeyPath="yes" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
<Fragment>
|
||||
<ComponentGroup Id="core_dll_d">
|
||||
<Component Id="python_stable_d.dll" Directory="InstallDirectory" Guid="*">
|
||||
<File Id="python_stable_d.dll" Name="python$(var.MajorVersionNumber)_d.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="python_d.dll" Directory="InstallDirectory" Guid="*">
|
||||
<File Id="python_d.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.dll" KeyPath="yes" />
|
||||
<File Id="python_d.pdb" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.pdb" KeyPath="no" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
11
Tools/msi/core/core_pdb.wixproj
Normal file
11
Tools/msi/core/core_pdb.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{E98E7539-64E7-4DCE-AACD-01E3ADE40EFD}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>core_pdb</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<DefineConstants>IncludeSymbols=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="core.props" />
|
||||
</Project>
|
||||
20
Tools/msi/crt/crt.wixproj
Normal file
20
Tools/msi/crt/crt.wixproj
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?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>crt</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<SuppressIces>ICE71</SuppressIces>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="crt.wxs" />
|
||||
<Compile Include="crt_files.$(VisualStudioVersion).wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="*.wxl" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
26
Tools/msi/crt/crt.wxs
Normal file
26
Tools/msi/crt/crt.wxs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?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" />
|
||||
|
||||
<?if $(var.Platform)~=x64 ?>
|
||||
<?define DirName=System64?>
|
||||
<?else ?>
|
||||
<?define DirName=System?>
|
||||
<?endif ?>
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Directory Id="$(var.DirName)Folder" Name="$(var.DirName)">
|
||||
<Directory Id="SystemInstallDirectory" Name="." />
|
||||
</Directory>
|
||||
</DirectoryRef>
|
||||
<?undef DirName ?>
|
||||
|
||||
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
|
||||
<ComponentGroupRef Id="crt_files" />
|
||||
</Feature>
|
||||
</Product>
|
||||
</Wix>
|
||||
|
||||
5
Tools/msi/crt/crt_en-US.wxl
Normal file
5
Tools/msi/crt/crt_en-US.wxl
Normal 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">C Runtime</String>
|
||||
<String Id="ShortDescriptor">crt</String>
|
||||
</WixLocalization>
|
||||
20
Tools/msi/crt/crt_files.12.0.wxs
Normal file
20
Tools/msi/crt/crt_files.12.0.wxs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<?if $(var.Platform)~=x64 ?>
|
||||
<?define msvcr120Guid={0835C947-D6D2-4E52-AF14-0231D04E88EA}?>
|
||||
<?else ?>
|
||||
<?define msvcr120Guid={E5B92048-5859-4AF1-AEAD-B97EBF00B087} ?>
|
||||
<?endif ?>
|
||||
<ComponentGroup Id="crt_files">
|
||||
<Component Id="msvcr120.dll_LM" Directory="SystemInstallDirectory" Guid="$(var.msvcr120Guid)" Shared="yes" SharedDllRefCount="yes">
|
||||
<Condition>ALLUSERS=1</Condition>
|
||||
<File Id="msvcr120.dll_LM" Source="!(bindpath.crt)\msvcr120.dll" />
|
||||
</Component>
|
||||
<Component Id="msvcr120.dll_CU" Directory="InstallDirectory" Guid="*">
|
||||
<Condition>NOT ALLUSERS=1</Condition>
|
||||
<File Id="msvcr120.dll_CU" Source="!(bindpath.crt)\msvcr120.dll" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
40
Tools/msi/crt/crt_files.14.0.wxs
Normal file
40
Tools/msi/crt/crt_files.14.0.wxs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<?if $(var.Platform)~=x64 ?>
|
||||
<?define appcrt140Guid={CC160FA9-B519-38EC-B358-B4146E8506C8}?>
|
||||
<?define desktopcrt140Guid={4DB78A79-8D7F-35DD-B0E8-736DE44D25F3}?>
|
||||
<?define vcruntime140Guid={B33258FD-750C-3B42-8BE4-535B48E97DB4}?>
|
||||
<?else ?>
|
||||
<?define appcrt140Guid={E3854F9C-4CFB-3B85-90BD-86AA22D82DC8}?>
|
||||
<?define desktopcrt140Guid={46EAB1CD-C362-3139-BD7E-D8782E65253A}?>
|
||||
<?define vcruntime140Guid={E8E39D3B-4F35-36D8-B892-4B28336FE041}?>
|
||||
<?endif ?>
|
||||
<ComponentGroup Id="crt_files">
|
||||
<Component Id="appcrt140.dll_LM" Directory="SystemInstallDirectory" Guid="$(var.appcrt140Guid)" Shared="yes" SharedDllRefCount="yes">
|
||||
<Condition>ALLUSERS=1</Condition>
|
||||
<File Id="appcrt140.dll_LM" Source="!(bindpath.crt)\appcrt140.dll" />
|
||||
</Component>
|
||||
<Component Id="desktopcrt140.dll_LM" Directory="SystemInstallDirectory" Guid="$(var.desktopcrt140Guid)" Shared="yes" SharedDllRefCount="yes">
|
||||
<Condition>ALLUSERS=1</Condition>
|
||||
<File Id="desktopcrt140.dll_LM" Source="!(bindpath.crt)\desktopcrt140.dll" />
|
||||
</Component>
|
||||
<Component Id="vcruntime140.dll_LM" Directory="SystemInstallDirectory" Guid="$(var.vcruntime140Guid)" Shared="yes" SharedDllRefCount="yes">
|
||||
<Condition>ALLUSERS=1</Condition>
|
||||
<File Id="vcruntime140.dll_LM" Source="!(bindpath.crt)\vcruntime140.dll" />
|
||||
</Component>
|
||||
<Component Id="appcrt140.dll_CU" Directory="InstallDirectory" Guid="*">
|
||||
<Condition>NOT ALLUSERS=1</Condition>
|
||||
<File Id="appcrt140.dll_CU" Source="!(bindpath.crt)\appcrt140.dll" />
|
||||
</Component>
|
||||
<Component Id="desktopcrt140.dll_CU" Directory="InstallDirectory" Guid="*">
|
||||
<Condition>NOT ALLUSERS=1</Condition>
|
||||
<File Id="desktopcrt140.dll_CU" Source="!(bindpath.crt)\desktopcrt140.dll" />
|
||||
</Component>
|
||||
<Component Id="vcruntime140.dll_CU" Directory="InstallDirectory" Guid="*">
|
||||
<Condition>NOT ALLUSERS=1</Condition>
|
||||
<File Id="vcruntime140.dll_CU" Source="!(bindpath.crt)\vcruntime140.dll" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
47
Tools/msi/crt/crtlicense.txt
Normal file
47
Tools/msi/crt/crtlicense.txt
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
|
||||
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
|
||||
includes the following files:
|
||||
|
||||
appcrt140.dll
|
||||
desktopcrt140.dll
|
||||
vcruntime140.dll
|
||||
msvcp140.dll
|
||||
concrt140.dll
|
||||
vccorlib140.dll
|
||||
|
||||
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.
|
||||
|
||||
127
Tools/msi/csv_to_wxs.py
Normal file
127
Tools/msi/csv_to_wxs.py
Normal 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])
|
||||
42
Tools/msi/dev/dev.props
Normal file
42
Tools/msi/dev/dev.props
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\msi.props" />
|
||||
<PropertyGroup>
|
||||
<DefineConstants Condition="$(BuildForRelease)">
|
||||
$(DefineConstants);
|
||||
IncludeMinGWLib=1;
|
||||
</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="*.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>
|
||||
<_GenDefPlatform>i386</_GenDefPlatform>
|
||||
<_GenDefPlatform Condition="$(Platform) == 'x64'">i386:x86-64</_GenDefPlatform>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" > "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
|
||||
<Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" -m $(_GenDefPlatform)' />
|
||||
</Target>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
11
Tools/msi/dev/dev.wixproj
Normal file
11
Tools/msi/dev/dev.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDefaultFeature=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="dev.props" />
|
||||
</Project>
|
||||
25
Tools/msi/dev/dev.wxs
Normal file
25
Tools/msi/dev/dev.wxs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?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" />
|
||||
|
||||
<?ifdef IncludeDefaultFeature ?>
|
||||
<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 ?>
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeDebugBinaries ?>
|
||||
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
|
||||
<ComponentGroupRef Id="dev_libs_d" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
</Product>
|
||||
</Wix>
|
||||
11
Tools/msi/dev/dev_d.wixproj
Normal file
11
Tools/msi/dev/dev_d.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDebugBinaries=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="dev.props" />
|
||||
</Project>
|
||||
5
Tools/msi/dev/dev_en-US.wxl
Normal file
5
Tools/msi/dev/dev_en-US.wxl
Normal 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>
|
||||
42
Tools/msi/dev/dev_files.wxs
Normal file
42
Tools/msi/dev/dev_files.wxs
Normal 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>
|
||||
30
Tools/msi/doc/doc.wixproj
Normal file
30
Tools/msi/doc/doc.wixproj
Normal 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>
|
||||
26
Tools/msi/doc/doc.wxs
Normal file
26
Tools/msi/doc/doc.wxs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?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="doc" />
|
||||
|
||||
<Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
|
||||
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
|
||||
<RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" KeyPath="yes" />
|
||||
</RegistryKey>
|
||||
<Shortcut Id="python.chm"
|
||||
Target="[#python.chm]"
|
||||
Name="!(loc.ShortcutName)"
|
||||
Description="!(loc.ShortcutDescription)" />
|
||||
<RemoveFolder Id="Remove_MenuDir" On="uninstall" />
|
||||
</Component>
|
||||
|
||||
</Feature>
|
||||
</Product>
|
||||
</Wix>
|
||||
7
Tools/msi/doc/doc_en-US.wxl_template
Normal file
7
Tools/msi/doc/doc_en-US.wxl_template
Normal 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}} {{Bitness}} Manuals</String>
|
||||
<String Id="ShortcutDescription">View the !(loc.ProductName) documentation.</String>
|
||||
</WixLocalization>
|
||||
12
Tools/msi/doc/doc_files.wxs
Normal file
12
Tools/msi/doc/doc_files.wxs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?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" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
17
Tools/msi/doc/doc_no_files.wxs
Normal file
17
Tools/msi/doc/doc_no_files.wxs
Normal 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>
|
||||
36
Tools/msi/exe/exe.props
Normal file
36
Tools/msi/exe/exe.props
Normal 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>
|
||||
<!-- Shortcut validation is not necessary -->
|
||||
<SuppressICEs>ICE43</SuppressICEs>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="*.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>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
11
Tools/msi/exe/exe.wixproj
Normal file
11
Tools/msi/exe/exe.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDefaultFeature=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="exe.props" />
|
||||
</Project>
|
||||
40
Tools/msi/exe/exe.wxs
Normal file
40
Tools/msi/exe/exe.wxs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?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" />
|
||||
|
||||
<?ifdef IncludeDefaultFeature ?>
|
||||
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
|
||||
<ComponentGroupRef Id="exe_python" />
|
||||
<ComponentGroupRef Id="exe_txt" />
|
||||
<ComponentGroupRef Id="exe_icons" />
|
||||
|
||||
<Component Id="exe_shortcut" Directory="MenuDir" Guid="*">
|
||||
<Shortcut Id="python.exe"
|
||||
Target="[#python.exe]"
|
||||
Name="!(loc.ShortcutName)"
|
||||
Description="!(loc.ShortcutDescription)" />
|
||||
<RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
|
||||
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
|
||||
<RegistryValue Key="InstallPath" Type="string" Value="[InstallDirectory]" KeyPath="yes" />
|
||||
<RegistryValue Key="InstallPath\InstallGroup" Type="string" Value="Python $(var.ShortVersion)" />
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeSymbols ?>
|
||||
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
|
||||
<ComponentGroupRef Id="exe_python_symbols" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeDebugBinaries ?>
|
||||
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
|
||||
<ComponentGroupRef Id="exe_python_d" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
</Product>
|
||||
</Wix>
|
||||
11
Tools/msi/exe/exe_d.wixproj
Normal file
11
Tools/msi/exe/exe_d.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDebugBinaries=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="exe.props" />
|
||||
</Project>
|
||||
9
Tools/msi/exe/exe_en-US.wxl_template
Normal file
9
Tools/msi/exe/exe_en-US.wxl_template
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?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="PathTitle">Add to PATH</String>
|
||||
<String Id="PathDescription">Adds the install directory to PATH and .py to PATHEXT.</String>
|
||||
</WixLocalization>
|
||||
68
Tools/msi/exe/exe_files.wxs
Normal file
68
Tools/msi/exe/exe_files.wxs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?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" Source="!(bindpath.src)Misc\NEWS" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="README.txt" Directory="InstallDirectory" Guid="*">
|
||||
<File Name="README.txt" Source="!(bindpath.src)README" 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" />
|
||||
</Component>
|
||||
<Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
|
||||
<File Name="pythonw.exe" 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\py.ico" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="pyc.ico" Directory="DLLs" Guid="*">
|
||||
<File Name="pyc.ico" Source="!(bindpath.src)PC\pyc.ico" KeyPath="yes" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
11
Tools/msi/exe/exe_pdb.wixproj
Normal file
11
Tools/msi/exe/exe_pdb.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeSymbols=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="exe.props" />
|
||||
</Project>
|
||||
49
Tools/msi/get_wix.py
Normal file
49
Tools/msi/get_wix.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
'''
|
||||
Downloads and extracts WiX to a local directory
|
||||
'''
|
||||
|
||||
__author__ = 'Steve Dower <steve.dower@microsoft.com>'
|
||||
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
|
||||
from pathlib import Path
|
||||
from subprocess import Popen
|
||||
from zipfile import ZipFile
|
||||
|
||||
EXTERNALS_DIR = None
|
||||
for p in Path(__file__).parents:
|
||||
if any(p.glob("PCBuild/*.vcxproj")):
|
||||
EXTERNALS_DIR = p / "externals"
|
||||
break
|
||||
|
||||
if not EXTERNALS_DIR:
|
||||
print("Cannot find project root")
|
||||
sys.exit(1)
|
||||
|
||||
WIX_BINARIES_ZIP = 'http://wixtoolset.org/downloads/v3.10.1124.0/wix310-binaries.zip'
|
||||
TARGET_BIN_ZIP = EXTERNALS_DIR / "wix.zip"
|
||||
TARGET_BIN_DIR = EXTERNALS_DIR / "wix"
|
||||
|
||||
POWERSHELL_COMMAND = "[IO.File]::WriteAllBytes('{}', (Invoke-WebRequest {} -UseBasicParsing).Content)"
|
||||
|
||||
if __name__ == '__main__':
|
||||
if TARGET_BIN_DIR.exists() and any(TARGET_BIN_DIR.glob("*")):
|
||||
print('WiX is already installed')
|
||||
sys.exit(0)
|
||||
|
||||
try:
|
||||
TARGET_BIN_DIR.mkdir()
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
print('Downloading WiX to', TARGET_BIN_ZIP)
|
||||
p = Popen(["powershell.exe", "-Command", POWERSHELL_COMMAND.format(TARGET_BIN_ZIP, WIX_BINARIES_ZIP)])
|
||||
p.wait()
|
||||
print('Extracting WiX to', TARGET_BIN_DIR)
|
||||
with ZipFile(str(TARGET_BIN_ZIP)) as z:
|
||||
z.extractall(str(TARGET_BIN_DIR))
|
||||
TARGET_BIN_ZIP.unlink()
|
||||
|
||||
print('Extracted WiX')
|
||||
12
Tools/msi/launcher/launcher.props
Normal file
12
Tools/msi/launcher/launcher.props
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="*.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="*.wxl" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
11
Tools/msi/launcher/launcher.wixproj
Normal file
11
Tools/msi/launcher/launcher.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>IncludeDefaultFeature=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="launcher.props" />
|
||||
</Project>
|
||||
38
Tools/msi/launcher/launcher.wxs
Normal file
38
Tools/msi/launcher/launcher.wxs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?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" />
|
||||
<PropertyRef Id="UpgradeTable" />
|
||||
<PropertyRef Id="ARPPRODUCTICON" />
|
||||
|
||||
<?ifdef IncludeDefaultFeature ?>
|
||||
<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>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeSymbols ?>
|
||||
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
|
||||
<ComponentGroupRef Id="launcher_pdb" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
|
||||
<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>
|
||||
</InstallExecuteSequence>
|
||||
</Product>
|
||||
</Wix>
|
||||
8
Tools/msi/launcher/launcher_en-US.wxl
Normal file
8
Tools/msi/launcher/launcher_en-US.wxl
Normal 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">Launcher</String>
|
||||
<String Id="ShortDescriptor">launcher</String>
|
||||
<String Id="PythonFileDescription">Python File</String>
|
||||
<String Id="PythonNoConFileDescription">Python File (no console)</String>
|
||||
<String Id="PythonCompiledFileDescription">Compiled Python File</String>
|
||||
</WixLocalization>
|
||||
35
Tools/msi/launcher/launcher_files.wxs
Normal file
35
Tools/msi/launcher/launcher_files.wxs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?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" />
|
||||
</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\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\InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
|
||||
<Fragment>
|
||||
<ComponentGroup Id="launcher_pdb">
|
||||
<Component Id="py.pdb" Directory="LauncherInstallDirectory" Guid="*">
|
||||
<File Id="py.pdb" Name="py.pdb" Source="py.pdb" />
|
||||
</Component>
|
||||
<Component Id="pyw.pdb" Directory="LauncherInstallDirectory" Guid="*">
|
||||
<File Id="pyw.pdb" Name="pyw.pdb" Source="pyw.pdb" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
11
Tools/msi/launcher/launcher_pdb.wixproj
Normal file
11
Tools/msi/launcher/launcher_pdb.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{A21D4A23-483F-4822-A0B1-FCB14D8CEBA7}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>launcher_pdb</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<DefineConstants>IncludeSymbols=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="launcher.props" />
|
||||
</Project>
|
||||
32
Tools/msi/launcher/launcher_reg.wxs
Normal file
32
Tools/msi/launcher/launcher_reg.wxs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?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\AssociateFiles" Value="1" Type="integer" />
|
||||
|
||||
<ProgId Id="$(var.TestPrefix)Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
|
||||
<Extension Id="$(var.FileExtension)" ContentType="text/plain">
|
||||
<Verb Id="open" TargetFile="py.exe" Argument=""%L" %*" />
|
||||
</Extension>
|
||||
</ProgId>
|
||||
<RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.File\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
|
||||
|
||||
<ProgId Id="$(var.TestPrefix)Python.NoConFile" Description="!(loc.PythonNoConFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
|
||||
<Extension Id="$(var.FileExtension)w" ContentType="text/plain">
|
||||
<Verb Id="open" TargetFile="pyw.exe" Argument=""%L" %*" />
|
||||
</Extension>
|
||||
</ProgId>
|
||||
<RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.NoConFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
|
||||
|
||||
<ProgId Id="$(var.TestPrefix)Python.CompiledFile" Description="!(loc.PythonCompiledFileDescription)" Advertise="no" Icon="py.exe" IconIndex="2">
|
||||
<Extension Id="$(var.FileExtension)c">
|
||||
<Verb Id="open" TargetFile="py.exe" Argument=""%L" %*" />
|
||||
</Extension>
|
||||
<Extension Id="$(var.FileExtension)o" />
|
||||
</ProgId>
|
||||
<RegistryValue Root="HKCR" Key="$(var.TestPrefix)Python.CompiledFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
27
Tools/msi/lib/lib.props
Normal file
27
Tools/msi/lib/lib.props
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="*.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>
|
||||
</InstallFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\msi.targets" />
|
||||
</Project>
|
||||
11
Tools/msi/lib/lib.wixproj
Normal file
11
Tools/msi/lib/lib.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDefaultFeature=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="lib.props" />
|
||||
</Project>
|
||||
28
Tools/msi/lib/lib.wxs
Normal file
28
Tools/msi/lib/lib.wxs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?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" />
|
||||
|
||||
<?ifdef IncludeDefaultFeature ?>
|
||||
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
|
||||
<ComponentGroupRef Id="lib_py" />
|
||||
<ComponentGroupRef Id="lib_files" />
|
||||
<ComponentGroupRef Id="lib_extensions" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeSymbols ?>
|
||||
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
|
||||
<ComponentGroupRef Id="lib_extensions_symbols" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
<?ifdef IncludeDebugBinaries ?>
|
||||
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
|
||||
<ComponentGroupRef Id="lib_extensions_d" />
|
||||
</Feature>
|
||||
<?endif ?>
|
||||
</Product>
|
||||
</Wix>
|
||||
11
Tools/msi/lib/lib_d.wixproj
Normal file
11
Tools/msi/lib/lib_d.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeDebugBinaries=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="lib.props" />
|
||||
</Project>
|
||||
5
Tools/msi/lib/lib_en-US.wxl
Normal file
5
Tools/msi/lib/lib_en-US.wxl
Normal 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>
|
||||
72
Tools/msi/lib/lib_files.wxs
Normal file
72
Tools/msi/lib/lib_files.wxs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?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 ?>
|
||||
<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="*">
|
||||
<Condition>SYMBOLS=1</Condition>
|
||||
<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 ?>
|
||||
</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="Lib_site_packages_README" Directory="Lib_site_packages" Guid="*">
|
||||
<File Id="Lib_site_packages_README" Name="README.txt" Source="!(bindpath.src)Lib\site-packages\README" KeyPath="yes" />
|
||||
</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>
|
||||
<DirectoryRef Id="Lib">
|
||||
<Directory Id="Lib_site_packages" Name="site-packages" />
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
11
Tools/msi/lib/lib_pdb.wixproj
Normal file
11
Tools/msi/lib/lib_pdb.wixproj
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?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>
|
||||
<DefineConstants>IncludeSymbols=1;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="lib.props" />
|
||||
</Project>
|
||||
161
Tools/msi/msi.props
Normal file
161
Tools/msi/msi.props
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">
|
||||
<PropertyGroup>
|
||||
<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>
|
||||
<!--
|
||||
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 are built with http://www.python.org/.
|
||||
|
||||
This is not the same as the DownloadUrl property used in the bundle
|
||||
projects.
|
||||
-->
|
||||
<ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)</ReleaseUri>
|
||||
<ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="wix.props" />
|
||||
<Import Project="..\..\PCBuild\tcltk.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
|
||||
<WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" />
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>WixUtilExtension</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<IntermediateOutputPath>$(MSBuildThisFileDirectory)\obj\$(Configuration)_$(Platform)\$(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>
|
||||
<CRTModule Condition="'$(VisualStudioVersion)' == '12.0'">$(CommonProgramFiles)\Merge Modules\Microsoft_VC120_CRT_$(Platform).msm</CRTModule>
|
||||
<CRTModule Condition="'$(VisualStudioVersion)' == '14.0'">$(CommonProgramFiles)\Merge Modules\Microsoft_VC140_CRT_$(Platform).msm</CRTModule>
|
||||
<CRTRedist Condition="'$(VisualStudioVersion)' == '12.0'">$([System.IO.Path]::GetFullPath(`$(VS120COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC120.CRT`))</CRTRedist>
|
||||
<CRTRedist Condition="'$(VisualStudioVersion)' == '14.0'">$([System.IO.Path]::GetFullPath(`$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT`))</CRTRedist>
|
||||
<CRTRedist Condition="'$(CRTRedist)' != '' and !Exists($(CRTRedist))"></CRTRedist>
|
||||
|
||||
<RevisionNumber>$(ReleaseLevelNumber)</RevisionNumber>
|
||||
<RevisionNumber Condition="!$(BuildForRelease)">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Bitness>32-bit</Bitness>
|
||||
<Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
|
||||
<DefineConstants>
|
||||
$(DefineConstants);
|
||||
Version=$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber).$(RevisionNumber);
|
||||
ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);
|
||||
LongVersion=$(PythonVersion);
|
||||
MajorVersionNumber=$(MajorVersionNumber);
|
||||
MinorVersionNumber=$(MinorVersionNumber);
|
||||
UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
|
||||
UpgradeMaximumVersion=$(MajorVersionNumber).$(MinorVersionNumber).150.0;
|
||||
NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
|
||||
PyDebugExt=$(PyDebugExt);
|
||||
</DefineConstants>
|
||||
<DefineConstants Condition="'$(CRTModule)' != '' and Exists($(CRTModule))">
|
||||
$(DefineConstants);CRTModule=$(CRTModule);
|
||||
</DefineConstants>
|
||||
<DefineConstants Condition="'$(CRTRedist)' != ''">
|
||||
$(DefineConstants);CRTRedist=$(CRTRedist);
|
||||
</DefineConstants>
|
||||
<DefineConstants Condition="$(Configuration) != 'Debug'">
|
||||
$(DefineConstants);TestPrefix=;FileExtension=py;
|
||||
</DefineConstants>
|
||||
<DefineConstants Condition="$(Configuration) == 'Debug'">
|
||||
$(DefineConstants);TestPrefix=x;FileExtension=px;
|
||||
</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>
|
||||
</InstallFiles>
|
||||
<LinkerBindInputPaths>
|
||||
<Visible>false</Visible>
|
||||
</LinkerBindInputPaths>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<LinkerBindInputPaths Include="$(BuildPath);$(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>crt</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>
|
||||
</ItemGroup>
|
||||
<Target Name="_GenerateGuids" AfterTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<_Uuids>@(_Uuid->'("%(Identity)", "%(Uri)")',',')</_Uuids>
|
||||
<_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri)' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"' IgnoreExitCode="false" />
|
||||
|
||||
<ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
|
||||
<Output TaskParameter="Lines" ItemName="_UuidValue" />
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<PropertyGroup>
|
||||
<DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
1454
Tools/msi/msi.py
1454
Tools/msi/msi.py
File diff suppressed because it is too large
Load diff
62
Tools/msi/msi.targets
Normal file
62
Tools/msi/msi.targets
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?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>
|
||||
</ItemGroup>
|
||||
|
||||
<WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'"%(_Source)","%(_Target)","%(Group)","%(DiskId)","%(Condition)"')" 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="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate)" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
|
||||
<PropertyGroup>
|
||||
<_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)`).Replace(`{{LongVersion}}`, `$(PythonVersion)`).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>
|
||||
<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->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||||
</Target>
|
||||
<Target Name="SignMsi">
|
||||
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||||
<Exec Command="$(_SignCommand) @(SignMsi->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||||
</Target>
|
||||
<Target Name="SignBundleEngine">
|
||||
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||||
<Exec Command="$(_SignCommand) @(SignBundleEngine->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||||
</Target>
|
||||
<Target Name="SignBundle">
|
||||
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
|
||||
<Exec Command="$(_SignCommand) @(SignBundle->'"%(FullPath)"',' ')" ContinueOnError="false" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
@ -1,679 +0,0 @@
|
|||
# Microsoft Installer Library
|
||||
# (C) 2003 Martin v. Loewis
|
||||
|
||||
import win32com.client.gencache
|
||||
import win32com.client
|
||||
import pythoncom, pywintypes
|
||||
from win32com.client import constants
|
||||
import re, string, os, sets, glob, subprocess, sys, _winreg, struct, _msi
|
||||
|
||||
try:
|
||||
basestring
|
||||
except NameError:
|
||||
basestring = (str, unicode)
|
||||
|
||||
# Partially taken from Wine
|
||||
datasizemask= 0x00ff
|
||||
type_valid= 0x0100
|
||||
type_localizable= 0x0200
|
||||
|
||||
typemask= 0x0c00
|
||||
type_long= 0x0000
|
||||
type_short= 0x0400
|
||||
type_string= 0x0c00
|
||||
type_binary= 0x0800
|
||||
|
||||
type_nullable= 0x1000
|
||||
type_key= 0x2000
|
||||
# XXX temporary, localizable?
|
||||
knownbits = datasizemask | type_valid | type_localizable | \
|
||||
typemask | type_nullable | type_key
|
||||
|
||||
# Summary Info Property IDs
|
||||
PID_CODEPAGE=1
|
||||
PID_TITLE=2
|
||||
PID_SUBJECT=3
|
||||
PID_AUTHOR=4
|
||||
PID_KEYWORDS=5
|
||||
PID_COMMENTS=6
|
||||
PID_TEMPLATE=7
|
||||
PID_LASTAUTHOR=8
|
||||
PID_REVNUMBER=9
|
||||
PID_LASTPRINTED=11
|
||||
PID_CREATE_DTM=12
|
||||
PID_LASTSAVE_DTM=13
|
||||
PID_PAGECOUNT=14
|
||||
PID_WORDCOUNT=15
|
||||
PID_CHARCOUNT=16
|
||||
PID_APPNAME=18
|
||||
PID_SECURITY=19
|
||||
|
||||
def reset():
|
||||
global _directories
|
||||
_directories = sets.Set()
|
||||
|
||||
def EnsureMSI():
|
||||
win32com.client.gencache.EnsureModule('{000C1092-0000-0000-C000-000000000046}', 1033, 1, 0)
|
||||
|
||||
def EnsureMSM():
|
||||
try:
|
||||
win32com.client.gencache.EnsureModule('{0ADDA82F-2C26-11D2-AD65-00A0C9AF11A6}', 0, 1, 0)
|
||||
except pywintypes.com_error:
|
||||
win32com.client.gencache.EnsureModule('{0ADDA82F-2C26-11D2-AD65-00A0C9AF11A6}', 0, 2, 0)
|
||||
|
||||
_Installer=None
|
||||
def MakeInstaller():
|
||||
global _Installer
|
||||
if _Installer is None:
|
||||
EnsureMSI()
|
||||
_Installer = win32com.client.Dispatch('WindowsInstaller.Installer',
|
||||
resultCLSID='{000C1090-0000-0000-C000-000000000046}')
|
||||
return _Installer
|
||||
|
||||
_Merge=None
|
||||
def MakeMerge2():
|
||||
global _Merge
|
||||
if _Merge is None:
|
||||
EnsureMSM()
|
||||
_Merge = win32com.client.Dispatch("Msm.Merge2.1")
|
||||
return _Merge
|
||||
|
||||
class Table:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.fields = []
|
||||
|
||||
def add_field(self, index, name, type):
|
||||
self.fields.append((index,name,type))
|
||||
|
||||
def sql(self):
|
||||
fields = []
|
||||
keys = []
|
||||
self.fields.sort()
|
||||
fields = [None]*len(self.fields)
|
||||
for index, name, type in self.fields:
|
||||
index -= 1
|
||||
unk = type & ~knownbits
|
||||
if unk:
|
||||
print "%s.%s unknown bits %x" % (self.name, name, unk)
|
||||
size = type & datasizemask
|
||||
dtype = type & typemask
|
||||
if dtype == type_string:
|
||||
if size:
|
||||
tname="CHAR(%d)" % size
|
||||
else:
|
||||
tname="CHAR"
|
||||
elif dtype == type_short:
|
||||
assert size==2
|
||||
tname = "SHORT"
|
||||
elif dtype == type_long:
|
||||
assert size==4
|
||||
tname="LONG"
|
||||
elif dtype == type_binary:
|
||||
assert size==0
|
||||
tname="OBJECT"
|
||||
else:
|
||||
tname="unknown"
|
||||
print "%s.%sunknown integer type %d" % (self.name, name, size)
|
||||
if type & type_nullable:
|
||||
flags = ""
|
||||
else:
|
||||
flags = " NOT NULL"
|
||||
if type & type_localizable:
|
||||
flags += " LOCALIZABLE"
|
||||
fields[index] = "`%s` %s%s" % (name, tname, flags)
|
||||
if type & type_key:
|
||||
keys.append("`%s`" % name)
|
||||
fields = ", ".join(fields)
|
||||
keys = ", ".join(keys)
|
||||
return "CREATE TABLE %s (%s PRIMARY KEY %s)" % (self.name, fields, keys)
|
||||
|
||||
def create(self, db):
|
||||
v = db.OpenView(self.sql())
|
||||
v.Execute(None)
|
||||
v.Close()
|
||||
|
||||
class Binary:
|
||||
def __init__(self, fname):
|
||||
self.name = fname
|
||||
def __repr__(self):
|
||||
return 'msilib.Binary(os.path.join(dirname,"%s"))' % self.name
|
||||
|
||||
def gen_schema(destpath, schemapath):
|
||||
d = MakeInstaller()
|
||||
schema = d.OpenDatabase(schemapath,
|
||||
win32com.client.constants.msiOpenDatabaseModeReadOnly)
|
||||
|
||||
# XXX ORBER BY
|
||||
v=schema.OpenView("SELECT * FROM _Columns")
|
||||
curtable=None
|
||||
tables = []
|
||||
v.Execute(None)
|
||||
f = open(destpath, "wt")
|
||||
f.write("from msilib import Table\n")
|
||||
while 1:
|
||||
r=v.Fetch()
|
||||
if not r:break
|
||||
name=r.StringData(1)
|
||||
if curtable != name:
|
||||
f.write("\n%s = Table('%s')\n" % (name,name))
|
||||
curtable = name
|
||||
tables.append(name)
|
||||
f.write("%s.add_field(%d,'%s',%d)\n" %
|
||||
(name, r.IntegerData(2), r.StringData(3), r.IntegerData(4)))
|
||||
v.Close()
|
||||
|
||||
f.write("\ntables=[%s]\n\n" % (", ".join(tables)))
|
||||
|
||||
# Fill the _Validation table
|
||||
f.write("_Validation_records = [\n")
|
||||
v = schema.OpenView("SELECT * FROM _Validation")
|
||||
v.Execute(None)
|
||||
while 1:
|
||||
r = v.Fetch()
|
||||
if not r:break
|
||||
# Table, Column, Nullable
|
||||
f.write("(%s,%s,%s," %
|
||||
(`r.StringData(1)`, `r.StringData(2)`, `r.StringData(3)`))
|
||||
def put_int(i):
|
||||
if r.IsNull(i):f.write("None, ")
|
||||
else:f.write("%d," % r.IntegerData(i))
|
||||
def put_str(i):
|
||||
if r.IsNull(i):f.write("None, ")
|
||||
else:f.write("%s," % `r.StringData(i)`)
|
||||
put_int(4) # MinValue
|
||||
put_int(5) # MaxValue
|
||||
put_str(6) # KeyTable
|
||||
put_int(7) # KeyColumn
|
||||
put_str(8) # Category
|
||||
put_str(9) # Set
|
||||
put_str(10)# Description
|
||||
f.write("),\n")
|
||||
f.write("]\n\n")
|
||||
|
||||
f.close()
|
||||
|
||||
def gen_sequence(destpath, msipath):
|
||||
dir = os.path.dirname(destpath)
|
||||
d = MakeInstaller()
|
||||
seqmsi = d.OpenDatabase(msipath,
|
||||
win32com.client.constants.msiOpenDatabaseModeReadOnly)
|
||||
|
||||
v = seqmsi.OpenView("SELECT * FROM _Tables");
|
||||
v.Execute(None)
|
||||
f = open(destpath, "w")
|
||||
print >>f, "import msilib,os;dirname=os.path.dirname(__file__)"
|
||||
tables = []
|
||||
while 1:
|
||||
r = v.Fetch()
|
||||
if not r:break
|
||||
table = r.StringData(1)
|
||||
tables.append(table)
|
||||
f.write("%s = [\n" % table)
|
||||
v1 = seqmsi.OpenView("SELECT * FROM `%s`" % table)
|
||||
v1.Execute(None)
|
||||
info = v1.ColumnInfo(constants.msiColumnInfoTypes)
|
||||
while 1:
|
||||
r = v1.Fetch()
|
||||
if not r:break
|
||||
rec = []
|
||||
for i in range(1,r.FieldCount+1):
|
||||
if r.IsNull(i):
|
||||
rec.append(None)
|
||||
elif info.StringData(i)[0] in "iI":
|
||||
rec.append(r.IntegerData(i))
|
||||
elif info.StringData(i)[0] in "slSL":
|
||||
rec.append(r.StringData(i))
|
||||
elif info.StringData(i)[0]=="v":
|
||||
size = r.DataSize(i)
|
||||
bytes = r.ReadStream(i, size, constants.msiReadStreamBytes)
|
||||
bytes = bytes.encode("latin-1") # binary data represented "as-is"
|
||||
if table == "Binary":
|
||||
fname = rec[0]+".bin"
|
||||
open(os.path.join(dir,fname),"wb").write(bytes)
|
||||
rec.append(Binary(fname))
|
||||
else:
|
||||
rec.append(bytes)
|
||||
else:
|
||||
raise "Unsupported column type", info.StringData(i)
|
||||
f.write(repr(tuple(rec))+",\n")
|
||||
v1.Close()
|
||||
f.write("]\n\n")
|
||||
v.Close()
|
||||
f.write("tables=%s\n" % repr(map(str,tables)))
|
||||
f.close()
|
||||
|
||||
class _Unspecified:pass
|
||||
def change_sequence(seq, action, seqno=_Unspecified, cond = _Unspecified):
|
||||
"Change the sequence number of an action in a sequence list"
|
||||
for i in range(len(seq)):
|
||||
if seq[i][0] == action:
|
||||
if cond is _Unspecified:
|
||||
cond = seq[i][1]
|
||||
if seqno is _Unspecified:
|
||||
seqno = seq[i][2]
|
||||
seq[i] = (action, cond, seqno)
|
||||
return
|
||||
raise ValueError, "Action not found in sequence"
|
||||
|
||||
def add_data(db, table, values):
|
||||
d = MakeInstaller()
|
||||
v = db.OpenView("SELECT * FROM `%s`" % table)
|
||||
count = v.ColumnInfo(0).FieldCount
|
||||
r = d.CreateRecord(count)
|
||||
for value in values:
|
||||
assert len(value) == count, value
|
||||
for i in range(count):
|
||||
field = value[i]
|
||||
if isinstance(field, (int, long)):
|
||||
r.SetIntegerData(i+1,field)
|
||||
elif isinstance(field, basestring):
|
||||
r.SetStringData(i+1,field)
|
||||
elif field is None:
|
||||
pass
|
||||
elif isinstance(field, Binary):
|
||||
r.SetStream(i+1, field.name)
|
||||
else:
|
||||
raise TypeError, "Unsupported type %s" % field.__class__.__name__
|
||||
v.Modify(win32com.client.constants.msiViewModifyInsert, r)
|
||||
r.ClearData()
|
||||
v.Close()
|
||||
|
||||
def add_stream(db, name, path):
|
||||
d = MakeInstaller()
|
||||
v = db.OpenView("INSERT INTO _Streams (Name, Data) VALUES ('%s', ?)" % name)
|
||||
r = d.CreateRecord(1)
|
||||
r.SetStream(1, path)
|
||||
v.Execute(r)
|
||||
v.Close()
|
||||
|
||||
def init_database(name, schema,
|
||||
ProductName, ProductCode, ProductVersion,
|
||||
Manufacturer,
|
||||
request_uac = False):
|
||||
try:
|
||||
os.unlink(name)
|
||||
except OSError:
|
||||
pass
|
||||
ProductCode = ProductCode.upper()
|
||||
d = MakeInstaller()
|
||||
# Create the database
|
||||
db = d.OpenDatabase(name,
|
||||
win32com.client.constants.msiOpenDatabaseModeCreate)
|
||||
# Create the tables
|
||||
for t in schema.tables:
|
||||
t.create(db)
|
||||
# Fill the validation table
|
||||
add_data(db, "_Validation", schema._Validation_records)
|
||||
# Initialize the summary information, allowing at most 20 properties
|
||||
si = db.GetSummaryInformation(20)
|
||||
si.SetProperty(PID_TITLE, "Installation Database")
|
||||
si.SetProperty(PID_SUBJECT, ProductName)
|
||||
si.SetProperty(PID_AUTHOR, Manufacturer)
|
||||
si.SetProperty(PID_TEMPLATE, msi_type)
|
||||
si.SetProperty(PID_REVNUMBER, gen_uuid())
|
||||
if request_uac:
|
||||
wc = 2 # long file names, compressed, original media
|
||||
else:
|
||||
wc = 2 | 8 # +never invoke UAC
|
||||
si.SetProperty(PID_WORDCOUNT, wc)
|
||||
si.SetProperty(PID_PAGECOUNT, 200)
|
||||
si.SetProperty(PID_APPNAME, "Python MSI Library")
|
||||
# XXX more properties
|
||||
si.Persist()
|
||||
add_data(db, "Property", [
|
||||
("ProductName", ProductName),
|
||||
("ProductCode", ProductCode),
|
||||
("ProductVersion", ProductVersion),
|
||||
("Manufacturer", Manufacturer),
|
||||
("ProductLanguage", "1033")])
|
||||
db.Commit()
|
||||
return db
|
||||
|
||||
def add_tables(db, module):
|
||||
for table in module.tables:
|
||||
add_data(db, table, getattr(module, table))
|
||||
|
||||
def make_id(str):
|
||||
#str = str.replace(".", "_") # colons are allowed
|
||||
str = str.replace(" ", "_")
|
||||
str = str.replace("-", "_")
|
||||
str = str.replace("+", "_")
|
||||
if str[0] in string.digits:
|
||||
str = "_"+str
|
||||
assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str
|
||||
return str
|
||||
|
||||
def gen_uuid():
|
||||
return str(pythoncom.CreateGuid())
|
||||
|
||||
class CAB:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.files = []
|
||||
self.filenames = sets.Set()
|
||||
self.index = 0
|
||||
|
||||
def gen_id(self, dir, file):
|
||||
logical = _logical = make_id(file)
|
||||
pos = 1
|
||||
while logical in self.filenames:
|
||||
logical = "%s.%d" % (_logical, pos)
|
||||
pos += 1
|
||||
self.filenames.add(logical)
|
||||
return logical
|
||||
|
||||
def append(self, full, file, logical = None):
|
||||
if os.path.isdir(full):
|
||||
return
|
||||
if not logical:
|
||||
logical = self.gen_id(dir, file)
|
||||
self.index += 1
|
||||
self.files.append((full, logical))
|
||||
return self.index, logical
|
||||
|
||||
def commit(self, db):
|
||||
try:
|
||||
os.unlink(self.name+".cab")
|
||||
except OSError:
|
||||
pass
|
||||
_msi.FCICreate(self.name+".cab", self.files)
|
||||
add_data(db, "Media",
|
||||
[(1, self.index, None, "#"+self.name, None, None)])
|
||||
add_stream(db, self.name, self.name+".cab")
|
||||
os.unlink(self.name+".cab")
|
||||
db.Commit()
|
||||
|
||||
_directories = sets.Set()
|
||||
class Directory:
|
||||
def __init__(self, db, cab, basedir, physical, _logical, default, componentflags=None):
|
||||
"""Create a new directory in the Directory table. There is a current component
|
||||
at each point in time for the directory, which is either explicitly created
|
||||
through start_component, or implicitly when files are added for the first
|
||||
time. Files are added into the current component, and into the cab file.
|
||||
To create a directory, a base directory object needs to be specified (can be
|
||||
None), the path to the physical directory, and a logical directory name.
|
||||
Default specifies the DefaultDir slot in the directory table. componentflags
|
||||
specifies the default flags that new components get."""
|
||||
index = 1
|
||||
_logical = make_id(_logical)
|
||||
logical = _logical
|
||||
while logical in _directories:
|
||||
logical = "%s%d" % (_logical, index)
|
||||
index += 1
|
||||
_directories.add(logical)
|
||||
self.db = db
|
||||
self.cab = cab
|
||||
self.basedir = basedir
|
||||
self.physical = physical
|
||||
self.logical = logical
|
||||
self.component = None
|
||||
self.short_names = {}
|
||||
self.ids = sets.Set()
|
||||
self.keyfiles = {}
|
||||
self.componentflags = componentflags
|
||||
if basedir:
|
||||
self.absolute = os.path.join(basedir.absolute, physical)
|
||||
blogical = basedir.logical
|
||||
else:
|
||||
self.absolute = physical
|
||||
blogical = None
|
||||
# initially assume that all files in this directory are unpackaged
|
||||
# as files from self.absolute get added, this set is reduced
|
||||
self.unpackaged_files = set()
|
||||
for f in os.listdir(self.absolute):
|
||||
if os.path.isfile(os.path.join(self.absolute, f)):
|
||||
self.unpackaged_files.add(f)
|
||||
add_data(db, "Directory", [(logical, blogical, default)])
|
||||
|
||||
def start_component(self, component = None, feature = None, flags = None, keyfile = None, uuid=None):
|
||||
"""Add an entry to the Component table, and make this component the current for this
|
||||
directory. If no component name is given, the directory name is used. If no feature
|
||||
is given, the current feature is used. If no flags are given, the directory's default
|
||||
flags are used. If no keyfile is given, the KeyPath is left null in the Component
|
||||
table."""
|
||||
if flags is None:
|
||||
flags = self.componentflags
|
||||
if uuid is None:
|
||||
uuid = gen_uuid()
|
||||
else:
|
||||
uuid = uuid.upper()
|
||||
if component is None:
|
||||
component = self.logical
|
||||
self.component = component
|
||||
if Win64:
|
||||
flags |= 256
|
||||
if keyfile:
|
||||
keyid = self.cab.gen_id(self.absolute, keyfile)
|
||||
self.keyfiles[keyfile] = keyid
|
||||
else:
|
||||
keyid = None
|
||||
add_data(self.db, "Component",
|
||||
[(component, uuid, self.logical, flags, None, keyid)])
|
||||
if feature is None:
|
||||
feature = current_feature
|
||||
add_data(self.db, "FeatureComponents",
|
||||
[(feature.id, component)])
|
||||
|
||||
def make_short(self, file):
|
||||
long = file
|
||||
file = re.sub(r'[\?|><:/*"+,;=\[\]]', '_', file) # restrictions on short names
|
||||
parts = file.split(".", 1)
|
||||
if len(parts)>1:
|
||||
suffix = parts[1].upper()
|
||||
else:
|
||||
suffix = ''
|
||||
prefix = parts[0].upper()
|
||||
if len(prefix) <= 8 and '.' not in suffix and len(suffix) <= 3:
|
||||
if suffix:
|
||||
file = prefix+"."+suffix
|
||||
else:
|
||||
file = prefix
|
||||
assert file not in self.short_names, (file, self.short_names[file])
|
||||
else:
|
||||
prefix = prefix[:6]
|
||||
if suffix:
|
||||
# last three characters of last suffix
|
||||
suffix = suffix.rsplit('.')[-1][:3]
|
||||
pos = 1
|
||||
while 1:
|
||||
if suffix:
|
||||
file = "%s~%d.%s" % (prefix, pos, suffix)
|
||||
else:
|
||||
file = "%s~%d" % (prefix, pos)
|
||||
if file not in self.short_names: break
|
||||
pos += 1
|
||||
assert pos < 10000
|
||||
if pos in (10, 100, 1000):
|
||||
prefix = prefix[:-1]
|
||||
self.short_names[file] = long
|
||||
return file
|
||||
|
||||
def add_file(self, file, src=None, version=None, language=None):
|
||||
"""Add a file to the current component of the directory, starting a new one
|
||||
if there is no current component. By default, the file name in the source
|
||||
and the file table will be identical. If the src file is specified, it is
|
||||
interpreted relative to the current directory. Optionally, a version and a
|
||||
language can be specified for the entry in the File table."""
|
||||
if not self.component:
|
||||
self.start_component(self.logical, current_feature)
|
||||
if not src:
|
||||
# Allow relative paths for file if src is not specified
|
||||
src = file
|
||||
file = os.path.basename(file)
|
||||
absolute = os.path.join(self.absolute, src)
|
||||
if absolute.startswith(self.absolute):
|
||||
# mark file as packaged
|
||||
relative = absolute[len(self.absolute)+1:]
|
||||
if relative in self.unpackaged_files:
|
||||
self.unpackaged_files.remove(relative)
|
||||
assert not re.search(r'[\?|><:/*]"', file) # restrictions on long names
|
||||
if self.keyfiles.has_key(file):
|
||||
logical = self.keyfiles[file]
|
||||
else:
|
||||
logical = None
|
||||
sequence, logical = self.cab.append(absolute, file, logical)
|
||||
assert logical not in self.ids
|
||||
self.ids.add(logical)
|
||||
short = self.make_short(file)
|
||||
full = "%s|%s" % (short, file)
|
||||
filesize = os.stat(absolute).st_size
|
||||
# constants.msidbFileAttributesVital
|
||||
# Compressed omitted, since it is the database default
|
||||
# could add r/o, system, hidden
|
||||
attributes = 512
|
||||
add_data(self.db, "File",
|
||||
[(logical, self.component, full, filesize, version,
|
||||
language, attributes, sequence)])
|
||||
if not version:
|
||||
# Add hash if the file is not versioned
|
||||
filehash = MakeInstaller().FileHash(absolute, 0)
|
||||
add_data(self.db, "MsiFileHash",
|
||||
[(logical, 0, filehash.IntegerData(1),
|
||||
filehash.IntegerData(2), filehash.IntegerData(3),
|
||||
filehash.IntegerData(4))])
|
||||
# Automatically remove .pyc/.pyo files on uninstall (2)
|
||||
# XXX: adding so many RemoveFile entries makes installer unbelievably
|
||||
# slow. So instead, we have to use wildcard remove entries
|
||||
# if file.endswith(".py"):
|
||||
# add_data(self.db, "RemoveFile",
|
||||
# [(logical+"c", self.component, "%sC|%sc" % (short, file),
|
||||
# self.logical, 2),
|
||||
# (logical+"o", self.component, "%sO|%so" % (short, file),
|
||||
# self.logical, 2)])
|
||||
|
||||
def glob(self, pattern, exclude = None):
|
||||
"""Add a list of files to the current component as specified in the
|
||||
glob pattern. Individual files can be excluded in the exclude list."""
|
||||
files = glob.glob1(self.absolute, pattern)
|
||||
for f in files:
|
||||
if exclude and f in exclude: continue
|
||||
self.add_file(f)
|
||||
return files
|
||||
|
||||
def remove_pyc(self):
|
||||
"Remove .pyc/.pyo files from __pycache__ on uninstall"
|
||||
directory = self.logical + "_pycache"
|
||||
add_data(self.db, "Directory", [(directory, self.logical, "__PYCA~1|__pycache__")])
|
||||
flags = 256 if Win64 else 0
|
||||
add_data(self.db, "Component",
|
||||
[(directory, gen_uuid(), directory, flags, None, None)])
|
||||
add_data(self.db, "FeatureComponents", [(current_feature.id, directory)])
|
||||
add_data(self.db, "CreateFolder", [(directory, directory)])
|
||||
add_data(self.db, "RemoveFile",
|
||||
[(self.component, self.component, "*.*", directory, 2),
|
||||
])
|
||||
|
||||
def removefile(self, key, pattern):
|
||||
"Add a RemoveFile entry"
|
||||
add_data(self.db, "RemoveFile", [(self.component+key, self.component, pattern, self.logical, 2)])
|
||||
|
||||
|
||||
class Feature:
|
||||
def __init__(self, db, id, title, desc, display, level = 1,
|
||||
parent=None, directory = None, attributes=0):
|
||||
self.id = id
|
||||
if parent:
|
||||
parent = parent.id
|
||||
add_data(db, "Feature",
|
||||
[(id, parent, title, desc, display,
|
||||
level, directory, attributes)])
|
||||
def set_current(self):
|
||||
global current_feature
|
||||
current_feature = self
|
||||
|
||||
class Control:
|
||||
def __init__(self, dlg, name):
|
||||
self.dlg = dlg
|
||||
self.name = name
|
||||
|
||||
def event(self, ev, arg, cond = "1", order = None):
|
||||
add_data(self.dlg.db, "ControlEvent",
|
||||
[(self.dlg.name, self.name, ev, arg, cond, order)])
|
||||
|
||||
def mapping(self, ev, attr):
|
||||
add_data(self.dlg.db, "EventMapping",
|
||||
[(self.dlg.name, self.name, ev, attr)])
|
||||
|
||||
def condition(self, action, condition):
|
||||
add_data(self.dlg.db, "ControlCondition",
|
||||
[(self.dlg.name, self.name, action, condition)])
|
||||
|
||||
class RadioButtonGroup(Control):
|
||||
def __init__(self, dlg, name, property):
|
||||
self.dlg = dlg
|
||||
self.name = name
|
||||
self.property = property
|
||||
self.index = 1
|
||||
|
||||
def add(self, name, x, y, w, h, text, value = None):
|
||||
if value is None:
|
||||
value = name
|
||||
add_data(self.dlg.db, "RadioButton",
|
||||
[(self.property, self.index, value,
|
||||
x, y, w, h, text, None)])
|
||||
self.index += 1
|
||||
|
||||
class Dialog:
|
||||
def __init__(self, db, name, x, y, w, h, attr, title, first, default, cancel):
|
||||
self.db = db
|
||||
self.name = name
|
||||
self.x, self.y, self.w, self.h = x,y,w,h
|
||||
add_data(db, "Dialog", [(name, x,y,w,h,attr,title,first,default,cancel)])
|
||||
|
||||
def control(self, name, type, x, y, w, h, attr, prop, text, next, help):
|
||||
add_data(self.db, "Control",
|
||||
[(self.name, name, type, x, y, w, h, attr, prop, text, next, help)])
|
||||
return Control(self, name)
|
||||
|
||||
def text(self, name, x, y, w, h, attr, text):
|
||||
return self.control(name, "Text", x, y, w, h, attr, None,
|
||||
text, None, None)
|
||||
|
||||
def bitmap(self, name, x, y, w, h, text):
|
||||
return self.control(name, "Bitmap", x, y, w, h, 1, None, text, None, None)
|
||||
|
||||
def line(self, name, x, y, w, h):
|
||||
return self.control(name, "Line", x, y, w, h, 1, None, None, None, None)
|
||||
|
||||
def pushbutton(self, name, x, y, w, h, attr, text, next):
|
||||
return self.control(name, "PushButton", x, y, w, h, attr, None, text, next, None)
|
||||
|
||||
def radiogroup(self, name, x, y, w, h, attr, prop, text, next):
|
||||
add_data(self.db, "Control",
|
||||
[(self.name, name, "RadioButtonGroup",
|
||||
x, y, w, h, attr, prop, text, next, None)])
|
||||
return RadioButtonGroup(self, name, prop)
|
||||
|
||||
def checkbox(self, name, x, y, w, h, attr, prop, text, next):
|
||||
return self.control(name, "CheckBox", x, y, w, h, attr, prop, text, next, None)
|
||||
|
||||
def pe_type(path):
|
||||
header = open(path, "rb").read(1000)
|
||||
# offset of PE header is at offset 0x3c
|
||||
pe_offset = struct.unpack("<i", header[0x3c:0x40])[0]
|
||||
assert header[pe_offset:pe_offset+4] == "PE\0\0"
|
||||
machine = struct.unpack("<H", header[pe_offset+4:pe_offset+6])[0]
|
||||
return machine
|
||||
|
||||
def set_arch_from_file(path):
|
||||
global msi_type, Win64, arch_ext
|
||||
machine = pe_type(path)
|
||||
if machine == 0x14c:
|
||||
# i386
|
||||
msi_type = "Intel"
|
||||
Win64 = 0
|
||||
arch_ext = ''
|
||||
elif machine == 0x200:
|
||||
# Itanium
|
||||
msi_type = "Intel64"
|
||||
Win64 = 1
|
||||
arch_ext = '.ia64'
|
||||
elif machine == 0x8664:
|
||||
# AMD64
|
||||
msi_type = "x64"
|
||||
Win64 = 1
|
||||
arch_ext = '.amd64'
|
||||
else:
|
||||
raise ValueError, "Unsupported architecture"
|
||||
msi_type += ";1033"
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
#include "windows.h"
|
||||
#include "msiquery.h"
|
||||
|
||||
/* Print a debug message to the installer log file.
|
||||
* To see the debug messages, install with
|
||||
* msiexec /i pythonxy.msi /l*v python.log
|
||||
*/
|
||||
static UINT debug(MSIHANDLE hInstall, LPCSTR msg)
|
||||
{
|
||||
MSIHANDLE hRec = MsiCreateRecord(1);
|
||||
if (!hRec || MsiRecordSetStringA(hRec, 1, msg) != ERROR_SUCCESS) {
|
||||
return ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRec);
|
||||
MsiCloseHandle(hRec);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
/* Check whether the TARGETDIR exists and is a directory.
|
||||
* Set TargetExists appropriately.
|
||||
*/
|
||||
UINT __declspec(dllexport) __stdcall CheckDir(MSIHANDLE hInstall)
|
||||
{
|
||||
#define PSIZE 1024
|
||||
WCHAR wpath[PSIZE];
|
||||
char path[PSIZE];
|
||||
UINT result;
|
||||
DWORD size = PSIZE;
|
||||
DWORD attributes;
|
||||
|
||||
|
||||
result = MsiGetPropertyW(hInstall, L"TARGETDIR", wpath, &size);
|
||||
if (result != ERROR_SUCCESS)
|
||||
return result;
|
||||
wpath[size] = L'\0';
|
||||
path[size] = L'\0';
|
||||
|
||||
attributes = GetFileAttributesW(wpath);
|
||||
if (attributes == INVALID_FILE_ATTRIBUTES ||
|
||||
!(attributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
return MsiSetPropertyA(hInstall, "TargetExists", "0");
|
||||
} else {
|
||||
return MsiSetPropertyA(hInstall, "TargetExists", "1");
|
||||
}
|
||||
}
|
||||
|
||||
/* Update the state of the REGISTRY.tcl component according to the
|
||||
* Extension and TclTk features. REGISTRY.tcl must be installed
|
||||
* if both features are installed, and must be absent otherwise.
|
||||
*/
|
||||
UINT __declspec(dllexport) __stdcall UpdateEditIDLE(MSIHANDLE hInstall)
|
||||
{
|
||||
INSTALLSTATE ext_old, ext_new, tcl_old, tcl_new, reg_new;
|
||||
UINT result;
|
||||
|
||||
result = MsiGetFeatureStateA(hInstall, "Extensions", &ext_old, &ext_new);
|
||||
if (result != ERROR_SUCCESS)
|
||||
return result;
|
||||
result = MsiGetFeatureStateA(hInstall, "TclTk", &tcl_old, &tcl_new);
|
||||
if (result != ERROR_SUCCESS)
|
||||
return result;
|
||||
|
||||
/* If the current state is Absent, and the user did not select
|
||||
the feature in the UI, Installer apparently sets the "selected"
|
||||
state to unknown. Update it to the current value, then. */
|
||||
if (ext_new == INSTALLSTATE_UNKNOWN)
|
||||
ext_new = ext_old;
|
||||
if (tcl_new == INSTALLSTATE_UNKNOWN)
|
||||
tcl_new = tcl_old;
|
||||
|
||||
// XXX consider current state of REGISTRY.tcl?
|
||||
if (((tcl_new == INSTALLSTATE_LOCAL) ||
|
||||
(tcl_new == INSTALLSTATE_SOURCE) ||
|
||||
(tcl_new == INSTALLSTATE_DEFAULT)) &&
|
||||
((ext_new == INSTALLSTATE_LOCAL) ||
|
||||
(ext_new == INSTALLSTATE_SOURCE) ||
|
||||
(ext_new == INSTALLSTATE_DEFAULT))) {
|
||||
reg_new = INSTALLSTATE_SOURCE;
|
||||
} else {
|
||||
reg_new = INSTALLSTATE_ABSENT;
|
||||
}
|
||||
result = MsiSetComponentStateA(hInstall, "REGISTRY.tcl", reg_new);
|
||||
return result;
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HANDLE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# /OPT: REF and ICF are added by VS.NET by default
|
||||
msisupport.dll: msisupport.obj
|
||||
link.exe /OUT:msisupport.dll /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF msisupport.obj msi.lib kernel32.lib
|
||||
|
||||
# We request a static CRT, so that there will be no CRT dependencies
|
||||
# for the target system. We cannot do without a CRT, since it provides
|
||||
# the DLL entry point.
|
||||
msisupport.obj: msisupport.c
|
||||
cl /O2 /D WIN32 /D NDEBUG /D _WINDOWS /MT /W3 /c msisupport.c
|
||||
19
Tools/msi/path/path.wixproj
Normal file
19
Tools/msi/path/path.wixproj
Normal 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>
|
||||
35
Tools/msi/path/path.wxs
Normal file
35
Tools/msi/path/path.wxs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?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>
|
||||
<RegistryValue KeyPath="yes" Root="HKCU" Key="[REGISTRYKEY]\PrependPath" Value="1" Type="integer" />
|
||||
|
||||
<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>
|
||||
<RegistryValue KeyPath="yes" Root="HKLM" Key="[REGISTRYKEY]\PrependPath" Value="1" Type="integer" />
|
||||
|
||||
<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>
|
||||
|
||||
6
Tools/msi/path/path_en-US.wxl
Normal file
6
Tools/msi/path/path_en-US.wxl
Normal 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>
|
||||
19
Tools/msi/pip/pip.wixproj
Normal file
19
Tools/msi/pip/pip.wixproj
Normal 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>
|
||||
41
Tools/msi/pip/pip.wxs
Normal file
41
Tools/msi/pip/pip.wxs
Normal 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)" />
|
||||
|
||||
<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)">
|
||||
<Component Id="pip" Guid="*" Directory="InstallDirectory">
|
||||
<RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\EnsurePipRun" Value="1" Type="integer" />
|
||||
</Component>
|
||||
</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]" -m ensurepip -U --default-pip' Execute="immediate" />
|
||||
<CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -B -m ensurepip._uninstall' Execute="immediate" />
|
||||
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
|
||||
<Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
|
||||
|
||||
<Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
|
||||
</InstallExecuteSequence>
|
||||
</Product>
|
||||
</Wix>
|
||||
|
||||
6
Tools/msi/pip/pip_en-US.wxl
Normal file
6
Tools/msi/pip/pip_en-US.wxl
Normal 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>
|
||||
1007
Tools/msi/schema.py
1007
Tools/msi/schema.py
File diff suppressed because it is too large
Load diff
|
|
@ -1,126 +0,0 @@
|
|||
AdminExecuteSequence = [
|
||||
(u'InstallInitialize', None, 1500),
|
||||
(u'InstallFinalize', None, 6600),
|
||||
(u'InstallFiles', None, 4000),
|
||||
(u'InstallAdminPackage', None, 3900),
|
||||
(u'FileCost', None, 900),
|
||||
(u'CostInitialize', None, 800),
|
||||
(u'CostFinalize', None, 1000),
|
||||
(u'InstallValidate', None, 1400),
|
||||
]
|
||||
|
||||
AdminUISequence = [
|
||||
(u'FileCost', None, 900),
|
||||
(u'CostInitialize', None, 800),
|
||||
(u'CostFinalize', None, 1000),
|
||||
(u'ExecuteAction', None, 1300),
|
||||
(u'ExitDialog', None, -1),
|
||||
(u'FatalError', None, -3),
|
||||
(u'UserExit', None, -2),
|
||||
]
|
||||
|
||||
AdvtExecuteSequence = [
|
||||
(u'InstallInitialize', None, 1500),
|
||||
(u'InstallFinalize', None, 6600),
|
||||
(u'CostInitialize', None, 800),
|
||||
(u'CostFinalize', None, 1000),
|
||||
(u'InstallValidate', None, 1400),
|
||||
(u'CreateShortcuts', None, 4500),
|
||||
(u'MsiPublishAssemblies', None, 6250),
|
||||
(u'PublishComponents', None, 6200),
|
||||
(u'PublishFeatures', None, 6300),
|
||||
(u'PublishProduct', None, 6400),
|
||||
(u'RegisterClassInfo', None, 4600),
|
||||
(u'RegisterExtensionInfo', None, 4700),
|
||||
(u'RegisterMIMEInfo', None, 4900),
|
||||
(u'RegisterProgIdInfo', None, 4800),
|
||||
]
|
||||
|
||||
InstallExecuteSequence = [
|
||||
(u'InstallInitialize', None, 1500),
|
||||
(u'InstallFinalize', None, 6600),
|
||||
(u'InstallFiles', None, 4000),
|
||||
(u'FileCost', None, 900),
|
||||
(u'CostInitialize', None, 800),
|
||||
(u'CostFinalize', None, 1000),
|
||||
(u'InstallValidate', None, 1400),
|
||||
(u'CreateShortcuts', None, 4500),
|
||||
(u'MsiPublishAssemblies', None, 6250),
|
||||
(u'PublishComponents', None, 6200),
|
||||
(u'PublishFeatures', None, 6300),
|
||||
(u'PublishProduct', None, 6400),
|
||||
(u'RegisterClassInfo', None, 4600),
|
||||
(u'RegisterExtensionInfo', None, 4700),
|
||||
(u'RegisterMIMEInfo', None, 4900),
|
||||
(u'RegisterProgIdInfo', None, 4800),
|
||||
(u'AllocateRegistrySpace', u'NOT Installed', 1550),
|
||||
(u'AppSearch', None, 400),
|
||||
(u'BindImage', None, 4300),
|
||||
(u'CCPSearch', u'NOT Installed', 500),
|
||||
(u'CreateFolders', None, 3700),
|
||||
(u'DeleteServices', u'VersionNT', 2000),
|
||||
(u'DuplicateFiles', None, 4210),
|
||||
(u'FindRelatedProducts', None, 200),
|
||||
(u'InstallODBC', None, 5400),
|
||||
(u'InstallServices', u'VersionNT', 5800),
|
||||
(u'IsolateComponents', None, 950),
|
||||
(u'LaunchConditions', None, 100),
|
||||
(u'MigrateFeatureStates', None, 1200),
|
||||
(u'MoveFiles', None, 3800),
|
||||
(u'PatchFiles', None, 4090),
|
||||
(u'ProcessComponents', None, 1600),
|
||||
(u'RegisterComPlus', None, 5700),
|
||||
(u'RegisterFonts', None, 5300),
|
||||
(u'RegisterProduct', None, 6100),
|
||||
(u'RegisterTypeLibraries', None, 5500),
|
||||
(u'RegisterUser', None, 6000),
|
||||
(u'RemoveDuplicateFiles', None, 3400),
|
||||
(u'RemoveEnvironmentStrings', None, 3300),
|
||||
(u'RemoveExistingProducts', None, 6700),
|
||||
(u'RemoveFiles', None, 3500),
|
||||
(u'RemoveFolders', None, 3600),
|
||||
(u'RemoveIniValues', None, 3100),
|
||||
(u'RemoveODBC', None, 2400),
|
||||
(u'RemoveRegistryValues', None, 2600),
|
||||
(u'RemoveShortcuts', None, 3200),
|
||||
(u'RMCCPSearch', u'NOT Installed', 600),
|
||||
(u'SelfRegModules', None, 5600),
|
||||
(u'SelfUnregModules', None, 2200),
|
||||
(u'SetODBCFolders', None, 1100),
|
||||
(u'StartServices', u'VersionNT', 5900),
|
||||
(u'StopServices', u'VersionNT', 1900),
|
||||
(u'MsiUnpublishAssemblies', None, 1750),
|
||||
(u'UnpublishComponents', None, 1700),
|
||||
(u'UnpublishFeatures', None, 1800),
|
||||
(u'UnregisterClassInfo', None, 2700),
|
||||
(u'UnregisterComPlus', None, 2100),
|
||||
(u'UnregisterExtensionInfo', None, 2800),
|
||||
(u'UnregisterFonts', None, 2500),
|
||||
(u'UnregisterMIMEInfo', None, 3000),
|
||||
(u'UnregisterProgIdInfo', None, 2900),
|
||||
(u'UnregisterTypeLibraries', None, 2300),
|
||||
(u'ValidateProductID', None, 700),
|
||||
(u'WriteEnvironmentStrings', None, 5200),
|
||||
(u'WriteIniValues', None, 5100),
|
||||
(u'WriteRegistryValues', None, 5000),
|
||||
]
|
||||
|
||||
InstallUISequence = [
|
||||
(u'FileCost', None, 900),
|
||||
(u'CostInitialize', None, 800),
|
||||
(u'CostFinalize', None, 1000),
|
||||
(u'ExecuteAction', None, 1300),
|
||||
(u'ExitDialog', None, -1),
|
||||
(u'FatalError', None, -3),
|
||||
(u'UserExit', None, -2),
|
||||
(u'AppSearch', None, 400),
|
||||
(u'CCPSearch', u'NOT Installed', 500),
|
||||
(u'FindRelatedProducts', None, 200),
|
||||
(u'IsolateComponents', None, 950),
|
||||
(u'LaunchConditions', None, 100),
|
||||
(u'MigrateFeatureStates', None, 1200),
|
||||
(u'RMCCPSearch', u'NOT Installed', 600),
|
||||
(u'ValidateProductID', None, 700),
|
||||
]
|
||||
|
||||
tables=['AdminExecuteSequence', 'AdminUISequence', 'AdvtExecuteSequence', 'InstallExecuteSequence', 'InstallUISequence']
|
||||
49
Tools/msi/tcltk/tcltk.props
Normal file
49
Tools/msi/tcltk/tcltk.props
Normal 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>
|
||||
<!-- Shortcut validation is not necessary -->
|
||||
<SuppressICEs>ICE43</SuppressICEs>
|
||||
</PropertyGroup>
|
||||
<Import Project="..\msi.props" />
|
||||
<ItemGroup>
|
||||
<Compile Include="*.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)bin\*g.dll">
|
||||
<SourceBase>$(tcltkDir)</SourceBase>
|
||||
<Source>!(bindpath.tcltk)</Source>
|
||||
<TargetBase>$(tcltkDir)bin</TargetBase>
|
||||
<Target_>DLLs\</Target_>
|
||||
<Group>tcltk_dlls_d</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>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue