diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-24 17:30:28 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-02 15:47:43 -0600 |
| commit | 7cf03f0ecc0a54062548656fadcacfba996cd459 (patch) | |
| tree | c2c64373a13e63dab20a0e8a0692459956c185ec /src/engine/core.cpp | |
| parent | b5c4d92528dd088d0065c634eb1a353c424a4441 (diff) | |
| download | wix-7cf03f0ecc0a54062548656fadcacfba996cd459.tar.gz wix-7cf03f0ecc0a54062548656fadcacfba996cd459.tar.bz2 wix-7cf03f0ecc0a54062548656fadcacfba996cd459.zip | |
Loosen restrictions for actions that don't affect machine state.
Diffstat (limited to 'src/engine/core.cpp')
| -rw-r--r-- | src/engine/core.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index 0a19ac8e..2f18e4d2 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
| @@ -282,7 +282,6 @@ extern "C" HRESULT CoreDetect( | |||
| 282 | // Always reset the detect state which means the plan should be reset too. | 282 | // Always reset the detect state which means the plan should be reset too. |
| 283 | pEngineState->fDetected = FALSE; | 283 | pEngineState->fDetected = FALSE; |
| 284 | pEngineState->fPlanned = FALSE; | 284 | pEngineState->fPlanned = FALSE; |
| 285 | pEngineState->fApplied = FALSE; | ||
| 286 | DetectReset(&pEngineState->registration, &pEngineState->packages); | 285 | DetectReset(&pEngineState->registration, &pEngineState->packages); |
| 287 | PlanReset(&pEngineState->plan, &pEngineState->packages); | 286 | PlanReset(&pEngineState->plan, &pEngineState->packages); |
| 288 | 287 | ||
| @@ -458,7 +457,7 @@ extern "C" HRESULT CorePlan( | |||
| 458 | { | 457 | { |
| 459 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan cannot be done without a successful Detect."); | 458 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan cannot be done without a successful Detect."); |
| 460 | } | 459 | } |
| 461 | else if (pEngineState->fApplied) | 460 | else if (pEngineState->plan.fAffectedMachineState) |
| 462 | { | 461 | { |
| 463 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan requires a new successful Detect after calling Apply."); | 462 | ExitOnFailure(hr = E_INVALIDSTATE, "Plan requires a new successful Detect after calling Apply."); |
| 464 | } | 463 | } |
| @@ -624,7 +623,7 @@ extern "C" HRESULT CoreApply( | |||
| 624 | { | 623 | { |
| 625 | ExitOnFailure(hr = E_INVALIDSTATE, "Apply cannot be done without a successful Plan."); | 624 | ExitOnFailure(hr = E_INVALIDSTATE, "Apply cannot be done without a successful Plan."); |
| 626 | } | 625 | } |
| 627 | else if (pEngineState->fApplied) | 626 | else if (pEngineState->plan.fAffectedMachineState) |
| 628 | { | 627 | { |
| 629 | ExitOnFailure(hr = E_INVALIDSTATE, "Plans cannot be applied multiple times."); | 628 | ExitOnFailure(hr = E_INVALIDSTATE, "Plans cannot be applied multiple times."); |
| 630 | } | 629 | } |
| @@ -644,7 +643,7 @@ extern "C" HRESULT CoreApply( | |||
| 644 | hr = UserExperienceOnApplyBegin(&pEngineState->userExperience, dwPhaseCount); | 643 | hr = UserExperienceOnApplyBegin(&pEngineState->userExperience, dwPhaseCount); |
| 645 | ExitOnRootFailure(hr, "BA aborted apply begin."); | 644 | ExitOnRootFailure(hr, "BA aborted apply begin."); |
| 646 | 645 | ||
| 647 | pEngineState->fApplied = TRUE; | 646 | pEngineState->plan.fAffectedMachineState = pEngineState->plan.fCanAffectMachineState; |
| 648 | 647 | ||
| 649 | // Abort if this bundle already requires a restart. | 648 | // Abort if this bundle already requires a restart. |
| 650 | if (BOOTSTRAPPER_RESUME_TYPE_REBOOT_PENDING == pEngineState->command.resumeType) | 649 | if (BOOTSTRAPPER_RESUME_TYPE_REBOOT_PENDING == pEngineState->command.resumeType) |
| @@ -695,7 +694,7 @@ extern "C" HRESULT CoreApply( | |||
| 695 | } | 694 | } |
| 696 | 695 | ||
| 697 | // Register. | 696 | // Register. |
| 698 | if (pEngineState->plan.fRegister) | 697 | if (pEngineState->plan.fCanAffectMachineState) |
| 699 | { | 698 | { |
| 700 | fRegistered = TRUE; | 699 | fRegistered = TRUE; |
| 701 | hr = ApplyRegister(pEngineState); | 700 | hr = ApplyRegister(pEngineState); |
| @@ -1107,7 +1106,7 @@ extern "C" void CoreCleanup( | |||
| 1107 | 1106 | ||
| 1108 | LogId(REPORT_STANDARD, MSG_CLEANUP_BEGIN); | 1107 | LogId(REPORT_STANDARD, MSG_CLEANUP_BEGIN); |
| 1109 | 1108 | ||
| 1110 | if (pEngineState->fApplied && BOOTSTRAPPER_ACTION_LAYOUT < pEngineState->plan.action && BOOTSTRAPPER_ACTION_UPDATE_REPLACE > pEngineState->plan.action) | 1109 | if (pEngineState->plan.fAffectedMachineState) |
| 1111 | { | 1110 | { |
| 1112 | LogId(REPORT_STANDARD, MSG_CLEANUP_SKIPPED_APPLY); | 1111 | LogId(REPORT_STANDARD, MSG_CLEANUP_SKIPPED_APPLY); |
| 1113 | ExitFunction(); | 1112 | ExitFunction(); |
