diff options
Diffstat (limited to 'src/burn/engine')
| -rw-r--r-- | src/burn/engine/core.cpp | 4 | ||||
| -rw-r--r-- | src/burn/engine/package.cpp | 8 | ||||
| -rw-r--r-- | src/burn/engine/plan.cpp | 7 | ||||
| -rw-r--r-- | src/burn/engine/plan.h | 1 | ||||
| -rw-r--r-- | src/burn/engine/registration.cpp | 3 |
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 | ||
| 290 | extern "C" void PlanUninitializeExecuteAction( | 290 | extern "C" void PlanUninitializeExecuteAction( |
| @@ -338,7 +338,6 @@ extern "C" void PlanUninitializeExecuteAction( | |||
| 338 | 338 | ||
| 339 | extern "C" HRESULT PlanSetVariables( | 339 | extern "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 | ); |
| 330 | HRESULT PlanSetVariables( | 330 | HRESULT 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 | |||
| 444 | LExit: | 447 | LExit: |
| 445 | ReleaseStr(scz); | 448 | ReleaseStr(scz); |
| 446 | 449 | ||
