diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-03-10 15:47:59 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-03-11 20:24:18 -0600 |
| commit | 10ef9d5bfbf81f454113a1c2716009831a916222 (patch) | |
| tree | 9e2fd8c917787ceba5e4c7f873d715eafbda6920 /src/engine/dependency.cpp | |
| parent | 778b65643f19df94947d390a5a17023043d840b4 (diff) | |
| download | wix-10ef9d5bfbf81f454113a1c2716009831a916222.tar.gz wix-10ef9d5bfbf81f454113a1c2716009831a916222.tar.bz2 wix-10ef9d5bfbf81f454113a1c2716009831a916222.zip | |
Determine whether to ignore forward compatible bundles during Plan.
Diffstat (limited to 'src/engine/dependency.cpp')
| -rw-r--r-- | src/engine/dependency.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/engine/dependency.cpp b/src/engine/dependency.cpp index 4833de94..9ab76551 100644 --- a/src/engine/dependency.cpp +++ b/src/engine/dependency.cpp | |||
| @@ -234,6 +234,8 @@ extern "C" HRESULT DependencyDetect( | |||
| 234 | BURN_REGISTRATION* pRegistration = &pEngineState->registration; | 234 | BURN_REGISTRATION* pRegistration = &pEngineState->registration; |
| 235 | STRINGDICT_HANDLE sdIgnoredDependents = NULL; | 235 | STRINGDICT_HANDLE sdIgnoredDependents = NULL; |
| 236 | BURN_PACKAGE* pPackage = NULL; | 236 | BURN_PACKAGE* pPackage = NULL; |
| 237 | BOOL fSelfDependent = NULL != pRegistration->wzSelfDependent; | ||
| 238 | BOOL fActiveParent = NULL != pRegistration->sczActiveParent && NULL != *pRegistration->sczActiveParent; | ||
| 237 | 239 | ||
| 238 | // Always leave this empty so that all dependents get detected. Plan will ignore dependents based on its own logic. | 240 | // Always leave this empty so that all dependents get detected. Plan will ignore dependents based on its own logic. |
| 239 | hr = DictCreateStringList(&sdIgnoredDependents, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE); | 241 | hr = DictCreateStringList(&sdIgnoredDependents, INITIAL_STRINGDICT_SIZE, DICT_FLAG_CASEINSENSITIVE); |
| @@ -263,16 +265,20 @@ extern "C" HRESULT DependencyDetect( | |||
| 263 | ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId); | 265 | ExitOnFailure(hr, "Failed to detect dependents for related bundle '%ls'", pPackage->sczId); |
| 264 | } | 266 | } |
| 265 | 267 | ||
| 266 | if (pRegistration->wzSelfDependent) | 268 | if (fSelfDependent || fActiveParent) |
| 267 | { | 269 | { |
| 268 | for (DWORD i = 0; i < pRegistration->cDependents; ++i) | 270 | for (DWORD i = 0; i < pRegistration->cDependents; ++i) |
| 269 | { | 271 | { |
| 270 | DEPENDENCY* pDependent = pRegistration->rgDependents + i; | 272 | DEPENDENCY* pDependent = pRegistration->rgDependents + i; |
| 271 | 273 | ||
| 272 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->wzSelfDependent, -1, pDependent->sczKey, -1)) | 274 | if (fActiveParent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->sczActiveParent, -1, pDependent->sczKey, -1)) |
| 275 | { | ||
| 276 | pRegistration->fParentRegisteredAsDependent = TRUE; | ||
| 277 | } | ||
| 278 | |||
| 279 | if (fSelfDependent && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pRegistration->wzSelfDependent, -1, pDependent->sczKey, -1)) | ||
| 273 | { | 280 | { |
| 274 | pRegistration->fSelfRegisteredAsDependent = TRUE; | 281 | pRegistration->fSelfRegisteredAsDependent = TRUE; |
| 275 | break; | ||
| 276 | } | 282 | } |
| 277 | } | 283 | } |
| 278 | } | 284 | } |
| @@ -348,17 +354,6 @@ LExit: | |||
| 348 | return hr; | 354 | return hr; |
| 349 | } | 355 | } |
| 350 | 356 | ||
| 351 | extern "C" BOOL DependencyDependentExists( | ||
| 352 | __in const BURN_REGISTRATION* pRegistration, | ||
| 353 | __in_z LPCWSTR wzDependentProviderKey | ||
| 354 | ) | ||
| 355 | { | ||
| 356 | HRESULT hr = S_OK; | ||
| 357 | |||
| 358 | hr = DepDependentExists(pRegistration->hkRoot, pRegistration->sczProviderKey, wzDependentProviderKey); | ||
| 359 | return SUCCEEDED(hr); | ||
| 360 | } | ||
| 361 | |||
| 362 | extern "C" HRESULT DependencyPlanPackageBegin( | 357 | extern "C" HRESULT DependencyPlanPackageBegin( |
| 363 | __in BOOL fPerMachine, | 358 | __in BOOL fPerMachine, |
| 364 | __in BURN_PACKAGE* pPackage, | 359 | __in BURN_PACKAGE* pPackage, |
