diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-10-19 15:44:40 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-10-25 15:13:06 -0500 |
commit | 98080672cdbbde00ea40a96c1ce38e8a52f24fee (patch) | |
tree | 9c0b859f147d55d5c4caadccfd764ca84ed7e648 /src/burn/engine/core.cpp | |
parent | 28e9c7c14d2a156b55476f6b8e39e13f17aa87b6 (diff) | |
download | wix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.tar.gz wix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.tar.bz2 wix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.zip |
Add queutil so Burn can manage its own queue of BA requested actions.
Fixes 6349
Diffstat (limited to 'src/burn/engine/core.cpp')
-rw-r--r-- | src/burn/engine/core.cpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index c443e0c8..8903b5b2 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp | |||
@@ -884,17 +884,16 @@ LExit: | |||
884 | 884 | ||
885 | LogId(REPORT_STANDARD, MSG_LAUNCH_APPROVED_EXE_COMPLETE, hr, dwProcessId); | 885 | LogId(REPORT_STANDARD, MSG_LAUNCH_APPROVED_EXE_COMPLETE, hr, dwProcessId); |
886 | 886 | ||
887 | ApprovedExesUninitializeLaunch(pLaunchApprovedExe); | ||
888 | |||
889 | return hr; | 887 | return hr; |
890 | } | 888 | } |
891 | 889 | ||
892 | extern "C" HRESULT CoreQuit( | 890 | extern "C" void CoreQuit( |
893 | __in BURN_ENGINE_STATE* pEngineState, | 891 | __in BOOTSTRAPPER_ENGINE_CONTEXT* pEngineContext, |
894 | __in int nExitCode | 892 | __in DWORD dwExitCode |
895 | ) | 893 | ) |
896 | { | 894 | { |
897 | HRESULT hr = S_OK; | 895 | HRESULT hr = S_OK; |
896 | BURN_ENGINE_STATE* pEngineState = pEngineContext->pEngineState; | ||
898 | 897 | ||
899 | // Save engine state if resume mode is unequal to "none". | 898 | // Save engine state if resume mode is unequal to "none". |
900 | if (BURN_RESUME_MODE_NONE != pEngineState->resumeMode) | 899 | if (BURN_RESUME_MODE_NONE != pEngineState->resumeMode) |
@@ -907,13 +906,15 @@ extern "C" HRESULT CoreQuit( | |||
907 | } | 906 | } |
908 | } | 907 | } |
909 | 908 | ||
910 | LogId(REPORT_STANDARD, MSG_QUIT, nExitCode); | 909 | LogId(REPORT_STANDARD, MSG_QUIT, dwExitCode); |
911 | 910 | ||
912 | pEngineState->fQuit = TRUE; | 911 | pEngineState->userExperience.dwExitCode = dwExitCode; |
913 | 912 | ||
914 | ::PostQuitMessage(nExitCode); // go bye-bye. | 913 | ::EnterCriticalSection(&pEngineContext->csQueue); |
915 | 914 | ||
916 | return hr; | 915 | pEngineState->fQuit = TRUE; |
916 | |||
917 | ::LeaveCriticalSection(&pEngineContext->csQueue); | ||
917 | } | 918 | } |
918 | 919 | ||
919 | extern "C" HRESULT CoreSaveEngineState( | 920 | extern "C" HRESULT CoreSaveEngineState( |
@@ -2071,6 +2072,18 @@ LExit: | |||
2071 | return hr; | 2072 | return hr; |
2072 | } | 2073 | } |
2073 | 2074 | ||
2075 | extern "C" void DAPI CoreBootstrapperEngineActionUninitialize( | ||
2076 | __in BOOTSTRAPPER_ENGINE_ACTION* pAction | ||
2077 | ) | ||
2078 | { | ||
2079 | switch (pAction->dwMessage) | ||
2080 | { | ||
2081 | case WM_BURN_LAUNCH_APPROVED_EXE: | ||
2082 | ApprovedExesUninitializeLaunch(&pAction->launchApprovedExe); | ||
2083 | break; | ||
2084 | } | ||
2085 | } | ||
2086 | |||
2074 | // internal helper functions | 2087 | // internal helper functions |
2075 | 2088 | ||
2076 | static HRESULT AppendEscapedArgumentToCommandLine( | 2089 | static HRESULT AppendEscapedArgumentToCommandLine( |