diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2021-02-15 17:36:45 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2021-02-22 20:25:06 -0600 |
commit | dbd55be5e707f07eb044c8c7f13c3dfd246148c0 (patch) | |
tree | 3c1628524caf1e64f4a8aafc917988424977ba02 /src/engine/plan.cpp | |
parent | b6862716cd27cefa541b85c63dd30dc3f0749d87 (diff) | |
download | wix-dbd55be5e707f07eb044c8c7f13c3dfd246148c0.tar.gz wix-dbd55be5e707f07eb044c8c7f13c3dfd246148c0.tar.bz2 wix-dbd55be5e707f07eb044c8c7f13c3dfd246148c0.zip |
Initialize exe package ancestors during CoreInitialize instead of Plan.
Diffstat (limited to 'src/engine/plan.cpp')
-rw-r--r-- | src/engine/plan.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/engine/plan.cpp b/src/engine/plan.cpp index a11d0e78..99c87163 100644 --- a/src/engine/plan.cpp +++ b/src/engine/plan.cpp | |||
@@ -475,7 +475,7 @@ LExit: | |||
475 | } | 475 | } |
476 | 476 | ||
477 | extern "C" HRESULT PlanPackages( | 477 | extern "C" HRESULT PlanPackages( |
478 | __in BURN_REGISTRATION* pRegistration, | 478 | __in BURN_REGISTRATION* /*pRegistration*/, |
479 | __in BURN_USER_EXPERIENCE* pUX, | 479 | __in BURN_USER_EXPERIENCE* pUX, |
480 | __in BURN_PACKAGES* pPackages, | 480 | __in BURN_PACKAGES* pPackages, |
481 | __in BURN_PLAN* pPlan, | 481 | __in BURN_PLAN* pPlan, |
@@ -498,22 +498,6 @@ extern "C" HRESULT PlanPackages( | |||
498 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? pPackages->cPackages - 1 - i : i; | 498 | DWORD iPackage = (BOOTSTRAPPER_ACTION_UNINSTALL == pPlan->action) ? pPackages->cPackages - 1 - i : i; |
499 | BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; | 499 | BURN_PACKAGE* pPackage = pPackages->rgPackages + iPackage; |
500 | 500 | ||
501 | // Support passing Ancestors to embedded burn bundles | ||
502 | if (BURN_PACKAGE_TYPE_EXE == pPackage->type && BURN_EXE_PROTOCOL_TYPE_BURN == pPackage->Exe.protocol) | ||
503 | { | ||
504 | // Pass along any ancestors and ourself to prevent infinite loops. | ||
505 | if (pRegistration->sczAncestors && *pRegistration->sczAncestors) | ||
506 | { | ||
507 | hr = StrAllocFormatted(&pPackage->Exe.sczAncestors, L"%ls;%ls", pRegistration->sczAncestors, pRegistration->sczId); | ||
508 | ExitOnFailure(hr, "Failed to copy ancestors and self to related bundle ancestors."); | ||
509 | } | ||
510 | else | ||
511 | { | ||
512 | hr = StrAllocString(&pPackage->Exe.sczAncestors, pRegistration->sczId, 0); | ||
513 | ExitOnFailure(hr, "Failed to copy self to related bundle ancestors."); | ||
514 | } | ||
515 | } | ||
516 | |||
517 | hr = ProcessPackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables, display, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary); | 501 | hr = ProcessPackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables, display, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary); |
518 | ExitOnFailure(hr, "Failed to process package."); | 502 | ExitOnFailure(hr, "Failed to process package."); |
519 | } | 503 | } |
@@ -1230,16 +1214,7 @@ extern "C" HRESULT PlanRelatedBundlesBegin( | |||
1230 | } | 1214 | } |
1231 | 1215 | ||
1232 | // Pass along any ancestors and ourself to prevent infinite loops. | 1216 | // Pass along any ancestors and ourself to prevent infinite loops. |
1233 | if (pRegistration->sczAncestors && *pRegistration->sczAncestors) | 1217 | pRelatedBundle->package.Exe.wzAncestors = pRegistration->sczBundlePackageAncestors; |
1234 | { | ||
1235 | hr = StrAllocFormatted(&pRelatedBundle->package.Exe.sczAncestors, L"%ls;%ls", pRegistration->sczAncestors, pRegistration->sczId); | ||
1236 | ExitOnFailure(hr, "Failed to copy ancestors and self to related bundle ancestors."); | ||
1237 | } | ||
1238 | else | ||
1239 | { | ||
1240 | hr = StrAllocString(&pRelatedBundle->package.Exe.sczAncestors, pRegistration->sczId, 0); | ||
1241 | ExitOnFailure(hr, "Failed to copy self to related bundle ancestors."); | ||
1242 | } | ||
1243 | 1218 | ||
1244 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, pPlan->action, pRegistration->pVersion, pRelatedBundle->pVersion, &pRelatedBundle->package.requested); | 1219 | hr = PlanDefaultRelatedBundleRequestState(relationType, pRelatedBundle->relationType, pPlan->action, pRegistration->pVersion, pRelatedBundle->pVersion, &pRelatedBundle->package.requested); |
1245 | ExitOnFailure(hr, "Failed to get default request state for related bundle."); | 1220 | ExitOnFailure(hr, "Failed to get default request state for related bundle."); |