]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Only detects features from previous version when a bundle is found.
authorSteve Dower <steve.dower@microsoft.com>
Mon, 12 Oct 2015 01:05:11 +0000 (18:05 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Mon, 12 Oct 2015 01:05:11 +0000 (18:05 -0700)
Otherwise, stray registry entries would cause issues.
Also fixes an accelerator collision and improves UAC icons when upgrading.

Tools/msi/bundle/Default.wxl
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Tools/msi/bundle/bundle.wxs

index 235f6e4a132a341c5723b9fa73c6c2362f7d14fb..1f3e77c59d39beb3f3713b0c8001e64986773f24 100644 (file)
@@ -52,7 +52,7 @@ Creates shortcuts and file associations</String>
   <String Id="InstallSimpleButtonNote">Use settings preselected by your administrator
 
 [SimpleInstallDescription]</String>
-  <String Id="InstallUpgradeButton">&amp;Upgrade Now</String>
+  <String Id="InstallUpgradeButton">Up&amp;grade Now</String>
   <String Id="InstallUpgradeButtonNote">[TargetDir]
 
 Replaces your existing installation without changing settings.
index 71868a6ce69c9b1063d241e446bff0c555a2d4f2..9d94e3b46f6eb6587bb04e09449a8da88b9c1fdb 100644 (file)
@@ -674,6 +674,8 @@ public: // IBootstrapperApplication
                     hr
                 );
             }
+
+            LoadOptionalFeatureStates(_engine);
         } else if (BOOTSTRAPPER_RELATED_OPERATION_NONE == operation) {
             if (_command.action == BOOTSTRAPPER_ACTION_INSTALL) {
                 LOC_STRING *pLocString = nullptr;
@@ -2556,7 +2558,14 @@ private:
 
     BOOL WillElevate() {
         static BAL_CONDITION WILL_ELEVATE_CONDITION = {
-            L"not WixBundleElevated and (InstallAllUsers or (InstallLauncherAllUsers and Include_launcher))",
+            L"not WixBundleElevated and ("
+                /*Elevate when installing for all users*/
+                L"InstallAllUsers or"
+                /*Elevate when installing the launcher for all users and it was not detected*/
+                L"(InstallLauncherAllUsers and Include_launcher and not DetectedLauncher) or"
+                /*Elevate when the launcher was installed for all users and it is being removed*/
+                L"(DetectedLauncher and DetectedLauncherAllUsers and not Include_launcher)"
+            L")",
             L""
         };
         BOOL result;
@@ -2884,6 +2893,10 @@ private:
             pEngine->SetVariableNumeric(L"Include_launcher", 0);
         } else if (res == ERROR_SUCCESS) {
             pEngine->SetVariableNumeric(L"Include_launcher", 1);
+            pEngine->SetVariableNumeric(L"DetectedLauncher", 1);
+            pEngine->SetVariableNumeric(L"InstallLauncherAllUsers", (hkHive == HKEY_LOCAL_MACHINE) ? 1 : 0);
+            pEngine->SetVariableNumeric(L"DetectedLauncherAllUsers", (hkHive == HKEY_LOCAL_MACHINE) ? 1 : 0);
+            pEngine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
         }
 
         res = RegQueryValueExW(hKey, L"AssociateFiles", nullptr, nullptr, nullptr, nullptr);
@@ -3101,7 +3114,6 @@ public:
         _hBAFModule = nullptr;
         _baFunction = nullptr;
 
-        LoadOptionalFeatureStates(pEngine);
         EnsureTargetDir();
     }
 
index 5e343a25d71bb5656fe483207701827c642766ee..66e09669c146f234e6ba82e3effdd38bf674a8af 100644 (file)
@@ -65,6 +65,7 @@
     <Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
     
     <Variable Name="LauncherOnly" Value="0" bal:Overridable="yes" />
+    <Variable Name="DetectedLauncher" Value="0" />
     
     <Variable Name="AssociateFiles" Value="1" bal:Overridable="yes" />
     <Variable Name="Shortcuts" Value="1" bal:Overridable="yes" />