From 97100c0e3d0e2bd907b41e5583b1f9cb6d9c1a36 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 14 Apr 2015 18:34:04 -0400 Subject: Updates Windows installer to promote per-user installs over all-users. --- 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 index d165e2b..1611e97 100644 --- a/Tools/msi/bundle/Default.thm +++ b/Tools/msi/bundle/Default.thm @@ -21,8 +21,7 @@ #(loc.InstallMessage) - - + #(loc.ShortPrependPathLabel) @@ -64,9 +63,9 @@ #(loc.Custom2Header) - #(loc.AssociateFilesLabel) - #(loc.PrependPathLabel) - #(loc.InstallAllUsersLabel) + #(loc.InstallAllUsersLabel) + #(loc.AssociateFilesLabel) + #(loc.PrependPathLabel) #(loc.PrecompileLabel) #(loc.Include_symbolsLabel) #(loc.Include_debugLabel) @@ -74,7 +73,7 @@ #(loc.CustomLocationLabel) - #(loc.CustomLocationHelpLabel) + #(loc.CustomLocationHelpLabel) diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl index 43057e7..d578c34 100644 --- a/Tools/msi/bundle/Default.wxl +++ b/Tools/msi/bundle/Default.wxl @@ -40,10 +40,10 @@ Continue? Logs to a specific file. By default, log files are created in %TEMP%. [WixBundleName] <a href="#">license terms</a>. I &agree to the license terms and conditions - Install for &All Users - [DefaultAllUsersTargetDir] - Install &Just for Me - [DefaultJustForMeTargetDir] + &Install Now + [DefaultJustForMeTargetDir] +Includes IDLE and pip +Creates shortcuts and file associations C&ustomize installation Choose location and features &Install @@ -51,7 +51,7 @@ Continue? Optional Features Advanced Options Customize install location - If not installing as administrator, you will require write permissions for this location. + You will require write permissions for the selected location. &Install &Next &Back diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp index bc40846..9b41cee 100644 --- a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp +++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp @@ -90,6 +90,7 @@ enum CONTROL_ID { 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 @@ static THEME_ASSIGN_CONTROL_ID CONTROL_ID_NAMES[] = { { 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 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication { 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 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication { } 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 index ef9ed13..57bb4b2 100644 --- a/Tools/msi/bundle/bundle.wxs +++ b/Tools/msi/bundle/bundle.wxs @@ -59,7 +59,7 @@ - + -- cgit v0.12