diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2021-12-15 10:48:06 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2021-12-30 15:00:45 -0600 |
| commit | 9e2cda60e3852660f235beb5e0af1c746d0045e6 (patch) | |
| tree | 8fca357e80bf638750fe900c4803a081e16adee8 /src/burn/engine/userexperience.cpp | |
| parent | 07599b27596af68f0917c1afc6a748af3a3cda2f (diff) | |
| download | wix-9e2cda60e3852660f235beb5e0af1c746d0045e6.tar.gz wix-9e2cda60e3852660f235beb5e0af1c746d0045e6.tar.bz2 wix-9e2cda60e3852660f235beb5e0af1c746d0045e6.zip | |
FilesInUse messages are too different to unify in the Burn engine.
Fixes #6348
Diffstat (limited to 'src/burn/engine/userexperience.cpp')
| -rw-r--r-- | src/burn/engine/userexperience.cpp | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/src/burn/engine/userexperience.cpp b/src/burn/engine/userexperience.cpp index a6d670ea..7cc6f049 100644 --- a/src/burn/engine/userexperience.cpp +++ b/src/burn/engine/userexperience.cpp | |||
| @@ -1494,6 +1494,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteFilesInUse( | |||
| 1494 | __in_z LPCWSTR wzPackageId, | 1494 | __in_z LPCWSTR wzPackageId, |
| 1495 | __in DWORD cFiles, | 1495 | __in DWORD cFiles, |
| 1496 | __in_ecount_z_opt(cFiles) LPCWSTR* rgwzFiles, | 1496 | __in_ecount_z_opt(cFiles) LPCWSTR* rgwzFiles, |
| 1497 | __in BOOTSTRAPPER_FILES_IN_USE_TYPE source, | ||
| 1497 | __inout int* pnResult | 1498 | __inout int* pnResult |
| 1498 | ) | 1499 | ) |
| 1499 | { | 1500 | { |
| @@ -1506,6 +1507,7 @@ EXTERN_C BAAPI UserExperienceOnExecuteFilesInUse( | |||
| 1506 | args.cFiles = cFiles; | 1507 | args.cFiles = cFiles; |
| 1507 | args.rgwzFiles = rgwzFiles; | 1508 | args.rgwzFiles = rgwzFiles; |
| 1508 | args.nRecommendation = *pnResult; | 1509 | args.nRecommendation = *pnResult; |
| 1510 | args.source = source; | ||
| 1509 | 1511 | ||
| 1510 | results.cbSize = sizeof(results); | 1512 | results.cbSize = sizeof(results); |
| 1511 | results.nResult = *pnResult; | 1513 | results.nResult = *pnResult; |
| @@ -2492,13 +2494,12 @@ static int FilterResult( | |||
| 2492 | __in int nResult | 2494 | __in int nResult |
| 2493 | ) | 2495 | ) |
| 2494 | { | 2496 | { |
| 2495 | DWORD dwFilteredAllowedResults = dwAllowedResults & MB_TYPEMASK; | ||
| 2496 | if (IDNOACTION == nResult || IDERROR == nResult) // do nothing and errors pass through. | 2497 | if (IDNOACTION == nResult || IDERROR == nResult) // do nothing and errors pass through. |
| 2497 | { | 2498 | { |
| 2498 | } | 2499 | } |
| 2499 | else | 2500 | else |
| 2500 | { | 2501 | { |
| 2501 | switch (dwFilteredAllowedResults) | 2502 | switch (dwAllowedResults) |
| 2502 | { | 2503 | { |
| 2503 | case MB_OK: | 2504 | case MB_OK: |
| 2504 | nResult = IDOK; | 2505 | nResult = IDOK; |
| @@ -2606,7 +2607,28 @@ static int FilterResult( | |||
| 2606 | } | 2607 | } |
| 2607 | break; | 2608 | break; |
| 2608 | 2609 | ||
| 2609 | case WIU_MB_OKIGNORECANCELRETRY: // custom Windows Installer utility return code. | 2610 | case BURN_MB_MSI_FILES_IN_USE: |
| 2611 | // https://docs.microsoft.com/en-us/windows/win32/msi/installvalidate-action | ||
| 2612 | if (IDRETRY == nResult || IDTRYAGAIN == nResult) | ||
| 2613 | { | ||
| 2614 | nResult = IDRETRY; | ||
| 2615 | } | ||
| 2616 | else if (IDCANCEL == nResult || IDABORT == nResult) | ||
| 2617 | { | ||
| 2618 | nResult = IDCANCEL; | ||
| 2619 | } | ||
| 2620 | else if (IDCONTINUE == nResult || IDIGNORE == nResult) | ||
| 2621 | { | ||
| 2622 | nResult = IDIGNORE; | ||
| 2623 | } | ||
| 2624 | else | ||
| 2625 | { | ||
| 2626 | nResult = IDNOACTION; | ||
| 2627 | } | ||
| 2628 | break; | ||
| 2629 | |||
| 2630 | case BURN_MB_MSI_RM_FILES_IN_USE: | ||
| 2631 | // https://docs.microsoft.com/en-us/windows/win32/msi/using-restart-manager-with-an-external-ui- | ||
| 2610 | if (IDOK == nResult || IDYES == nResult) | 2632 | if (IDOK == nResult || IDYES == nResult) |
| 2611 | { | 2633 | { |
| 2612 | nResult = IDOK; | 2634 | nResult = IDOK; |
| @@ -2615,11 +2637,15 @@ static int FilterResult( | |||
| 2615 | { | 2637 | { |
| 2616 | nResult = IDIGNORE; | 2638 | nResult = IDIGNORE; |
| 2617 | } | 2639 | } |
| 2640 | else if (IDNO == nResult) | ||
| 2641 | { | ||
| 2642 | nResult = IDNO; | ||
| 2643 | } | ||
| 2618 | else if (IDCANCEL == nResult || IDABORT == nResult) | 2644 | else if (IDCANCEL == nResult || IDABORT == nResult) |
| 2619 | { | 2645 | { |
| 2620 | nResult = IDCANCEL; | 2646 | nResult = IDCANCEL; |
| 2621 | } | 2647 | } |
| 2622 | else if (IDRETRY == nResult || IDTRYAGAIN == nResult || IDNO == nResult) | 2648 | else if (IDRETRY == nResult || IDTRYAGAIN == nResult) |
| 2623 | { | 2649 | { |
| 2624 | nResult = IDRETRY; | 2650 | nResult = IDRETRY; |
| 2625 | } | 2651 | } |
| @@ -2629,13 +2655,33 @@ static int FilterResult( | |||
| 2629 | } | 2655 | } |
| 2630 | break; | 2656 | break; |
| 2631 | 2657 | ||
| 2632 | case MB_RETRYTRYAGAIN: // custom return code. | 2658 | case BURN_MB_RETRYTRYAGAIN: // custom return code. |
| 2633 | if (IDRETRY != nResult && IDTRYAGAIN != nResult) | 2659 | if (IDRETRY != nResult && IDTRYAGAIN != nResult) |
| 2634 | { | 2660 | { |
| 2635 | nResult = IDNOACTION; | 2661 | nResult = IDNOACTION; |
| 2636 | } | 2662 | } |
| 2637 | break; | 2663 | break; |
| 2638 | 2664 | ||
| 2665 | case BURN_MB_NETFX_FILES_IN_USE: | ||
| 2666 | // https://docs.microsoft.com/en-us/dotnet/framework/deployment/how-to-get-progress-from-the-dotnet-installer | ||
| 2667 | if (IDOK == nResult || IDYES == nResult) | ||
| 2668 | { | ||
| 2669 | nResult = IDYES; | ||
| 2670 | } | ||
| 2671 | else if (IDRETRY == nResult || IDTRYAGAIN == nResult) | ||
| 2672 | { | ||
| 2673 | nResult = IDRETRY; | ||
| 2674 | } | ||
| 2675 | else if (IDCANCEL == nResult || IDABORT == nResult) | ||
| 2676 | { | ||
| 2677 | nResult = IDCANCEL; | ||
| 2678 | } | ||
| 2679 | else | ||
| 2680 | { | ||
| 2681 | nResult = IDNO; | ||
| 2682 | } | ||
| 2683 | break; | ||
| 2684 | |||
| 2639 | default: | 2685 | default: |
| 2640 | AssertSz(FALSE, "Unknown allowed results."); | 2686 | AssertSz(FALSE, "Unknown allowed results."); |
| 2641 | break; | 2687 | break; |
