Skip to content

Commit bc94fd7

Browse files
committed
Issue python#25164: Changes default all-users install directory to match per-user directory.
1 parent 992ec46 commit bc94fd7

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ Build
320320
Windows
321321
-------
322322

323+
- Issue #25164: Changes default all-users install directory to match per-user
324+
directory.
325+
323326
- Issue #25143: Improves installer error messages for unsupported platforms.
324327

325328
- Issue #25163: Display correct directory in installer when using non-default

Tools/msi/bundle/bundle.wxs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,22 @@
2222

2323
<Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" />
2424
<Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
25+
<Variable Name="WinVer" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.Suffix32)" />
26+
<Variable Name="WinVerNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.Suffix32)" />
2527

2628
<Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
2729
<Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
2830
<Variable Name="TargetDir" Value="" bal:Overridable="yes" />
2931
<?if $(var.Platform)~="x64" ?>
30-
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" />
32+
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]$(var.TestPrefix)Python[WinVerNoDot]" bal:Overridable="yes" />
3133
<Variable Name="TargetPlatform" Value="x64" />
3234
<?else ?>
33-
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]$(var.TestPrefix)Python [ShortVersion]" bal:Overridable="yes" />
35+
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]$(var.TestPrefix)Python[WinVerNoDot]" bal:Overridable="yes" />
3436
<Variable Name="TargetPlatform" Value="x86" />
3537
<?endif ?>
36-
<Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\$(var.TestPrefix)Python\Python[ShortVersionNoDot]$(var.Suffix32)" bal:Overridable="yes" />
37-
<Variable Name="OptionalFeaturesRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstalledFeatures" />
38-
<Variable Name="TargetDirRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[ShortVersion]$(var.Suffix32)\InstallPath" />
38+
<Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\$(var.TestPrefix)Python\Python[WinVerNoDot]" bal:Overridable="yes" />
39+
<Variable Name="OptionalFeaturesRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[WinVer]\InstalledFeatures" />
40+
<Variable Name="TargetDirRegistryKey" Value="Software\$(var.TestPrefix)Python\PythonCore\[WinVer]\InstallPath" />
3941

4042
<!--
4143
An empty string will use the other defaults based on InstallAllUsers

Tools/msi/bundle/packagegroups/packageinstall.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
SourceFile="py.exe"
1313
Compressed="yes"
1414
DisplayName="!(loc.CompileAllDescription)"
15-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip install requests-2.7.0-py2.py3-none-any.whl'
16-
UninstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip uninstall -y requests'
15+
InstallCommand='-[WinVer] -m pip install requests-2.7.0-py2.py3-none-any.whl'
16+
UninstallCommand='-[WinVer] -m pip uninstall -y requests'
1717
Vital="no"
1818
InstallCondition="Include_pip and not LauncherOnly">
1919
<Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"

Tools/msi/bundle/packagegroups/postinstall.wxs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
SourceFile="py.exe"
2727
Compressed="yes"
2828
DisplayName="!(loc.CompileAllDescription)"
29-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
30-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
29+
InstallCommand='-[WinVer] $(var.CompileAllCommand)'
30+
RepairCommand='-[WinVer] $(var.CompileAllCommand)'
3131
Permanent="yes"
3232
PerMachine="yes"
3333
Vital="no"
@@ -36,8 +36,8 @@
3636
SourceFile="py.exe"
3737
Compressed="yes"
3838
DisplayName="!(loc.CompileAllODescription)"
39-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
40-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
39+
InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
40+
RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
4141
Permanent="yes"
4242
PerMachine="yes"
4343
Vital="no"
@@ -46,8 +46,8 @@
4646
SourceFile="py.exe"
4747
Compressed="yes"
4848
DisplayName="!(loc.CompileAllOODescription)"
49-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
50-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
49+
InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
50+
RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
5151
Permanent="yes"
5252
PerMachine="yes"
5353
Vital="no"
@@ -57,8 +57,8 @@
5757
SourceFile="py.exe"
5858
Compressed="yes"
5959
DisplayName="!(loc.CompileAllDescription)"
60-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
61-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
60+
InstallCommand='-[WinVer] $(var.CompileAllCommand)'
61+
RepairCommand='-[WinVer] $(var.CompileAllCommand)'
6262
Permanent="yes"
6363
PerMachine="no"
6464
Vital="no"
@@ -67,8 +67,8 @@
6767
SourceFile="py.exe"
6868
Compressed="yes"
6969
DisplayName="!(loc.CompileAllODescription)"
70-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
71-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
70+
InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
71+
RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
7272
Permanent="yes"
7373
PerMachine="no"
7474
Vital="no"
@@ -77,8 +77,8 @@
7777
SourceFile="py.exe"
7878
Compressed="yes"
7979
DisplayName="!(loc.CompileAllOODescription)"
80-
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
81-
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
80+
InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
81+
RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
8282
Permanent="yes"
8383
PerMachine="no"
8484
Vital="no"

0 commit comments

Comments
 (0)