summaryrefslogtreecommitdiff
path: root/Tools/msi/bundle
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-10-01 15:18:53 -0700
committerSteve Dower <steve.dower@microsoft.com>2015-10-01 15:18:53 -0700
commitd39a2473ce5c591ba5754be1d88e327170dd5b33 (patch)
treee388000fbdda9b5104d76649272e2245bc766024 /Tools/msi/bundle
parent4f8f674962fac5ea3fdcf38613f2ce6801efd2dc (diff)
downloadcpython-d39a2473ce5c591ba5754be1d88e327170dd5b33.tar.gz
Improves support for building unofficial versions of the Windows installer.
Diffstat (limited to 'Tools/msi/bundle')
-rw-r--r--Tools/msi/bundle/bundle.targets7
-rw-r--r--Tools/msi/bundle/bundle.wxs2
-rw-r--r--Tools/msi/bundle/packagegroups/launcher.wxs4
-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.wxs19
6 files changed, 61 insertions, 22 deletions
diff --git a/Tools/msi/bundle/bundle.targets b/Tools/msi/bundle/bundle.targets
index b77646bec4..9b7d09015f 100644
--- a/Tools/msi/bundle/bundle.targets
+++ b/Tools/msi/bundle/bundle.targets
@@ -16,8 +16,9 @@
<OutputPath>$(OutputPath)en-us\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
- <DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)/$(ArchName)$(ReleaseLevelName)/</DownloadUrl>
- <DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl){2}</DefineConstants>
+ <!-- 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}`, `$(ReleaseName)`).Replace(`{msi}`, `{2}`))</DefineConstants>
<DefineConstants Condition="'$(DownloadUrl)' == ''">$(DefineConstants);DownloadUrl={2}</DefineConstants>
</PropertyGroup>
@@ -88,7 +89,7 @@
<Target Name="BuildLauncher" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
<!-- Build the launcher MSI using Exec rather than MSBuild -->
- <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=$(UseTestMarker)'
+ <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:ReleaseUri="$(ReleaseUri)" /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=$(UseTestMarker)'
ContinueOnError="false" />
</Target>
diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs
index cc62c62106..5e343a25d7 100644
--- a/Tools/msi/bundle/bundle.wxs
+++ b/Tools/msi/bundle/bundle.wxs
@@ -85,6 +85,8 @@
<PackageGroupRef Id="tools" />
<PackageGroupRef Id="tcltk" />
<PackageGroupRef Id="launcher" />
+ <PackageGroupRef Id="pip" />
+ <PackageGroupRef Id="packageinstall" />
<PackageGroupRef Id="postinstall" />
</Chain>
</Bundle>
diff --git a/Tools/msi/bundle/packagegroups/launcher.wxs b/Tools/msi/bundle/packagegroups/launcher.wxs
index 77c6ac5dde..4b03fd29b6 100644
--- a/Tools/msi/bundle/packagegroups/launcher.wxs
+++ b/Tools/msi/bundle/packagegroups/launcher.wxs
@@ -9,6 +9,8 @@
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher" />
<MsiPackage Id="launcher_JustForMe"
@@ -17,6 +19,8 @@
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher" />
</PackageGroup>
</Fragment>
diff --git a/Tools/msi/bundle/packagegroups/packageinstall.wxs b/Tools/msi/bundle/packagegroups/packageinstall.wxs
new file mode 100644
index 0000000000..249d76192a
--- /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='-$(var.ShortVersion)$(var.Suffix32) -m pip install requests-2.7.0-py2.py3-none-any.whl'
+ UninstallCommand='-$(var.ShortVersion)$(var.Suffix32) -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
index b40c2a5a30..90627b9a52 100644
--- a/Tools/msi/bundle/packagegroups/postinstall.wxs
+++ b/Tools/msi/bundle/packagegroups/postinstall.wxs
@@ -2,25 +2,6 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="postinstall">
- <MsiPackage Id="pip_AllUsers"
- SourceFile="pip.msi"
- Compressed="$(var.CompressMSI)"
- DownloadUrl="$(var.DownloadUrl)"
- ForcePerMachine="yes"
- InstallCondition="InstallAllUsers and Include_pip 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>
-
<MsiPackage Id="path_AllUsers"
SourceFile="path.msi"
Compressed="$(var.CompressMSI)"