diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 18:57:50 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:46:58 +1000 |
commit | 04eff6d8290ea8f3be0c7e8447b73451a2263bb8 (patch) | |
tree | a0e377b5a383b80b45f6f4c259e773a5a4f2e87f | |
parent | 7670257bba2a8dc11c01664bc5f102a8dec17b93 (diff) | |
download | wix-04eff6d8290ea8f3be0c7e8447b73451a2263bb8.tar.gz wix-04eff6d8290ea8f3be0c7e8447b73451a2263bb8.tar.bz2 wix-04eff6d8290ea8f3be0c7e8447b73451a2263bb8.zip |
Implement fDisableUnloading for the BA.
-rw-r--r-- | src/engine/engine.vcxproj | 4 | ||||
-rw-r--r-- | src/engine/packages.config | 2 | ||||
-rw-r--r-- | src/engine/userexperience.cpp | 7 | ||||
-rw-r--r-- | src/engine/userexperience.h | 1 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj index b0c3e295..6fd9d64a 100644 --- a/src/engine/engine.vcxproj +++ b/src/engine/engine.vcxproj | |||
@@ -2,7 +2,7 @@ | |||
2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
3 | 3 | ||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.14\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.14\build\WixToolset.BootstrapperCore.Native.props')" /> | 5 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.15\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.15\build\WixToolset.BootstrapperCore.Native.props')" /> |
6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" /> | 6 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" /> |
7 | 7 | ||
8 | <ItemGroup Label="ProjectConfigurations"> | 8 | <ItemGroup Label="ProjectConfigurations"> |
@@ -166,7 +166,7 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command> | |||
166 | <PropertyGroup> | 166 | <PropertyGroup> |
167 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | 167 | <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
168 | </PropertyGroup> | 168 | </PropertyGroup> |
169 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.14\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.14\build\WixToolset.BootstrapperCore.Native.props'))" /> | 169 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.15\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.15\build\WixToolset.BootstrapperCore.Native.props'))" /> |
170 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" /> | 170 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" /> |
171 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> | 171 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" /> |
172 | </Target> | 172 | </Target> |
diff --git a/src/engine/packages.config b/src/engine/packages.config index 38569fda..e9b2d190 100644 --- a/src/engine/packages.config +++ b/src/engine/packages.config | |||
@@ -1,6 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.14" targetFramework="native" /> | 4 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.15" targetFramework="native" /> |
5 | <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" /> | 5 | <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" /> |
6 | </packages> \ No newline at end of file | 6 | </packages> \ No newline at end of file |
diff --git a/src/engine/userexperience.cpp b/src/engine/userexperience.cpp index 4d149e9a..24fc1ec7 100644 --- a/src/engine/userexperience.cpp +++ b/src/engine/userexperience.cpp | |||
@@ -97,7 +97,7 @@ extern "C" HRESULT UserExperienceLoad( | |||
97 | args.pCommand = pCommand; | 97 | args.pCommand = pCommand; |
98 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; | 98 | args.pfnBootstrapperEngineProc = EngineForApplicationProc; |
99 | args.pvBootstrapperEngineProcContext = pEngineContext; | 99 | args.pvBootstrapperEngineProcContext = pEngineContext; |
100 | args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 6); // TODO: need to decide whether to keep this, and if so when to update it. | 100 | args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 7); // TODO: need to decide whether to keep this, and if so when to update it. |
101 | 101 | ||
102 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | 102 | results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); |
103 | 103 | ||
@@ -115,6 +115,7 @@ extern "C" HRESULT UserExperienceLoad( | |||
115 | 115 | ||
116 | pUserExperience->pfnBAProc = results.pfnBootstrapperApplicationProc; | 116 | pUserExperience->pfnBAProc = results.pfnBootstrapperApplicationProc; |
117 | pUserExperience->pvBAProcContext = results.pvBootstrapperApplicationProcContext; | 117 | pUserExperience->pvBAProcContext = results.pvBootstrapperApplicationProcContext; |
118 | pUserExperience->fDisableUnloading = results.fDisableUnloading; | ||
118 | 119 | ||
119 | LExit: | 120 | LExit: |
120 | return hr; | 121 | return hr; |
@@ -139,8 +140,8 @@ extern "C" HRESULT UserExperienceUnload( | |||
139 | pfnDestroy(); | 140 | pfnDestroy(); |
140 | } | 141 | } |
141 | 142 | ||
142 | // Free BA DLL. | 143 | // Free BA DLL if it supports it. |
143 | if (!::FreeLibrary(pUserExperience->hUXModule)) | 144 | if (!pUserExperience->fDisableUnloading && !::FreeLibrary(pUserExperience->hUXModule)) |
144 | { | 145 | { |
145 | hr = HRESULT_FROM_WIN32(::GetLastError()); | 146 | hr = HRESULT_FROM_WIN32(::GetLastError()); |
146 | TraceError(hr, "Failed to unload BA DLL."); | 147 | TraceError(hr, "Failed to unload BA DLL."); |
diff --git a/src/engine/userexperience.h b/src/engine/userexperience.h index 5aade0f2..7d2b743d 100644 --- a/src/engine/userexperience.h +++ b/src/engine/userexperience.h | |||
@@ -25,6 +25,7 @@ typedef struct _BURN_USER_EXPERIENCE | |||
25 | HMODULE hUXModule; | 25 | HMODULE hUXModule; |
26 | PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBAProc; | 26 | PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBAProc; |
27 | LPVOID pvBAProcContext; | 27 | LPVOID pvBAProcContext; |
28 | BOOL fDisableUnloading; | ||
28 | LPWSTR sczTempDirectory; | 29 | LPWSTR sczTempDirectory; |
29 | 30 | ||
30 | CRITICAL_SECTION csEngineActive; // Changing the engine active state in the user experience must be | 31 | CRITICAL_SECTION csEngineActive; // Changing the engine active state in the user experience must be |