summaryrefslogtreecommitdiff
path: root/Tools/msi
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/msi')
-rw-r--r--Tools/msi/README.txt558
-rw-r--r--Tools/msi/build.bat76
-rw-r--r--Tools/msi/buildrelease.bat228
-rw-r--r--Tools/msi/bundle/Default.thm136
-rw-r--r--Tools/msi/bundle/Default.wxl135
-rw-r--r--Tools/msi/bundle/SideBar.pngbin0 -> 57891 bytes
-rw-r--r--Tools/msi/bundle/bootstrap/LICENSE.txt25
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp3257
-rw-r--r--Tools/msi/bundle/bootstrap/pch.cpp1
-rw-r--r--Tools/msi/bundle/bootstrap/pch.h60
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.cpp76
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.def18
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.sln22
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.vcxproj69
-rw-r--r--Tools/msi/bundle/bootstrap/resource.h25
-rw-r--r--Tools/msi/bundle/bundle.icobin0 -> 19790 bytes
-rw-r--r--Tools/msi/bundle/bundle.targets116
-rw-r--r--Tools/msi/bundle/bundle.wxl7
-rw-r--r--Tools/msi/bundle/bundle.wxs111
-rw-r--r--Tools/msi/bundle/full.wixproj21
-rw-r--r--Tools/msi/bundle/packagegroups/core.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/crt.wxs49
-rw-r--r--Tools/msi/bundle/packagegroups/dev.wxs44
-rw-r--r--Tools/msi/bundle/packagegroups/doc.wxs28
-rw-r--r--Tools/msi/bundle/packagegroups/exe.wxs64
-rw-r--r--Tools/msi/bundle/packagegroups/launcher.wxs27
-rw-r--r--Tools/msi/bundle/packagegroups/lib.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/packageinstall.wxs26
-rw-r--r--Tools/msi/bundle/packagegroups/pip.wxs25
-rw-r--r--Tools/msi/bundle/packagegroups/postinstall.wxs88
-rw-r--r--Tools/msi/bundle/packagegroups/tcltk.wxs68
-rw-r--r--Tools/msi/bundle/packagegroups/test.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/tools.wxs26
-rw-r--r--Tools/msi/bundle/releaselocal.wixproj21
-rw-r--r--Tools/msi/bundle/releaseweb.wixproj21
-rw-r--r--Tools/msi/bundle/snapshot.wixproj26
-rw-r--r--Tools/msi/common.wxs114
-rw-r--r--Tools/msi/common_en-US.wxl_template17
-rw-r--r--Tools/msi/core/core.wixproj19
-rw-r--r--Tools/msi/core/core.wxs13
-rw-r--r--Tools/msi/core/core_d.wixproj19
-rw-r--r--Tools/msi/core/core_d.wxs14
-rw-r--r--Tools/msi/core/core_en-US.wxl5
-rw-r--r--Tools/msi/core/core_files.wxs31
-rw-r--r--Tools/msi/core/core_pdb.wixproj19
-rw-r--r--Tools/msi/core/core_pdb.wxs14
-rw-r--r--Tools/msi/csv_to_wxs.py127
-rw-r--r--Tools/msi/dev/dev.wixproj49
-rw-r--r--Tools/msi/dev/dev.wxs19
-rw-r--r--Tools/msi/dev/dev_d.wixproj19
-rw-r--r--Tools/msi/dev/dev_d.wxs13
-rw-r--r--Tools/msi/dev/dev_en-US.wxl5
-rw-r--r--Tools/msi/dev/dev_files.wxs42
-rw-r--r--Tools/msi/doc/doc.wixproj30
-rw-r--r--Tools/msi/doc/doc.wxs33
-rw-r--r--Tools/msi/doc/doc_en-US.wxl_template7
-rw-r--r--Tools/msi/doc/doc_files.wxs15
-rw-r--r--Tools/msi/doc/doc_no_files.wxs17
-rw-r--r--Tools/msi/exe/crtlicense.txt (renamed from Tools/msi/crtlicense.txt)7
-rw-r--r--Tools/msi/exe/exe.wixproj43
-rw-r--r--Tools/msi/exe/exe.wxs33
-rw-r--r--Tools/msi/exe/exe_d.wixproj20
-rw-r--r--Tools/msi/exe/exe_d.wxs13
-rw-r--r--Tools/msi/exe/exe_en-US.wxl_template7
-rw-r--r--Tools/msi/exe/exe_files.wxs76
-rw-r--r--Tools/msi/exe/exe_pdb.wixproj20
-rw-r--r--Tools/msi/exe/exe_pdb.wxs13
-rw-r--r--Tools/msi/generate_md5.py27
-rw-r--r--Tools/msi/get_externals.bat27
-rw-r--r--Tools/msi/launcher/launcher.wixproj22
-rw-r--r--Tools/msi/launcher/launcher.wxs43
-rw-r--r--Tools/msi/launcher/launcher_en-US.wxl16
-rw-r--r--Tools/msi/launcher/launcher_files.wxs25
-rw-r--r--Tools/msi/launcher/launcher_reg.wxs46
-rw-r--r--Tools/msi/lib/lib.wixproj34
-rw-r--r--Tools/msi/lib/lib.wxs17
-rw-r--r--Tools/msi/lib/lib_d.wixproj19
-rw-r--r--Tools/msi/lib/lib_d.wxs13
-rw-r--r--Tools/msi/lib/lib_en-US.wxl5
-rw-r--r--Tools/msi/lib/lib_files.wxs79
-rw-r--r--Tools/msi/lib/lib_pdb.wixproj19
-rw-r--r--Tools/msi/lib/lib_pdb.wxs13
-rw-r--r--Tools/msi/make_zip.proj41
-rw-r--r--Tools/msi/make_zip.py201
-rw-r--r--Tools/msi/msi.props171
-rw-r--r--Tools/msi/msi.py1456
-rw-r--r--Tools/msi/msi.targets62
-rw-r--r--Tools/msi/msilib.py679
-rw-r--r--Tools/msi/msisupport.c93
-rw-r--r--Tools/msi/msisupport.mak9
-rw-r--r--Tools/msi/path/path.wixproj19
-rw-r--r--Tools/msi/path/path.wxs39
-rw-r--r--Tools/msi/path/path_en-US.wxl6
-rw-r--r--Tools/msi/pip/pip.wixproj19
-rw-r--r--Tools/msi/pip/pip.wxs39
-rw-r--r--Tools/msi/pip/pip_en-US.wxl6
-rw-r--r--Tools/msi/schema.py1007
-rw-r--r--Tools/msi/sequence.py126
-rw-r--r--Tools/msi/tcltk/tcltk.wixproj50
-rw-r--r--Tools/msi/tcltk/tcltk.wxs66
-rw-r--r--Tools/msi/tcltk/tcltk_d.wixproj28
-rw-r--r--Tools/msi/tcltk/tcltk_d.wxs14
-rw-r--r--Tools/msi/tcltk/tcltk_en-US.wxl_template12
-rw-r--r--Tools/msi/tcltk/tcltk_files.wxs35
-rw-r--r--Tools/msi/tcltk/tcltk_pdb.wixproj19
-rw-r--r--Tools/msi/tcltk/tcltk_pdb.wxs13
-rw-r--r--Tools/msi/tcltk/tcltk_reg.wxs48
-rw-r--r--Tools/msi/test/test.wixproj29
-rw-r--r--Tools/msi/test/test.wxs16
-rw-r--r--Tools/msi/test/test_d.wixproj19
-rw-r--r--Tools/msi/test/test_d.wxs13
-rw-r--r--Tools/msi/test/test_en-US.wxl7
-rw-r--r--Tools/msi/test/test_files.wxs77
-rw-r--r--Tools/msi/test/test_pdb.wixproj19
-rw-r--r--Tools/msi/test/test_pdb.wxs13
-rw-r--r--Tools/msi/testrelease.bat117
-rw-r--r--Tools/msi/tools/tools.wixproj43
-rw-r--r--Tools/msi/tools/tools.wxs15
-rw-r--r--Tools/msi/tools/tools_en-US.wxl5
-rw-r--r--Tools/msi/tools/tools_files.wxs16
-rw-r--r--Tools/msi/uisample.py1400
-rw-r--r--Tools/msi/uploadrelease.bat63
-rw-r--r--Tools/msi/uploadrelease.proj80
-rw-r--r--Tools/msi/wix.props12
124 files changed, 8321 insertions, 4799 deletions
diff --git a/Tools/msi/README.txt b/Tools/msi/README.txt
index dc4ae90cf2..7023b61181 100644
--- a/Tools/msi/README.txt
+++ b/Tools/msi/README.txt
@@ -1,25 +1,535 @@
-Packaging Python as a Microsoft Installer Package (MSI)
-=======================================================
-
-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.
-
-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.
-
-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
-
-<path-to-python.exe> msi.py
-
-If everything succeeds, pythonX.Y.Z.msi is generated
-in the current directory.
+Quick Build Info
+================
+
+For testing, the installer should be built with the Tools/msi/build.bat
+script:
+
+ build.bat [-x86] [-x64] [--doc]
+
+For an official release, the installer should be built with the
+Tools/msi/buildrelease.bat script and environment variables:
+
+ set PYTHON=<path to Python 2.7 or 3.4>
+ set SPHINXBUILD=<path to sphinx-build.exe>
+ set PATH=<path to Mercurial (hg.exe)>;
+ <path to HTML Help Compiler (hhc.exe)>;%PATH%
+
+ buildrelease.bat [-x86] [-x64] [-D] [-B]
+ [-o <output directory>] [-c <certificate name>]
+
+See the Building the Installer section for more information.
+
+Overview
+========
+
+Python is distributed on Windows as an installer that will configure the
+user's system. This allows users to have a functioning copy of Python
+without having to build it themselves.
+
+The main tasks of the installer are:
+
+* copy required files into the expected layout
+* configure system settings so the installation can be located by
+ other programs
+* add entry points for modifying, repairing and uninstalling Python
+* make it easy to launch Python, its documentation, and IDLE
+
+Each of these is discussed in a later section of this document.
+
+Structure of the Installer
+==========================
+
+The installer is structured as a 'layout', which consists of a number of
+CAB and MSI files and a single EXE.
+
+The EXE is the main entry point into the installer. It contains the UI
+and command-line logic, as well as the ability to locate and optionally
+download other parts of the layout.
+
+Each MSI contains the logic required to install a component or feature
+of Python. These MSIs should not be launched directly by users. MSIs can
+be embedded into the EXE or automatically downloaded as needed.
+
+Each CAB contains the files making up a Python installation. CABs are
+embedded into their associated MSI and are never seen by users.
+
+MSIs are only required when the related feature or component is being
+installed. When components are not selected for installation, the
+associated MSI is not downloaded. This allows the installer to offer
+options to install debugging symbols and binaries without increasing
+the initial download size by separating them into their own MSIs.
+
+Building the Installer
+======================
+
+Before building the installer, download extra build dependencies using
+Tools\msi\get_externals.bat. (Note that this is in addition to the
+similarly named file in PCBuild.)
+
+For testing, the installer should be built with the Tools/msi/build.bat
+script:
+
+ build.bat [-x86] [-x64] [--doc] [--test-marker] [--pack]
+
+This script will build the required configurations of Python and
+generate an installer layout in PCBuild/(win32|amd64)/en-us.
+
+Specify -x86 and/or -x64 to build for each platform. If neither is
+specified, both platforms will be built. Currently, both the debug and
+release versions of Python are required for the installer.
+
+Specify --doc to build the documentation (.chm) file. If the file is not
+available, it will simply be excluded from the installer. Ensure
+%PYTHON% and %SPHINXBUILD% are set when passing this option. You may
+also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC on
+your PATH or in externals/.
+
+Specify --test-marker to build an installer that works side-by-side with
+an official Python release. All registry keys and install locations will
+include an extra marker to avoid overwriting files. This marker is
+currently an 'x' prefix, but may change at any time.
+
+Specify --pack to build an installer that does not require all MSIs to
+be available alongside. This takes longer, but is easier to share.
+
+
+For an official release, the installer should be built with the
+Tools/msi/buildrelease.bat script:
+
+ set PYTHON=<path to Python 2.7 or 3.4>
+ set SPHINXBUILD=<path to sphinx-build.exe>
+ set PATH=<path to Mercurial (hg.exe)>;
+ <path to HTML Help Compiler (hhc.exe)>;%PATH%
+
+ buildrelease.bat [-x86] [-x64] [-D] [-B]
+ [-o <output directory>] [-c <certificate name>]
+
+Specify -x86 and/or -x64 to build for each platform. If neither is
+specified, both platforms will be built. Currently, both the debug and
+release versions of Python are required for the installer.
+
+Specify -D to skip rebuilding the documentation. The documentation is
+required for a release and the build will fail if it is not available.
+
+Specify -B to skip rebuilding Python. This is useful to only rebuild the
+installer layout after a previous call to buildrelease.bat.
+
+Specify -o to set an output directory. The installer layouts will be
+copied to platform-specific subdirectories of this path.
+
+Specify -c to choose a code-signing certificate to be used for all the
+signable binaries in Python as well as each file making up the
+installer. Official releases of Python must be signed.
+
+Ensure %PYTHON% and %SPHINXBUILD% are set when passing this option. You
+may also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC
+on your PATH or in externals/. You will also need Mercurial (hg.exe) on
+your PATH.
+
+If WiX is not found on your system, it will be automatically downloaded
+and extracted to the externals/ directory.
+
+To manually build layouts of the installer, build one of the projects in
+the bundle folder.
+
+ msbuild bundle\snapshot.wixproj
+ msbuild bundle\releaseweb.wixproj
+ msbuild bundle\releaselocal.wixproj
+ msbuild bundle\full.wixproj
+
+snapshot.wixproj produces a test installer versioned based on the date.
+
+releaseweb.wixproj produces a release installer that does not embed any
+of the layout.
+
+releaselocal.wixproj produces a release installer that embeds the files
+required for a default installation.
+
+full.wixproj produces a test installer that embeds the entire layout.
+
+The following properties may be passed when building these projects.
+
+ /p:BuildForRelease=(true|false)
+ When true, adds extra verification to ensure a complete installer is
+ produced. For example, binutils is required when building for a release
+ to generate MinGW-compatible libraries, and the build will be aborted if
+ this fails. Defaults to false.
+
+ /p:ReleaseUri=(any URI)
+ Used to generate unique IDs for the installers to allow side-by-side
+ installation. Forks of Python can use the same installer infrastructure
+ by providing a unique URI for this property. It does not need to be an
+ active internet address. Defaults to $(ComputerName).
+
+ Official releases use http://www.python.org/(architecture name)
+
+ /p:DownloadUrlBase=(any URI)
+ Specifies the base of a URL where missing parts of the installer layout
+ can be downloaded from. The build version and architecture will be
+ appended to create the full address. If omitted, missing components will
+ not be automatically downloaded.
+
+ /p:DownloadUrl=(any URI)
+ Specifies the full URL where missing parts of the installer layout can
+ be downloaded from. Should normally include '{2}', which will be
+ substituted for the filename. If omitted, missing components will not be
+ automatically downloaded. If specified, this value overrides
+ DownloadUrlBase.
+
+ /p:SigningCertificate=(certificate name)
+ Specifies the certificate to sign the installer layout with. If omitted,
+ the layout will not be signed.
+
+ /p:RebuildAll=(true|false)
+ When true, rebuilds all of the MSIs making up the layout. Defaults to
+ true.
+
+Uploading the Installer
+=======================
+
+For official releases, the uploadrelease.bat script should be used.
+
+You will require PuTTY so that plink.exe and pscp.exe can be used, and your
+SSH key can be activated in pageant.exe. PuTTY should be either on your path
+or in %ProgramFiles(x86)%\PuTTY.
+
+To include signatures for each uploaded file, you will need gpg2.exe on your
+path or have run get_externals.bat. You may also need to "gpg2.exe --import"
+your key before running the upload script.
+
+ uploadrelease.bat --host <host> --user <username> [--dry-run] [--no-gpg]
+
+The host is the URL to the server. This can be provided by the Release
+Manager. You should be able to SSH to this address.
+
+The username is your own username, which you have permission to SSH into
+the server containing downloads.
+
+Use --dry-run to display the generated upload commands without executing
+them. Signatures for each file will be generated but not uploaded unless
+--no-gpg is also passed.
+
+Use --no-gpg to suppress signature generation and upload.
+
+The default target directory (which appears in uploadrelease.proj) is
+correct for official Python releases, but may be overridden with
+--target <path> for other purposes. This path should generally not include
+any version specifier, as that will be added automatically.
+
+Modifying the Installer
+=======================
+
+The code for the installer is divided into three main groups: packages,
+the bundle and the bootstrap application.
+
+Packages
+--------
+
+Packages appear as subdirectories of Tools/msi (other than the bundle/
+directory). The project file is a .wixproj and the build output is a
+single MSI. Packages are built with the WiX Toolset. Some project files
+share source files and use preprocessor directives to enable particular
+features. These are typically used to keep the sources close when the
+files are related, but produce multiple independent packages.
+
+A package is the smallest element that may be independently installed or
+uninstalled (as used in this installer). For example, the test suite has
+its own package, as users can choose to add or remove it after the
+initial installation.
+
+All the files installed by a single package should be related, though
+some packages may not install any files. For example, the pip package
+executes the ensurepip package, but does not add or remove any of its
+own files. (It is represented as a package because of its
+installed/uninstalled nature, as opposed to the "precompile standard
+library" option, for example.) Dependencies between packages are handled
+by the bundle, but packages should detect when dependencies are missing
+and raise an error.
+
+Packages that include a lot of files may use an InstallFiles element in
+the .wixproj file to generate sources. See lib/lib.wixproj for an
+example, and msi.targets and csv_to_wxs.py for the implementation. This
+element is also responsible for generating the code for cleaning up and
+removing __pycache__ folders in any directory containing .py files.
+
+All packages are built with the Tools/msi/common.wxs file, and so any
+directory or property in this file may be referenced. Of particular
+interest:
+
+ REGISTRYKEY (property)
+ The registry key for the current installation.
+
+ InstallDirectory (directory)
+ The root install directory for the current installation. Subdirectories
+ are also specified in this file (DLLs, Lib, etc.)
+
+ MenuDir (directory)
+ The Start Menu folder for the current installation.
+
+ UpgradeTable (property)
+ Every package should reference this property to include upgrade
+ information.
+
+ OptionalFeature (Component)
+ Packages that may be enabled or disabled should reference this component
+ and have an OPTIONAL_FEATURES entry in the bootstrap application to
+ properly handle Modify and Upgrade.
+
+The .wxl_template file is specially handled by the build system for this
+project to perform {{substitutions}} as defined in msi.targets. They
+should be included in projects as <WxlTemplate> items, where .wxl files
+are normally included as <EmbeddedResource> items.
+
+Bundle
+------
+
+The bundle is compiled to the main EXE entry point that for most users
+will represent the Python installer. It is built from Tools/msi/bundle
+with packages references in Tools/msi/bundle/packagegroups.
+
+Build logic for the bundle is in bundle.targets, but should be invoked
+through one of the .wixproj files as described in Building the
+Installer.
+
+The UI is separated between Default.thm (UI layout), Default.wxl
+(strings), bundle.wxs (properties) and the bootstrap application.
+Bundle.wxs also contains the chain, which is the list of packages to
+install and the order they should be installed in. These refer to named
+package groups in bundle/packagegroups.
+
+Each package group specifies one or more packages to install. Most
+packages require two separate entries to support both per-user and
+all-users installations. Because these reuse the same package, it does
+not increase the overall size of the package.
+
+Package groups refer to payload groups, which allow better control over
+embedding and downloading files than the default settings. Whether files
+are embedded and where they are downloaded from depends on settings
+created by the project files.
+
+Package references can include install conditions that determine when to
+install the package. When a package is a dependency for others, the
+condition should be crafted to ensure it is installed.
+
+MSI packages are installed or uninstalled based on their current state
+and the install condition. This makes them most suitable for features
+that are clearly present or absent from the user's machine.
+
+EXE packages are executed based on a customisable condition that can be
+omitted. This makes them suitable for pre- or post-install tasks that
+need to run regardless of whether features have been added or removed.
+
+Bootstrap Application
+---------------------
+
+The bootstrap application is a C++ application that controls the UI and
+installation. While it does not directly compile into the main EXE of
+the installer, it forms the main active component. Most of the
+installation functionality is provided by WiX, and so the bootstrap
+application is predominantly responsible for the code behind the UI that
+is defined in the Default.thm file. The bootstrap application code is in
+bundle/bootstrap and is built automatically when building the bundle.
+
+Installation Layout
+===================
+
+There are two installation layouts for Python on Windows, with the only
+differences being supporting files. A layout is selected implicitly
+based on whether the install is for all users of the machine or just for
+the user performing the installation.
+
+The default installation location when installing for all users is
+"%ProgramFiles%\Python3X" for the 64-bit interpreter and
+"%ProgramFiles(x86)%\Python3X-32" for the 32-bit interpreter. (Note that
+the latter path is equivalent to "%ProgramFiles%\Python3X-32" when
+running a 32-bit version of Windows.) This location requires
+administrative privileges to install or later modify the installation.
+
+The default installation location when installing for the current user
+is "%LocalAppData%\Programs\Python\Python3X" for the 64-bit interpreter
+and "%LocalAppData%\Programs\Python\Python3X-32" for the 32-bit
+interpreter. Only the current user can access this location. This
+provides a suitable level of protection against malicious modification
+of Python's files.
+
+(Default installation locations are set in Tools\msi\bundle\bundle.wxs.)
+
+Within this install directory is the following approximate layout:
+
+.\python[w].exe The core executable files
+.\DLLs Stdlib extensions (*.pyd) and dependencies
+.\Doc Documentation (*.chm)
+.\include Development headers (*.h)
+.\Lib Standard library
+.\Lib\test Test suite
+.\libs Development libraries (*.lib)
+.\Scripts Launcher scripts (*.exe, *.py)
+.\tcl Tcl dependencies (*.dll, *.tcl and others)
+.\Tools Tool scripts (*.py)
+
+When installed for all users, the following files are installed to
+either "%SystemRoot%\System32" or "%SystemRoot%\SysWOW64" as
+appropriate. For the current user, they are installed in the Python
+install directory.
+
+.\python3x.dll The core interpreter
+.\python3.dll The stable ABI reference
+
+When installed for all users, the following files are installed to
+"%SystemRoot%" (typically "C:\Windows") to ensure they are always
+available on PATH. (See Launching Python below.) For the current user,
+they are installed in "%LocalAppData%\Programs\Python\PyLauncher".
+
+.\py[w].exe PEP 397 launcher
+
+System Settings
+===============
+
+On installation, registry keys are created so that other applications
+can locate and identify installations of Python. The locations of these
+keys vary based on the install type.
+
+For 64-bit interpreters installed for all users, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X
+
+For 32-bit interpreters installed for all users on a 64-bit operating
+system, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\3.X-32
+
+For 32-bit interpreters installed for all users on a 32-bit operating
+system, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X-32
+
+For 64-bit interpreters installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\PythonCore\3.X
+
+For 32-bit interpreters installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\PythonCore\3.X-32
+
+When the core Python executables are installed, a key "InstallPath" is
+created within the root key with its default value set to the
+executable's install directory. A value named "ExecutablePath" is added
+with the full path to the main Python interpreter, and a key
+"InstallGroup" is created with its default value set to the product
+name "Python 3.X".
+
+When the Python standard library is installed, a key "PythonPath" is
+created within the root key with its default value set to the full path
+to the Lib folder followed by the path to the DLLs folder, separated by
+a semicolon.
+
+When the documentation is installed, a key "Help" is created within the
+root key, with a subkey "Main Python Documentation" with its default
+value set to the full path to the installed CHM file.
+
+
+The py.exe launcher is installed as part of a regular Python install,
+but using a separate mechanism that allows it to more easily span
+versions of Python. As a result, it has different root keys for its
+registry entries:
+
+When installed for all users on a 64-bit operating system, the
+launcher's root key is:
+ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\Launcher
+
+When installed for all users on a 32-bit operating system, the
+launcher's root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\Launcher
+
+When installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\Launcher
+
+When the launcher is installed, a key "InstallPath" is created within
+its root key with its default value set to the launcher's install
+directory. File associations are also created for .py, .pyw, .pyc and
+.pyo files.
+
+Launching Python
+================
+
+When a feature offering user entry points in the Start Menu is
+installed, a folder "Python 3.X" is created. Every shortcut should be
+created within this folder, and each shortcut should include the version
+and platform to allow users to identify the shortcut in a search results
+page.
+
+The core Python executables creates a shortcut "Python 3.X (32-bit)" or
+"Python 3.X (64-bit)" depending on the interpreter.
+
+The documentation creates a shortcut "Python 3.X 32-bit Manuals" or
+"Python 3.X 64-bit Manuals". The documentation is identical for all
+platforms, but the shortcuts need to be separate to avoid uninstallation
+conflicts.
+
+Installing IDLE creates a shortcut "IDLE (Python 3.X 32-bit)" or "IDLE
+(Python 3.X 64-bit)" depending on the interpreter.
+
+
+For users who often launch Python from a Command Prompt, an option is
+provided to add the directory containing python.exe to the user or
+system PATH variable. If the option is selected, the install directory
+and the Scripts directory will be added at the start of the system PATH
+for an all users install and the user PATH for a per-user install.
+
+When the user only has one version of Python installed, this will behave
+as expected. However, because Windows searches the system PATH before
+the user PATH, users cannot override a system-wide installation of
+Python on their PATH. Further, because the installer can only prepend to
+the path, later installations of Python will take precedence over
+earlier installations, regardless of interpreter version.
+
+Because it is not possible to automatically create a sensible PATH
+configuration, users are recommended to use the py.exe launcher and
+manually modify their PATH variable to add Scripts directories in their
+preferred order. System-wide installations of Python should consider not
+modifying PATH, or using an alternative technology to modify their
+users' PATH variables.
+
+
+The py.exe launcher is recommended because it uses a consistent and
+sensible search order for Python installations. User installations are
+preferred over system-wide installs, and later versions are preferred
+regardless of installation order (with the exception that py.exe
+currently prefers 2.x versions over 3.x versions without the -3 command
+line argument).
+
+For both 32-bit and 64-bit interpreters, the 32-bit version of the
+launcher is installed. This ensures that the search order is always
+consistent (as the 64-bit launcher is subtly different from the 32-bit
+launcher) and also avoids the need to install it multiple times. Future
+versions of Python will upgrade the launcher in-place, using Windows
+Installer's upgrade functionality to avoid conflicts with earlier
+installed versions.
+
+When installed, file associations are created for .py, .pyc and .pyo
+files to launch with py.exe and .pyw files to launch with pyw.exe. This
+makes Python files respect shebang lines by default and also avoids
+conflicts between multiple Python installations.
+
+
+Repair, Modify and Uninstall
+============================
+
+After installation, Python may be modified, repaired or uninstalled by
+running the original EXE again or via the Programs and Features applet
+(formerly known as Add or Remove Programs).
+
+Modifications allow features to be added or removed. The install
+directory and kind (all users/single user) cannot be modified. Because
+Windows Installer caches installation packages, removing features will
+not require internet access unless the package cache has been corrupted
+or deleted. Adding features that were not previously installed and are
+not embedded or otherwise available will require internet access.
+
+Repairing will rerun the installation for all currently installed
+features, restoring files and registry keys that have been modified or
+removed. This operation generally will not redownload any files unless
+the cached packages have been corrupted or deleted.
+
+Removing Python will clean up all the files and registry keys that were
+created by the installer, as well as __pycache__ folders that are
+explicitly handled by the installer. Python packages installed later
+using a tool like pip will not be removed. Some components may be
+installed by other installers and these will not be removed if another
+product has a dependency on them.
diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat
new file mode 100644
index 0000000000..a61ace8a95
--- /dev/null
+++ b/Tools/msi/build.bat
@@ -0,0 +1,76 @@
+@echo off
+setlocal
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set BUILDX86=
+set BUILDX64=
+set BUILDDOC=
+set BUILDTEST=--test-marker
+set BUILDPACK=
+set REBUILD=
+
+:CheckOpts
+if "%~1" EQU "-h" goto Help
+if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
+if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
+if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
+if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
+
+if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
+
+call "%D%get_externals.bat"
+
+call "%PCBUILD%env.bat" x86
+
+if defined BUILDX86 (
+ call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+ call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+)
+if defined BUILDX64 (
+ call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+ call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+)
+
+if defined BUILDDOC (
+ call "%PCBUILD%..\Doc\make.bat" htmlhelp
+ if errorlevel 1 goto :eof
+)
+
+set BUILD_CMD="%D%bundle\snapshot.wixproj"
+if defined BUILDTEST (
+ set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
+)
+if defined BUILDPACK (
+ set BUILD_CMD=%BUILD_CMD% /p:Pack=true
+)
+if defined REBUILD (
+ set BUILD_CMD=%BUILD_CMD% /t:Rebuild
+)
+
+if defined BUILDX86 (
+ msbuild %BUILD_CMD%
+ if errorlevel 1 goto :eof
+)
+if defined BUILDX64 (
+ msbuild /p:Platform=x64 %BUILD_CMD%
+ if errorlevel 1 goto :eof
+)
+
+exit /B 0
+
+:Help
+echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
+echo.
+echo -x86 Build x86 installers
+echo -x64 Build x64 installers
+echo --doc Build CHM documentation
+echo --no-test-marker Build without test markers
+echo --pack Embed core MSIs into installer
+echo -r Rebuild rather than incremental build
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat
new file mode 100644
index 0000000000..2eae07ad4a
--- /dev/null
+++ b/Tools/msi/buildrelease.bat
@@ -0,0 +1,228 @@
+@setlocal
+@echo off
+
+rem This script is intended for building official releases of Python.
+rem To use it to build alternative releases, you should clone this file
+rem and modify the following three URIs.
+
+rem These two will ensure that your release can be installed
+rem alongside an official Python release, by modifying the GUIDs used
+rem for all components.
+rem
+rem The following substitutions will be applied to the release URI:
+rem Variable Description Example
+rem {arch} architecture amd64, win32
+set RELEASE_URI=http://www.python.org/{arch}
+
+rem This is the URL that will be used to download installation files.
+rem The files available from the default URL *will* conflict with your
+rem installer. Trust me, you don't want them, even if it seems like a
+rem good idea.
+rem
+rem The following substitutions will be applied to the download URL:
+rem Variable Description Example
+rem {version} version number 3.5.0
+rem {arch} architecture amd64, win32
+rem {releasename} release name a1, b2, rc3 (or blank for final)
+rem {msi} MSI filename core.msi
+set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+set EXTERNALS=%D%..\..\externals\windows-installer\
+
+set BUILDX86=
+set BUILDX64=
+set TARGET=Rebuild
+set TESTTARGETDIR=
+set PGO=
+
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
+if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
+if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
+
+if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
+
+if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
+
+call "%D%get_externals.bat"
+
+:builddoc
+if "%SKIPBUILD%" EQU "1" goto skipdoc
+if "%SKIPDOC%" EQU "1" goto skipdoc
+
+if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1
+if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1
+
+call "%D%..\..\doc\make.bat" htmlhelp
+if errorlevel 1 goto :eof
+:skipdoc
+
+where hg /q || echo Cannot find Mercurial on PATH && exit /B 1
+
+where dlltool /q && goto skipdlltoolsearch
+set _DLLTOOL_PATH=
+where /R "%EXTERNALS%\" dlltool > "%TEMP%\dlltool.loc" 2> nul && set /P _DLLTOOL_PATH= < "%TEMP%\dlltool.loc" & del "%TEMP%\dlltool.loc"
+if not exist "%_DLLTOOL_PATH%" echo Cannot find binutils on PATH or in external && exit /B 1
+for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
+set _DLLTOOL_PATH=
+:skipdlltoolsearch
+
+if defined BUILDX86 (
+ call :build x86
+ if errorlevel 1 exit /B
+)
+
+if defined BUILDX64 (
+ call :build x64 "%PGO%"
+ if errorlevel 1 exit /B
+)
+
+if defined TESTTARGETDIR (
+ call "%D%testrelease.bat" -t "%TESTTARGETDIR%"
+)
+
+exit /B 0
+
+:build
+@setlocal
+@echo off
+
+if "%1" EQU "x86" (
+ call "%PCBUILD%env.bat" x86
+ set BUILD=%PCBUILD%win32\
+ set BUILD_PLAT=Win32
+ set OUTDIR_PLAT=win32
+ set OBJDIR_PLAT=x86
+) else if "%~2" NEQ "" (
+ call "%PCBUILD%env.bat" amd64
+ set PGO=%~2
+ set BUILD=%PCBUILD%amd64-pgo\
+ set BUILD_PLAT=x64
+ set OUTDIR_PLAT=amd64
+ set OBJDIR_PLAT=x64
+) else (
+ call "%PCBUILD%env.bat" amd64
+ set BUILD=%PCBUILD%amd64\
+ set BUILD_PLAT=x64
+ set OUTDIR_PLAT=amd64
+ set OBJDIR_PLAT=x64
+)
+
+if exist "%BUILD%en-us" (
+ echo Deleting %BUILD%en-us
+ rmdir /q/s "%BUILD%en-us"
+ if errorlevel 1 exit /B
+)
+
+if exist "%D%obj\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
+ @rem build.bat turns echo back on, so we disable it again
+ @echo off
+
+ if "%PGO%" EQU "" (
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
+ ) else (
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGInstrument -t %TARGET% %CERTOPTS%
+ @if errorlevel 1 exit /B
+
+ @del "%BUILD%*.pgc"
+ if "%PGO%" EQU "default" (
+ "%BUILD%python.exe" -m test -q --pgo
+ ) else if "%PGO%" EQU "default2" (
+ "%BUILD%python.exe" -m test -r -q --pgo
+ "%BUILD%python.exe" -m test -r -q --pgo
+ ) else if "%PGO%" EQU "default10" (
+ for /L %%i in (0, 1, 9) do "%BUILD%python.exe" -m test -q -r --pgo
+ ) else if "%PGO%" EQU "pybench" (
+ "%BUILD%python.exe" "%PCBUILD%..\Tools\pybench\pybench.py"
+ ) else (
+ "%BUILD%python.exe" %PGO%
+ )
+
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGUpdate -t Build %CERTOPTS%
+ )
+ @if errorlevel 1 exit /B
+ @echo off
+)
+
+set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%
+if "%PGO%" NEQ "" set BUILDOPTS=%BUILDOPTS% /p:PGOBuildPath=%BUILD%
+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
+
+msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
+
+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%"
+ copy /Y "%BUILD%en-us\*.msu" "%OUTDIR%\%OUTDIR_PLAT%"
+)
+
+exit /B 0
+
+:Help
+echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
+echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
+echo [-h]
+echo.
+echo --out (-o) Specify an additional output directory for installers
+echo -x86 Build x86 installers
+echo -x64 Build x64 installers
+echo --build (-b) Incrementally build Python rather than rebuilding
+echo --skip-build (-B) Do not build Python (just do the installers)
+echo --skip-doc (-D) Do not build documentation
+echo --pgo Build x64 installers using PGO
+echo --download Specify the full download URL for MSIs
+echo --test Specify the test directory to run the installer tests
+echo -h Display this help information
+echo.
+echo If no architecture is specified, all architectures will be built.
+echo If --test is not specified, the installer tests are not run.
+echo.
+echo For the --pgo option, any Python command line can be used as well as the
+echo following shortcuts:
+echo Shortcut Description
+echo default Test suite with --pgo
+echo default2 2x test suite with --pgo and randomized test order
+echo default10 10x test suite with --pgo and randomized test order
+echo pybench pybench script
+echo.
+echo The following substitutions will be applied to the download URL:
+echo Variable Description Example
+echo {version} version number 3.5.0
+echo {arch} architecture amd64, win32
+echo {releasename} release name a1, b2, rc3 (or blank for final)
+echo {msi} MSI filename core.msi
diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm
new file mode 100644
index 0000000000..4d9c97a194
--- /dev/null
+++ b/Tools/msi/bundle/Default.thm
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
+ <Window Width="670" Height="412" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
+ <Font Id="0" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="1" Height="-26" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="2" Height="-24" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
+ <Font Id="3" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="4" Height="-14" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
+ <Font Id="5" Height="-14" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
+
+ <Page Name="Help">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext X="185" Y="50" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Hypertext>
+ <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+ <Page Name="Install">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
+
+ <Button Name="InstallButton" X="185" Y="101" Width="-11" Height="109" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallButton)</Button>
+ <Button Name="InstallCustomButton" X="185" Y="221" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
+
+ <Checkbox Name="InstallLauncherAllUsers" X="185" Y="-37" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortInstallLauncherAllUsersLabel)</Checkbox>
+ <Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Upgrade">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallUpgradeHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallUpgradeMessage)</Text>
+
+ <Button Name="InstallUpgradeButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeButton)</Button>
+ <Button Name="InstallUpgradeCustomButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeCustomButton)</Button>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="SimpleInstall">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Button Name="InstallSimpleButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Custom1">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom1Header)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Checkbox Name="Include_doc" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_docLabel)</Checkbox>
+ <Text X="205" Y="76" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_docHelpLabel)</Text>
+
+ <Checkbox Name="Include_pip" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_pipLabel)</Checkbox>
+ <Text X="205" Y="126" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_pipHelpLabel)</Text>
+
+ <Checkbox Name="Include_tcltk" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_tcltkLabel)</Checkbox>
+ <Text X="205" Y="176" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_tcltkHelpLabel)</Text>
+
+ <Checkbox Name="Include_test" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_testLabel)</Checkbox>
+ <Text X="205" Y="226" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_testHelpLabel)</Text>
+
+ <Checkbox Name="Include_launcher" X="185" Y="251" Width="100" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_launcherLabel)</Checkbox>
+ <Checkbox Name="CustomInstallLauncherAllUsers" X="285" Y="251" Width="-11" Height="24" TabStop="yes" FontId="3">#(loc.InstallLauncherAllUsersLabel)</Checkbox>
+ <Text Name="Include_launcherHelp" X="205" Y="276" Width="-11" Height="24" TabStop="no" FontId="5"></Text>
+
+ <Button Name="Custom1BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
+ <Button Name="CustomNextButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomNextButton)</Button>
+ <Button Name="Custom1CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Custom2">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom2Header)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Checkbox Name="InstallAllUsers" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
+ <Checkbox Name="AssociateFiles" X="185" Y="76" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
+ <Checkbox Name="Shortcuts" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.ShortcutsLabel)</Checkbox>
+ <Checkbox Name="PrependPath" X="185" Y="126" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
+ <Checkbox Name="CompileAll" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
+ <Checkbox Name="Include_symbols" X="185" Y="176" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
+ <Checkbox Name="Include_debug" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
+
+ <Text X="185" Y="256" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
+ <Editbox Name="TargetDir" X="185" Y="277" Width="-101" Height="27" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
+ <Button Name="CustomBrowseButton" X="-11" Y="276" Width="85" Height="27" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
+ <Text Name="CustomBrowseButtonLabel" X="185" Y="306" Width="-91" Height="35" FontId="5" HideWhenDisabled="yes">#(loc.CustomLocationHelpLabel)</Text>
+
+ <Button Name="Custom2BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
+ <Button Name="CustomInstallButton" X="-101" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
+ <Button Name="Custom2CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Progress">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="111" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
+ <Text Name="OverallProgressPackageText" X="185" Y="146" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
+ <Progressbar Name="OverallCalculatedProgressbar" X="185" Y="171" Width="-11" Height="24" />
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Modify">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Button Name="ModifyButton" X="185" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.ModifyModifyButton)</Button>
+ <Button Name="RepairButton" X="185" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyRepairButton)</Button>
+ <Button Name="UninstallButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyUninstallButton)</Button>
+
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Success">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext Name="SuccessText" X="205" Y="71" Width="-31" Height="100" FontId="3" DisablePrefix="yes"></Hypertext>
+
+ <Text Name="SuccessRestartText" X="205" 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="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
+ <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+ <Page Name="Failure">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.FailureHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext Name="FailureLogFileLink" X="205" Y="71" Width="-11" Height="60" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
+ <Hypertext Name="FailureMessageText" X="205" Y="151" Width="-11" Height="120" FontId="3" TabStop="yes" HideWhenDisabled="yes"></Hypertext>
+ <Text Name="FailureRestartText" X="205" Y="-40" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
+ <Button Name="FailureRestartButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
+ <Button Name="FailureCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+</Theme> \ No newline at end of file
diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl
new file mode 100644
index 0000000000..697066b2e1
--- /dev/null
+++ b/Tools/msi/bundle/Default.wxl
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Caption">[WixBundleName] Setup</String>
+ <String Id="Title">[WixBundleName]</String>
+ <String Id="Installing">Installing</String>
+ <String Id="Installation">Setup</String>
+ <String Id="Modifying">Updating</String>
+ <String Id="Modification">Modify</String>
+ <String Id="Repairing">Repairing</String>
+ <String Id="Repair">Repair</String>
+ <String Id="Uninstalling">Removing</String>
+ <String Id="Uninstallation">Uninstall</String>
+
+ <String Id="ElevateForCRTInstall">You will be prompted for Administrator privileges to install a C Runtime Library update (KB2999226).
+
+
+Continue?</String>
+
+ <String Id="CancelButton">&amp;Cancel</String>
+ <String Id="CloseButton">&amp;Close</String>
+ <String Id="InstallHeader">Install [WixBundleName]</String>
+ <String Id="InstallMessage">Select Install Now to install Python with default settings, or choose Customize to enable or disable features.</String>
+ <String Id="InstallVersion">Version [WixBundleVersion]</String>
+ <String Id="InstallUpgradeHeader">Upgrade to [WixBundleName]</String>
+ <String Id="InstallUpgradeMessage">Select Upgrade Now to keep your current settings, or choose Customize to enable or disable features.</String>
+ <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
+ <String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
+ <String Id="HelpHeader">Setup Help</String>
+ <String Id="HelpText">Visit &lt;a href="http://docs.python.org/[ShortVersion]/using/windows.html"&gt;docs.python.org/[ShortVersion]/using/windows.html&lt;/a&gt; for the full list of options, including the ability to enable and disable specific features.
+
+"/passive" to display progress without requiring user interaction
+
+"/quiet" to install/uninstall without displaying any UI
+
+"/simple" to prevent user customization
+
+"/uninstall" to remove Python (without confirmation)
+
+"/layout [\[]directory[\]]" to pre-download all components
+
+"/log [\[]filename[\]]" to specify log files location</String>
+ <String Id="InstallLicenseLinkText">[WixBundleName] &lt;a href="#"&gt;license terms&lt;/a&gt;.</String>
+ <String Id="InstallAcceptCheckbox">I &amp;agree to the license terms and conditions</String>
+ <String Id="InstallButton">&amp;Install Now</String>
+ <String Id="InstallButtonNote">[TargetDir]
+
+Includes IDLE, pip and documentation
+Creates shortcuts and file associations</String>
+ <String Id="InstallCustomButton">C&amp;ustomize installation</String>
+ <String Id="InstallCustomButtonNote">Choose location and features</String>
+ <String Id="InstallSimpleButton">&amp;Install</String>
+ <String Id="InstallSimpleButtonNote">Use settings preselected by your administrator
+
+[SimpleInstallDescription]</String>
+ <String Id="InstallUpgradeButton">Up&amp;grade Now</String>
+ <String Id="InstallUpgradeButtonNote">[TargetDir]
+
+Replaces your existing installation without changing settings.
+Select Customize to review current options.</String>
+ <String Id="InstallUpgradeCustomButton">C&amp;ustomize installation</String>
+ <String Id="InstallUpgradeCustomButtonNote">Choose location and features</String>
+ <String Id="Custom1Header">Optional Features</String>
+ <String Id="Custom2Header">Advanced Options</String>
+ <String Id="CustomLocationLabel">Customize install location</String>
+ <String Id="CustomLocationHelpLabel">You will require write permissions for the selected location.</String>
+ <String Id="CustomInstallButton">&amp;Install</String>
+ <String Id="CustomNextButton">&amp;Next</String>
+ <String Id="CustomBackButton">&amp;Back</String>
+ <String Id="CustomBrowseButton">B&amp;rowse</String>
+ <String Id="Include_docLabel">&amp;Documentation</String>
+ <String Id="Include_docHelpLabel">Installs the Python documentation file.</String>
+ <String Id="Include_pipLabel">&amp;pip</String>
+ <String Id="Include_pipHelpLabel">Installs pip, which can download and install other Python packages.</String>
+ <String Id="Include_tcltkLabel">tcl/tk and &amp;IDLE</String>
+ <String Id="Include_tcltkHelpLabel">Installs tkinter and the IDLE development environment.</String>
+ <String Id="Include_testLabel">Python &amp;test suite</String>
+ <String Id="Include_testHelpLabel">Installs the standard library test suite.</String>
+ <String Id="Include_launcherLabel">py &amp;launcher</String>
+ <String Id="Include_launcherHelp">Installs the global 'py' launcher to make it easier to start Python.</String>
+ <String Id="Include_launcherRemove">Use Programs and Features to remove the 'py' launcher.</String>
+ <String Id="Include_launcherUpgrade">Upgrades the global 'py' launcher from the previous version.</String>
+
+ <String Id="AssociateFilesLabel">Associate &amp;files with Python (requires the py launcher)</String>
+ <String Id="ShortcutsLabel">Create shortcuts for installed applications</String>
+ <String Id="PrependPathLabel">Add Python to &amp;environment variables</String>
+ <String Id="ShortPrependPathLabel">Add &amp;Python [ShortVersion] to PATH</String>
+ <String Id="InstallAllUsersLabel">Install for &amp;all users</String>
+ <String Id="InstallLauncherAllUsersLabel">for &amp;all users (requires elevation)</String>
+ <String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
+ <String Id="PrecompileLabel">&amp;Precompile standard library</String>
+ <String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
+ <String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2015 or later)</String>
+
+ <String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
+ <String Id="ProgressLabel">[ActionLikeInstalling]:</String>
+ <String Id="OverallProgressPackageText">Initializing...</String>
+ <String Id="ModifyHeader">Modify Setup</String>
+ <String Id="ModifyModifyButton">&amp;Modify</String>
+ <String Id="ModifyButtonNote">Add or remove individual features.</String>
+ <String Id="ModifyRepairButton">&amp;Repair</String>
+ <String Id="RepairButtonNote">Ensure all current features are correctly installed.</String>
+ <String Id="ModifyUninstallButton">&amp;Uninstall</String>
+ <String Id="UninstallButtonNote">Remove the entire [WixBundleName] installation.</String>
+ <String Id="SuccessHeader">[ActionLikeInstallation] was successful</String>
+ <String Id="SuccessLaunchButton">&amp;Launch</String>
+ <String Id="SuccessRestartText">You may need to restart your computer to finish updating files.</String>
+ <String Id="SuccessRestartButton">&amp;Restart</String>
+ <String Id="SuccessInstallMessage">Special thanks to Mark Hammond, without whose years of freely shared Windows expertise, Python for Windows would still be Python for DOS.
+
+New to Python? Start with the &lt;a href="https://docs.python.org/[ShortVersion]/tutorial/index.html"&gt;online tutorial&lt;/a&gt; and &lt;a href="https://docs.python.org/[ShortVersion]/index.html"&gt;documentation&lt;/a&gt;.
+
+See &lt;a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html"&gt;what's new&lt;/a&gt; in this release.</String>
+ <String Id="SuccessModifyMessage">Thank you for using [WixBundleName].</String>
+ <String Id="SuccessRepairMessage">Thank you for using [WixBundleName].
+
+Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you continue to encounter issues.</String>
+ <String Id="SuccessRemoveMessage">Thank you for using [WixBundleName].
+
+Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you encountered problems.</String>
+ <String Id="FailureHeader">Setup failed</String>
+ <String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.</String>
+ <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
+ <String Id="FailureRestartButton">&amp;Restart</String>
+ <String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
+
+ <String Id="FailureWin7MissingSP1">Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName].
+
+Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
+ <String Id="FailureVistaMissingSP2">Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName].
+
+Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
+ <String Id="FailureXPOrEarlier">Windows Vista or later is required to install and use [WixBundleName].
+
+Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
+</WixLocalization>
diff --git a/Tools/msi/bundle/SideBar.png b/Tools/msi/bundle/SideBar.png
new file mode 100644
index 0000000000..a23ce5e145
--- /dev/null
+++ b/Tools/msi/bundle/SideBar.png
Binary files differ
diff --git a/Tools/msi/bundle/bootstrap/LICENSE.txt b/Tools/msi/bundle/bootstrap/LICENSE.txt
new file mode 100644
index 0000000000..5791a7e81d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/LICENSE.txt
@@ -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.
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
new file mode 100644
index 0000000000..1462d7b67e
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -0,0 +1,3257 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="WixStandardBootstrapperApplication.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>
+//-------------------------------------------------------------------------------------------------
+
+
+#include "pch.h"
+
+static const LPCWSTR PYBA_WINDOW_CLASS = L"PythonBA";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_TARGET_PATH = L"LaunchTarget";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID = L"LaunchTargetElevatedId";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_ARGUMENTS = L"LaunchArguments";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_HIDDEN = L"LaunchHidden";
+static const DWORD PYBA_ACQUIRE_PERCENTAGE = 30;
+static const LPCWSTR PYBA_VARIABLE_BUNDLE_FILE_VERSION = L"WixBundleFileVersion";
+
+enum PYBA_STATE {
+ PYBA_STATE_INITIALIZING,
+ PYBA_STATE_INITIALIZED,
+ PYBA_STATE_HELP,
+ PYBA_STATE_DETECTING,
+ PYBA_STATE_DETECTED,
+ PYBA_STATE_PLANNING,
+ PYBA_STATE_PLANNED,
+ PYBA_STATE_APPLYING,
+ PYBA_STATE_CACHING,
+ PYBA_STATE_CACHED,
+ PYBA_STATE_EXECUTING,
+ PYBA_STATE_EXECUTED,
+ PYBA_STATE_APPLIED,
+ PYBA_STATE_FAILED,
+};
+
+static const int WM_PYBA_SHOW_HELP = WM_APP + 100;
+static const int WM_PYBA_DETECT_PACKAGES = WM_APP + 101;
+static const int WM_PYBA_PLAN_PACKAGES = WM_APP + 102;
+static const int WM_PYBA_APPLY_PACKAGES = WM_APP + 103;
+static const int WM_PYBA_CHANGE_STATE = WM_APP + 104;
+static const int WM_PYBA_SHOW_FAILURE = WM_APP + 105;
+
+// This enum must be kept in the same order as the PAGE_NAMES array.
+enum PAGE {
+ PAGE_LOADING,
+ PAGE_HELP,
+ PAGE_INSTALL,
+ PAGE_UPGRADE,
+ PAGE_SIMPLE_INSTALL,
+ PAGE_CUSTOM1,
+ PAGE_CUSTOM2,
+ PAGE_MODIFY,
+ PAGE_PROGRESS,
+ PAGE_PROGRESS_PASSIVE,
+ PAGE_SUCCESS,
+ PAGE_FAILURE,
+ COUNT_PAGE,
+};
+
+// This array must be kept in the same order as the PAGE enum.
+static LPCWSTR PAGE_NAMES[] = {
+ L"Loading",
+ L"Help",
+ L"Install",
+ L"Upgrade",
+ L"SimpleInstall",
+ L"Custom1",
+ L"Custom2",
+ L"Modify",
+ L"Progress",
+ L"ProgressPassive",
+ L"Success",
+ L"Failure",
+};
+
+enum CONTROL_ID {
+ // Non-paged controls
+ ID_CLOSE_BUTTON = THEME_FIRST_ASSIGN_CONTROL_ID,
+ ID_MINIMIZE_BUTTON,
+
+ // Welcome page
+ ID_INSTALL_BUTTON,
+ ID_INSTALL_CUSTOM_BUTTON,
+ ID_INSTALL_SIMPLE_BUTTON,
+ ID_INSTALL_UPGRADE_BUTTON,
+ ID_INSTALL_UPGRADE_CUSTOM_BUTTON,
+ ID_INSTALL_CANCEL_BUTTON,
+ ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
+
+ // Customize Page
+ ID_TARGETDIR_EDITBOX,
+ ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX,
+ ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX,
+ ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
+ ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL,
+ ID_CUSTOM_COMPILE_ALL_CHECKBOX,
+ ID_CUSTOM_BROWSE_BUTTON,
+ ID_CUSTOM_BROWSE_BUTTON_LABEL,
+ ID_CUSTOM_INSTALL_BUTTON,
+ ID_CUSTOM_NEXT_BUTTON,
+ ID_CUSTOM1_BACK_BUTTON,
+ ID_CUSTOM2_BACK_BUTTON,
+ ID_CUSTOM1_CANCEL_BUTTON,
+ ID_CUSTOM2_CANCEL_BUTTON,
+
+ // Modify page
+ ID_MODIFY_BUTTON,
+ ID_REPAIR_BUTTON,
+ ID_UNINSTALL_BUTTON,
+ ID_MODIFY_CANCEL_BUTTON,
+
+ // Progress page
+ ID_CACHE_PROGRESS_PACKAGE_TEXT,
+ ID_CACHE_PROGRESS_BAR,
+ ID_CACHE_PROGRESS_TEXT,
+
+ ID_EXECUTE_PROGRESS_PACKAGE_TEXT,
+ ID_EXECUTE_PROGRESS_BAR,
+ ID_EXECUTE_PROGRESS_TEXT,
+ ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT,
+
+ ID_OVERALL_PROGRESS_PACKAGE_TEXT,
+ ID_OVERALL_PROGRESS_BAR,
+ ID_OVERALL_CALCULATED_PROGRESS_BAR,
+ ID_OVERALL_PROGRESS_TEXT,
+
+ ID_PROGRESS_CANCEL_BUTTON,
+
+ // Success page
+ ID_LAUNCH_BUTTON,
+ ID_SUCCESS_TEXT,
+ ID_SUCCESS_RESTART_TEXT,
+ ID_SUCCESS_RESTART_BUTTON,
+ ID_SUCCESS_CANCEL_BUTTON,
+
+ // Failure page
+ ID_FAILURE_LOGFILE_LINK,
+ ID_FAILURE_MESSAGE_TEXT,
+ ID_FAILURE_RESTART_TEXT,
+ ID_FAILURE_RESTART_BUTTON,
+ ID_FAILURE_CANCEL_BUTTON
+};
+
+static THEME_ASSIGN_CONTROL_ID CONTROL_ID_NAMES[] = {
+ { ID_CLOSE_BUTTON, L"CloseButton" },
+ { ID_MINIMIZE_BUTTON, L"MinimizeButton" },
+
+ { ID_INSTALL_BUTTON, L"InstallButton" },
+ { ID_INSTALL_CUSTOM_BUTTON, L"InstallCustomButton" },
+ { ID_INSTALL_SIMPLE_BUTTON, L"InstallSimpleButton" },
+ { ID_INSTALL_UPGRADE_BUTTON, L"InstallUpgradeButton" },
+ { ID_INSTALL_UPGRADE_CUSTOM_BUTTON, L"InstallUpgradeCustomButton" },
+ { ID_INSTALL_CANCEL_BUTTON, L"InstallCancelButton" },
+ { ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"InstallLauncherAllUsers" },
+
+ { ID_TARGETDIR_EDITBOX, L"TargetDir" },
+ { ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, L"AssociateFiles" },
+ { ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX, L"InstallAllUsers" },
+ { ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"CustomInstallLauncherAllUsers" },
+ { ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL, L"Include_launcherHelp" },
+ { ID_CUSTOM_COMPILE_ALL_CHECKBOX, L"CompileAll" },
+ { ID_CUSTOM_BROWSE_BUTTON, L"CustomBrowseButton" },
+ { ID_CUSTOM_BROWSE_BUTTON_LABEL, L"CustomBrowseButtonLabel" },
+ { ID_CUSTOM_INSTALL_BUTTON, L"CustomInstallButton" },
+ { ID_CUSTOM_NEXT_BUTTON, L"CustomNextButton" },
+ { ID_CUSTOM1_BACK_BUTTON, L"Custom1BackButton" },
+ { ID_CUSTOM2_BACK_BUTTON, L"Custom2BackButton" },
+ { ID_CUSTOM1_CANCEL_BUTTON, L"Custom1CancelButton" },
+ { ID_CUSTOM2_CANCEL_BUTTON, L"Custom2CancelButton" },
+
+ { ID_MODIFY_BUTTON, L"ModifyButton" },
+ { ID_REPAIR_BUTTON, L"RepairButton" },
+ { ID_UNINSTALL_BUTTON, L"UninstallButton" },
+ { ID_MODIFY_CANCEL_BUTTON, L"ModifyCancelButton" },
+
+ { ID_CACHE_PROGRESS_PACKAGE_TEXT, L"CacheProgressPackageText" },
+ { ID_CACHE_PROGRESS_BAR, L"CacheProgressbar" },
+ { ID_CACHE_PROGRESS_TEXT, L"CacheProgressText" },
+ { ID_EXECUTE_PROGRESS_PACKAGE_TEXT, L"ExecuteProgressPackageText" },
+ { ID_EXECUTE_PROGRESS_BAR, L"ExecuteProgressbar" },
+ { ID_EXECUTE_PROGRESS_TEXT, L"ExecuteProgressText" },
+ { ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"ExecuteProgressActionDataText" },
+ { ID_OVERALL_PROGRESS_PACKAGE_TEXT, L"OverallProgressPackageText" },
+ { ID_OVERALL_PROGRESS_BAR, L"OverallProgressbar" },
+ { ID_OVERALL_CALCULATED_PROGRESS_BAR, L"OverallCalculatedProgressbar" },
+ { ID_OVERALL_PROGRESS_TEXT, L"OverallProgressText" },
+ { ID_PROGRESS_CANCEL_BUTTON, L"ProgressCancelButton" },
+
+ { ID_LAUNCH_BUTTON, L"LaunchButton" },
+ { ID_SUCCESS_TEXT, L"SuccessText" },
+ { ID_SUCCESS_RESTART_TEXT, L"SuccessRestartText" },
+ { ID_SUCCESS_RESTART_BUTTON, L"SuccessRestartButton" },
+ { ID_SUCCESS_CANCEL_BUTTON, L"SuccessCancelButton" },
+
+ { ID_FAILURE_LOGFILE_LINK, L"FailureLogFileLink" },
+ { ID_FAILURE_MESSAGE_TEXT, L"FailureMessageText" },
+ { ID_FAILURE_RESTART_TEXT, L"FailureRestartText" },
+ { ID_FAILURE_RESTART_BUTTON, L"FailureRestartButton" },
+ { ID_FAILURE_CANCEL_BUTTON, L"FailureCancelButton" },
+};
+
+static struct { LPCWSTR regName; LPCWSTR variableName; } OPTIONAL_FEATURES[] = {
+ { L"core_d", L"Include_debug" },
+ { L"core_pdb", L"Include_symbols" },
+ { L"dev", L"Include_dev" },
+ { L"doc", L"Include_doc" },
+ { L"exe", L"Include_exe" },
+ { L"lib", L"Include_lib" },
+ { L"path", L"PrependPath" },
+ { L"pip", L"Include_pip" },
+ { L"tcltk", L"Include_tcltk" },
+ { L"test", L"Include_test" },
+ { L"tools", L"Include_tools" },
+ { L"Shortcuts", L"Shortcuts" },
+ // Include_launcher and AssociateFiles are handled separately and so do
+ // not need to be included in this list.
+ { nullptr, nullptr }
+};
+
+
+
+class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
+ void ShowPage(DWORD newPageId) {
+ // Process each control for special handling in the new page.
+ ProcessPageControls(ThemeGetPage(_theme, newPageId));
+
+ // Enable disable controls per-page.
+ if (_pageIds[PAGE_INSTALL] == newPageId ||
+ _pageIds[PAGE_SIMPLE_INSTALL] == newPageId ||
+ _pageIds[PAGE_UPGRADE] == newPageId) {
+ InstallPage_Show();
+ } else if (_pageIds[PAGE_CUSTOM1] == newPageId) {
+ Custom1Page_Show();
+ } else if (_pageIds[PAGE_CUSTOM2] == newPageId) {
+ Custom2Page_Show();
+ } else if (_pageIds[PAGE_MODIFY] == newPageId) {
+ ModifyPage_Show();
+ } else if (_pageIds[PAGE_SUCCESS] == newPageId) {
+ SuccessPage_Show();
+ } else if (_pageIds[PAGE_FAILURE] == newPageId) {
+ FailurePage_Show();
+ }
+
+ // Prevent repainting while switching page to avoid ugly flickering
+ _suppressPaint = TRUE;
+ ThemeShowPage(_theme, newPageId, SW_SHOW);
+ ThemeShowPage(_theme, _visiblePageId, SW_HIDE);
+ _suppressPaint = FALSE;
+ InvalidateRect(_theme->hwndParent, nullptr, TRUE);
+ _visiblePageId = newPageId;
+
+ // On the install page set the focus to the install button or
+ // the next enabled control if install is disabled
+ if (_pageIds[PAGE_INSTALL] == newPageId) {
+ ThemeSetFocus(_theme, ID_INSTALL_BUTTON);
+ } else if (_pageIds[PAGE_SIMPLE_INSTALL] == newPageId) {
+ ThemeSetFocus(_theme, ID_INSTALL_SIMPLE_BUTTON);
+ }
+ }
+
+ //
+ // Handles control clicks
+ //
+ void OnCommand(CONTROL_ID id) {
+ LPWSTR defaultDir = nullptr;
+ LPWSTR targetDir = nullptr;
+ LONGLONG elevated, crtInstalled, installAllUsers;
+ BOOL checked, launcherChecked;
+ WCHAR wzPath[MAX_PATH] = { };
+ BROWSEINFOW browseInfo = { };
+ PIDLIST_ABSOLUTE pidl = nullptr;
+ DWORD pageId;
+ HRESULT hr = S_OK;
+
+ switch(id) {
+ case ID_CLOSE_BUTTON:
+ OnClickCloseButton();
+ break;
+
+ // Install commands
+ case ID_INSTALL_SIMPLE_BUTTON: __fallthrough;
+ case ID_INSTALL_UPGRADE_BUTTON: __fallthrough;
+ case ID_INSTALL_BUTTON:
+ SavePageSettings();
+
+ if (!WillElevate() && !QueryElevateForCrtInstall()) {
+ break;
+ }
+
+ hr = BalGetNumericVariable(L"InstallAllUsers", &installAllUsers);
+ ExitOnFailure(hr, L"Failed to get install scope");
+
+ hr = _engine->SetVariableNumeric(L"CompileAll", installAllUsers);
+ ExitOnFailure(hr, L"Failed to update CompileAll");
+
+ hr = EnsureTargetDir();
+ ExitOnFailure(hr, L"Failed to set TargetDir");
+
+ OnPlan(BOOTSTRAPPER_ACTION_INSTALL);
+ break;
+
+ case ID_CUSTOM1_BACK_BUTTON:
+ SavePageSettings();
+ if (_modifying) {
+ GoToPage(PAGE_MODIFY);
+ } else if (_upgrading) {
+ GoToPage(PAGE_UPGRADE);
+ } else {
+ GoToPage(PAGE_INSTALL);
+ }
+ break;
+
+ case ID_INSTALL_CUSTOM_BUTTON: __fallthrough;
+ case ID_INSTALL_UPGRADE_CUSTOM_BUTTON: __fallthrough;
+ case ID_CUSTOM2_BACK_BUTTON:
+ SavePageSettings();
+ GoToPage(PAGE_CUSTOM1);
+ break;
+
+ case ID_CUSTOM_NEXT_BUTTON:
+ SavePageSettings();
+ GoToPage(PAGE_CUSTOM2);
+ break;
+
+ case ID_CUSTOM_INSTALL_BUTTON:
+ SavePageSettings();
+
+ hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (SUCCEEDED(hr)) {
+ // TODO: Check whether directory exists and contains another installation
+ ReleaseStr(targetDir);
+ }
+
+ if (!WillElevate() && !QueryElevateForCrtInstall()) {
+ break;
+ }
+
+ OnPlan(_command.action);
+ break;
+
+ case ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_INSTALL_BUTTON, WillElevate());
+ break;
+
+ case ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
+ break;
+
+ case ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
+ ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
+ if (checked) {
+ _engine->SetVariableNumeric(L"CompileAll", 1);
+ ThemeSendControlMessage(_theme, ID_CUSTOM_COMPILE_ALL_CHECKBOX, BM_SETCHECK, BST_CHECKED, 0);
+ }
+ ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
+ if (targetDir) {
+ // Check the current value against the default to see
+ // if we should switch it automatically.
+ hr = BalGetStringVariable(
+ checked ? L"DefaultJustForMeTargetDir" : L"DefaultAllUsersTargetDir",
+ &defaultDir
+ );
+
+ if (SUCCEEDED(hr) && defaultDir) {
+ LPWSTR formatted = nullptr;
+ if (defaultDir[0] && SUCCEEDED(BalFormatString(defaultDir, &formatted))) {
+ if (wcscmp(formatted, targetDir) == 0) {
+ ReleaseStr(defaultDir);
+ defaultDir = nullptr;
+ ReleaseStr(formatted);
+ formatted = nullptr;
+
+ hr = BalGetStringVariable(
+ checked ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultDir
+ );
+ if (SUCCEEDED(hr) && defaultDir && defaultDir[0] && SUCCEEDED(BalFormatString(defaultDir, &formatted))) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, formatted);
+ ReleaseStr(formatted);
+ }
+ } else {
+ ReleaseStr(formatted);
+ }
+ }
+
+ ReleaseStr(defaultDir);
+ }
+ }
+ break;
+
+ case ID_CUSTOM_BROWSE_BUTTON:
+ browseInfo.hwndOwner = _hWnd;
+ browseInfo.pszDisplayName = wzPath;
+ browseInfo.lpszTitle = _theme->sczCaption;
+ browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI;
+ pidl = ::SHBrowseForFolderW(&browseInfo);
+ if (pidl && ::SHGetPathFromIDListW(pidl, wzPath)) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, wzPath);
+ }
+
+ if (pidl) {
+ ::CoTaskMemFree(pidl);
+ }
+ break;
+
+ // Modify commands
+ case ID_MODIFY_BUTTON:
+ // Some variables cannot be modified
+ _engine->SetVariableString(L"InstallAllUsersState", L"disable");
+ _engine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
+ _engine->SetVariableString(L"TargetDirState", L"disable");
+ _engine->SetVariableString(L"CustomBrowseButtonState", L"disable");
+ _modifying = TRUE;
+ GoToPage(PAGE_CUSTOM1);
+ break;
+
+ case ID_REPAIR_BUTTON:
+ OnPlan(BOOTSTRAPPER_ACTION_REPAIR);
+ break;
+
+ case ID_UNINSTALL_BUTTON:
+ OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL);
+ break;
+ }
+
+ LExit:
+ return;
+ }
+
+ void InstallPage_Show() {
+ // Ensure the All Users install button has a UAC shield
+ BOOL elevated = WillElevate();
+ ThemeControlElevates(_theme, ID_INSTALL_BUTTON, elevated);
+ ThemeControlElevates(_theme, ID_INSTALL_SIMPLE_BUTTON, elevated);
+ ThemeControlElevates(_theme, ID_INSTALL_UPGRADE_BUTTON, elevated);
+ }
+
+ void Custom1Page_Show() {
+ LONGLONG installLauncherAllUsers;
+
+ if (FAILED(BalGetNumericVariable(L"InstallLauncherAllUsers", &installLauncherAllUsers))) {
+ installLauncherAllUsers = 0;
+ }
+
+ ThemeSendControlMessage(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, BM_SETCHECK,
+ installLauncherAllUsers ? BST_CHECKED : BST_UNCHECKED, 0);
+
+ LOC_STRING *pLocString = nullptr;
+ LPCWSTR locKey = L"#(loc.Include_launcherHelp)";
+ LONGLONG detectedLauncher;
+
+ if (SUCCEEDED(BalGetNumericVariable(L"DetectedLauncher", &detectedLauncher)) && detectedLauncher) {
+ locKey = L"#(loc.Include_launcherRemove)";
+ } else if (SUCCEEDED(BalGetNumericVariable(L"DetectedOldLauncher", &detectedLauncher)) && detectedLauncher) {
+ locKey = L"#(loc.Include_launcherUpgrade)";
+ }
+
+ if (SUCCEEDED(LocGetString(_wixLoc, locKey, &pLocString)) && pLocString) {
+ ThemeSetTextControl(_theme, ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL, pLocString->wzText);
+ }
+ }
+
+ void Custom2Page_Show() {
+ HRESULT hr;
+ LONGLONG installAll, includeLauncher;
+
+ if (FAILED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
+ installAll = 0;
+ }
+
+ if (WillElevate()) {
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, TRUE);
+ ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_HIDE);
+ } else {
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, FALSE);
+ ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_SHOW);
+ }
+
+ if (SUCCEEDED(BalGetNumericVariable(L"Include_launcher", &includeLauncher)) && includeLauncher) {
+ ThemeControlEnable(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, TRUE);
+ } else {
+ ThemeSendControlMessage(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, BM_SETCHECK, BST_UNCHECKED, 0);
+ ThemeControlEnable(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, FALSE);
+ }
+
+ LPWSTR targetDir = nullptr;
+ hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (SUCCEEDED(hr) && targetDir && targetDir[0]) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, targetDir);
+ StrFree(targetDir);
+ } else if (SUCCEEDED(hr)) {
+ StrFree(targetDir);
+ targetDir = nullptr;
+
+ LPWSTR defaultTargetDir = nullptr;
+ hr = BalGetStringVariable(L"DefaultCustomTargetDir", &defaultTargetDir);
+ if (SUCCEEDED(hr) && defaultTargetDir && !defaultTargetDir[0]) {
+ StrFree(defaultTargetDir);
+ defaultTargetDir = nullptr;
+
+ hr = BalGetStringVariable(
+ installAll ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultTargetDir
+ );
+ }
+ if (SUCCEEDED(hr) && defaultTargetDir) {
+ if (defaultTargetDir[0] && SUCCEEDED(BalFormatString(defaultTargetDir, &targetDir))) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, targetDir);
+ StrFree(targetDir);
+ }
+ StrFree(defaultTargetDir);
+ }
+ }
+ }
+
+ void ModifyPage_Show() {
+ ThemeControlEnable(_theme, ID_REPAIR_BUTTON, !_suppressRepair);
+ }
+
+ void SuccessPage_Show() {
+ // on the "Success" page, check if the restart or launch button should be enabled.
+ BOOL showRestartButton = FALSE;
+ BOOL launchTargetExists = FALSE;
+ LOC_STRING *successText = nullptr;
+ HRESULT hr = S_OK;
+
+ if (_restartRequired) {
+ if (BOOTSTRAPPER_RESTART_PROMPT == _command.restart) {
+ showRestartButton = TRUE;
+ }
+ } else if (ThemeControlExists(_theme, ID_LAUNCH_BUTTON)) {
+ launchTargetExists = BalStringVariableExists(PYBA_VARIABLE_LAUNCH_TARGET_PATH);
+ }
+
+ switch (_plannedAction) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessInstallMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_MODIFY:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessModifyMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_REPAIR:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessRepairMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessRemoveMessage)", &successText);
+ break;
+ }
+
+ if (successText) {
+ LPWSTR formattedString = nullptr;
+ BalFormatString(successText->wzText, &formattedString);
+ if (formattedString) {
+ ThemeSetTextControl(_theme, ID_SUCCESS_TEXT, formattedString);
+ StrFree(formattedString);
+ }
+ }
+
+ ThemeControlEnable(_theme, ID_LAUNCH_BUTTON, launchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < _plannedAction);
+ ThemeControlEnable(_theme, ID_SUCCESS_RESTART_TEXT, showRestartButton);
+ ThemeControlEnable(_theme, ID_SUCCESS_RESTART_BUTTON, showRestartButton);
+ }
+
+ void FailurePage_Show() {
+ // on the "Failure" page, show error message and check if the restart button should be enabled.
+
+ // if there is a log file variable then we'll assume the log file exists.
+ BOOL showLogLink = (_bundle.sczLogVariable && *_bundle.sczLogVariable);
+ BOOL showErrorMessage = FALSE;
+ BOOL showRestartButton = FALSE;
+
+ if (FAILED(_hrFinal)) {
+ LPWSTR unformattedText = nullptr;
+ LPWSTR text = nullptr;
+
+ // If we know the failure message, use that.
+ if (_failedMessage && *_failedMessage) {
+ StrAllocString(&unformattedText, _failedMessage, 0);
+ } else {
+ // try to get the error message from the error code.
+ StrAllocFromError(&unformattedText, _hrFinal, nullptr);
+ if (!unformattedText || !*unformattedText) {
+ StrAllocFromError(&unformattedText, E_FAIL, nullptr);
+ }
+ }
+
+ if (E_WIXSTDBA_CONDITION_FAILED == _hrFinal) {
+ if (unformattedText) {
+ StrAllocString(&text, unformattedText, 0);
+ }
+ } else {
+ StrAllocFormatted(&text, L"0x%08x - %ls", _hrFinal, unformattedText);
+ }
+
+ if (text) {
+ ThemeSetTextControl(_theme, ID_FAILURE_MESSAGE_TEXT, text);
+ showErrorMessage = TRUE;
+ }
+
+ ReleaseStr(text);
+ ReleaseStr(unformattedText);
+ }
+
+ if (_restartRequired && BOOTSTRAPPER_RESTART_PROMPT == _command.restart) {
+ showRestartButton = TRUE;
+ }
+
+ ThemeControlEnable(_theme, ID_FAILURE_LOGFILE_LINK, showLogLink);
+ ThemeControlEnable(_theme, ID_FAILURE_MESSAGE_TEXT, showErrorMessage);
+ ThemeControlEnable(_theme, ID_FAILURE_RESTART_TEXT, showRestartButton);
+ ThemeControlEnable(_theme, ID_FAILURE_RESTART_BUTTON, showRestartButton);
+ }
+
+
+public: // IBootstrapperApplication
+ virtual STDMETHODIMP OnStartup() {
+ HRESULT hr = S_OK;
+ DWORD dwUIThreadId = 0;
+
+ // create UI thread
+ _hUiThread = ::CreateThread(nullptr, 0, UiThreadProc, this, 0, &dwUIThreadId);
+ if (!_hUiThread) {
+ ExitWithLastError(hr, "Failed to create UI thread.");
+ }
+
+ LExit:
+ return hr;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnShutdown() {
+ int nResult = IDNOACTION;
+
+ // wait for UI thread to terminate
+ if (_hUiThread) {
+ ::WaitForSingleObject(_hUiThread, INFINITE);
+ ReleaseHandle(_hUiThread);
+ }
+
+ // If a restart was required.
+ if (_restartRequired && _allowRestart) {
+ nResult = IDRESTART;
+ }
+
+ return nResult;
+ }
+
+ virtual STDMETHODIMP_(int) OnDetectRelatedMsiPackage(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR /*wzProductCode*/,
+ __in BOOL fPerMachine,
+ __in DWORD64 /*dw64Version*/,
+ __in BOOTSTRAPPER_RELATED_OPERATION operation
+ ) {
+ if (BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE == operation &&
+ (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_AllUsers", -1) ||
+ CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_JustForMe", -1))) {
+ auto hr = LoadAssociateFilesStateFromKey(_engine, fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER);
+ if (hr == S_OK) {
+ _engine->SetVariableNumeric(L"AssociateFiles", 1);
+ } else if (FAILED(hr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load AssociateFiles state: error code 0x%08X", hr);
+ }
+
+ _engine->SetVariableNumeric(L"Include_launcher", 1);
+ _engine->SetVariableNumeric(L"DetectedOldLauncher", 1);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", fPerMachine ? 1 : 0);
+ }
+ return CheckCanceled() ? IDCANCEL : IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(int) OnDetectRelatedBundle(
+ __in LPCWSTR wzBundleId,
+ __in BOOTSTRAPPER_RELATION_TYPE relationType,
+ __in LPCWSTR /*wzBundleTag*/,
+ __in BOOL fPerMachine,
+ __in DWORD64 /*dw64Version*/,
+ __in BOOTSTRAPPER_RELATED_OPERATION operation
+ ) {
+ BalInfoAddRelatedBundleAsPackage(&_bundle.packages, wzBundleId, relationType, fPerMachine);
+
+ // Remember when our bundle would cause a downgrade.
+ if (BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) {
+ _downgradingOtherVersion = TRUE;
+ } else if (BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE == operation) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected previous version - planning upgrade");
+ _upgrading = TRUE;
+
+ LoadOptionalFeatureStates(_engine);
+ } else if (BOOTSTRAPPER_RELATED_OPERATION_NONE == operation) {
+ if (_command.action == BOOTSTRAPPER_ACTION_INSTALL) {
+ LOC_STRING *pLocString = nullptr;
+ if (SUCCEEDED(LocGetString(_wixLoc, L"#(loc.FailureExistingInstall)", &pLocString)) && pLocString) {
+ BalFormatString(pLocString->wzText, &_failedMessage);
+ } else {
+ BalFormatString(L"Cannot install [WixBundleName] because it is already installed.", &_failedMessage);
+ }
+ BalLog(
+ BOOTSTRAPPER_LOG_LEVEL_ERROR,
+ "Related bundle %ls is preventing install",
+ wzBundleId
+ );
+ SetState(PYBA_STATE_FAILED, E_WIXSTDBA_CONDITION_FAILED);
+ }
+ }
+
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+
+ virtual STDMETHODIMP_(void) OnDetectPackageComplete(
+ __in LPCWSTR wzPackageId,
+ __in HRESULT hrStatus,
+ __in BOOTSTRAPPER_PACKAGE_STATE state
+ ) {
+ if (FAILED(hrStatus)) {
+ return;
+ }
+
+ BOOL detectedLauncher = FALSE;
+ HKEY hkey = HKEY_LOCAL_MACHINE;
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_AllUsers", -1)) {
+ if (BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state || BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE == state) {
+ detectedLauncher = TRUE;
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", 1);
+ }
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_JustForMe", -1)) {
+ if (BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state || BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE == state) {
+ detectedLauncher = TRUE;
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", 0);
+ }
+ }
+
+ if (detectedLauncher) {
+ /* When we detect the current version of the launcher. */
+ _engine->SetVariableNumeric(L"Include_launcher", 1);
+ _engine->SetVariableNumeric(L"DetectedLauncher", 1);
+ _engine->SetVariableString(L"Include_launcherState", L"disable");
+ _engine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
+
+ auto hr = LoadAssociateFilesStateFromKey(_engine, hkey);
+ if (hr == S_OK) {
+ _engine->SetVariableNumeric(L"AssociateFiles", 1);
+ } else if (FAILED(hr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load AssociateFiles state: error code 0x%08X", hr);
+ }
+ }
+ }
+
+
+ virtual STDMETHODIMP_(void) OnDetectComplete(__in HRESULT hrStatus) {
+ if (SUCCEEDED(hrStatus) && _baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect complete BA function");
+ _baFunction->OnDetectComplete();
+ }
+
+ if (SUCCEEDED(hrStatus)) {
+ hrStatus = EvaluateConditions();
+ }
+
+ if (SUCCEEDED(hrStatus)) {
+ // Ensure the default path has been set
+ hrStatus = EnsureTargetDir();
+ }
+
+ SetState(PYBA_STATE_DETECTED, hrStatus);
+
+ // If we're not interacting with the user or we're doing a layout or we're just after a force restart
+ // then automatically start planning.
+ if (BOOTSTRAPPER_DISPLAY_FULL > _command.display ||
+ BOOTSTRAPPER_ACTION_LAYOUT == _command.action ||
+ BOOTSTRAPPER_ACTION_UNINSTALL == _command.action ||
+ BOOTSTRAPPER_RESUME_TYPE_REBOOT == _command.resumeType) {
+ if (SUCCEEDED(hrStatus)) {
+ ::PostMessageW(_hWnd, WM_PYBA_PLAN_PACKAGES, 0, _command.action);
+ }
+ }
+ }
+
+
+ virtual STDMETHODIMP_(int) OnPlanRelatedBundle(
+ __in_z LPCWSTR /*wzBundleId*/,
+ __inout_z BOOTSTRAPPER_REQUEST_STATE* pRequestedState
+ ) {
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnPlanPackageBegin(
+ __in_z LPCWSTR wzPackageId,
+ __inout BOOTSTRAPPER_REQUEST_STATE *pRequestState
+ ) {
+ HRESULT hr = S_OK;
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+
+ if (_nextPackageAfterRestart) {
+ // After restart we need to finish the dependency registration for our package so allow the package
+ // to go present.
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, _nextPackageAfterRestart, -1)) {
+ // Do not allow a repair because that could put us in a perpetual restart loop.
+ if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState) {
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
+ }
+
+ ReleaseNullStr(_nextPackageAfterRestart); // no more skipping now.
+ } else {
+ // not the matching package, so skip it.
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
+
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
+ }
+ } else if ((_plannedAction == BOOTSTRAPPER_ACTION_INSTALL || _plannedAction == BOOTSTRAPPER_ACTION_MODIFY) &&
+ SUCCEEDED(BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage))) {
+ BOOL f = FALSE;
+ if (SUCCEEDED(_engine->EvaluateCondition(pPackage->sczInstallCondition, &f)) && f) {
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
+ }
+ }
+
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+ virtual STDMETHODIMP_(int) OnPlanMsiFeature(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR wzFeatureId,
+ __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState
+ ) {
+ LONGLONG install;
+
+ if (wcscmp(wzFeatureId, L"AssociateFiles") == 0 || wcscmp(wzFeatureId, L"Shortcuts") == 0) {
+ if (SUCCEEDED(_engine->GetVariableNumeric(wzFeatureId, &install)) && install) {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL;
+ } else {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_ABSENT;
+ }
+ } else {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL;
+ }
+ return CheckCanceled() ? IDCANCEL : IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(void) OnPlanComplete(__in HRESULT hrStatus) {
+ if (SUCCEEDED(hrStatus) && _baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running plan complete BA function");
+ _baFunction->OnPlanComplete();
+ }
+
+ SetState(PYBA_STATE_PLANNED, hrStatus);
+
+ if (SUCCEEDED(hrStatus)) {
+ ::PostMessageW(_hWnd, WM_PYBA_APPLY_PACKAGES, 0, 0);
+ }
+
+ _startedExecution = FALSE;
+ _calculatedCacheProgress = 0;
+ _calculatedExecuteProgress = 0;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCachePackageBegin(
+ __in_z LPCWSTR wzPackageId,
+ __in DWORD cCachePayloads,
+ __in DWORD64 dw64PackageCacheSize
+ ) {
+ if (wzPackageId && *wzPackageId) {
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+ HRESULT hr = BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage);
+ LPCWSTR wz = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId;
+
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_PACKAGE_TEXT, wz);
+
+ // If something started executing, leave it in the overall progress text.
+ if (!_startedExecution) {
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
+ }
+ }
+
+ return __super::OnCachePackageBegin(wzPackageId, cCachePayloads, dw64PackageCacheSize);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheAcquireProgress(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in DWORD64 dw64Progress,
+ __in DWORD64 dw64Total,
+ __in DWORD dwOverallPercentage
+ ) {
+ WCHAR wzProgress[5] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnCacheAcquireProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallPercentage);
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_CACHE_PROGRESS_BAR, dwOverallPercentage);
+
+ _calculatedCacheProgress = dwOverallPercentage * PYBA_ACQUIRE_PERCENTAGE / 100;
+ ThemeSetProgressControl(_theme, ID_OVERALL_CALCULATED_PROGRESS_BAR, _calculatedCacheProgress + _calculatedExecuteProgress);
+
+ SetTaskbarButtonProgress(_calculatedCacheProgress + _calculatedExecuteProgress);
+
+ return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheAcquireComplete(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in HRESULT hrStatus,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrStatus);
+ return __super::OnCacheAcquireComplete(wzPackageOrContainerId, wzPayloadId, hrStatus, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheVerifyComplete(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR wzPayloadId,
+ __in HRESULT hrStatus,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrStatus);
+ return __super::OnCacheVerifyComplete(wzPackageId, wzPayloadId, hrStatus, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(void) OnCacheComplete(__in HRESULT /*hrStatus*/) {
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_PACKAGE_TEXT, L"");
+ SetState(PYBA_STATE_CACHED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
+ }
+
+
+ virtual STDMETHODIMP_(int) OnError(
+ __in BOOTSTRAPPER_ERROR_TYPE errorType,
+ __in LPCWSTR wzPackageId,
+ __in DWORD dwCode,
+ __in_z LPCWSTR wzError,
+ __in DWORD dwUIHint,
+ __in DWORD /*cData*/,
+ __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/,
+ __in int nRecommendation
+ ) {
+ int nResult = nRecommendation;
+ LPWSTR sczError = nullptr;
+
+ if (BOOTSTRAPPER_DISPLAY_EMBEDDED == _command.display) {
+ HRESULT hr = _engine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult);
+ if (FAILED(hr)) {
+ nResult = IDERROR;
+ }
+ } else if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ // If this is an authentication failure, let the engine try to handle it for us.
+ if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) {
+ nResult = IDTRYAGAIN;
+ } else // show a generic error message box.
+ {
+ BalRetryErrorOccurred(wzPackageId, dwCode);
+
+ if (!_showingInternalUIThisPackage) {
+ // If no error message was provided, use the error code to try and get an error message.
+ if (!wzError || !*wzError || BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER != errorType) {
+ HRESULT hr = StrAllocFromError(&sczError, dwCode, nullptr);
+ if (FAILED(hr) || !sczError || !*sczError) {
+ StrAllocFormatted(&sczError, L"0x%x", dwCode);
+ }
+ }
+
+ nResult = ::MessageBoxW(_hWnd, sczError ? sczError : wzError, _theme->sczCaption, dwUIHint);
+ }
+ }
+
+ SetProgressState(HRESULT_FROM_WIN32(dwCode));
+ } else {
+ // just take note of the error code and let things continue.
+ BalRetryErrorOccurred(wzPackageId, dwCode);
+ }
+
+ ReleaseStr(sczError);
+ return nResult;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecuteMsiMessage(
+ __in_z LPCWSTR wzPackageId,
+ __in INSTALLMESSAGE mt,
+ __in UINT uiFlags,
+ __in_z LPCWSTR wzMessage,
+ __in DWORD cData,
+ __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
+ __in int nRecommendation
+ ) {
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage);
+#endif
+ if (BOOTSTRAPPER_DISPLAY_FULL == _command.display && (INSTALLMESSAGE_WARNING == mt || INSTALLMESSAGE_USER == mt)) {
+ int nResult = ::MessageBoxW(_hWnd, wzMessage, _theme->sczCaption, uiFlags);
+ return nResult;
+ }
+
+ if (INSTALLMESSAGE_ACTIONSTART == mt) {
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, wzMessage);
+ }
+
+ return __super::OnExecuteMsiMessage(wzPackageId, mt, uiFlags, wzMessage, cData, rgwzData, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnProgress(__in DWORD dwProgressPercentage, __in DWORD dwOverallProgressPercentage) {
+ WCHAR wzProgress[5] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_OVERALL_PROGRESS_BAR, dwOverallProgressPercentage);
+ SetTaskbarButtonProgress(dwOverallProgressPercentage);
+
+ return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecutePackageBegin(__in_z LPCWSTR wzPackageId, __in BOOL fExecute) {
+ LPWSTR sczFormattedString = nullptr;
+
+ _startedExecution = TRUE;
+
+ if (wzPackageId && *wzPackageId) {
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+ BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage);
+
+ LPCWSTR wz = wzPackageId;
+ if (pPackage) {
+ LOC_STRING* pLocString = nullptr;
+
+ switch (pPackage->type) {
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON:
+ LocGetString(_wixLoc, L"#(loc.ExecuteAddonRelatedBundleMessage)", &pLocString);
+ break;
+
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH:
+ LocGetString(_wixLoc, L"#(loc.ExecutePatchRelatedBundleMessage)", &pLocString);
+ break;
+
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE:
+ LocGetString(_wixLoc, L"#(loc.ExecuteUpgradeRelatedBundleMessage)", &pLocString);
+ break;
+ }
+
+ if (pLocString) {
+ // If the wix developer is showing a hidden variable in the UI, then obviously they don't care about keeping it safe
+ // so don't go down the rabbit hole of making sure that this is securely freed.
+ BalFormatString(pLocString->wzText, &sczFormattedString);
+ }
+
+ wz = sczFormattedString ? sczFormattedString : pPackage->sczDisplayName ? pPackage->sczDisplayName : wzPackageId;
+ }
+
+ _showingInternalUIThisPackage = pPackage && pPackage->fDisplayInternalUI;
+
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_PACKAGE_TEXT, wz);
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
+ } else {
+ _showingInternalUIThisPackage = FALSE;
+ }
+
+ ReleaseStr(sczFormattedString);
+ return __super::OnExecutePackageBegin(wzPackageId, fExecute);
+ }
+
+
+ virtual int __stdcall OnExecuteProgress(
+ __in_z LPCWSTR wzPackageId,
+ __in DWORD dwProgressPercentage,
+ __in DWORD dwOverallProgressPercentage
+ ) {
+ WCHAR wzProgress[8] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnExecuteProgress() - package: %ls, progress: %u%%, overall progress: %u%%", wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_EXECUTE_PROGRESS_BAR, dwOverallProgressPercentage);
+
+ _calculatedExecuteProgress = dwOverallProgressPercentage * (100 - PYBA_ACQUIRE_PERCENTAGE) / 100;
+ ThemeSetProgressControl(_theme, ID_OVERALL_CALCULATED_PROGRESS_BAR, _calculatedCacheProgress + _calculatedExecuteProgress);
+
+ SetTaskbarButtonProgress(_calculatedCacheProgress + _calculatedExecuteProgress);
+
+ return __super::OnExecuteProgress(wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecutePackageComplete(
+ __in_z LPCWSTR wzPackageId,
+ __in HRESULT hrExitCode,
+ __in BOOTSTRAPPER_APPLY_RESTART restart,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrExitCode);
+
+ if (_wcsnicmp(wzPackageId, L"path_", 5) == 0 && SUCCEEDED(hrExitCode)) {
+ SendMessageTimeoutW(
+ HWND_BROADCAST,
+ WM_SETTINGCHANGE,
+ 0,
+ reinterpret_cast<LPARAM>(L"Environment"),
+ SMTO_ABORTIFHUNG,
+ 1000,
+ nullptr
+ );
+ }
+
+ int nResult = __super::OnExecutePackageComplete(wzPackageId, hrExitCode, restart, nRecommendation);
+
+ return nResult;
+ }
+
+
+ virtual STDMETHODIMP_(void) OnExecuteComplete(__in HRESULT hrStatus) {
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_PACKAGE_TEXT, L"");
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"");
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, L"");
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, FALSE); // no more cancel.
+
+ SetState(PYBA_STATE_EXECUTED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
+ SetProgressState(hrStatus);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnResolveSource(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in_z LPCWSTR wzLocalSource,
+ __in_z_opt LPCWSTR wzDownloadSource
+ ) {
+ int nResult = IDERROR; // assume we won't resolve source and that is unexpected.
+
+ if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ if (wzDownloadSource) {
+ nResult = IDDOWNLOAD;
+ } else {
+ // prompt to change the source location.
+ OPENFILENAMEW ofn = { };
+ WCHAR wzFile[MAX_PATH] = { };
+
+ ::StringCchCopyW(wzFile, countof(wzFile), wzLocalSource);
+
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = _hWnd;
+ ofn.lpstrFile = wzFile;
+ ofn.nMaxFile = countof(wzFile);
+ ofn.lpstrFilter = L"All Files\0*.*\0";
+ ofn.nFilterIndex = 1;
+ ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
+ ofn.lpstrTitle = _theme->sczCaption;
+
+ if (::GetOpenFileNameW(&ofn)) {
+ HRESULT hr = _engine->SetLocalSource(wzPackageOrContainerId, wzPayloadId, ofn.lpstrFile);
+ nResult = SUCCEEDED(hr) ? IDRETRY : IDERROR;
+ } else {
+ nResult = IDCANCEL;
+ }
+ }
+ } else if (wzDownloadSource) {
+ // If doing a non-interactive install and download source is available, let's try downloading the package silently
+ nResult = IDDOWNLOAD;
+ }
+ // else there's nothing more we can do in non-interactive mode
+
+ return CheckCanceled() ? IDCANCEL : nResult;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnApplyComplete(__in HRESULT hrStatus, __in BOOTSTRAPPER_APPLY_RESTART restart) {
+ _restartResult = restart; // remember the restart result so we return the correct error code no matter what the user chooses to do in the UI.
+
+ // If a restart was encountered and we are not suppressing restarts, then restart is required.
+ _restartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < _command.restart);
+ // If a restart is required and we're not displaying a UI or we are not supposed to prompt for restart then allow the restart.
+ _allowRestart = _restartRequired && (BOOTSTRAPPER_DISPLAY_FULL > _command.display || BOOTSTRAPPER_RESTART_PROMPT < _command.restart);
+
+ // If we are showing UI, wait a beat before moving to the final screen.
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::Sleep(250);
+ }
+
+ SetState(PYBA_STATE_APPLIED, hrStatus);
+ SetTaskbarButtonProgress(100); // show full progress bar, green, yellow, or red
+
+ return IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(void) OnLaunchApprovedExeComplete(__in HRESULT hrStatus, __in DWORD /*processId*/) {
+ if (HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) == hrStatus) {
+ //try with ShelExec next time
+ OnClickLaunchButton();
+ } else {
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+ }
+
+
+private:
+ //
+ // UiThreadProc - entrypoint for UI thread.
+ //
+ static DWORD WINAPI UiThreadProc(__in LPVOID pvContext) {
+ HRESULT hr = S_OK;
+ PythonBootstrapperApplication* pThis = (PythonBootstrapperApplication*)pvContext;
+ BOOL comInitialized = FALSE;
+ BOOL ret = FALSE;
+ MSG msg = { };
+
+ // Initialize COM and theme.
+ hr = ::CoInitialize(nullptr);
+ BalExitOnFailure(hr, "Failed to initialize COM.");
+ comInitialized = TRUE;
+
+ hr = ThemeInitialize(pThis->_hModule);
+ BalExitOnFailure(hr, "Failed to initialize theme manager.");
+
+ hr = pThis->InitializeData();
+ BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application.");
+
+ // Create main window.
+ pThis->InitializeTaskbarButton();
+ hr = pThis->CreateMainWindow();
+ BalExitOnFailure(hr, "Failed to create main window.");
+
+ pThis->ValidateOperatingSystem();
+
+ if (FAILED(pThis->_hrFinal)) {
+ pThis->SetState(PYBA_STATE_FAILED, hr);
+ ::PostMessageW(pThis->_hWnd, WM_PYBA_SHOW_FAILURE, 0, 0);
+ } else {
+ // Okay, we're ready for packages now.
+ pThis->SetState(PYBA_STATE_INITIALIZED, hr);
+ ::PostMessageW(pThis->_hWnd, BOOTSTRAPPER_ACTION_HELP == pThis->_command.action ? WM_PYBA_SHOW_HELP : WM_PYBA_DETECT_PACKAGES, 0, 0);
+ }
+
+ // message pump
+ while (0 != (ret = ::GetMessageW(&msg, nullptr, 0, 0))) {
+ if (-1 == ret) {
+ hr = E_UNEXPECTED;
+ BalExitOnFailure(hr, "Unexpected return value from message pump.");
+ } else if (!ThemeHandleKeyboardMessage(pThis->_theme, msg.hwnd, &msg)) {
+ ::TranslateMessage(&msg);
+ ::DispatchMessageW(&msg);
+ }
+ }
+
+ // Succeeded thus far, check to see if anything went wrong while actually
+ // executing changes.
+ if (FAILED(pThis->_hrFinal)) {
+ hr = pThis->_hrFinal;
+ } else if (pThis->CheckCanceled()) {
+ hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
+ }
+
+ LExit:
+ // destroy main window
+ pThis->DestroyMainWindow();
+
+ // initiate engine shutdown
+ DWORD dwQuit = HRESULT_CODE(hr);
+ if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->_restartResult) {
+ dwQuit = ERROR_SUCCESS_REBOOT_INITIATED;
+ } else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->_restartResult) {
+ dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED;
+ }
+ pThis->_engine->Quit(dwQuit);
+
+ ReleaseTheme(pThis->_theme);
+ ThemeUninitialize();
+
+ // uninitialize COM
+ if (comInitialized) {
+ ::CoUninitialize();
+ }
+
+ return hr;
+ }
+
+ //
+ // ParseVariablesFromUnattendXml - reads options from unattend.xml if it
+ // exists
+ //
+ HRESULT ParseVariablesFromUnattendXml() {
+ HRESULT hr = S_OK;
+ LPWSTR sczUnattendXmlPath = nullptr;
+ IXMLDOMDocument *pixdUnattend = nullptr;
+ IXMLDOMNodeList *pNodes = nullptr;
+ IXMLDOMNode *pNode = nullptr;
+ long cNodes;
+ DWORD dwAttr;
+ LPWSTR scz = nullptr;
+ BOOL bValue;
+ int iValue;
+ BOOL tryConvert;
+ BSTR bstrValue = nullptr;
+
+ hr = BalFormatString(L"[WixBundleOriginalSourceFolder]unattend.xml", &sczUnattendXmlPath);
+ BalExitOnFailure(hr, "Failed to calculate path to unattend.xml");
+
+ if (!FileExistsEx(sczUnattendXmlPath, &dwAttr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Did not find %ls", sczUnattendXmlPath);
+ hr = S_FALSE;
+ goto LExit;
+ }
+
+ hr = XmlLoadDocumentFromFile(sczUnattendXmlPath, &pixdUnattend);
+ BalExitOnFailure1(hr, "Failed to read %ls", sczUnattendXmlPath);
+
+ // get the list of variables users have overridden
+ hr = XmlSelectNodes(pixdUnattend, L"/Options/Option", &pNodes);
+ if (S_FALSE == hr) {
+ ExitFunction1(hr = S_OK);
+ }
+ BalExitOnFailure(hr, "Failed to select option nodes.");
+
+ hr = pNodes->get_length((long*)&cNodes);
+ BalExitOnFailure(hr, "Failed to get option node count.");
+
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Reading settings from %ls", sczUnattendXmlPath);
+
+ for (DWORD i = 0; i < cNodes; ++i) {
+ hr = XmlNextElement(pNodes, &pNode, nullptr);
+ BalExitOnFailure(hr, "Failed to get next node.");
+
+ // @Name
+ hr = XmlGetAttributeEx(pNode, L"Name", &scz);
+ BalExitOnFailure(hr, "Failed to get @Name.");
+
+ tryConvert = TRUE;
+ hr = XmlGetAttribute(pNode, L"Value", &bstrValue);
+ if (FAILED(hr) || !bstrValue || !*bstrValue) {
+ hr = XmlGetText(pNode, &bstrValue);
+ tryConvert = FALSE;
+ }
+ BalExitOnFailure(hr, "Failed to get @Value.");
+
+ if (tryConvert &&
+ CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"yes", -1)) {
+ _engine->SetVariableNumeric(scz, 1);
+ } else if (tryConvert &&
+ CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"no", -1)) {
+ _engine->SetVariableNumeric(scz, 0);
+ } else if (tryConvert && ::StrToIntExW(bstrValue, STIF_DEFAULT, &iValue)) {
+ _engine->SetVariableNumeric(scz, iValue);
+ } else {
+ _engine->SetVariableString(scz, bstrValue);
+ }
+
+ ReleaseNullBSTR(bstrValue);
+ ReleaseNullStr(scz);
+ ReleaseNullObject(pNode);
+ }
+
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Finished reading from %ls", sczUnattendXmlPath);
+
+ LExit:
+ ReleaseObject(pNode);
+ ReleaseObject(pNodes);
+ ReleaseObject(pixdUnattend);
+ ReleaseStr(sczUnattendXmlPath);
+
+ return hr;
+ }
+
+
+ //
+ // InitializeData - initializes all the package information.
+ //
+ HRESULT InitializeData() {
+ HRESULT hr = S_OK;
+ LPWSTR sczModulePath = nullptr;
+ IXMLDOMDocument *pixdManifest = nullptr;
+
+ hr = BalManifestLoad(_hModule, &pixdManifest);
+ BalExitOnFailure(hr, "Failed to load bootstrapper application manifest.");
+
+ hr = ParseOverridableVariablesFromXml(pixdManifest);
+ BalExitOnFailure(hr, "Failed to read overridable variables.");
+
+ hr = ParseVariablesFromUnattendXml();
+ ExitOnFailure(hr, "Failed to read unattend.ini file.");
+
+ hr = ProcessCommandLine(&_language);
+ ExitOnFailure(hr, "Unknown commandline parameters.");
+
+ hr = PathRelativeToModule(&sczModulePath, nullptr, _hModule);
+ BalExitOnFailure(hr, "Failed to get module path.");
+
+ hr = LoadLocalization(sczModulePath, _language);
+ ExitOnFailure(hr, "Failed to load localization.");
+
+ hr = LoadTheme(sczModulePath, _language);
+ ExitOnFailure(hr, "Failed to load theme.");
+
+ hr = BalInfoParseFromXml(&_bundle, pixdManifest);
+ BalExitOnFailure(hr, "Failed to load bundle information.");
+
+ hr = BalConditionsParseFromXml(&_conditions, pixdManifest, _wixLoc);
+ BalExitOnFailure(hr, "Failed to load conditions from XML.");
+
+ hr = LoadBootstrapperBAFunctions();
+ BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
+
+ hr = UpdateUIStrings(_command.action);
+ BalExitOnFailure(hr, "Failed to load UI strings.");
+
+ if (_command.action == BOOTSTRAPPER_ACTION_MODIFY) {
+ LoadOptionalFeatureStates(_engine);
+ }
+
+ GetBundleFileVersion();
+ // don't fail if we couldn't get the version info; best-effort only
+ LExit:
+ ReleaseObject(pixdManifest);
+ ReleaseStr(sczModulePath);
+
+ return hr;
+ }
+
+
+ //
+ // ProcessCommandLine - process the provided command line arguments.
+ //
+ HRESULT ProcessCommandLine(__inout LPWSTR* psczLanguage) {
+ HRESULT hr = S_OK;
+ int argc = 0;
+ LPWSTR* argv = nullptr;
+ LPWSTR sczVariableName = nullptr;
+ LPWSTR sczVariableValue = nullptr;
+
+ if (_command.wzCommandLine && *_command.wzCommandLine) {
+ argv = ::CommandLineToArgvW(_command.wzCommandLine, &argc);
+ ExitOnNullWithLastError(argv, hr, "Failed to get command line.");
+
+ for (int i = 0; i < argc; ++i) {
+ if (argv[i][0] == L'-' || argv[i][0] == L'/') {
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1)) {
+ if (i + 1 >= argc) {
+ hr = E_INVALIDARG;
+ BalExitOnFailure(hr, "Must specify a language.");
+ }
+
+ ++i;
+
+ hr = StrAllocString(psczLanguage, &argv[i][0], 0);
+ BalExitOnFailure(hr, "Failed to copy language.");
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"simple", -1)) {
+ _engine->SetVariableNumeric(L"SimpleInstall", 1);
+ }
+ } else if (_overridableVariables) {
+ int value;
+ const wchar_t* pwc = wcschr(argv[i], L'=');
+ if (pwc) {
+ hr = StrAllocString(&sczVariableName, argv[i], pwc - argv[i]);
+ BalExitOnFailure(hr, "Failed to copy variable name.");
+
+ hr = DictKeyExists(_overridableVariables, sczVariableName);
+ if (E_NOTFOUND == hr) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to set non-overridable variable: '%ls'.", sczVariableName);
+ hr = S_OK;
+ continue;
+ }
+ ExitOnFailure(hr, "Failed to check the dictionary of overridable variables.");
+
+ hr = StrAllocString(&sczVariableValue, ++pwc, 0);
+ BalExitOnFailure(hr, "Failed to copy variable value.");
+
+ if (::StrToIntEx(sczVariableValue, STIF_DEFAULT, &value)) {
+ hr = _engine->SetVariableNumeric(sczVariableName, value);
+ } else {
+ hr = _engine->SetVariableString(sczVariableName, sczVariableValue);
+ }
+ BalExitOnFailure(hr, "Failed to set variable.");
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]);
+ }
+ }
+ }
+ }
+
+ LExit:
+ if (argv) {
+ ::LocalFree(argv);
+ }
+
+ ReleaseStr(sczVariableName);
+ ReleaseStr(sczVariableValue);
+
+ return hr;
+ }
+
+ HRESULT LoadLocalization(__in_z LPCWSTR wzModulePath, __in_z_opt LPCWSTR wzLanguage) {
+ HRESULT hr = S_OK;
+ LPWSTR sczLocPath = nullptr;
+ LPCWSTR wzLocFileName = L"Default.wxl";
+
+ hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath);
+ BalExitOnFailure2(hr, "Failed to probe for loc file: %ls in path: %ls", wzLocFileName, wzModulePath);
+
+ hr = LocLoadFromFile(sczLocPath, &_wixLoc);
+ BalExitOnFailure1(hr, "Failed to load loc file from path: %ls", sczLocPath);
+
+ if (WIX_LOCALIZATION_LANGUAGE_NOT_SET != _wixLoc->dwLangId) {
+ ::SetThreadLocale(_wixLoc->dwLangId);
+ }
+
+ hr = StrAllocString(&_confirmCloseMessage, L"#(loc.ConfirmCancelMessage)", 0);
+ ExitOnFailure(hr, "Failed to initialize confirm message loc identifier.");
+
+ hr = LocLocalizeString(_wixLoc, &_confirmCloseMessage);
+ BalExitOnFailure1(hr, "Failed to localize confirm close message: %ls", _confirmCloseMessage);
+
+ LExit:
+ ReleaseStr(sczLocPath);
+
+ return hr;
+ }
+
+
+ HRESULT LoadTheme(__in_z LPCWSTR wzModulePath, __in_z_opt LPCWSTR wzLanguage) {
+ HRESULT hr = S_OK;
+ LPWSTR sczThemePath = nullptr;
+ LPCWSTR wzThemeFileName = L"Default.thm";
+ LPWSTR sczCaption = nullptr;
+
+ hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath);
+ BalExitOnFailure2(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath);
+
+ hr = ThemeLoadFromFile(sczThemePath, &_theme);
+ BalExitOnFailure1(hr, "Failed to load theme from path: %ls", sczThemePath);
+
+ hr = ThemeLocalize(_theme, _wixLoc);
+ BalExitOnFailure1(hr, "Failed to localize theme: %ls", sczThemePath);
+
+ // Update the caption if there are any formatted strings in it.
+ // If the wix developer is showing a hidden variable in the UI, then
+ // obviously they don't care about keeping it safe so don't go down the
+ // rabbit hole of making sure that this is securely freed.
+ hr = BalFormatString(_theme->sczCaption, &sczCaption);
+ if (SUCCEEDED(hr)) {
+ ThemeUpdateCaption(_theme, sczCaption);
+ }
+
+ LExit:
+ ReleaseStr(sczCaption);
+ ReleaseStr(sczThemePath);
+
+ return hr;
+ }
+
+
+ HRESULT ParseOverridableVariablesFromXml(__in IXMLDOMDocument* pixdManifest) {
+ HRESULT hr = S_OK;
+ IXMLDOMNode* pNode = nullptr;
+ IXMLDOMNodeList* pNodes = nullptr;
+ DWORD cNodes = 0;
+ LPWSTR scz = nullptr;
+ BOOL hidden = FALSE;
+
+ // get the list of variables users can override on the command line
+ hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOverridableVariable", &pNodes);
+ if (S_FALSE == hr) {
+ ExitFunction1(hr = S_OK);
+ }
+ ExitOnFailure(hr, "Failed to select overridable variable nodes.");
+
+ hr = pNodes->get_length((long*)&cNodes);
+ ExitOnFailure(hr, "Failed to get overridable variable node count.");
+
+ if (cNodes) {
+ hr = DictCreateStringList(&_overridableVariables, 32, DICT_FLAG_NONE);
+ ExitOnFailure(hr, "Failed to create the string dictionary.");
+
+ for (DWORD i = 0; i < cNodes; ++i) {
+ hr = XmlNextElement(pNodes, &pNode, nullptr);
+ ExitOnFailure(hr, "Failed to get next node.");
+
+ // @Name
+ hr = XmlGetAttributeEx(pNode, L"Name", &scz);
+ ExitOnFailure(hr, "Failed to get @Name.");
+
+ hr = XmlGetYesNoAttribute(pNode, L"Hidden", &hidden);
+
+ if (!hidden) {
+ hr = DictAddKey(_overridableVariables, scz);
+ ExitOnFailure1(hr, "Failed to add \"%ls\" to the string dictionary.", scz);
+ }
+
+ // prepare next iteration
+ ReleaseNullObject(pNode);
+ }
+ }
+
+ LExit:
+ ReleaseObject(pNode);
+ ReleaseObject(pNodes);
+ ReleaseStr(scz);
+ return hr;
+ }
+
+
+ //
+ // Get the file version of the bootstrapper and record in bootstrapper log file
+ //
+ HRESULT GetBundleFileVersion() {
+ HRESULT hr = S_OK;
+ ULARGE_INTEGER uliVersion = { };
+ LPWSTR sczCurrentPath = nullptr;
+
+ hr = PathForCurrentProcess(&sczCurrentPath, nullptr);
+ BalExitOnFailure(hr, "Failed to get bundle path.");
+
+ hr = FileVersion(sczCurrentPath, &uliVersion.HighPart, &uliVersion.LowPart);
+ BalExitOnFailure(hr, "Failed to get bundle file version.");
+
+ hr = _engine->SetVariableVersion(PYBA_VARIABLE_BUNDLE_FILE_VERSION, uliVersion.QuadPart);
+ BalExitOnFailure(hr, "Failed to set WixBundleFileVersion variable.");
+
+ LExit:
+ ReleaseStr(sczCurrentPath);
+
+ return hr;
+ }
+
+
+ //
+ // CreateMainWindow - creates the main install window.
+ //
+ HRESULT CreateMainWindow() {
+ HRESULT hr = S_OK;
+ HICON hIcon = reinterpret_cast<HICON>(_theme->hIcon);
+ WNDCLASSW wc = { };
+ DWORD dwWindowStyle = 0;
+ int x = CW_USEDEFAULT;
+ int y = CW_USEDEFAULT;
+ POINT ptCursor = { };
+ HMONITOR hMonitor = nullptr;
+ MONITORINFO mi = { };
+ COLORREF fg, bg;
+ HBRUSH bgBrush;
+
+ // If the theme did not provide an icon, try using the icon from the bundle engine.
+ if (!hIcon) {
+ HMODULE hBootstrapperEngine = ::GetModuleHandleW(nullptr);
+ if (hBootstrapperEngine) {
+ hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1));
+ }
+ }
+
+ fg = RGB(0, 0, 0);
+ bg = RGB(255, 255, 255);
+ bgBrush = (HBRUSH)(COLOR_WINDOW+1);
+ if (_theme->dwFontId < _theme->cFonts) {
+ THEME_FONT *font = &_theme->rgFonts[_theme->dwFontId];
+ fg = font->crForeground;
+ bg = font->crBackground;
+ bgBrush = font->hBackground;
+ RemapColor(&fg, &bg, &bgBrush);
+ }
+
+ // Register the window class and create the window.
+ wc.lpfnWndProc = PythonBootstrapperApplication::WndProc;
+ wc.hInstance = _hModule;
+ wc.hIcon = hIcon;
+ wc.hCursor = ::LoadCursorW(nullptr, (LPCWSTR)IDC_ARROW);
+ wc.hbrBackground = bgBrush;
+ wc.lpszMenuName = nullptr;
+ wc.lpszClassName = PYBA_WINDOW_CLASS;
+ if (!::RegisterClassW(&wc)) {
+ ExitWithLastError(hr, "Failed to register window.");
+ }
+
+ _registered = TRUE;
+
+ // Calculate the window style based on the theme style and command display value.
+ dwWindowStyle = _theme->dwStyle;
+ if (BOOTSTRAPPER_DISPLAY_NONE >= _command.display) {
+ dwWindowStyle &= ~WS_VISIBLE;
+ }
+
+ // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden)
+ if (::IsWindow(_command.hwndSplashScreen)) {
+ dwWindowStyle &= ~WS_VISIBLE;
+ }
+
+ // Center the window on the monitor with the mouse.
+ if (::GetCursorPos(&ptCursor)) {
+ hMonitor = ::MonitorFromPoint(ptCursor, MONITOR_DEFAULTTONEAREST);
+ if (hMonitor) {
+ mi.cbSize = sizeof(mi);
+ if (::GetMonitorInfoW(hMonitor, &mi)) {
+ x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - _theme->nWidth) / 2;
+ y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - _theme->nHeight) / 2;
+ }
+ }
+ }
+
+ _hWnd = ::CreateWindowExW(
+ 0,
+ wc.lpszClassName,
+ _theme->sczCaption,
+ dwWindowStyle,
+ x,
+ y,
+ _theme->nWidth,
+ _theme->nHeight,
+ HWND_DESKTOP,
+ nullptr,
+ _hModule,
+ this
+ );
+ ExitOnNullWithLastError(_hWnd, hr, "Failed to create window.");
+
+ hr = S_OK;
+
+ LExit:
+ return hr;
+ }
+
+
+ //
+ // InitializeTaskbarButton - initializes taskbar button for progress.
+ //
+ void InitializeTaskbarButton() {
+ HRESULT hr = S_OK;
+
+ hr = ::CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, __uuidof(ITaskbarList3), reinterpret_cast<LPVOID*>(&_taskbarList));
+ if (REGDB_E_CLASSNOTREG == hr) {
+ // not supported before Windows 7
+ ExitFunction1(hr = S_OK);
+ }
+ BalExitOnFailure(hr, "Failed to create ITaskbarList3. Continuing.");
+
+ _taskbarButtonCreatedMessage = ::RegisterWindowMessageW(L"TaskbarButtonCreated");
+ BalExitOnNullWithLastError(_taskbarButtonCreatedMessage, hr, "Failed to get TaskbarButtonCreated message. Continuing.");
+
+ LExit:
+ return;
+ }
+
+ //
+ // DestroyMainWindow - clean up all the window registration.
+ //
+ void DestroyMainWindow() {
+ if (::IsWindow(_hWnd)) {
+ ::DestroyWindow(_hWnd);
+ _hWnd = nullptr;
+ _taskbarButtonOK = FALSE;
+ }
+
+ if (_registered) {
+ ::UnregisterClassW(PYBA_WINDOW_CLASS, _hModule);
+ _registered = FALSE;
+ }
+ }
+
+
+ //
+ // WndProc - standard windows message handler.
+ //
+ static LRESULT CALLBACK WndProc(
+ __in HWND hWnd,
+ __in UINT uMsg,
+ __in WPARAM wParam,
+ __in LPARAM lParam
+ ) {
+#pragma warning(suppress:4312)
+ auto pBA = reinterpret_cast<PythonBootstrapperApplication*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
+
+ switch (uMsg) {
+ case WM_NCCREATE: {
+ LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
+ pBA = reinterpret_cast<PythonBootstrapperApplication*>(lpcs->lpCreateParams);
+#pragma warning(suppress:4244)
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
+ break;
+ }
+
+ case WM_NCDESTROY: {
+ LRESULT lres = ThemeDefWindowProc(pBA ? pBA->_theme : nullptr, hWnd, uMsg, wParam, lParam);
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
+ return lres;
+ }
+
+ case WM_CREATE:
+ if (!pBA->OnCreate(hWnd)) {
+ return -1;
+ }
+ break;
+
+ case WM_QUERYENDSESSION:
+ return IDCANCEL != pBA->OnSystemShutdown(static_cast<DWORD>(lParam), IDCANCEL);
+
+ case WM_CLOSE:
+ // If the user chose not to close, do *not* let the default window proc handle the message.
+ if (!pBA->OnClose()) {
+ return 0;
+ }
+ break;
+
+ case WM_DESTROY:
+ ::PostQuitMessage(0);
+ break;
+
+ case WM_PAINT: __fallthrough;
+ case WM_ERASEBKGND:
+ if (pBA && pBA->_suppressPaint) {
+ return TRUE;
+ }
+ break;
+
+ case WM_PYBA_SHOW_HELP:
+ pBA->OnShowHelp();
+ return 0;
+
+ case WM_PYBA_DETECT_PACKAGES:
+ pBA->OnDetect();
+ return 0;
+
+ case WM_PYBA_PLAN_PACKAGES:
+ pBA->OnPlan(static_cast<BOOTSTRAPPER_ACTION>(lParam));
+ return 0;
+
+ case WM_PYBA_APPLY_PACKAGES:
+ pBA->OnApply();
+ return 0;
+
+ case WM_PYBA_CHANGE_STATE:
+ pBA->OnChangeState(static_cast<PYBA_STATE>(lParam));
+ return 0;
+
+ case WM_PYBA_SHOW_FAILURE:
+ pBA->OnShowFailure();
+ return 0;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ // Customize commands
+ // Success/failure commands
+ case ID_LAUNCH_BUTTON:
+ pBA->OnClickLaunchButton();
+ return 0;
+
+ case ID_SUCCESS_RESTART_BUTTON: __fallthrough;
+ case ID_FAILURE_RESTART_BUTTON:
+ pBA->OnClickRestartButton();
+ return 0;
+
+ case IDCANCEL: __fallthrough;
+ case ID_INSTALL_CANCEL_BUTTON: __fallthrough;
+ case ID_CUSTOM1_CANCEL_BUTTON: __fallthrough;
+ case ID_CUSTOM2_CANCEL_BUTTON: __fallthrough;
+ case ID_MODIFY_CANCEL_BUTTON: __fallthrough;
+ case ID_PROGRESS_CANCEL_BUTTON: __fallthrough;
+ case ID_SUCCESS_CANCEL_BUTTON: __fallthrough;
+ case ID_FAILURE_CANCEL_BUTTON: __fallthrough;
+ case ID_CLOSE_BUTTON:
+ pBA->OnCommand(ID_CLOSE_BUTTON);
+ return 0;
+
+ default:
+ pBA->OnCommand((CONTROL_ID)LOWORD(wParam));
+ }
+ break;
+
+ case WM_NOTIFY:
+ if (lParam) {
+ LPNMHDR pnmhdr = reinterpret_cast<LPNMHDR>(lParam);
+ switch (pnmhdr->code) {
+ case NM_CLICK: __fallthrough;
+ case NM_RETURN:
+ switch (static_cast<DWORD>(pnmhdr->idFrom)) {
+ case ID_FAILURE_LOGFILE_LINK:
+ pBA->OnClickLogFileLink();
+ return 1;
+ }
+ }
+ }
+ break;
+
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLORBTN:
+ if (pBA) {
+ HBRUSH brush = nullptr;
+ if (pBA->SetControlColor((HWND)lParam, (HDC)wParam, &brush)) {
+ return (LRESULT)brush;
+ }
+ }
+ break;
+ }
+
+ if (pBA && pBA->_taskbarList && uMsg == pBA->_taskbarButtonCreatedMessage) {
+ pBA->_taskbarButtonOK = TRUE;
+ return 0;
+ }
+
+ return ThemeDefWindowProc(pBA ? pBA->_theme : nullptr, hWnd, uMsg, wParam, lParam);
+ }
+
+ //
+ // OnCreate - finishes loading the theme.
+ //
+ BOOL OnCreate(__in HWND hWnd) {
+ HRESULT hr = S_OK;
+
+ hr = ThemeLoadControls(_theme, hWnd, CONTROL_ID_NAMES, countof(CONTROL_ID_NAMES));
+ BalExitOnFailure(hr, "Failed to load theme controls.");
+
+ C_ASSERT(COUNT_PAGE == countof(PAGE_NAMES));
+ C_ASSERT(countof(_pageIds) == countof(PAGE_NAMES));
+
+ ThemeGetPageIds(_theme, PAGE_NAMES, _pageIds, countof(_pageIds));
+
+ // Initialize the text on all "application" (non-page) controls.
+ for (DWORD i = 0; i < _theme->cControls; ++i) {
+ THEME_CONTROL* pControl = _theme->rgControls + i;
+ LPWSTR text = nullptr;
+
+ if (!pControl->wPageId && pControl->sczText && *pControl->sczText) {
+ HRESULT hrFormat;
+
+ // If the wix developer is showing a hidden variable in the UI,
+ // then obviously they don't care about keeping it safe so don't
+ // go down the rabbit hole of making sure that this is securely
+ // freed.
+ hrFormat = BalFormatString(pControl->sczText, &text);
+ if (SUCCEEDED(hrFormat)) {
+ ThemeSetTextControl(_theme, pControl->wId, text);
+ ReleaseStr(text);
+ }
+ }
+ }
+
+ LExit:
+ return SUCCEEDED(hr);
+ }
+
+ void RemapColor(COLORREF *fg, COLORREF *bg, HBRUSH *bgBrush) {
+ if (*fg == RGB(0, 0, 0)) {
+ *fg = GetSysColor(COLOR_WINDOWTEXT);
+ } else if (*fg == RGB(128, 128, 128)) {
+ *fg = GetSysColor(COLOR_GRAYTEXT);
+ }
+ if (*bgBrush && *bg == RGB(255, 255, 255)) {
+ *bg = GetSysColor(COLOR_WINDOW);
+ *bgBrush = GetSysColorBrush(COLOR_WINDOW);
+ }
+ }
+
+ BOOL SetControlColor(HWND hWnd, HDC hDC, HBRUSH *brush) {
+ for (int i = 0; i < _theme->cControls; ++i) {
+ if (_theme->rgControls[i].hWnd != hWnd) {
+ continue;
+ }
+
+ DWORD fontId = _theme->rgControls[i].dwFontId;
+ if (fontId > _theme->cFonts) {
+ fontId = 0;
+ }
+ THEME_FONT *fnt = &_theme->rgFonts[fontId];
+
+ COLORREF fg = fnt->crForeground, bg = fnt->crBackground;
+ *brush = fnt->hBackground;
+ RemapColor(&fg, &bg, brush);
+ ::SetTextColor(hDC, fg);
+ ::SetBkColor(hDC, bg);
+
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ //
+ // OnShowFailure - display the failure page.
+ //
+ void OnShowFailure() {
+ SetState(PYBA_STATE_FAILED, S_OK);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ return;
+ }
+
+
+ //
+ // OnShowHelp - display the help page.
+ //
+ void OnShowHelp() {
+ SetState(PYBA_STATE_HELP, S_OK);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ return;
+ }
+
+
+ //
+ // OnDetect - start the processing of packages.
+ //
+ void OnDetect() {
+ HRESULT hr = S_OK;
+
+ if (_baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect BA function");
+ hr = _baFunction->OnDetect();
+ BalExitOnFailure(hr, "Failed calling detect BA function.");
+ }
+
+ SetState(PYBA_STATE_DETECTING, hr);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ // Tell the core we're ready for the packages to be processed now.
+ hr = _engine->Detect();
+ BalExitOnFailure(hr, "Failed to start detecting chain.");
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_DETECTING, hr);
+ }
+
+ return;
+ }
+
+ HRESULT UpdateUIStrings(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT hr = S_OK;
+ LPCWSTR likeInstalling = nullptr;
+ LPCWSTR likeInstallation = nullptr;
+ switch (action) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ likeInstalling = L"Installing";
+ likeInstallation = L"Installation";
+ break;
+ case BOOTSTRAPPER_ACTION_MODIFY:
+ // For modify, we actually want to pass INSTALL
+ action = BOOTSTRAPPER_ACTION_INSTALL;
+ likeInstalling = L"Modifying";
+ likeInstallation = L"Modification";
+ break;
+ case BOOTSTRAPPER_ACTION_REPAIR:
+ likeInstalling = L"Repairing";
+ likeInstallation = L"Repair";
+ break;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ likeInstalling = L"Uninstalling";
+ likeInstallation = L"Uninstallation";
+ break;
+ }
+
+ if (likeInstalling) {
+ LPWSTR locName = nullptr;
+ LOC_STRING *locText = nullptr;
+ hr = StrAllocFormatted(&locName, L"#(loc.%ls)", likeInstalling);
+ if (SUCCEEDED(hr)) {
+ hr = LocGetString(_wixLoc, locName, &locText);
+ ReleaseStr(locName);
+ }
+ _engine->SetVariableString(
+ L"ActionLikeInstalling",
+ SUCCEEDED(hr) && locText ? locText->wzText : likeInstalling
+ );
+ }
+
+ if (likeInstallation) {
+ LPWSTR locName = nullptr;
+ LOC_STRING *locText = nullptr;
+ hr = StrAllocFormatted(&locName, L"#(loc.%ls)", likeInstallation);
+ if (SUCCEEDED(hr)) {
+ hr = LocGetString(_wixLoc, locName, &locText);
+ ReleaseStr(locName);
+ }
+ _engine->SetVariableString(
+ L"ActionLikeInstallation",
+ SUCCEEDED(hr) && locText ? locText->wzText : likeInstallation
+ );
+ }
+ return hr;
+ }
+
+ //
+ // OnPlan - plan the detected changes.
+ //
+ void OnPlan(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT hr = S_OK;
+
+ _plannedAction = action;
+
+ hr = UpdateUIStrings(action);
+ BalExitOnFailure(hr, "Failed to update strings");
+
+ // If we are going to apply a downgrade, bail.
+ if (_downgradingOtherVersion && BOOTSTRAPPER_ACTION_UNINSTALL < action) {
+ if (_suppressDowngradeFailure) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version of this product is installed but downgrade failure has been suppressed; continuing...");
+ } else {
+ hr = HRESULT_FROM_WIN32(ERROR_PRODUCT_VERSION);
+ BalExitOnFailure(hr, "Cannot install a product when a newer version is installed.");
+ }
+ }
+
+ SetState(PYBA_STATE_PLANNING, hr);
+
+ if (_baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running plan BA function");
+ _baFunction->OnPlan();
+ }
+
+ hr = _engine->Plan(action);
+ BalExitOnFailure(hr, "Failed to start planning packages.");
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_PLANNING, hr);
+ }
+
+ return;
+ }
+
+
+ //
+ // OnApply - apply the packages.
+ //
+ void OnApply() {
+ HRESULT hr = S_OK;
+
+ SetState(PYBA_STATE_APPLYING, hr);
+ SetProgressState(hr);
+ SetTaskbarButtonProgress(0);
+
+ hr = _engine->Apply(_hWnd);
+ BalExitOnFailure(hr, "Failed to start applying packages.");
+
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, TRUE); // ensure the cancel button is enabled before starting.
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_APPLYING, hr);
+ }
+
+ return;
+ }
+
+
+ //
+ // OnChangeState - change state.
+ //
+ void OnChangeState(__in PYBA_STATE state) {
+ LPWSTR unformattedText = nullptr;
+
+ _state = state;
+
+ // If our install is at the end (success or failure) and we're not showing full UI
+ // then exit (prompt for restart if required).
+ if ((PYBA_STATE_APPLIED <= _state && BOOTSTRAPPER_DISPLAY_FULL > _command.display)) {
+ // If a restart was required but we were not automatically allowed to
+ // accept the reboot then do the prompt.
+ if (_restartRequired && !_allowRestart) {
+ StrAllocFromError(&unformattedText, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), nullptr);
+
+ _allowRestart = IDOK == ::MessageBoxW(
+ _hWnd,
+ unformattedText ? unformattedText : L"The requested operation is successful. Changes will not be effective until the system is rebooted.",
+ _theme->sczCaption,
+ MB_ICONEXCLAMATION | MB_OKCANCEL
+ );
+ }
+
+ // Quietly exit.
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ } else { // try to change the pages.
+ DWORD newPageId = 0;
+ DeterminePageId(_state, &newPageId);
+
+ if (_visiblePageId != newPageId) {
+ ShowPage(newPageId);
+ }
+ }
+
+ ReleaseStr(unformattedText);
+ }
+
+ //
+ // Called before showing a page to handle all controls.
+ //
+ void ProcessPageControls(THEME_PAGE *pPage) {
+ if (!pPage) {
+ return;
+ }
+
+ for (DWORD i = 0; i < pPage->cControlIndices; ++i) {
+ THEME_CONTROL* pControl = _theme->rgControls + pPage->rgdwControlIndices[i];
+ BOOL enableControl = TRUE;
+
+ // If this is a named control, try to set its default state.
+ if (pControl->sczName && *pControl->sczName) {
+ // If this is a checkable control, try to set its default state
+ // to the state of a matching named Burn variable.
+ if (IsCheckable(pControl)) {
+ LONGLONG llValue = 0;
+ HRESULT hr = BalGetNumericVariable(pControl->sczName, &llValue);
+
+ // If the control value isn't set then disable it.
+ if (!SUCCEEDED(hr)) {
+ enableControl = FALSE;
+ } else {
+ ThemeSendControlMessage(
+ _theme,
+ pControl->wId,
+ BM_SETCHECK,
+ SUCCEEDED(hr) && llValue ? BST_CHECKED : BST_UNCHECKED,
+ 0
+ );
+ }
+ }
+
+ // Hide or disable controls based on the control name with 'State' appended
+ LPWSTR controlName = nullptr;
+ HRESULT hr = StrAllocFormatted(&controlName, L"%lsState", pControl->sczName);
+ if (SUCCEEDED(hr)) {
+ LPWSTR controlState = nullptr;
+ hr = BalGetStringVariable(controlName, &controlState);
+ if (SUCCEEDED(hr) && controlState && *controlState) {
+ if (controlState[0] == '[') {
+ LPWSTR formatted = nullptr;
+ if (SUCCEEDED(BalFormatString(controlState, &formatted))) {
+ StrFree(controlState);
+ controlState = formatted;
+ }
+ }
+
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"disable", -1)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Disable control %ls", pControl->sczName);
+ enableControl = FALSE;
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"hide", -1)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Hide control %ls", pControl->sczName);
+ // TODO: This doesn't work
+ ThemeShowControl(_theme, pControl->wId, SW_HIDE);
+ } else {
+ // An explicit state can override the lack of a
+ // backing variable.
+ enableControl = TRUE;
+ }
+ }
+ StrFree(controlState);
+ }
+ StrFree(controlName);
+ controlName = nullptr;
+
+
+ // If a command link has a note, then add it.
+ if ((pControl->dwStyle & BS_TYPEMASK) == BS_COMMANDLINK ||
+ (pControl->dwStyle & BS_TYPEMASK) == BS_DEFCOMMANDLINK) {
+ hr = StrAllocFormatted(&controlName, L"#(loc.%lsNote)", pControl->sczName);
+ if (SUCCEEDED(hr)) {
+ LOC_STRING *locText = nullptr;
+ hr = LocGetString(_wixLoc, controlName, &locText);
+ if (SUCCEEDED(hr) && locText && locText->wzText && locText->wzText[0]) {
+ LPWSTR text = nullptr;
+ hr = BalFormatString(locText->wzText, &text);
+ if (SUCCEEDED(hr) && text && text[0]) {
+ ThemeSendControlMessage(_theme, pControl->wId, BCM_SETNOTE, 0, (LPARAM)text);
+ ReleaseStr(text);
+ text = nullptr;
+ }
+ }
+ ReleaseStr(controlName);
+ controlName = nullptr;
+ }
+ hr = S_OK;
+ }
+ }
+
+ ThemeControlEnable(_theme, pControl->wId, enableControl);
+
+ // Format the text in each of the new page's controls
+ if (pControl->sczText && *pControl->sczText) {
+ // If the wix developer is showing a hidden variable
+ // in the UI, then obviously they don't care about
+ // keeping it safe so don't go down the rabbit hole
+ // of making sure that this is securely freed.
+ LPWSTR text = nullptr;
+ HRESULT hr = BalFormatString(pControl->sczText, &text);
+ if (SUCCEEDED(hr)) {
+ ThemeSetTextControl(_theme, pControl->wId, text);
+ }
+ }
+ }
+ }
+
+ //
+ // OnClose - called when the window is trying to be closed.
+ //
+ BOOL OnClose() {
+ BOOL close = FALSE;
+
+ // If we've already succeeded or failed or showing the help page, just close (prompts are annoying if the bootstrapper is done).
+ if (PYBA_STATE_APPLIED <= _state || PYBA_STATE_HELP == _state) {
+ close = TRUE;
+ } else {
+ // prompt the user or force the cancel if there is no UI.
+ close = PromptCancel(
+ _hWnd,
+ BOOTSTRAPPER_DISPLAY_FULL != _command.display,
+ _confirmCloseMessage ? _confirmCloseMessage : L"Are you sure you want to cancel?",
+ _theme->sczCaption
+ );
+ }
+
+ // If we're doing progress then we never close, we just cancel to let rollback occur.
+ if (PYBA_STATE_APPLYING <= _state && PYBA_STATE_APPLIED > _state) {
+ // If we canceled disable cancel button since clicking it again is silly.
+ if (close) {
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, FALSE);
+ }
+
+ close = FALSE;
+ }
+
+ return close;
+ }
+
+ //
+ // OnClickCloseButton - close the application.
+ //
+ void OnClickCloseButton() {
+ ::SendMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+
+
+ //
+ // OnClickLaunchButton - launch the app from the success page.
+ //
+ void OnClickLaunchButton() {
+ HRESULT hr = S_OK;
+ LPWSTR sczUnformattedLaunchTarget = nullptr;
+ LPWSTR sczLaunchTarget = nullptr;
+ LPWSTR sczLaunchTargetElevatedId = nullptr;
+ LPWSTR sczUnformattedArguments = nullptr;
+ LPWSTR sczArguments = nullptr;
+ int nCmdShow = SW_SHOWNORMAL;
+
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_TARGET_PATH, &sczUnformattedLaunchTarget);
+ BalExitOnFailure1(hr, "Failed to get launch target variable '%ls'.", PYBA_VARIABLE_LAUNCH_TARGET_PATH);
+
+ hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget);
+ BalExitOnFailure1(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget);
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID)) {
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId);
+ BalExitOnFailure1(hr, "Failed to get launch target elevated id '%ls'.", PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID);
+ }
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_ARGUMENTS)) {
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments);
+ BalExitOnFailure1(hr, "Failed to get launch arguments '%ls'.", PYBA_VARIABLE_LAUNCH_ARGUMENTS);
+ }
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_HIDDEN)) {
+ nCmdShow = SW_HIDE;
+ }
+
+ if (sczLaunchTargetElevatedId && !_triedToLaunchElevated) {
+ _triedToLaunchElevated = TRUE;
+ hr = _engine->LaunchApprovedExe(_hWnd, sczLaunchTargetElevatedId, sczUnformattedArguments, 0);
+ if (FAILED(hr)) {
+ BalLogError(hr, "Failed to launch elevated target: %ls", sczLaunchTargetElevatedId);
+
+ //try with ShelExec next time
+ OnClickLaunchButton();
+ }
+ } else {
+ if (sczUnformattedArguments) {
+ hr = BalFormatString(sczUnformattedArguments, &sczArguments);
+ BalExitOnFailure1(hr, "Failed to format launch arguments variable: %ls", sczUnformattedArguments);
+ }
+
+ hr = ShelExec(sczLaunchTarget, sczArguments, L"open", nullptr, nCmdShow, _hWnd, nullptr);
+ BalExitOnFailure1(hr, "Failed to launch target: %ls", sczLaunchTarget);
+
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+
+ LExit:
+ StrSecureZeroFreeString(sczArguments);
+ ReleaseStr(sczUnformattedArguments);
+ ReleaseStr(sczLaunchTargetElevatedId);
+ StrSecureZeroFreeString(sczLaunchTarget);
+ ReleaseStr(sczUnformattedLaunchTarget);
+
+ return;
+ }
+
+
+ //
+ // OnClickRestartButton - allows the restart and closes the app.
+ //
+ void OnClickRestartButton() {
+ AssertSz(_restartRequired, "Restart must be requested to be able to click on the restart button.");
+
+ _allowRestart = TRUE;
+ ::SendMessageW(_hWnd, WM_CLOSE, 0, 0);
+
+ return;
+ }
+
+
+ //
+ // OnClickLogFileLink - show the log file.
+ //
+ void OnClickLogFileLink() {
+ HRESULT hr = S_OK;
+ LPWSTR sczLogFile = nullptr;
+
+ hr = BalGetStringVariable(_bundle.sczLogVariable, &sczLogFile);
+ BalExitOnFailure1(hr, "Failed to get log file variable '%ls'.", _bundle.sczLogVariable);
+
+ hr = ShelExec(L"notepad.exe", sczLogFile, L"open", nullptr, SW_SHOWDEFAULT, _hWnd, nullptr);
+ BalExitOnFailure1(hr, "Failed to open log file target: %ls", sczLogFile);
+
+ LExit:
+ ReleaseStr(sczLogFile);
+
+ return;
+ }
+
+
+ //
+ // SetState
+ //
+ void SetState(__in PYBA_STATE state, __in HRESULT hrStatus) {
+ if (FAILED(hrStatus)) {
+ _hrFinal = hrStatus;
+ }
+
+ if (FAILED(_hrFinal)) {
+ state = PYBA_STATE_FAILED;
+ }
+
+ if (_state != state) {
+ ::PostMessageW(_hWnd, WM_PYBA_CHANGE_STATE, 0, state);
+ }
+ }
+
+ //
+ // GoToPage
+ //
+ void GoToPage(__in PAGE page) {
+ _installPage = page;
+ ::PostMessageW(_hWnd, WM_PYBA_CHANGE_STATE, 0, _state);
+ }
+
+ void DeterminePageId(__in PYBA_STATE state, __out DWORD* pdwPageId) {
+ LONGLONG simple;
+
+ if (BOOTSTRAPPER_DISPLAY_PASSIVE == _command.display) {
+ switch (state) {
+ case PYBA_STATE_INITIALIZED:
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == _command.action
+ ? _pageIds[PAGE_HELP]
+ : _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_HELP:
+ *pdwPageId = _pageIds[PAGE_HELP];
+ break;
+
+ case PYBA_STATE_DETECTING:
+ *pdwPageId = _pageIds[PAGE_LOADING]
+ ? _pageIds[PAGE_LOADING]
+ : _pageIds[PAGE_PROGRESS_PASSIVE]
+ ? _pageIds[PAGE_PROGRESS_PASSIVE]
+ : _pageIds[PAGE_PROGRESS];
+ break;
+
+ case PYBA_STATE_DETECTED: __fallthrough;
+ case PYBA_STATE_PLANNING: __fallthrough;
+ case PYBA_STATE_PLANNED: __fallthrough;
+ case PYBA_STATE_APPLYING: __fallthrough;
+ case PYBA_STATE_CACHING: __fallthrough;
+ case PYBA_STATE_CACHED: __fallthrough;
+ case PYBA_STATE_EXECUTING: __fallthrough;
+ case PYBA_STATE_EXECUTED:
+ *pdwPageId = _pageIds[PAGE_PROGRESS_PASSIVE]
+ ? _pageIds[PAGE_PROGRESS_PASSIVE]
+ : _pageIds[PAGE_PROGRESS];
+ break;
+
+ default:
+ *pdwPageId = 0;
+ break;
+ }
+ } else if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ switch (state) {
+ case PYBA_STATE_INITIALIZING:
+ *pdwPageId = 0;
+ break;
+
+ case PYBA_STATE_INITIALIZED:
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == _command.action
+ ? _pageIds[PAGE_HELP]
+ : _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_HELP:
+ *pdwPageId = _pageIds[PAGE_HELP];
+ break;
+
+ case PYBA_STATE_DETECTING:
+ *pdwPageId = _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_DETECTED:
+ if (_installPage == PAGE_LOADING) {
+ switch (_command.action) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ if (_upgrading) {
+ _installPage = PAGE_UPGRADE;
+ } else if (SUCCEEDED(BalGetNumericVariable(L"SimpleInstall", &simple)) && simple) {
+ _installPage = PAGE_SIMPLE_INSTALL;
+ } else {
+ _installPage = PAGE_INSTALL;
+ }
+ break;
+
+ case BOOTSTRAPPER_ACTION_MODIFY: __fallthrough;
+ case BOOTSTRAPPER_ACTION_REPAIR: __fallthrough;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ _installPage = PAGE_MODIFY;
+ break;
+ }
+ }
+ *pdwPageId = _pageIds[_installPage];
+ break;
+
+ case PYBA_STATE_PLANNING: __fallthrough;
+ case PYBA_STATE_PLANNED: __fallthrough;
+ case PYBA_STATE_APPLYING: __fallthrough;
+ case PYBA_STATE_CACHING: __fallthrough;
+ case PYBA_STATE_CACHED: __fallthrough;
+ case PYBA_STATE_EXECUTING: __fallthrough;
+ case PYBA_STATE_EXECUTED:
+ *pdwPageId = _pageIds[PAGE_PROGRESS];
+ break;
+
+ case PYBA_STATE_APPLIED:
+ *pdwPageId = _pageIds[PAGE_SUCCESS];
+ break;
+
+ case PYBA_STATE_FAILED:
+ *pdwPageId = _pageIds[PAGE_FAILURE];
+ break;
+ }
+ }
+ }
+
+ BOOL WillElevate() {
+ static BAL_CONDITION WILL_ELEVATE_CONDITION = {
+ L"not WixBundleElevated and ("
+ /*Elevate when installing for all users*/
+ L"InstallAllUsers or "
+ /*Elevate when installing the launcher for all users and it was not detected*/
+ L"(Include_launcher and InstallLauncherAllUsers and not DetectedLauncher)"
+ L")",
+ L""
+ };
+ BOOL result;
+
+ return SUCCEEDED(BalConditionEvaluate(&WILL_ELEVATE_CONDITION, _engine, &result, nullptr)) && result;
+ }
+
+ BOOL IsCrtInstalled() {
+ if (_crtInstalledToken > 0) {
+ return TRUE;
+ } else if (_crtInstalledToken == 0) {
+ return FALSE;
+ }
+
+ // Check whether at least CRT v10.0.10137.0 is available.
+ // It should only be installed as a Windows Update package, which means
+ // we don't need to worry about 32-bit/64-bit.
+ LPCWSTR crtFile = L"ucrtbase.dll";
+
+ DWORD cbVer = GetFileVersionInfoSizeW(crtFile, nullptr);
+ if (!cbVer) {
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ void *pData = malloc(cbVer);
+ if (!pData) {
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ if (!GetFileVersionInfoW(crtFile, 0, cbVer, pData)) {
+ free(pData);
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ VS_FIXEDFILEINFO *ffi;
+ UINT cb;
+ BOOL result = FALSE;
+
+ if (VerQueryValueW(pData, L"\\", (LPVOID*)&ffi, &cb) &&
+ ffi->dwFileVersionMS == 0x000A0000 && ffi->dwFileVersionLS >= 0x27990000) {
+ result = TRUE;
+ }
+
+ free(pData);
+ _crtInstalledToken = result ? 1 : 0;
+ return result;
+ }
+
+ BOOL QueryElevateForCrtInstall() {
+ // Called to prompt the user that even though they think they won't need
+ // to elevate, they actually will because of the CRT install.
+ if (IsCrtInstalled()) {
+ // CRT is already installed - no need to prompt
+ return TRUE;
+ }
+
+ LONGLONG elevated;
+ HRESULT hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
+ if (SUCCEEDED(hr) && elevated) {
+ // Already elevated - no need to prompt
+ return TRUE;
+ }
+
+ LOC_STRING *locStr;
+ hr = LocGetString(_wixLoc, L"#(loc.ElevateForCRTInstall)", &locStr);
+ if (FAILED(hr)) {
+ BalLogError(hr, "Failed to get ElevateForCRTInstall string");
+ return FALSE;
+ }
+ return ::MessageBoxW(_hWnd, locStr->wzText, _theme->sczCaption, MB_YESNO) != IDNO;
+ }
+
+ HRESULT EvaluateConditions() {
+ HRESULT hr = S_OK;
+ BOOL result = FALSE;
+
+ for (DWORD i = 0; i < _conditions.cConditions; ++i) {
+ BAL_CONDITION* pCondition = _conditions.rgConditions + i;
+
+ hr = BalConditionEvaluate(pCondition, _engine, &result, &_failedMessage);
+ BalExitOnFailure(hr, "Failed to evaluate condition.");
+
+ if (!result) {
+ // Hope they didn't have hidden variables in their message, because it's going in the log in plaintext.
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "%ls", _failedMessage);
+
+ hr = E_WIXSTDBA_CONDITION_FAILED;
+ // todo: remove in WiX v4, in case people are relying on v3.x logging behavior
+ BalExitOnFailure1(hr, "Bundle condition evaluated to false: %ls", pCondition->sczCondition);
+ }
+ }
+
+ ReleaseNullStrSecure(_failedMessage);
+
+ LExit:
+ return hr;
+ }
+
+
+ void SetTaskbarButtonProgress(__in DWORD dwOverallPercentage) {
+ HRESULT hr = S_OK;
+
+ if (_taskbarButtonOK) {
+ hr = _taskbarList->SetProgressValue(_hWnd, dwOverallPercentage, 100UL);
+ BalExitOnFailure1(hr, "Failed to set taskbar button progress to: %d%%.", dwOverallPercentage);
+ }
+
+ LExit:
+ return;
+ }
+
+
+ void SetTaskbarButtonState(__in TBPFLAG tbpFlags) {
+ HRESULT hr = S_OK;
+
+ if (_taskbarButtonOK) {
+ hr = _taskbarList->SetProgressState(_hWnd, tbpFlags);
+ BalExitOnFailure1(hr, "Failed to set taskbar button state.", tbpFlags);
+ }
+
+ LExit:
+ return;
+ }
+
+
+ void SetProgressState(__in HRESULT hrStatus) {
+ TBPFLAG flag = TBPF_NORMAL;
+
+ if (IsCanceled() || HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) == hrStatus) {
+ flag = TBPF_PAUSED;
+ } else if (IsRollingBack() || FAILED(hrStatus)) {
+ flag = TBPF_ERROR;
+ }
+
+ SetTaskbarButtonState(flag);
+ }
+
+
+ HRESULT LoadBootstrapperBAFunctions() {
+ HRESULT hr = S_OK;
+ LPWSTR sczBafPath = nullptr;
+
+ hr = PathRelativeToModule(&sczBafPath, L"bafunctions.dll", _hModule);
+ BalExitOnFailure(hr, "Failed to get path to BA function DLL.");
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: LoadBootstrapperBAFunctions() - BA function DLL %ls", sczBafPath);
+#endif
+
+ _hBAFModule = ::LoadLibraryW(sczBafPath);
+ if (_hBAFModule) {
+ auto pfnBAFunctionCreate = reinterpret_cast<PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE>(::GetProcAddress(_hBAFModule, "CreateBootstrapperBAFunction"));
+ BalExitOnNullWithLastError1(pfnBAFunctionCreate, hr, "Failed to get CreateBootstrapperBAFunction entry-point from: %ls", sczBafPath);
+
+ hr = pfnBAFunctionCreate(_engine, _hBAFModule, &_baFunction);
+ BalExitOnFailure(hr, "Failed to create BA function.");
+ }
+#ifdef DEBUG
+ else {
+ BalLogError(HRESULT_FROM_WIN32(::GetLastError()), "PYBA: LoadBootstrapperBAFunctions() - Failed to load DLL %ls", sczBafPath);
+ }
+#endif
+
+ LExit:
+ if (_hBAFModule && !_baFunction) {
+ ::FreeLibrary(_hBAFModule);
+ _hBAFModule = nullptr;
+ }
+ ReleaseStr(sczBafPath);
+
+ return hr;
+ }
+
+ BOOL IsCheckable(THEME_CONTROL* pControl) {
+ if (!pControl->sczName || !pControl->sczName[0]) {
+ return FALSE;
+ }
+
+ if (pControl->type == THEME_CONTROL_TYPE_CHECKBOX) {
+ return TRUE;
+ }
+
+ if (pControl->type == THEME_CONTROL_TYPE_BUTTON) {
+ if ((pControl->dwStyle & BS_TYPEMASK) == BS_AUTORADIOBUTTON) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+ }
+
+ void SavePageSettings() {
+ DWORD pageId = 0;
+ THEME_PAGE* pPage = nullptr;
+
+ DeterminePageId(_state, &pageId);
+ pPage = ThemeGetPage(_theme, pageId);
+ if (!pPage) {
+ return;
+ }
+
+ for (DWORD i = 0; i < pPage->cControlIndices; ++i) {
+ // Loop through all the checkable controls and set a Burn variable
+ // with that name to true or false.
+ THEME_CONTROL* pControl = _theme->rgControls + pPage->rgdwControlIndices[i];
+ if (IsCheckable(pControl) && ThemeControlEnabled(_theme, pControl->wId)) {
+ BOOL checked = ThemeIsControlChecked(_theme, pControl->wId);
+ _engine->SetVariableNumeric(pControl->sczName, checked ? 1 : 0);
+ }
+
+ // Loop through all the editbox controls with names and set a
+ // Burn variable with that name to the contents.
+ if (THEME_CONTROL_TYPE_EDITBOX == pControl->type && pControl->sczName && *pControl->sczName) {
+ LPWSTR sczValue = nullptr;
+ ThemeGetTextControl(_theme, pControl->wId, &sczValue);
+ _engine->SetVariableString(pControl->sczName, sczValue);
+ }
+ }
+ }
+
+ static bool IsTargetPlatformx64(__in IBootstrapperEngine* pEngine) {
+ WCHAR platform[8];
+ DWORD platformLen = 8;
+
+ if (FAILED(pEngine->GetVariableString(L"TargetPlatform", platform, &platformLen))) {
+ return S_FALSE;
+ }
+
+ return ::CompareStringW(LOCALE_NEUTRAL, 0, platform, -1, L"x64", -1) == CSTR_EQUAL;
+ }
+
+ static HRESULT LoadOptionalFeatureStatesFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive,
+ __in LPCWSTR subkey
+ ) {
+ HKEY hKey;
+ LRESULT res;
+
+ if (IsTargetPlatformx64(pEngine)) {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
+ } else {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+ }
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ for (auto p = OPTIONAL_FEATURES; p->regName; ++p) {
+ res = RegQueryValueExW(hKey, p->regName, nullptr, nullptr, nullptr, nullptr);
+ if (res == ERROR_FILE_NOT_FOUND) {
+ pEngine->SetVariableNumeric(p->variableName, 0);
+ } else if (res == ERROR_SUCCESS) {
+ pEngine->SetVariableNumeric(p->variableName, 1);
+ } else {
+ RegCloseKey(hKey);
+ return HRESULT_FROM_WIN32(res);
+ }
+ }
+
+ RegCloseKey(hKey);
+ return S_OK;
+ }
+
+ static HRESULT LoadTargetDirFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive,
+ __in LPCWSTR subkey
+ ) {
+ HKEY hKey;
+ LRESULT res;
+ DWORD dataType;
+ BYTE buffer[1024];
+ DWORD bufferLen = sizeof(buffer);
+
+ if (IsTargetPlatformx64(pEngine)) {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
+ } else {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+ }
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ res = RegQueryValueExW(hKey, nullptr, nullptr, &dataType, buffer, &bufferLen);
+ if (res == ERROR_SUCCESS && dataType == REG_SZ && bufferLen < sizeof(buffer)) {
+ pEngine->SetVariableString(L"TargetDir", reinterpret_cast<wchar_t*>(buffer));
+ }
+ RegCloseKey(hKey);
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ static HRESULT LoadAssociateFilesStateFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive
+ ) {
+ const LPCWSTR subkey = L"Software\\Python\\PyLauncher";
+ HKEY hKey;
+ LRESULT res;
+ HRESULT hr;
+
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ res = RegQueryValueExW(hKey, L"AssociateFiles", nullptr, nullptr, nullptr, nullptr);
+ if (res == ERROR_FILE_NOT_FOUND) {
+ hr = S_FALSE;
+ } else if (res == ERROR_SUCCESS) {
+ hr = S_OK;
+ } else {
+ hr = HRESULT_FROM_WIN32(res);
+ }
+
+ RegCloseKey(hKey);
+ return hr;
+ }
+
+ static void LoadOptionalFeatureStates(__in IBootstrapperEngine* pEngine) {
+ WCHAR subkeyFmt[256];
+ WCHAR subkey[256];
+ DWORD subkeyLen;
+ HRESULT hr;
+ HKEY hkHive;
+
+ // The launcher installation is separate from the Python install, so we
+ // check its state later. For now, assume we don't want the launcher or
+ // file associations, and if they have already been installed then
+ // loading the state will reactivate these settings.
+ pEngine->SetVariableNumeric(L"Include_launcher", 0);
+ pEngine->SetVariableNumeric(L"AssociateFiles", 0);
+
+ // Get the registry key from the bundle, to save having to duplicate it
+ // in multiple places.
+ subkeyLen = sizeof(subkeyFmt) / sizeof(subkeyFmt[0]);
+ hr = pEngine->GetVariableString(L"OptionalFeaturesRegistryKey", subkeyFmt, &subkeyLen);
+ BalExitOnFailure(hr, "Failed to locate registry key");
+ subkeyLen = sizeof(subkey) / sizeof(subkey[0]);
+ hr = pEngine->FormatString(subkeyFmt, subkey, &subkeyLen);
+ BalExitOnFailure1(hr, "Failed to format %ls", subkeyFmt);
+
+ // Check the current user's registry for existing features
+ hkHive = HKEY_CURRENT_USER;
+ hr = LoadOptionalFeatureStatesFromKey(pEngine, hkHive, subkey);
+ BalExitOnFailure1(hr, "Failed to read from HKCU\\%ls", subkey);
+ if (hr == S_FALSE) {
+ // Now check the local machine registry
+ hkHive = HKEY_LOCAL_MACHINE;
+ hr = LoadOptionalFeatureStatesFromKey(pEngine, hkHive, subkey);
+ BalExitOnFailure1(hr, "Failed to read from HKLM\\%ls", subkey);
+ if (hr == S_OK) {
+ // Found a system-wide install, so enable these settings.
+ pEngine->SetVariableNumeric(L"InstallAllUsers", 1);
+ pEngine->SetVariableNumeric(L"CompileAll", 1);
+ }
+ }
+
+ if (hr == S_OK) {
+ // Cannot change InstallAllUsersState when upgrading. While there's
+ // no good reason to not allow installing a per-user and an all-user
+ // version simultaneously, Burn can't handle the state management
+ // and will need to uninstall the old one.
+ pEngine->SetVariableString(L"InstallAllUsersState", L"disable");
+
+ // Get the previous install directory. This can be changed by the
+ // user.
+ subkeyLen = sizeof(subkeyFmt) / sizeof(subkeyFmt[0]);
+ hr = pEngine->GetVariableString(L"TargetDirRegistryKey", subkeyFmt, &subkeyLen);
+ BalExitOnFailure(hr, "Failed to locate registry key");
+ subkeyLen = sizeof(subkey) / sizeof(subkey[0]);
+ hr = pEngine->FormatString(subkeyFmt, subkey, &subkeyLen);
+ BalExitOnFailure1(hr, "Failed to format %ls", subkeyFmt);
+ LoadTargetDirFromKey(pEngine, hkHive, subkey);
+ }
+
+ LExit:
+ return;
+ }
+
+ HRESULT EnsureTargetDir() {
+ LONGLONG installAllUsers;
+ LPWSTR targetDir = nullptr, defaultDir = nullptr;
+ HRESULT hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (FAILED(hr) || !targetDir || !targetDir[0]) {
+ ReleaseStr(targetDir);
+ targetDir = nullptr;
+
+ hr = BalGetNumericVariable(L"InstallAllUsers", &installAllUsers);
+ ExitOnFailure(hr, L"Failed to get install scope");
+
+ hr = BalGetStringVariable(
+ installAllUsers ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultDir
+ );
+ BalExitOnFailure(hr, "Failed to get the default install directory");
+
+ if (!defaultDir || !defaultDir[0]) {
+ BalLogError(E_INVALIDARG, "Default install directory is blank");
+ }
+
+ hr = BalFormatString(defaultDir, &targetDir);
+ BalExitOnFailure1(hr, "Failed to format '%ls'", defaultDir);
+
+ hr = _engine->SetVariableString(L"TargetDir", targetDir);
+ BalExitOnFailure(hr, "Failed to set install target directory");
+ }
+ LExit:
+ ReleaseStr(defaultDir);
+ ReleaseStr(targetDir);
+ return hr;
+ }
+
+ void ValidateOperatingSystem() {
+ LOC_STRING *pLocString = nullptr;
+
+ if (IsWindows7SP1OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows 7 SP1 or later");
+ return;
+ } else if (IsWindows7OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
+ } else if (IsWindowsVistaSP2OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2");
+ return;
+ } else if (IsWindowsVistaOrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString);
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString);
+ }
+
+ if (pLocString && pLocString->wzText) {
+ BalFormatString(pLocString->wzText, &_failedMessage);
+ }
+
+ _hrFinal = E_WIXSTDBA_CONDITION_FAILED;
+ }
+
+public:
+ //
+ // Constructor - initialize member variables.
+ //
+ PythonBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand
+ ) : CBalBaseBootstrapperApplication(pEngine, pCommand, 3, 3000) {
+ _hModule = hModule;
+ memcpy_s(&_command, sizeof(_command), pCommand, sizeof(BOOTSTRAPPER_COMMAND));
+
+ LONGLONG llInstalled = 0;
+ HRESULT hr = BalGetNumericVariable(L"WixBundleInstalled", &llInstalled);
+ if (SUCCEEDED(hr) && BOOTSTRAPPER_RESUME_TYPE_REBOOT != _command.resumeType && 0 < llInstalled && BOOTSTRAPPER_ACTION_INSTALL == _command.action) {
+ _command.action = BOOTSTRAPPER_ACTION_MODIFY;
+ } else if (0 == llInstalled && (BOOTSTRAPPER_ACTION_MODIFY == _command.action || BOOTSTRAPPER_ACTION_REPAIR == _command.action)) {
+ _command.action = BOOTSTRAPPER_ACTION_INSTALL;
+ }
+
+ _plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN;
+
+
+ // When resuming from restart doing some install-like operation, try to find the package that forced the
+ // restart. We'll use this information during planning.
+ _nextPackageAfterRestart = nullptr;
+
+ if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == _command.resumeType && BOOTSTRAPPER_ACTION_UNINSTALL < _command.action) {
+ // Ensure the forced restart package variable is null when it is an empty string.
+ HRESULT hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &_nextPackageAfterRestart);
+ if (FAILED(hr) || !_nextPackageAfterRestart || !*_nextPackageAfterRestart) {
+ ReleaseNullStr(_nextPackageAfterRestart);
+ }
+ }
+
+ _crtInstalledToken = -1;
+ pEngine->SetVariableNumeric(L"CRTInstalled", IsCrtInstalled() ? 1 : 0);
+
+ _wixLoc = nullptr;
+ memset(&_bundle, 0, sizeof(_bundle));
+ memset(&_conditions, 0, sizeof(_conditions));
+ _confirmCloseMessage = nullptr;
+ _failedMessage = nullptr;
+
+ _language = nullptr;
+ _theme = nullptr;
+ memset(_pageIds, 0, sizeof(_pageIds));
+ _hUiThread = nullptr;
+ _registered = FALSE;
+ _hWnd = nullptr;
+
+ _state = PYBA_STATE_INITIALIZING;
+ _visiblePageId = 0;
+ _installPage = PAGE_LOADING;
+ _hrFinal = hrHostInitialization;
+
+ _downgradingOtherVersion = FALSE;
+ _restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
+ _restartRequired = FALSE;
+ _allowRestart = FALSE;
+
+ _suppressDowngradeFailure = FALSE;
+ _suppressRepair = FALSE;
+ _modifying = FALSE;
+ _upgrading = FALSE;
+
+ _overridableVariables = nullptr;
+ _taskbarList = nullptr;
+ _taskbarButtonCreatedMessage = UINT_MAX;
+ _taskbarButtonOK = FALSE;
+ _showingInternalUIThisPackage = FALSE;
+ _triedToLaunchElevated = FALSE;
+
+ _suppressPaint = FALSE;
+
+ pEngine->AddRef();
+ _engine = pEngine;
+
+ _hBAFModule = nullptr;
+ _baFunction = nullptr;
+ }
+
+
+ //
+ // Destructor - release member variables.
+ //
+ ~PythonBootstrapperApplication() {
+ AssertSz(!::IsWindow(_hWnd), "Window should have been destroyed before destructor.");
+ AssertSz(!_theme, "Theme should have been released before destructor.");
+
+ ReleaseObject(_taskbarList);
+ ReleaseDict(_overridableVariables);
+ ReleaseStr(_failedMessage);
+ ReleaseStr(_confirmCloseMessage);
+ BalConditionsUninitialize(&_conditions);
+ BalInfoUninitialize(&_bundle);
+ LocFree(_wixLoc);
+
+ ReleaseStr(_language);
+ ReleaseStr(_nextPackageAfterRestart);
+ ReleaseNullObject(_engine);
+
+ if (_hBAFModule) {
+ ::FreeLibrary(_hBAFModule);
+ _hBAFModule = nullptr;
+ }
+ }
+
+private:
+ HMODULE _hModule;
+ BOOTSTRAPPER_COMMAND _command;
+ IBootstrapperEngine* _engine;
+ BOOTSTRAPPER_ACTION _plannedAction;
+
+ LPWSTR _nextPackageAfterRestart;
+
+ WIX_LOCALIZATION* _wixLoc;
+ BAL_INFO_BUNDLE _bundle;
+ BAL_CONDITIONS _conditions;
+ LPWSTR _failedMessage;
+ LPWSTR _confirmCloseMessage;
+
+ LPWSTR _language;
+ THEME* _theme;
+ DWORD _pageIds[countof(PAGE_NAMES)];
+ HANDLE _hUiThread;
+ BOOL _registered;
+ HWND _hWnd;
+
+ PYBA_STATE _state;
+ HRESULT _hrFinal;
+ DWORD _visiblePageId;
+ PAGE _installPage;
+
+ BOOL _startedExecution;
+ DWORD _calculatedCacheProgress;
+ DWORD _calculatedExecuteProgress;
+
+ BOOL _downgradingOtherVersion;
+ BOOTSTRAPPER_APPLY_RESTART _restartResult;
+ BOOL _restartRequired;
+ BOOL _allowRestart;
+
+ BOOL _suppressDowngradeFailure;
+ BOOL _suppressRepair;
+ BOOL _modifying;
+ BOOL _upgrading;
+
+ int _crtInstalledToken;
+
+ STRINGDICT_HANDLE _overridableVariables;
+
+ ITaskbarList3* _taskbarList;
+ UINT _taskbarButtonCreatedMessage;
+ BOOL _taskbarButtonOK;
+ BOOL _showingInternalUIThisPackage;
+ BOOL _triedToLaunchElevated;
+
+ BOOL _suppressPaint;
+
+ HMODULE _hBAFModule;
+ IBootstrapperBAFunction* _baFunction;
+};
+
+//
+// CreateBootstrapperApplication - creates a new IBootstrapperApplication object.
+//
+HRESULT CreateBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+ ) {
+ HRESULT hr = S_OK;
+
+ if (fPrereq) {
+ hr = E_INVALIDARG;
+ ExitWithLastError(hr, "Failed to create UI thread.");
+ }
+
+ PythonBootstrapperApplication* pApplication = nullptr;
+
+ pApplication = new PythonBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine, pCommand);
+ ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object.");
+
+ *ppApplication = pApplication;
+ pApplication = nullptr;
+
+LExit:
+ ReleaseObject(pApplication);
+ return hr;
+}
diff --git a/Tools/msi/bundle/bootstrap/pch.cpp b/Tools/msi/bundle/bootstrap/pch.cpp
new file mode 100644
index 0000000000..1d9f38c57d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pch.cpp
@@ -0,0 +1 @@
+#include "pch.h"
diff --git a/Tools/msi/bundle/bootstrap/pch.h b/Tools/msi/bundle/bootstrap/pch.h
new file mode 100644
index 0000000000..6a66fa5a51
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pch.h
@@ -0,0 +1,60 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="precomp.h" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//
+// <summary>
+// Precompiled header for standard bootstrapper application.
+// </summary>
+//-------------------------------------------------------------------------------------------------
+
+#pragma once
+
+#include <windows.h>
+#include <gdiplus.h>
+#include <Uxtheme.h>
+#include <msiquery.h>
+#include <objbase.h>
+#include <shlobj.h>
+#include <shlwapi.h>
+#include <stdlib.h>
+#include <strsafe.h>
+#include <stddef.h>
+#include <versionhelpers.h>
+
+#include "dutil.h"
+#include "memutil.h"
+#include "dictutil.h"
+#include "dirutil.h"
+#include "fileutil.h"
+#include "locutil.h"
+#include "logutil.h"
+#include "pathutil.h"
+#include "resrutil.h"
+#include "shelutil.h"
+#include "strutil.h"
+#include "thmutil.h"
+#include "uriutil.h"
+#include "xmlutil.h"
+
+#include "IBootstrapperEngine.h"
+#include "IBootstrapperApplication.h"
+
+#include "BalBaseBootstrapperApplication.h"
+#include "balinfo.h"
+#include "balcondition.h"
+
+HRESULT CreateBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+);
+
+#include "IBootstrapperBAFunction.h"
+
diff --git a/Tools/msi/bundle/bootstrap/pythonba.cpp b/Tools/msi/bundle/bootstrap/pythonba.cpp
new file mode 100644
index 0000000000..0ce45ad31d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.cpp
@@ -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()
+{ }
diff --git a/Tools/msi/bundle/bootstrap/pythonba.def b/Tools/msi/bundle/bootstrap/pythonba.def
new file mode 100644
index 0000000000..29b3fa50df
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.def
@@ -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
diff --git a/Tools/msi/bundle/bootstrap/pythonba.sln b/Tools/msi/bundle/bootstrap/pythonba.sln
new file mode 100644
index 0000000000..bf43fed901
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.sln
@@ -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
diff --git a/Tools/msi/bundle/bootstrap/pythonba.vcxproj b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
new file mode 100644
index 0000000000..be12957112
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
@@ -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>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\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> \ No newline at end of file
diff --git a/Tools/msi/bundle/bootstrap/resource.h b/Tools/msi/bundle/bootstrap/resource.h
new file mode 100644
index 0000000000..53c03c319f
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/resource.h
@@ -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
diff --git a/Tools/msi/bundle/bundle.ico b/Tools/msi/bundle/bundle.ico
new file mode 100644
index 0000000000..1ab629eff2
--- /dev/null
+++ b/Tools/msi/bundle/bundle.ico
Binary files differ
diff --git a/Tools/msi/bundle/bundle.targets b/Tools/msi/bundle/bundle.targets
new file mode 100644
index 0000000000..aeeff3b710
--- /dev/null
+++ b/Tools/msi/bundle/bundle.targets
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="DownloadUrl">
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputType>Bundle</OutputType>
+
+ <BootstrapConfiguration Condition="'$(BootstrapConfiguration)' == ''">Release</BootstrapConfiguration>
+ <LinkerSuppressSpecificWarnings>1132;1135;1140</LinkerSuppressSpecificWarnings>
+ <OutputName Condition="$(BuildForRelease)">$(OutputName)-$(PythonVersion)</OutputName>
+ <OutputName Condition="!$(BuildForRelease)">$(OutputName)-$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber).$(RevisionNumber)</OutputName>
+ <OutputName Condition="$(Platform) == 'x64'">$(OutputName)-amd64</OutputName>
+ <OutputName Condition="'$(OutputSuffix)' != ''">$(OutputName)-$(OutputSuffix)</OutputName>
+ <OutputName Condition="'$(Configuration)' == 'Debug'">$(OutputName)-d</OutputName>
+ <TargetName>$(OutputName)</TargetName>
+
+ <OutputPath>$(OutputPath)en-us\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+
+ <!-- See Tools/msi/buildrelease.bat for help on configuring the download URL -->
+ <DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/{version}/{arch}{releasename}/{msi}</DownloadUrl>
+ <DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, `{2}`))</DefineConstants>
+ <DefineConstants Condition="'$(DownloadUrl)' == ''">$(DefineConstants);DownloadUrl={2}</DefineConstants>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <WixExtension Include="WixUtilExtension">
+ <HintPath>WixUtilExtension</HintPath>
+ <Name>WixUtilExtension</Name>
+ </WixExtension>
+ <WixExtension Include="WixDependencyExtension">
+ <HintPath>WixDependencyExtension</HintPath>
+ <Name>WixDependencyExtension</Name>
+ </WixExtension>
+ <WixExtension Include="WixBalExtension">
+ <HintPath>WixBalExtension</HintPath>
+ <Name>WixBalExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="bundle.wxs" />
+ <Compile Include="packagegroups\*.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Default.thm" />
+ <Content Include="Default.wxl" />
+ <Content Include="SideBar.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="bundle.wxl" />
+ <WxlTemplate Include="*_en-US.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <LinkerBindInputPaths Include="$(OutputPath)">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ </ItemGroup>
+
+ <ItemDefinitionGroup>
+ <Package>
+ <Properties>BuildForRelease=$(BuildForRelease)</Properties>
+ </Package>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Package Include="..\core\core*.wixproj" />
+ <Package Include="..\dev\dev*.wixproj" />
+ <Package Include="..\doc\doc*.wixproj" />
+ <Package Include="..\exe\exe*.wixproj" />
+ <Package Include="..\lib\lib*.wixproj" />
+ <Package Include="..\path\path*.wixproj" />
+ <Package Include="..\pip\pip*.wixproj" />
+ <Package Include="..\tcltk\tcltk*.wixproj" />
+ <Package Include="..\test\test*.wixproj" />
+ <Package Include="..\tools\tools*.wixproj" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <BuildPackagesTargets>Build</BuildPackagesTargets>
+ </PropertyGroup>
+
+ <Target Name="_SetRebuildTarget" BeforeTargets="BeforeRebuild">
+ <PropertyGroup>
+ <BuildPackagesTargets>Rebuild</BuildPackagesTargets>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="BuildPackages" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
+ <MSBuild Projects="@(Package)" Targets="$(BuildPackagesTargets)" BuildInParallel="true" />
+ </Target>
+
+ <Target Name="BuildLauncher" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
+ <!--
+ Build the launcher MSI using Exec rather than MSBuild
+ Also, never use the test marker for the launcher. It's going to corrupt things anyway, so we'll
+ just disable it by default.
+ -->
+ <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:ReleaseUri="$(ReleaseUri)" /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=false'
+ 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> \ No newline at end of file
diff --git a/Tools/msi/bundle/bundle.wxl b/Tools/msi/bundle/bundle.wxl
new file mode 100644
index 0000000000..d7a65c48dc
--- /dev/null
+++ b/Tools/msi/bundle/bundle.wxl
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="CRTDescription">C Runtime Update (KB2999226)</String>
+ <String Id="CompileAllDescription">Precompiling standard library</String>
+ <String Id="CompileAllODescription">Precompiling standard library (-O)</String>
+ <String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
+</WixLocalization>
diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs
new file mode 100644
index 0000000000..38307e063c
--- /dev/null
+++ b/Tools/msi/bundle/bundle.wxs
@@ -0,0 +1,111 @@
+<?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.CoreUpgradeCode)"
+ Version="$(var.Version)"
+ IconSourceFile="bundle.ico"
+ Manufacturer="!(loc.Manufacturer)"
+ AboutUrl="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="WinVer" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
+ <Variable Name="WinVerNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
+
+ <Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="InstallLauncherAllUsers" Value="0" />
+ <?endif ?>
+ <Variable Name="TargetDir" Value="" bal:Overridable="yes" />
+ <?if $(var.Platform)~="x64" ?>
+ <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="TargetPlatform" Value="x64" />
+ <?else ?>
+ <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="TargetPlatform" Value="x86" />
+ <?endif ?>
+ <Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\Python\Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="OptionalFeaturesRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstalledFeatures" />
+ <Variable Name="TargetDirRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstallPath" />
+
+ <!--
+ An empty string will use the other defaults based on InstallAllUsers
+ (and switch dynamically in the UI). To get the old default, pass
+ this property on the command line:
+ DefaultCustomTargetDir=[WindowsVolume]Python[ShortVersionNoDot]
+ -->
+ <Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
+
+ <Variable Name="InstallAllUsersState" Value="enabled" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="InstallLauncherAllUsersState" Value="disable" bal:Overridable="yes" />
+ <?endif ?>
+ <Variable Name="CustomInstallLauncherAllUsersState" Value="[InstallLauncherAllUsersState]" />
+ <Variable Name="TargetDirState" Value="enabled" />
+ <Variable Name="CustomBrowseButtonState" Value="enabled" />
+
+ <Variable Name="Include_core" Value="1" />
+ <Variable Name="Include_exe" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_dev" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_lib" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_test" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_doc" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_tools" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_tcltk" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_pip" Value="1" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="Include_launcher" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_launcherState" Value="enabled" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="Include_launcher" Value="0" />
+ <Variable Name="Include_launcherState" Value="disable" />
+ <?endif ?>
+ <Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
+ <Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
+
+ <Variable Name="LauncherOnly" Value="0" bal:Overridable="yes" />
+ <Variable Name="DetectedLauncher" Value="0" />
+ <Variable Name="DetectedOldLauncher" Value="0" />
+
+ <Variable Name="AssociateFiles" Value="1" bal:Overridable="yes" />
+ <Variable Name="Shortcuts" Value="1" bal:Overridable="yes" />
+ <Variable Name="PrependPath" Value="0" bal:Overridable="yes" />
+ <Variable Name="CompileAll" Value="0" bal:Overridable="yes" />
+
+ <Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
+ <Variable Name="SimpleInstallDescription" Value="" bal:Overridable="yes" />
+
+ <Chain ParallelCache="yes">
+ <PackageGroupRef Id="crt" />
+ <PackageGroupRef Id="core" />
+ <PackageGroupRef Id="dev" />
+ <PackageGroupRef Id="exe" />
+ <PackageGroupRef Id="lib" />
+ <PackageGroupRef Id="test" />
+ <PackageGroupRef Id="doc" />
+ <PackageGroupRef Id="tools" />
+ <PackageGroupRef Id="tcltk" />
+ <PackageGroupRef Id="launcher" />
+ <PackageGroupRef Id="pip" />
+ <PackageGroupRef Id="packageinstall" />
+ <PackageGroupRef Id="postinstall" />
+ </Chain>
+ </Bundle>
+</Wix>
diff --git a/Tools/msi/bundle/full.wixproj b/Tools/msi/bundle/full.wixproj
new file mode 100644
index 0000000000..bdbdd8e175
--- /dev/null
+++ b/Tools/msi/bundle/full.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/core.wxs b/Tools/msi/bundle/packagegroups/core.wxs
new file mode 100644
index 0000000000..eb3d0b7733
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/core.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="core">
+ <MsiPackage Id="core_AllUsers"
+ SourceFile="core.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_AllUsers_pdb"
+ SourceFile="core_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_AllUsers_d"
+ SourceFile="core_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="core_JustForMe"
+ SourceFile="core.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_JustForMe_pdb"
+ SourceFile="core_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_JustForMe_d"
+ SourceFile="core_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/crt.wxs b/Tools/msi/bundle/packagegroups/crt.wxs
new file mode 100644
index 0000000000..dc4047590e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/crt.wxs
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="crt">
+ <PackageGroupRef Id="crt_14.0_v6.0" />
+ <PackageGroupRef Id="crt_14.0_v6.1" />
+ <PackageGroupRef Id="crt_14.0_v6.2" />
+ <PackageGroupRef Id="crt_14.0_v6.3" />
+ </PackageGroup>
+ </Fragment>
+
+ <?foreach ver in v6.0;v6.1;v6.2;v6.3 ?>
+ <?if "$(var.ver)" = "v6.0" ?>
+ <?define msuver=6.0 ?>
+ <?elseif "$(var.ver)" = "v6.1" ?>
+ <?define msuver=6.1 ?>
+ <?elseif "$(var.ver)" = "v6.2" ?>
+ <?define msuver=8-RT ?>
+ <?elseif "$(var.ver)" = "v6.3" ?>
+ <?define msuver=8.1 ?>
+ <?else ?>
+ <?error unknown version $(var.ver) ?>
+ <?endif ?>
+
+ <Fragment>
+ <PackageGroup Id="crt_14.0_$(var.ver)">
+ <MsuPackage Id="crt_14.0_$(var.ver)_x86"
+ KB="2999226"
+ SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x86.msu"
+ DisplayName="!(loc.CRTDescription)"
+ Description="!(loc.CRTDescription)"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not CRTInstalled and VersionNT = $(var.ver) and not VersionNT64 and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
+
+ <MsuPackage Id="crt_14.0_$(var.ver)_x64"
+ KB="2999226"
+ SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x64.msu"
+ DisplayName="!(loc.CRTDescription)"
+ Description="!(loc.CRTDescription)"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not CRTInstalled and VersionNT64 = $(var.ver) and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
+ </PackageGroup>
+ </Fragment>
+
+ <?undef msuver ?>
+ <?endforeach ?>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/dev.wxs b/Tools/msi/bundle/packagegroups/dev.wxs
new file mode 100644
index 0000000000..4284dba2c2
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/dev.wxs
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="dev">
+ <MsiPackage Id="dev_AllUsers"
+ SourceFile="dev.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_dev and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="dev_AllUsers_d"
+ SourceFile="dev_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="dev_JustForMe"
+ SourceFile="dev.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_dev and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="dev_JustForMe_d"
+ SourceFile="dev_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/doc.wxs b/Tools/msi/bundle/packagegroups/doc.wxs
new file mode 100644
index 0000000000..6639ff5c25
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/doc.wxs
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="doc">
+ <MsiPackage Id="doc_AllUsers"
+ SourceFile="doc.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_doc and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="doc_JustForMe"
+ SourceFile="doc.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_doc and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/exe.wxs b/Tools/msi/bundle/packagegroups/exe.wxs
new file mode 100644
index 0000000000..79464c4aca
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/exe.wxs
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="exe">
+ <MsiPackage Id="exe_AllUsers"
+ SourceFile="exe.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_AllUsers_pdb"
+ SourceFile="exe_pdb.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_AllUsers_d"
+ SourceFile="exe_d.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="exe_JustForMe"
+ SourceFile="exe.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_JustForMe_pdb"
+ SourceFile="exe_pdb.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_JustForMe_d"
+ SourceFile="exe_d.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/launcher.wxs b/Tools/msi/bundle/packagegroups/launcher.wxs
new file mode 100644
index 0000000000..4444f45a98
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/launcher.wxs
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="launcher">
+ <!-- The All Users launcher is always the 32-bit version -->
+ <MsiPackage Id="launcher_AllUsers"
+ SourceFile="launcher.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
+ InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+
+ <MsiPackage Id="launcher_JustForMe"
+ SourceFile="launcher.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
+ InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/lib.wxs b/Tools/msi/bundle/packagegroups/lib.wxs
new file mode 100644
index 0000000000..0b3fbc00c4
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/lib.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="lib">
+ <MsiPackage Id="lib_AllUsers"
+ SourceFile="lib.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_AllUsers_pdb"
+ SourceFile="lib_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_AllUsers_d"
+ SourceFile="lib_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="lib_JustForMe"
+ SourceFile="lib.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_JustForMe_pdb"
+ SourceFile="lib_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_JustForMe_d"
+ SourceFile="lib_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/packageinstall.wxs b/Tools/msi/bundle/packagegroups/packageinstall.wxs
new file mode 100644
index 0000000000..e5e7d4d1a9
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/packageinstall.wxs
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="packageinstall">
+ <!--
+ This is an example of installing a package using pip as part of main install.
+
+ For a network-only install, remove the Payload element and change the install
+ command to specify the package and (optionally) version specifier.
+
+ <ExePackage Id="requests"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] -m pip install requests-2.7.0-py2.py3-none-any.whl'
+ UninstallCommand='-[WinVer] -m pip uninstall -y requests'
+ Vital="no"
+ InstallCondition="Include_pip and not LauncherOnly">
+ <Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)" />
+ </ExePackage>
+ -->
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/pip.wxs b/Tools/msi/bundle/packagegroups/pip.wxs
new file mode 100644
index 0000000000..201a6c445b
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/pip.wxs
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="pip">
+ <MsiPackage Id="pip_AllUsers"
+ SourceFile="pip.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_pip and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="pip_JustForMe"
+ SourceFile="pip.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_pip and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/postinstall.wxs b/Tools/msi/bundle/packagegroups/postinstall.wxs
new file mode 100644
index 0000000000..11ab673907
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/postinstall.wxs
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="postinstall">
+ <MsiPackage Id="path_AllUsers"
+ SourceFile="path.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and PrependPath and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="path_JustForMe"
+ SourceFile="path.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and PrependPath and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
+ <ExePackage Id="compileall_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallO_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllODescription)"
+ InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallOO_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllOODescription)"
+ InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+
+ <ExePackage Id="compileall_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallO_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllODescription)"
+ InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallOO_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllOODescription)"
+ InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/tcltk.wxs b/Tools/msi/bundle/packagegroups/tcltk.wxs
new file mode 100644
index 0000000000..0d029a90cd
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/tcltk.wxs
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="tcltk">
+ <MsiPackage Id="tcltk_AllUsers"
+ SourceFile="tcltk.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_AllUsers_pdb"
+ SourceFile="tcltk_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_AllUsers_d"
+ SourceFile="tcltk_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="tcltk_JustForMe"
+ SourceFile="tcltk.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_JustForMe_pdb"
+ SourceFile="tcltk_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_JustForMe_d"
+ SourceFile="tcltk_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/test.wxs b/Tools/msi/bundle/packagegroups/test.wxs
new file mode 100644
index 0000000000..32acaef64e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/test.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="test">
+ <MsiPackage Id="test_AllUsers"
+ SourceFile="test.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_AllUsers_pdb"
+ SourceFile="test_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_AllUsers_d"
+ SourceFile="test_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="test_JustForMe"
+ SourceFile="test.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_JustForMe_pdb"
+ SourceFile="test_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_JustForMe_d"
+ SourceFile="test_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/tools.wxs b/Tools/msi/bundle/packagegroups/tools.wxs
new file mode 100644
index 0000000000..1d9ab19f3e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/tools.wxs
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="tools">
+ <MsiPackage Id="tools_AllUsers"
+ SourceFile="tools.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_tools and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="tools_JustForMe"
+ SourceFile="tools.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_tools and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/releaselocal.wixproj b/Tools/msi/bundle/releaselocal.wixproj
new file mode 100644
index 0000000000..0c3dee7ad8
--- /dev/null
+++ b/Tools/msi/bundle/releaselocal.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/bundle/releaseweb.wixproj b/Tools/msi/bundle/releaseweb.wixproj
new file mode 100644
index 0000000000..350c735878
--- /dev/null
+++ b/Tools/msi/bundle/releaseweb.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/bundle/snapshot.wixproj b/Tools/msi/bundle/snapshot.wixproj
new file mode 100644
index 0000000000..cc45043299
--- /dev/null
+++ b/Tools/msi/bundle/snapshot.wixproj
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{8A4A1162-4BF9-4FF6-9A98-315F01E44932}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+ </PropertyGroup>
+
+ <Import Project="..\msi.props" />
+
+ <PropertyGroup>
+ <DefineConstants Condition="'$(Pack)' != 'true'">
+ $(DefineConstants);CompressMSI=no;
+ </DefineConstants>
+ <DefineConstants Condition="'$(Pack)' == 'true'">
+ $(DefineConstants);CompressMSI=yes;
+ </DefineConstants>
+ <DefineConstants>
+ $(DefineConstants);
+ CompressPDB=no;
+ CompressMSI_D=no;
+ </DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="bundle.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs
new file mode 100644
index 0000000000..4efad6562a
--- /dev/null
+++ b/Tools/msi/common.wxs
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
+ </Fragment>
+
+ <Fragment>
+ <Component Id="OptionalFeature" Guid="*" Directory="InstallDirectory">
+ <Condition>OPTIONALFEATURESREGISTRYKEY</Condition>
+ <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
+ <RegistryValue Type="string" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" KeyPath="yes" />
+ </RegistryKey>
+ </Component>
+ </Fragment>
+
+ <Fragment>
+ <Property Id="UpgradeTable" Value="1" />
+
+ <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>
+
+ <?ifdef CoreUpgradeCode ?>
+ <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
+ <Upgrade Id="$(var.CoreUpgradeCode)">
+ <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
+ </Upgrade>
+ <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
+ <?endif ?>
+ <?endif ?>
+
+ <Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
+ <Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
+
+ <InstallExecuteSequence>
+ <RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts>
+ </InstallExecuteSequence>
+ </Fragment>
+
+ <Fragment>
+ <!-- Include an icon for the Programs and Features dialog -->
+ <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\pycon.ico" />
+ <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
+ <Property Id="ARPNOMODIFY" Value="1" />
+ <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
+ </Fragment>
+
+ <Fragment>
+ <?ifdef InstallDirectoryGuidSeed ?>
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
+ </Directory>
+ <?endif ?>
+ </Fragment>
+
+ <!-- Top-level directories -->
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="DLLs" Name="DLLs" />
+ </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>
diff --git a/Tools/msi/common_en-US.wxl_template b/Tools/msi/common_en-US.wxl_template
new file mode 100644
index 0000000000..8d03526882
--- /dev/null
+++ b/Tools/msi/common_en-US.wxl_template
@@ -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>
diff --git a/Tools/msi/core/core.wixproj b/Tools/msi/core/core.wixproj
new file mode 100644
index 0000000000..68e8bab310
--- /dev/null
+++ b/Tools/msi/core/core.wixproj
@@ -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>{1B4502D5-B627-4F50-ABEA-4CC5A8E88265}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core.wxs b/Tools/msi/core/core.wxs
new file mode 100644
index 0000000000..0d4fbde978
--- /dev/null
+++ b/Tools/msi/core/core.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="core_dll" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/core/core_d.wixproj b/Tools/msi/core/core_d.wixproj
new file mode 100644
index 0000000000..5b296bf35f
--- /dev/null
+++ b/Tools/msi/core/core_d.wixproj
@@ -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>{D3677DCF-098A-4398-9FA5-8E74AC37E0DF}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core_d.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core_d.wxs b/Tools/msi/core/core_d.wxs
new file mode 100644
index 0000000000..07e0397686
--- /dev/null
+++ b/Tools/msi/core/core_d.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="core_dll_d" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/core/core_en-US.wxl b/Tools/msi/core/core_en-US.wxl
new file mode 100644
index 0000000000..7977470d7c
--- /dev/null
+++ b/Tools/msi/core/core_en-US.wxl
@@ -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>
diff --git a/Tools/msi/core/core_files.wxs b/Tools/msi/core/core_files.wxs
new file mode 100644
index 0000000000..145e147124
--- /dev/null
+++ b/Tools/msi/core/core_files.wxs
@@ -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>
diff --git a/Tools/msi/core/core_pdb.wixproj b/Tools/msi/core/core_pdb.wixproj
new file mode 100644
index 0000000000..9c8838970b
--- /dev/null
+++ b/Tools/msi/core/core_pdb.wixproj
@@ -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>{E98E7539-64E7-4DCE-AACD-01E3ADE40EFD}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core_pdb.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core_pdb.wxs b/Tools/msi/core/core_pdb.wxs
new file mode 100644
index 0000000000..c2c3178973
--- /dev/null
+++ b/Tools/msi/core/core_pdb.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="core_symbols" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/csv_to_wxs.py b/Tools/msi/csv_to_wxs.py
new file mode 100644
index 0000000000..235c8f8b0b
--- /dev/null
+++ b/Tools/msi/csv_to_wxs.py
@@ -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])
diff --git a/Tools/msi/dev/dev.wixproj b/Tools/msi/dev/dev.wixproj
new file mode 100644
index 0000000000..682b66031f
--- /dev/null
+++ b/Tools/msi/dev/dev.wixproj
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{5F23F608-D74B-4259-A0CE-8DC65CC7FE53}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName Condition="'$(OutputName)' == ''">dev</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <PropertyGroup>
+ <DefineConstants Condition="$(BuildForRelease)">
+ $(DefineConstants);
+ IncludeMinGWLib=1;
+ </DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="dev.wxs" />
+ <Compile Include="dev_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)include\*.h">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>dev_include</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Target Name="BuildMinGWLib"
+ Inputs="$(BuildPath)$(PyDllName).dll"
+ Outputs="$(BuildPath)lib$(PyDllName).a"
+ AfterTargets="PrepareForBuild"
+ Condition="$(BuildForRelease)">
+ <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
+ <PropertyGroup>
+ <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>
+ <_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts>
+ </PropertyGroup>
+
+ <Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" &gt; "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
+ <Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' />
+ </Target>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/dev/dev.wxs b/Tools/msi/dev/dev.wxs
new file mode 100644
index 0000000000..a09e139c42
--- /dev/null
+++ b/Tools/msi/dev/dev.wxs
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="dev_include" />
+ <ComponentGroupRef Id="dev_pyconfig" />
+ <ComponentGroupRef Id="dev_libs" />
+<?ifdef IncludeMinGWLib ?>
+ <ComponentGroupRef Id="dev_mingw" />
+<?endif ?>
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/dev/dev_d.wixproj b/Tools/msi/dev/dev_d.wixproj
new file mode 100644
index 0000000000..b3b05326d4
--- /dev/null
+++ b/Tools/msi/dev/dev_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{C11B4945-76BD-4137-B2E3-649460117A77}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>dev_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="dev_d.wxs" />
+ <Compile Include="dev_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/dev/dev_d.wxs b/Tools/msi/dev/dev_d.wxs
new file mode 100644
index 0000000000..c467aac57b
--- /dev/null
+++ b/Tools/msi/dev/dev_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="dev_libs_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/dev/dev_en-US.wxl b/Tools/msi/dev/dev_en-US.wxl
new file mode 100644
index 0000000000..2546e13e47
--- /dev/null
+++ b/Tools/msi/dev/dev_en-US.wxl
@@ -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>
diff --git a/Tools/msi/dev/dev_files.wxs b/Tools/msi/dev/dev_files.wxs
new file mode 100644
index 0000000000..9654d2e3e6
--- /dev/null
+++ b/Tools/msi/dev/dev_files.wxs
@@ -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>
diff --git a/Tools/msi/doc/doc.wixproj b/Tools/msi/doc/doc.wixproj
new file mode 100644
index 0000000000..ea9929acd0
--- /dev/null
+++ b/Tools/msi/doc/doc.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/doc/doc.wxs b/Tools/msi/doc/doc.wxs
new file mode 100644
index 0000000000..8dd0e21ae3
--- /dev/null
+++ b/Tools/msi/doc/doc.wxs
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="doc" Primary="yes" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="doc" />
+
+ <?ifdef DocFilename ?>
+ <Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
+ <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
+ <RegistryValue Name="$(var.OptionalFeatureName)_shortcut" Type="string" Value="$(var.Version)" KeyPath="yes" />
+ </RegistryKey>
+ <Shortcut Id="python.chm"
+ Target="[#python.chm]"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ WorkingDirectory="InstallDirectory" />
+ <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
+ </Component>
+ <?endif ?>
+
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/doc/doc_en-US.wxl_template b/Tools/msi/doc/doc_en-US.wxl_template
new file mode 100644
index 0000000000..809556e29f
--- /dev/null
+++ b/Tools/msi/doc/doc_en-US.wxl_template
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="ShortDescriptor">doc</String>
+ <String Id="Descriptor">Documentation</String>
+ <String Id="ShortcutName">Python {{ShortVersion}} Manuals ({{Bitness}})</String>
+ <String Id="ShortcutDescription">View the !(loc.ProductName) documentation.</String>
+</WixLocalization>
diff --git a/Tools/msi/doc/doc_files.wxs b/Tools/msi/doc/doc_files.wxs
new file mode 100644
index 0000000000..fe09afe4d3
--- /dev/null
+++ b/Tools/msi/doc/doc_files.wxs
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <ComponentGroup Id="doc">
+ <Component Id="python.chm" Directory="Doc" Guid="*">
+ <File Id="python.chm" Name="$(var.DocFilename)" KeyPath="yes" />
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" />
+ </RegistryKey>
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/doc/doc_no_files.wxs b/Tools/msi/doc/doc_no_files.wxs
new file mode 100644
index 0000000000..7ab7c26906
--- /dev/null
+++ b/Tools/msi/doc/doc_no_files.wxs
@@ -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>
diff --git a/Tools/msi/crtlicense.txt b/Tools/msi/exe/crtlicense.txt
index 936bc5ad53..f86841f263 100644
--- a/Tools/msi/crtlicense.txt
+++ b/Tools/msi/exe/crtlicense.txt
@@ -5,11 +5,8 @@ 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:
-
-msvcr90.dll
-msvcp90.dll
-msvcm90.dll
+is embedded in each .exe, .dll and .pyd file as a result of running
+the code through a linker.
If you further distribute programs that include the Microsoft
Distributable Code, you must comply with the restrictions on
diff --git a/Tools/msi/exe/exe.wixproj b/Tools/msi/exe/exe.wixproj
new file mode 100644
index 0000000000..d26a603268
--- /dev/null
+++ b/Tools/msi/exe/exe.wixproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{6BD53305-B03E-49DC-85FB-5551B8CCC843}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <!-- Shortcut validation is not necessary -->
+ <SuppressICEs>ICE43</SuppressICEs>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </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> \ No newline at end of file
diff --git a/Tools/msi/exe/exe.wxs b/Tools/msi/exe/exe.wxs
new file mode 100644
index 0000000000..154cee5c47
--- /dev/null
+++ b/Tools/msi/exe/exe.wxs
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="exe_python" Primary="yes" />
+ <ComponentGroupRef Id="exe_txt" />
+ <ComponentGroupRef Id="exe_icons" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="exe_python" />
+ <Component Id="exe_shortcut" Directory="MenuDir" Guid="*">
+ <Shortcut Id="python.exe"
+ Target="[#python.exe]"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ WorkingDirectory="InstallDirectory" />
+ <RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="InstallPath\InstallGroup" Type="string" Value="!(loc.ProductName)" KeyPath="yes" />
+ <RegistryValue Key="InstalledFeatures" Name="Shortcuts" Type="string" Value="$(var.Version)" />
+ </RegistryKey>
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/exe/exe_d.wixproj b/Tools/msi/exe/exe_d.wixproj
new file mode 100644
index 0000000000..27545caf7d
--- /dev/null
+++ b/Tools/msi/exe/exe_d.wixproj
@@ -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>{B1CA739C-8DB0-403B-9010-D79507507CE9}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe_d.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/exe/exe_d.wxs b/Tools/msi/exe/exe_d.wxs
new file mode 100644
index 0000000000..eedb6bb640
--- /dev/null
+++ b/Tools/msi/exe/exe_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="exe_python_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/exe/exe_en-US.wxl_template b/Tools/msi/exe/exe_en-US.wxl_template
new file mode 100644
index 0000000000..577fbe51a5
--- /dev/null
+++ b/Tools/msi/exe/exe_en-US.wxl_template
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Executables</String>
+ <String Id="ShortDescriptor">executable</String>
+ <String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
+ <String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
+</WixLocalization>
diff --git a/Tools/msi/exe/exe_files.wxs b/Tools/msi/exe/exe_files.wxs
new file mode 100644
index 0000000000..9e47b5d980
--- /dev/null
+++ b/Tools/msi/exe/exe_files.wxs
@@ -0,0 +1,76 @@
+<?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" />
+
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="InstallPath" Type="string" Value="[InstallDirectory]" KeyPath="no" />
+ <RegistryValue Key="InstallPath" Name="ExecutablePath" Type="string" Value="[#python.exe]" KeyPath="no" />
+ </RegistryKey>
+ </Component>
+ <Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
+ <File Name="pythonw.exe" KeyPath="yes" />
+ </Component>
+ <Component Id="vcruntime140.dll" Directory="InstallDirectory" Guid="*">
+ <File Name="vcruntime140.dll" Source="!(bindpath.redist)vcruntime140.dll" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_python_symbols">
+ <Component Id="python.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="python.pdb" />
+ </Component>
+ <Component Id="pythonw.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_python_d">
+ <Component Id="python_d.exe" Directory="InstallDirectory" Guid="*">
+ <File Name="python_d.exe" />
+ </Component>
+ <Component Id="python_d.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="python_d.pdb" />
+ </Component>
+ <Component Id="pythonw_d.exe" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw_d.exe" />
+ </Component>
+ <Component Id="pythonw_d.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_icons">
+ <Component Id="py.ico" Directory="DLLs" Guid="*">
+ <File Name="py.ico" Source="!(bindpath.src)PC\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>
diff --git a/Tools/msi/exe/exe_pdb.wixproj b/Tools/msi/exe/exe_pdb.wixproj
new file mode 100644
index 0000000000..4f4c869926
--- /dev/null
+++ b/Tools/msi/exe/exe_pdb.wixproj
@@ -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>{4A1F7045-8EE2-4276-ABB8-5E0C40E5F38B}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe_pdb.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/exe/exe_pdb.wxs b/Tools/msi/exe/exe_pdb.wxs
new file mode 100644
index 0000000000..f25094f828
--- /dev/null
+++ b/Tools/msi/exe/exe_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="exe_python_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/generate_md5.py b/Tools/msi/generate_md5.py
new file mode 100644
index 0000000000..9e4c14731b
--- /dev/null
+++ b/Tools/msi/generate_md5.py
@@ -0,0 +1,27 @@
+import hashlib
+import os
+import sys
+
+def main():
+ filenames, hashes, sizes = [], [], []
+
+ for file in sys.argv[1:]:
+ if not os.path.isfile(file):
+ continue
+
+ with open(file, 'rb') as f:
+ data = f.read()
+ md5 = hashlib.md5()
+ md5.update(data)
+ filenames.append(os.path.split(file)[1])
+ hashes.append(md5.hexdigest())
+ sizes.append(str(len(data)))
+
+ print('{:40s} {:<32s} {:<9s}'.format('File', 'MD5', 'Size'))
+ for f, h, s in zip(filenames, hashes, sizes):
+ print('{:40s} {:>32s} {:>9s}'.format(f, h, s))
+
+
+
+if __name__ == "__main__":
+ sys.exit(int(main() or 0))
diff --git a/Tools/msi/get_externals.bat b/Tools/msi/get_externals.bat
new file mode 100644
index 0000000000..4ead75e757
--- /dev/null
+++ b/Tools/msi/get_externals.bat
@@ -0,0 +1,27 @@
+@echo off
+setlocal
+rem Simple script to fetch source for external tools
+
+where /Q svn
+if ERRORLEVEL 1 (
+ echo.svn.exe must be on your PATH to get external tools.
+ echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
+ echo.command line tools option.
+ popd
+ exit /b 1
+)
+
+if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
+pushd "%~dp0..\..\externals"
+
+if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
+
+if not exist "windows-installer\.svn" (
+ echo.Checking out installer dependencies to %CD%\windows-installer
+ svn co %SVNROOT%windows-installer
+) else (
+ echo.Updating installer dependencies in %CD%\windows-installer
+ svn up windows-installer
+)
+
+popd
diff --git a/Tools/msi/launcher/launcher.wixproj b/Tools/msi/launcher/launcher.wixproj
new file mode 100644
index 0000000000..67fb0255de
--- /dev/null
+++ b/Tools/msi/launcher/launcher.wixproj
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{921CF0E6-AEBC-4376-BA1D-CD46EBFE6DA5}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>launcher</OutputName>
+ <OutputType>Package</OutputType>
+ <DefineConstants>UpgradeCode=1B68A0EC-4DD3-5134-840E-73854B0863F1;$(DefineConstants)</DefineConstants>
+ <IgnoreCommonWxlTemplates>true</IgnoreCommonWxlTemplates>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="launcher.wxs" />
+ <Compile Include="launcher_files.wxs" />
+ <Compile Include="launcher_reg.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/launcher/launcher.wxs b/Tools/msi/launcher/launcher.wxs
new file mode 100644
index 0000000000..80e838afad
--- /dev/null
+++ b/Tools/msi/launcher/launcher.wxs
@@ -0,0 +1,43 @@
+<?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="ARPPRODUCTICON" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="launcher_exe" Primary="yes" />
+ </Feature>
+ <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="launcher_exe" />
+ <ComponentGroupRef Id="launcher_reg" />
+ </Feature>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="LauncherInstallDirectory" />
+ </Directory>
+
+ <CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
+ <CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
+
+ <InstallExecuteSequence>
+ <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
+ <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
+
+ <RemoveExistingProducts After="InstallValidate">UPGRADE or REMOVE_350_LAUNCHER</RemoveExistingProducts>
+ </InstallExecuteSequence>
+
+ <!-- Python 3.5.0 shipped with a different UpgradeCode -->
+ <Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
+ <UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_350_LAUNCHER" />
+ </Upgrade>
+ <!-- Python 3.6.0a1 shipped with a different UpgradeCode -->
+ <Upgrade Id="394750C0-7880-5A8F-999F-933965FBCFB4">
+ <UpgradeVersion Maximum="$(var.Version)" Property="REMOVE_360A1_LAUNCHER" />
+ <UpgradeVersion Minimum="$(var.Version)" Property="BLOCK_360A1_LAUNCHER" />
+ </Upgrade>
+ <Condition Message="!(loc.NoDowngrade)">Installed OR NOT BLOCK_360A1_LAUNCHER</Condition>
+ </Product>
+</Wix>
diff --git a/Tools/msi/launcher/launcher_en-US.wxl b/Tools/msi/launcher/launcher_en-US.wxl
new file mode 100644
index 0000000000..e4c1aaa9fa
--- /dev/null
+++ b/Tools/msi/launcher/launcher_en-US.wxl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="LCID">1033</String>
+ <String Id="Culture">en-us</String>
+ <String Id="ProductName">Python Launcher</String>
+ <String Id="Title">Python Launcher</String>
+ <String Id="Description">Python Launcher</String>
+ <String Id="Manufacturer">Python Software Foundation</String>
+ <String Id="NoDowngrade">A newer version of the Python launcher is already installed.</String>
+ <String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
+ <String Id="PythonFileDescription">Python File</String>
+ <String Id="PythonNoConFileDescription">Python File (no console)</String>
+ <String Id="PythonCompiledFileDescription">Compiled Python File</String>
+ <String Id="PythonArchiveFileDescription">Python Zip Application File</String>
+ <String Id="PythonNoConArchiveFileDescription">Python Zip Application File (no console)</String>
+</WixLocalization>
diff --git a/Tools/msi/launcher/launcher_files.wxs b/Tools/msi/launcher/launcher_files.wxs
new file mode 100644
index 0000000000..589dee5654
--- /dev/null
+++ b/Tools/msi/launcher/launcher_files.wxs
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="launcher_exe">
+ <Component Id="py.exe" Directory="LauncherInstallDirectory" Guid="{B5107402-6958-461B-8B0A-4037D3327160}">
+ <File Id="py.exe" Name="py.exe" Source="py.exe" KeyPath="yes" />
+ <RegistryValue Root="HKMU" Key="Software\Python\PyLauncher" Value="[#py.exe]" Type="string" />
+ </Component>
+ <Component Id="pyw.exe" Directory="LauncherInstallDirectory" Guid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}">
+ <File Id="pyw.exe" Name="pyw.exe" Source="pyw.exe" KeyPath="yes" />
+ </Component>
+
+ <Component Id="launcher_path_cu" Directory="LauncherInstallDirectory" Guid="{95AEB930-367C-475C-A17E-A89BFCD4C670}">
+ <Condition>NOT ALLUSERS=1</Condition>
+
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+ <Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[LauncherInstallDirectory]" />
+ </Component>
+ <Component Id="launcher_path_lm" Directory="LauncherInstallDirectory" Guid="{4A41C365-4E27-4D38-A6D1-4A01B4A6500C}">
+ <Condition>ALLUSERS=1</Condition>
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/launcher/launcher_reg.wxs b/Tools/msi/launcher/launcher_reg.wxs
new file mode 100644
index 0000000000..bb42255b0a
--- /dev/null
+++ b/Tools/msi/launcher/launcher_reg.wxs
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="launcher_reg">
+ <Component Id="file_association" Directory="LauncherInstallDirectory" Guid="{5AF84D9A-D820-456B-B230-6E0105A50276}">
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
+
+ <ProgId Id="Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="py" ContentType="text/plain">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.File\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.NoConFile" Description="!(loc.PythonNoConFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyw" ContentType="text/plain">
+ <Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.CompiledFile" Description="!(loc.PythonCompiledFileDescription)" Advertise="no" Icon="py.exe" IconIndex="2">
+ <Extension Id="pyc">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ <Extension Id="pyo" />
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.CompiledFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.ArchiveFile" Description="!(loc.PythonArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyz" ContentType="application/x-zip-compressed">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.ArchiveFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.NoConArchiveFile" Description="!(loc.PythonNoConArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyzw" ContentType="application/x-zip-compressed">
+ <Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.NoConArchiveFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/lib/lib.wixproj b/Tools/msi/lib/lib.wixproj
new file mode 100644
index 0000000000..64e58787b8
--- /dev/null
+++ b/Tools/msi/lib/lib.wixproj
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{11367E76-3337-4602-8F1E-77DB4F370D7E}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <ExcludeFolders Include="Lib\test;Lib\tests;Lib\tkinter;Lib\idlelib;Lib\turtledemo" />
+ <InstallFiles Include="$(PySourcePath)Lib\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;
+ $(PySourcePath)Lib\**\*.pyo;
+ $(PySourcePath)Lib\site-packages\README;
+ @(ExcludeFolders->'$(PySourcePath)%(Identity)\*');
+ @(ExcludeFolders->'$(PySourcePath)%(Identity)\**\*')">
+ <SourceBase>$(PySourcePath)Lib</SourceBase>
+ <Source>!(bindpath.src)Lib\</Source>
+ <TargetBase>$(PySourcePath)Lib</TargetBase>
+ <Target_>Lib\</Target_>
+ <Group>lib_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib.wxs b/Tools/msi/lib/lib.wxs
new file mode 100644
index 0000000000..2b04bcb304
--- /dev/null
+++ b/Tools/msi/lib/lib.wxs
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="lib_py" />
+ <ComponentGroupRef Id="lib_files" />
+ <ComponentGroupRef Id="lib_extensions" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/lib/lib_d.wixproj b/Tools/msi/lib/lib_d.wixproj
new file mode 100644
index 0000000000..587a82c192
--- /dev/null
+++ b/Tools/msi/lib/lib_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{6C443CD3-8258-4335-BA03-49DA9C34CE4D}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib_d.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib_d.wxs b/Tools/msi/lib/lib_d.wxs
new file mode 100644
index 0000000000..8a8a530d41
--- /dev/null
+++ b/Tools/msi/lib/lib_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="lib_extensions_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/lib/lib_en-US.wxl b/Tools/msi/lib/lib_en-US.wxl
new file mode 100644
index 0000000000..305bcc73af
--- /dev/null
+++ b/Tools/msi/lib/lib_en-US.wxl
@@ -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>
diff --git a/Tools/msi/lib/lib_files.wxs b/Tools/msi/lib/lib_files.wxs
new file mode 100644
index 0000000000..fa79a8d692
--- /dev/null
+++ b/Tools/msi/lib/lib_files.wxs
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_msi;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3 ?>
+ <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 ?>
+
+ <Component Id="sqlite3_d.dll" Directory="DLLs" Guid="*">
+ <File Name="sqlite3_d.dll" KeyPath="yes" />
+ </Component>
+ <Component Id="sqlite3_d.pdb" Directory="DLLs" Guid="*">
+ <File Name="sqlite3_d.pdb" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+ <Fragment>
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <ComponentGroup Id="lib_files">
+ <Component Id="PythonPathRegistry" Directory="Lib" Guid="*">
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="PythonPath" Type="string" Value="[Lib];[DLLs]" />
+ </RegistryKey>
+ </Component>
+ <Component Id="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>
diff --git a/Tools/msi/lib/lib_pdb.wixproj b/Tools/msi/lib/lib_pdb.wixproj
new file mode 100644
index 0000000000..db1b5bb316
--- /dev/null
+++ b/Tools/msi/lib/lib_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{5E0BCE93-D1AC-4591-BBCB-3A2BE5A4B3D1}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib_pdb.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib_pdb.wxs b/Tools/msi/lib/lib_pdb.wxs
new file mode 100644
index 0000000000..8839e8a429
--- /dev/null
+++ b/Tools/msi/lib/lib_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="lib_extensions_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/make_zip.proj b/Tools/msi/make_zip.proj
new file mode 100644
index 0000000000..d2e031f6b6
--- /dev/null
+++ b/Tools/msi/make_zip.proj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+ <SupportSigning>false</SupportSigning>
+ </PropertyGroup>
+
+ <Import Project="msi.props" />
+
+ <PropertyGroup>
+ <SignOutput>false</SignOutput>
+ <TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
+ <TargetExt>.zip</TargetExt>
+ <TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
+ <Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
+ <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>
+ <Environment>set DOC_FILENAME=python$(PythonVersion).chm
+set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
+ </PropertyGroup>
+
+ <Target Name="_Build">
+ <Exec Command="setlocal
+$(Environment)
+$(CleanCommand)
+$(Arguments)" />
+ </Target>
+
+ <Target Name="AfterBuild" />
+ <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
+
+ <Target Name="ShowHashes">
+ <ItemGroup>
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
+ </ItemGroup>
+
+ <Exec Command="&quot;$(PythonExe)&quot; generate_md5.py @(UserFiles->'&quot;%(FullPath)&quot;',' ')" />
+ </Target>
+</Project>
diff --git a/Tools/msi/make_zip.py b/Tools/msi/make_zip.py
new file mode 100644
index 0000000000..753ba0f787
--- /dev/null
+++ b/Tools/msi/make_zip.py
@@ -0,0 +1,201 @@
+import argparse
+import py_compile
+import re
+import sys
+import shutil
+import stat
+import os
+import tempfile
+
+from pathlib import Path
+from zipfile import ZipFile, ZIP_DEFLATED
+import subprocess
+
+TKTCL_RE = re.compile(r'^(_?tk|tcl).+\.(pyd|dll)', re.IGNORECASE)
+DEBUG_RE = re.compile(r'_d\.(pyd|dll|exe)$', re.IGNORECASE)
+PYTHON_DLL_RE = re.compile(r'python\d\d?\.dll$', re.IGNORECASE)
+
+EXCLUDE_FROM_LIBRARY = {
+ '__pycache__',
+ 'ensurepip',
+ 'idlelib',
+ 'pydoc_data',
+ 'site-packages',
+ 'tkinter',
+ 'turtledemo',
+ 'venv',
+}
+
+EXCLUDE_FILE_FROM_LIBRARY = {
+ 'bdist_wininst.py',
+}
+
+def is_not_debug(p):
+ if DEBUG_RE.search(p.name):
+ return False
+
+ if TKTCL_RE.search(p.name):
+ return False
+
+ return p.name.lower() not in {
+ '_ctypes_test.pyd',
+ '_testbuffer.pyd',
+ '_testcapi.pyd',
+ '_testimportmultiple.pyd',
+ '_testmultiphase.pyd',
+ 'xxlimited.pyd',
+ }
+
+def is_not_debug_or_python(p):
+ return is_not_debug(p) and not PYTHON_DLL_RE.search(p.name)
+
+def include_in_lib(p):
+ name = p.name.lower()
+ if p.is_dir():
+ if name in EXCLUDE_FROM_LIBRARY:
+ return False
+ if name.startswith('plat-'):
+ return False
+ if name == 'test' and p.parts[-2].lower() == 'lib':
+ return False
+ if name in {'test', 'tests'} and p.parts[-3].lower() == 'lib':
+ return False
+ return True
+
+ if name in EXCLUDE_FILE_FROM_LIBRARY:
+ return False
+
+ suffix = p.suffix.lower()
+ return suffix not in {'.pyc', '.pyo', '.exe'}
+
+def include_in_tools(p):
+ if p.is_dir() and p.name.lower() in {'scripts', 'i18n', 'pynche', 'demo', 'parser'}:
+ return True
+
+ return p.suffix.lower() in {'.py', '.pyw', '.txt'}
+
+FULL_LAYOUT = [
+ ('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
+ ('/', 'PCBuild/$arch', 'python*.dll', is_not_debug),
+ ('DLLs/', 'PCBuild/$arch', '*.pyd', is_not_debug),
+ ('DLLs/', 'PCBuild/$arch', '*.dll', is_not_debug),
+ ('include/', 'include', '*.h', None),
+ ('include/', 'PC', 'pyconfig.h', None),
+ ('Lib/', 'Lib', '**/*', include_in_lib),
+ ('Tools/', 'Tools', '**/*', include_in_tools),
+]
+
+EMBED_LAYOUT = [
+ ('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
+ ('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
+ ('/', 'PCBuild/$arch', '*.dll', is_not_debug),
+ ('python{0.major}{0.minor}.zip'.format(sys.version_info), 'Lib', '**/*', include_in_lib),
+]
+
+if os.getenv('DOC_FILENAME'):
+ FULL_LAYOUT.append(('Doc/', 'Doc/build/htmlhelp', os.getenv('DOC_FILENAME'), None))
+if os.getenv('VCREDIST_PATH'):
+ FULL_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
+ EMBED_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
+
+def copy_to_layout(target, rel_sources):
+ count = 0
+
+ if target.suffix.lower() == '.zip':
+ if target.exists():
+ target.unlink()
+
+ with ZipFile(str(target), 'w', ZIP_DEFLATED) as f:
+ with tempfile.TemporaryDirectory() as tmpdir:
+ for s, rel in rel_sources:
+ if rel.suffix.lower() == '.py':
+ pyc = Path(tmpdir) / rel.with_suffix('.pyc').name
+ try:
+ py_compile.compile(str(s), str(pyc), str(rel), doraise=True, optimize=2)
+ except py_compile.PyCompileError:
+ f.write(str(s), str(rel))
+ else:
+ f.write(str(pyc), str(rel.with_suffix('.pyc')))
+ else:
+ f.write(str(s), str(rel))
+ count += 1
+
+ else:
+ for s, rel in rel_sources:
+ dest = target / rel
+ try:
+ dest.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if dest.is_file():
+ dest.chmod(stat.S_IWRITE)
+ shutil.copy(str(s), str(dest))
+ if dest.is_file():
+ dest.chmod(stat.S_IWRITE)
+ count += 1
+
+ return count
+
+def rglob(root, pattern, condition):
+ dirs = [root]
+ recurse = pattern[:3] in {'**/', '**\\'}
+ while dirs:
+ d = dirs.pop(0)
+ for f in d.glob(pattern[3:] if recurse else pattern):
+ if recurse and f.is_dir() and (not condition or condition(f)):
+ dirs.append(f)
+ elif f.is_file() and (not condition or condition(f)):
+ yield f, f.relative_to(root)
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
+ parser.add_argument('-o', '--out', metavar='file', help='The name of the output self-extracting archive', type=Path, required=True)
+ parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
+ parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
+ parser.add_argument('-a', '--arch', help='Specify the architecture to use (win32/amd64)', type=str, default="win32")
+ ns = parser.parse_args()
+
+ source = ns.source or (Path(__file__).parent.parent.parent)
+ out = ns.out
+ arch = ns.arch
+ assert isinstance(source, Path)
+ assert isinstance(out, Path)
+ assert isinstance(arch, str)
+
+ if ns.temp:
+ temp = ns.temp
+ delete_temp = False
+ else:
+ temp = Path(tempfile.mkdtemp())
+ delete_temp = True
+
+ try:
+ out.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ try:
+ temp.mkdir(parents=True)
+ except FileExistsError:
+ pass
+
+ layout = EMBED_LAYOUT if ns.embed else FULL_LAYOUT
+
+ try:
+ for t, s, p, c in layout:
+ s = source / s.replace("$arch", arch)
+ copied = copy_to_layout(temp / t.rstrip('/'), rglob(s, p, c))
+ print('Copied {} files'.format(copied))
+
+ with open(str(temp / 'pyvenv.cfg'), 'w') as f:
+ print('applocal = true', file=f)
+
+ total = copy_to_layout(out, rglob(temp, '*', None))
+ print('Wrote {} files to {}'.format(total, out))
+ finally:
+ if delete_temp:
+ shutil.rmtree(temp, True)
+
+
+if __name__ == "__main__":
+ sys.exit(int(main() or 0))
diff --git a/Tools/msi/msi.props b/Tools/msi/msi.props
new file mode 100644
index 0000000000..9ae6d9988e
--- /dev/null
+++ b/Tools/msi/msi.props
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">
+ <PropertyGroup>
+ <TargetName>$(OutputName)</TargetName>
+ <DefineSolutionProperties>false</DefineSolutionProperties>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces>
+ <CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings>
+ <BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease>
+ <SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <Platform Condition="'$(Platform)' == ''">x86</Platform>
+ <InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope>
+ </PropertyGroup>
+
+ <Import Project="wix.props" />
+ <Import Project="..\..\PCBuild\tcltk.props" />
+
+ <PropertyGroup>
+ <!--
+ This URI is used to generate the various GUIDs used by the installer.
+ Installers built with the same URI will upgrade each other or block
+ when attempting to downgrade.
+
+ By default, this is the local computer name, which will produce
+ installers that do not interfere with other installers. Products
+ that intend to bundle Python should rebuild these modules with their
+ own URI to avoid conflicting with the official releases.
+
+ The official releases use "http://www.python.org/$(ArchName)"
+
+ This is not the same as the DownloadUrl property used in the bundle
+ projects.
+ -->
+ <ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri>
+ <ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
+ </PropertyGroup>
+
+
+ <ItemGroup>
+ <Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
+ <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
+ <WixExtension Include="WixUtilExtension">
+ <HintPath>WixUtilExtension</HintPath>
+ <Name>WixUtilExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <IntermediateOutputPath>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>
+ <IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
+ <OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+ <ReuseCabinetCache>true</ReuseCabinetCache>
+ <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist>
+ <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>
+ <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
+
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="!$(BuildForRelease)">
+ <RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
+ <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <Bitness>32-bit</Bitness>
+ <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
+ <DefineConstants>
+ $(DefineConstants);
+ Version=$(InstallerVersion);
+ ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);
+ LongVersion=$(PythonVersion);
+ MajorVersionNumber=$(MajorVersionNumber);
+ MinorVersionNumber=$(MinorVersionNumber);
+ UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
+ NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
+ Bitness=$(Bitness);
+ PyDebugExt=$(PyDebugExt);
+ PyArchExt=$(PyArchExt);
+ PyTestExt=$(PyTestExt);
+ OptionalFeatureName=$(OutputName);
+ </DefineConstants>
+ <DefineConstants Condition="'$(CRTRedist)' != ''">
+ $(DefineConstants);CRTRedist=$(CRTRedist);
+ </DefineConstants>
+ <DefineConstants Condition="$(Platform) != 'x64'">
+ $(DefineConstants);Suffix32=-32;
+ </DefineConstants>
+ <DefineConstants Condition="$(Platform) == 'x64'">
+ $(DefineConstants);Suffix32=;
+ </DefineConstants>
+ </PropertyGroup>
+
+ <ItemDefinitionGroup>
+ <InstallFiles>
+ <Group>generated_filelist</Group>
+ <Condition></Condition>
+ <DiskId></DiskId>
+ </InstallFiles>
+ <LinkerBindInputPaths>
+ <Visible>false</Visible>
+ </LinkerBindInputPaths>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(PySourcePath)">
+ <BindName>src</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(tcltkDir)">
+ <BindName>tcltk</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">
+ <BindName>redist</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
+ <BindName>redist</BindName>
+ </LinkerBindInputPaths>
+ </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" Condition="$(TargetName) != 'launcher'">
+ <PropertyGroup>
+ <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
+ <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
+ </PropertyGroup>
+
+ <Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" &gt; "$(IntermediateOutputPath)$(OutputName)guids.txt"'
+ WorkingDirectory="$(MSBuildThisFileDirectory)"
+ IgnoreExitCode="false" />
+
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
+ <Output TaskParameter="Lines" ItemName="_UuidValue" />
+ </ReadLinesFromFile>
+
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
+ </PropertyGroup>
+ </Target>
+</Project> \ No newline at end of file
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
deleted file mode 100644
index d7453a5cba..0000000000
--- a/Tools/msi/msi.py
+++ /dev/null
@@ -1,1456 +0,0 @@
-# Python MSI Generator
-# (C) 2003 Martin v. Loewis
-# See "FOO" in comments refers to MSDN sections with the title FOO.
-import msilib, schema, sequence, os, glob, time, re, shutil, zipfile
-import subprocess, tempfile
-from msilib import Feature, CAB, Directory, Dialog, Binary, add_data
-import uisample
-from win32com.client import constants
-from distutils.spawn import find_executable
-
-# Settings can be overridden in config.py below
-# 0 for official python.org releases
-# 1 for intermediate releases by anybody, with
-# a new product code for every package.
-snapshot = 1
-# 1 means that file extension is px, not py,
-# and binaries start with x
-testpackage = 0
-# Location of build tree
-srcdir = os.path.abspath("../..")
-# Text to be displayed as the version in dialogs etc.
-# goes into file name and ProductCode. Defaults to
-# current_version.day for Snapshot, current_version otherwise
-full_current_version = None
-# Is Tcl available at all?
-have_tcl = True
-# path to PCbuild directory
-PCBUILD="PCbuild"
-# msvcrt version
-MSVCR = "100"
-# Name of certificate in default store to sign MSI with
-certname = None
-# Make a zip file containing the PDB files for this build?
-pdbzip = True
-
-try:
- from config import *
-except ImportError:
- pass
-
-# Extract current version from Include/patchlevel.h
-lines = open(srcdir + "/Include/patchlevel.h").readlines()
-major = minor = micro = level = serial = None
-levels = {
- 'PY_RELEASE_LEVEL_ALPHA':0xA,
- 'PY_RELEASE_LEVEL_BETA': 0xB,
- 'PY_RELEASE_LEVEL_GAMMA':0xC,
- 'PY_RELEASE_LEVEL_FINAL':0xF
- }
-for l in lines:
- if not l.startswith("#define"):
- continue
- l = l.split()
- if len(l) != 3:
- continue
- _, name, value = l
- if name == 'PY_MAJOR_VERSION': major = value
- if name == 'PY_MINOR_VERSION': minor = value
- if name == 'PY_MICRO_VERSION': micro = value
- if name == 'PY_RELEASE_LEVEL': level = levels[value]
- if name == 'PY_RELEASE_SERIAL': serial = value
-
-short_version = major+"."+minor
-# See PC/make_versioninfo.c
-FIELD3 = 1000*int(micro) + 10*level + int(serial)
-current_version = "%s.%d" % (short_version, FIELD3)
-
-# This should never change. The UpgradeCode of this package can be
-# used in the Upgrade table of future packages to make the future
-# package replace this one. See "UpgradeCode Property".
-# upgrade_code gets set to upgrade_code_64 when we have determined
-# that the target is Win64.
-upgrade_code_snapshot='{92A24481-3ECB-40FC-8836-04B7966EC0D5}'
-upgrade_code='{65E6DE48-A358-434D-AA4F-4AF72DB4718F}'
-upgrade_code_64='{6A965A0C-6EE6-4E3A-9983-3263F56311EC}'
-
-if snapshot:
- current_version = "%s.%s.%s" % (major, minor, int(time.time()/3600/24))
-
-if full_current_version is None:
- full_current_version = current_version
-
-extensions = [
- 'pyexpat.pyd',
- 'select.pyd',
- 'unicodedata.pyd',
- 'winsound.pyd',
- '_bz2.pyd',
- '_elementtree.pyd',
- '_socket.pyd',
- '_ssl.pyd',
- '_testcapi.pyd',
- '_tkinter.pyd',
- '_msi.pyd',
- '_ctypes.pyd',
- '_ctypes_test.pyd',
- '_sqlite3.pyd',
- '_hashlib.pyd',
- '_multiprocessing.pyd',
- '_lzma.pyd',
- '_decimal.pyd',
- '_testbuffer.pyd',
- '_testimportmultiple.pyd',
- '_overlapped.pyd',
-]
-
-# Well-known component UUIDs
-# These are needed for SharedDLLs reference counter; if
-# a different UUID was used for each incarnation of, say,
-# python24.dll, an upgrade would set the reference counter
-# from 1 to 2 (due to what I consider a bug in MSI)
-# Using the same UUID is fine since these files are versioned,
-# so Installer will always keep the newest version.
-# NOTE: All uuids are self generated.
-pythondll_uuid = {
- "24":"{9B81E618-2301-4035-AC77-75D9ABEB7301}",
- "25":"{2e41b118-38bd-4c1b-a840-6977efd1b911}",
- "26":"{34ebecac-f046-4e1c-b0e3-9bac3cdaacfa}",
- "27":"{4fe21c76-1760-437b-a2f2-99909130a175}",
- "30":"{6953bc3b-6768-4291-8410-7914ce6e2ca8}",
- "31":"{4afcba0b-13e4-47c3-bebe-477428b46913}",
- "32":"{3ff95315-1096-4d31-bd86-601d5438ad5e}",
- "33":"{f7581ca4-d368-4eea-8f82-d48c64c4f047}",
- "34":"{7A0C5812-2583-40D9-BCBB-CD7485F11377}",
- } [major+minor]
-
-# Compute the name that Sphinx gives to the docfile
-docfile = micro
-if level < 0xf:
- if level == 0xC:
- docfile += "rc%s" % (serial,)
- else:
- docfile += '%x%s' % (level, serial)
-docfile = 'python%s%s%s.chm' % (major, minor, docfile)
-
-# Build the mingw import library, libpythonXY.a
-# This requires 'nm' and 'dlltool' executables on your PATH
-def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
- warning = "WARNING: %s - libpythonXX.a not built"
- nm = find_executable('nm')
- dlltool = find_executable('dlltool')
-
- if not nm or not dlltool:
- print(warning % "nm and/or dlltool were not found")
- return False
-
- nm_command = '%s -Cs %s' % (nm, lib_file)
- dlltool_command = "%s --dllname %s --def %s --output-lib %s" % \
- (dlltool, dll_file, def_file, mingw_lib)
- export_match = re.compile(r"^_imp__(.*) in python\d+\.dll").match
-
- f = open(def_file,'w')
- f.write("LIBRARY %s\n" % dll_file)
- f.write("EXPORTS\n")
-
- nm_pipe = os.popen(nm_command)
- for line in nm_pipe.readlines():
- m = export_match(line)
- if m:
- f.write(m.group(1)+"\n")
- f.close()
- exit = nm_pipe.close()
-
- if exit:
- print(warning % "nm did not run successfully")
- return False
-
- if os.system(dlltool_command) != 0:
- print(warning % "dlltool did not run successfully")
- return False
-
- return True
-
-# Target files (.def and .a) go in PCBuild directory
-lib_file = os.path.join(srcdir, PCBUILD, "python%s%s.lib" % (major, minor))
-def_file = os.path.join(srcdir, PCBUILD, "python%s%s.def" % (major, minor))
-dll_file = "python%s%s.dll" % (major, minor)
-mingw_lib = os.path.join(srcdir, PCBUILD, "libpython%s%s.a" % (major, minor))
-
-have_mingw = build_mingw_lib(lib_file, def_file, dll_file, mingw_lib)
-
-# Determine the target architecture
-if os.system("nmake /nologo /c /f msisupport.mak") != 0:
- raise RuntimeError("'nmake /f msisupport.mak' failed")
-dll_path = os.path.join(srcdir, PCBUILD, dll_file)
-msilib.set_arch_from_file(dll_path)
-if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"):
- raise SystemError("msisupport.dll for incorrect architecture")
-
-if msilib.Win64:
- upgrade_code = upgrade_code_64
-
-if snapshot:
- product_code = msilib.gen_uuid()
-else:
- # official release: generate UUID from the download link that the file will have
- import uuid
- product_code = uuid.uuid3(uuid.NAMESPACE_URL,
- 'http://www.python.org/ftp/python/%s.%s.%s/python-%s%s.msi' %
- (major, minor, micro, full_current_version, msilib.arch_ext))
- product_code = '{%s}' % product_code
-
-if testpackage:
- ext = 'px'
- testprefix = 'x'
-else:
- ext = 'py'
- testprefix = ''
-
-if msilib.Win64:
- SystemFolderName = "[System64Folder]"
- registry_component = 4|256
-else:
- SystemFolderName = "[SystemFolder]"
- registry_component = 4
-
-msilib.reset()
-
-# condition in which to install pythonxy.dll in system32:
-# a) it is Windows 9x or
-# b) it is NT, the user is privileged, and has chosen per-machine installation
-sys32cond = "(Windows9x or (Privileged and ALLUSERS))"
-
-def build_database():
- """Generate an empty database, with just the schema and the
- Summary information stream."""
- if snapshot:
- uc = upgrade_code_snapshot
- else:
- uc = upgrade_code
- if msilib.Win64:
- productsuffix = " (64-bit)"
- else:
- productsuffix = ""
- # schema represents the installer 2.0 database schema.
- # sequence is the set of standard sequences
- # (ui/execute, admin/advt/install)
- msiname = "python-%s%s.msi" % (full_current_version, msilib.arch_ext)
- db = msilib.init_database(msiname,
- schema, ProductName="Python "+full_current_version+productsuffix,
- ProductCode=product_code,
- ProductVersion=current_version,
- Manufacturer=u"Python Software Foundation",
- request_uac = True)
- # The default sequencing of the RemoveExistingProducts action causes
- # removal of files that got just installed. Place it after
- # InstallInitialize, so we first uninstall everything, but still roll
- # back in case the installation is interrupted
- msilib.change_sequence(sequence.InstallExecuteSequence,
- "RemoveExistingProducts", 1510)
- msilib.add_tables(db, sequence)
- # We cannot set ALLUSERS in the property table, as this cannot be
- # reset if the user choses a per-user installation. Instead, we
- # maintain WhichUsers, which can be "ALL" or "JUSTME". The UI manages
- # this property, and when the execution starts, ALLUSERS is set
- # accordingly.
- add_data(db, "Property", [("UpgradeCode", uc),
- ("WhichUsers", "ALL"),
- ("ProductLine", "Python%s%s" % (major, minor)),
- ])
- db.Commit()
- return db, msiname
-
-def remove_old_versions(db):
- "Fill the upgrade table."
- start = "%s.%s.0" % (major, minor)
- # This requests that feature selection states of an older
- # installation should be forwarded into this one. Upgrading
- # requires that both the old and the new installation are
- # either both per-machine or per-user.
- migrate_features = 1
- # See "Upgrade Table". We remove releases with the same major and
- # minor version. For an snapshot, we remove all earlier snapshots. For
- # a release, we remove all snapshots, and all earlier releases.
- if snapshot:
- add_data(db, "Upgrade",
- [(upgrade_code_snapshot, start,
- current_version,
- None, # Ignore language
- migrate_features,
- None, # Migrate ALL features
- "REMOVEOLDSNAPSHOT")])
- props = "REMOVEOLDSNAPSHOT"
- else:
- add_data(db, "Upgrade",
- [(upgrade_code, start, current_version,
- None, migrate_features, None, "REMOVEOLDVERSION"),
- (upgrade_code_snapshot, start, "%s.%d.0" % (major, int(minor)+1),
- None, migrate_features, None, "REMOVEOLDSNAPSHOT")])
- props = "REMOVEOLDSNAPSHOT;REMOVEOLDVERSION"
-
- props += ";TARGETDIR;DLLDIR;LAUNCHERDIR"
- # Installer collects the product codes of the earlier releases in
- # these properties. In order to allow modification of the properties,
- # they must be declared as secure. See "SecureCustomProperties Property"
- add_data(db, "Property", [("SecureCustomProperties", props)])
-
-class PyDialog(Dialog):
- """Dialog class with a fixed layout: controls at the top, then a ruler,
- then a list of buttons: back, next, cancel. Optionally a bitmap at the
- left."""
- def __init__(self, *args, **kw):
- """Dialog(database, name, x, y, w, h, attributes, title, first,
- default, cancel, bitmap=true)"""
- Dialog.__init__(self, *args)
- ruler = self.h - 36
- bmwidth = 152*ruler/328
- if kw.get("bitmap", True):
- self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
- self.line("BottomLine", 0, ruler, self.w, 0)
-
- def title(self, title):
- "Set the title text of the dialog at the top."
- # name, x, y, w, h, flags=Visible|Enabled|Transparent|NoPrefix,
- # text, in VerdanaBold10
- self.text("Title", 135, 10, 220, 60, 0x30003,
- r"{\VerdanaBold10}%s" % title)
-
- def back(self, title, next, name = "Back", active = 1):
- """Add a back button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 180, self.h-27 , 56, 17, flags, title, next)
-
- def cancel(self, title, next, name = "Cancel", active = 1):
- """Add a cancel button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 304, self.h-27, 56, 17, flags, title, next)
-
- def next(self, title, next, name = "Next", active = 1):
- """Add a Next button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 236, self.h-27, 56, 17, flags, title, next)
-
- def xbutton(self, name, title, next, xpos):
- """Add a button with a given title, the tab-next button,
- its name in the Control table, giving its x position; the
- y-position is aligned with the other buttons.
-
- Return the button, so that events can be associated"""
- return self.pushbutton(name, int(self.w*xpos - 28), self.h-27, 56, 17, 3, title, next)
-
-def add_ui(db):
- x = y = 50
- w = 370
- h = 300
- title = "[ProductName] Setup"
-
- # see "Dialog Style Bits"
- modal = 3 # visible | modal
- modeless = 1 # visible
- track_disk_space = 32
-
- add_data(db, 'ActionText', uisample.ActionText)
- add_data(db, 'UIText', uisample.UIText)
-
- # Bitmaps
- if not os.path.exists(srcdir+r"\PC\python_icon.exe"):
- raise RuntimeError("Run icons.mak in PC directory")
- add_data(db, "Binary",
- [("PythonWin", msilib.Binary(r"%s\PCbuild\installer.bmp" % srcdir)), # 152x328 pixels
- ("py.ico",msilib.Binary(srcdir+r"\PC\py.ico")),
- ])
- add_data(db, "Icon",
- [("python_icon.exe", msilib.Binary(srcdir+r"\PC\python_icon.exe"))])
-
- # Scripts
- # CheckDir sets TargetExists if TARGETDIR exists.
- # UpdateEditIDLE sets the REGISTRY.tcl component into
- # the installed/uninstalled state according to both the
- # Extensions and TclTk features.
- add_data(db, "Binary", [("Script", msilib.Binary("msisupport.dll"))])
- # See "Custom Action Type 1"
- if msilib.Win64:
- CheckDir = "CheckDir"
- UpdateEditIDLE = "UpdateEditIDLE"
- else:
- CheckDir = "_CheckDir@4"
- UpdateEditIDLE = "_UpdateEditIDLE@4"
- add_data(db, "CustomAction",
- [("CheckDir", 1, "Script", CheckDir)])
- if have_tcl:
- add_data(db, "CustomAction",
- [("UpdateEditIDLE", 1, "Script", UpdateEditIDLE)])
-
- # UI customization properties
- add_data(db, "Property",
- # See "DefaultUIFont Property"
- [("DefaultUIFont", "DlgFont8"),
- # See "ErrorDialog Style Bit"
- ("ErrorDialog", "ErrorDlg"),
- ("Progress1", "Install"), # modified in maintenance type dlg
- ("Progress2", "installs"),
- ("MaintenanceForm_Action", "Repair")])
-
- # Fonts, see "TextStyle Table"
- add_data(db, "TextStyle",
- [("DlgFont8", "Tahoma", 9, None, 0),
- ("DlgFontBold8", "Tahoma", 8, None, 1), #bold
- ("VerdanaBold10", "Verdana", 10, None, 1),
- ("VerdanaRed9", "Verdana", 9, 255, 0),
- ])
-
- compileargs = r'-Wi "[TARGETDIR]Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TARGETDIR]Lib"'
- lib2to3args = r'-c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"'
- updatepipargs = r'-m ensurepip -U --default-pip'
- removepipargs = r'-B -m ensurepip._uninstall'
- # See "CustomAction Table"
- add_data(db, "CustomAction", [
- # msidbCustomActionTypeFirstSequence + msidbCustomActionTypeTextData + msidbCustomActionTypeProperty
- # See "Custom Action Type 51",
- # "Custom Action Execution Scheduling Options"
- ("InitialTargetDir", 307, "TARGETDIR",
- "[WindowsVolume]Python%s%s" % (major, minor)),
- ("SetDLLDirToTarget", 307, "DLLDIR", "[TARGETDIR]"),
- ("SetDLLDirToSystem32", 307, "DLLDIR", SystemFolderName),
- ("SetLauncherDirToTarget", 307, "LAUNCHERDIR", "[TARGETDIR]"),
- ("SetLauncherDirToWindows", 307, "LAUNCHERDIR", "[WindowsFolder]"),
- # msidbCustomActionTypeExe + msidbCustomActionTypeSourceFile
- # See "Custom Action Type 18"
- # msidbCustomActionTypeInScript (1024); run during actual installation
- # msidbCustomActionTypeNoImpersonate (2048); run action in system account, not user account
- ("CompilePyc", 18+1024+2048, "python.exe", compileargs),
- ("CompilePyo", 18+1024+2048, "python.exe", "-O "+compileargs),
- ("CompileGrammar", 18+1024+2048, "python.exe", lib2to3args),
- ("UpdatePip", 18+1024+2048, "python.exe", updatepipargs),
- ("RemovePip", 18+1024+2048, "python.exe", removepipargs),
- ])
-
- # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
- # Numbers indicate sequence; see sequence.py for how these action integrate
- add_data(db, "InstallUISequence",
- [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140),
- ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141),
- ("InitialTargetDir", 'TARGETDIR=""', 750),
- # In the user interface, assume all-users installation if privileged.
- ("SetDLLDirToSystem32", 'DLLDIR="" and ' + sys32cond, 751),
- ("SetDLLDirToTarget", 'DLLDIR="" and not ' + sys32cond, 752),
- ("SetLauncherDirToWindows", 'LAUNCHERDIR="" and ' + sys32cond, 753),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR="" and not ' + sys32cond, 754),
- ("SelectDirectoryDlg", "Not Installed", 1230),
- # XXX no support for resume installations yet
- #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240),
- ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
- ("ProgressDlg", None, 1280)])
- add_data(db, "AdminUISequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToTarget", 'DLLDIR=""', 751),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR=""', 752),
- ])
-
- # Prepend TARGETDIR to the system path, and remove it on uninstall.
- add_data(db, "Environment",
- [("PathAddition", "=-*Path", "[TARGETDIR];[TARGETDIR]Scripts;[~]", "REGISTRY.path")])
-
- # Execute Sequences
- add_data(db, "InstallExecuteSequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToSystem32", 'DLLDIR="" and ' + sys32cond, 751),
- ("SetDLLDirToTarget", 'DLLDIR="" and not ' + sys32cond, 752),
- ("SetLauncherDirToWindows", 'LAUNCHERDIR="" and ' + sys32cond, 753),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR="" and not ' + sys32cond, 754),
- ("UpdateEditIDLE", None, 1050),
- # run command if install state of pip changes to INSTALLSTATE_LOCAL
- # run after InstallFiles
- ("UpdatePip", "&pip_feature=3", 4001),
- # remove pip when state changes to INSTALLSTATE_ABSENT
- # run before RemoveFiles
- ("RemovePip", "&pip_feature=2", 3499),
- ("CompilePyc", "COMPILEALL", 4002),
- ("CompilePyo", "COMPILEALL", 4003),
- ("CompileGrammar", "COMPILEALL", 4004),
- ])
- add_data(db, "AdminExecuteSequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToTarget", 'DLLDIR=""', 751),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR=""', 752),
- ])
-
- #####################################################################
- # Standard dialogs: FatalError, UserExit, ExitDialog
- fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- fatal.title("[ProductName] Installer ended prematurely")
- fatal.back("< Back", "Finish", active = 0)
- fatal.cancel("Cancel", "Back", active = 0)
- fatal.text("Description1", 135, 70, 220, 80, 0x30003,
- "[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.")
- fatal.text("Description2", 135, 155, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c=fatal.next("Finish", "Cancel", name="Finish")
- # See "ControlEvent Table". Parameters are the event, the parameter
- # to the action, and optionally the condition for the event, and the order
- # of events.
- c.event("EndDialog", "Exit")
-
- user_exit=PyDialog(db, "UserExit", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- user_exit.title("[ProductName] Installer was interrupted")
- user_exit.back("< Back", "Finish", active = 0)
- user_exit.cancel("Cancel", "Back", active = 0)
- user_exit.text("Description1", 135, 70, 220, 80, 0x30003,
- "[ProductName] setup was interrupted. Your system has not been modified. "
- "To install this program at a later time, please run the installation again.")
- user_exit.text("Description2", 135, 155, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c = user_exit.next("Finish", "Cancel", name="Finish")
- c.event("EndDialog", "Exit")
-
- exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- exit_dialog.title("Complete the [ProductName] Installer")
- exit_dialog.back("< Back", "Finish", active = 0)
- exit_dialog.cancel("Cancel", "Back", active = 0)
- exit_dialog.text("Acknowledgements", 135, 95, 220, 120, 0x30003,
- "Special Windows thanks to:\n"
- " Mark Hammond, without whose years of freely \n"
- " shared Windows expertise, Python for Windows \n"
- " would still be Python for DOS.")
-
- c = exit_dialog.text("warning", 135, 200, 220, 40, 0x30003,
- "{\\VerdanaRed9}Warning: Python 2.5.x is the last "
- "Python release for Windows 9x.")
- c.condition("Hide", "NOT Version9X")
-
- exit_dialog.text("Description", 135, 235, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c = exit_dialog.next("Finish", "Cancel", name="Finish")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Required dialog: FilesInUse, ErrorDlg
- inuse = PyDialog(db, "FilesInUse",
- x, y, w, h,
- 19, # KeepModeless|Modal|Visible
- title,
- "Retry", "Retry", "Retry", bitmap=False)
- inuse.text("Title", 15, 6, 200, 15, 0x30003,
- r"{\DlgFontBold8}Files in Use")
- inuse.text("Description", 20, 23, 280, 20, 0x30003,
- "Some files that need to be updated are currently in use.")
- inuse.text("Text", 20, 55, 330, 50, 3,
- "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.")
- inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess",
- None, None, None)
- c=inuse.back("Exit", "Ignore", name="Exit")
- c.event("EndDialog", "Exit")
- c=inuse.next("Ignore", "Retry", name="Ignore")
- c.event("EndDialog", "Ignore")
- c=inuse.cancel("Retry", "Exit", name="Retry")
- c.event("EndDialog","Retry")
-
-
- # See "Error Dialog". See "ICE20" for the required names of the controls.
- error = Dialog(db, "ErrorDlg",
- 50, 10, 330, 101,
- 65543, # Error|Minimize|Modal|Visible
- title,
- "ErrorText", None, None)
- error.text("ErrorText", 50,9,280,48,3, "")
- error.control("ErrorIcon", "Icon", 15, 9, 24, 24, 5242881, None, "py.ico", None, None)
- error.pushbutton("N",120,72,81,21,3,"No",None).event("EndDialog","ErrorNo")
- error.pushbutton("Y",240,72,81,21,3,"Yes",None).event("EndDialog","ErrorYes")
- error.pushbutton("A",0,72,81,21,3,"Abort",None).event("EndDialog","ErrorAbort")
- error.pushbutton("C",42,72,81,21,3,"Cancel",None).event("EndDialog","ErrorCancel")
- error.pushbutton("I",81,72,81,21,3,"Ignore",None).event("EndDialog","ErrorIgnore")
- error.pushbutton("O",159,72,81,21,3,"Ok",None).event("EndDialog","ErrorOk")
- error.pushbutton("R",198,72,81,21,3,"Retry",None).event("EndDialog","ErrorRetry")
-
- #####################################################################
- # Global "Query Cancel" dialog
- cancel = Dialog(db, "CancelDlg", 50, 10, 260, 85, 3, title,
- "No", "No", "No")
- cancel.text("Text", 48, 15, 194, 30, 3,
- "Are you sure you want to cancel [ProductName] installation?")
- cancel.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None,
- "py.ico", None, None)
- c=cancel.pushbutton("Yes", 72, 57, 56, 17, 3, "Yes", "No")
- c.event("EndDialog", "Exit")
-
- c=cancel.pushbutton("No", 132, 57, 56, 17, 3, "No", "Yes")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Global "Wait for costing" dialog
- costing = Dialog(db, "WaitForCostingDlg", 50, 10, 260, 85, modal, title,
- "Return", "Return", "Return")
- costing.text("Text", 48, 15, 194, 30, 3,
- "Please wait while the installer finishes determining your disk space requirements.")
- costing.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None,
- "py.ico", None, None)
- c = costing.pushbutton("Return", 102, 57, 56, 17, 3, "Return", None)
- c.event("EndDialog", "Exit")
-
- #####################################################################
- # Preparation dialog: no user input except cancellation
- prep = PyDialog(db, "PrepareDlg", x, y, w, h, modeless, title,
- "Cancel", "Cancel", "Cancel")
- prep.text("Description", 135, 70, 220, 40, 0x30003,
- "Please wait while the Installer prepares to guide you through the installation.")
- prep.title("Welcome to the [ProductName] Installer")
- c=prep.text("ActionText", 135, 110, 220, 20, 0x30003, "Pondering...")
- c.mapping("ActionText", "Text")
- c=prep.text("ActionData", 135, 135, 220, 30, 0x30003, None)
- c.mapping("ActionData", "Text")
- prep.back("Back", None, active=0)
- prep.next("Next", None, active=0)
- c=prep.cancel("Cancel", None)
- c.event("SpawnDialog", "CancelDlg")
-
- #####################################################################
- # Target directory selection
- seldlg = PyDialog(db, "SelectDirectoryDlg", x, y, w, h, modal, title,
- "Next", "Next", "Cancel")
- seldlg.title("Select Destination Directory")
- c = seldlg.text("Existing", 135, 25, 235, 30, 0x30003,
- "{\VerdanaRed9}This update will replace your existing [ProductLine] installation.")
- c.condition("Hide", 'REMOVEOLDVERSION="" and REMOVEOLDSNAPSHOT=""')
- seldlg.text("Description", 135, 50, 220, 40, 0x30003,
- "Please select a directory for the [ProductName] files.")
-
- seldlg.back("< Back", None, active=0)
- c = seldlg.next("Next >", "Cancel")
- c.event("DoAction", "CheckDir", "TargetExistsOk<>1", order=1)
- # If the target exists, but we found that we are going to remove old versions, don't bother
- # confirming that the target directory exists. Strictly speaking, we should determine that
- # the target directory is indeed the target of the product that we are going to remove, but
- # I don't know how to do that.
- c.event("SpawnDialog", "ExistingDirectoryDlg", 'TargetExists=1 and REMOVEOLDVERSION="" and REMOVEOLDSNAPSHOT=""', 2)
- c.event("SetTargetPath", "TARGETDIR", 'TargetExists=0 or REMOVEOLDVERSION<>"" or REMOVEOLDSNAPSHOT<>""', 3)
- c.event("SpawnWaitDialog", "WaitForCostingDlg", "CostingComplete=1", 4)
- c.event("NewDialog", "SelectFeaturesDlg", 'TargetExists=0 or REMOVEOLDVERSION<>"" or REMOVEOLDSNAPSHOT<>""', 5)
-
- c = seldlg.cancel("Cancel", "DirectoryCombo")
- c.event("SpawnDialog", "CancelDlg")
-
- seldlg.control("DirectoryCombo", "DirectoryCombo", 135, 70, 172, 80, 393219,
- "TARGETDIR", None, "DirectoryList", None)
- seldlg.control("DirectoryList", "DirectoryList", 135, 90, 208, 136, 3, "TARGETDIR",
- None, "PathEdit", None)
- seldlg.control("PathEdit", "PathEdit", 135, 230, 206, 16, 3, "TARGETDIR", None, "Next", None)
- c = seldlg.pushbutton("Up", 306, 70, 18, 18, 3, "Up", None)
- c.event("DirectoryListUp", "0")
- c = seldlg.pushbutton("NewDir", 324, 70, 30, 18, 3, "New", None)
- c.event("DirectoryListNew", "0")
-
- #####################################################################
- # SelectFeaturesDlg
- features = PyDialog(db, "SelectFeaturesDlg", x, y, w, h, modal|track_disk_space,
- title, "Tree", "Next", "Cancel")
- features.title("Customize [ProductName]")
- features.text("Description", 135, 35, 220, 15, 0x30003,
- "Select the way you want features to be installed.")
- features.text("Text", 135,45,220,30, 3,
- "Click on the icons in the tree below to change the way features will be installed.")
-
- c=features.back("< Back", "Next")
- c.event("NewDialog", "SelectDirectoryDlg")
-
- c=features.next("Next >", "Cancel")
- c.mapping("SelectionNoItems", "Enabled")
- c.event("SpawnDialog", "DiskCostDlg", "OutOfDiskSpace=1", order=1)
- c.event("EndDialog", "Return", "OutOfDiskSpace<>1", order=2)
-
- c=features.cancel("Cancel", "Tree")
- c.event("SpawnDialog", "CancelDlg")
-
- # The browse property is not used, since we have only a single target path (selected already)
- features.control("Tree", "SelectionTree", 135, 75, 220, 95, 7, "_BrowseProperty",
- "Tree of selections", "Back", None)
-
- #c=features.pushbutton("Reset", 42, 243, 56, 17, 3, "Reset", "DiskCost")
- #c.mapping("SelectionNoItems", "Enabled")
- #c.event("Reset", "0")
-
- features.control("Box", "GroupBox", 135, 170, 225, 90, 1, None, None, None, None)
-
- c=features.xbutton("DiskCost", "Disk &Usage", None, 0.10)
- c.mapping("SelectionNoItems","Enabled")
- c.event("SpawnDialog", "DiskCostDlg")
-
- c=features.xbutton("Advanced", "Advanced", None, 0.30)
- c.event("SpawnDialog", "AdvancedDlg")
-
- c=features.text("ItemDescription", 140, 180, 210, 40, 3,
- "Multiline description of the currently selected item.")
- c.mapping("SelectionDescription","Text")
-
- c=features.text("ItemSize", 140, 225, 210, 33, 3,
- "The size of the currently selected item.")
- c.mapping("SelectionSize", "Text")
-
- #####################################################################
- # Disk cost
- cost = PyDialog(db, "DiskCostDlg", x, y, w, h, modal, title,
- "OK", "OK", "OK", bitmap=False)
- cost.text("Title", 15, 6, 200, 15, 0x30003,
- "{\DlgFontBold8}Disk Space Requirements")
- cost.text("Description", 20, 20, 280, 20, 0x30003,
- "The disk space required for the installation of the selected features.")
- cost.text("Text", 20, 53, 330, 60, 3,
- "The highlighted volumes (if any) do not have enough disk space "
- "available for the currently selected features. You can either "
- "remove some files from the highlighted volumes, or choose to "
- "install less features onto local drive(s), or select different "
- "destination drive(s).")
- cost.control("VolumeList", "VolumeCostList", 20, 100, 330, 150, 393223,
- None, "{120}{70}{70}{70}{70}", None, None)
- cost.xbutton("OK", "Ok", None, 0.5).event("EndDialog", "Return")
-
- #####################################################################
- # WhichUsers Dialog. Only available on NT, and for privileged users.
- # This must be run before FindRelatedProducts, because that will
- # take into account whether the previous installation was per-user
- # or per-machine. We currently don't support going back to this
- # dialog after "Next" was selected; to support this, we would need to
- # find how to reset the ALLUSERS property, and how to re-run
- # FindRelatedProducts.
- # On Windows9x, the ALLUSERS property is ignored on the command line
- # and in the Property table, but installer fails according to the documentation
- # if a dialog attempts to set ALLUSERS.
- whichusers = PyDialog(db, "WhichUsersDlg", x, y, w, h, modal, title,
- "AdminInstall", "Next", "Cancel")
- whichusers.title("Select whether to install [ProductName] for all users of this computer.")
- # A radio group with two options: allusers, justme
- g = whichusers.radiogroup("AdminInstall", 135, 60, 235, 80, 3,
- "WhichUsers", "", "Next")
- g.condition("Disable", "VersionNT=600") # Not available on Vista and Windows 2008
- g.add("ALL", 0, 5, 150, 20, "Install for all users")
- g.add("JUSTME", 0, 25, 235, 20, "Install just for me (not available on Windows Vista)")
-
- whichusers.back("Back", None, active=0)
-
- c = whichusers.next("Next >", "Cancel")
- c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1)
- c.event("EndDialog", "Return", order = 2)
-
- c = whichusers.cancel("Cancel", "AdminInstall")
- c.event("SpawnDialog", "CancelDlg")
-
- #####################################################################
- # Advanced Dialog.
- advanced = PyDialog(db, "AdvancedDlg", x, y, w, h, modal, title,
- "CompilePyc", "Ok", "Ok")
- advanced.title("Advanced Options for [ProductName]")
-
- # A checkbox whether to build pyc files
- advanced.checkbox("CompilePyc", 135, 60, 230, 50, 3,
- "COMPILEALL", "Compile .py files to byte code after installation", "Ok")
-
- c = advanced.cancel("Ok", "CompilePyc", name="Ok") # Button just has location of cancel button.
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Existing Directory dialog
- dlg = Dialog(db, "ExistingDirectoryDlg", 50, 30, 200, 80, modal, title,
- "No", "No", "No")
- dlg.text("Title", 10, 20, 180, 40, 3,
- "[TARGETDIR] exists. Are you sure you want to overwrite existing files?")
- c=dlg.pushbutton("Yes", 30, 60, 55, 17, 3, "Yes", "No")
- c.event("[TargetExists]", "0", order=1)
- c.event("[TargetExistsOk]", "1", order=2)
- c.event("EndDialog", "Return", order=3)
- c=dlg.pushbutton("No", 115, 60, 55, 17, 3, "No", "Yes")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Installation Progress dialog (modeless)
- progress = PyDialog(db, "ProgressDlg", x, y, w, h, modeless, title,
- "Cancel", "Cancel", "Cancel", bitmap=False)
- progress.text("Title", 20, 15, 200, 15, 0x30003,
- "{\DlgFontBold8}[Progress1] [ProductName]")
- progress.text("Text", 35, 65, 300, 30, 3,
- "Please wait while the Installer [Progress2] [ProductName]. "
- "This may take several minutes.")
- progress.text("StatusLabel", 35, 100, 35, 20, 3, "Status:")
-
- c=progress.text("ActionText", 70, 100, w-70, 20, 3, "Pondering...")
- c.mapping("ActionText", "Text")
-
- #c=progress.text("ActionData", 35, 140, 300, 20, 3, None)
- #c.mapping("ActionData", "Text")
-
- c=progress.control("ProgressBar", "ProgressBar", 35, 120, 300, 10, 65537,
- None, "Progress done", None, None)
- c.mapping("SetProgress", "Progress")
-
- progress.back("< Back", "Next", active=False)
- progress.next("Next >", "Cancel", active=False)
- progress.cancel("Cancel", "Back").event("SpawnDialog", "CancelDlg")
-
- # Maintenance type: repair/uninstall
- maint = PyDialog(db, "MaintenanceTypeDlg", x, y, w, h, modal, title,
- "Next", "Next", "Cancel")
- maint.title("Welcome to the [ProductName] Setup Wizard")
- maint.text("BodyText", 135, 63, 230, 42, 3,
- "Select whether you want to repair or remove [ProductName].")
- g=maint.radiogroup("RepairRadioGroup", 135, 108, 230, 60, 3,
- "MaintenanceForm_Action", "", "Next")
- g.add("Change", 0, 0, 200, 17, "&Change [ProductName]")
- g.add("Repair", 0, 18, 200, 17, "&Repair [ProductName]")
- g.add("Remove", 0, 36, 200, 17, "Re&move [ProductName]")
-
- maint.back("< Back", None, active=False)
- c=maint.next("Finish", "Cancel")
- # Change installation: Change progress dialog to "Change", then ask
- # for feature selection
- c.event("[Progress1]", "Change", 'MaintenanceForm_Action="Change"', 1)
- c.event("[Progress2]", "changes", 'MaintenanceForm_Action="Change"', 2)
-
- # Reinstall: Change progress dialog to "Repair", then invoke reinstall
- # Also set list of reinstalled features to "ALL"
- c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 5)
- c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 6)
- c.event("[Progress2]", "repairs", 'MaintenanceForm_Action="Repair"', 7)
- c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 8)
-
- # Uninstall: Change progress to "Remove", then invoke uninstall
- # Also set list of removed features to "ALL"
- c.event("[REMOVE]", "ALL", 'MaintenanceForm_Action="Remove"', 11)
- c.event("[Progress1]", "Removing", 'MaintenanceForm_Action="Remove"', 12)
- c.event("[Progress2]", "removes", 'MaintenanceForm_Action="Remove"', 13)
- c.event("Remove", "ALL", 'MaintenanceForm_Action="Remove"', 14)
-
- # Close dialog when maintenance action scheduled
- c.event("EndDialog", "Return", 'MaintenanceForm_Action<>"Change"', 20)
- c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 21)
-
- maint.cancel("Cancel", "RepairRadioGroup").event("SpawnDialog", "CancelDlg")
-
-
-# See "Feature Table". The feature level is 1 for all features,
-# and the feature attributes are 0 for the DefaultFeature, and
-# FollowParent for all other features. The numbers are the Display
-# column.
-def add_features(db):
- # feature attributes:
- # msidbFeatureAttributesFollowParent == 2
- # msidbFeatureAttributesDisallowAdvertise == 8
- # Features that need to be installed with together with the main feature
- # (i.e. additional Python libraries) need to follow the parent feature.
- # Features that have no advertisement trigger (e.g. the test suite)
- # must not support advertisement
- global default_feature, tcltk, htmlfiles, tools, testsuite
- global ext_feature, private_crt, prepend_path, pip_feature
- default_feature = Feature(db, "DefaultFeature", "Python",
- "Python Interpreter and Libraries",
- 1, directory = "TARGETDIR")
- shared_crt = Feature(db, "SharedCRT", "MSVCRT", "C Run-Time (system-wide)", 0,
- level=0)
- private_crt = Feature(db, "PrivateCRT", "MSVCRT", "C Run-Time (private)", 0,
- level=0)
- add_data(db, "Condition", [("SharedCRT", 1, sys32cond),
- ("PrivateCRT", 1, "not "+sys32cond)])
- # We don't support advertisement of extensions
- ext_feature = Feature(db, "Extensions", "Register Extensions",
- "Make this Python installation the default Python installation", 3,
- parent = default_feature, attributes=2|8)
- if have_tcl:
- tcltk = Feature(db, "TclTk", "Tcl/Tk", "Tkinter, IDLE, pydoc", 5,
- parent = default_feature, attributes=2)
- htmlfiles = Feature(db, "Documentation", "Documentation",
- "Python HTMLHelp File", 7, parent = default_feature)
- tools = Feature(db, "Tools", "Utility Scripts",
- "Python utility scripts (Tools/)", 9,
- parent = default_feature, attributes=2)
- # pip installation isn't enabled by default until a clean uninstall procedure
- # becomes possible
- pip_feature = Feature(db, "pip_feature", "pip",
- "Install (or upgrade from an earlier version) pip, "
- "a tool for installing and managing Python packages.", 11,
- parent = default_feature, attributes=2|8)
- testsuite = Feature(db, "Testsuite", "Test suite",
- "Python test suite (Lib/test/)", 13,
- parent = default_feature, attributes=2|8)
- # prepend_path is an additional feature which is to be off by default.
- # Since the default level for the above features is 1, this needs to be
- # at least level higher.
- prepend_path = Feature(db, "PrependPath", "Add python.exe to Path",
- "Prepend [TARGETDIR] to the system Path variable. "
- "This allows you to type 'python' into a command "
- "prompt without needing the full path.", 15,
- parent = default_feature, attributes=2|8,
- level=2)
-
-def extract_msvcr100():
- # Find the redistributable files
- if msilib.Win64:
- arch = "x64"
- else:
- arch = "x86"
- dir = os.path.join(os.environ['VS100COMNTOOLS'], r"..\..\VC\redist\%s\Microsoft.VC100.CRT" % arch)
-
- result = []
- installer = msilib.MakeInstaller()
- # At least for VS2010, manifests are no longer provided
- name = "msvcr100.dll"
- path = os.path.join(dir, name)
- kw = {'src':path}
- kw['version'] = installer.FileVersion(path, 0)
- kw['language'] = installer.FileVersion(path, 1)
- return name, kw
-
-def generate_license():
- import shutil, glob
- out = open("LICENSE.txt", "w")
- shutil.copyfileobj(open(os.path.join(srcdir, "LICENSE")), out)
- shutil.copyfileobj(open("crtlicense.txt"), out)
- for name, pat, file in (("bzip2","bzip2-*", "LICENSE"),
- ("openssl", "openssl-*", "LICENSE"),
- ("Tcl", "tcl8*", "license.terms"),
- ("Tk", "tk8*", "license.terms"),
- ("Tix", "tix-*", "license.terms")):
- out.write("\nThis copy of Python includes a copy of %s, which is licensed under the following terms:\n\n" % name)
- dirs = glob.glob(srcdir+"/externals/"+pat)
- if not dirs:
- raise ValueError, "Could not find "+srcdir+"/externals/"+pat
- if len(dirs) > 2 and not snapshot:
- raise ValueError, "Multiple copies of "+pat
- dir = dirs[0]
- shutil.copyfileobj(open(os.path.join(dir, file)), out)
- out.close()
-
-
-class PyDirectory(Directory):
- """By default, all components in the Python installer
- can run from source."""
- def __init__(self, *args, **kw):
- if "componentflags" not in kw:
- kw['componentflags'] = 2 #msidbComponentAttributesOptional
- Directory.__init__(self, *args, **kw)
-
-def hgmanifest():
- # Fetch file list from Mercurial
- process = subprocess.Popen(['hg', 'manifest'], stdout=subprocess.PIPE)
- stdout, stderr = process.communicate()
- # Create nested directories for file tree
- result = {}
- for line in stdout.splitlines():
- components = line.split('/')
- d = result
- while len(components) > 1:
- d1 = d.setdefault(components[0], {})
- d = d1
- del components[0]
- d[components[0]] = None
- return result
-
-
-# See "File Table", "Component Table", "Directory Table",
-# "FeatureComponents Table"
-def add_files(db):
- installer = msilib.MakeInstaller()
- hgfiles = hgmanifest()
- cab = CAB("python")
- tmpfiles = []
- # Add all executables, icons, text files into the TARGETDIR component
- root = PyDirectory(db, cab, None, srcdir, "TARGETDIR", "SourceDir")
- default_feature.set_current()
- root.add_file("README.txt", src="README")
- root.add_file("NEWS.txt", src="Misc/NEWS")
- generate_license()
- root.add_file("LICENSE.txt", src=os.path.abspath("LICENSE.txt"))
- root.start_component("python.exe", keyfile="python.exe")
- root.add_file("%s/python.exe" % PCBUILD)
- root.start_component("pythonw.exe", keyfile="pythonw.exe")
- root.add_file("%s/pythonw.exe" % PCBUILD)
-
- # msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
- dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".")
- launcherdir = PyDirectory(db, cab, root, srcdir, "LAUNCHERDIR", ".")
-
- # msidbComponentAttributes64bit = 256; this disables registry redirection
- # to allow setting the SharedDLLs key in the 64-bit portion even for a
- # 32-bit installer.
- # XXX does this still allow to install the component on a 32-bit system?
- # Pick up 32-bit binary always
- launchersrc = PCBUILD
- if launchersrc.lower() == 'pcbuild\\x64-pgo':
- launchersrc = 'PCBuild\\win32-pgo'
- if launchersrc.lower() == 'pcbuild\\amd64':
- launchersrc = 'PCBuild'
- launcher = os.path.join(srcdir, launchersrc, "py.exe")
- launcherdir.start_component("launcher", flags = 8+256, keyfile="py.exe",
- uuid="{B5107402-6958-461B-8B0A-4037D3327160}")
- launcherdir.add_file(launcher,
- version=installer.FileVersion(launcher, 0),
- language=installer.FileVersion(launcher, 1))
- launcherw = os.path.join(srcdir, launchersrc, "pyw.exe")
- launcherdir.start_component("launcherw", flags = 8+256, keyfile="pyw.exe",
- uuid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}")
- launcherdir.add_file(launcherw,
- version=installer.FileVersion(launcherw, 0),
- language=installer.FileVersion(launcherw, 1))
-
- pydll = "python%s%s.dll" % (major, minor)
- pydllsrc = os.path.join(srcdir, PCBUILD, pydll)
- dlldir.start_component("DLLDIR", flags = 8, keyfile = pydll, uuid = pythondll_uuid)
- pyversion = installer.FileVersion(pydllsrc, 0)
- if not snapshot:
- # For releases, the Python DLL has the same version as the
- # installer package.
- assert pyversion.split(".")[:3] == current_version.split(".")
- dlldir.add_file("%s/python%s%s.dll" % (PCBUILD, major, minor),
- version=pyversion,
- language=installer.FileVersion(pydllsrc, 1))
- DLLs = PyDirectory(db, cab, root, srcdir + "/" + PCBUILD, "DLLs", "DLLS|DLLs")
-
- # msvcr90.dll: Need to place the DLL and the manifest into the root directory,
- # plus another copy of the manifest in the DLLs directory, with the manifest
- # pointing to the root directory
- root.start_component("msvcr90", feature=private_crt)
- # Results are ID,keyword pairs
- crtdll, kwds = extract_msvcr100()
- root.add_file(crtdll, **kwds)
- # Copy the manifest
- # Actually, don't do that anymore - no DLL in DLLs should have a manifest
- # dependency on msvcr90.dll anymore, so this should not be necessary
- #manifest_dlls = manifest[0]+".root"
- #open(manifest_dlls, "w").write(open(manifest[1]['src']).read().replace("msvcr","../msvcr"))
- #DLLs.start_component("msvcr90_dlls", feature=private_crt)
- #DLLs.add_file(manifest[0], src=os.path.abspath(manifest_dlls))
-
- # Now start the main component for the DLLs directory;
- # no regular files have been added to the directory yet.
- DLLs.start_component()
-
- # Check if _ctypes.pyd exists
- have_ctypes = os.path.exists(srcdir+"/%s/_ctypes.pyd" % PCBUILD)
- if not have_ctypes:
- print("WARNING: _ctypes.pyd not found, ctypes will not be included")
- extensions.remove("_ctypes.pyd")
-
- # Add all .py files in Lib, except tkinter, test
- dirs = []
- pydirs = [(root, "Lib", hgfiles["Lib"], default_feature)]
- while pydirs:
- # Commit every now and then, or else installer will complain
- db.Commit()
- parent, dir, files, feature = pydirs.pop()
- if dir.startswith("plat-"):
- continue
- if dir in ["tkinter", "idlelib", "turtledemo"]:
- if not have_tcl:
- continue
- feature = tcltk
- tcltk.set_current()
- elif dir in ('test', 'tests'):
- feature = testsuite
- elif not have_ctypes and dir == "ctypes":
- continue
- feature.set_current()
- lib = PyDirectory(db, cab, parent, dir, dir, "%s|%s" % (parent.make_short(dir), dir))
- dirs.append(lib)
- has_py = False
- for name, subdir in files.items():
- if subdir is None:
- assert os.path.isfile(os.path.join(lib.absolute, name))
- if name == 'README':
- lib.add_file("README.txt", src="README")
- else:
- lib.add_file(name)
- has_py = has_py or name.endswith(".py") or name.endswith(".pyw")
- else:
- assert os.path.isdir(os.path.join(lib.absolute, name))
- pydirs.append((lib, name, subdir, feature))
-
- if has_py:
- lib.remove_pyc()
- # Add DLLs
- default_feature.set_current()
- lib = DLLs
- lib.add_file("py.ico", src=srcdir+"/PC/py.ico")
- lib.add_file("pyc.ico", src=srcdir+"/PC/pyc.ico")
- dlls = []
- tclfiles = []
- for f in extensions:
- if f=="_tkinter.pyd":
- continue
- if not os.path.exists(srcdir + "/" + PCBUILD + "/" + f):
- print("WARNING: Missing extension", f)
- continue
- dlls.append(f)
- lib.add_file(f)
- lib.add_file('python3.dll')
- # Add sqlite
- if msilib.msi_type=="Intel64;1033":
- sqlite_arch = "/ia64"
- elif msilib.msi_type=="x64;1033":
- sqlite_arch = "/amd64"
- tclsuffix = "64"
- else:
- sqlite_arch = ""
- tclsuffix = ""
- lib.add_file("sqlite3.dll")
- if have_tcl:
- if not os.path.exists("%s/%s/_tkinter.pyd" % (srcdir, PCBUILD)):
- print("WARNING: Missing _tkinter.pyd")
- else:
- lib.start_component("TkDLLs", tcltk)
- lib.add_file("_tkinter.pyd")
- dlls.append("_tkinter.pyd")
- tcldir = os.path.normpath(srcdir+("/externals/tcltk%s/bin" % tclsuffix))
- for f in glob.glob1(tcldir, "*.dll"):
- lib.add_file(f, src=os.path.join(tcldir, f))
- # check whether there are any unknown extensions
- for f in glob.glob1(srcdir+"/"+PCBUILD, "*.pyd"):
- if f.endswith("_d.pyd"): continue # debug version
- if f in dlls: continue
- print("WARNING: Unknown extension", f)
-
- # Add headers
- default_feature.set_current()
- lib = PyDirectory(db, cab, root, "include", "include", "INCLUDE|include")
- lib.glob("*.h")
- lib.add_file("pyconfig.h", src="../PC/pyconfig.h")
- # Add import libraries
- lib = PyDirectory(db, cab, root, PCBUILD, "libs", "LIBS|libs")
- for f in dlls:
- lib.add_file(f.replace('pyd','lib'))
- lib.add_file('python%s%s.lib' % (major, minor))
- lib.add_file('python3.lib')
- # Add the mingw-format library
- if have_mingw:
- lib.add_file('libpython%s%s.a' % (major, minor))
- if have_tcl:
- # Add Tcl/Tk
- tcldirs = [(root, 'externals/tcltk%s/lib' % tclsuffix, 'tcl')]
- tcltk.set_current()
- while tcldirs:
- parent, phys, dir = tcldirs.pop()
- lib = PyDirectory(db, cab, parent, phys, dir, "%s|%s" % (parent.make_short(dir), dir))
- if not os.path.exists(lib.absolute):
- continue
- for f in os.listdir(lib.absolute):
- if os.path.isdir(os.path.join(lib.absolute, f)):
- tcldirs.append((lib, f, f))
- else:
- lib.add_file(f)
- # Add tools
- tools.set_current()
- tooldir = PyDirectory(db, cab, root, "Tools", "Tools", "TOOLS|Tools")
- for f in ['i18n', 'pynche', 'Scripts']:
- lib = PyDirectory(db, cab, tooldir, f, f, "%s|%s" % (tooldir.make_short(f), f))
- lib.glob("*.py")
- lib.glob("*.pyw")
- lib.remove_pyc()
- lib.glob("*.txt")
- if f == "pynche":
- x = PyDirectory(db, cab, lib, "X", "X", "X|X")
- x.glob("*.txt")
- if os.path.exists(os.path.join(lib.absolute, "README")):
- lib.add_file("README.txt", src="README")
- if f == 'Scripts':
- lib.add_file("2to3.py", src="2to3")
- lib.add_file("pydoc3.py", src="pydoc3")
- lib.add_file("pyvenv.py", src="pyvenv")
- # Add documentation
- htmlfiles.set_current()
- lib = PyDirectory(db, cab, root, "Doc", "Doc", "DOC|Doc")
- lib.start_component("documentation", keyfile=docfile)
- lib.add_file(docfile, src="build/htmlhelp/"+docfile)
-
- cab.commit(db)
-
- for f in tmpfiles:
- os.unlink(f)
-
-# See "Registry Table", "Component Table"
-def add_registry(db):
- # File extensions, associated with the REGISTRY.def component
- # IDLE verbs depend on the tcltk feature.
- # msidbComponentAttributesRegistryKeyPath = 4
- # -1 for Root specifies "dependent on ALLUSERS property"
- tcldata = []
- if have_tcl:
- tcldata = [
- ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "py.IDLE")]
- add_data(db, "Component",
- # msidbComponentAttributesRegistryKeyPath = 4
- [("REGISTRY", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "InstallPath"),
- ("REGISTRY.doc", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "Documentation"),
- ("REGISTRY.path", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- None),
- ("REGISTRY.ensurepip", msilib.gen_uuid(), "TARGETDIR", registry_component, "EnsurePipRun",
- None),
- ("REGISTRY.def", msilib.gen_uuid(), "TARGETDIR", registry_component,
- None, None)] + tcldata)
- # See "FeatureComponents Table".
- # The association between TclTk and pythonw.exe is necessary to make ICE59
- # happy, because the installer otherwise believes that the IDLE and PyDoc
- # shortcuts might get installed without pythonw.exe being install. This
- # is not true, since installing TclTk will install the default feature, which
- # will cause pythonw.exe to be installed.
- # REGISTRY.tcl is not associated with any feature, as it will be requested
- # through a custom action
- tcldata = []
- if have_tcl:
- tcldata = [(tcltk.id, "pythonw.exe")]
- add_data(db, "FeatureComponents",
- [(default_feature.id, "REGISTRY"),
- (htmlfiles.id, "REGISTRY.doc"),
- (prepend_path.id, "REGISTRY.path"),
- (pip_feature.id, "REGISTRY.ensurepip"),
- (ext_feature.id, "REGISTRY.def")] +
- tcldata
- )
- # Extensions are not advertised. For advertised extensions,
- # we would need separate binaries that install along with the
- # extension.
- pat = r"Software\Classes\%sPython.%sFile\shell\%s\command"
- ewi = "Edit with IDLE"
- pat2 = r"Software\Classes\%sPython.%sFile\DefaultIcon"
- pat3 = r"Software\Classes\%sPython.%sFile"
- pat4 = r"Software\Classes\%sPython.%sFile\shellex\DropHandler"
- tcl_verbs = []
- if have_tcl:
- tcl_verbs=[
- ("py.IDLE", -1, pat % (testprefix, "", ewi), "",
- r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -e "%1"',
- "REGISTRY.tcl"),
- ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "",
- r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -e "%1"',
- "REGISTRY.tcl"),
- ]
- add_data(db, "Registry",
- [# Extensions
- ("py.ext", -1, r"Software\Classes\."+ext, "",
- "Python.File", "REGISTRY.def"),
- ("pyw.ext", -1, r"Software\Classes\."+ext+'w', "",
- "Python.NoConFile", "REGISTRY.def"),
- ("pyc.ext", -1, r"Software\Classes\."+ext+'c', "",
- "Python.CompiledFile", "REGISTRY.def"),
- ("pyo.ext", -1, r"Software\Classes\."+ext+'o', "",
- "Python.CompiledFile", "REGISTRY.def"),
- # MIME types
- ("py.mime", -1, r"Software\Classes\."+ext, "Content Type",
- "text/plain", "REGISTRY.def"),
- ("pyw.mime", -1, r"Software\Classes\."+ext+'w', "Content Type",
- "text/plain", "REGISTRY.def"),
- #Verbs
- ("py.open", -1, pat % (testprefix, "", "open"), "",
- r'"[LAUNCHERDIR]py.exe" "%1" %*', "REGISTRY.def"),
- ("pyw.open", -1, pat % (testprefix, "NoCon", "open"), "",
- r'"[LAUNCHERDIR]pyw.exe" "%1" %*', "REGISTRY.def"),
- ("pyc.open", -1, pat % (testprefix, "Compiled", "open"), "",
- r'"[LAUNCHERDIR]py.exe" "%1" %*', "REGISTRY.def"),
- ] + tcl_verbs + [
- #Icons
- ("py.icon", -1, pat2 % (testprefix, ""), "",
- r'[DLLs]py.ico', "REGISTRY.def"),
- ("pyw.icon", -1, pat2 % (testprefix, "NoCon"), "",
- r'[DLLs]py.ico', "REGISTRY.def"),
- ("pyc.icon", -1, pat2 % (testprefix, "Compiled"), "",
- r'[DLLs]pyc.ico', "REGISTRY.def"),
- # Descriptions
- ("py.txt", -1, pat3 % (testprefix, ""), "",
- "Python File", "REGISTRY.def"),
- ("pyw.txt", -1, pat3 % (testprefix, "NoCon"), "",
- "Python File (no console)", "REGISTRY.def"),
- ("pyc.txt", -1, pat3 % (testprefix, "Compiled"), "",
- "Compiled Python File", "REGISTRY.def"),
- # Drop Handler
- ("py.drop", -1, pat4 % (testprefix, ""), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ("pyw.drop", -1, pat4 % (testprefix, "NoCon"), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ("pyc.drop", -1, pat4 % (testprefix, "Compiled"), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ])
-
- # PATHEXT
- add_data(db, "Environment",
- [("PathExtAddition", "=-*PathExt", "[~];.PY", "REGISTRY.def")])
-
- # Registry keys
- prefix = r"Software\%sPython\PythonCore\%s" % (testprefix, short_version)
- add_data(db, "Registry",
- [("InstallPath", -1, prefix+r"\InstallPath", "", "[TARGETDIR]", "REGISTRY"),
- ("InstallGroup", -1, prefix+r"\InstallPath\InstallGroup", "",
- "Python %s" % short_version, "REGISTRY"),
- ("PythonPath", -1, prefix+r"\PythonPath", "",
- r"[TARGETDIR]Lib;[TARGETDIR]DLLs", "REGISTRY"),
- ("Documentation", -1, prefix+r"\Help\Main Python Documentation", "",
- "[TARGETDIR]Doc\\"+docfile , "REGISTRY.doc"),
- ("Modules", -1, prefix+r"\Modules", "+", None, "REGISTRY"),
- ("AppPaths", -1, r"Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe",
- "", r"[TARGETDIR]Python.exe", "REGISTRY.def"),
- ("DisplayIcon", -1,
- r"Software\Microsoft\Windows\CurrentVersion\Uninstall\%s" % product_code,
- "DisplayIcon", "[TARGETDIR]python.exe", "REGISTRY"),
- # Fake registry entry to allow installer to track whether ensurepip has been run
- ("EnsurePipRun", -1, prefix+r"\EnsurePipRun", "", "#1", "REGISTRY.ensurepip"),
- ])
- # Shortcuts, see "Shortcut Table"
- add_data(db, "Directory",
- [("ProgramMenuFolder", "TARGETDIR", "."),
- ("MenuDir", "ProgramMenuFolder", "PY%s%s|%sPython %s.%s" % (major,minor,testprefix,major,minor))])
- add_data(db, "RemoveFile",
- [("MenuDir", "TARGETDIR", None, "MenuDir", 2)])
- tcltkshortcuts = []
- if msilib.Win64:
- bitted = "64 bit"
- else:
- bitted = "32 bit"
- if have_tcl:
- tcltkshortcuts = [
- ("IDLE", "MenuDir",
- "IDLE|IDLE (Python "+short_version+" GUI - "+bitted+")",
- "pythonw.exe", tcltk.id, r'"[TARGETDIR]Lib\idlelib\idle.pyw"',
- None, None, "python_icon.exe", 0, None, "TARGETDIR"),
- ]
- add_data(db, "Shortcut",
- tcltkshortcuts +
- [# Advertised shortcuts: targets are features, not files
- ("Python", "MenuDir",
- "PYTHON|Python "+short_version+" (command line - "+bitted+")",
- "python.exe", default_feature.id, None, None, None,
- "python_icon.exe", 2, None, "TARGETDIR"),
- # Advertising the Manual breaks on (some?) Win98, and the shortcut lacks an
- # icon first.
- #("Manual", "MenuDir", "MANUAL|Python Manuals", "documentation",
- # htmlfiles.id, None, None, None, None, None, None, None),
- ## Non-advertised shortcuts: must be associated with a registry component
- ("Manual", "MenuDir", "MANUAL|Python "+short_version+" Manuals",
- "REGISTRY.doc", "[#%s]" % docfile,
- None, None, None, None, None, None, None),
- ("PyDoc", "MenuDir",
- "MODDOCS|Python "+short_version+" Docs Server (pydoc - "+
- bitted+")", "python.exe", default_feature.id, r'-m pydoc -b',
- None, None, "python_icon.exe", 0, None, "TARGETDIR"),
- ("Uninstall", "MenuDir", "UNINST|Uninstall Python "+
- short_version+" ("+bitted+")", "REGISTRY",
- SystemFolderName+"msiexec", "/x%s" % product_code,
- None, None, None, None, None, None),
- ])
- db.Commit()
-
-def build_pdbzip():
- pdbexclude = ['kill_python.pdb', 'make_buildinfo.pdb',
- 'make_versioninfo.pdb']
- path = "python-%s%s-pdb.zip" % (full_current_version, msilib.arch_ext)
- pdbzip = zipfile.ZipFile(path, 'w')
- for f in glob.glob1(os.path.join(srcdir, PCBUILD), "*.pdb"):
- if f not in pdbexclude and not f.endswith('_d.pdb'):
- pdbzip.write(os.path.join(srcdir, PCBUILD, f), f)
- pdbzip.close()
-
-db,msiname = build_database()
-try:
- add_features(db)
- add_ui(db)
- add_files(db)
- add_registry(db)
- remove_old_versions(db)
- db.Commit()
-finally:
- del db
-
-# Merge CRT into MSI file. This requires the database to be closed.
-mod_dir = os.path.join(os.environ["ProgramFiles"], "Common Files", "Merge Modules")
-if msilib.Win64:
- modules = ["Microsoft_VC100_CRT_x64.msm"]
-else:
- modules = ["Microsoft_VC100_CRT_x86.msm"]
-
-for i, n in enumerate(modules):
- modules[i] = os.path.join(mod_dir, n)
-
-def merge(msi, feature, rootdir, modules):
- cab_and_filecount = []
- # Step 1: Merge databases, extract cabfiles
- m = msilib.MakeMerge2()
- m.OpenLog("merge.log")
- m.OpenDatabase(msi)
- for module in modules:
- print module
- m.OpenModule(module,0)
- m.Merge(feature, rootdir)
- print "Errors:"
- for e in m.Errors:
- print e.Type, e.ModuleTable, e.DatabaseTable
- print " Modkeys:",
- for s in e.ModuleKeys: print s,
- print
- print " DBKeys:",
- for s in e.DatabaseKeys: print s,
- print
- cabname = tempfile.mktemp(suffix=".cab")
- m.ExtractCAB(cabname)
- cab_and_filecount.append((cabname, len(m.ModuleFiles)))
- m.CloseModule()
- m.CloseDatabase(True)
- m.CloseLog()
-
- # Step 2: Add CAB files
- i = msilib.MakeInstaller()
- db = i.OpenDatabase(msi, constants.msiOpenDatabaseModeTransact)
-
- v = db.OpenView("SELECT LastSequence FROM Media")
- v.Execute(None)
- maxmedia = -1
- while 1:
- r = v.Fetch()
- if not r: break
- seq = r.IntegerData(1)
- if seq > maxmedia:
- maxmedia = seq
- print "Start of Media", maxmedia
-
- for cabname, count in cab_and_filecount:
- stream = "merged%d" % maxmedia
- msilib.add_data(db, "Media",
- [(maxmedia+1, maxmedia+count, None, "#"+stream, None, None)])
- msilib.add_stream(db, stream, cabname)
- os.unlink(cabname)
- maxmedia += count
- # The merge module sets ALLUSERS to 1 in the property table.
- # This is undesired; delete that
- v = db.OpenView("DELETE FROM Property WHERE Property='ALLUSERS'")
- v.Execute(None)
- v.Close()
- db.Commit()
-
-merge(msiname, "SharedCRT", "TARGETDIR", modules)
-
-# certname (from config.py) should be (a substring of)
-# the certificate subject, e.g. "Python Software Foundation"
-if certname:
- os.system('signtool sign /n "%s" '
- '/t http://timestamp.verisign.com/scripts/timestamp.dll '
- '/d "Python %s" '
- '%s' % (certname, full_current_version, msiname))
-
-if pdbzip:
- build_pdbzip()
diff --git a/Tools/msi/msi.targets b/Tools/msi/msi.targets
new file mode 100644
index 0000000000..86be35badb
--- /dev/null
+++ b/Tools/msi/msi.targets
@@ -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->'&quot;%(_Source)&quot;,&quot;%(_Target)&quot;,&quot;%(Group)&quot;,&quot;%(DiskId)&quot;,&quot;%(Condition)&quot;')" Overwrite="true" />
+ <Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"'
+ WorkingDirectory="$(MSBuildThisFileDirectory)" />
+
+ <ItemGroup>
+ <FileWrites Include="$(_FileListTarget);$(_InstallFilesTarget)" />
+ <Compile Include="$(_InstallFilesTarget)" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
+ <PropertyGroup Condition="'@(WxlTemplate)' != ''">
+ <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
+ <_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
+ </PropertyGroup>
+
+ <WriteLinesToFile File="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl"
+ Lines="$(_Content)"
+ Overwrite="true"
+ Condition="$(_Content) != $(_ExistingContent)" />
+
+ <ItemGroup Condition="'@(WxlTemplate)' != ''">
+ <EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
+ <FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
+ </ItemGroup>
+ </Target>
+
+ <Import Project="$(WixTargetsPath)" />
+
+ <Target Name="SignCabs">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignCabs->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignMsi">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignMsi->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignBundleEngine">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignBundleEngine->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignBundle">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignBundle->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py
deleted file mode 100644
index c208b91074..0000000000
--- a/Tools/msi/msilib.py
+++ /dev/null
@@ -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"
diff --git a/Tools/msi/msisupport.c b/Tools/msi/msisupport.c
deleted file mode 100644
index 1fd2ee4156..0000000000
--- a/Tools/msi/msisupport.c
+++ /dev/null
@@ -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;
-}
-
diff --git a/Tools/msi/msisupport.mak b/Tools/msi/msisupport.mak
deleted file mode 100644
index 2905dbe629..0000000000
--- a/Tools/msi/msisupport.mak
+++ /dev/null
@@ -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
diff --git a/Tools/msi/path/path.wixproj b/Tools/msi/path/path.wixproj
new file mode 100644
index 0000000000..2792e14666
--- /dev/null
+++ b/Tools/msi/path/path.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/path/path.wxs b/Tools/msi/path/path.wxs
new file mode 100644
index 0000000000..8b37936cc9
--- /dev/null
+++ b/Tools/msi/path/path.wxs
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <Component Id="PrependPath_CU" Directory="InstallDirectory" Guid="*">
+ <Condition>NOT ALLUSERS=1</Condition>
+ <RegistryKey Root="HKCU" Key="[REGISTRYKEY]">
+ <RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
+ </RegistryKey>
+
+ <CreateFolder Directory="Scripts" />
+ <RemoveFolder Id="Remove_Scripts_CU" Directory="Scripts" On="uninstall" />
+
+ <Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" />
+ <Environment Id="SCRIPTS_PATH_CU" Action="set" Name="PATH" Part="first" Value="[Scripts]" />
+ </Component>
+ <Component Id="PrependPath_LM" Directory="InstallDirectory" Guid="*">
+ <Condition>ALLUSERS=1</Condition>
+ <RegistryKey Root="HKLM" Key="[REGISTRYKEY]">
+ <RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
+ </RegistryKey>
+
+ <CreateFolder Directory="Scripts" />
+ <RemoveFolder Id="Remove_Scripts_LM" Directory="Scripts" On="uninstall" />
+
+ <Environment Id="PATH_LM" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" System="yes" />
+ <Environment Id="SCRIPTS_PATH_LM" Action="set" Name="PATH" Part="first" Value="[Scripts]" System="yes" />
+ <Environment Id="PY_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PY" System="yes" />
+ <Environment Id="PYW_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PYW" System="yes" />
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
+
diff --git a/Tools/msi/path/path_en-US.wxl b/Tools/msi/path/path_en-US.wxl
new file mode 100644
index 0000000000..33a7886fe2
--- /dev/null
+++ b/Tools/msi/path/path_en-US.wxl
@@ -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>
diff --git a/Tools/msi/pip/pip.wixproj b/Tools/msi/pip/pip.wixproj
new file mode 100644
index 0000000000..718c02c032
--- /dev/null
+++ b/Tools/msi/pip/pip.wixproj
@@ -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> \ No newline at end of file
diff --git a/Tools/msi/pip/pip.wxs b/Tools/msi/pip/pip.wxs
new file mode 100644
index 0000000000..19e9f5fd20
--- /dev/null
+++ b/Tools/msi/pip/pip.wxs
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Property Id="PYTHON_EXE" Secure="yes">
+ <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
+ <FileSearch Name="python.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+
+ <?if $(var.Platform)~="x64" ?>
+ <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
+ <?else ?>
+ <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
+ <?endif ?>
+
+ <!-- Install/uninstall pip -->
+ <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
+ <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
+
+ <InstallExecuteSequence>
+ <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
+ <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
+
+ <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
+ </InstallExecuteSequence>
+ </Product>
+</Wix>
+
diff --git a/Tools/msi/pip/pip_en-US.wxl b/Tools/msi/pip/pip_en-US.wxl
new file mode 100644
index 0000000000..cd0d9edf3a
--- /dev/null
+++ b/Tools/msi/pip/pip_en-US.wxl
@@ -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>
diff --git a/Tools/msi/schema.py b/Tools/msi/schema.py
deleted file mode 100644
index 1f72e5ac78..0000000000
--- a/Tools/msi/schema.py
+++ /dev/null
@@ -1,1007 +0,0 @@
-from msilib import Table
-
-_Validation = Table('_Validation')
-_Validation.add_field(1,'Table',11552)
-_Validation.add_field(2,'Column',11552)
-_Validation.add_field(3,'Nullable',3332)
-_Validation.add_field(4,'MinValue',4356)
-_Validation.add_field(5,'MaxValue',4356)
-_Validation.add_field(6,'KeyTable',7679)
-_Validation.add_field(7,'KeyColumn',5378)
-_Validation.add_field(8,'Category',7456)
-_Validation.add_field(9,'Set',7679)
-_Validation.add_field(10,'Description',7679)
-
-ActionText = Table('ActionText')
-ActionText.add_field(1,'Action',11592)
-ActionText.add_field(2,'Description',7936)
-ActionText.add_field(3,'Template',7936)
-
-AdminExecuteSequence = Table('AdminExecuteSequence')
-AdminExecuteSequence.add_field(1,'Action',0x2DFF)
-AdminExecuteSequence.add_field(2,'Condition',7679)
-AdminExecuteSequence.add_field(3,'Sequence',5378)
-
-Condition = Table('Condition')
-Condition.add_field(1,'Feature_',11558)
-Condition.add_field(2,'Level',9474)
-Condition.add_field(3,'Condition',7679)
-
-AdminUISequence = Table('AdminUISequence')
-AdminUISequence.add_field(1,'Action',0x2DFF)
-AdminUISequence.add_field(2,'Condition',7679)
-AdminUISequence.add_field(3,'Sequence',5378)
-
-AdvtExecuteSequence = Table('AdvtExecuteSequence')
-AdvtExecuteSequence.add_field(1,'Action',0x2DFF)
-AdvtExecuteSequence.add_field(2,'Condition',7679)
-AdvtExecuteSequence.add_field(3,'Sequence',5378)
-
-AdvtUISequence = Table('AdvtUISequence')
-AdvtUISequence.add_field(1,'Action',11592)
-AdvtUISequence.add_field(2,'Condition',7679)
-AdvtUISequence.add_field(3,'Sequence',5378)
-
-AppId = Table('AppId')
-AppId.add_field(1,'AppId',11558)
-AppId.add_field(2,'RemoteServerName',7679)
-AppId.add_field(3,'LocalService',7679)
-AppId.add_field(4,'ServiceParameters',7679)
-AppId.add_field(5,'DllSurrogate',7679)
-AppId.add_field(6,'ActivateAtStorage',5378)
-AppId.add_field(7,'RunAsInteractiveUser',5378)
-
-AppSearch = Table('AppSearch')
-AppSearch.add_field(1,'Property',11592)
-AppSearch.add_field(2,'Signature_',11592)
-
-Property = Table('Property')
-Property.add_field(1,'Property',11592)
-Property.add_field(2,'Value',3840)
-
-BBControl = Table('BBControl')
-BBControl.add_field(1,'Billboard_',11570)
-BBControl.add_field(2,'BBControl',11570)
-BBControl.add_field(3,'Type',3378)
-BBControl.add_field(4,'X',1282)
-BBControl.add_field(5,'Y',1282)
-BBControl.add_field(6,'Width',1282)
-BBControl.add_field(7,'Height',1282)
-BBControl.add_field(8,'Attributes',4356)
-BBControl.add_field(9,'Text',7986)
-
-Billboard = Table('Billboard')
-Billboard.add_field(1,'Billboard',11570)
-Billboard.add_field(2,'Feature_',3366)
-Billboard.add_field(3,'Action',7474)
-Billboard.add_field(4,'Ordering',5378)
-
-Feature = Table('Feature')
-Feature.add_field(1,'Feature',11558)
-Feature.add_field(2,'Feature_Parent',7462)
-Feature.add_field(3,'Title',8000)
-Feature.add_field(4,'Description',8191)
-Feature.add_field(5,'Display',5378)
-Feature.add_field(6,'Level',1282)
-Feature.add_field(7,'Directory_',0x1DFF)
-Feature.add_field(8,'Attributes',1282)
-
-Binary = Table('Binary')
-Binary.add_field(1,'Name',11592)
-Binary.add_field(2,'Data',2304)
-
-BindImage = Table('BindImage')
-BindImage.add_field(1,'File_',0x2DFF)
-BindImage.add_field(2,'Path',7679)
-
-File = Table('File')
-File.add_field(1,'File',0x2DFF)
-File.add_field(2,'Component_',0xDFF)
-File.add_field(3,'FileName',4095)
-File.add_field(4,'FileSize',260)
-File.add_field(5,'Version',0x1DFF)
-File.add_field(6,'Language',7444)
-File.add_field(7,'Attributes',5378)
-File.add_field(8,'Sequence',1282)
-
-CCPSearch = Table('CCPSearch')
-CCPSearch.add_field(1,'Signature_',11592)
-
-CheckBox = Table('CheckBox')
-CheckBox.add_field(1,'Property',11592)
-CheckBox.add_field(2,'Value',7488)
-
-Class = Table('Class')
-Class.add_field(1,'CLSID',11558)
-Class.add_field(2,'Context',11552)
-Class.add_field(3,'Component_',0x2DFF)
-Class.add_field(4,'ProgId_Default',7679)
-Class.add_field(5,'Description',8191)
-Class.add_field(6,'AppId_',7462)
-Class.add_field(7,'FileTypeMask',7679)
-Class.add_field(8,'Icon_',7496)
-Class.add_field(9,'IconIndex',5378)
-Class.add_field(10,'DefInprocHandler',7456)
-Class.add_field(11,'Argument',7679)
-Class.add_field(12,'Feature_',3366)
-Class.add_field(13,'Attributes',5378)
-
-Component = Table('Component')
-Component.add_field(1,'Component',0x2DFF)
-Component.add_field(2,'ComponentId',7462)
-Component.add_field(3,'Directory_',0xDFF)
-Component.add_field(4,'Attributes',1282)
-Component.add_field(5,'Condition',7679)
-Component.add_field(6,'KeyPath',0x1DFF)
-
-Icon = Table('Icon')
-Icon.add_field(1,'Name',11592)
-Icon.add_field(2,'Data',2304)
-
-ProgId = Table('ProgId')
-ProgId.add_field(1,'ProgId',11775)
-ProgId.add_field(2,'ProgId_Parent',7679)
-ProgId.add_field(3,'Class_',7462)
-ProgId.add_field(4,'Description',8191)
-ProgId.add_field(5,'Icon_',7496)
-ProgId.add_field(6,'IconIndex',5378)
-
-ComboBox = Table('ComboBox')
-ComboBox.add_field(1,'Property',11592)
-ComboBox.add_field(2,'Order',9474)
-ComboBox.add_field(3,'Value',3392)
-ComboBox.add_field(4,'Text',8000)
-
-CompLocator = Table('CompLocator')
-CompLocator.add_field(1,'Signature_',11592)
-CompLocator.add_field(2,'ComponentId',3366)
-CompLocator.add_field(3,'Type',5378)
-
-Complus = Table('Complus')
-Complus.add_field(1,'Component_',0x2DFF)
-Complus.add_field(2,'ExpType',13570)
-
-Directory = Table('Directory')
-Directory.add_field(1,'Directory',0x2DFF)
-Directory.add_field(2,'Directory_Parent',0x1DFF)
-Directory.add_field(3,'DefaultDir',4095)
-
-Control = Table('Control')
-Control.add_field(1,'Dialog_',11592)
-Control.add_field(2,'Control',11570)
-Control.add_field(3,'Type',3348)
-Control.add_field(4,'X',1282)
-Control.add_field(5,'Y',1282)
-Control.add_field(6,'Width',1282)
-Control.add_field(7,'Height',1282)
-Control.add_field(8,'Attributes',4356)
-Control.add_field(9,'Property',7474)
-Control.add_field(10,'Text',7936)
-Control.add_field(11,'Control_Next',7474)
-Control.add_field(12,'Help',7986)
-
-Dialog = Table('Dialog')
-Dialog.add_field(1,'Dialog',11592)
-Dialog.add_field(2,'HCentering',1282)
-Dialog.add_field(3,'VCentering',1282)
-Dialog.add_field(4,'Width',1282)
-Dialog.add_field(5,'Height',1282)
-Dialog.add_field(6,'Attributes',4356)
-Dialog.add_field(7,'Title',8064)
-Dialog.add_field(8,'Control_First',3378)
-Dialog.add_field(9,'Control_Default',7474)
-Dialog.add_field(10,'Control_Cancel',7474)
-
-ControlCondition = Table('ControlCondition')
-ControlCondition.add_field(1,'Dialog_',11592)
-ControlCondition.add_field(2,'Control_',11570)
-ControlCondition.add_field(3,'Action',11570)
-ControlCondition.add_field(4,'Condition',11775)
-
-ControlEvent = Table('ControlEvent')
-ControlEvent.add_field(1,'Dialog_',11592)
-ControlEvent.add_field(2,'Control_',11570)
-ControlEvent.add_field(3,'Event',11570)
-ControlEvent.add_field(4,'Argument',11775)
-ControlEvent.add_field(5,'Condition',15871)
-ControlEvent.add_field(6,'Ordering',5378)
-
-CreateFolder = Table('CreateFolder')
-CreateFolder.add_field(1,'Directory_',0x2DFF)
-CreateFolder.add_field(2,'Component_',0x2DFF)
-
-CustomAction = Table('CustomAction')
-CustomAction.add_field(1,'Action',0x2DFF)
-CustomAction.add_field(2,'Type',1282)
-CustomAction.add_field(3,'Source',0x1DFF)
-CustomAction.add_field(4,'Target',7679)
-
-DrLocator = Table('DrLocator')
-DrLocator.add_field(1,'Signature_',11592)
-DrLocator.add_field(2,'Parent',15688)
-DrLocator.add_field(3,'Path',15871)
-DrLocator.add_field(4,'Depth',5378)
-
-DuplicateFile = Table('DuplicateFile')
-DuplicateFile.add_field(1,'FileKey',11592)
-DuplicateFile.add_field(2,'Component_',0xDFF)
-DuplicateFile.add_field(3,'File_',0xDFF)
-DuplicateFile.add_field(4,'DestName',8191)
-DuplicateFile.add_field(5,'DestFolder',7496)
-
-Environment = Table('Environment')
-Environment.add_field(1,'Environment',11592)
-Environment.add_field(2,'Name',4095)
-Environment.add_field(3,'Value',8191)
-Environment.add_field(4,'Component_',0xDFF)
-
-Error = Table('Error')
-Error.add_field(1,'Error',9474)
-Error.add_field(2,'Message',7936)
-
-EventMapping = Table('EventMapping')
-EventMapping.add_field(1,'Dialog_',11592)
-EventMapping.add_field(2,'Control_',11570)
-EventMapping.add_field(3,'Event',11570)
-EventMapping.add_field(4,'Attribute',3378)
-
-Extension = Table('Extension')
-Extension.add_field(1,'Extension',11775)
-Extension.add_field(2,'Component_',0x2DFF)
-Extension.add_field(3,'ProgId_',7679)
-Extension.add_field(4,'MIME_',7488)
-Extension.add_field(5,'Feature_',3366)
-
-MIME = Table('MIME')
-MIME.add_field(1,'ContentType',11584)
-MIME.add_field(2,'Extension_',3583)
-MIME.add_field(3,'CLSID',7462)
-
-FeatureComponents = Table('FeatureComponents')
-FeatureComponents.add_field(1,'Feature_',11558)
-FeatureComponents.add_field(2,'Component_',0x2DFF)
-
-FileSFPCatalog = Table('FileSFPCatalog')
-FileSFPCatalog.add_field(1,'File_',0x2DFF)
-FileSFPCatalog.add_field(2,'SFPCatalog_',11775)
-
-SFPCatalog = Table('SFPCatalog')
-SFPCatalog.add_field(1,'SFPCatalog',11775)
-SFPCatalog.add_field(2,'Catalog',2304)
-SFPCatalog.add_field(3,'Dependency',7424)
-
-Font = Table('Font')
-Font.add_field(1,'File_',0x2DFF)
-Font.add_field(2,'FontTitle',7552)
-
-IniFile = Table('IniFile')
-IniFile.add_field(1,'IniFile',11592)
-IniFile.add_field(2,'FileName',4095)
-IniFile.add_field(3,'DirProperty',7496)
-IniFile.add_field(4,'Section',3936)
-IniFile.add_field(5,'Key',3968)
-IniFile.add_field(6,'Value',4095)
-IniFile.add_field(7,'Action',1282)
-IniFile.add_field(8,'Component_',0xDFF)
-
-IniLocator = Table('IniLocator')
-IniLocator.add_field(1,'Signature_',11592)
-IniLocator.add_field(2,'FileName',3583)
-IniLocator.add_field(3,'Section',3424)
-IniLocator.add_field(4,'Key',3456)
-IniLocator.add_field(5,'Field',5378)
-IniLocator.add_field(6,'Type',5378)
-
-InstallExecuteSequence = Table('InstallExecuteSequence')
-InstallExecuteSequence.add_field(1,'Action',0x2DFF)
-InstallExecuteSequence.add_field(2,'Condition',7679)
-InstallExecuteSequence.add_field(3,'Sequence',5378)
-
-InstallUISequence = Table('InstallUISequence')
-InstallUISequence.add_field(1,'Action',0x2DFF)
-InstallUISequence.add_field(2,'Condition',7679)
-InstallUISequence.add_field(3,'Sequence',5378)
-
-IsolatedComponent = Table('IsolatedComponent')
-IsolatedComponent.add_field(1,'Component_Shared',0x2DFF)
-IsolatedComponent.add_field(2,'Component_Application',0x2DFF)
-
-LaunchCondition = Table('LaunchCondition')
-LaunchCondition.add_field(1,'Condition',11775)
-LaunchCondition.add_field(2,'Description',4095)
-
-ListBox = Table('ListBox')
-ListBox.add_field(1,'Property',11592)
-ListBox.add_field(2,'Order',9474)
-ListBox.add_field(3,'Value',3392)
-ListBox.add_field(4,'Text',8000)
-
-ListView = Table('ListView')
-ListView.add_field(1,'Property',11592)
-ListView.add_field(2,'Order',9474)
-ListView.add_field(3,'Value',3392)
-ListView.add_field(4,'Text',8000)
-ListView.add_field(5,'Binary_',7496)
-
-LockPermissions = Table('LockPermissions')
-LockPermissions.add_field(1,'LockObject',11592)
-LockPermissions.add_field(2,'Table',11552)
-LockPermissions.add_field(3,'Domain',15871)
-LockPermissions.add_field(4,'User',11775)
-LockPermissions.add_field(5,'Permission',4356)
-
-Media = Table('Media')
-Media.add_field(1,'DiskId',9474)
-Media.add_field(2,'LastSequence',1282)
-Media.add_field(3,'DiskPrompt',8000)
-Media.add_field(4,'Cabinet',7679)
-Media.add_field(5,'VolumeLabel',7456)
-Media.add_field(6,'Source',7496)
-
-MoveFile = Table('MoveFile')
-MoveFile.add_field(1,'FileKey',11592)
-MoveFile.add_field(2,'Component_',0xDFF)
-MoveFile.add_field(3,'SourceName',8191)
-MoveFile.add_field(4,'DestName',8191)
-MoveFile.add_field(5,'SourceFolder',7496)
-MoveFile.add_field(6,'DestFolder',3400)
-MoveFile.add_field(7,'Options',1282)
-
-MsiAssembly = Table('MsiAssembly')
-MsiAssembly.add_field(1,'Component_',0x2DFF)
-MsiAssembly.add_field(2,'Feature_',3366)
-MsiAssembly.add_field(3,'File_Manifest',0x1DFF)
-MsiAssembly.add_field(4,'File_Application',0x1DFF)
-MsiAssembly.add_field(5,'Attributes',5378)
-
-MsiAssemblyName = Table('MsiAssemblyName')
-MsiAssemblyName.add_field(1,'Component_',0x2DFF)
-MsiAssemblyName.add_field(2,'Name',11775)
-MsiAssemblyName.add_field(3,'Value',3583)
-
-MsiDigitalCertificate = Table('MsiDigitalCertificate')
-MsiDigitalCertificate.add_field(1,'DigitalCertificate',11592)
-MsiDigitalCertificate.add_field(2,'CertData',2304)
-
-MsiDigitalSignature = Table('MsiDigitalSignature')
-MsiDigitalSignature.add_field(1,'Table',11552)
-MsiDigitalSignature.add_field(2,'SignObject',11592)
-MsiDigitalSignature.add_field(3,'DigitalCertificate_',3400)
-MsiDigitalSignature.add_field(4,'Hash',6400)
-
-MsiFileHash = Table('MsiFileHash')
-MsiFileHash.add_field(1,'File_',0x2DFF)
-MsiFileHash.add_field(2,'Options',1282)
-MsiFileHash.add_field(3,'HashPart1',260)
-MsiFileHash.add_field(4,'HashPart2',260)
-MsiFileHash.add_field(5,'HashPart3',260)
-MsiFileHash.add_field(6,'HashPart4',260)
-
-MsiPatchHeaders = Table('MsiPatchHeaders')
-MsiPatchHeaders.add_field(1,'StreamRef',11558)
-MsiPatchHeaders.add_field(2,'Header',2304)
-
-ODBCAttribute = Table('ODBCAttribute')
-ODBCAttribute.add_field(1,'Driver_',11592)
-ODBCAttribute.add_field(2,'Attribute',11560)
-ODBCAttribute.add_field(3,'Value',8191)
-
-ODBCDriver = Table('ODBCDriver')
-ODBCDriver.add_field(1,'Driver',11592)
-ODBCDriver.add_field(2,'Component_',0xDFF)
-ODBCDriver.add_field(3,'Description',3583)
-ODBCDriver.add_field(4,'File_',0xDFF)
-ODBCDriver.add_field(5,'File_Setup',0x1DFF)
-
-ODBCDataSource = Table('ODBCDataSource')
-ODBCDataSource.add_field(1,'DataSource',0x2DFF)
-ODBCDataSource.add_field(2,'Component_',0xDFF)
-ODBCDataSource.add_field(3,'Description',3583)
-ODBCDataSource.add_field(4,'DriverDescription',3583)
-ODBCDataSource.add_field(5,'Registration',1282)
-
-ODBCSourceAttribute = Table('ODBCSourceAttribute')
-ODBCSourceAttribute.add_field(1,'DataSource_',11592)
-ODBCSourceAttribute.add_field(2,'Attribute',11552)
-ODBCSourceAttribute.add_field(3,'Value',8191)
-
-ODBCTranslator = Table('ODBCTranslator')
-ODBCTranslator.add_field(1,'Translator',11592)
-ODBCTranslator.add_field(2,'Component_',0xDFF)
-ODBCTranslator.add_field(3,'Description',3583)
-ODBCTranslator.add_field(4,'File_',0xDFF)
-ODBCTranslator.add_field(5,'File_Setup',0x1DFF)
-
-Patch = Table('Patch')
-Patch.add_field(1,'File_',11592)
-Patch.add_field(2,'Sequence',9474)
-Patch.add_field(3,'PatchSize',260)
-Patch.add_field(4,'Attributes',1282)
-Patch.add_field(5,'Header',6400)
-Patch.add_field(6,'StreamRef_',7462)
-
-PatchPackage = Table('PatchPackage')
-PatchPackage.add_field(1,'PatchId',11558)
-PatchPackage.add_field(2,'Media_',1282)
-
-PublishComponent = Table('PublishComponent')
-PublishComponent.add_field(1,'ComponentId',11558)
-PublishComponent.add_field(2,'Qualifier',11775)
-PublishComponent.add_field(3,'Component_',0x2DFF)
-PublishComponent.add_field(4,'AppData',8191)
-PublishComponent.add_field(5,'Feature_',3366)
-
-RadioButton = Table('RadioButton')
-RadioButton.add_field(1,'Property',11592)
-RadioButton.add_field(2,'Order',9474)
-RadioButton.add_field(3,'Value',3392)
-RadioButton.add_field(4,'X',1282)
-RadioButton.add_field(5,'Y',1282)
-RadioButton.add_field(6,'Width',1282)
-RadioButton.add_field(7,'Height',1282)
-RadioButton.add_field(8,'Text',8000)
-RadioButton.add_field(9,'Help',7986)
-
-Registry = Table('Registry')
-Registry.add_field(1,'Registry',0x2DFF)
-Registry.add_field(2,'Root',1282)
-Registry.add_field(3,'Key',4095)
-Registry.add_field(4,'Name',8191)
-Registry.add_field(5,'Value',7936)
-Registry.add_field(6,'Component_',0xDFF)
-
-RegLocator = Table('RegLocator')
-RegLocator.add_field(1,'Signature_',11592)
-RegLocator.add_field(2,'Root',1282)
-RegLocator.add_field(3,'Key',3583)
-RegLocator.add_field(4,'Name',7679)
-RegLocator.add_field(5,'Type',5378)
-
-RemoveFile = Table('RemoveFile')
-RemoveFile.add_field(1,'FileKey',11592)
-RemoveFile.add_field(2,'Component_',0xDFF)
-RemoveFile.add_field(3,'FileName',8191)
-RemoveFile.add_field(4,'DirProperty',3400)
-RemoveFile.add_field(5,'InstallMode',1282)
-
-RemoveIniFile = Table('RemoveIniFile')
-RemoveIniFile.add_field(1,'RemoveIniFile',11592)
-RemoveIniFile.add_field(2,'FileName',4095)
-RemoveIniFile.add_field(3,'DirProperty',7496)
-RemoveIniFile.add_field(4,'Section',3936)
-RemoveIniFile.add_field(5,'Key',3968)
-RemoveIniFile.add_field(6,'Value',8191)
-RemoveIniFile.add_field(7,'Action',1282)
-RemoveIniFile.add_field(8,'Component_',0xDFF)
-
-RemoveRegistry = Table('RemoveRegistry')
-RemoveRegistry.add_field(1,'RemoveRegistry',11592)
-RemoveRegistry.add_field(2,'Root',1282)
-RemoveRegistry.add_field(3,'Key',4095)
-RemoveRegistry.add_field(4,'Name',8191)
-RemoveRegistry.add_field(5,'Component_',0xDFF)
-
-ReserveCost = Table('ReserveCost')
-ReserveCost.add_field(1,'ReserveKey',11592)
-ReserveCost.add_field(2,'Component_',0xDFF)
-ReserveCost.add_field(3,'ReserveFolder',7496)
-ReserveCost.add_field(4,'ReserveLocal',260)
-ReserveCost.add_field(5,'ReserveSource',260)
-
-SelfReg = Table('SelfReg')
-SelfReg.add_field(1,'File_',0x2DFF)
-SelfReg.add_field(2,'Cost',5378)
-
-ServiceControl = Table('ServiceControl')
-ServiceControl.add_field(1,'ServiceControl',11592)
-ServiceControl.add_field(2,'Name',4095)
-ServiceControl.add_field(3,'Event',1282)
-ServiceControl.add_field(4,'Arguments',8191)
-ServiceControl.add_field(5,'Wait',5378)
-ServiceControl.add_field(6,'Component_',0xDFF)
-
-ServiceInstall = Table('ServiceInstall')
-ServiceInstall.add_field(1,'ServiceInstall',11592)
-ServiceInstall.add_field(2,'Name',3583)
-ServiceInstall.add_field(3,'DisplayName',8191)
-ServiceInstall.add_field(4,'ServiceType',260)
-ServiceInstall.add_field(5,'StartType',260)
-ServiceInstall.add_field(6,'ErrorControl',260)
-ServiceInstall.add_field(7,'LoadOrderGroup',7679)
-ServiceInstall.add_field(8,'Dependencies',7679)
-ServiceInstall.add_field(9,'StartName',7679)
-ServiceInstall.add_field(10,'Password',7679)
-ServiceInstall.add_field(11,'Arguments',7679)
-ServiceInstall.add_field(12,'Component_',0xDFF)
-ServiceInstall.add_field(13,'Description',8191)
-
-Shortcut = Table('Shortcut')
-Shortcut.add_field(1,'Shortcut',11592)
-Shortcut.add_field(2,'Directory_',0xDFF)
-Shortcut.add_field(3,'Name',3968)
-Shortcut.add_field(4,'Component_',0xDFF)
-Shortcut.add_field(5,'Target',3400)
-Shortcut.add_field(6,'Arguments',7679)
-Shortcut.add_field(7,'Description',8191)
-Shortcut.add_field(8,'Hotkey',5378)
-Shortcut.add_field(9,'Icon_',7496)
-Shortcut.add_field(10,'IconIndex',5378)
-Shortcut.add_field(11,'ShowCmd',5378)
-Shortcut.add_field(12,'WkDir',7496)
-
-Signature = Table('Signature')
-Signature.add_field(1,'Signature',11592)
-Signature.add_field(2,'FileName',3583)
-Signature.add_field(3,'MinVersion',7444)
-Signature.add_field(4,'MaxVersion',7444)
-Signature.add_field(5,'MinSize',4356)
-Signature.add_field(6,'MaxSize',4356)
-Signature.add_field(7,'MinDate',4356)
-Signature.add_field(8,'MaxDate',4356)
-Signature.add_field(9,'Languages',7679)
-
-TextStyle = Table('TextStyle')
-TextStyle.add_field(1,'TextStyle',11592)
-TextStyle.add_field(2,'FaceName',3360)
-TextStyle.add_field(3,'Size',1282)
-TextStyle.add_field(4,'Color',4356)
-TextStyle.add_field(5,'StyleBits',5378)
-
-TypeLib = Table('TypeLib')
-TypeLib.add_field(1,'LibID',11558)
-TypeLib.add_field(2,'Language',9474)
-TypeLib.add_field(3,'Component_',0x2DFF)
-TypeLib.add_field(4,'Version',4356)
-TypeLib.add_field(5,'Description',8064)
-TypeLib.add_field(6,'Directory_',0x1DFF)
-TypeLib.add_field(7,'Feature_',3366)
-TypeLib.add_field(8,'Cost',4356)
-
-UIText = Table('UIText')
-UIText.add_field(1,'Key',11592)
-UIText.add_field(2,'Text',8191)
-
-Upgrade = Table('Upgrade')
-Upgrade.add_field(1,'UpgradeCode',11558)
-Upgrade.add_field(2,'VersionMin',15636)
-Upgrade.add_field(3,'VersionMax',15636)
-Upgrade.add_field(4,'Language',15871)
-Upgrade.add_field(5,'Attributes',8452)
-Upgrade.add_field(6,'Remove',7679)
-Upgrade.add_field(7,'ActionProperty',3400)
-
-Verb = Table('Verb')
-Verb.add_field(1,'Extension_',11775)
-Verb.add_field(2,'Verb',11552)
-Verb.add_field(3,'Sequence',5378)
-Verb.add_field(4,'Command',8191)
-Verb.add_field(5,'Argument',8191)
-
-tables=[_Validation, ActionText, AdminExecuteSequence, Condition, AdminUISequence, AdvtExecuteSequence, AdvtUISequence, AppId, AppSearch, Property, BBControl, Billboard, Feature, Binary, BindImage, File, CCPSearch, CheckBox, Class, Component, Icon, ProgId, ComboBox, CompLocator, Complus, Directory, Control, Dialog, ControlCondition, ControlEvent, CreateFolder, CustomAction, DrLocator, DuplicateFile, Environment, Error, EventMapping, Extension, MIME, FeatureComponents, FileSFPCatalog, SFPCatalog, Font, IniFile, IniLocator, InstallExecuteSequence, InstallUISequence, IsolatedComponent, LaunchCondition, ListBox, ListView, LockPermissions, Media, MoveFile, MsiAssembly, MsiAssemblyName, MsiDigitalCertificate, MsiDigitalSignature, MsiFileHash, MsiPatchHeaders, ODBCAttribute, ODBCDriver, ODBCDataSource, ODBCSourceAttribute, ODBCTranslator, Patch, PatchPackage, PublishComponent, RadioButton, Registry, RegLocator, RemoveFile, RemoveIniFile, RemoveRegistry, ReserveCost, SelfReg, ServiceControl, ServiceInstall, Shortcut, Signature, TextStyle, TypeLib, UIText, Upgrade, Verb]
-
-_Validation_records = [
-(u'_Validation',u'Table',u'N',None, None, None, None, u'Identifier',None, u'Name of table',),
-(u'_Validation',u'Column',u'N',None, None, None, None, u'Identifier',None, u'Name of column',),
-(u'_Validation',u'Description',u'Y',None, None, None, None, u'Text',None, u'Description of column',),
-(u'_Validation',u'Set',u'Y',None, None, None, None, u'Text',None, u'Set of values that are permitted',),
-(u'_Validation',u'Category',u'Y',None, None, None, None, None, u'Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL',u'String category',),
-(u'_Validation',u'KeyColumn',u'Y',1,32,None, None, None, None, u'Column to which foreign key connects',),
-(u'_Validation',u'KeyTable',u'Y',None, None, None, None, u'Identifier',None, u'For foreign key, Name of table to which data must link',),
-(u'_Validation',u'MaxValue',u'Y',-2147483647,2147483647,None, None, None, None, u'Maximum value allowed',),
-(u'_Validation',u'MinValue',u'Y',-2147483647,2147483647,None, None, None, None, u'Minimum value allowed',),
-(u'_Validation',u'Nullable',u'N',None, None, None, None, None, u'Y;N;@',u'Whether the column is nullable',),
-(u'ActionText',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description displayed in progress dialog and log when action is executing.',),
-(u'ActionText',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to be described.',),
-(u'ActionText',u'Template',u'Y',None, None, None, None, u'Template',None, u'Optional localized format template used to format action data records for display during action execution.',),
-(u'AdminExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdminExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdminExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'Condition',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Expression evaluated to determine if Level in the Feature table is to change.',),
-(u'Condition',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Reference to a Feature entry in Feature table.',),
-(u'Condition',u'Level',u'N',0,32767,None, None, None, None, u'New selection Level to set in Feature table if Condition evaluates to TRUE.',),
-(u'AdminUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdminUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdminUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AdvtExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdvtExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdvtExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AdvtUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdvtUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdvtUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AppId',u'AppId',u'N',None, None, None, None, u'Guid',None, None, ),
-(u'AppId',u'ActivateAtStorage',u'Y',0,1,None, None, None, None, None, ),
-(u'AppId',u'DllSurrogate',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppId',u'LocalService',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppId',u'RemoteServerName',u'Y',None, None, None, None, u'Formatted',None, None, ),
-(u'AppId',u'RunAsInteractiveUser',u'Y',0,1,None, None, None, None, None, ),
-(u'AppId',u'ServiceParameters',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppSearch',u'Property',u'N',None, None, None, None, u'Identifier',None, u'The property associated with a Signature',),
-(u'AppSearch',u'Signature_',u'N',None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator',1,u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.',),
-(u'Property',u'Property',u'N',None, None, None, None, u'Identifier',None, u'Name of property, uppercase if settable by launcher or loader.',),
-(u'Property',u'Value',u'N',None, None, None, None, u'Text',None, u'String value for property. Never null or empty.',),
-(u'BBControl',u'Type',u'N',None, None, None, None, u'Identifier',None, u'The type of the control.',),
-(u'BBControl',u'Y',u'N',0,32767,None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'BBControl',u'Text',u'Y',None, None, None, None, u'Text',None, u'A string used to set the initial text contained within a control (if appropriate).',),
-(u'BBControl',u'BBControl',u'N',None, None, None, None, u'Identifier',None, u'Name of the control. This name must be unique within a billboard, but can repeat on different billboard.',),
-(u'BBControl',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.',),
-(u'BBControl',u'Billboard_',u'N',None, None, u'Billboard',1,u'Identifier',None, u'External key to the Billboard table, name of the billboard.',),
-(u'BBControl',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the control.',),
-(u'BBControl',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the control.',),
-(u'BBControl',u'X',u'N',0,32767,None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Billboard',u'Action',u'Y',None, None, None, None, u'Identifier',None, u'The name of an action. The billboard is displayed during the progress messages received from this action.',),
-(u'Billboard',u'Billboard',u'N',None, None, None, None, u'Identifier',None, u'Name of the billboard.',),
-(u'Billboard',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'An external key to the Feature Table. The billboard is shown only if this feature is being installed.',),
-(u'Billboard',u'Ordering',u'Y',0,32767,None, None, None, None, u'A positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.',),
-(u'Feature',u'Description',u'Y',None, None, None, None, u'Text',None, u'Longer descriptive text describing a visible feature item.',),
-(u'Feature',u'Attributes',u'N',None, None, None, None, None, u'0;1;2;4;5;6;8;9;10;16;17;18;20;21;22;24;25;26;32;33;34;36;37;38;48;49;50;52;53;54',u'Feature attributes',),
-(u'Feature',u'Feature',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular feature record.',),
-(u'Feature',u'Directory_',u'Y',None, None, u'Directory',1,u'UpperCase',None, u'The name of the Directory that can be configured by the UI. A non-null value will enable the browse button.',),
-(u'Feature',u'Level',u'N',0,32767,None, None, None, None, u'The install level at which record will be initially selected. An install level of 0 will disable an item and prevent its display.',),
-(u'Feature',u'Title',u'Y',None, None, None, None, u'Text',None, u'Short text identifying a visible feature item.',),
-(u'Feature',u'Display',u'Y',0,32767,None, None, None, None, u'Numeric sort order, used to force a specific display ordering.',),
-(u'Feature',u'Feature_Parent',u'Y',None, None, u'Feature',1,u'Identifier',None, u'Optional key of a parent record in the same table. If the parent is not selected, then the record will not be installed. Null indicates a root item.',),
-(u'Binary',u'Name',u'N',None, None, None, None, u'Identifier',None, u'Unique key identifying the binary data.',),
-(u'Binary',u'Data',u'N',None, None, None, None, u'Binary',None, u'The unformatted binary data.',),
-(u'BindImage',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'The index into the File table. This must be an executable file.',),
-(u'BindImage',u'Path',u'Y',None, None, None, None, u'Paths',None, u'A list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .',),
-(u'File',u'Sequence',u'N',1,32767,None, None, None, None, u'Sequence with respect to the media images; order must track cabinet order.',),
-(u'File',u'Attributes',u'Y',0,32767,None, None, None, None, u'Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses)',),
-(u'File',u'File',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token, must match identifier in cabinet. For uncompressed files, this field is ignored.',),
-(u'File',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the file.',),
-(u'File',u'FileName',u'N',None, None, None, None, u'Filename',None, u'File name used for installation, may be localized. This may contain a "short name|long name" pair.',),
-(u'File',u'FileSize',u'N',0,2147483647,None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'File',u'Language',u'Y',None, None, None, None, u'Language',None, u'List of decimal language Ids, comma-separated if more than one.',),
-(u'File',u'Version',u'Y',None, None, u'File',1,u'Version',None, u'Version string for versioned files; Blank for unversioned files.',),
-(u'CCPSearch',u'Signature_',u'N',None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator',1,u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.',),
-(u'CheckBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to the item.',),
-(u'CheckBox',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value string associated with the item.',),
-(u'Class',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description for the Class.',),
-(u'Class',u'Attributes',u'Y',None, 32767,None, None, None, None, u'Class registration attributes.',),
-(u'Class',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.',),
-(u'Class',u'AppId_',u'Y',None, None, u'AppId',1,u'Guid',None, u'Optional AppID containing DCOM information for associated application (string GUID).',),
-(u'Class',u'Argument',u'Y',None, None, None, None, u'Formatted',None, u'optional argument for LocalServers.',),
-(u'Class',u'CLSID',u'N',None, None, None, None, u'Guid',None, u'The CLSID of an OLE factory.',),
-(u'Class',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'Class',u'Context',u'N',None, None, None, None, u'Identifier',None, u'The numeric server context for this server. CLSCTX_xxxx',),
-(u'Class',u'DefInprocHandler',u'Y',None, None, None, None, u'Filename',u'1;2;3',u'Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"',),
-(u'Class',u'FileTypeMask',u'Y',None, None, None, None, u'Text',None, u'Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...',),
-(u'Class',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key.',),
-(u'Class',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'Optional icon index.',),
-(u'Class',u'ProgId_Default',u'Y',None, None, u'ProgId',1,u'Text',None, u'Optional ProgId associated with this CLSID.',),
-(u'Component',u'Condition',u'Y',None, None, None, None, u'Condition',None, u"A conditional statement that will disable this component if the specified condition evaluates to the 'True' state. If a component is disabled, it will not be installed, regardless of the 'Action' state associated with the component.",),
-(u'Component',u'Attributes',u'N',None, None, None, None, None, None, u'Remote execution option, one of irsEnum',),
-(u'Component',u'Component',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular component record.',),
-(u'Component',u'ComponentId',u'Y',None, None, None, None, u'Guid',None, u'A string GUID unique to this component, version, and language.',),
-(u'Component',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Required key of a Directory table record. This is actually a property name whose value contains the actual path, set either by the AppSearch action or with the default setting obtained from the Directory table.',),
-(u'Component',u'KeyPath',u'Y',None, None, u'File;Registry;ODBCDataSource',1,u'Identifier',None, u'Either the primary key into the File table, Registry table, or ODBCDataSource table. This extract path is stored when the component is installed, and is used to detect the presence of the component and to return the path to it.',),
-(u'Icon',u'Name',u'N',None, None, None, None, u'Identifier',None, u'Primary key. Name of the icon file.',),
-(u'Icon',u'Data',u'N',None, None, None, None, u'Binary',None, u'Binary stream. The binary icon data in PE (.DLL or .EXE) or icon (.ICO) format.',),
-(u'ProgId',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description for the Program identifier.',),
-(u'ProgId',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this ProgId. Will be written under the DefaultIcon key.',),
-(u'ProgId',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'Optional icon index.',),
-(u'ProgId',u'ProgId',u'N',None, None, None, None, u'Text',None, u'The Program Identifier. Primary key.',),
-(u'ProgId',u'Class_',u'Y',None, None, u'Class',1,u'Guid',None, u'The CLSID of an OLE factory corresponding to the ProgId.',),
-(u'ProgId',u'ProgId_Parent',u'Y',None, None, u'ProgId',1,u'Text',None, u'The Parent Program Identifier. If specified, the ProgId column becomes a version independent prog id.',),
-(u'ComboBox',u'Text',u'Y',None, None, None, None, u'Formatted',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ComboBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same combobox.',),
-(u'ComboBox',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ComboBox',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list.\tThe integers do not have to be consecutive.',),
-(u'CompLocator',u'Type',u'Y',0,1,None, None, None, None, u'A boolean value that determines if the registry value is a filename or a directory location.',),
-(u'CompLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'CompLocator',u'ComponentId',u'N',None, None, None, None, u'Guid',None, u'A string GUID unique to this component, version, and language.',),
-(u'Complus',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the ComPlus component.',),
-(u'Complus',u'ExpType',u'Y',0,32767,None, None, None, None, u'ComPlus component attributes.',),
-(u'Directory',u'Directory',u'N',None, None, None, None, u'Identifier',None, u'Unique identifier for directory entry, primary key. If a property by this name is defined, it contains the full path to the directory.',),
-(u'Directory',u'DefaultDir',u'N',None, None, None, None, u'DefaultDir',None, u"The default sub-path under parent's path.",),
-(u'Directory',u'Directory_Parent',u'Y',None, None, u'Directory',1,u'Identifier',None, u'Reference to the entry in this table specifying the default parent directory. A record parented to itself or with a Null parent represents a root of the install tree.',),
-(u'Control',u'Type',u'N',None, None, None, None, u'Identifier',None, u'The type of the control.',),
-(u'Control',u'Y',u'N',0,32767,None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Control',u'Text',u'Y',None, None, None, None, u'Formatted',None, u'A string used to set the initial text contained within a control (if appropriate).',),
-(u'Control',u'Property',u'Y',None, None, None, None, u'Identifier',None, u'The name of a defined property to be linked to this control. ',),
-(u'Control',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.',),
-(u'Control',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the control.',),
-(u'Control',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the control.',),
-(u'Control',u'X',u'N',0,32767,None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Control',u'Control',u'N',None, None, None, None, u'Identifier',None, u'Name of the control. This name must be unique within a dialog, but can repeat on different dialogs. ',),
-(u'Control',u'Control_Next',u'Y',None, None, u'Control',2,u'Identifier',None, u'The name of an other control on the same dialog. This link defines the tab order of the controls. The links have to form one or more cycles!',),
-(u'Control',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'External key to the Dialog table, name of the dialog.',),
-(u'Control',u'Help',u'Y',None, None, None, None, u'Text',None, u'The help strings used with the button. The text is optional. ',),
-(u'Dialog',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this dialog.',),
-(u'Dialog',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the dialog.',),
-(u'Dialog',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the dialog.',),
-(u'Dialog',u'Dialog',u'N',None, None, None, None, u'Identifier',None, u'Name of the dialog.',),
-(u'Dialog',u'Control_Cancel',u'Y',None, None, u'Control',2,u'Identifier',None, u'Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button.',),
-(u'Dialog',u'Control_Default',u'Y',None, None, u'Control',2,u'Identifier',None, u'Defines the default control. Hitting return is equivalent to pushing this button.',),
-(u'Dialog',u'Control_First',u'N',None, None, u'Control',2,u'Identifier',None, u'Defines the control that has the focus when the dialog is created.',),
-(u'Dialog',u'HCentering',u'N',0,100,None, None, None, None, u'Horizontal position of the dialog on a 0-100 scale. 0 means left end, 100 means right end of the screen, 50 center.',),
-(u'Dialog',u'Title',u'Y',None, None, None, None, u'Formatted',None, u"A text string specifying the title to be displayed in the title bar of the dialog's window.",),
-(u'Dialog',u'VCentering',u'N',0,100,None, None, None, None, u'Vertical position of the dialog on a 0-100 scale. 0 means top end, 100 means bottom end of the screen, 50 center.',),
-(u'ControlCondition',u'Action',u'N',None, None, None, None, None, u'Default;Disable;Enable;Hide;Show',u'The desired action to be taken on the specified control.',),
-(u'ControlCondition',u'Condition',u'N',None, None, None, None, u'Condition',None, u'A standard conditional statement that specifies under which conditions the action should be triggered.',),
-(u'ControlCondition',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the dialog.',),
-(u'ControlCondition',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control.',),
-(u'ControlEvent',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'A standard conditional statement that specifies under which conditions an event should be triggered.',),
-(u'ControlEvent',u'Ordering',u'Y',0,2147483647,None, None, None, None, u'An integer used to order several events tied to the same control. Can be left blank.',),
-(u'ControlEvent',u'Argument',u'N',None, None, None, None, u'Formatted',None, u'A value to be used as a modifier when triggering a particular event.',),
-(u'ControlEvent',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the dialog.',),
-(u'ControlEvent',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control',),
-(u'ControlEvent',u'Event',u'N',None, None, None, None, u'Formatted',None, u'An identifier that specifies the type of the event that should take place when the user interacts with control specified by the first two entries.',),
-(u'CreateFolder',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table.',),
-(u'CreateFolder',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Primary key, could be foreign key into the Directory table.',),
-(u'CustomAction',u'Type',u'N',1,16383,None, None, None, None, u'The numeric custom action type, consisting of source location, code type, entry, option flags.',),
-(u'CustomAction',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Primary key, name of action, normally appears in sequence table unless private use.',),
-(u'CustomAction',u'Source',u'Y',None, None, None, None, u'CustomSource',None, u'The table reference of the source of the code.',),
-(u'CustomAction',u'Target',u'Y',None, None, None, None, u'Formatted',None, u'Excecution parameter, depends on the type of custom action',),
-(u'DrLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
-(u'DrLocator',u'Depth',u'Y',0,32767,None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
-(u'DrLocator',u'Parent',u'Y',None, None, None, None, u'Identifier',None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.',),
-(u'DuplicateFile',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key referencing the source file to be duplicated.',),
-(u'DuplicateFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the duplicate file.',),
-(u'DuplicateFile',u'DestFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full pathname to a destination folder.',),
-(u'DuplicateFile',u'DestName',u'Y',None, None, None, None, u'Filename',None, u'Filename to be given to the duplicate file.',),
-(u'DuplicateFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular file entry',),
-(u'Environment',u'Name',u'N',None, None, None, None, u'Text',None, u'The name of the environmental value.',),
-(u'Environment',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value to set in the environmental settings.',),
-(u'Environment',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the environmental value.',),
-(u'Environment',u'Environment',u'N',None, None, None, None, u'Identifier',None, u'Unique identifier for the environmental variable setting',),
-(u'Error',u'Error',u'N',0,32767,None, None, None, None, u'Integer error number, obtained from header file IError(...) macros.',),
-(u'Error',u'Message',u'Y',None, None, None, None, u'Template',None, u'Error formatting template, obtained from user ed. or localizers.',),
-(u'EventMapping',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the Dialog.',),
-(u'EventMapping',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control.',),
-(u'EventMapping',u'Event',u'N',None, None, None, None, u'Identifier',None, u'An identifier that specifies the type of the event that the control subscribes to.',),
-(u'EventMapping',u'Attribute',u'N',None, None, None, None, u'Identifier',None, u'The name of the control attribute, that is set when this event is received.',),
-(u'Extension',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.',),
-(u'Extension',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'Extension',u'Extension',u'N',None, None, None, None, u'Text',None, u'The extension associated with the table row.',),
-(u'Extension',u'MIME_',u'Y',None, None, u'MIME',1,u'Text',None, u'Optional Context identifier, typically "type/format" associated with the extension',),
-(u'Extension',u'ProgId_',u'Y',None, None, u'ProgId',1,u'Text',None, u'Optional ProgId associated with this extension.',),
-(u'MIME',u'CLSID',u'Y',None, None, None, None, u'Guid',None, u'Optional associated CLSID.',),
-(u'MIME',u'ContentType',u'N',None, None, None, None, u'Text',None, u'Primary key. Context identifier, typically "type/format".',),
-(u'MIME',u'Extension_',u'N',None, None, u'Extension',1,u'Text',None, u'Optional associated extension (without dot)',),
-(u'FeatureComponents',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into Feature table.',),
-(u'FeatureComponents',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'FileSFPCatalog',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'File associated with the catalog',),
-(u'FileSFPCatalog',u'SFPCatalog_',u'N',None, None, u'SFPCatalog',1,u'Filename',None, u'Catalog associated with the file',),
-(u'SFPCatalog',u'SFPCatalog',u'N',None, None, None, None, u'Filename',None, u'File name for the catalog.',),
-(u'SFPCatalog',u'Catalog',u'N',None, None, None, None, u'Binary',None, u'SFP Catalog',),
-(u'SFPCatalog',u'Dependency',u'Y',None, None, None, None, u'Formatted',None, u'Parent catalog - only used by SFP',),
-(u'Font',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Primary key, foreign key into File table referencing font file.',),
-(u'Font',u'FontTitle',u'Y',None, None, None, None, u'Text',None, u'Font name.',),
-(u'IniFile',u'Action',u'N',None, None, None, None, None, u'0;1;3',u'The type of modification to be made, one of iifEnum',),
-(u'IniFile',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value to be written.',),
-(u'IniFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the .INI value.',),
-(u'IniFile',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name in which to write the information',),
-(u'IniFile',u'IniFile',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'IniFile',u'DirProperty',u'Y',None, None, None, None, u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the .INI file is.',),
-(u'IniFile',u'Key',u'N',None, None, None, None, u'Formatted',None, u'The .INI file key below Section.',),
-(u'IniFile',u'Section',u'N',None, None, None, None, u'Formatted',None, u'The .INI file Section.',),
-(u'IniLocator',u'Type',u'Y',0,2,None, None, None, None, u'An integer value that determines if the .INI value read is a filename or a directory location or to be used as is w/o interpretation.',),
-(u'IniLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'IniLocator',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name.',),
-(u'IniLocator',u'Key',u'N',None, None, None, None, u'Text',None, u'Key value (followed by an equals sign in INI file).',),
-(u'IniLocator',u'Section',u'N',None, None, None, None, u'Text',None, u'Section name within in file (within square brackets in INI file).',),
-(u'IniLocator',u'Field',u'Y',0,32767,None, None, None, None, u'The field in the .INI line. If Field is null or 0 the entire line is read.',),
-(u'InstallExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'InstallExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'InstallExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'InstallUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'InstallUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'InstallUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'IsolatedComponent',u'Component_Application',u'N',None, None, u'Component',1,u'Identifier',None, u'Key to Component table item for application',),
-(u'IsolatedComponent',u'Component_Shared',u'N',None, None, u'Component',1,u'Identifier',None, u'Key to Component table item to be isolated',),
-(u'LaunchCondition',u'Description',u'N',None, None, None, None, u'Formatted',None, u'Localizable text to display when condition fails and install must abort.',),
-(u'LaunchCondition',u'Condition',u'N',None, None, None, None, u'Condition',None, u'Expression which must evaluate to TRUE in order for install to commence.',),
-(u'ListBox',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ListBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listbox.',),
-(u'ListBox',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ListBox',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'ListView',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ListView',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listview.',),
-(u'ListView',u'Value',u'N',None, None, None, None, u'Identifier',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ListView',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'ListView',u'Binary_',u'Y',None, None, u'Binary',1,u'Identifier',None, u'The name of the icon to be displayed with the icon. The binary information is looked up from the Binary Table.',),
-(u'LockPermissions',u'Table',u'N',None, None, None, None, u'Identifier',u'Directory;File;Registry',u'Reference to another table name',),
-(u'LockPermissions',u'Domain',u'Y',None, None, None, None, u'Formatted',None, u'Domain name for user whose permissions are being set. (usually a property)',),
-(u'LockPermissions',u'LockObject',u'N',None, None, None, None, u'Identifier',None, u'Foreign key into Registry or File table',),
-(u'LockPermissions',u'Permission',u'Y',-2147483647,2147483647,None, None, None, None, u'Permission Access mask. Full Control = 268435456 (GENERIC_ALL = 0x10000000)',),
-(u'LockPermissions',u'User',u'N',None, None, None, None, u'Formatted',None, u'User for permissions to be set. (usually a property)',),
-(u'Media',u'Source',u'Y',None, None, None, None, u'Property',None, u'The property defining the location of the cabinet file.',),
-(u'Media',u'Cabinet',u'Y',None, None, None, None, u'Cabinet',None, u'If some or all of the files stored on the media are compressed in a cabinet, the name of that cabinet.',),
-(u'Media',u'DiskId',u'N',1,32767,None, None, None, None, u'Primary key, integer to determine sort order for table.',),
-(u'Media',u'DiskPrompt',u'Y',None, None, None, None, u'Text',None, u'Disk name: the visible text actually printed on the disk. This will be used to prompt the user when this disk needs to be inserted.',),
-(u'Media',u'LastSequence',u'N',0,32767,None, None, None, None, u'File sequence number for the last file for this media.',),
-(u'Media',u'VolumeLabel',u'Y',None, None, None, None, u'Text',None, u'The label attributed to the volume.',),
-(u'ModuleComponents',u'Component',u'N',None, None, u'Component',1,u'Identifier',None, u'Component contained in the module.',),
-(u'ModuleComponents',u'Language',u'N',None, None, u'ModuleSignature',2,None, None, u'Default language ID for module (may be changed by transform).',),
-(u'ModuleComponents',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'Module containing the component.',),
-(u'ModuleSignature',u'Language',u'N',None, None, None, None, None, None, u'Default decimal language of module.',),
-(u'ModuleSignature',u'Version',u'N',None, None, None, None, u'Version',None, u'Version of the module.',),
-(u'ModuleSignature',u'ModuleID',u'N',None, None, None, None, u'Identifier',None, u'Module identifier (String.GUID).',),
-(u'ModuleDependency',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'Module requiring the dependency.',),
-(u'ModuleDependency',u'ModuleLanguage',u'N',None, None, u'ModuleSignature',2,None, None, u'Language of module requiring the dependency.',),
-(u'ModuleDependency',u'RequiredID',u'N',None, None, None, None, None, None, u'String.GUID of required module.',),
-(u'ModuleDependency',u'RequiredLanguage',u'N',None, None, None, None, None, None, u'LanguageID of the required module.',),
-(u'ModuleDependency',u'RequiredVersion',u'Y',None, None, None, None, u'Version',None, u'Version of the required version.',),
-(u'ModuleExclusion',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'String.GUID of module with exclusion requirement.',),
-(u'ModuleExclusion',u'ModuleLanguage',u'N',None, None, u'ModuleSignature',2,None, None, u'LanguageID of module with exclusion requirement.',),
-(u'ModuleExclusion',u'ExcludedID',u'N',None, None, None, None, None, None, u'String.GUID of excluded module.',),
-(u'ModuleExclusion',u'ExcludedLanguage',u'N',None, None, None, None, None, None, u'Language of excluded module.',),
-(u'ModuleExclusion',u'ExcludedMaxVersion',u'Y',None, None, None, None, u'Version',None, u'Maximum version of excluded module.',),
-(u'ModuleExclusion',u'ExcludedMinVersion',u'Y',None, None, None, None, u'Version',None, u'Minimum version of excluded module.',),
-(u'MoveFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'If this component is not "selected" for installation or removal, no action will be taken on the associated MoveFile entry',),
-(u'MoveFile',u'DestFolder',u'N',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory',),
-(u'MoveFile',u'DestName',u'Y',None, None, None, None, u'Filename',None, u'Name to be given to the original file after it is moved or copied. If blank, the destination file will be given the same name as the source file',),
-(u'MoveFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key that uniquely identifies a particular MoveFile record',),
-(u'MoveFile',u'Options',u'N',0,1,None, None, None, None, u'Integer value specifying the MoveFile operating mode, one of imfoEnum',),
-(u'MoveFile',u'SourceFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the source directory',),
-(u'MoveFile',u'SourceName',u'Y',None, None, None, None, u'Text',None, u"Name of the source file(s) to be moved or copied. Can contain the '*' or '?' wildcards.",),
-(u'MsiAssembly',u'Attributes',u'Y',None, None, None, None, None, None, u'Assembly attributes',),
-(u'MsiAssembly',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into Feature table.',),
-(u'MsiAssembly',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'MsiAssembly',u'File_Application',u'Y',None, None, u'File',1,u'Identifier',None, u'Foreign key into File table, denoting the application context for private assemblies. Null for global assemblies.',),
-(u'MsiAssembly',u'File_Manifest',u'Y',None, None, u'File',1,u'Identifier',None, u'Foreign key into the File table denoting the manifest file for the assembly.',),
-(u'MsiAssemblyName',u'Name',u'N',None, None, None, None, u'Text',None, u'The name part of the name-value pairs for the assembly name.',),
-(u'MsiAssemblyName',u'Value',u'N',None, None, None, None, u'Text',None, u'The value part of the name-value pairs for the assembly name.',),
-(u'MsiAssemblyName',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'MsiDigitalCertificate',u'CertData',u'N',None, None, None, None, u'Binary',None, u'A certificate context blob for a signer certificate',),
-(u'MsiDigitalCertificate',u'DigitalCertificate',u'N',None, None, None, None, u'Identifier',None, u'A unique identifier for the row',),
-(u'MsiDigitalSignature',u'Table',u'N',None, None, None, None, None, u'Media',u'Reference to another table name (only Media table is supported)',),
-(u'MsiDigitalSignature',u'DigitalCertificate_',u'N',None, None, u'MsiDigitalCertificate',1,u'Identifier',None, u'Foreign key to MsiDigitalCertificate table identifying the signer certificate',),
-(u'MsiDigitalSignature',u'Hash',u'Y',None, None, None, None, u'Binary',None, u'The encoded hash blob from the digital signature',),
-(u'MsiDigitalSignature',u'SignObject',u'N',None, None, None, None, u'Text',None, u'Foreign key to Media table',),
-(u'MsiFileHash',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Primary key, foreign key into File table referencing file with this hash',),
-(u'MsiFileHash',u'Options',u'N',0,32767,None, None, None, None, u'Various options and attributes for this hash.',),
-(u'MsiFileHash',u'HashPart1',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart2',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart3',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart4',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiPatchHeaders',u'StreamRef',u'N',None, None, None, None, u'Identifier',None, u'Primary key. A unique identifier for the row.',),
-(u'MsiPatchHeaders',u'Header',u'N',None, None, None, None, u'Binary',None, u'Binary stream. The patch header, used for patch validation.',),
-(u'ODBCAttribute',u'Value',u'Y',None, None, None, None, u'Text',None, u'Value for ODBC driver attribute',),
-(u'ODBCAttribute',u'Attribute',u'N',None, None, None, None, u'Text',None, u'Name of ODBC driver attribute',),
-(u'ODBCAttribute',u'Driver_',u'N',None, None, u'ODBCDriver',1,u'Identifier',None, u'Reference to ODBC driver in ODBCDriver table',),
-(u'ODBCDriver',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for driver, non-localized',),
-(u'ODBCDriver',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Reference to key driver file',),
-(u'ODBCDriver',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCDriver',u'Driver',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for driver',),
-(u'ODBCDriver',u'File_Setup',u'Y',None, None, u'File',1,u'Identifier',None, u'Optional reference to key driver setup DLL',),
-(u'ODBCDataSource',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for data source',),
-(u'ODBCDataSource',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCDataSource',u'DataSource',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for data source',),
-(u'ODBCDataSource',u'DriverDescription',u'N',None, None, None, None, u'Text',None, u'Reference to driver description, may be existing driver',),
-(u'ODBCDataSource',u'Registration',u'N',0,1,None, None, None, None, u'Registration option: 0=machine, 1=user, others t.b.d.',),
-(u'ODBCSourceAttribute',u'Value',u'Y',None, None, None, None, u'Text',None, u'Value for ODBC data source attribute',),
-(u'ODBCSourceAttribute',u'Attribute',u'N',None, None, None, None, u'Text',None, u'Name of ODBC data source attribute',),
-(u'ODBCSourceAttribute',u'DataSource_',u'N',None, None, u'ODBCDataSource',1,u'Identifier',None, u'Reference to ODBC data source in ODBCDataSource table',),
-(u'ODBCTranslator',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for translator',),
-(u'ODBCTranslator',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Reference to key translator file',),
-(u'ODBCTranslator',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCTranslator',u'File_Setup',u'Y',None, None, u'File',1,u'Identifier',None, u'Optional reference to key translator setup DLL',),
-(u'ODBCTranslator',u'Translator',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for translator',),
-(u'Patch',u'Sequence',u'N',0,32767,None, None, None, None, u'Primary key, sequence with respect to the media images; order must track cabinet order.',),
-(u'Patch',u'Attributes',u'N',0,32767,None, None, None, None, u'Integer containing bit flags representing patch attributes',),
-(u'Patch',u'File_',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token, foreign key to File table, must match identifier in cabinet.',),
-(u'Patch',u'Header',u'Y',None, None, None, None, u'Binary',None, u'Binary stream. The patch header, used for patch validation.',),
-(u'Patch',u'PatchSize',u'N',0,2147483647,None, None, None, None, u'Size of patch in bytes (long integer).',),
-(u'Patch',u'StreamRef_',u'Y',None, None, None, None, u'Identifier',None, u'Identifier. Foreign key to the StreamRef column of the MsiPatchHeaders table.',),
-(u'PatchPackage',u'Media_',u'N',0,32767,None, None, None, None, u'Foreign key to DiskId column of Media table. Indicates the disk containing the patch package.',),
-(u'PatchPackage',u'PatchId',u'N',None, None, None, None, u'Guid',None, u'A unique string GUID representing this patch.',),
-(u'PublishComponent',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into the Feature table.',),
-(u'PublishComponent',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table.',),
-(u'PublishComponent',u'ComponentId',u'N',None, None, None, None, u'Guid',None, u'A string GUID that represents the component id that will be requested by the alien product.',),
-(u'PublishComponent',u'AppData',u'Y',None, None, None, None, u'Text',None, u'This is localisable Application specific data that can be associated with a Qualified Component.',),
-(u'PublishComponent',u'Qualifier',u'N',None, None, None, None, u'Text',None, u'This is defined only when the ComponentId column is an Qualified Component Id. This is the Qualifier for ProvideComponentIndirect.',),
-(u'RadioButton',u'Y',u'N',0,32767,None, None, None, None, u'The vertical coordinate of the upper left corner of the bounding rectangle of the radio button.',),
-(u'RadioButton',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible title to be assigned to the radio button.',),
-(u'RadioButton',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this radio button. All the buttons tied to the same property become part of the same group.',),
-(u'RadioButton',u'Height',u'N',0,32767,None, None, None, None, u'The height of the button.',),
-(u'RadioButton',u'Width',u'N',0,32767,None, None, None, None, u'The width of the button.',),
-(u'RadioButton',u'X',u'N',0,32767,None, None, None, None, u'The horizontal coordinate of the upper left corner of the bounding rectangle of the radio button.',),
-(u'RadioButton',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this button. Selecting the button will set the associated property to this value.',),
-(u'RadioButton',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'RadioButton',u'Help',u'Y',None, None, None, None, u'Text',None, u'The help strings used with the button. The text is optional.',),
-(u'Registry',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'Registry',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The registry value.',),
-(u'Registry',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the registry value.',),
-(u'Registry',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'Registry',u'Registry',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'Registry',u'Root',u'N',-1,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.',),
-(u'RegLocator',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'RegLocator',u'Type',u'Y',0,18,None, None, None, None, u'An integer value that determines if the registry value is a filename or a directory location or to be used as is w/o interpretation.',),
-(u'RegLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table. If the type is 0, the registry values refers a directory, and _Signature is not a foreign key.',),
-(u'RegLocator',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'RegLocator',u'Root',u'N',0,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.',),
-(u'RemoveFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the file to be removed.',),
-(u'RemoveFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular file entry',),
-(u'RemoveFile',u'FileName',u'Y',None, None, None, None, u'WildCardFilename',None, u'Name of the file to be removed.',),
-(u'RemoveFile',u'DirProperty',u'N',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full pathname to the folder of the file to be removed.',),
-(u'RemoveFile',u'InstallMode',u'N',None, None, None, None, None, u'1;2;3',u'Installation option, one of iimEnum.',),
-(u'RemoveIniFile',u'Action',u'N',None, None, None, None, None, u'2;4',u'The type of modification to be made, one of iifEnum.',),
-(u'RemoveIniFile',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value to be deleted. The value is required when Action is iifIniRemoveTag',),
-(u'RemoveIniFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the deletion of the .INI value.',),
-(u'RemoveIniFile',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name in which to delete the information',),
-(u'RemoveIniFile',u'DirProperty',u'Y',None, None, None, None, u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the .INI file is.',),
-(u'RemoveIniFile',u'Key',u'N',None, None, None, None, u'Formatted',None, u'The .INI file key below Section.',),
-(u'RemoveIniFile',u'Section',u'N',None, None, None, None, u'Formatted',None, u'The .INI file Section.',),
-(u'RemoveIniFile',u'RemoveIniFile',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'RemoveRegistry',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'RemoveRegistry',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the deletion of the registry value.',),
-(u'RemoveRegistry',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'RemoveRegistry',u'Root',u'N',-1,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum',),
-(u'RemoveRegistry',u'RemoveRegistry',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ReserveCost',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reserve a specified amount of space if this component is to be installed.',),
-(u'ReserveCost',u'ReserveFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory',),
-(u'ReserveCost',u'ReserveKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key that uniquely identifies a particular ReserveCost record',),
-(u'ReserveCost',u'ReserveLocal',u'N',0,2147483647,None, None, None, None, u'Disk space to reserve if linked component is installed locally.',),
-(u'ReserveCost',u'ReserveSource',u'N',0,2147483647,None, None, None, None, u'Disk space to reserve if linked component is installed to run from the source location.',),
-(u'SelfReg',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key into the File table denoting the module that needs to be registered.',),
-(u'SelfReg',u'Cost',u'Y',0,32767,None, None, None, None, u'The cost of registering the module.',),
-(u'ServiceControl',u'Name',u'N',None, None, None, None, u'Formatted',None, u'Name of a service. /, \\, comma and space are invalid',),
-(u'ServiceControl',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table that controls the startup of the service',),
-(u'ServiceControl',u'Event',u'N',0,187,None, None, None, None, u'Bit field: Install: 0x1 = Start, 0x2 = Stop, 0x8 = Delete, Uninstall: 0x10 = Start, 0x20 = Stop, 0x80 = Delete',),
-(u'ServiceControl',u'ServiceControl',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ServiceControl',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'Arguments for the service. Separate by [~].',),
-(u'ServiceControl',u'Wait',u'Y',0,1,None, None, None, None, u'Boolean for whether to wait for the service to fully start',),
-(u'ServiceInstall',u'Name',u'N',None, None, None, None, u'Formatted',None, u'Internal Name of the Service',),
-(u'ServiceInstall',u'Description',u'Y',None, None, None, None, u'Text',None, u'Description of service.',),
-(u'ServiceInstall',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table that controls the startup of the service',),
-(u'ServiceInstall',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'Arguments to include in every start of the service, passed to WinMain',),
-(u'ServiceInstall',u'ServiceInstall',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ServiceInstall',u'Dependencies',u'Y',None, None, None, None, u'Formatted',None, u'Other services this depends on to start. Separate by [~], and end with [~][~]',),
-(u'ServiceInstall',u'DisplayName',u'Y',None, None, None, None, u'Formatted',None, u'External Name of the Service',),
-(u'ServiceInstall',u'ErrorControl',u'N',-2147483647,2147483647,None, None, None, None, u'Severity of error if service fails to start',),
-(u'ServiceInstall',u'LoadOrderGroup',u'Y',None, None, None, None, u'Formatted',None, u'LoadOrderGroup',),
-(u'ServiceInstall',u'Password',u'Y',None, None, None, None, u'Formatted',None, u'password to run service with. (with StartName)',),
-(u'ServiceInstall',u'ServiceType',u'N',-2147483647,2147483647,None, None, None, None, u'Type of the service',),
-(u'ServiceInstall',u'StartName',u'Y',None, None, None, None, u'Formatted',None, u'User or object name to run service as',),
-(u'ServiceInstall',u'StartType',u'N',0,4,None, None, None, None, u'Type of the service',),
-(u'Shortcut',u'Name',u'N',None, None, None, None, u'Filename',None, u'The name of the shortcut to be created.',),
-(u'Shortcut',u'Description',u'Y',None, None, None, None, u'Text',None, u'The description for the shortcut.',),
-(u'Shortcut',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table denoting the component whose selection gates the shortcut creation/deletion.',),
-(u'Shortcut',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Foreign key into the File table denoting the external icon file for the shortcut.',),
-(u'Shortcut',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'The icon index for the shortcut.',),
-(u'Shortcut',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the shortcut file is created.',),
-(u'Shortcut',u'Target',u'N',None, None, None, None, u'Shortcut',None, u'The shortcut target. This is usually a property that is expanded to a file or a folder that the shortcut points to.',),
-(u'Shortcut',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'The command-line arguments for the shortcut.',),
-(u'Shortcut',u'Shortcut',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'Shortcut',u'Hotkey',u'Y',0,32767,None, None, None, None, u'The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte. ',),
-(u'Shortcut',u'ShowCmd',u'Y',None, None, None, None, None, u'1;3;7',u'The show command for the application window.The following values may be used.',),
-(u'Shortcut',u'WkDir',u'Y',None, None, None, None, u'Identifier',None, u'Name of property defining location of working directory.',),
-(u'Signature',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The name of the file. This may contain a "short name|long name" pair.',),
-(u'Signature',u'Signature',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature represents a unique file signature.',),
-(u'Signature',u'Languages',u'Y',None, None, None, None, u'Language',None, u'The languages supported by the file.',),
-(u'Signature',u'MaxDate',u'Y',0,2147483647,None, None, None, None, u'The maximum creation date of the file.',),
-(u'Signature',u'MaxSize',u'Y',0,2147483647,None, None, None, None, u'The maximum size of the file. ',),
-(u'Signature',u'MaxVersion',u'Y',None, None, None, None, u'Text',None, u'The maximum version of the file.',),
-(u'Signature',u'MinDate',u'Y',0,2147483647,None, None, None, None, u'The minimum creation date of the file.',),
-(u'Signature',u'MinSize',u'Y',0,2147483647,None, None, None, None, u'The minimum size of the file.',),
-(u'Signature',u'MinVersion',u'Y',None, None, None, None, u'Text',None, u'The minimum version of the file.',),
-(u'TextStyle',u'TextStyle',u'N',None, None, None, None, u'Identifier',None, u'Name of the style. The primary key of this table. This name is embedded in the texts to indicate a style change.',),
-(u'TextStyle',u'Color',u'Y',0,16777215,None, None, None, None, u'A long integer indicating the color of the string in the RGB format (Red, Green, Blue each 0-255, RGB = R + 256*G + 256^2*B).',),
-(u'TextStyle',u'FaceName',u'N',None, None, None, None, u'Text',None, u'A string indicating the name of the font used. Required. The string must be at most 31 characters long.',),
-(u'TextStyle',u'Size',u'N',0,32767,None, None, None, None, u'The size of the font used. This size is given in our units (1/12 of the system font height). Assuming that the system font is set to 12 point size, this is equivalent to the point size.',),
-(u'TextStyle',u'StyleBits',u'Y',0,15,None, None, None, None, u'A combination of style bits.',),
-(u'TypeLib',u'Description',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'TypeLib',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the type library to be operational.',),
-(u'TypeLib',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'TypeLib',u'Directory_',u'Y',None, None, u'Directory',1,u'Identifier',None, u'Optional. The foreign key into the Directory table denoting the path to the help file for the type library.',),
-(u'TypeLib',u'Language',u'N',0,32767,None, None, None, None, u'The language of the library.',),
-(u'TypeLib',u'Version',u'Y',0,16777215,None, None, None, None, u'The version of the library. The minor version is in the lower 8 bits of the integer. The major version is in the next 16 bits. ',),
-(u'TypeLib',u'Cost',u'Y',0,2147483647,None, None, None, None, u'The cost associated with the registration of the typelib. This column is currently optional.',),
-(u'TypeLib',u'LibID',u'N',None, None, None, None, u'Guid',None, u'The GUID that represents the library.',),
-(u'UIText',u'Text',u'Y',None, None, None, None, u'Text',None, u'The localized version of the string.',),
-(u'UIText',u'Key',u'N',None, None, None, None, u'Identifier',None, u'A unique key that identifies the particular string.',),
-(u'Upgrade',u'Attributes',u'N',0,2147483647,None, None, None, None, u'The attributes of this product set.',),
-(u'Upgrade',u'Language',u'Y',None, None, None, None, u'Language',None, u'A comma-separated list of languages for either products in this set or products not in this set.',),
-(u'Upgrade',u'ActionProperty',u'N',None, None, None, None, u'UpperCase',None, u'The property to set when a product in this set is found.',),
-(u'Upgrade',u'Remove',u'Y',None, None, None, None, u'Formatted',None, u'The list of features to remove when uninstalling a product from this set. The default is "ALL".',),
-(u'Upgrade',u'UpgradeCode',u'N',None, None, None, None, u'Guid',None, u'The UpgradeCode GUID belonging to the products in this set.',),
-(u'Upgrade',u'VersionMax',u'Y',None, None, None, None, u'Text',None, u'The maximum ProductVersion of the products in this set. The set may or may not include products with this particular version.',),
-(u'Upgrade',u'VersionMin',u'Y',None, None, None, None, u'Text',None, u'The minimum ProductVersion of the products in this set. The set may or may not include products with this particular version.',),
-(u'Verb',u'Sequence',u'Y',0,32767,None, None, None, None, u'Order within the verbs for a particular extension. Also used simply to specify the default verb.',),
-(u'Verb',u'Argument',u'Y',None, None, None, None, u'Formatted',None, u'Optional value for the command arguments.',),
-(u'Verb',u'Extension_',u'N',None, None, u'Extension',1,u'Text',None, u'The extension associated with the table row.',),
-(u'Verb',u'Verb',u'N',None, None, None, None, u'Text',None, u'The verb for the command.',),
-(u'Verb',u'Command',u'Y',None, None, None, None, u'Formatted',None, u'The command text.',),
-]
diff --git a/Tools/msi/sequence.py b/Tools/msi/sequence.py
deleted file mode 100644
index 1138f7a234..0000000000
--- a/Tools/msi/sequence.py
+++ /dev/null
@@ -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']
diff --git a/Tools/msi/tcltk/tcltk.wixproj b/Tools/msi/tcltk/tcltk.wixproj
new file mode 100644
index 0000000000..f66fc14988
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk.wixproj
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{DB350600-186C-4E52-BA98-26A7CECB067F}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <!-- Shortcut validation is not necessary -->
+ <SuppressICEs>ICE43</SuppressICEs>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ <Compile Include="tcltk_reg.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(tcltkDir)bin\*.dll" Exclude="$(tcltkDir)bin\*g.dll">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)bin</TargetBase>
+ <Target_>DLLs\</Target_>
+ <Group>tcltk_dlls</Group>
+ </InstallFiles>
+
+ <InstallFiles Include="$(tcltkDir)lib\**\*">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)lib</TargetBase>
+ <Target_>tcl\</Target_>
+ <Group>tcltk_lib</Group>
+ </InstallFiles>
+
+ <InstallFiles Include="$(PySourcePath)Lib\tkinter\**\*;$(PySourcePath)Lib\idlelib\**\*;$(PySourcePath)Lib\turtledemo\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>tkinter_lib</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk.wxs b/Tools/msi/tcltk/tcltk.wxs
new file mode 100644
index 0000000000..eeae8e8b0d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk.wxs
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Property Id="PYTHON_EXE" Secure="yes">
+ <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
+ <FileSearch Name="python.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Property Id="PYTHONW_EXE" Secure="yes">
+ <ComponentSearch Id="PythonwExe" Guid="$(var.PythonwExeComponentGuid)">
+ <FileSearch Name="pythonw.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Condition Message="!(loc.NoPython)">PYTHON_EXE and PYTHONW_EXE</Condition>
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_extension" />
+ <ComponentGroupRef Id="tcltk_dlls" />
+ <ComponentGroupRef Id="tcltk_lib" />
+ <ComponentGroupRef Id="tkinter_lib" Primary="yes" />
+
+ <Component Id="idle_reg" Directory="InstallDirectory">
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
+ </Component>
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_lib" />
+ <ComponentGroupRef Id="idle_reg" />
+ </Feature>
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_lib" />
+
+ <Component Id="idle_shortcut" Directory="MenuDir">
+ <RegistryValue Root="HKMU" Key="[REGISTRYKEY]\IdleShortcuts" Type="integer" Value="1" KeyPath="yes" />
+ <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
+
+ <Shortcut Id="IDLE"
+ Directory="MenuDir"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ Target="[PYTHONW_EXE]"
+ Arguments='"[#Lib_idlelib_idle.pyw]"'
+ Icon="idle.exe"
+ WorkingDirectory="InstallDirectory">
+ <Icon Id="idle.exe" SourceFile="!(bindpath.src)Lib\idlelib\Icons\idle.ico" />
+ </Shortcut>
+ <Shortcut Id="pydoc.py"
+ Target="[PYTHON_EXE]"
+ Arguments='-m pydoc -b'
+ Name="!(loc.PyDocShortcutName)"
+ Description="!(loc.PyDocShortcutDescription)"
+ Icon="idle.exe"
+ WorkingDirectory="InstallDirectory" />
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_d.wixproj b/Tools/msi/tcltk/tcltk_d.wixproj
new file mode 100644
index 0000000000..3266190da0
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_d.wixproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{EDA1FA5A-E2AA-4EAF-B49B-87D981CD0F16}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk_d.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(tcltkDir)bin\*g.dll">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)bin</TargetBase>
+ <Target_>DLLs\</Target_>
+ <Group>tcltk_dlls_d</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk_d.wxs b/Tools/msi/tcltk/tcltk_d.wxs
new file mode 100644
index 0000000000..01d0d2439d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_d.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="tkinter_extension_d" />
+ <ComponentGroupRef Id="tcltk_dlls_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_en-US.wxl_template b/Tools/msi/tcltk/tcltk_en-US.wxl_template
new file mode 100644
index 0000000000..f40fd6239d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_en-US.wxl_template
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Tcl/Tk Support</String>
+ <String Id="ShortDescriptor">tcltk</String>
+ <String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
+ <String Id="ShortcutName">IDLE (Python {{ShortVersion}} {{Bitness}})</String>
+ <String Id="ShortcutDescription">Launches IDLE, the interactive environment for !(loc.ProductName).</String>
+ <String Id="PyDocShortcutName">Python {{ShortVersion}} Module Docs ({{Bitness}})</String>
+ <String Id="PyDocShortcutDescription">Start the !(loc.ProductName) documentation server.</String>
+ <String Id="EditMenu">&amp;Edit with IDLE</String>
+ <String Id="EditSubMenu">Edit with IDLE {{ShortVersion}} ({{Bitness}})</String>
+</WixLocalization>
diff --git a/Tools/msi/tcltk/tcltk_files.wxs b/Tools/msi/tcltk/tcltk_files.wxs
new file mode 100644
index 0000000000..0d1b4a93a3
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_files.wxs
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension">
+ <Component Id="_tkinter.pyd" Directory="DLLs" Guid="*">
+ <File Name="_tkinter.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_tkinter.lib" Directory="libs" Guid="*">
+ <File Name="_tkinter.lib" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension_symbols">
+ <Component Id="_tkinter.pdb" Directory="DLLs" Guid="*">
+ <File Name="_tkinter.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension_d">
+ <Component Id="_tkinter_d.pyd" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.pyd" />
+ </Component>
+ <Component Id="_tkinter_d.lib" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.lib" />
+ </Component>
+ <Component Id="_tkinter_d.pdb" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_pdb.wixproj b/Tools/msi/tcltk/tcltk_pdb.wixproj
new file mode 100644
index 0000000000..3370798a05
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{02053AFA-1831-499A-B3EA-D8B223D3C40D}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk_pdb.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk_pdb.wxs b/Tools/msi/tcltk/tcltk_pdb.wxs
new file mode 100644
index 0000000000..04454f3849
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="tkinter_extension_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_reg.wxs b/Tools/msi/tcltk/tcltk_reg.wxs
new file mode 100644
index 0000000000..2778bcc806
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_reg.wxs
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="idle_reg">
+ <!-- We fix the guid of the Subcommands key so that it is correctly reference counted -->
+ <Component Id="assoc_subcommands" Directory="InstallDirectory" Guid="{57D47B4C-96E6-40A0-A958-57083D74423F}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+ <Component Id="assoc_subcommands_nocon" Directory="InstallDirectory" Guid="{07061D85-9151-4FC4-BB78-13628020D026}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+
+ <Component Id="assoc_editwithidle" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+
+ <Component Id="assoc_editwithidle_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/test/test.wixproj b/Tools/msi/test/test.wixproj
new file mode 100644
index 0000000000..8347e3f1d3
--- /dev/null
+++ b/Tools/msi/test/test.wixproj
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{DE0B7CC2-4358-4131-B3F4-C31C7F2CD468}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)Lib\test\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>test_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test.wxs b/Tools/msi/test/test.wxs
new file mode 100644
index 0000000000..f2ed64f07b
--- /dev/null
+++ b/Tools/msi/test/test.wxs
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="test_py" />
+ <ComponentGroupRef Id="test_extensions" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/test/test_d.wixproj b/Tools/msi/test/test_d.wixproj
new file mode 100644
index 0000000000..33b04be1fe
--- /dev/null
+++ b/Tools/msi/test/test_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{41F5AE8D-24CD-4D03-BE75-AA6F7FAB4097}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test_d.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test_d.wxs b/Tools/msi/test/test_d.wxs
new file mode 100644
index 0000000000..a954876755
--- /dev/null
+++ b/Tools/msi/test/test_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="test_extensions_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/test/test_en-US.wxl b/Tools/msi/test/test_en-US.wxl
new file mode 100644
index 0000000000..e615c7a6b7
--- /dev/null
+++ b/Tools/msi/test/test_en-US.wxl
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Test Suite</String>
+ <String Id="ShortDescriptor">test</String>
+ <String Id="NativeModulesTitle">!(loc.FullProductName) native libtest</String>
+ <String Id="NativeModulesDescription">!(loc.ProductName) Native Test Modules</String>
+</WixLocalization>
diff --git a/Tools/msi/test/test_files.wxs b/Tools/msi/test/test_files.wxs
new file mode 100644
index 0000000000..e803aa0f55
--- /dev/null
+++ b/Tools/msi/test/test_files.wxs
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="test_extensions">
+ <Component Id="_testcapi.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testcapi.pyd" Name="_testcapi.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_ctypes_test.pyd" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test.pyd" Name="_ctypes_test.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testbuffer.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer.pyd" Name="_testbuffer.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testimportmultiple.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple.pyd" Name="_testimportmultiple.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testmultiphase.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase.pyd" Name="_testmultiphase.pyd" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="test_extensions_symbols">
+ <Component Id="_testcapi.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testcapi.pdb" Name="_testcapi.pdb" />
+ </Component>
+ <Component Id="_ctypes_test.pdb" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test.pdb" Name="_ctypes_test.pdb" />
+ </Component>
+ <Component Id="_testbuffer.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer.pdb" Name="_testbuffer.pdb" />
+ </Component>
+ <Component Id="_testimportmultiple.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple.pdb" Name="_testimportmultiple.pdb" />
+ </Component>
+ <Component Id="_testmultiphase.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase.pdb" Name="_testmultiphase.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="test_extensions_d">
+ <Component Id="_testcapi_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testcapi_d.pyd" Name="_testcapi_d.pyd" />
+ </Component>
+ <Component Id="_ctypes_test_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test_d.pyd" Name="_ctypes_test_d.pyd" />
+ </Component>
+ <Component Id="_testbuffer_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer_d.pyd" Name="_testbuffer_d.pyd" />
+ </Component>
+ <Component Id="_testimportmultiple_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple_d.pyd" Name="_testimportmultiple_d.pyd" />
+ </Component>
+ <Component Id="_testmultiphase_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase_d.pyd" Name="_testmultiphase_d.pyd" />
+ </Component>
+ <Component Id="_testcapi_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testcapi_d.pdb" Name="_testcapi_d.pdb" />
+ </Component>
+ <Component Id="_ctypes_test_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test_d.pdb" Name="_ctypes_test_d.pdb" />
+ </Component>
+ <Component Id="_testbuffer_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer_d.pdb" Name="_testbuffer_d.pdb" />
+ </Component>
+ <Component Id="_testimportmultiple_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple_d.pdb" Name="_testimportmultiple_d.pdb" />
+ </Component>
+ <Component Id="_testmultiphase_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase_d.pdb" Name="_testmultiphase_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/test/test_pdb.wixproj b/Tools/msi/test/test_pdb.wixproj
new file mode 100644
index 0000000000..965f0edd9b
--- /dev/null
+++ b/Tools/msi/test/test_pdb.wixproj
@@ -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>{7CF48ADD-CFAA-499F-9A05-BA18440A3344}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test_pdb.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test_pdb.wxs b/Tools/msi/test/test_pdb.wxs
new file mode 100644
index 0000000000..de634a390b
--- /dev/null
+++ b/Tools/msi/test/test_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="test_extensions_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/testrelease.bat b/Tools/msi/testrelease.bat
new file mode 100644
index 0000000000..a989575ed6
--- /dev/null
+++ b/Tools/msi/testrelease.bat
@@ -0,0 +1,117 @@
+@setlocal enableextensions
+@echo off
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set TARGETDIR=%TEMP%
+set TESTX86=
+set TESTX64=
+set TESTALLUSER=
+set TESTPERUSER=
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
+if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
+if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
+if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
+if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
+if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
+
+if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
+if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
+
+
+if defined TESTX86 (
+ for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
+ if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
+ if errorlevel 1 exit /B
+ if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
+ if errorlevel 1 exit /B
+ )
+)
+
+if defined TESTX64 (
+ for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
+ if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
+ if errorlevel 1 exit /B
+ if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
+ if errorlevel 1 exit /B
+ )
+)
+
+exit /B 0
+
+:test
+@setlocal
+@echo on
+
+@if not exist "%~1" exit /B 1
+
+@set EXE=%~1
+@if not "%EXE:embed=%"=="%EXE%" exit /B 0
+
+@set EXITCODE=0
+@echo Installing %1 into %2
+"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
+
+@if not errorlevel 1 (
+ @echo Printing version
+ "%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
+)
+
+@if not errorlevel 1 (
+ @echo Capturing Start Menu
+ @dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
+ @dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
+
+ @echo Capturing registry
+ @for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
+ echo %%f >> "%~2\hkcr.txt"
+ reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
+ )
+ @reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
+ @reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
+ @reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
+ cmd /k exit 0
+)
+
+@if not errorlevel 1 (
+ @echo Installing package
+ "%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
+ @if not errorlevel 1 (
+ "%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
+ )
+)
+@if not errorlevel 1 (
+ @echo Testing Tcl/tk
+ @set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
+ "%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
+ @set TCL_LIBRARY=
+)
+
+@set EXITCODE=%ERRORLEVEL%
+
+@echo Result was %EXITCODE%
+@echo Removing %1
+"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
+
+@echo off
+exit /B %EXITCODE%
+
+:Help
+echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
+echo.
+echo --target (-t) Specify the target directory for installs and logs
+echo -x86 Run tests for x86 installers
+echo -x64 Run tests for x64 installers
+echo --alluser (-a) Run tests for all-user installs (requires Administrator)
+echo --peruser (-p) Run tests for per-user installs
+echo -h Display this help information
+echo.
+echo If no test architecture is specified, all architectures will be tested.
+echo If no install type is selected, all install types will be tested.
+echo.
diff --git a/Tools/msi/tools/tools.wixproj b/Tools/msi/tools/tools.wixproj
new file mode 100644
index 0000000000..f43cf3309e
--- /dev/null
+++ b/Tools/msi/tools/tools.wixproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{24CBEB95-BC1E-4EA9-AEA9-33834BCCD0EC}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tools</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tools.wxs" />
+ <Compile Include="tools_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <ToolDirectories Include="scripts;i18n;pynche;pynche\X;demo" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)Tools\scripts\**\*.py;
+ $(PySourcePath)Tools\scripts\**\*.pyw;
+ $(PySourcePath)Tools\scripts\**\*.txt;
+ $(PySourcePath)Tools\i18n\**\*.py;
+ $(PySourcePath)Tools\i18n\**\*.pyw;
+ $(PySourcePath)Tools\i18n\**\*.txt;
+ $(PySourcePath)Tools\pynche\**\*.py;
+ $(PySourcePath)Tools\pynche\**\*.pyw;
+ $(PySourcePath)Tools\pynche\**\*.txt;
+ $(PySourcePath)Tools\demo\**\*.py;
+ $(PySourcePath)Tools\demo\**\*.pyw;
+ $(PySourcePath)Tools\demo\**\*.txt;
+ $(PySourcePath)Tools\parser\**\*.py">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>tools_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tools/tools.wxs b/Tools/msi/tools/tools.wxs
new file mode 100644
index 0000000000..8f8418a46c
--- /dev/null
+++ b/Tools/msi/tools/tools.wxs
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tools_py" />
+ <ComponentGroupRef Id="tools_scripts" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tools/tools_en-US.wxl b/Tools/msi/tools/tools_en-US.wxl
new file mode 100644
index 0000000000..a1384177ea
--- /dev/null
+++ b/Tools/msi/tools/tools_en-US.wxl
@@ -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">Utility Scripts</String>
+ <String Id="ShortDescriptor">tools</String>
+</WixLocalization>
diff --git a/Tools/msi/tools/tools_files.wxs b/Tools/msi/tools/tools_files.wxs
new file mode 100644
index 0000000000..3ae0db2e1f
--- /dev/null
+++ b/Tools/msi/tools/tools_files.wxs
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="tools_scripts">
+ <Component Id="Tools_scripts_2to3.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_2to3.py" Name="2to3.py" Source="!(bindpath.src)Tools\scripts\2to3" />
+ </Component>
+ <Component Id="Tools_scripts_pydoc3.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_pydoc3.py" Name="pydoc3.py" Source="!(bindpath.src)Tools\scripts\pydoc3" />
+ </Component>
+ <Component Id="Tools_scripts_pyvenv.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_pyvenv.py" Name="pyvenv.py" Source="!(bindpath.src)Tools\scripts\pyvenv" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/uisample.py b/Tools/msi/uisample.py
deleted file mode 100644
index 543080554e..0000000000
--- a/Tools/msi/uisample.py
+++ /dev/null
@@ -1,1400 +0,0 @@
-
-import msilib,os;dirname=os.path.dirname(__file__)
-AdminExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(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),
-]
-
-AdminUISequence = [
-(u'AdminWelcomeDlg', None, 1230),
-(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'PrepareDlg', None, 140),
-(u'ProgressDlg', None, 1280),
-(u'UserExit', None, -2),
-]
-
-AdvtExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'CreateShortcuts', None, 4500),
-(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),
-]
-
-BBControl = [
-]
-
-Billboard = [
-]
-
-Binary = [
-(u'bannrbmp', msilib.Binary(os.path.join(dirname,"bannrbmp.bin"))),
-(u'completi', msilib.Binary(os.path.join(dirname,"completi.bin"))),
-(u'custicon', msilib.Binary(os.path.join(dirname,"custicon.bin"))),
-(u'dlgbmp', msilib.Binary(os.path.join(dirname,"dlgbmp.bin"))),
-(u'exclamic', msilib.Binary(os.path.join(dirname,"exclamic.bin"))),
-(u'info', msilib.Binary(os.path.join(dirname,"info.bin"))),
-(u'insticon', msilib.Binary(os.path.join(dirname,"insticon.bin"))),
-(u'New', msilib.Binary(os.path.join(dirname,"New.bin"))),
-(u'removico', msilib.Binary(os.path.join(dirname,"removico.bin"))),
-(u'repairic', msilib.Binary(os.path.join(dirname,"repairic.bin"))),
-(u'Up', msilib.Binary(os.path.join(dirname,"Up.bin"))),
-]
-
-CheckBox = [
-]
-
-Property = [
-(u'BannerBitmap', u'bannrbmp'),
-(u'IAgree', u'No'),
-(u'ProductID', u'none'),
-(u'ARPHELPLINK', u'http://www.microsoft.com/management'),
-(u'ButtonText_Back', u'< &Back'),
-(u'ButtonText_Browse', u'Br&owse'),
-(u'ButtonText_Cancel', u'Cancel'),
-(u'ButtonText_Exit', u'&Exit'),
-(u'ButtonText_Finish', u'&Finish'),
-(u'ButtonText_Ignore', u'&Ignore'),
-(u'ButtonText_Install', u'&Install'),
-(u'ButtonText_Next', u'&Next >'),
-(u'ButtonText_No', u'&No'),
-(u'ButtonText_OK', u'OK'),
-(u'ButtonText_Remove', u'&Remove'),
-(u'ButtonText_Repair', u'&Repair'),
-(u'ButtonText_Reset', u'&Reset'),
-(u'ButtonText_Resume', u'&Resume'),
-(u'ButtonText_Retry', u'&Retry'),
-(u'ButtonText_Return', u'&Return'),
-(u'ButtonText_Yes', u'&Yes'),
-(u'CompleteSetupIcon', u'completi'),
-(u'ComponentDownload', u'ftp://anonymous@microsoft.com/components/'),
-(u'CustomSetupIcon', u'custicon'),
-(u'DefaultUIFont', u'DlgFont8'),
-(u'DialogBitmap', u'dlgbmp'),
-(u'DlgTitleFont', u'{&DlgFontBold8}'),
-(u'ErrorDialog', u'ErrorDlg'),
-(u'ExclamationIcon', u'exclamic'),
-(u'InfoIcon', u'info'),
-(u'InstallerIcon', u'insticon'),
-(u'INSTALLLEVEL', u'3'),
-(u'InstallMode', u'Typical'),
-(u'PIDTemplate', u'12345<###-%%%%%%%>@@@@@'),
-#(u'ProductLanguage', u'1033'),
-(u'Progress1', u'Installing'),
-(u'Progress2', u'installs'),
-(u'PROMPTROLLBACKCOST', u'P'),
-(u'RemoveIcon', u'removico'),
-(u'RepairIcon', u'repairic'),
-(u'Setup', u'Setup'),
-(u'ShowUserRegistrationDlg', u'1'),
-(u'Wizard', u'Setup Wizard'),
-]
-
-ComboBox = [
-]
-
-Control = [
-(u'AdminWelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'AdminWelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminWelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'AdminWelcomeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will create a server image of [ProductName], at a specified network location. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'AdminWelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'AdminWelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminWelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'ExitDialog', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'ExitDialog', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ExitDialog', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'ExitDialog', u'Description', u'Text', 135, 70, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'ExitDialog', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Completing the [ProductName] [Wizard]', None, None),
-(u'ExitDialog', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'ExitDialog', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'FatalError', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'FatalError', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'FatalError', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'FatalError', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}[ProductName] [Wizard] ended prematurely', None, None),
-(u'FatalError', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'FatalError', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'FatalError', u'Description1', u'Text', 135, 70, 220, 40, 196611, None, u'[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.', None, None),
-(u'FatalError', u'Description2', u'Text', 135, 115, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'PrepareDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Cancel', None),
-(u'PrepareDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'PrepareDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'PrepareDlg', u'Description', u'Text', 135, 70, 220, 20, 196611, None, u'Please wait while the [Wizard] prepares to guide you through the installation.', None, None),
-(u'PrepareDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'PrepareDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', None, None),
-(u'PrepareDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', None, None),
-(u'PrepareDlg', u'ActionData', u'Text', 135, 125, 220, 30, 196611, None, None, None, None),
-(u'PrepareDlg', u'ActionText', u'Text', 135, 100, 220, 20, 196611, None, None, None, None),
-(u'ProgressDlg', u'Text', u'Text', 35, 65, 300, 20, 3, None, u'Please wait while the [Wizard] [Progress2] [ProductName]. This may take several minutes.', None, None),
-(u'ProgressDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'ProgressDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'ProgressDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ProgressDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'ProgressDlg', u'Title', u'Text', 20, 15, 200, 15, 196611, None, u'[DlgTitleFont][Progress1] [ProductName]', None, None),
-(u'ProgressDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'ProgressDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'ProgressDlg', u'ActionText', u'Text', 70, 100, 265, 10, 3, None, None, None, None),
-(u'ProgressDlg', u'ProgressBar', u'ProgressBar', 35, 115, 300, 10, 65537, None, u'Progress done', None, None),
-(u'ProgressDlg', u'StatusLabel', u'Text', 35, 100, 35, 10, 3, None, u'Status:', None, None),
-(u'UserExit', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'UserExit', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'UserExit', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'UserExit', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}[ProductName] [Wizard] was interrupted', None, None),
-(u'UserExit', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'UserExit', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'UserExit', u'Description1', u'Text', 135, 70, 220, 40, 196611, None, u'[ProductName] setup was interrupted. Your system has not been modified. To install this program at a later time, please run the installation again.', None, None),
-(u'UserExit', u'Description2', u'Text', 135, 115, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'AdminBrowseDlg', u'Up', u'PushButton', 298, 55, 19, 19, 3670019, None, u'Up', u'NewFolder', u'Up One Level|'),
-(u'AdminBrowseDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'PathEdit', None),
-(u'AdminBrowseDlg', u'PathEdit', u'PathEdit', 84, 202, 261, 17, 3, u'TARGETDIR', None, u'OK', None),
-(u'AdminBrowseDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminBrowseDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminBrowseDlg', u'Cancel', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'ComboLabel', None),
-(u'AdminBrowseDlg', u'ComboLabel', u'Text', 25, 58, 44, 10, 3, None, u'&Look in:', u'DirectoryCombo', None),
-(u'AdminBrowseDlg', u'DirectoryCombo', u'DirectoryCombo', 70, 55, 220, 80, 458755, u'TARGETDIR', None, u'Up', None),
-(u'AdminBrowseDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Browse to the destination folder', None, None),
-(u'AdminBrowseDlg', u'DirectoryList', u'DirectoryList', 25, 83, 320, 110, 7, u'TARGETDIR', None, u'PathLabel', None),
-(u'AdminBrowseDlg', u'PathLabel', u'Text', 25, 205, 59, 10, 3, None, u'&Folder name:', u'BannerBitmap', None),
-(u'AdminBrowseDlg', u'NewFolder', u'PushButton', 325, 55, 19, 19, 3670019, None, u'New', u'DirectoryList', u'Create A New Folder|'),
-(u'AdminBrowseDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'Cancel', None),
-(u'AdminBrowseDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Change current destination folder', None, None),
-(u'AdminInstallPointDlg', u'Text', u'Text', 25, 80, 320, 10, 3, None, u'&Enter a new network location or click Browse to browse to one.', u'PathEdit', None),
-(u'AdminInstallPointDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Text', None),
-(u'AdminInstallPointDlg', u'PathEdit', u'PathEdit', 25, 93, 320, 18, 3, u'TARGETDIR', None, u'Browse', None),
-(u'AdminInstallPointDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminInstallPointDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminInstallPointDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'AdminInstallPointDlg', u'Description', u'Text', 25, 20, 280, 20, 196611, None, u'Please specify a network location for the server image of [ProductName] product', None, None),
-(u'AdminInstallPointDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Network Location', None, None),
-(u'AdminInstallPointDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminInstallPointDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'AdminInstallPointDlg', u'Browse', u'PushButton', 289, 119, 56, 17, 3, None, u'[ButtonText_Browse]', u'Back', None),
-(u'AdminRegistrationDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OrganizationLabel', None),
-(u'AdminRegistrationDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminRegistrationDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminRegistrationDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'AdminRegistrationDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please enter your company information', None, None),
-(u'AdminRegistrationDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Company Information', None, None),
-(u'AdminRegistrationDlg', u'Back', u'PushButton', 180, 243, 56, 17, 65539, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminRegistrationDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'AdminRegistrationDlg', u'OrganizationLabel', u'Text', 45, 71, 285, 30, 3, None, u'&Please enter the name of your organization in the box below. This will be used as default company name for subsequent installations of [ProductName]:', u'OrganizationEdit', None),
-(u'AdminRegistrationDlg', u'CDKeyEdit', u'MaskedEdit', 45, 143, 250, 16, 3, u'PIDKEY', u'[PIDTemplate]', u'Back', None),
-(u'AdminRegistrationDlg', u'CDKeyLabel', u'Text', 45, 130, 50, 10, 3, None, u'CD &Key:', u'CDKeyEdit', None),
-(u'AdminRegistrationDlg', u'OrganizationEdit', u'Edit', 45, 105, 220, 18, 3, u'COMPANYNAME', u'{80}', u'CDKeyLabel', None),
-(u'BrowseDlg', u'Up', u'PushButton', 298, 55, 19, 19, 3670019, None, u'Up', u'NewFolder', u'Up One Level|'),
-(u'BrowseDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'PathEdit', None),
-(u'BrowseDlg', u'PathEdit', u'PathEdit', 84, 202, 261, 18, 11, u'_BrowseProperty', None, u'OK', None),
-(u'BrowseDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'BrowseDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'BrowseDlg', u'Cancel', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'ComboLabel', None),
-(u'BrowseDlg', u'ComboLabel', u'Text', 25, 58, 44, 10, 3, None, u'&Look in:', u'DirectoryCombo', None),
-(u'BrowseDlg', u'DirectoryCombo', u'DirectoryCombo', 70, 55, 220, 80, 393227, u'_BrowseProperty', None, u'Up', None),
-(u'BrowseDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Browse to the destination folder', None, None),
-(u'BrowseDlg', u'DirectoryList', u'DirectoryList', 25, 83, 320, 110, 15, u'_BrowseProperty', None, u'PathLabel', None),
-(u'BrowseDlg', u'PathLabel', u'Text', 25, 205, 59, 10, 3, None, u'&Folder name:', u'BannerBitmap', None),
-(u'BrowseDlg', u'NewFolder', u'PushButton', 325, 55, 19, 19, 3670019, None, u'New', u'DirectoryList', u'Create A New Folder|'),
-(u'BrowseDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'Cancel', None),
-(u'BrowseDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Change current destination folder', None, None),
-(u'CancelDlg', u'Text', u'Text', 48, 15, 194, 30, 3, None, u'Are you sure you want to cancel [ProductName] installation?', None, None),
-(u'CancelDlg', u'Icon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[InfoIcon]', None, u'Information icon|'),
-(u'CancelDlg', u'No', u'PushButton', 132, 57, 56, 17, 3, None, u'[ButtonText_No]', u'Yes', None),
-(u'CancelDlg', u'Yes', u'PushButton', 72, 57, 56, 17, 3, None, u'[ButtonText_Yes]', u'No', None),
-(u'CustomizeDlg', u'Text', u'Text', 25, 55, 320, 20, 3, None, u'Click on the icons in the tree below to change the way features will be installed.', None, None),
-(u'CustomizeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Tree', None),
-(u'CustomizeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'CustomizeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'CustomizeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'CustomizeDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Select the way you want features to be installed.', None, None),
-(u'CustomizeDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Custom Setup', None, None),
-(u'CustomizeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'CustomizeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'CustomizeDlg', u'Browse', u'PushButton', 304, 200, 56, 17, 3, None, u'[ButtonText_Browse]', u'Reset', None),
-(u'CustomizeDlg', u'Tree', u'SelectionTree', 25, 85, 175, 95, 7, u'_BrowseProperty', u'Tree of selections', u'Browse', None),
-(u'CustomizeDlg', u'Box', u'GroupBox', 210, 81, 140, 98, 1, None, None, None, None),
-(u'CustomizeDlg', u'Reset', u'PushButton', 42, 243, 56, 17, 3, None, u'[ButtonText_Reset]', u'DiskCost', None),
-(u'CustomizeDlg', u'DiskCost', u'PushButton', 111, 243, 56, 17, 3, None, u'Disk &Usage', u'Back', None),
-(u'CustomizeDlg', u'ItemDescription', u'Text', 215, 90, 131, 30, 3, None, u'Multiline description of the currently selected item.', None, None),
-(u'CustomizeDlg', u'ItemSize', u'Text', 215, 130, 131, 45, 3, None, u'The size of the currently selected item.', None, None),
-(u'CustomizeDlg', u'Location', u'Text', 75, 200, 215, 20, 3, None, u"<The selection's path>", None, None),
-(u'CustomizeDlg', u'LocationLabel', u'Text', 25, 200, 50, 10, 3, None, u'Location:', None, None),
-(u'DiskCostDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes (if any) do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'DiskCostDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OK', None),
-(u'DiskCostDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'DiskCostDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'DiskCostDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'The disk space required for the installation of the selected features.', None, None),
-(u'DiskCostDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'BannerBitmap', None),
-(u'DiskCostDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Disk Space Requirements', None, None),
-(u'DiskCostDlg', u'VolumeList', u'VolumeCostList', 20, 100, 330, 120, 393223, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'ErrorDlg', u'Y', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Yes]', None, None),
-(u'ErrorDlg', u'A', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Cancel]', None, None),
-(u'ErrorDlg', u'C', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Cancel]', None, None),
-(u'ErrorDlg', u'ErrorIcon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[InfoIcon]', None, u'Information icon|'),
-(u'ErrorDlg', u'ErrorText', u'Text', 48, 15, 205, 60, 3, None, u'Information text', None, None),
-(u'ErrorDlg', u'I', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Ignore]', None, None),
-(u'ErrorDlg', u'N', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_No]', None, None),
-(u'ErrorDlg', u'O', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_OK]', None, None),
-(u'ErrorDlg', u'R', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Retry]', None, None),
-(u'FilesInUse', u'Text', u'Text', 20, 55, 330, 30, 3, None, u'The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.', None, None),
-(u'FilesInUse', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Retry', None),
-(u'FilesInUse', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'FilesInUse', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'FilesInUse', u'Description', u'Text', 20, 23, 280, 20, 196611, None, u'Some files that need to be updated are currently in use.', None, None),
-(u'FilesInUse', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Files in Use', None, None),
-(u'FilesInUse', u'Retry', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Retry]', u'Ignore', None),
-(u'FilesInUse', u'Exit', u'PushButton', 166, 243, 56, 17, 3, None, u'[ButtonText_Exit]', u'BannerBitmap', None),
-(u'FilesInUse', u'Ignore', u'PushButton', 235, 243, 56, 17, 3, None, u'[ButtonText_Ignore]', u'Exit', None),
-(u'FilesInUse', u'List', u'ListBox', 20, 87, 330, 130, 7, u'FileInUseProcess', None, None, None),
-(u'LicenseAgreementDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'AgreementText', None),
-(u'LicenseAgreementDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'LicenseAgreementDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'LicenseAgreementDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'LicenseAgreementDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please read the following license agreement carefully', None, None),
-(u'LicenseAgreementDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]End-User License Agreement', None, None),
-(u'LicenseAgreementDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'LicenseAgreementDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'LicenseAgreementDlg', u'AgreementText', u'ScrollableText', 20, 60, 330, 120, 7, None, u'{\\rtf1\\ansi\\ansicpg1252\\deff0\\deftab720{\\fonttbl{\\f0\\froman\\fprq2 Times New Roman;}}{\\colortbl\\red0\\green0\\blue0;} \\deflang1033\\horzdoc{\\*\\fchars }{\\*\\lchars }\\pard\\plain\\f0\\fs20 <Your license agreement should go here.>\\par }', u'Buttons', None),
-(u'LicenseAgreementDlg', u'Buttons', u'RadioButtonGroup', 20, 187, 330, 40, 3, u'IAgree', None, u'Back', None),
-(u'MaintenanceTypeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'ChangeLabel', None),
-(u'MaintenanceTypeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'MaintenanceTypeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'MaintenanceTypeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'MaintenanceTypeDlg', u'Description', u'Text', 25, 23, 280, 20, 196611, None, u'Select the operation you wish to perform.', None, None),
-(u'MaintenanceTypeDlg', u'Title', u'Text', 15, 6, 240, 15, 196611, None, u'[DlgTitleFont]Modify, Repair or Remove installation', None, None),
-(u'MaintenanceTypeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'MaintenanceTypeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'MaintenanceTypeDlg', u'ChangeLabel', u'Text', 105, 65, 100, 10, 3, None, u'[DlgTitleFont]&Modify', u'ChangeButton', None),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'PushButton', 50, 65, 38, 38, 5767171, None, u'[CustomSetupIcon]', u'RepairLabel', u'Modify Installation|'),
-(u'MaintenanceTypeDlg', u'RepairLabel', u'Text', 105, 114, 100, 10, 3, None, u'[DlgTitleFont]Re&pair', u'RepairButton', None),
-(u'MaintenanceTypeDlg', u'ChangeText', u'Text', 105, 78, 230, 20, 3, None, u'Allows users to change the way features are installed.', None, None),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'PushButton', 50, 163, 38, 38, 5767171, None, u'[RemoveIcon]', u'Back', u'Remove Installation|'),
-(u'MaintenanceTypeDlg', u'RemoveLabel', u'Text', 105, 163, 100, 10, 3, None, u'[DlgTitleFont]&Remove', u'RemoveButton', None),
-(u'MaintenanceTypeDlg', u'RemoveText', u'Text', 105, 176, 230, 20, 3, None, u'Removes [ProductName] from your computer.', None, None),
-(u'MaintenanceTypeDlg', u'RepairButton', u'PushButton', 50, 114, 38, 38, 5767171, None, u'[RepairIcon]', u'RemoveLabel', u'Repair Installation|'),
-(u'MaintenanceTypeDlg', u'RepairText', u'Text', 105, 127, 230, 30, 3, None, u'Repairs errors in the most recent installation state - fixes missing or corrupt files, shortcuts and registry entries.', None, None),
-(u'MaintenanceWelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'MaintenanceWelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'MaintenanceWelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'MaintenanceWelcomeDlg', u'Description', u'Text', 135, 70, 220, 60, 196611, None, u'The [Wizard] will allow you to change the way [ProductName] features are installed on your computer or even to remove [ProductName] from your computer. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'MaintenanceWelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'MaintenanceWelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'MaintenanceWelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'OutOfDiskDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'OutOfDiskDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OK', None),
-(u'OutOfDiskDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'OutOfDiskDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'OutOfDiskDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'Disk space required for the installation exceeds available disk space.', None, None),
-(u'OutOfDiskDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'BannerBitmap', None),
-(u'OutOfDiskDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Out of Disk Space', None, None),
-(u'OutOfDiskDlg', u'VolumeList', u'VolumeCostList', 20, 100, 330, 120, 393223, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'OutOfRbDiskDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'OutOfRbDiskDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'No', None),
-(u'OutOfRbDiskDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'OutOfRbDiskDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'OutOfRbDiskDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'Disk space required for the installation exceeds available disk space.', None, None),
-(u'OutOfRbDiskDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Out of Disk Space', None, None),
-(u'OutOfRbDiskDlg', u'No', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_No]', u'Yes', None),
-(u'OutOfRbDiskDlg', u'Yes', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Yes]', u'BannerBitmap', None),
-(u'OutOfRbDiskDlg', u'VolumeList', u'VolumeCostList', 20, 140, 330, 80, 4587527, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'OutOfRbDiskDlg', u'Text2', u'Text', 20, 94, 330, 40, 3, None, u"Alternatively, you may choose to disable the installer's rollback functionality. This allows the installer to restore your computer's original state should the installation be interrupted in any way. Click Yes if you wish to take the risk to disable rollback.", None, None),
-(u'ResumeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'ResumeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ResumeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'ResumeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will complete the installation of [ProductName] on your computer. Click Install to continue or Cancel to exit the [Wizard].', None, None),
-(u'ResumeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Resuming the [ProductName] [Wizard]', None, None),
-(u'ResumeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Install', None),
-(u'ResumeDlg', u'Install', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Install]', u'Cancel', None),
-(u'SetupTypeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'TypicalLabel', None),
-(u'SetupTypeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'SetupTypeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'SetupTypeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'SetupTypeDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Choose the setup type that best suits your needs', None, None),
-(u'SetupTypeDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Choose Setup Type', None, None),
-(u'SetupTypeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'SetupTypeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'SetupTypeDlg', u'TypicalLabel', u'Text', 105, 65, 100, 10, 3, None, u'[DlgTitleFont]&Typical', u'TypicalButton', None),
-(u'SetupTypeDlg', u'CompleteButton', u'PushButton', 50, 171, 38, 38, 5767171, None, u'[CompleteSetupIcon]', u'Back', u'Complete Installation|'),
-(u'SetupTypeDlg', u'CompleteLabel', u'Text', 105, 171, 100, 10, 3, None, u'[DlgTitleFont]C&omplete', u'CompleteButton', None),
-(u'SetupTypeDlg', u'CompleteText', u'Text', 105, 184, 230, 20, 3, None, u'All program features will be installed. (Requires most disk space)', None, None),
-(u'SetupTypeDlg', u'CustomButton', u'PushButton', 50, 118, 38, 38, 5767171, None, u'[CustomSetupIcon]', u'CompleteLabel', u'Custom Installation|'),
-(u'SetupTypeDlg', u'CustomLabel', u'Text', 105, 118, 100, 10, 3, None, u'[DlgTitleFont]C&ustom', u'CustomButton', None),
-(u'SetupTypeDlg', u'CustomText', u'Text', 105, 131, 230, 30, 3, None, u'Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users.', None, None),
-(u'SetupTypeDlg', u'TypicalButton', u'PushButton', 50, 65, 38, 38, 5767171, None, u'[InstallerIcon]', u'CustomLabel', u'Typical Installation|'),
-(u'SetupTypeDlg', u'TypicalText', u'Text', 105, 78, 230, 20, 3, None, u'Installs the most common program features. Recommended for most users.', None, None),
-(u'UserRegistrationDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'NameLabel', None),
-(u'UserRegistrationDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'UserRegistrationDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'UserRegistrationDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'UserRegistrationDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please enter your customer information', None, None),
-(u'UserRegistrationDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Customer Information', None, None),
-(u'UserRegistrationDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'UserRegistrationDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'UserRegistrationDlg', u'OrganizationLabel', u'Text', 45, 110, 100, 15, 3, None, u'&Organization:', u'OrganizationEdit', None),
-(u'UserRegistrationDlg', u'CDKeyEdit', u'MaskedEdit', 45, 159, 250, 16, 3, u'PIDKEY', u'[PIDTemplate]', u'Back', None),
-(u'UserRegistrationDlg', u'CDKeyLabel', u'Text', 45, 147, 50, 10, 3, None, u'CD &Key:', u'CDKeyEdit', None),
-(u'UserRegistrationDlg', u'OrganizationEdit', u'Edit', 45, 122, 220, 18, 3, u'COMPANYNAME', u'{80}', u'CDKeyLabel', None),
-(u'UserRegistrationDlg', u'NameLabel', u'Text', 45, 73, 100, 15, 3, None, u'&User Name:', u'NameEdit', None),
-(u'UserRegistrationDlg', u'NameEdit', u'Edit', 45, 85, 220, 18, 3, u'USERNAME', u'{80}', u'OrganizationLabel', None),
-(u'VerifyReadyDlg', u'Text', u'Text', 25, 70, 320, 20, 3, None, u'Click Install to begin the installation. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyReadyDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyReadyDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyReadyDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyReadyDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyReadyDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'The [Wizard] is ready to begin the [InstallMode] installation', None, None),
-(u'VerifyReadyDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Ready to Install', None, None),
-(u'VerifyReadyDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Install', None),
-(u'VerifyReadyDlg', u'Install', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Install]', u'Cancel', None),
-(u'VerifyRemoveDlg', u'Text', u'Text', 25, 70, 320, 30, 3, None, u'Click Remove to remove [ProductName] from your computer. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyRemoveDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyRemoveDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyRemoveDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyRemoveDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyRemoveDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'You have chosen to remove the program from your computer.', None, None),
-(u'VerifyRemoveDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Remove [ProductName]', None, None),
-(u'VerifyRemoveDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Remove', None),
-(u'VerifyRemoveDlg', u'Remove', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Remove]', u'Cancel', None),
-(u'VerifyRepairDlg', u'Text', u'Text', 25, 70, 320, 30, 3, None, u'Click Repair to repair the installation of [ProductName]. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyRepairDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyRepairDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyRepairDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyRepairDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyRepairDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'The [Wizard] is ready to begin the repair of [ProductName].', None, None),
-(u'VerifyRepairDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Repair [ProductName]', None, None),
-(u'VerifyRepairDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Repair', None),
-(u'VerifyRepairDlg', u'Repair', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Repair]', u'Cancel', None),
-(u'WaitForCostingDlg', u'Text', u'Text', 48, 15, 194, 30, 3, None, u'Please wait while the installer finishes determining your disk space requirements.', None, None),
-(u'WaitForCostingDlg', u'Icon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[ExclamationIcon]', None, u'Exclamation icon|'),
-(u'WaitForCostingDlg', u'Return', u'PushButton', 102, 57, 56, 17, 3, None, u'[ButtonText_Return]', None, None),
-(u'WelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'WelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'WelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'WelcomeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will install [ProductName] on your computer. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'WelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'WelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'WelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-]
-
-ListBox = [
-]
-
-ActionText = [
-(u'InstallValidate', u'Validating install', None),
-(u'InstallFiles', u'Copying new files', u'File: [1], Directory: [9], Size: [6]'),
-(u'InstallAdminPackage', u'Copying network install files', u'File: [1], Directory: [9], Size: [6]'),
-(u'FileCost', u'Computing space requirements', None),
-(u'CostInitialize', u'Computing space requirements', None),
-(u'CostFinalize', u'Computing space requirements', None),
-(u'CreateShortcuts', u'Creating shortcuts', u'Shortcut: [1]'),
-(u'PublishComponents', u'Publishing Qualified Components', u'Component ID: [1], Qualifier: [2]'),
-(u'PublishFeatures', u'Publishing Product Features', u'Feature: [1]'),
-(u'PublishProduct', u'Publishing product information', None),
-(u'RegisterClassInfo', u'Registering Class servers', u'Class Id: [1]'),
-(u'RegisterExtensionInfo', u'Registering extension servers', u'Extension: [1]'),
-(u'RegisterMIMEInfo', u'Registering MIME info', u'MIME Content Type: [1], Extension: [2]'),
-(u'RegisterProgIdInfo', u'Registering program identifiers', u'ProgId: [1]'),
-(u'AllocateRegistrySpace', u'Allocating registry space', u'Free space: [1]'),
-(u'AppSearch', u'Searching for installed applications', u'Property: [1], Signature: [2]'),
-(u'BindImage', u'Binding executables', u'File: [1]'),
-(u'CCPSearch', u'Searching for qualifying products', None),
-(u'CreateFolders', u'Creating folders', u'Folder: [1]'),
-(u'DeleteServices', u'Deleting services', u'Service: [1]'),
-(u'DuplicateFiles', u'Creating duplicate files', u'File: [1], Directory: [9], Size: [6]'),
-(u'FindRelatedProducts', u'Searching for related applications', u'Found application: [1]'),
-(u'InstallODBC', u'Installing ODBC components', None),
-(u'InstallServices', u'Installing new services', u'Service: [2]'),
-(u'LaunchConditions', u'Evaluating launch conditions', None),
-(u'MigrateFeatureStates', u'Migrating feature states from related applications', u'Application: [1]'),
-(u'MoveFiles', u'Moving files', u'File: [1], Directory: [9], Size: [6]'),
-(u'PatchFiles', u'Patching files', u'File: [1], Directory: [2], Size: [3]'),
-(u'ProcessComponents', u'Updating component registration', None),
-(u'RegisterComPlus', u'Registering COM+ Applications and Components', u'AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}}'),
-(u'RegisterFonts', u'Registering fonts', u'Font: [1]'),
-(u'RegisterProduct', u'Registering product', u'[1]'),
-(u'RegisterTypeLibraries', u'Registering type libraries', u'LibID: [1]'),
-(u'RegisterUser', u'Registering user', u'[1]'),
-(u'RemoveDuplicateFiles', u'Removing duplicated files', u'File: [1], Directory: [9]'),
-(u'RemoveEnvironmentStrings', u'Updating environment strings', u'Name: [1], Value: [2], Action [3]'),
-(u'RemoveExistingProducts', u'Removing applications', u'Application: [1], Command line: [2]'),
-(u'RemoveFiles', u'Removing files', u'File: [1], Directory: [9]'),
-(u'RemoveFolders', u'Removing folders', u'Folder: [1]'),
-(u'RemoveIniValues', u'Removing INI files entries', u'File: [1], Section: [2], Key: [3], Value: [4]'),
-(u'RemoveODBC', u'Removing ODBC components', None),
-(u'RemoveRegistryValues', u'Removing system registry values', u'Key: [1], Name: [2]'),
-(u'RemoveShortcuts', u'Removing shortcuts', u'Shortcut: [1]'),
-(u'RMCCPSearch', u'Searching for qualifying products', None),
-(u'SelfRegModules', u'Registering modules', u'File: [1], Folder: [2]'),
-(u'SelfUnregModules', u'Unregistering modules', u'File: [1], Folder: [2]'),
-(u'SetODBCFolders', u'Initializing ODBC directories', None),
-(u'StartServices', u'Starting services', u'Service: [1]'),
-(u'StopServices', u'Stopping services', u'Service: [1]'),
-(u'UnpublishComponents', u'Unpublishing Qualified Components', u'Component ID: [1], Qualifier: [2]'),
-(u'UnpublishFeatures', u'Unpublishing Product Features', u'Feature: [1]'),
-(u'UnregisterClassInfo', u'Unregister Class servers', u'Class Id: [1]'),
-(u'UnregisterComPlus', u'Unregistering COM+ Applications and Components', u'AppId: [1]{{, AppType: [2]}}'),
-(u'UnregisterExtensionInfo', u'Unregistering extension servers', u'Extension: [1]'),
-(u'UnregisterFonts', u'Unregistering fonts', u'Font: [1]'),
-(u'UnregisterMIMEInfo', u'Unregistering MIME info', u'MIME Content Type: [1], Extension: [2]'),
-(u'UnregisterProgIdInfo', u'Unregistering program identifiers', u'ProgId: [1]'),
-(u'UnregisterTypeLibraries', u'Unregistering type libraries', u'LibID: [1]'),
-(u'WriteEnvironmentStrings', u'Updating environment strings', u'Name: [1], Value: [2], Action [3]'),
-(u'WriteIniValues', u'Writing INI files values', u'File: [1], Section: [2], Key: [3], Value: [4]'),
-(u'WriteRegistryValues', u'Writing system registry values', u'Key: [1], Name: [2], Value: [3]'),
-(u'Advertise', u'Advertising application', None),
-(u'GenerateScript', u'Generating script operations for action:', u'[1]'),
-(u'InstallSFPCatalogFile', u'Installing system catalog', u'File: [1], Dependencies: [2]'),
-(u'MsiPublishAssemblies', u'Publishing assembly information', u'Application Context:[1], Assembly Name:[2]'),
-(u'MsiUnpublishAssemblies', u'Unpublishing assembly information', u'Application Context:[1], Assembly Name:[2]'),
-(u'Rollback', u'Rolling back action:', u'[1]'),
-(u'RollbackCleanup', u'Removing backup files', u'File: [1]'),
-(u'UnmoveFiles', u'Removing moved files', u'File: [1], Directory: [9]'),
-(u'UnpublishProduct', u'Unpublishing product information', None),
-]
-
-ControlCondition = [
-(u'CustomizeDlg', u'Browse', u'Hide', u'Installed'),
-(u'CustomizeDlg', u'Location', u'Hide', u'Installed'),
-(u'CustomizeDlg', u'LocationLabel', u'Hide', u'Installed'),
-(u'LicenseAgreementDlg', u'Next', u'Disable', u'IAgree <> "Yes"'),
-(u'LicenseAgreementDlg', u'Next', u'Enable', u'IAgree = "Yes"'),
-]
-
-ControlEvent = [
-(u'AdminWelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminWelcomeDlg', u'Next', u'NewDialog', u'AdminRegistrationDlg', u'1', 2),
-(u'AdminWelcomeDlg', u'Next', u'[InstallMode]', u'Server Image', u'1', 1),
-(u'ExitDialog', u'Finish', u'EndDialog', u'Return', u'1', None),
-(u'FatalError', u'Finish', u'EndDialog', u'Exit', u'1', None),
-(u'PrepareDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'ProgressDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'UserExit', u'Finish', u'EndDialog', u'Exit', u'1', None),
-(u'AdminBrowseDlg', u'Up', u'DirectoryListUp', u'0', u'1', None),
-(u'AdminBrowseDlg', u'Cancel', u'Reset', u'0', u'1', 1),
-(u'AdminBrowseDlg', u'Cancel', u'EndDialog', u'Return', u'1', 2),
-(u'AdminBrowseDlg', u'NewFolder', u'DirectoryListNew', u'0', u'1', None),
-(u'AdminBrowseDlg', u'OK', u'EndDialog', u'Return', u'1', 2),
-(u'AdminBrowseDlg', u'OK', u'SetTargetPath', u'TARGETDIR', u'1', 1),
-(u'AdminInstallPointDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminInstallPointDlg', u'Back', u'NewDialog', u'AdminRegistrationDlg', u'1', None),
-(u'AdminInstallPointDlg', u'Next', u'SetTargetPath', u'TARGETDIR', u'1', 1),
-(u'AdminInstallPointDlg', u'Next', u'NewDialog', u'VerifyReadyDlg', u'1', 2),
-(u'AdminInstallPointDlg', u'Browse', u'SpawnDialog', u'AdminBrowseDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Back', u'NewDialog', u'AdminWelcomeDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Next', u'NewDialog', u'AdminInstallPointDlg', u'ProductID', 2),
-(u'AdminRegistrationDlg', u'Next', u'ValidateProductID', u'0', u'0', 1),
-(u'BrowseDlg', u'Up', u'DirectoryListUp', u'0', u'1', None),
-(u'BrowseDlg', u'Cancel', u'Reset', u'0', u'1', 1),
-(u'BrowseDlg', u'Cancel', u'EndDialog', u'Return', u'1', 2),
-(u'BrowseDlg', u'NewFolder', u'DirectoryListNew', u'0', u'1', None),
-(u'BrowseDlg', u'OK', u'EndDialog', u'Return', u'1', 2),
-(u'BrowseDlg', u'OK', u'SetTargetPath', u'[_BrowseProperty]', u'1', 1),
-(u'CancelDlg', u'No', u'EndDialog', u'Return', u'1', None),
-(u'CancelDlg', u'Yes', u'EndDialog', u'Exit', u'1', None),
-(u'CustomizeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'CustomizeDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'InstallMode = "Change"', None),
-(u'CustomizeDlg', u'Back', u'NewDialog', u'SetupTypeDlg', u'InstallMode = "Custom"', None),
-(u'CustomizeDlg', u'Next', u'NewDialog', u'VerifyReadyDlg', u'1', None),
-(u'CustomizeDlg', u'Browse', u'SelectionBrowse', u'BrowseDlg', u'1', None),
-(u'CustomizeDlg', u'Reset', u'Reset', u'0', u'1', None),
-(u'CustomizeDlg', u'DiskCost', u'SpawnDialog', u'DiskCostDlg', u'1', 2),
-(u'DiskCostDlg', u'OK', u'EndDialog', u'Return', u'1', None),
-(u'ErrorDlg', u'Y', u'EndDialog', u'ErrorYes', u'1', None),
-(u'ErrorDlg', u'A', u'EndDialog', u'ErrorAbort', u'1', None),
-(u'ErrorDlg', u'C', u'EndDialog', u'ErrorCancel', u'1', None),
-(u'ErrorDlg', u'I', u'EndDialog', u'ErrorIgnore', u'1', None),
-(u'ErrorDlg', u'N', u'EndDialog', u'ErrorNo', u'1', None),
-(u'ErrorDlg', u'O', u'EndDialog', u'ErrorOk', u'1', None),
-(u'ErrorDlg', u'R', u'EndDialog', u'ErrorRetry', u'1', None),
-(u'FilesInUse', u'Retry', u'EndDialog', u'Retry', u'1', None),
-(u'FilesInUse', u'Exit', u'EndDialog', u'Exit', u'1', None),
-(u'FilesInUse', u'Ignore', u'EndDialog', u'Ignore', u'1', None),
-(u'LicenseAgreementDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'LicenseAgreementDlg', u'Back', u'NewDialog', u'WelcomeDlg', u'1', None),
-(u'LicenseAgreementDlg', u'Next', u'NewDialog', u'SetupTypeDlg', u'IAgree = "Yes" AND ShowUserRegistrationDlg <> 1', 3),
-(u'LicenseAgreementDlg', u'Next', u'NewDialog', u'UserRegistrationDlg', u'IAgree = "Yes" AND ShowUserRegistrationDlg = 1', 1),
-(u'LicenseAgreementDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 2),
-(u'MaintenanceTypeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'MaintenanceTypeDlg', u'Back', u'NewDialog', u'MaintenanceWelcomeDlg', u'1', None),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'NewDialog', u'CustomizeDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[InstallMode]', u'Change', u'1', 1),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[Progress1]', u'Changing', u'1', 2),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[Progress2]', u'changes', u'1', 3),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'NewDialog', u'VerifyRemoveDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[InstallMode]', u'Remove', u'1', 1),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[Progress1]', u'Removing', u'1', 2),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[Progress2]', u'removes', u'1', 3),
-(u'MaintenanceTypeDlg', u'RepairButton', u'NewDialog', u'VerifyRepairDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[InstallMode]', u'Repair', u'1', 1),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress1]', u'Repairing', u'1', 2),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress2]', u'repairs', u'1', 3),
-(u'MaintenanceWelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'MaintenanceWelcomeDlg', u'Next', u'NewDialog', u'MaintenanceTypeDlg', u'1', 2),
-(u'MaintenanceWelcomeDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 1),
-(u'OutOfDiskDlg', u'OK', u'EndDialog', u'Return', u'1', None),
-(u'OutOfRbDiskDlg', u'No', u'EndDialog', u'Return', u'1', None),
-(u'OutOfRbDiskDlg', u'Yes', u'EndDialog', u'Return', u'1', 2),
-(u'OutOfRbDiskDlg', u'Yes', u'EnableRollback', u'False', u'1', 1),
-(u'ResumeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'ResumeDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'ResumeDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 2),
-(u'ResumeDlg', u'Install', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 6),
-(u'ResumeDlg', u'Install', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 3),
-(u'ResumeDlg', u'Install', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 1),
-(u'ResumeDlg', u'Install', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'SetupTypeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'SetupTypeDlg', u'Back', u'NewDialog', u'LicenseAgreementDlg', u'ShowUserRegistrationDlg <> 1', None),
-(u'SetupTypeDlg', u'Back', u'NewDialog', u'UserRegistrationDlg', u'ShowUserRegistrationDlg = 1', None),
-(u'SetupTypeDlg', u'CompleteButton', u'NewDialog', u'VerifyReadyDlg', u'1', 3),
-(u'SetupTypeDlg', u'CompleteButton', u'[InstallMode]', u'Complete', u'1', 1),
-(u'SetupTypeDlg', u'CompleteButton', u'SetInstallLevel', u'1000', u'1', 2),
-(u'SetupTypeDlg', u'CustomButton', u'NewDialog', u'CustomizeDlg', u'1', 2),
-(u'SetupTypeDlg', u'CustomButton', u'[InstallMode]', u'Custom', u'1', 1),
-(u'SetupTypeDlg', u'TypicalButton', u'NewDialog', u'VerifyReadyDlg', u'1', 3),
-(u'SetupTypeDlg', u'TypicalButton', u'[InstallMode]', u'Typical', u'1', 1),
-(u'SetupTypeDlg', u'TypicalButton', u'SetInstallLevel', u'3', u'1', 2),
-(u'UserRegistrationDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'UserRegistrationDlg', u'Back', u'NewDialog', u'LicenseAgreementDlg', u'1', None),
-(u'UserRegistrationDlg', u'Next', u'NewDialog', u'SetupTypeDlg', u'ProductID', 3),
-(u'UserRegistrationDlg', u'Next', u'ValidateProductID', u'0', u'0', 1),
-(u'UserRegistrationDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 2),
-(u'VerifyReadyDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'AdminInstallPointDlg', u'InstallMode = "Server Image"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'CustomizeDlg', u'InstallMode = "Custom" OR InstallMode = "Change"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'InstallMode = "Repair"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'SetupTypeDlg', u'InstallMode = "Typical" OR InstallMode = "Complete"', None),
-(u'VerifyReadyDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 3),
-(u'VerifyReadyDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 1),
-(u'VerifyReadyDlg', u'Install', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 5),
-(u'VerifyReadyDlg', u'Install', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 2),
-(u'VerifyReadyDlg', u'Install', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'VerifyRemoveDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyRemoveDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'1', None),
-(u'VerifyRemoveDlg', u'Remove', u'Remove', u'All', u'OutOfDiskSpace <> 1', 1),
-(u'VerifyRemoveDlg', u'Remove', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'VerifyRemoveDlg', u'Remove', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 2),
-(u'VerifyRemoveDlg', u'Remove', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 6),
-(u'VerifyRemoveDlg', u'Remove', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 3),
-(u'VerifyRemoveDlg', u'Remove', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'VerifyRepairDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyRepairDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'1', None),
-(u'VerifyRepairDlg', u'Repair', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'VerifyRepairDlg', u'Repair', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 3),
-(u'VerifyRepairDlg', u'Repair', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 7),
-(u'VerifyRepairDlg', u'Repair', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 4),
-(u'VerifyRepairDlg', u'Repair', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 6),
-(u'VerifyRepairDlg', u'Repair', u'Reinstall', u'All', u'OutOfDiskSpace <> 1', 2),
-(u'VerifyRepairDlg', u'Repair', u'ReinstallMode', u'ecmus', u'OutOfDiskSpace <> 1', 1),
-(u'WaitForCostingDlg', u'Return', u'EndDialog', u'Exit', u'1', None),
-(u'WelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'WelcomeDlg', u'Next', u'NewDialog', u'LicenseAgreementDlg', u'1', None),
-]
-
-Dialog = [
-(u'AdminWelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-(u'ExitDialog', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'FatalError', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'PrepareDlg', 50, 50, 370, 270, 1, u'[ProductName] [Setup]', u'Cancel', u'Cancel', u'Cancel'),
-(u'ProgressDlg', 50, 50, 370, 270, 1, u'[ProductName] [Setup]', u'Cancel', u'Cancel', u'Cancel'),
-(u'UserExit', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'AdminBrowseDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'PathEdit', u'OK', u'Cancel'),
-(u'AdminInstallPointDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Text', u'Next', u'Cancel'),
-(u'AdminRegistrationDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OrganizationLabel', u'Next', u'Cancel'),
-(u'BrowseDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'PathEdit', u'OK', u'Cancel'),
-(u'CancelDlg', 50, 10, 260, 85, 3, u'[ProductName] [Setup]', u'No', u'No', u'No'),
-(u'CustomizeDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Tree', u'Next', u'Cancel'),
-(u'DiskCostDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OK', u'OK', u'OK'),
-(u'ErrorDlg', 50, 10, 270, 105, 65539, u'Installer Information', u'ErrorText', None, None),
-(u'FilesInUse', 50, 50, 370, 270, 19, u'[ProductName] [Setup]', u'Retry', u'Retry', u'Retry'),
-(u'LicenseAgreementDlg', 50, 50, 370, 270, 3, u'[ProductName] License Agreement', u'Buttons', u'Next', u'Cancel'),
-(u'MaintenanceTypeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'ChangeLabel', u'ChangeButton', u'Cancel'),
-(u'MaintenanceWelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-(u'OutOfDiskDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OK', u'OK', u'OK'),
-(u'OutOfRbDiskDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'No', u'No', u'No'),
-(u'ResumeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Install', u'Install', u'Cancel'),
-(u'SetupTypeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'TypicalLabel', u'TypicalButton', u'Cancel'),
-(u'UserRegistrationDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'NameLabel', u'Next', u'Cancel'),
-(u'VerifyReadyDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Install', u'Install', u'Cancel'),
-(u'VerifyRemoveDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Back', u'Back', u'Cancel'),
-(u'VerifyRepairDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Repair', u'Repair', u'Cancel'),
-(u'WaitForCostingDlg', 50, 10, 260, 85, 3, u'[ProductName] [Setup]', u'Return', u'Return', u'Return'),
-(u'WelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-]
-
-EventMapping = [
-(u'PrepareDlg', u'ActionData', u'ActionData', u'Text'),
-(u'PrepareDlg', u'ActionText', u'ActionText', u'Text'),
-(u'ProgressDlg', u'ActionText', u'ActionText', u'Text'),
-(u'ProgressDlg', u'ProgressBar', u'SetProgress', u'Progress'),
-(u'AdminBrowseDlg', u'DirectoryCombo', u'IgnoreChange', u'IgnoreChange'),
-(u'BrowseDlg', u'DirectoryCombo', u'IgnoreChange', u'IgnoreChange'),
-(u'CustomizeDlg', u'Next', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'Reset', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'DiskCost', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'ItemDescription', u'SelectionDescription', u'Text'),
-(u'CustomizeDlg', u'ItemSize', u'SelectionSize', u'Text'),
-(u'CustomizeDlg', u'Location', u'SelectionPath', u'Text'),
-(u'CustomizeDlg', u'Location', u'SelectionPathOn', u'Visible'),
-(u'CustomizeDlg', u'LocationLabel', u'SelectionPathOn', u'Visible'),
-]
-
-InstallExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(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'CreateShortcuts', None, 4500),
-(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'ValidateProductID', None, 700),
-(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'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'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'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'PrepareDlg', None, 140),
-(u'ProgressDlg', None, 1280),
-#(u'UserExit', None, -2),
-(u'MaintenanceWelcomeDlg', u'Installed AND NOT RESUME AND NOT Preselected', 1250),
-(u'ResumeDlg', u'Installed AND (RESUME OR Preselected)', 1240),
-(u'WelcomeDlg', u'NOT Installed', 1230),
-#(u'AppSearch', None, 400),
-#(u'CCPSearch', u'NOT Installed', 500),
-#(u'FindRelatedProducts', None, 200),
-#(u'LaunchConditions', None, 100),
-#(u'MigrateFeatureStates', None, 1200),
-#(u'RMCCPSearch', u'NOT Installed', 600),
-]
-
-ListView = [
-]
-
-RadioButton = [
-(u'IAgree', 1, u'Yes', 5, 0, 250, 15, u'{\\DlgFont8}I &accept the terms in the License Agreement', None),
-(u'IAgree', 2, u'No', 5, 20, 250, 15, u'{\\DlgFont8}I &do not accept the terms in the License Agreement', None),
-]
-
-TextStyle = [
-(u'DlgFont8', u'Tahoma', 8, None, 0),
-(u'DlgFontBold8', u'Tahoma', 8, None, 1),
-(u'VerdanaBold13', u'Verdana', 13, None, 1),
-]
-
-UIText = [
-(u'AbsentPath', None),
-(u'bytes', u'bytes'),
-(u'GB', u'GB'),
-(u'KB', u'KB'),
-(u'MB', u'MB'),
-(u'MenuAbsent', u'Entire feature will be unavailable'),
-(u'MenuAdvertise', u'Feature will be installed when required'),
-(u'MenuAllCD', u'Entire feature will be installed to run from CD'),
-(u'MenuAllLocal', u'Entire feature will be installed on local hard drive'),
-(u'MenuAllNetwork', u'Entire feature will be installed to run from network'),
-(u'MenuCD', u'Will be installed to run from CD'),
-(u'MenuLocal', u'Will be installed on local hard drive'),
-(u'MenuNetwork', u'Will be installed to run from network'),
-(u'ScriptInProgress', u'Gathering required information...'),
-(u'SelAbsentAbsent', u'This feature will remain uninstalled'),
-(u'SelAbsentAdvertise', u'This feature will be set to be installed when required'),
-(u'SelAbsentCD', u'This feature will be installed to run from CD'),
-(u'SelAbsentLocal', u'This feature will be installed on the local hard drive'),
-(u'SelAbsentNetwork', u'This feature will be installed to run from the network'),
-(u'SelAdvertiseAbsent', u'This feature will become unavailable'),
-(u'SelAdvertiseAdvertise', u'Will be installed when required'),
-(u'SelAdvertiseCD', u'This feature will be available to run from CD'),
-(u'SelAdvertiseLocal', u'This feature will be installed on your local hard drive'),
-(u'SelAdvertiseNetwork', u'This feature will be available to run from the network'),
-(u'SelCDAbsent', u"This feature will be uninstalled completely, you won't be able to run it from CD"),
-(u'SelCDAdvertise', u'This feature will change from run from CD state to set to be installed when required'),
-(u'SelCDCD', u'This feature will remain to be run from CD'),
-(u'SelCDLocal', u'This feature will change from run from CD state to be installed on the local hard drive'),
-(u'SelChildCostNeg', u'This feature frees up [1] on your hard drive.'),
-(u'SelChildCostPos', u'This feature requires [1] on your hard drive.'),
-(u'SelCostPending', u'Compiling cost for this feature...'),
-(u'SelLocalAbsent', u'This feature will be completely removed'),
-(u'SelLocalAdvertise', u'This feature will be removed from your local hard drive, but will be set to be installed when required'),
-(u'SelLocalCD', u'This feature will be removed from your local hard drive, but will be still available to run from CD'),
-(u'SelLocalLocal', u'This feature will remain on you local hard drive'),
-(u'SelLocalNetwork', u'This feature will be removed from your local hard drive, but will be still available to run from the network'),
-(u'SelNetworkAbsent', u"This feature will be uninstalled completely, you won't be able to run it from the network"),
-(u'SelNetworkAdvertise', u'This feature will change from run from network state to set to be installed when required'),
-(u'SelNetworkLocal', u'This feature will change from run from network state to be installed on the local hard drive'),
-(u'SelNetworkNetwork', u'This feature will remain to be run from the network'),
-(u'SelParentCostNegNeg', u'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
-(u'SelParentCostNegPos', u'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
-(u'SelParentCostPosNeg', u'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
-(u'SelParentCostPosPos', u'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
-(u'TimeRemaining', u'Time remaining: {[1] minutes }{[2] seconds}'),
-(u'VolumeCostAvailable', u'Available'),
-(u'VolumeCostDifference', u'Difference'),
-(u'VolumeCostRequired', u'Required'),
-(u'VolumeCostSize', u'Disk Size'),
-(u'VolumeCostVolume', u'Volume'),
-]
-
-_Validation = [
-(u'AdminExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdminExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdminExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AdminUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdminUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdminUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'Condition', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Expression evaluated to determine if Level in the Feature table is to change.'),
-(u'Condition', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Reference to a Feature entry in Feature table.'),
-(u'Condition', u'Level', u'N', 0, 32767, None, None, None, None, u'New selection Level to set in Feature table if Condition evaluates to TRUE.'),
-(u'AdvtExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdvtExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdvtExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'BBControl', u'Type', u'N', None, None, None, None, u'Identifier', None, u'The type of the control.'),
-(u'BBControl', u'BBControl', u'N', None, None, None, None, u'Identifier', None, u'Name of the control. This name must be unique within a billboard, but can repeat on different billboard.'),
-(u'BBControl', u'Billboard_', u'N', None, None, u'Billboard', 1, u'Identifier', None, u'External key to the Billboard table, name of the billboard.'),
-(u'BBControl', u'X', u'N', 0, 32767, None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'BBControl', u'Y', u'N', 0, 32767, None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'BBControl', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the control.'),
-(u'BBControl', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the control.'),
-(u'BBControl', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.'),
-(u'BBControl', u'Text', u'Y', None, None, None, None, u'Text', None, u'A string used to set the initial text contained within a control (if appropriate).'),
-(u'Billboard', u'Action', u'Y', None, None, None, None, u'Identifier', None, u'The name of an action. The billboard is displayed during the progress messages received from this action.'),
-(u'Billboard', u'Billboard', u'N', None, None, None, None, u'Identifier', None, u'Name of the billboard.'),
-(u'Billboard', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'An external key to the Feature Table. The billboard is shown only if this feature is being installed.'),
-(u'Billboard', u'Ordering', u'Y', 0, 32767, None, None, None, None, u'A positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.'),
-(u'Binary', u'Name', u'N', None, None, None, None, u'Identifier', None, u'Unique key identifying the binary data.'),
-(u'Binary', u'Data', u'N', None, None, None, None, u'Binary', None, u'The unformatted binary data.'),
-(u'CheckBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to the item.'),
-(u'CheckBox', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value string associated with the item.'),
-(u'Property', u'Property', u'N', None, None, None, None, u'Identifier', None, u'Name of property, uppercase if settable by launcher or loader.'),
-(u'Property', u'Value', u'N', None, None, None, None, u'Text', None, u'String value for property. Never null or empty.'),
-(u'ComboBox', u'Text', u'Y', None, None, None, None, u'Formatted', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ComboBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same combobox.'),
-(u'ComboBox', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ComboBox', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list.\tThe integers do not have to be consecutive.'),
-(u'Control', u'Type', u'N', None, None, None, None, u'Identifier', None, u'The type of the control.'),
-(u'Control', u'X', u'N', 0, 32767, None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'Control', u'Y', u'N', 0, 32767, None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'Control', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the control.'),
-(u'Control', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the control.'),
-(u'Control', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.'),
-(u'Control', u'Text', u'Y', None, None, None, None, u'Formatted', None, u'A string used to set the initial text contained within a control (if appropriate).'),
-(u'Control', u'Property', u'Y', None, None, None, None, u'Identifier', None, u'The name of a defined property to be linked to this control. '),
-(u'Control', u'Control', u'N', None, None, None, None, u'Identifier', None, u'Name of the control. This name must be unique within a dialog, but can repeat on different dialogs. '),
-(u'Control', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'External key to the Dialog table, name of the dialog.'),
-(u'Control', u'Control_Next', u'Y', None, None, u'Control', 2, u'Identifier', None, u'The name of an other control on the same dialog. This link defines the tab order of the controls. The links have to form one or more cycles!'),
-(u'Control', u'Help', u'Y', None, None, None, None, u'Text', None, u'The help strings used with the button. The text is optional. '),
-(u'Icon', u'Name', u'N', None, None, None, None, u'Identifier', None, u'Primary key. Name of the icon file.'),
-(u'Icon', u'Data', u'N', None, None, None, None, u'Binary', None, u'Binary stream. The binary icon data in PE (.DLL or .EXE) or icon (.ICO) format.'),
-(u'ListBox', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ListBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listbox.'),
-(u'ListBox', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ListBox', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'ActionText', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to be described.'),
-(u'ActionText', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description displayed in progress dialog and log when action is executing.'),
-(u'ActionText', u'Template', u'Y', None, None, None, None, u'Template', None, u'Optional localized format template used to format action data records for display during action execution.'),
-(u'ControlCondition', u'Action', u'N', None, None, None, None, None, u'Default;Disable;Enable;Hide;Show', u'The desired action to be taken on the specified control.'),
-(u'ControlCondition', u'Condition', u'N', None, None, None, None, u'Condition', None, u'A standard conditional statement that specifies under which conditions the action should be triggered.'),
-(u'ControlCondition', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the dialog.'),
-(u'ControlCondition', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control.'),
-(u'ControlEvent', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'A standard conditional statement that specifies under which conditions an event should be triggered.'),
-(u'ControlEvent', u'Ordering', u'Y', 0, 2147483647, None, None, None, None, u'An integer used to order several events tied to the same control. Can be left blank.'),
-(u'ControlEvent', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the dialog.'),
-(u'ControlEvent', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control'),
-(u'ControlEvent', u'Event', u'N', None, None, None, None, u'Formatted', None, u'An identifier that specifies the type of the event that should take place when the user interacts with control specified by the first two entries.'),
-(u'ControlEvent', u'Argument', u'N', None, None, None, None, u'Formatted', None, u'A value to be used as a modifier when triggering a particular event.'),
-(u'Dialog', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the dialog.'),
-(u'Dialog', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the dialog.'),
-(u'Dialog', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this dialog.'),
-(u'Dialog', u'Title', u'Y', None, None, None, None, u'Formatted', None, u"A text string specifying the title to be displayed in the title bar of the dialog's window."),
-(u'Dialog', u'Dialog', u'N', None, None, None, None, u'Identifier', None, u'Name of the dialog.'),
-(u'Dialog', u'HCentering', u'N', 0, 100, None, None, None, None, u'Horizontal position of the dialog on a 0-100 scale. 0 means left end, 100 means right end of the screen, 50 center.'),
-(u'Dialog', u'VCentering', u'N', 0, 100, None, None, None, None, u'Vertical position of the dialog on a 0-100 scale. 0 means top end, 100 means bottom end of the screen, 50 center.'),
-(u'Dialog', u'Control_First', u'N', None, None, u'Control', 2, u'Identifier', None, u'Defines the control that has the focus when the dialog is created.'),
-(u'Dialog', u'Control_Default', u'Y', None, None, u'Control', 2, u'Identifier', None, u'Defines the default control. Hitting return is equivalent to pushing this button.'),
-(u'Dialog', u'Control_Cancel', u'Y', None, None, u'Control', 2, u'Identifier', None, u'Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button.'),
-(u'EventMapping', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the Dialog.'),
-(u'EventMapping', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control.'),
-(u'EventMapping', u'Event', u'N', None, None, None, None, u'Identifier', None, u'An identifier that specifies the type of the event that the control subscribes to.'),
-(u'EventMapping', u'Attribute', u'N', None, None, None, None, u'Identifier', None, u'The name of the control attribute, that is set when this event is received.'),
-(u'InstallExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'InstallExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'InstallExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AppSearch', u'Property', u'N', None, None, None, None, u'Identifier', None, u'The property associated with a Signature'),
-(u'AppSearch', u'Signature_', u'N', None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator', 1, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.'),
-(u'BindImage', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'The index into the File table. This must be an executable file.'),
-(u'BindImage', u'Path', u'Y', None, None, None, None, u'Paths', None, u'A list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .'),
-(u'CCPSearch', u'Signature_', u'N', None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator', 1, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.'),
-(u'InstallUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'InstallUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'InstallUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'ListView', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ListView', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listview.'),
-(u'ListView', u'Value', u'N', None, None, None, None, u'Identifier', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ListView', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'ListView', u'Binary_', u'Y', None, None, u'Binary', 1, u'Identifier', None, u'The name of the icon to be displayed with the icon. The binary information is looked up from the Binary Table.'),
-(u'RadioButton', u'X', u'N', 0, 32767, None, None, None, None, u'The horizontal coordinate of the upper left corner of the bounding rectangle of the radio button.'),
-(u'RadioButton', u'Y', u'N', 0, 32767, None, None, None, None, u'The vertical coordinate of the upper left corner of the bounding rectangle of the radio button.'),
-(u'RadioButton', u'Width', u'N', 0, 32767, None, None, None, None, u'The width of the button.'),
-(u'RadioButton', u'Height', u'N', 0, 32767, None, None, None, None, u'The height of the button.'),
-(u'RadioButton', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible title to be assigned to the radio button.'),
-(u'RadioButton', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this radio button. All the buttons tied to the same property become part of the same group.'),
-(u'RadioButton', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this button. Selecting the button will set the associated property to this value.'),
-(u'RadioButton', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'RadioButton', u'Help', u'Y', None, None, None, None, u'Text', None, u'The help strings used with the button. The text is optional.'),
-(u'TextStyle', u'TextStyle', u'N', None, None, None, None, u'Identifier', None, u'Name of the style. The primary key of this table. This name is embedded in the texts to indicate a style change.'),
-(u'TextStyle', u'FaceName', u'N', None, None, None, None, u'Text', None, u'A string indicating the name of the font used. Required. The string must be at most 31 characters long.'),
-(u'TextStyle', u'Size', u'N', 0, 32767, None, None, None, None, u'The size of the font used. This size is given in our units (1/12 of the system font height). Assuming that the system font is set to 12 point size, this is equivalent to the point size.'),
-(u'TextStyle', u'Color', u'Y', 0, 16777215, None, None, None, None, u'A long integer indicating the color of the string in the RGB format (Red, Green, Blue each 0-255, RGB = R + 256*G + 256^2*B).'),
-(u'TextStyle', u'StyleBits', u'Y', 0, 15, None, None, None, None, u'A combination of style bits.'),
-(u'UIText', u'Text', u'Y', None, None, None, None, u'Text', None, u'The localized version of the string.'),
-(u'UIText', u'Key', u'N', None, None, None, None, u'Identifier', None, u'A unique key that identifies the particular string.'),
-(u'_Validation', u'Table', u'N', None, None, None, None, u'Identifier', None, u'Name of table'),
-(u'_Validation', u'Description', u'Y', None, None, None, None, u'Text', None, u'Description of column'),
-(u'_Validation', u'Column', u'N', None, None, None, None, u'Identifier', None, u'Name of column'),
-(u'_Validation', u'Nullable', u'N', None, None, None, None, None, u'Y;N;@', u'Whether the column is nullable'),
-(u'_Validation', u'MinValue', u'Y', -2147483647, 2147483647, None, None, None, None, u'Minimum value allowed'),
-(u'_Validation', u'MaxValue', u'Y', -2147483647, 2147483647, None, None, None, None, u'Maximum value allowed'),
-(u'_Validation', u'KeyTable', u'Y', None, None, None, None, u'Identifier', None, u'For foreign key, Name of table to which data must link'),
-(u'_Validation', u'KeyColumn', u'Y', 1, 32, None, None, None, None, u'Column to which foreign key connects'),
-(u'_Validation', u'Category', u'Y', None, None, None, None, None, u'Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL', u'String category'),
-(u'_Validation', u'Set', u'Y', None, None, None, None, u'Text', None, u'Set of values that are permitted'),
-(u'AdvtUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdvtUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdvtUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AppId', u'AppId', u'N', None, None, None, None, u'Guid', None, None),
-(u'AppId', u'ActivateAtStorage', u'Y', 0, 1, None, None, None, None, None),
-(u'AppId', u'DllSurrogate', u'Y', None, None, None, None, u'Text', None, None),
-(u'AppId', u'LocalService', u'Y', None, None, None, None, u'Text', None, None),
-(u'AppId', u'RemoteServerName', u'Y', None, None, None, None, u'Formatted', None, None),
-(u'AppId', u'RunAsInteractiveUser', u'Y', 0, 1, None, None, None, None, None),
-(u'AppId', u'ServiceParameters', u'Y', None, None, None, None, u'Text', None, None),
-(u'Feature', u'Attributes', u'N', None, None, None, None, None, u'0;1;2;4;5;6;8;9;10;16;17;18;20;21;22;24;25;26;32;33;34;36;37;38;48;49;50;52;53;54', u'Feature attributes'),
-(u'Feature', u'Description', u'Y', None, None, None, None, u'Text', None, u'Longer descriptive text describing a visible feature item.'),
-(u'Feature', u'Title', u'Y', None, None, None, None, u'Text', None, u'Short text identifying a visible feature item.'),
-(u'Feature', u'Feature', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular feature record.'),
-(u'Feature', u'Directory_', u'Y', None, None, u'Directory', 1, u'UpperCase', None, u'The name of the Directory that can be configured by the UI. A non-null value will enable the browse button.'),
-(u'Feature', u'Level', u'N', 0, 32767, None, None, None, None, u'The install level at which record will be initially selected. An install level of 0 will disable an item and prevent its display.'),
-(u'Feature', u'Display', u'Y', 0, 32767, None, None, None, None, u'Numeric sort order, used to force a specific display ordering.'),
-(u'Feature', u'Feature_Parent', u'Y', None, None, u'Feature', 1, u'Identifier', None, u'Optional key of a parent record in the same table. If the parent is not selected, then the record will not be installed. Null indicates a root item.'),
-(u'File', u'Sequence', u'N', 1, 32767, None, None, None, None, u'Sequence with respect to the media images; order must track cabinet order.'),
-(u'File', u'Attributes', u'Y', 0, 32767, None, None, None, None, u'Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses)'),
-(u'File', u'File', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token, must match identifier in cabinet. For uncompressed files, this field is ignored.'),
-(u'File', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the file.'),
-(u'File', u'FileName', u'N', None, None, None, None, u'Filename', None, u'File name used for installation, may be localized. This may contain a "short name|long name" pair.'),
-(u'File', u'FileSize', u'N', 0, 2147483647, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'File', u'Language', u'Y', None, None, None, None, u'Language', None, u'List of decimal language Ids, comma-separated if more than one.'),
-(u'File', u'Version', u'Y', None, None, u'File', 1, u'Version', None, u'Version string for versioned files; Blank for unversioned files.'),
-(u'Class', u'Attributes', u'Y', None, 32767, None, None, None, None, u'Class registration attributes.'),
-(u'Class', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.'),
-(u'Class', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description for the Class.'),
-(u'Class', u'Argument', u'Y', None, None, None, None, u'Formatted', None, u'optional argument for LocalServers.'),
-(u'Class', u'AppId_', u'Y', None, None, u'AppId', 1, u'Guid', None, u'Optional AppID containing DCOM information for associated application (string GUID).'),
-(u'Class', u'CLSID', u'N', None, None, None, None, u'Guid', None, u'The CLSID of an OLE factory.'),
-(u'Class', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'Class', u'Context', u'N', None, None, None, None, u'Identifier', None, u'The numeric server context for this server. CLSCTX_xxxx'),
-(u'Class', u'DefInprocHandler', u'Y', None, None, None, None, u'Filename', u'1;2;3', u'Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"'),
-(u'Class', u'FileTypeMask', u'Y', None, None, None, None, u'Text', None, u'Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...'),
-(u'Class', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key.'),
-(u'Class', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'Optional icon index.'),
-(u'Class', u'ProgId_Default', u'Y', None, None, u'ProgId', 1, u'Text', None, u'Optional ProgId associated with this CLSID.'),
-(u'Component', u'Condition', u'Y', None, None, None, None, u'Condition', None, u"A conditional statement that will disable this component if the specified condition evaluates to the 'True' state. If a component is disabled, it will not be installed, regardless of the 'Action' state associated with the component."),
-(u'Component', u'Attributes', u'N', None, None, None, None, None, None, u'Remote execution option, one of irsEnum'),
-(u'Component', u'Component', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular component record.'),
-(u'Component', u'ComponentId', u'Y', None, None, None, None, u'Guid', None, u'A string GUID unique to this component, version, and language.'),
-(u'Component', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Required key of a Directory table record. This is actually a property name whose value contains the actual path, set either by the AppSearch action or with the default setting obtained from the Directory table.'),
-(u'Component', u'KeyPath', u'Y', None, None, u'File;Registry;ODBCDataSource', 1, u'Identifier', None, u'Either the primary key into the File table, Registry table, or ODBCDataSource table. This extract path is stored when the component is installed, and is used to detect the presence of the component and to return the path to it.'),
-(u'ProgId', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description for the Program identifier.'),
-(u'ProgId', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this ProgId. Will be written under the DefaultIcon key.'),
-(u'ProgId', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'Optional icon index.'),
-(u'ProgId', u'ProgId', u'N', None, None, None, None, u'Text', None, u'The Program Identifier. Primary key.'),
-(u'ProgId', u'Class_', u'Y', None, None, u'Class', 1, u'Guid', None, u'The CLSID of an OLE factory corresponding to the ProgId.'),
-(u'ProgId', u'ProgId_Parent', u'Y', None, None, u'ProgId', 1, u'Text', None, u'The Parent Program Identifier. If specified, the ProgId column becomes a version independent prog id.'),
-(u'CompLocator', u'Type', u'Y', 0, 1, None, None, None, None, u'A boolean value that determines if the registry value is a filename or a directory location.'),
-(u'CompLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'CompLocator', u'ComponentId', u'N', None, None, None, None, u'Guid', None, u'A string GUID unique to this component, version, and language.'),
-(u'Complus', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the ComPlus component.'),
-(u'Complus', u'ExpType', u'Y', 0, 32767, None, None, None, None, u'ComPlus component attributes.'),
-(u'Directory', u'Directory', u'N', None, None, None, None, u'Identifier', None, u'Unique identifier for directory entry, primary key. If a property by this name is defined, it contains the full path to the directory.'),
-(u'Directory', u'DefaultDir', u'N', None, None, None, None, u'DefaultDir', None, u"The default sub-path under parent's path."),
-(u'Directory', u'Directory_Parent', u'Y', None, None, u'Directory', 1, u'Identifier', None, u'Reference to the entry in this table specifying the default parent directory. A record parented to itself or with a Null parent represents a root of the install tree.'),
-(u'CreateFolder', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table.'),
-(u'CreateFolder', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Primary key, could be foreign key into the Directory table.'),
-(u'CustomAction', u'Type', u'N', 1, 16383, None, None, None, None, u'The numeric custom action type, consisting of source location, code type, entry, option flags.'),
-(u'CustomAction', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Primary key, name of action, normally appears in sequence table unless private use.'),
-(u'CustomAction', u'Source', u'Y', None, None, None, None, u'CustomSource', None, u'The table reference of the source of the code.'),
-(u'CustomAction', u'Target', u'Y', None, None, None, None, u'Formatted', None, u'Excecution parameter, depends on the type of custom action'),
-(u'DrLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'DrLocator', u'Path', u'Y', None, None, None, None, u'AnyPath', None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.'),
-(u'DrLocator', u'Depth', u'Y', 0, 32767, None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.'),
-(u'DrLocator', u'Parent', u'Y', None, None, None, None, u'Identifier', None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.'),
-(u'DuplicateFile', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Foreign key referencing the source file to be duplicated.'),
-(u'DuplicateFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the duplicate file.'),
-(u'DuplicateFile', u'DestFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full pathname to a destination folder.'),
-(u'DuplicateFile', u'DestName', u'Y', None, None, None, None, u'Filename', None, u'Filename to be given to the duplicate file.'),
-(u'DuplicateFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular file entry'),
-(u'Environment', u'Name', u'N', None, None, None, None, u'Text', None, u'The name of the environmental value.'),
-(u'Environment', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value to set in the environmental settings.'),
-(u'Environment', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the environmental value.'),
-(u'Environment', u'Environment', u'N', None, None, None, None, u'Identifier', None, u'Unique identifier for the environmental variable setting'),
-(u'Error', u'Error', u'N', 0, 32767, None, None, None, None, u'Integer error number, obtained from header file IError(...) macros.'),
-(u'Error', u'Message', u'Y', None, None, None, None, u'Template', None, u'Error formatting template, obtained from user ed. or localizers.'),
-(u'Extension', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.'),
-(u'Extension', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'Extension', u'Extension', u'N', None, None, None, None, u'Text', None, u'The extension associated with the table row.'),
-(u'Extension', u'MIME_', u'Y', None, None, u'MIME', 1, u'Text', None, u'Optional Context identifier, typically "type/format" associated with the extension'),
-(u'Extension', u'ProgId_', u'Y', None, None, u'ProgId', 1, u'Text', None, u'Optional ProgId associated with this extension.'),
-(u'MIME', u'CLSID', u'Y', None, None, None, None, u'Guid', None, u'Optional associated CLSID.'),
-(u'MIME', u'ContentType', u'N', None, None, None, None, u'Text', None, u'Primary key. Context identifier, typically "type/format".'),
-(u'MIME', u'Extension_', u'N', None, None, u'Extension', 1, u'Text', None, u'Optional associated extension (without dot)'),
-(u'FeatureComponents', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into Feature table.'),
-(u'FeatureComponents', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'FileSFPCatalog', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'File associated with the catalog'),
-(u'FileSFPCatalog', u'SFPCatalog_', u'N', None, None, u'SFPCatalog', 1, u'Filename', None, u'Catalog associated with the file'),
-(u'SFPCatalog', u'SFPCatalog', u'N', None, None, None, None, u'Filename', None, u'File name for the catalog.'),
-(u'SFPCatalog', u'Catalog', u'N', None, None, None, None, u'Binary', None, u'SFP Catalog'),
-(u'SFPCatalog', u'Dependency', u'Y', None, None, None, None, u'Formatted', None, u'Parent catalog - only used by SFP'),
-(u'Font', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Primary key, foreign key into File table referencing font file.'),
-(u'Font', u'FontTitle', u'Y', None, None, None, None, u'Text', None, u'Font name.'),
-(u'IniFile', u'Action', u'N', None, None, None, None, None, u'0;1;3', u'The type of modification to be made, one of iifEnum'),
-(u'IniFile', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value to be written.'),
-(u'IniFile', u'Key', u'N', None, None, None, None, u'Formatted', None, u'The .INI file key below Section.'),
-(u'IniFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the .INI value.'),
-(u'IniFile', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name in which to write the information'),
-(u'IniFile', u'IniFile', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'IniFile', u'DirProperty', u'Y', None, None, None, None, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the .INI file is.'),
-(u'IniFile', u'Section', u'N', None, None, None, None, u'Formatted', None, u'The .INI file Section.'),
-(u'IniLocator', u'Type', u'Y', 0, 2, None, None, None, None, u'An integer value that determines if the .INI value read is a filename or a directory location or to be used as is w/o interpretation.'),
-(u'IniLocator', u'Key', u'N', None, None, None, None, u'Text', None, u'Key value (followed by an equals sign in INI file).'),
-(u'IniLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'IniLocator', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name.'),
-(u'IniLocator', u'Section', u'N', None, None, None, None, u'Text', None, u'Section name within in file (within square brackets in INI file).'),
-(u'IniLocator', u'Field', u'Y', 0, 32767, None, None, None, None, u'The field in the .INI line. If Field is null or 0 the entire line is read.'),
-(u'IsolatedComponent', u'Component_Application', u'N', None, None, u'Component', 1, u'Identifier', None, u'Key to Component table item for application'),
-(u'IsolatedComponent', u'Component_Shared', u'N', None, None, u'Component', 1, u'Identifier', None, u'Key to Component table item to be isolated'),
-(u'LaunchCondition', u'Condition', u'N', None, None, None, None, u'Condition', None, u'Expression which must evaluate to TRUE in order for install to commence.'),
-(u'LaunchCondition', u'Description', u'N', None, None, None, None, u'Formatted', None, u'Localizable text to display when condition fails and install must abort.'),
-(u'LockPermissions', u'Table', u'N', None, None, None, None, u'Identifier', u'Directory;File;Registry', u'Reference to another table name'),
-(u'LockPermissions', u'Domain', u'Y', None, None, None, None, u'Formatted', None, u'Domain name for user whose permissions are being set. (usually a property)'),
-(u'LockPermissions', u'LockObject', u'N', None, None, None, None, u'Identifier', None, u'Foreign key into Registry or File table'),
-(u'LockPermissions', u'Permission', u'Y', -2147483647, 2147483647, None, None, None, None, u'Permission Access mask. Full Control = 268435456 (GENERIC_ALL = 0x10000000)'),
-(u'LockPermissions', u'User', u'N', None, None, None, None, u'Formatted', None, u'User for permissions to be set. (usually a property)'),
-(u'Media', u'Source', u'Y', None, None, None, None, u'Property', None, u'The property defining the location of the cabinet file.'),
-(u'Media', u'Cabinet', u'Y', None, None, None, None, u'Cabinet', None, u'If some or all of the files stored on the media are compressed in a cabinet, the name of that cabinet.'),
-(u'Media', u'DiskId', u'N', 1, 32767, None, None, None, None, u'Primary key, integer to determine sort order for table.'),
-(u'Media', u'DiskPrompt', u'Y', None, None, None, None, u'Text', None, u'Disk name: the visible text actually printed on the disk. This will be used to prompt the user when this disk needs to be inserted.'),
-(u'Media', u'LastSequence', u'N', 0, 32767, None, None, None, None, u'File sequence number for the last file for this media.'),
-(u'Media', u'VolumeLabel', u'Y', None, None, None, None, u'Text', None, u'The label attributed to the volume.'),
-(u'ModuleComponents', u'Component', u'N', None, None, u'Component', 1, u'Identifier', None, u'Component contained in the module.'),
-(u'ModuleComponents', u'Language', u'N', None, None, u'ModuleSignature', 2, None, None, u'Default language ID for module (may be changed by transform).'),
-(u'ModuleComponents', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'Module containing the component.'),
-(u'ModuleSignature', u'Language', u'N', None, None, None, None, None, None, u'Default decimal language of module.'),
-(u'ModuleSignature', u'Version', u'N', None, None, None, None, u'Version', None, u'Version of the module.'),
-(u'ModuleSignature', u'ModuleID', u'N', None, None, None, None, u'Identifier', None, u'Module identifier (String.GUID).'),
-(u'ModuleDependency', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'Module requiring the dependency.'),
-(u'ModuleDependency', u'ModuleLanguage', u'N', None, None, u'ModuleSignature', 2, None, None, u'Language of module requiring the dependency.'),
-(u'ModuleDependency', u'RequiredID', u'N', None, None, None, None, None, None, u'String.GUID of required module.'),
-(u'ModuleDependency', u'RequiredLanguage', u'N', None, None, None, None, None, None, u'LanguageID of the required module.'),
-(u'ModuleDependency', u'RequiredVersion', u'Y', None, None, None, None, u'Version', None, u'Version of the required version.'),
-(u'ModuleExclusion', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'String.GUID of module with exclusion requirement.'),
-(u'ModuleExclusion', u'ModuleLanguage', u'N', None, None, u'ModuleSignature', 2, None, None, u'LanguageID of module with exclusion requirement.'),
-(u'ModuleExclusion', u'ExcludedID', u'N', None, None, None, None, None, None, u'String.GUID of excluded module.'),
-(u'ModuleExclusion', u'ExcludedLanguage', u'N', None, None, None, None, None, None, u'Language of excluded module.'),
-(u'ModuleExclusion', u'ExcludedMaxVersion', u'Y', None, None, None, None, u'Version', None, u'Maximum version of excluded module.'),
-(u'ModuleExclusion', u'ExcludedMinVersion', u'Y', None, None, None, None, u'Version', None, u'Minimum version of excluded module.'),
-(u'MoveFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'If this component is not "selected" for installation or removal, no action will be taken on the associated MoveFile entry'),
-(u'MoveFile', u'DestFolder', u'N', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory'),
-(u'MoveFile', u'DestName', u'Y', None, None, None, None, u'Filename', None, u'Name to be given to the original file after it is moved or copied. If blank, the destination file will be given the same name as the source file'),
-(u'MoveFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key that uniquely identifies a particular MoveFile record'),
-(u'MoveFile', u'Options', u'N', 0, 1, None, None, None, None, u'Integer value specifying the MoveFile operating mode, one of imfoEnum'),
-(u'MoveFile', u'SourceFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the source directory'),
-(u'MoveFile', u'SourceName', u'Y', None, None, None, None, u'Text', None, u"Name of the source file(s) to be moved or copied. Can contain the '*' or '?' wildcards."),
-(u'MsiAssembly', u'Attributes', u'Y', None, None, None, None, None, None, u'Assembly attributes'),
-(u'MsiAssembly', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into Feature table.'),
-(u'MsiAssembly', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'MsiAssembly', u'File_Application', u'Y', None, None, u'File', 1, u'Identifier', None, u'Foreign key into File table, denoting the application context for private assemblies. Null for global assemblies.'),
-(u'MsiAssembly', u'File_Manifest', u'Y', None, None, u'File', 1, u'Identifier', None, u'Foreign key into the File table denoting the manifest file for the assembly.'),
-(u'MsiAssemblyName', u'Name', u'N', None, None, None, None, u'Text', None, u'The name part of the name-value pairs for the assembly name.'),
-(u'MsiAssemblyName', u'Value', u'N', None, None, None, None, u'Text', None, u'The value part of the name-value pairs for the assembly name.'),
-(u'MsiAssemblyName', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'MsiDigitalCertificate', u'CertData', u'N', None, None, None, None, u'Binary', None, u'A certificate context blob for a signer certificate'),
-(u'MsiDigitalCertificate', u'DigitalCertificate', u'N', None, None, None, None, u'Identifier', None, u'A unique identifier for the row'),
-(u'MsiDigitalSignature', u'Table', u'N', None, None, None, None, None, u'Media', u'Reference to another table name (only Media table is supported)'),
-(u'MsiDigitalSignature', u'DigitalCertificate_', u'N', None, None, u'MsiDigitalCertificate', 1, u'Identifier', None, u'Foreign key to MsiDigitalCertificate table identifying the signer certificate'),
-(u'MsiDigitalSignature', u'Hash', u'Y', None, None, None, None, u'Binary', None, u'The encoded hash blob from the digital signature'),
-(u'MsiDigitalSignature', u'SignObject', u'N', None, None, None, None, u'Text', None, u'Foreign key to Media table'),
-(u'MsiFileHash', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Primary key, foreign key into File table referencing file with this hash'),
-(u'MsiFileHash', u'Options', u'N', 0, 32767, None, None, None, None, u'Various options and attributes for this hash.'),
-(u'MsiFileHash', u'HashPart1', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart2', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart3', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart4', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiPatchHeaders', u'StreamRef', u'N', None, None, None, None, u'Identifier', None, u'Primary key. A unique identifier for the row.'),
-(u'MsiPatchHeaders', u'Header', u'N', None, None, None, None, u'Binary', None, u'Binary stream. The patch header, used for patch validation.'),
-(u'ODBCAttribute', u'Value', u'Y', None, None, None, None, u'Text', None, u'Value for ODBC driver attribute'),
-(u'ODBCAttribute', u'Attribute', u'N', None, None, None, None, u'Text', None, u'Name of ODBC driver attribute'),
-(u'ODBCAttribute', u'Driver_', u'N', None, None, u'ODBCDriver', 1, u'Identifier', None, u'Reference to ODBC driver in ODBCDriver table'),
-(u'ODBCDriver', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for driver, non-localized'),
-(u'ODBCDriver', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Reference to key driver file'),
-(u'ODBCDriver', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCDriver', u'Driver', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for driver'),
-(u'ODBCDriver', u'File_Setup', u'Y', None, None, u'File', 1, u'Identifier', None, u'Optional reference to key driver setup DLL'),
-(u'ODBCDataSource', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for data source'),
-(u'ODBCDataSource', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCDataSource', u'DataSource', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for data source'),
-(u'ODBCDataSource', u'DriverDescription', u'N', None, None, None, None, u'Text', None, u'Reference to driver description, may be existing driver'),
-(u'ODBCDataSource', u'Registration', u'N', 0, 1, None, None, None, None, u'Registration option: 0=machine, 1=user, others t.b.d.'),
-(u'ODBCSourceAttribute', u'Value', u'Y', None, None, None, None, u'Text', None, u'Value for ODBC data source attribute'),
-(u'ODBCSourceAttribute', u'Attribute', u'N', None, None, None, None, u'Text', None, u'Name of ODBC data source attribute'),
-(u'ODBCSourceAttribute', u'DataSource_', u'N', None, None, u'ODBCDataSource', 1, u'Identifier', None, u'Reference to ODBC data source in ODBCDataSource table'),
-(u'ODBCTranslator', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for translator'),
-(u'ODBCTranslator', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Reference to key translator file'),
-(u'ODBCTranslator', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCTranslator', u'File_Setup', u'Y', None, None, u'File', 1, u'Identifier', None, u'Optional reference to key translator setup DLL'),
-(u'ODBCTranslator', u'Translator', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for translator'),
-(u'Patch', u'Sequence', u'N', 0, 32767, None, None, None, None, u'Primary key, sequence with respect to the media images; order must track cabinet order.'),
-(u'Patch', u'Attributes', u'N', 0, 32767, None, None, None, None, u'Integer containing bit flags representing patch attributes'),
-(u'Patch', u'File_', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token, foreign key to File table, must match identifier in cabinet.'),
-(u'Patch', u'Header', u'Y', None, None, None, None, u'Binary', None, u'Binary stream. The patch header, used for patch validation.'),
-(u'Patch', u'PatchSize', u'N', 0, 2147483647, None, None, None, None, u'Size of patch in bytes (long integer).'),
-(u'Patch', u'StreamRef_', u'Y', None, None, None, None, u'Identifier', None, u'Identifier. Foreign key to the StreamRef column of the MsiPatchHeaders table.'),
-(u'PatchPackage', u'Media_', u'N', 0, 32767, None, None, None, None, u'Foreign key to DiskId column of Media table. Indicates the disk containing the patch package.'),
-(u'PatchPackage', u'PatchId', u'N', None, None, None, None, u'Guid', None, u'A unique string GUID representing this patch.'),
-(u'PublishComponent', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into the Feature table.'),
-(u'PublishComponent', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table.'),
-(u'PublishComponent', u'ComponentId', u'N', None, None, None, None, u'Guid', None, u'A string GUID that represents the component id that will be requested by the alien product.'),
-(u'PublishComponent', u'AppData', u'Y', None, None, None, None, u'Text', None, u'This is localisable Application specific data that can be associated with a Qualified Component.'),
-(u'PublishComponent', u'Qualifier', u'N', None, None, None, None, u'Text', None, u'This is defined only when the ComponentId column is an Qualified Component Id. This is the Qualifier for ProvideComponentIndirect.'),
-(u'Registry', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'Registry', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The registry value.'),
-(u'Registry', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'Registry', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the registry value.'),
-(u'Registry', u'Registry', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'Registry', u'Root', u'N', -1, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.'),
-(u'RegLocator', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'RegLocator', u'Type', u'Y', 0, 18, None, None, None, None, u'An integer value that determines if the registry value is a filename or a directory location or to be used as is w/o interpretation.'),
-(u'RegLocator', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'RegLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table. If the type is 0, the registry values refers a directory, and _Signature is not a foreign key.'),
-(u'RegLocator', u'Root', u'N', 0, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.'),
-(u'RemoveFile', u'InstallMode', u'N', None, None, None, None, None, u'1;2;3', u'Installation option, one of iimEnum.'),
-(u'RemoveFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the file to be removed.'),
-(u'RemoveFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular file entry'),
-(u'RemoveFile', u'FileName', u'Y', None, None, None, None, u'WildCardFilename', None, u'Name of the file to be removed.'),
-(u'RemoveFile', u'DirProperty', u'N', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full pathname to the folder of the file to be removed.'),
-(u'RemoveIniFile', u'Action', u'N', None, None, None, None, None, u'2;4', u'The type of modification to be made, one of iifEnum.'),
-(u'RemoveIniFile', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value to be deleted. The value is required when Action is iifIniRemoveTag'),
-(u'RemoveIniFile', u'Key', u'N', None, None, None, None, u'Formatted', None, u'The .INI file key below Section.'),
-(u'RemoveIniFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the deletion of the .INI value.'),
-(u'RemoveIniFile', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name in which to delete the information'),
-(u'RemoveIniFile', u'DirProperty', u'Y', None, None, None, None, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the .INI file is.'),
-(u'RemoveIniFile', u'Section', u'N', None, None, None, None, u'Formatted', None, u'The .INI file Section.'),
-(u'RemoveIniFile', u'RemoveIniFile', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'RemoveRegistry', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'RemoveRegistry', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'RemoveRegistry', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the deletion of the registry value.'),
-(u'RemoveRegistry', u'Root', u'N', -1, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum'),
-(u'RemoveRegistry', u'RemoveRegistry', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ReserveCost', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reserve a specified amount of space if this component is to be installed.'),
-(u'ReserveCost', u'ReserveFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory'),
-(u'ReserveCost', u'ReserveKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key that uniquely identifies a particular ReserveCost record'),
-(u'ReserveCost', u'ReserveLocal', u'N', 0, 2147483647, None, None, None, None, u'Disk space to reserve if linked component is installed locally.'),
-(u'ReserveCost', u'ReserveSource', u'N', 0, 2147483647, None, None, None, None, u'Disk space to reserve if linked component is installed to run from the source location.'),
-(u'SelfReg', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Foreign key into the File table denoting the module that needs to be registered.'),
-(u'SelfReg', u'Cost', u'Y', 0, 32767, None, None, None, None, u'The cost of registering the module.'),
-(u'ServiceControl', u'Name', u'N', None, None, None, None, u'Formatted', None, u'Name of a service. /, \\, comma and space are invalid'),
-(u'ServiceControl', u'Event', u'N', 0, 187, None, None, None, None, u'Bit field: Install: 0x1 = Start, 0x2 = Stop, 0x8 = Delete, Uninstall: 0x10 = Start, 0x20 = Stop, 0x80 = Delete'),
-(u'ServiceControl', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table that controls the startup of the service'),
-(u'ServiceControl', u'ServiceControl', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ServiceControl', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'Arguments for the service. Separate by [~].'),
-(u'ServiceControl', u'Wait', u'Y', 0, 1, None, None, None, None, u'Boolean for whether to wait for the service to fully start'),
-(u'ServiceInstall', u'Name', u'N', None, None, None, None, u'Formatted', None, u'Internal Name of the Service'),
-(u'ServiceInstall', u'Description', u'Y', None, None, None, None, u'Text', None, u'Description of service.'),
-(u'ServiceInstall', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table that controls the startup of the service'),
-(u'ServiceInstall', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'Arguments to include in every start of the service, passed to WinMain'),
-(u'ServiceInstall', u'ServiceInstall', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ServiceInstall', u'Dependencies', u'Y', None, None, None, None, u'Formatted', None, u'Other services this depends on to start. Separate by [~], and end with [~][~]'),
-(u'ServiceInstall', u'DisplayName', u'Y', None, None, None, None, u'Formatted', None, u'External Name of the Service'),
-(u'ServiceInstall', u'ErrorControl', u'N', -2147483647, 2147483647, None, None, None, None, u'Severity of error if service fails to start'),
-(u'ServiceInstall', u'LoadOrderGroup', u'Y', None, None, None, None, u'Formatted', None, u'LoadOrderGroup'),
-(u'ServiceInstall', u'Password', u'Y', None, None, None, None, u'Formatted', None, u'password to run service with. (with StartName)'),
-(u'ServiceInstall', u'ServiceType', u'N', -2147483647, 2147483647, None, None, None, None, u'Type of the service'),
-(u'ServiceInstall', u'StartName', u'Y', None, None, None, None, u'Formatted', None, u'User or object name to run service as'),
-(u'ServiceInstall', u'StartType', u'N', 0, 4, None, None, None, None, u'Type of the service'),
-(u'Shortcut', u'Name', u'N', None, None, None, None, u'Filename', None, u'The name of the shortcut to be created.'),
-(u'Shortcut', u'Description', u'Y', None, None, None, None, u'Text', None, u'The description for the shortcut.'),
-(u'Shortcut', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table denoting the component whose selection gates the shortcut creation/deletion.'),
-(u'Shortcut', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Foreign key into the File table denoting the external icon file for the shortcut.'),
-(u'Shortcut', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'The icon index for the shortcut.'),
-(u'Shortcut', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the shortcut file is created.'),
-(u'Shortcut', u'Target', u'N', None, None, None, None, u'Shortcut', None, u'The shortcut target. This is usually a property that is expanded to a file or a folder that the shortcut points to.'),
-(u'Shortcut', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'The command-line arguments for the shortcut.'),
-(u'Shortcut', u'Shortcut', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'Shortcut', u'Hotkey', u'Y', 0, 32767, None, None, None, None, u'The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte. '),
-(u'Shortcut', u'ShowCmd', u'Y', None, None, None, None, None, u'1;3;7', u'The show command for the application window.The following values may be used.'),
-(u'Shortcut', u'WkDir', u'Y', None, None, None, None, u'Identifier', None, u'Name of property defining location of working directory.'),
-(u'Signature', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The name of the file. This may contain a "short name|long name" pair.'),
-(u'Signature', u'Signature', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature represents a unique file signature.'),
-(u'Signature', u'Languages', u'Y', None, None, None, None, u'Language', None, u'The languages supported by the file.'),
-(u'Signature', u'MaxDate', u'Y', 0, 2147483647, None, None, None, None, u'The maximum creation date of the file.'),
-(u'Signature', u'MaxSize', u'Y', 0, 2147483647, None, None, None, None, u'The maximum size of the file. '),
-(u'Signature', u'MaxVersion', u'Y', None, None, None, None, u'Text', None, u'The maximum version of the file.'),
-(u'Signature', u'MinDate', u'Y', 0, 2147483647, None, None, None, None, u'The minimum creation date of the file.'),
-(u'Signature', u'MinSize', u'Y', 0, 2147483647, None, None, None, None, u'The minimum size of the file.'),
-(u'Signature', u'MinVersion', u'Y', None, None, None, None, u'Text', None, u'The minimum version of the file.'),
-(u'TypeLib', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the type library to be operational.'),
-(u'TypeLib', u'Description', u'Y', None, None, None, None, u'Text', None, None),
-(u'TypeLib', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'TypeLib', u'Directory_', u'Y', None, None, u'Directory', 1, u'Identifier', None, u'Optional. The foreign key into the Directory table denoting the path to the help file for the type library.'),
-(u'TypeLib', u'Language', u'N', 0, 32767, None, None, None, None, u'The language of the library.'),
-(u'TypeLib', u'Version', u'Y', 0, 16777215, None, None, None, None, u'The version of the library. The minor version is in the lower 8 bits of the integer. The major version is in the next 16 bits. '),
-(u'TypeLib', u'Cost', u'Y', 0, 2147483647, None, None, None, None, u'The cost associated with the registration of the typelib. This column is currently optional.'),
-(u'TypeLib', u'LibID', u'N', None, None, None, None, u'Guid', None, u'The GUID that represents the library.'),
-(u'Upgrade', u'Attributes', u'N', 0, 2147483647, None, None, None, None, u'The attributes of this product set.'),
-(u'Upgrade', u'Remove', u'Y', None, None, None, None, u'Formatted', None, u'The list of features to remove when uninstalling a product from this set. The default is "ALL".'),
-(u'Upgrade', u'Language', u'Y', None, None, None, None, u'Language', None, u'A comma-separated list of languages for either products in this set or products not in this set.'),
-(u'Upgrade', u'ActionProperty', u'N', None, None, None, None, u'UpperCase', None, u'The property to set when a product in this set is found.'),
-(u'Upgrade', u'UpgradeCode', u'N', None, None, None, None, u'Guid', None, u'The UpgradeCode GUID belonging to the products in this set.'),
-(u'Upgrade', u'VersionMax', u'Y', None, None, None, None, u'Text', None, u'The maximum ProductVersion of the products in this set. The set may or may not include products with this particular version.'),
-(u'Upgrade', u'VersionMin', u'Y', None, None, None, None, u'Text', None, u'The minimum ProductVersion of the products in this set. The set may or may not include products with this particular version.'),
-(u'Verb', u'Sequence', u'Y', 0, 32767, None, None, None, None, u'Order within the verbs for a particular extension. Also used simply to specify the default verb.'),
-(u'Verb', u'Argument', u'Y', None, None, None, None, u'Formatted', None, u'Optional value for the command arguments.'),
-(u'Verb', u'Extension_', u'N', None, None, u'Extension', 1, u'Text', None, u'The extension associated with the table row.'),
-(u'Verb', u'Verb', u'N', None, None, None, None, u'Text', None, u'The verb for the command.'),
-(u'Verb', u'Command', u'Y', None, None, None, None, u'Formatted', None, u'The command text.'),
-]
-
-Error = [
-(0, u'{{Fatal error: }}'),
-(1, u'{{Error [1]. }}'),
-(2, u'Warning [1]. '),
-(3, None),
-(4, u'Info [1]. '),
-(5, u'The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1]. {{The arguments are: [2], [3], [4]}}'),
-(6, None),
-(7, u'{{Disk full: }}'),
-(8, u'Action [Time]: [1]. [2]'),
-(9, u'[ProductName]'),
-(10, u'{[2]}{, [3]}{, [4]}'),
-(11, u'Message type: [1], Argument: [2]'),
-(12, u'=== Logging started: [Date] [Time] ==='),
-(13, u'=== Logging stopped: [Date] [Time] ==='),
-(14, u'Action start [Time]: [1].'),
-(15, u'Action ended [Time]: [1]. Return value [2].'),
-(16, u'Time remaining: {[1] minutes }{[2] seconds}'),
-(17, u'Out of memory. Shut down other applications before retrying.'),
-(18, u'Installer is no longer responding.'),
-(19, u'Installer stopped prematurely.'),
-(20, u'Please wait while Windows configures [ProductName]'),
-(21, u'Gathering required information...'),
-(22, u'Removing older versions of this application...'),
-(23, u'Preparing to remove older versions of this application...'),
-(32, u'{[ProductName] }Setup completed successfully.'),
-(33, u'{[ProductName] }Setup failed.'),
-(1101, u'Error reading from file: [2]. {{ System error [3].}} Verify that the file exists and that you can access it.'),
-(1301, u"Cannot create the file '[2]'. A directory with this name already exists. Cancel the install and try installing to a different location."),
-(1302, u'Please insert the disk: [2]'),
-(1303, u'The installer has insufficient privileges to access this directory: [2]. The installation cannot continue. Log on as administrator or contact your system administrator.'),
-(1304, u'Error writing to file: [2]. Verify that you have access to that directory.'),
-(1305, u'Error reading from file [2]. {{ System error [3].}} Verify that the file exists and that you can access it.'),
-(1306, u"Another application has exclusive access to the file '[2]'. Please shut down all other applications, then click Retry."),
-(1307, u'There is not enough disk space to install this file: [2]. Free some disk space and click Retry, or click Cancel to exit.'),
-(1308, u'Source file not found: [2]. Verify that the file exists and that you can access it.'),
-(1309, u'Error reading from file: [3]. {{ System error [2].}} Verify that the file exists and that you can access it.'),
-(1310, u'Error writing to file: [3]. {{ System error [2].}} Verify that you have access to that directory.'),
-(1311, u'Source file not found{{(cabinet)}}: [2]. Verify that the file exists and that you can access it.'),
-(1312, u"Cannot create the directory '[2]'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit."),
-(1313, u'The volume [2] is currently unavailable. Please select another.'),
-(1314, u"The specified path '[2]' is unavailable."),
-(1315, u'Unable to write to the specified folder: [2].'),
-(1316, u'A network error occurred while attempting to read from the file: [2]'),
-(1317, u'An error occurred while attempting to create the directory: [2]'),
-(1318, u'A network error occurred while attempting to create the directory: [2]'),
-(1319, u'A network error occurred while attempting to open the source file cabinet: [2]'),
-(1320, u'The specified path is too long: [2]'),
-(1321, u'The Installer has insufficient privileges to modify this file: [2].'),
-(1322, u"A portion of the folder path '[2]' is invalid. It is either empty or exceeds the length allowed by the system."),
-(1323, u"The folder path '[2]' contains words that are not valid in folder paths."),
-(1324, u"The folder path '[2]' contains an invalid character."),
-(1325, u"'[2]' is not a valid short file name."),
-(1326, u'Error getting file security: [3] GetLastError: [2]'),
-(1327, u'Invalid Drive: [2]'),
-(1328, u'Error applying patch to file [2]. It has probably been updated by other means, and can no longer be modified by this patch. For more information contact your patch vendor. {{System Error: [3]}}'),
-(1329, u'A file that is required cannot be installed because the cabinet file [2] is not digitally signed. This may indicate that the cabinet file is corrupt.'),
-(1330, u'A file that is required cannot be installed because the cabinet file [2] has an invalid digital signature. This may indicate that the cabinet file is corrupt.{{ Error [3] was returned by WinVerifyTrust.}}'),
-(1331, u'Failed to correctly copy [2] file: CRC error.'),
-(1332, u'Failed to correctly move [2] file: CRC error.'),
-(1333, u'Failed to correctly patch [2] file: CRC error.'),
-(1334, u"The file '[2]' cannot be installed because the file cannot be found in cabinet file '[3]'. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package."),
-(1335, u"The cabinet file '[2]' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package."),
-(1336, u'There was an error creating a temporary file that is needed to complete this installation.{{ Folder: [3]. System error code: [2]}}'),
-(1401, u'Could not create key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1402, u'Could not open key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1403, u'Could not delete value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1404, u'Could not delete key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1405, u'Could not read value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1406, u'Could not write value [2] to key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1407, u'Could not get value names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1408, u'Could not get sub key names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1409, u'Could not read security information for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1410, u'Could not increase the available registry space. [2] KB of free registry space is required for the installation of this application.'),
-(1500, u'Another installation is in progress. You must complete that installation before continuing this one.'),
-(1501, u'Error accessing secured data. Please make sure the Windows Installer is configured properly and try the install again.'),
-(1502, u"User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. Your current install will now continue."),
-(1503, u"User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product."),
-(1601, u"Out of disk space -- Volume: '[2]'; required space: [3] KB; available space: [4] KB. Free some disk space and retry."),
-(1602, u'Are you sure you want to cancel?'),
-(1603, u"The file [2][3] is being held in use{ by the following process: Name: [4], Id: [5], Window Title: '[6]'}. Close that application and retry."),
-(1604, u"The product '[2]' is already installed, preventing the installation of this product. The two products are incompatible."),
-(1605, u"There is not enough disk space on the volume '[2]' to continue the install with recovery enabled. [3] KB are required, but only [4] KB are available. Click Ignore to continue the install without saving recovery information, click Retry to check for available space again, or click Cancel to quit the installation."),
-(1606, u'Could not access network location [2].'),
-(1607, u'The following applications should be closed before continuing the install:'),
-(1608, u'Could not find any previously installed compliant products on the machine for installing this product.'),
-(1609, u"An error occurred while applying security settings. [2] is not a valid user or group. This could be a problem with the package, or a problem connecting to a domain controller on the network. Check your network connection and click Retry, or Cancel to end the install. {{Unable to locate the user's SID, system error [3]}}"),
-(1701, u'The key [2] is not valid. Verify that you entered the correct key.'),
-(1702, u'The installer must restart your system before configuration of [2] can continue. Click Yes to restart now or No if you plan to manually restart later.'),
-(1703, u'You must restart your system for the configuration changes made to [2] to take effect. Click Yes to restart now or No if you plan to manually restart later.'),
-(1704, u'An installation for [2] is currently suspended. You must undo the changes made by that installation to continue. Do you want to undo those changes?'),
-(1705, u'A previous installation for this product is in progress. You must undo the changes made by that installation to continue. Do you want to undo those changes?'),
-(1706, u"An installation package for the product [2] cannot be found. Try the installation again using a valid copy of the installation package '[3]'."),
-(1707, u'Installation completed successfully.'),
-(1708, u'Installation failed.'),
-(1709, u'Product: [2] -- [3]'),
-(1710, u'You may either restore your computer to its previous state or continue the install later. Would you like to restore?'),
-(1711, u'An error occurred while writing installation information to disk. Check to make sure enough disk space is available, and click Retry, or Cancel to end the install.'),
-(1712, u'One or more of the files required to restore your computer to its previous state could not be found. Restoration will not be possible.'),
-(1713, u'[2] cannot install one of its required products. Contact your technical support group. {{System Error: [3].}}'),
-(1714, u'The older version of [2] cannot be removed. Contact your technical support group. {{System Error [3].}}'),
-(1715, u'Installed [2]'),
-(1716, u'Configured [2]'),
-(1717, u'Removed [2]'),
-(1718, u'File [2] was rejected by digital signature policy.'),
-(1719, u'The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.'),
-(1720, u'There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. {{Custom action [2] script error [3], [4]: [5] Line [6], Column [7], [8] }}'),
-(1721, u'There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action: [2], location: [3], command: [4] }}'),
-(1722, u'There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. {{Action [2], location: [3], command: [4] }}'),
-(1723, u'There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action [2], entry: [3], library: [4] }}'),
-(1724, u'Removal completed successfully.'),
-(1725, u'Removal failed.'),
-(1726, u'Advertisement completed successfully.'),
-(1727, u'Advertisement failed.'),
-(1728, u'Configuration completed successfully.'),
-(1729, u'Configuration failed.'),
-(1730, u'You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance.'),
-(1801, u'The path [2] is not valid. Please specify a valid path.'),
-(1802, u'Out of memory. Shut down other applications before retrying.'),
-(1803, u'There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to go back to the previously selected volume.'),
-(1804, u'There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to return to the browse dialog and select a different volume.'),
-(1805, u'The folder [2] does not exist. Please enter a path to an existing folder.'),
-(1806, u'You have insufficient privileges to read this folder.'),
-(1807, u'A valid destination folder for the install could not be determined.'),
-(1901, u'Error attempting to read from the source install database: [2].'),
-(1902, u'Scheduling reboot operation: Renaming file [2] to [3]. Must reboot to complete operation.'),
-(1903, u'Scheduling reboot operation: Deleting file [2]. Must reboot to complete operation.'),
-(1904, u'Module [2] failed to register. HRESULT [3]. Contact your support personnel.'),
-(1905, u'Module [2] failed to unregister. HRESULT [3]. Contact your support personnel.'),
-(1906, u'Failed to cache package [2]. Error: [3]. Contact your support personnel.'),
-(1907, u'Could not register font [2]. Verify that you have sufficient permissions to install fonts, and that the system supports this font.'),
-(1908, u'Could not unregister font [2]. Verify that you that you have sufficient permissions to remove fonts.'),
-(1909, u'Could not create Shortcut [2]. Verify that the destination folder exists and that you can access it.'),
-(1910, u'Could not remove Shortcut [2]. Verify that the shortcut file exists and that you can access it.'),
-(1911, u'Could not register type library for file [2]. Contact your support personnel.'),
-(1912, u'Could not unregister type library for file [2]. Contact your support personnel.'),
-(1913, u'Could not update the ini file [2][3]. Verify that the file exists and that you can access it.'),
-(1914, u'Could not schedule file [2] to replace file [3] on reboot. Verify that you have write permissions to file [3].'),
-(1915, u'Error removing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel.'),
-(1916, u'Error installing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel.'),
-(1917, u'Error removing ODBC driver: [4], ODBC error [2]: [3]. Verify that you have sufficient privileges to remove ODBC drivers.'),
-(1918, u'Error installing ODBC driver: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it.'),
-(1919, u'Error configuring ODBC data source: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it.'),
-(1920, u"Service '[2]' ([3]) failed to start. Verify that you have sufficient privileges to start system services."),
-(1921, u"Service '[2]' ([3]) could not be stopped. Verify that you have sufficient privileges to stop system services."),
-(1922, u"Service '[2]' ([3]) could not be deleted. Verify that you have sufficient privileges to remove system services."),
-(1923, u"Service '[2]' ([3]) could not be installed. Verify that you have sufficient privileges to install system services."),
-(1924, u"Could not update environment variable '[2]'. Verify that you have sufficient privileges to modify environment variables."),
-(1925, u'You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation.'),
-(1926, u"Could not set file security for file '[3]'. Error: [2]. Verify that you have sufficient privileges to modify the security permissions for this file."),
-(1927, u'Component Services (COM+ 1.0) are not installed on this computer. This installation requires Component Services in order to complete successfully. Component Services are available on Windows 2000.'),
-(1928, u'Error registering COM+ Application. Contact your support personnel for more information.'),
-(1929, u'Error unregistering COM+ Application. Contact your support personnel for more information.'),
-(1930, u"The description for service '[2]' ([3]) could not be changed."),
-(1931, u'The Windows Installer service cannot update the system file [2] because the file is protected by Windows. You may need to update your operating system for this program to work correctly. {{Package version: [3], OS Protected version: [4]}}'),
-(1932, u'The Windows Installer service cannot update the protected Windows file [2]. {{Package version: [3], OS Protected version: [4], SFP Error: [5]}}'),
-(1933, u'The Windows Installer service cannot update one or more protected Windows files. {{SFP Error: [2]. List of protected files:\\r\\n[3]}}'),
-(1934, u'User installations are disabled via policy on the machine.'),
-(1935, u'An error occurred during the installation of assembly component [2]. HRESULT: [3]. {{assembly interface: [4], function: [5], assembly name: [6]}}'),
-]
-
-tables=['AdminExecuteSequence', 'AdminUISequence', 'AdvtExecuteSequence', 'BBControl', 'Billboard', 'Binary', 'CheckBox', 'Property', 'ComboBox', 'Control', 'ListBox', 'ActionText', 'ControlCondition', 'ControlEvent', 'Dialog', 'EventMapping', 'InstallExecuteSequence', 'InstallUISequence', 'ListView', 'RadioButton', 'TextStyle', 'UIText', '_Validation', 'Error']
diff --git a/Tools/msi/uploadrelease.bat b/Tools/msi/uploadrelease.bat
new file mode 100644
index 0000000000..4e319ce4c9
--- /dev/null
+++ b/Tools/msi/uploadrelease.bat
@@ -0,0 +1,63 @@
+@setlocal
+@echo off
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set HOST=
+set USER=
+set TARGET=
+set DRYRUN=false
+set NOGPG=
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
+if "%1" EQU "--no-gpg" (set NOGPG=true) && shift && goto CheckOpts
+
+if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK echo Cannot locate plink.exe & exit /B 1
+echo Found plink.exe at %PLINK%
+
+if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
+echo Found pscp.exe at %PSCP%
+
+if defined NOGPG (
+ set GPG=
+ echo Skipping GPG signature generation because of --no-gpg
+) else (
+ if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
+ if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
+ if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
+ echo Found gpg2.exe at %GPG%
+)
+
+call "%PCBUILD%env.bat" > nul 2> nul
+pushd "%D%"
+msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86
+msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false
+msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
+msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
+popd
+exit /B 0
+
+:Help
+echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
+echo.
+echo --host (-o) Specify the upload host (required)
+echo --user (-u) Specify the user on the host (required)
+echo --target (-t) Specify the target directory on the host
+echo --dry-run Display commands and filenames without executing them
+echo -h Display this help information
+echo.
diff --git a/Tools/msi/uploadrelease.proj b/Tools/msi/uploadrelease.proj
new file mode 100644
index 0000000000..0d472dea54
--- /dev/null
+++ b/Tools/msi/uploadrelease.proj
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">$(TARGET)</DownloadUrlBase>
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">/srv/www.python.org/ftp/python</DownloadUrlBase>
+ <IncludeDoc Condition="'$(IncludeDoc)' == ''">true</IncludeDoc>
+ <DryRun Condition="'$(DryRun)' == ''">false</DryRun>
+ </PropertyGroup>
+
+ <Import Project="msi.props" />
+ <Import Project="bundle\bundle.targets" />
+
+ <PropertyGroup>
+ <EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget>
+ <MSITarget>$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, ``).TrimEnd(`/`))</MSITarget>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu">
+ <CopyTo>$(MSITarget)</CopyTo>
+ </File>
+ <File Include="$(OutputPath)\*.exe;$(OutputPath)\*.zip">
+ <CopyTo>$(EXETarget)</CopyTo>
+ </File>
+ <File Include="$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm" Condition="$(IncludeDoc)">
+ <CopyTo>$(EXETarget)</CopyTo>
+ </File>
+ </ItemGroup>
+
+ <Target Name="_ValidateProperties">
+ <Error Text="No value for Host provided" Condition="'$(Host)' == ''" />
+ <Error Text="No value for User provided" Condition="'$(User)' == ''" />
+ <Error Text="No path for PSCP provided" Condition="'$(PSCP)' == ''" />
+ <Error Text="No path for PLINK provided" Condition="'$(PLINK)' == ''" />
+ </Target>
+
+ <Target Name="_RunGpg" Condition="'$(GPG)' != ''" Inputs="@(File)" Outputs="$(IntermediateOutputPath)\gpg\%(FileName)%(Extension).asc">
+ <MakeDir Directories="$(IntermediateOutputPath)gpg" />
+ <Delete Files="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" Condition="Exists('$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc')" />
+ <Exec Command="&quot;$(GPG)&quot; -ba -o &quot;$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc&quot; &quot;%(File.FullPath)&quot;" />
+ <ItemGroup>
+ <File Include="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc">
+ <CopyTo>%(File.CopyTo)</CopyTo>
+ </File>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_Upload" Condition="!$(DryRun)">
+ <Exec Command="&quot;$(PLINK)&quot; $(User)@$(Host) mkdir %(File.CopyTo) ^&amp;^&amp; chgrp downloads %(File.CopyTo) ^&amp;^&amp; chmod g-w,o+rx %(File.CopyTo)
+&quot;$(PSCP)&quot; @(File,' ') $(User)@$(Host):%(File.CopyTo)
+&quot;$(PLINK)&quot; $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
+" />
+ </Target>
+
+ <Target Name="_PrintNames" Condition="$(DryRun)">
+ <Exec Command="echo &quot;$(PLINK)&quot; $(User)@$(Host) mkdir %(File.CopyTo) ^&amp;^&amp; chgrp downloads %(File.CopyTo) ^&amp;^&amp; chmod g-w,o+rx %(File.CopyTo)
+echo &quot;$(PSCP)&quot; @(File,' ') $(User)@$(Host):%(File.CopyTo)
+echo &quot;$(PLINK)&quot; $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
+echo.
+echo." />
+ </Target>
+
+ <Target Name="Upload" DependsOnTargets="_ValidateProperties;_RunGpg;_PrintNames;_Upload" />
+
+ <Target Name="ShowHashes">
+ <ItemGroup>
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
+ </ItemGroup>
+
+ <Exec Command="&quot;$(PythonExe)&quot; generate_md5.py @(UserFiles->'&quot;%(FullPath)&quot;',' ')" />
+ </Target>
+
+ <Target Name="Build">
+ <Error Text="This script should be invoked using uploadrelease.bat." />
+ </Target>
+</Project>
diff --git a/Tools/msi/wix.props b/Tools/msi/wix.props
new file mode 100644
index 0000000000..fbb2d1020e
--- /dev/null
+++ b/Tools/msi/wix.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\..\PCBuild\python.props" />
+
+ <PropertyGroup>
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(MSBuildThisFileDirectory)\Wix')">$(MSBuildThisFileDirectory)\Wix\</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(ExternalsDir)\windows-installer\wix')">$(ExternalsDir)\windows-installer\wix\</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
+ <WixTargetsPath>$(WixInstallPath)\Wix.targets</WixTargetsPath>
+ </PropertyGroup>
+</Project> \ No newline at end of file