diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-10-01 22:18:53 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-10-01 22:18:53 (GMT) |
commit | c4b7600b903aca2fec434801d8d185bd2df65076 (patch) | |
tree | 90979e760b88c97ad7e76f93d9353841452ddd94 /Tools/msi/bundle | |
parent | d5963e615dc3a6c8a7cdc02095ad6d647a79fa8d (diff) | |
download | cpython-c4b7600b903aca2fec434801d8d185bd2df65076.zip cpython-c4b7600b903aca2fec434801d8d185bd2df65076.tar.gz cpython-c4b7600b903aca2fec434801d8d185bd2df65076.tar.bz2 |
Improves support for building unofficial versions of the Windows installer.
Diffstat (limited to 'Tools/msi/bundle')
-rw-r--r-- | Tools/msi/bundle/bundle.targets | 7 | ||||
-rw-r--r-- | Tools/msi/bundle/bundle.wxs | 2 | ||||
-rw-r--r-- | Tools/msi/bundle/packagegroups/launcher.wxs | 4 | ||||
-rw-r--r-- | Tools/msi/bundle/packagegroups/packageinstall.wxs | 26 | ||||
-rw-r--r-- | Tools/msi/bundle/packagegroups/pip.wxs | 25 | ||||
-rw-r--r-- | Tools/msi/bundle/packagegroups/postinstall.wxs | 19 |
6 files changed, 61 insertions, 22 deletions
diff --git a/Tools/msi/bundle/bundle.targets b/Tools/msi/bundle/bundle.targets index b77646b..9b7d090 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 cc62c62..5e343a2 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 77c6ac5..4b03fd2 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 0000000..249d761 --- /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 0000000..201a6c4 --- /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 b40c2a5..90627b9 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)" |