Skip to content

Commit 7734900

Browse files
committed
Issue python#24317: Makes Customize page default to installing per-user, and switching to All Users enable CompileAll.
1 parent 83f34aa commit 7734900

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ enum CONTROL_ID {
8989
ID_TARGETDIR_EDITBOX,
9090
ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX,
9191
ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX,
92+
ID_CUSTOM_COMPILE_ALL_CHECKBOX,
9293
ID_CUSTOM_BROWSE_BUTTON,
9394
ID_CUSTOM_BROWSE_BUTTON_LABEL,
9495
ID_CUSTOM_INSTALL_BUTTON,
@@ -149,6 +150,7 @@ static THEME_ASSIGN_CONTROL_ID CONTROL_ID_NAMES[] = {
149150
{ ID_TARGETDIR_EDITBOX, L"TargetDir" },
150151
{ ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, L"AssociateFiles" },
151152
{ ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX, L"InstallAllUsers" },
153+
{ ID_CUSTOM_COMPILE_ALL_CHECKBOX, L"CompileAll" },
152154
{ ID_CUSTOM_BROWSE_BUTTON, L"CustomBrowseButton" },
153155
{ ID_CUSTOM_BROWSE_BUTTON_LABEL, L"CustomBrowseButtonLabel" },
154156
{ ID_CUSTOM_INSTALL_BUTTON, L"CustomInstallButton" },
@@ -372,6 +374,10 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
372374
checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
373375
ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, checked && (FAILED(hr) || !elevated));
374376
ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
377+
if (checked) {
378+
_engine->SetVariableNumeric(L"CompileAll", 1);
379+
ThemeSendControlMessage(_theme, ID_CUSTOM_COMPILE_ALL_CHECKBOX, BM_SETCHECK, BST_CHECKED, 0);
380+
}
375381
ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
376382
if (targetDir) {
377383
// Check the current value against the default to see

Tools/msi/bundle/bundle.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" />
2424
<Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
2525

26-
<Variable Name="InstallAllUsers" Value="1" Persisted="yes" bal:Overridable="yes" />
26+
<Variable Name="InstallAllUsers" Value="0" Persisted="yes" bal:Overridable="yes" />
2727
<Variable Name="TargetDir" Value="" Persisted="yes" bal:Overridable="yes" />
2828
<?if $(var.Platform)~="x64" ?>
2929
<Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python [ShortVersion]" bal:Overridable="yes" />
@@ -60,7 +60,7 @@
6060
<Variable Name="AssociateFiles" Value="1" Persisted="yes" bal:Overridable="yes" />
6161
<Variable Name="Shortcuts" Value="1" Persisted="yes" bal:Overridable="yes" />
6262
<Variable Name="PrependPath" Value="0" Persisted="yes" bal:Overridable="yes" />
63-
<Variable Name="CompileAll" Value="1" Persisted="yes" bal:Overridable="yes" />
63+
<Variable Name="CompileAll" Value="0" Persisted="yes" bal:Overridable="yes" />
6464

6565
<Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
6666

0 commit comments

Comments
 (0)