[Python-checkins] cpython: Updates Windows installer to promote per-user installs over all-users.

steve.dower python-checkins at python.org
Wed Apr 15 00:40:17 CEST 2015


https://hg.python.org/cpython/rev/966f3b22a67b
changeset:   95668:966f3b22a67b
user:        Steve Dower <steve.dower at microsoft.com>
date:        Tue Apr 14 18:34:04 2015 -0400
summary:
  Updates Windows installer to promote per-user installs over all-users.

files:
  Tools/msi/bundle/Default.thm                                 |  11 ++++-----
  Tools/msi/bundle/Default.wxl                                 |  10 ++++----
  Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp |   5 ++++
  Tools/msi/bundle/bundle.wxs                                  |   2 +-
  4 files changed, 16 insertions(+), 12 deletions(-)


diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm
--- a/Tools/msi/bundle/Default.thm
+++ b/Tools/msi/bundle/Default.thm
@@ -21,8 +21,7 @@
 
         <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
 
-        <Button Name="InstallAllUsersButton" X="175" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.InstallAllUsersButton)</Button>
-        <Button Name="InstallJustForMeButton" X="175" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallJustForMeButton)</Button>
+        <Button Name="InstallJustForMeButton" X="175" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallJustForMeButton)</Button>
         <Button Name="InstallCustomButton" X="175" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
 
         <Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="20" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
@@ -64,9 +63,9 @@
         <Text X="185" Y="11" Width="-11" Height="32" FontId="1" DisablePrefix="yes">#(loc.Custom2Header)</Text>
         <Image X="0" Y="0" Width="162" Height="352" ImageFile="SideBar.png"/>
         
-        <Checkbox Name="AssociateFiles" X="185" Y="51" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
-        <Checkbox Name="PrependPath" X="185" Y="76" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
-        <Checkbox Name="InstallAllUsers" X="185" Y="101" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
+        <Checkbox Name="InstallAllUsers" X="185" Y="51" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
+        <Checkbox Name="AssociateFiles" X="185" Y="76" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
+        <Checkbox Name="PrependPath" X="185" Y="101" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
         <Checkbox Name="CompileAll" X="185" Y="126" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
         <Checkbox Name="Include_symbols" X="185" Y="151" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
         <Checkbox Name="Include_debug" X="185" Y="176" Width="-11" Height="20" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
@@ -74,7 +73,7 @@
         <Text X="185" Y="221" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
         <Editbox Name="TargetDir" X="185" Y="237" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
         <Button Name="CustomBrowseButton" X="-11" Y="236" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
-        <Text X="185" Y="261" Width="-91" Height="35" FontId="5">#(loc.CustomLocationHelpLabel)</Text>
+        <Text Name="CustomBrowseButtonLabel" X="185" Y="261" Width="-91" Height="35" FontId="5" Visible="no">#(loc.CustomLocationHelpLabel)</Text>
 
         <Button Name="Custom2BackButton" X="185" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
         <Button Name="CustomInstallButton" X="-91" Y="-11" Width="95" Height="23" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl
--- a/Tools/msi/bundle/Default.wxl
+++ b/Tools/msi/bundle/Default.wxl
@@ -40,10 +40,10 @@
     Logs to a specific file. By default, log files are created in %TEMP%.</String>
   <String Id="InstallLicenseLinkText">[WixBundleName] <a href="#">license terms</a>.</String>
   <String Id="InstallAcceptCheckbox">I &agree to the license terms and conditions</String>
-  <String Id="InstallAllUsersButton">Install for &All Users</String>
-  <String Id="InstallAllUsersButtonNote">[DefaultAllUsersTargetDir]</String>
-  <String Id="InstallJustForMeButton">Install &Just for Me</String>
-  <String Id="InstallJustForMeButtonNote">[DefaultJustForMeTargetDir]</String>
+  <String Id="InstallJustForMeButton">&Install Now</String>
+  <String Id="InstallJustForMeButtonNote">[DefaultJustForMeTargetDir]
+Includes IDLE and pip
+Creates shortcuts and file associations</String>
   <String Id="InstallCustomButton">C&ustomize installation</String>
   <String Id="InstallCustomButtonNote">Choose location and features</String>
   <String Id="InstallSimpleButton">&Install</String>
@@ -51,7 +51,7 @@
   <String Id="Custom1Header">Optional Features</String>
   <String Id="Custom2Header">Advanced Options</String>
   <String Id="CustomLocationLabel">Customize install location</String>
-  <String Id="CustomLocationHelpLabel">If not installing as administrator, you will require write permissions for this location.</String>
+  <String Id="CustomLocationHelpLabel">You will require write permissions for the selected location.</String>
   <String Id="CustomInstallButton">&Install</String>
   <String Id="CustomNextButton">&Next</String>
   <String Id="CustomBackButton">&Back</String>
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
--- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -90,6 +90,7 @@
     ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX,
     ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX,
     ID_CUSTOM_BROWSE_BUTTON,
+    ID_CUSTOM_BROWSE_BUTTON_LABEL,
     ID_CUSTOM_INSTALL_BUTTON,
     ID_CUSTOM_NEXT_BUTTON,
     ID_CUSTOM1_BACK_BUTTON,
@@ -149,6 +150,7 @@
     { ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, L"AssociateFiles" },
     { ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX, L"InstallAllUsers" },
     { ID_CUSTOM_BROWSE_BUTTON, L"CustomBrowseButton" },
+    { ID_CUSTOM_BROWSE_BUTTON_LABEL, L"CustomBrowseButtonLabel" },
     { ID_CUSTOM_INSTALL_BUTTON, L"CustomInstallButton" },
     { ID_CUSTOM_NEXT_BUTTON, L"CustomNextButton" },
     { ID_CUSTOM1_BACK_BUTTON, L"Custom1BackButton" },
@@ -366,6 +368,7 @@
             hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
             checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
             ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, checked && (FAILED(hr) || !elevated));
+            ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, checked ? SW_HIDE : SW_SHOW);
             ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
             if (targetDir) {
                 // Check the current value against the default to see
@@ -467,8 +470,10 @@
         }
         if (SUCCEEDED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
             ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, installAll && !elevated);
+            ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_HIDE);
         } else {
             installAll = 0;
+            ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_SHOW);
         }
 
         if (SUCCEEDED(BalGetNumericVariable(L"Include_launcher", &includeLauncher)) && includeLauncher) {
diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs
--- a/Tools/msi/bundle/bundle.wxs
+++ b/Tools/msi/bundle/bundle.wxs
@@ -59,7 +59,7 @@
     
     <Variable Name="AssociateFiles" Value="1" Persisted="yes" bal:Overridable="yes" />
     <Variable Name="PrependPath" Value="0" Persisted="yes" bal:Overridable="yes" />
-    <Variable Name="CompileAll" Value="0" Persisted="yes" bal:Overridable="yes" />
+    <Variable Name="CompileAll" Value="1" Persisted="yes" bal:Overridable="yes" />
     
     <Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
     

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list