aboutsummaryrefslogtreecommitdiff
path: root/src/burn
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2026-02-20 19:18:23 -0500
committerBob Arnson <bob@firegiant.com>2026-02-20 19:18:23 -0500
commit8f3c366e9671dc5d4931dd3de28a42a1f1be32a5 (patch)
treeb9f270a14fe73dc07667cf37ea0232662e7d858b /src/burn
parent96222b03ccc510027cb4d506fb424961cc351e03 (diff)
downloadwix-bob/WixStdBaConfigurableScope.tar.gz
wix-bob/WixStdBaConfigurableScope.tar.bz2
wix-bob/WixStdBaConfigurableScope.zip
Configurable-scope bundles for WixStdBA.bob/WixStdBaConfigurableScope
Fixes https://github.com/wixtoolset/issues/issues/9234 Fixes https://github.com/wixtoolset/issues/issues/9235
Diffstat (limited to 'src/burn')
-rw-r--r--src/burn/engine/core.cpp4
-rw-r--r--src/burn/engine/package.cpp8
-rw-r--r--src/burn/engine/plan.cpp7
-rw-r--r--src/burn/engine/plan.h1
-rw-r--r--src/burn/engine/registration.cpp3
5 files changed, 10 insertions, 13 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp
index 5483e46f..da4ea91b 100644
--- a/src/burn/engine/core.cpp
+++ b/src/burn/engine/core.cpp
@@ -453,7 +453,7 @@ extern "C" HRESULT CorePlan(
453 pEngineState->fPlanned = FALSE; 453 pEngineState->fPlanned = FALSE;
454 PlanReset(&pEngineState->plan, &pEngineState->variables, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads); 454 PlanReset(&pEngineState->plan, &pEngineState->variables, &pEngineState->containers, &pEngineState->packages, &pEngineState->layoutPayloads);
455 455
456 hr = PlanSetVariables(action, pEngineState->registration.scope, pEngineState->plan.plannedScope, &pEngineState->variables); 456 hr = PlanSetVariables(action, pEngineState->plan.plannedScope, &pEngineState->variables);
457 ExitOnFailure(hr, "Failed to update plan variables."); 457 ExitOnFailure(hr, "Failed to update plan variables.");
458 458
459 // Remember the overall action state in the plan since it shapes the changes 459 // Remember the overall action state in the plan since it shapes the changes
@@ -569,7 +569,7 @@ extern "C" HRESULT CorePlan(
569 LogPackages(pUpgradeBundlePackage, pForwardCompatibleBundlePackage, &pEngineState->packages, &pEngineState->registration.relatedBundles, action); 569 LogPackages(pUpgradeBundlePackage, pForwardCompatibleBundlePackage, &pEngineState->packages, &pEngineState->registration.relatedBundles, action);
570 } 570 }
571 571
572 hr = PlanSetVariables(action, pEngineState->registration.scope, pEngineState->plan.plannedScope, &pEngineState->variables); 572 hr = PlanSetVariables(action, pEngineState->plan.plannedScope, &pEngineState->variables);
573 ExitOnFailure(hr, "Failed to update plan variables after planning."); 573 ExitOnFailure(hr, "Failed to update plan variables after planning.");
574 574
575 PlanDump(&pEngineState->plan); 575 PlanDump(&pEngineState->plan);
diff --git a/src/burn/engine/package.cpp b/src/burn/engine/package.cpp
index 61b73dc6..c7517a10 100644
--- a/src/burn/engine/package.cpp
+++ b/src/burn/engine/package.cpp
@@ -607,19 +607,19 @@ extern "C" HRESULT PackageParseScopeFromXml(
607 hr = XmlGetAttributeEx(pixn, L"Scope", &scz); 607 hr = XmlGetAttributeEx(pixn, L"Scope", &scz);
608 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Scope."); 608 ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Scope.");
609 609
610 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perMachine", -1)) 610 if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"perMachine", -1, TRUE))
611 { 611 {
612 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE; 612 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE;
613 } 613 }
614 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perUser", -1)) 614 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"perUser", -1, TRUE))
615 { 615 {
616 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER; 616 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER;
617 } 617 }
618 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perUserOrMachine", -1)) 618 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"perUserOrMachine", -1, TRUE))
619 { 619 {
620 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE; 620 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_USER_OR_PER_MACHINE;
621 } 621 }
622 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, scz, -1, L"perMachineOrUser", -1)) 622 else if (CSTR_EQUAL == ::CompareStringOrdinal(scz, -1, L"perMachineOrUser", -1, TRUE))
623 { 623 {
624 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER; 624 *pScope = BOOTSTRAPPER_PACKAGE_SCOPE_PER_MACHINE_OR_PER_USER;
625 } 625 }
diff --git a/src/burn/engine/plan.cpp b/src/burn/engine/plan.cpp
index 2257b28c..302c1857 100644
--- a/src/burn/engine/plan.cpp
+++ b/src/burn/engine/plan.cpp
@@ -284,7 +284,7 @@ extern "C" void PlanReset(
284 } 284 }
285 } 285 }
286 286
287 PlanSetVariables(BOOTSTRAPPER_ACTION_UNKNOWN, BOOTSTRAPPER_PACKAGE_SCOPE_INVALID, BOOTSTRAPPER_SCOPE_DEFAULT, pVariables); 287 PlanSetVariables(BOOTSTRAPPER_ACTION_UNKNOWN, BOOTSTRAPPER_SCOPE_DEFAULT, pVariables);
288} 288}
289 289
290extern "C" void PlanUninitializeExecuteAction( 290extern "C" void PlanUninitializeExecuteAction(
@@ -338,7 +338,6 @@ extern "C" void PlanUninitializeExecuteAction(
338 338
339extern "C" HRESULT PlanSetVariables( 339extern "C" HRESULT PlanSetVariables(
340 __in BOOTSTRAPPER_ACTION action, 340 __in BOOTSTRAPPER_ACTION action,
341 __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope,
342 __in BOOTSTRAPPER_SCOPE plannedScope, 341 __in BOOTSTRAPPER_SCOPE plannedScope,
343 __in BURN_VARIABLES* pVariables 342 __in BURN_VARIABLES* pVariables
344 ) 343 )
@@ -348,9 +347,6 @@ extern "C" HRESULT PlanSetVariables(
348 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_ACTION, action, TRUE); 347 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_ACTION, action, TRUE);
349 ExitOnFailure(hr, "Failed to set the bundle action built-in variable."); 348 ExitOnFailure(hr, "Failed to set the bundle action built-in variable.");
350 349
351 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_AUTHORED_SCOPE, authoredScope, TRUE);
352 ExitOnFailure(hr, "Failed to set the bundle authored scope built-in variable.");
353
354 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_PLANNED_SCOPE, plannedScope, TRUE); 350 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_PLANNED_SCOPE, plannedScope, TRUE);
355 ExitOnFailure(hr, "Failed to set the bundle planned scope built-in variable."); 351 ExitOnFailure(hr, "Failed to set the bundle planned scope built-in variable.");
356 352
@@ -922,7 +918,6 @@ static HRESULT GetUpgradedBundleScope(
922 918
923 // Is the related bundle's upgrade code the same as ours? 919 // Is the related bundle's upgrade code the same as ours?
924 // If so, lock our scope to the "original" bundle's scope. 920 // If so, lock our scope to the "original" bundle's scope.
925 if (CSTR_EQUAL == ::CompareStringOrdinal(wzRelatedUpgradeCode, -1, wzUpgradeCode, -1, FALSE))
926 if (CSTR_EQUAL == ::CompareStringOrdinal(wzRelatedUpgradeCode, -1, wzUpgradeCode, -1, TRUE)) 921 if (CSTR_EQUAL == ::CompareStringOrdinal(wzRelatedUpgradeCode, -1, wzUpgradeCode, -1, TRUE))
927 { 922 {
928 *pScope = pRelatedBundle->detectedScope; 923 *pScope = pRelatedBundle->detectedScope;
diff --git a/src/burn/engine/plan.h b/src/burn/engine/plan.h
index 09918440..65baca86 100644
--- a/src/burn/engine/plan.h
+++ b/src/burn/engine/plan.h
@@ -329,7 +329,6 @@ void PlanUninitializeExecuteAction(
329 ); 329 );
330HRESULT PlanSetVariables( 330HRESULT PlanSetVariables(
331 __in BOOTSTRAPPER_ACTION action, 331 __in BOOTSTRAPPER_ACTION action,
332 __in BOOTSTRAPPER_PACKAGE_SCOPE authoredScope,
333 __in BOOTSTRAPPER_SCOPE plannedScope, 332 __in BOOTSTRAPPER_SCOPE plannedScope,
334 __in BURN_VARIABLES* pVariables 333 __in BURN_VARIABLES* pVariables
335 ); 334 );
diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp
index 7c9ca182..e7a9b95f 100644
--- a/src/burn/engine/registration.cpp
+++ b/src/burn/engine/registration.cpp
@@ -441,6 +441,9 @@ extern "C" HRESULT RegistrationSetVariables(
441 hr = VariableSetVersion(pVariables, BURN_BUNDLE_VERSION, pRegistration->pVersion, TRUE); 441 hr = VariableSetVersion(pVariables, BURN_BUNDLE_VERSION, pRegistration->pVersion, TRUE);
442 ExitOnFailure(hr, "Failed to overwrite the bundle version built-in variable."); 442 ExitOnFailure(hr, "Failed to overwrite the bundle version built-in variable.");
443 443
444 hr = VariableSetNumeric(pVariables, BURN_BUNDLE_AUTHORED_SCOPE, pRegistration->scope, TRUE);
445 ExitOnFailure(hr, "Failed to set the bundle authored scope built-in variable.");
446
444LExit: 447LExit:
445 ReleaseStr(scz); 448 ReleaseStr(scz);
446 449