diff options
author | bneuburg <bastian.neuburger@gmail.com> | 2022-01-18 00:18:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 00:18:44 (GMT) |
commit | c47c9e6589eb7a272cfe4d352eb87389eb20ec2f (patch) | |
tree | 715cba1337e28d4d2d78a123e4590963422b700b /Tools/msi/appendpath | |
parent | 9e20ec4d437993715a8d1317a9b80043e6c07fe1 (diff) | |
download | cpython-c47c9e6589eb7a272cfe4d352eb87389eb20ec2f.zip cpython-c47c9e6589eb7a272cfe4d352eb87389eb20ec2f.tar.gz cpython-c47c9e6589eb7a272cfe4d352eb87389eb20ec2f.tar.bz2 |
bpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)
The option must be enabled from the command line
Diffstat (limited to 'Tools/msi/appendpath')
-rw-r--r-- | Tools/msi/appendpath/appendpath.wixproj | 19 | ||||
-rw-r--r-- | Tools/msi/appendpath/appendpath.wxs | 39 | ||||
-rw-r--r-- | Tools/msi/appendpath/appendpath_en-US.wxl | 6 |
3 files changed, 64 insertions, 0 deletions
diff --git a/Tools/msi/appendpath/appendpath.wixproj b/Tools/msi/appendpath/appendpath.wixproj new file mode 100644 index 0000000..8970876 --- /dev/null +++ b/Tools/msi/appendpath/appendpath.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>{12B59A06-37CC-4558-A9C8-DAE922E64EF3}</ProjectGuid> + <SchemaVersion>2.0</SchemaVersion> + <OutputName>appendpath</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> diff --git a/Tools/msi/appendpath/appendpath.wxs b/Tools/msi/appendpath/appendpath.wxs new file mode 100644 index 0000000..b972f61 --- /dev/null +++ b/Tools/msi/appendpath/appendpath.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="AppendPath_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="last" Value="[InstallDirectory]" /> + <Environment Id="SCRIPTS_PATH_CU" Action="set" Name="PATH" Part="last" Value="[Scripts]" /> + </Component> + <Component Id="AppendPath_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="last" Value="[InstallDirectory]" System="yes" /> + <Environment Id="SCRIPTS_PATH_LM" Action="set" Name="PATH" Part="last" 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/appendpath/appendpath_en-US.wxl b/Tools/msi/appendpath/appendpath_en-US.wxl new file mode 100644 index 0000000..19a2e77 --- /dev/null +++ b/Tools/msi/appendpath/appendpath_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">Append to Path</String> + <String Id="ShortDescriptor">AppendPath</String> + <String Id="NoPython">No !(loc.ProductName) installation was detected.</String> +</WixLocalization> |