diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-02 18:09:58 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-04 22:16:10 -0600 |
commit | fd8c2b0899bfbce07386af245c04eb21dc01cbdf (patch) | |
tree | 33d928124b0028729916189ddb9f239a9574c75d /src/engine/exeengine.cpp | |
parent | 39725a1a6d1c72a6748bd3c306af32bcae6dbf8f (diff) | |
download | wix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.tar.gz wix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.tar.bz2 wix-fd8c2b0899bfbce07386af245c04eb21dc01cbdf.zip |
Update the logic for determining when the bundle should be registered.
The basic rule is that if a non-permanent package is present at the end of the chain, then the bundle should be registered. If no non-permanent packages are present at the end of the chain, then the bundle should not be registered. This required tracking what actually happened with each package during Apply.
Include cache status in registration calculation.
Include dependency ref-counting when determining whether the bundle should be registered.
Diffstat (limited to 'src/engine/exeengine.cpp')
-rw-r--r-- | src/engine/exeengine.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/engine/exeengine.cpp b/src/engine/exeengine.cpp index fd33d926..1ca28473 100644 --- a/src/engine/exeengine.cpp +++ b/src/engine/exeengine.cpp | |||
@@ -145,6 +145,11 @@ extern "C" HRESULT ExeEngineDetectPackage( | |||
145 | // update detect state | 145 | // update detect state |
146 | pPackage->currentState = fDetected ? BOOTSTRAPPER_PACKAGE_STATE_PRESENT : BOOTSTRAPPER_PACKAGE_STATE_ABSENT; | 146 | pPackage->currentState = fDetected ? BOOTSTRAPPER_PACKAGE_STATE_PRESENT : BOOTSTRAPPER_PACKAGE_STATE_ABSENT; |
147 | 147 | ||
148 | if (pPackage->fCanAffectRegistration) | ||
149 | { | ||
150 | pPackage->installRegistrationState = BOOTSTRAPPER_PACKAGE_STATE_CACHED < pPackage->currentState ? BURN_PACKAGE_REGISTRATION_STATE_PRESENT : BURN_PACKAGE_REGISTRATION_STATE_ABSENT; | ||
151 | } | ||
152 | |||
148 | LExit: | 153 | LExit: |
149 | return hr; | 154 | return hr; |
150 | } | 155 | } |
@@ -585,6 +590,31 @@ LExit: | |||
585 | return hr; | 590 | return hr; |
586 | } | 591 | } |
587 | 592 | ||
593 | extern "C" void ExeEngineUpdateInstallRegistrationState( | ||
594 | __in BURN_EXECUTE_ACTION* pAction, | ||
595 | __in HRESULT hrExecute | ||
596 | ) | ||
597 | { | ||
598 | BURN_PACKAGE* pPackage = pAction->exePackage.pPackage; | ||
599 | |||
600 | if (FAILED(hrExecute) || !pPackage->fCanAffectRegistration) | ||
601 | { | ||
602 | ExitFunction(); | ||
603 | } | ||
604 | |||
605 | if (BOOTSTRAPPER_ACTION_STATE_UNINSTALL == pAction->exePackage.action) | ||
606 | { | ||
607 | pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_ABSENT; | ||
608 | } | ||
609 | else | ||
610 | { | ||
611 | pPackage->installRegistrationState = BURN_PACKAGE_REGISTRATION_STATE_PRESENT; | ||
612 | } | ||
613 | |||
614 | LExit: | ||
615 | return; | ||
616 | } | ||
617 | |||
588 | 618 | ||
589 | // internal helper functions | 619 | // internal helper functions |
590 | 620 | ||