]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118347: Fix Windows installer not updating launcher (GH-118386)
authorSteve Dower <steve.dower@python.org>
Mon, 29 Apr 2024 20:46:25 +0000 (21:46 +0100)
committerGitHub <noreply@github.com>
Mon, 29 Apr 2024 20:46:25 +0000 (21:46 +0100)
Misc/NEWS.d/next/Windows/2024-04-29-13-53-25.gh-issue-118347.U5ZRm_.rst [new file with mode: 0644]
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Tools/msi/bundle/packagegroups/launcher.wxs

diff --git a/Misc/NEWS.d/next/Windows/2024-04-29-13-53-25.gh-issue-118347.U5ZRm_.rst b/Misc/NEWS.d/next/Windows/2024-04-29-13-53-25.gh-issue-118347.U5ZRm_.rst
new file mode 100644 (file)
index 0000000..8f02ed9
--- /dev/null
@@ -0,0 +1 @@
+Fixes launcher updates not being installed.
index e0e179e3aede6d953d0a0d6f0d47e9f60e6f4336..7cddda9b06555d8c6f7787b9b14963e262681523 100644 (file)
@@ -464,11 +464,11 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
 
         LOC_STRING *pLocString = nullptr;
         LPCWSTR locKey = L"#(loc.Include_launcherHelp)";
-        LONGLONG detectedLauncher;
+        LONGLONG blockedLauncher;
 
-        if (SUCCEEDED(BalGetNumericVariable(L"DetectedLauncher", &detectedLauncher)) && detectedLauncher) {
+        if (SUCCEEDED(BalGetNumericVariable(L"BlockedLauncher", &blockedLauncher)) && blockedLauncher) {
             locKey = L"#(loc.Include_launcherRemove)";
-        } else if (SUCCEEDED(BalGetNumericVariable(L"DetectedOldLauncher", &detectedLauncher)) && detectedLauncher) {
+        } else if (SUCCEEDED(BalGetNumericVariable(L"DetectedOldLauncher", &blockedLauncher)) && blockedLauncher) {
             locKey = L"#(loc.Include_launcherUpgrade)";
         }
 
@@ -2671,7 +2671,7 @@ private:
                 /*Elevate when installing for all users*/
                 L"InstallAllUsers or "
                 /*Elevate when installing the launcher for all users and it was not detected*/
-                L"(Include_launcher and InstallLauncherAllUsers and not DetectedLauncher)"
+                L"(Include_launcher and InstallLauncherAllUsers and not BlockedLauncher)"
             L")",
             L""
         };
index a6922758f31f14fdf22ea1626336d79e44c670fa..080598a0a486ef48874ba0a3f7acb91cc18cfb2c 100644 (file)
@@ -11,7 +11,7 @@
                         EnableFeatureSelection="yes"
                         Permanent="yes"
                         Visible="yes"
-                        InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
+                        InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not BlockedLauncher">
                 <?if $(var.Platform)~="ARM64" ?>
                 <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
                 <?endif ?>
@@ -25,7 +25,7 @@
                         EnableFeatureSelection="yes"
                         Permanent="yes"
                         Visible="yes"
-                        InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher">
+                        InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not BlockedLauncher">
                 <?if $(var.Platform)~="ARM64" ?>
                 <MsiProperty Name="ARM64_SHELLEXT" Value="1" />
                 <?endif ?>