Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-118347: Fix Windows installer not updating launcher #118386

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes launcher updates not being installed.
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
}

Expand Down Expand Up @@ -2671,7 +2671,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
/*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""
};
Expand Down
4 changes: 2 additions & 2 deletions Tools/msi/bundle/packagegroups/launcher.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?>
Expand All @@ -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 ?>
Expand Down