diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-21 14:13:16 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-21 14:18:40 +1000 |
commit | 513286d4798572cc82a78554ef15ef2fe79f407e (patch) | |
tree | 3960b579a914c843f56c9045c59d194162d0a9d2 | |
parent | c903a96bd8d61a375448e1a6ad7b40bab8cb24c4 (diff) | |
download | wix-513286d4798572cc82a78554ef15ef2fe79f407e.tar.gz wix-513286d4798572cc82a78554ef15ef2fe79f407e.tar.bz2 wix-513286d4798572cc82a78554ef15ef2fe79f407e.zip |
WIXBUG:5980 Fix bugs around INSTALLUILEVEL_SOURCERESONLY.
Apply requires a valid hWnd since otherwise a source resolution prompt could hang the bundle.
Burn now defaults to INSTALLUILEVEL_NONE by itself if the bundle is not showing UI.
-rw-r--r-- | src/engine/EngineForApplication.cpp | 6 | ||||
-rw-r--r-- | src/engine/core.cpp | 8 | ||||
-rw-r--r-- | src/engine/msiengine.cpp | 14 | ||||
-rw-r--r-- | src/engine/msiengine.h | 2 | ||||
-rw-r--r-- | src/engine/mspengine.cpp | 9 | ||||
-rw-r--r-- | src/engine/mspengine.h | 1 | ||||
-rw-r--r-- | src/engine/plan.cpp | 20 | ||||
-rw-r--r-- | src/engine/plan.h | 4 |
8 files changed, 47 insertions, 17 deletions
diff --git a/src/engine/EngineForApplication.cpp b/src/engine/EngineForApplication.cpp index c3600c7b..e559b438 100644 --- a/src/engine/EngineForApplication.cpp +++ b/src/engine/EngineForApplication.cpp | |||
@@ -709,6 +709,12 @@ static HRESULT BAEngineApply( | |||
709 | { | 709 | { |
710 | HRESULT hr = S_OK; | 710 | HRESULT hr = S_OK; |
711 | 711 | ||
712 | ExitOnNull(pArgs->hwndParent, hr, E_INVALIDARG, "BA passed NULL hwndParent to Apply."); | ||
713 | if (!::IsWindow(pArgs->hwndParent)) | ||
714 | { | ||
715 | ExitOnFailure(hr = E_INVALIDARG, "BA passed invalid hwndParent to Apply."); | ||
716 | } | ||
717 | |||
712 | if (!::PostThreadMessageW(pContext->dwThreadId, WM_BURN_APPLY, 0, reinterpret_cast<LPARAM>(pArgs->hwndParent))) | 718 | if (!::PostThreadMessageW(pContext->dwThreadId, WM_BURN_APPLY, 0, reinterpret_cast<LPARAM>(pArgs->hwndParent))) |
713 | { | 719 | { |
714 | ExitWithLastError(hr, "Failed to post apply message."); | 720 | ExitWithLastError(hr, "Failed to post apply message."); |
diff --git a/src/engine/core.cpp b/src/engine/core.cpp index c153f162..26e74588 100644 --- a/src/engine/core.cpp +++ b/src/engine/core.cpp | |||
@@ -431,7 +431,7 @@ extern "C" HRESULT CorePlan( | |||
431 | ExitOnFailure(hr, "Failed to plan the layout of the bundle."); | 431 | ExitOnFailure(hr, "Failed to plan the layout of the bundle."); |
432 | 432 | ||
433 | // Plan the packages' layout. | 433 | // Plan the packages' layout. |
434 | hr = PlanPackages(&pEngineState->registration, &pEngineState->userExperience, &pEngineState->packages, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, FALSE, pEngineState->command.relationType, sczLayoutDirectory, &hSyncpointEvent); | 434 | hr = PlanPackages(&pEngineState->registration, &pEngineState->userExperience, &pEngineState->packages, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, FALSE, pEngineState->command.display, pEngineState->command.relationType, sczLayoutDirectory, &hSyncpointEvent); |
435 | ExitOnFailure(hr, "Failed to plan packages."); | 435 | ExitOnFailure(hr, "Failed to plan packages."); |
436 | } | 436 | } |
437 | else if (BOOTSTRAPPER_ACTION_UPDATE_REPLACE == action || BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED == action) | 437 | else if (BOOTSTRAPPER_ACTION_UPDATE_REPLACE == action || BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED == action) |
@@ -440,7 +440,7 @@ extern "C" HRESULT CorePlan( | |||
440 | 440 | ||
441 | pUpgradeBundlePackage = &pEngineState->update.package; | 441 | pUpgradeBundlePackage = &pEngineState->update.package; |
442 | 442 | ||
443 | hr = PlanUpdateBundle(&pEngineState->userExperience, pUpgradeBundlePackage, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->command.relationType, &hSyncpointEvent); | 443 | hr = PlanUpdateBundle(&pEngineState->userExperience, pUpgradeBundlePackage, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->command.display, pEngineState->command.relationType, &hSyncpointEvent); |
444 | ExitOnFailure(hr, "Failed to plan update."); | 444 | ExitOnFailure(hr, "Failed to plan update."); |
445 | } | 445 | } |
446 | else if (pEngineState->registration.fEnabledForwardCompatibleBundle) | 446 | else if (pEngineState->registration.fEnabledForwardCompatibleBundle) |
@@ -449,7 +449,7 @@ extern "C" HRESULT CorePlan( | |||
449 | 449 | ||
450 | pForwardCompatibleBundlePackage = &pEngineState->registration.forwardCompatibleBundle; | 450 | pForwardCompatibleBundlePackage = &pEngineState->registration.forwardCompatibleBundle; |
451 | 451 | ||
452 | hr = PlanPassThroughBundle(&pEngineState->userExperience, pForwardCompatibleBundlePackage, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->command.relationType, &hSyncpointEvent); | 452 | hr = PlanPassThroughBundle(&pEngineState->userExperience, pForwardCompatibleBundlePackage, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->command.display, pEngineState->command.relationType, &hSyncpointEvent); |
453 | ExitOnFailure(hr, "Failed to plan passthrough."); | 453 | ExitOnFailure(hr, "Failed to plan passthrough."); |
454 | } | 454 | } |
455 | else // doing an action that modifies the machine state. | 455 | else // doing an action that modifies the machine state. |
@@ -471,7 +471,7 @@ extern "C" HRESULT CorePlan( | |||
471 | hr = PlanRelatedBundlesBegin(&pEngineState->userExperience, &pEngineState->registration, pEngineState->command.relationType, &pEngineState->plan); | 471 | hr = PlanRelatedBundlesBegin(&pEngineState->userExperience, &pEngineState->registration, pEngineState->command.relationType, &pEngineState->plan); |
472 | ExitOnFailure(hr, "Failed to plan related bundles."); | 472 | ExitOnFailure(hr, "Failed to plan related bundles."); |
473 | 473 | ||
474 | hr = PlanPackages(&pEngineState->registration, &pEngineState->userExperience, &pEngineState->packages, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->registration.fInstalled, pEngineState->command.relationType, NULL, &hSyncpointEvent); | 474 | hr = PlanPackages(&pEngineState->registration, &pEngineState->userExperience, &pEngineState->packages, &pEngineState->plan, &pEngineState->log, &pEngineState->variables, pEngineState->registration.fInstalled, pEngineState->command.display, pEngineState->command.relationType, NULL, &hSyncpointEvent); |
475 | ExitOnFailure(hr, "Failed to plan packages."); | 475 | ExitOnFailure(hr, "Failed to plan packages."); |
476 | 476 | ||
477 | // Schedule the update of related bundles last. | 477 | // Schedule the update of related bundles last. |
diff --git a/src/engine/msiengine.cpp b/src/engine/msiengine.cpp index 3f89dde9..8b8121c1 100644 --- a/src/engine/msiengine.cpp +++ b/src/engine/msiengine.cpp | |||
@@ -873,6 +873,7 @@ LExit: | |||
873 | // PlanAdd - adds the calculated execute and rollback actions for the package. | 873 | // PlanAdd - adds the calculated execute and rollback actions for the package. |
874 | // | 874 | // |
875 | extern "C" HRESULT MsiEnginePlanAddPackage( | 875 | extern "C" HRESULT MsiEnginePlanAddPackage( |
876 | __in BOOTSTRAPPER_DISPLAY display, | ||
876 | __in BURN_USER_EXPERIENCE* pUserExperience, | 877 | __in BURN_USER_EXPERIENCE* pUserExperience, |
877 | __in BURN_PACKAGE* pPackage, | 878 | __in BURN_PACKAGE* pPackage, |
878 | __in BURN_PLAN* pPlan, | 879 | __in BURN_PLAN* pPlan, |
@@ -928,7 +929,7 @@ extern "C" HRESULT MsiEnginePlanAddPackage( | |||
928 | pAction->msiPackage.rgFeatures = rgRollbackFeatureActions; | 929 | pAction->msiPackage.rgFeatures = rgRollbackFeatureActions; |
929 | rgRollbackFeatureActions = NULL; | 930 | rgRollbackFeatureActions = NULL; |
930 | 931 | ||
931 | hr = MsiEngineCalculateInstallUiLevel(pUserExperience, pPackage->sczId, FALSE, pAction->msiPackage.action, | 932 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, FALSE, pAction->msiPackage.action, |
932 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); | 933 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); |
933 | ExitOnFailure(hr, "Failed to get msi ui options."); | 934 | ExitOnFailure(hr, "Failed to get msi ui options."); |
934 | 935 | ||
@@ -954,7 +955,7 @@ extern "C" HRESULT MsiEnginePlanAddPackage( | |||
954 | pAction->msiPackage.rgFeatures = rgFeatureActions; | 955 | pAction->msiPackage.rgFeatures = rgFeatureActions; |
955 | rgFeatureActions = NULL; | 956 | rgFeatureActions = NULL; |
956 | 957 | ||
957 | hr = MsiEngineCalculateInstallUiLevel(pUserExperience, pPackage->sczId, TRUE, pAction->msiPackage.action, | 958 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, TRUE, pAction->msiPackage.action, |
958 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); | 959 | &pAction->msiPackage.actionMsiProperty, &pAction->msiPackage.uiLevel, &pAction->msiPackage.fDisableExternalUiHandler); |
959 | ExitOnFailure(hr, "Failed to get msi ui options."); | 960 | ExitOnFailure(hr, "Failed to get msi ui options."); |
960 | 961 | ||
@@ -1416,6 +1417,7 @@ LExit: | |||
1416 | } | 1417 | } |
1417 | 1418 | ||
1418 | extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | 1419 | extern "C" HRESULT MsiEngineCalculateInstallUiLevel( |
1420 | __in BOOTSTRAPPER_DISPLAY display, | ||
1419 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1421 | __in BURN_USER_EXPERIENCE* pUserExperience, |
1420 | __in LPCWSTR wzPackageId, | 1422 | __in LPCWSTR wzPackageId, |
1421 | __in BOOL fExecute, | 1423 | __in BOOL fExecute, |
@@ -1425,9 +1427,15 @@ extern "C" HRESULT MsiEngineCalculateInstallUiLevel( | |||
1425 | __out BOOL* pfDisableExternalUiHandler | 1427 | __out BOOL* pfDisableExternalUiHandler |
1426 | ) | 1428 | ) |
1427 | { | 1429 | { |
1428 | *pUiLevel = static_cast<INSTALLUILEVEL>(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY); | 1430 | *pUiLevel = INSTALLUILEVEL_NONE; |
1429 | *pfDisableExternalUiHandler = FALSE; | 1431 | *pfDisableExternalUiHandler = FALSE; |
1430 | 1432 | ||
1433 | if (BOOTSTRAPPER_DISPLAY_FULL == display || | ||
1434 | BOOTSTRAPPER_DISPLAY_PASSIVE == display) | ||
1435 | { | ||
1436 | *pUiLevel = static_cast<INSTALLUILEVEL>(*pUiLevel | INSTALLUILEVEL_SOURCERESONLY); | ||
1437 | } | ||
1438 | |||
1431 | switch (actionState) | 1439 | switch (actionState) |
1432 | { | 1440 | { |
1433 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: | 1441 | case BOOTSTRAPPER_ACTION_STATE_UNINSTALL: |
diff --git a/src/engine/msiengine.h b/src/engine/msiengine.h index cbe80262..04c375c2 100644 --- a/src/engine/msiengine.h +++ b/src/engine/msiengine.h | |||
@@ -32,6 +32,7 @@ HRESULT MsiEnginePlanCalculatePackage( | |||
32 | __out_opt BOOL* pfBARequestedCache | 32 | __out_opt BOOL* pfBARequestedCache |
33 | ); | 33 | ); |
34 | HRESULT MsiEnginePlanAddPackage( | 34 | HRESULT MsiEnginePlanAddPackage( |
35 | __in BOOTSTRAPPER_DISPLAY display, | ||
35 | __in BURN_USER_EXPERIENCE* pUserExperience, | 36 | __in BURN_USER_EXPERIENCE* pUserExperience, |
36 | __in BURN_PACKAGE* pPackage, | 37 | __in BURN_PACKAGE* pPackage, |
37 | __in BURN_PLAN* pPlan, | 38 | __in BURN_PLAN* pPlan, |
@@ -67,6 +68,7 @@ HRESULT MsiEngineConcatProperties( | |||
67 | __in BOOL fObfuscateHiddenVariables | 68 | __in BOOL fObfuscateHiddenVariables |
68 | ); | 69 | ); |
69 | HRESULT MsiEngineCalculateInstallUiLevel( | 70 | HRESULT MsiEngineCalculateInstallUiLevel( |
71 | __in BOOTSTRAPPER_DISPLAY display, | ||
70 | __in BURN_USER_EXPERIENCE* pUserExperience, | 72 | __in BURN_USER_EXPERIENCE* pUserExperience, |
71 | __in LPCWSTR wzPackageId, | 73 | __in LPCWSTR wzPackageId, |
72 | __in BOOL fExecute, | 74 | __in BOOL fExecute, |
diff --git a/src/engine/mspengine.cpp b/src/engine/mspengine.cpp index 0dddb366..57321d75 100644 --- a/src/engine/mspengine.cpp +++ b/src/engine/mspengine.cpp | |||
@@ -44,6 +44,7 @@ static void DeterminePatchChainedTarget( | |||
44 | __out BOOL* pfSlipstreamed | 44 | __out BOOL* pfSlipstreamed |
45 | ); | 45 | ); |
46 | static HRESULT PlanTargetProduct( | 46 | static HRESULT PlanTargetProduct( |
47 | __in BOOTSTRAPPER_DISPLAY display, | ||
47 | __in BURN_USER_EXPERIENCE* pUserExperience, | 48 | __in BURN_USER_EXPERIENCE* pUserExperience, |
48 | __in BOOL fRollback, | 49 | __in BOOL fRollback, |
49 | __in BURN_PLAN* pPlan, | 50 | __in BURN_PLAN* pPlan, |
@@ -396,6 +397,7 @@ LExit: | |||
396 | // PlanAdd - adds the calculated execute and rollback actions for the package. | 397 | // PlanAdd - adds the calculated execute and rollback actions for the package. |
397 | // | 398 | // |
398 | extern "C" HRESULT MspEnginePlanAddPackage( | 399 | extern "C" HRESULT MspEnginePlanAddPackage( |
400 | __in BOOTSTRAPPER_DISPLAY display, | ||
399 | __in BURN_USER_EXPERIENCE* pUserExperience, | 401 | __in BURN_USER_EXPERIENCE* pUserExperience, |
400 | __in BURN_PACKAGE* pPackage, | 402 | __in BURN_PACKAGE* pPackage, |
401 | __in BURN_PLAN* pPlan, | 403 | __in BURN_PLAN* pPlan, |
@@ -433,13 +435,13 @@ extern "C" HRESULT MspEnginePlanAddPackage( | |||
433 | 435 | ||
434 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pTargetProduct->execute) | 436 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pTargetProduct->execute) |
435 | { | 437 | { |
436 | hr = PlanTargetProduct(pUserExperience, FALSE, pPlan, pLog, pVariables, pTargetProduct->execute, pPackage, pTargetProduct, hCacheEvent); | 438 | hr = PlanTargetProduct(display, pUserExperience, FALSE, pPlan, pLog, pVariables, pTargetProduct->execute, pPackage, pTargetProduct, hCacheEvent); |
437 | ExitOnFailure(hr, "Failed to plan target product."); | 439 | ExitOnFailure(hr, "Failed to plan target product."); |
438 | } | 440 | } |
439 | 441 | ||
440 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pTargetProduct->rollback) | 442 | if (BOOTSTRAPPER_ACTION_STATE_NONE != pTargetProduct->rollback) |
441 | { | 443 | { |
442 | hr = PlanTargetProduct(pUserExperience, TRUE, pPlan, pLog, pVariables, pTargetProduct->rollback, pPackage, pTargetProduct, hCacheEvent); | 444 | hr = PlanTargetProduct(display, pUserExperience, TRUE, pPlan, pLog, pVariables, pTargetProduct->rollback, pPackage, pTargetProduct, hCacheEvent); |
443 | ExitOnFailure(hr, "Failed to plan rollack target product."); | 445 | ExitOnFailure(hr, "Failed to plan rollack target product."); |
444 | } | 446 | } |
445 | } | 447 | } |
@@ -877,6 +879,7 @@ static void DeterminePatchChainedTarget( | |||
877 | } | 879 | } |
878 | 880 | ||
879 | static HRESULT PlanTargetProduct( | 881 | static HRESULT PlanTargetProduct( |
882 | __in BOOTSTRAPPER_DISPLAY display, | ||
880 | __in BURN_USER_EXPERIENCE* pUserExperience, | 883 | __in BURN_USER_EXPERIENCE* pUserExperience, |
881 | __in BOOL fRollback, | 884 | __in BOOL fRollback, |
882 | __in BURN_PLAN* pPlan, | 885 | __in BURN_PLAN* pPlan, |
@@ -934,7 +937,7 @@ static HRESULT PlanTargetProduct( | |||
934 | hr = StrAllocString(&pAction->mspTarget.sczTargetProductCode, pTargetProduct->wzTargetProductCode, 0); | 937 | hr = StrAllocString(&pAction->mspTarget.sczTargetProductCode, pTargetProduct->wzTargetProductCode, 0); |
935 | ExitOnFailure(hr, "Failed to copy target product code."); | 938 | ExitOnFailure(hr, "Failed to copy target product code."); |
936 | 939 | ||
937 | hr = MsiEngineCalculateInstallUiLevel(pUserExperience, pPackage->sczId, !fRollback, pAction->mspTarget.action, | 940 | hr = MsiEngineCalculateInstallUiLevel(display, pUserExperience, pPackage->sczId, !fRollback, pAction->mspTarget.action, |
938 | &pAction->mspTarget.actionMsiProperty, &pAction->mspTarget.uiLevel, &pAction->mspTarget.fDisableExternalUiHandler); | 941 | &pAction->mspTarget.actionMsiProperty, &pAction->mspTarget.uiLevel, &pAction->mspTarget.fDisableExternalUiHandler); |
939 | ExitOnFailure(hr, "Failed to get msp ui options."); | 942 | ExitOnFailure(hr, "Failed to get msp ui options."); |
940 | 943 | ||
diff --git a/src/engine/mspengine.h b/src/engine/mspengine.h index 0f323e57..1f0c31df 100644 --- a/src/engine/mspengine.h +++ b/src/engine/mspengine.h | |||
@@ -38,6 +38,7 @@ HRESULT MspEnginePlanCalculatePackage( | |||
38 | __out_opt BOOL* pfBARequestedCache | 38 | __out_opt BOOL* pfBARequestedCache |
39 | ); | 39 | ); |
40 | HRESULT MspEnginePlanAddPackage( | 40 | HRESULT MspEnginePlanAddPackage( |
41 | __in BOOTSTRAPPER_DISPLAY display, | ||
41 | __in BURN_USER_EXPERIENCE* pUserExperience, | 42 | __in BURN_USER_EXPERIENCE* pUserExperience, |
42 | __in BURN_PACKAGE* pPackage, | 43 | __in BURN_PACKAGE* pPackage, |
43 | __in BURN_PLAN* pPlan, | 44 | __in BURN_PLAN* pPlan, |
diff --git a/src/engine/plan.cpp b/src/engine/plan.cpp index 02f5be23..0b040bf8 100644 --- a/src/engine/plan.cpp +++ b/src/engine/plan.cpp | |||
@@ -31,6 +31,7 @@ static HRESULT ProcessPackage( | |||
31 | __in BURN_PACKAGE* pPackage, | 31 | __in BURN_PACKAGE* pPackage, |
32 | __in BURN_LOGGING* pLog, | 32 | __in BURN_LOGGING* pLog, |
33 | __in BURN_VARIABLES* pVariables, | 33 | __in BURN_VARIABLES* pVariables, |
34 | __in BOOTSTRAPPER_DISPLAY display, | ||
34 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 35 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
35 | __in_z_opt LPCWSTR wzLayoutDirectory, | 36 | __in_z_opt LPCWSTR wzLayoutDirectory, |
36 | __inout HANDLE* phSyncpointEvent, | 37 | __inout HANDLE* phSyncpointEvent, |
@@ -472,6 +473,7 @@ extern "C" HRESULT PlanPackages( | |||
472 | __in BURN_LOGGING* pLog, | 473 | __in BURN_LOGGING* pLog, |
473 | __in BURN_VARIABLES* pVariables, | 474 | __in BURN_VARIABLES* pVariables, |
474 | __in BOOL fBundleInstalled, | 475 | __in BOOL fBundleInstalled, |
476 | __in BOOTSTRAPPER_DISPLAY display, | ||
475 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 477 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
476 | __in_z_opt LPCWSTR wzLayoutDirectory, | 478 | __in_z_opt LPCWSTR wzLayoutDirectory, |
477 | __inout HANDLE* phSyncpointEvent | 479 | __inout HANDLE* phSyncpointEvent |
@@ -509,7 +511,7 @@ extern "C" HRESULT PlanPackages( | |||
509 | } | 511 | } |
510 | } | 512 | } |
511 | 513 | ||
512 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary, &nonpermanentPackageIndices); | 514 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, display, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary, &nonpermanentPackageIndices); |
513 | ExitOnFailure(hr, "Failed to process package."); | 515 | ExitOnFailure(hr, "Failed to process package."); |
514 | 516 | ||
515 | // Attempt to remove orphaned packages during uninstall. Currently only MSI packages are supported and should not require source. | 517 | // Attempt to remove orphaned packages during uninstall. Currently only MSI packages are supported and should not require source. |
@@ -534,7 +536,7 @@ extern "C" HRESULT PlanPackages( | |||
534 | ExitOnFailure(hr, "Failed to copy installed ProductCode"); | 536 | ExitOnFailure(hr, "Failed to copy installed ProductCode"); |
535 | 537 | ||
536 | // Process the compatible MSI package like any other. | 538 | // Process the compatible MSI package like any other. |
537 | hr = ProcessPackage(fBundlePerMachine, pPackage, pUX, pPlan, pCompatiblePackage, pLog, pVariables, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary, &nonpermanentPackageIndices); | 539 | hr = ProcessPackage(fBundlePerMachine, pPackage, pUX, pPlan, pCompatiblePackage, pLog, pVariables, display, relationType, wzLayoutDirectory, phSyncpointEvent, &pRollbackBoundary, &nonpermanentPackageIndices); |
538 | ExitOnFailure(hr, "Failed to process compatible package."); | 540 | ExitOnFailure(hr, "Failed to process compatible package."); |
539 | 541 | ||
540 | if (BOOTSTRAPPER_ACTION_STATE_UNINSTALL == pCompatiblePackage->execute) | 542 | if (BOOTSTRAPPER_ACTION_STATE_UNINSTALL == pCompatiblePackage->execute) |
@@ -785,6 +787,7 @@ extern "C" HRESULT PlanPassThroughBundle( | |||
785 | __in BURN_PLAN* pPlan, | 787 | __in BURN_PLAN* pPlan, |
786 | __in BURN_LOGGING* pLog, | 788 | __in BURN_LOGGING* pLog, |
787 | __in BURN_VARIABLES* pVariables, | 789 | __in BURN_VARIABLES* pVariables, |
790 | __in BOOTSTRAPPER_DISPLAY display, | ||
788 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 791 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
789 | __inout HANDLE* phSyncpointEvent | 792 | __inout HANDLE* phSyncpointEvent |
790 | ) | 793 | ) |
@@ -794,7 +797,7 @@ extern "C" HRESULT PlanPassThroughBundle( | |||
794 | BURN_ROLLBACK_BOUNDARY* pRollbackBoundary = NULL; | 797 | BURN_ROLLBACK_BOUNDARY* pRollbackBoundary = NULL; |
795 | 798 | ||
796 | // Plan passthrough package. | 799 | // Plan passthrough package. |
797 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, relationType, NULL, phSyncpointEvent, &pRollbackBoundary, NULL); | 800 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, display, relationType, NULL, phSyncpointEvent, &pRollbackBoundary, NULL); |
798 | ExitOnFailure(hr, "Failed to process passthrough package."); | 801 | ExitOnFailure(hr, "Failed to process passthrough package."); |
799 | 802 | ||
800 | // If we still have an open rollback boundary, complete it. | 803 | // If we still have an open rollback boundary, complete it. |
@@ -818,6 +821,7 @@ extern "C" HRESULT PlanUpdateBundle( | |||
818 | __in BURN_PLAN* pPlan, | 821 | __in BURN_PLAN* pPlan, |
819 | __in BURN_LOGGING* pLog, | 822 | __in BURN_LOGGING* pLog, |
820 | __in BURN_VARIABLES* pVariables, | 823 | __in BURN_VARIABLES* pVariables, |
824 | __in BOOTSTRAPPER_DISPLAY display, | ||
821 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 825 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
822 | __inout HANDLE* phSyncpointEvent | 826 | __inout HANDLE* phSyncpointEvent |
823 | ) | 827 | ) |
@@ -827,7 +831,7 @@ extern "C" HRESULT PlanUpdateBundle( | |||
827 | BURN_ROLLBACK_BOUNDARY* pRollbackBoundary = NULL; | 831 | BURN_ROLLBACK_BOUNDARY* pRollbackBoundary = NULL; |
828 | 832 | ||
829 | // Plan update package. | 833 | // Plan update package. |
830 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, relationType, NULL, phSyncpointEvent, &pRollbackBoundary, NULL); | 834 | hr = ProcessPackage(fBundlePerMachine, NULL, pUX, pPlan, pPackage, pLog, pVariables, display, relationType, NULL, phSyncpointEvent, &pRollbackBoundary, NULL); |
831 | ExitOnFailure(hr, "Failed to process update package."); | 835 | ExitOnFailure(hr, "Failed to process update package."); |
832 | 836 | ||
833 | // If we still have an open rollback boundary, complete it. | 837 | // If we still have an open rollback boundary, complete it. |
@@ -853,6 +857,7 @@ static HRESULT ProcessPackage( | |||
853 | __in BURN_PACKAGE* pPackage, | 857 | __in BURN_PACKAGE* pPackage, |
854 | __in BURN_LOGGING* pLog, | 858 | __in BURN_LOGGING* pLog, |
855 | __in BURN_VARIABLES* pVariables, | 859 | __in BURN_VARIABLES* pVariables, |
860 | __in BOOTSTRAPPER_DISPLAY display, | ||
856 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 861 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
857 | __in_z_opt LPCWSTR wzLayoutDirectory, | 862 | __in_z_opt LPCWSTR wzLayoutDirectory, |
858 | __inout HANDLE* phSyncpointEvent, | 863 | __inout HANDLE* phSyncpointEvent, |
@@ -906,7 +911,7 @@ static HRESULT ProcessPackage( | |||
906 | } | 911 | } |
907 | } | 912 | } |
908 | 913 | ||
909 | hr = PlanExecutePackage(fBundlePerMachine, pUX, pPlan, pPackage, pLog, pVariables, phSyncpointEvent); | 914 | hr = PlanExecutePackage(fBundlePerMachine, display, pUX, pPlan, pPackage, pLog, pVariables, phSyncpointEvent); |
910 | ExitOnFailure(hr, "Failed to plan execute package."); | 915 | ExitOnFailure(hr, "Failed to plan execute package."); |
911 | 916 | ||
912 | if (pPackage->fUninstallable && pNonpermanentPackageIndices) | 917 | if (pPackage->fUninstallable && pNonpermanentPackageIndices) |
@@ -1086,6 +1091,7 @@ LExit: | |||
1086 | 1091 | ||
1087 | extern "C" HRESULT PlanExecutePackage( | 1092 | extern "C" HRESULT PlanExecutePackage( |
1088 | __in BOOL fPerMachine, | 1093 | __in BOOL fPerMachine, |
1094 | __in BOOTSTRAPPER_DISPLAY display, | ||
1089 | __in BURN_USER_EXPERIENCE* pUserExperience, | 1095 | __in BURN_USER_EXPERIENCE* pUserExperience, |
1090 | __in BURN_PLAN* pPlan, | 1096 | __in BURN_PLAN* pPlan, |
1091 | __in BURN_PACKAGE* pPackage, | 1097 | __in BURN_PACKAGE* pPackage, |
@@ -1150,11 +1156,11 @@ extern "C" HRESULT PlanExecutePackage( | |||
1150 | break; | 1156 | break; |
1151 | 1157 | ||
1152 | case BURN_PACKAGE_TYPE_MSI: | 1158 | case BURN_PACKAGE_TYPE_MSI: |
1153 | hr = MsiEnginePlanAddPackage(pUserExperience, pPackage, pPlan, pLog, pVariables, *phSyncpointEvent, pPackage->fAcquire); | 1159 | hr = MsiEnginePlanAddPackage(display, pUserExperience, pPackage, pPlan, pLog, pVariables, *phSyncpointEvent, pPackage->fAcquire); |
1154 | break; | 1160 | break; |
1155 | 1161 | ||
1156 | case BURN_PACKAGE_TYPE_MSP: | 1162 | case BURN_PACKAGE_TYPE_MSP: |
1157 | hr = MspEnginePlanAddPackage(pUserExperience, pPackage, pPlan, pLog, pVariables, *phSyncpointEvent, pPackage->fAcquire); | 1163 | hr = MspEnginePlanAddPackage(display, pUserExperience, pPackage, pPlan, pLog, pVariables, *phSyncpointEvent, pPackage->fAcquire); |
1158 | break; | 1164 | break; |
1159 | 1165 | ||
1160 | case BURN_PACKAGE_TYPE_MSU: | 1166 | case BURN_PACKAGE_TYPE_MSU: |
diff --git a/src/engine/plan.h b/src/engine/plan.h index 89f4b4bf..db9745e9 100644 --- a/src/engine/plan.h +++ b/src/engine/plan.h | |||
@@ -408,6 +408,7 @@ HRESULT PlanPackages( | |||
408 | __in BURN_LOGGING* pLog, | 408 | __in BURN_LOGGING* pLog, |
409 | __in BURN_VARIABLES* pVariables, | 409 | __in BURN_VARIABLES* pVariables, |
410 | __in BOOL fBundleInstalled, | 410 | __in BOOL fBundleInstalled, |
411 | __in BOOTSTRAPPER_DISPLAY display, | ||
411 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 412 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
412 | __in_z_opt LPCWSTR wzLayoutDirectory, | 413 | __in_z_opt LPCWSTR wzLayoutDirectory, |
413 | __inout HANDLE* phSyncpointEvent | 414 | __inout HANDLE* phSyncpointEvent |
@@ -426,6 +427,7 @@ HRESULT PlanPassThroughBundle( | |||
426 | __in BURN_PLAN* pPlan, | 427 | __in BURN_PLAN* pPlan, |
427 | __in BURN_LOGGING* pLog, | 428 | __in BURN_LOGGING* pLog, |
428 | __in BURN_VARIABLES* pVariables, | 429 | __in BURN_VARIABLES* pVariables, |
430 | __in BOOTSTRAPPER_DISPLAY display, | ||
429 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 431 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
430 | __inout HANDLE* phSyncpointEvent | 432 | __inout HANDLE* phSyncpointEvent |
431 | ); | 433 | ); |
@@ -435,6 +437,7 @@ HRESULT PlanUpdateBundle( | |||
435 | __in BURN_PLAN* pPlan, | 437 | __in BURN_PLAN* pPlan, |
436 | __in BURN_LOGGING* pLog, | 438 | __in BURN_LOGGING* pLog, |
437 | __in BURN_VARIABLES* pVariables, | 439 | __in BURN_VARIABLES* pVariables, |
440 | __in BOOTSTRAPPER_DISPLAY display, | ||
438 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | 441 | __in BOOTSTRAPPER_RELATION_TYPE relationType, |
439 | __inout HANDLE* phSyncpointEvent | 442 | __inout HANDLE* phSyncpointEvent |
440 | ); | 443 | ); |
@@ -453,6 +456,7 @@ HRESULT PlanCachePackage( | |||
453 | ); | 456 | ); |
454 | HRESULT PlanExecutePackage( | 457 | HRESULT PlanExecutePackage( |
455 | __in BOOL fPerMachine, | 458 | __in BOOL fPerMachine, |
459 | __in BOOTSTRAPPER_DISPLAY display, | ||
456 | __in BURN_USER_EXPERIENCE* pUserExperience, | 460 | __in BURN_USER_EXPERIENCE* pUserExperience, |
457 | __in BURN_PLAN* pPlan, | 461 | __in BURN_PLAN* pPlan, |
458 | __in BURN_PACKAGE* pPackage, | 462 | __in BURN_PACKAGE* pPackage, |