diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:31:01 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:53:29 +1000 |
commit | b7faab06259d3afdc3205024a0004ace72157cbe (patch) | |
tree | 4d9797f017b564c0fe6e8a602950c876daba612f /src | |
parent | 39e930d9aaff250e0fd5019eeedaa40717a6c6fe (diff) | |
download | wix-b7faab06259d3afdc3205024a0004ace72157cbe.tar.gz wix-b7faab06259d3afdc3205024a0004ace72157cbe.tar.bz2 wix-b7faab06259d3afdc3205024a0004ace72157cbe.zip |
Treat failing to load SCD like mbahost treats .NET 4.5.2 on Win7 RTM.
Diffstat (limited to 'src')
-rw-r--r-- | src/dnchost/dnchost.cpp | 87 | ||||
-rw-r--r-- | src/dnchost/dnchost.h | 8 | ||||
-rw-r--r-- | src/mbahost/mbahost.cpp | 2 | ||||
-rw-r--r-- | src/wixlib/Dnc.wxs | 10 | ||||
-rw-r--r-- | src/wixstdba/Resources/dncpreq.thm | 47 | ||||
-rw-r--r-- | src/wixstdba/Resources/dncpreq.wxl | 29 | ||||
-rw-r--r-- | src/wixstdba/WixStandardBootstrapperApplication.cpp | 26 | ||||
-rw-r--r-- | src/wixstdba/wixstdba.cpp | 26 | ||||
-rw-r--r-- | src/wixstdba/wixstdba.def | 2 |
9 files changed, 228 insertions, 9 deletions
diff --git a/src/dnchost/dnchost.cpp b/src/dnchost/dnchost.cpp index c4b0d222..0fad58c1 100644 --- a/src/dnchost/dnchost.cpp +++ b/src/dnchost/dnchost.cpp | |||
@@ -20,6 +20,13 @@ static HRESULT LoadRuntime( | |||
20 | static HRESULT LoadManagedBootstrapperApplicationFactory( | 20 | static HRESULT LoadManagedBootstrapperApplicationFactory( |
21 | __in DNCSTATE* pState | 21 | __in DNCSTATE* pState |
22 | ); | 22 | ); |
23 | static HRESULT CreatePrerequisiteBA( | ||
24 | __in HRESULT hrHostInitialization, | ||
25 | __in IBootstrapperEngine* pEngine, | ||
26 | __in LPCWSTR wzAppBase, | ||
27 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
28 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
29 | ); | ||
23 | 30 | ||
24 | 31 | ||
25 | // function definitions | 32 | // function definitions |
@@ -51,6 +58,7 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | |||
51 | ) | 58 | ) |
52 | { | 59 | { |
53 | HRESULT hr = S_OK; | 60 | HRESULT hr = S_OK; |
61 | HRESULT hrHostInitialization = S_OK; | ||
54 | IBootstrapperEngine* pEngine = NULL; | 62 | IBootstrapperEngine* pEngine = NULL; |
55 | 63 | ||
56 | // coreclr.dll doesn't support unloading, so the rest of the .NET Core hosting stack doesn't support it either. | 64 | // coreclr.dll doesn't support unloading, so the rest of the .NET Core hosting stack doesn't support it either. |
@@ -77,18 +85,32 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | |||
77 | if (!vstate.fInitializedRuntime) | 85 | if (!vstate.fInitializedRuntime) |
78 | { | 86 | { |
79 | hr = LoadRuntime(&vstate); | 87 | hr = LoadRuntime(&vstate); |
80 | BalExitOnFailure(hr, "Failed to load .NET Core runtime."); | ||
81 | |||
82 | vstate.fInitializedRuntime = TRUE; | ||
83 | 88 | ||
84 | hr = LoadManagedBootstrapperApplicationFactory(&vstate); | 89 | vstate.fInitializedRuntime = SUCCEEDED(hr); |
85 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application factory."); | ||
86 | } | 90 | } |
87 | 91 | ||
88 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading .NET Core SCD bootstrapper application."); | 92 | if (vstate.fInitializedRuntime) |
93 | { | ||
94 | if (!vstate.pAppFactory) | ||
95 | { | ||
96 | hr = LoadManagedBootstrapperApplicationFactory(&vstate); | ||
97 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application factory."); | ||
98 | } | ||
99 | |||
100 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading .NET Core SCD bootstrapper application."); | ||
101 | |||
102 | hr = vstate.pAppFactory->Create(pArgs, pResults); | ||
103 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application."); | ||
104 | } | ||
105 | else // fallback to the prerequisite BA. | ||
106 | { | ||
107 | hrHostInitialization = E_DNCHOST_SCD_RUNTIME_FAILURE; | ||
108 | BalLogError(hr, "The self-contained .NET Core runtime failed to load. This is an unrecoverable error."); | ||
109 | BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x%08x.", hr); | ||
89 | 110 | ||
90 | hr = vstate.pAppFactory->Create(pArgs, pResults); | 111 | hr = CreatePrerequisiteBA(hrHostInitialization, pEngine, vstate.sczAppBase, pArgs, pResults); |
91 | BalExitOnFailure(hr, "Failed to create the .NET Core bootstrapper application."); | 112 | BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application."); |
113 | } | ||
92 | 114 | ||
93 | LExit: | 115 | LExit: |
94 | ReleaseNullObject(pEngine); | 116 | ReleaseNullObject(pEngine); |
@@ -98,6 +120,18 @@ LExit: | |||
98 | 120 | ||
99 | extern "C" void WINAPI BootstrapperApplicationDestroy() | 121 | extern "C" void WINAPI BootstrapperApplicationDestroy() |
100 | { | 122 | { |
123 | if (vstate.hMbapreqModule) | ||
124 | { | ||
125 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = reinterpret_cast<PFN_BOOTSTRAPPER_APPLICATION_DESTROY>(::GetProcAddress(vstate.hMbapreqModule, "DncPrereqBootstrapperApplicationDestroy")); | ||
126 | if (pfnDestroy) | ||
127 | { | ||
128 | (*pfnDestroy)(); | ||
129 | } | ||
130 | |||
131 | ::FreeLibrary(vstate.hMbapreqModule); | ||
132 | vstate.hMbapreqModule = NULL; | ||
133 | } | ||
134 | |||
101 | BalUninitialize(); | 135 | BalUninitialize(); |
102 | } | 136 | } |
103 | 137 | ||
@@ -227,3 +261,40 @@ static HRESULT LoadManagedBootstrapperApplicationFactory( | |||
227 | 261 | ||
228 | return hr; | 262 | return hr; |
229 | } | 263 | } |
264 | |||
265 | static HRESULT CreatePrerequisiteBA( | ||
266 | __in HRESULT hrHostInitialization, | ||
267 | __in IBootstrapperEngine* pEngine, | ||
268 | __in LPCWSTR wzAppBase, | ||
269 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
270 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
271 | ) | ||
272 | { | ||
273 | HRESULT hr = S_OK; | ||
274 | LPWSTR sczDncpreqPath = NULL; | ||
275 | HMODULE hModule = NULL; | ||
276 | |||
277 | hr = PathConcat(wzAppBase, L"dncpreq.dll", &sczDncpreqPath); | ||
278 | BalExitOnFailure(hr, "Failed to get path to pre-requisite BA."); | ||
279 | |||
280 | hModule = ::LoadLibraryW(sczDncpreqPath); | ||
281 | BalExitOnNullWithLastError(hModule, hr, "Failed to load pre-requisite BA DLL."); | ||
282 | |||
283 | PFN_DNCPREQ_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = reinterpret_cast<PFN_DNCPREQ_BOOTSTRAPPER_APPLICATION_CREATE>(::GetProcAddress(hModule, "DncPrereqBootstrapperApplicationCreate")); | ||
284 | BalExitOnNullWithLastError(pfnCreate, hr, "Failed to get DncPrereqBootstrapperApplicationCreate entry-point from: %ls", sczDncpreqPath); | ||
285 | |||
286 | hr = pfnCreate(hrHostInitialization, pEngine, pArgs, pResults); | ||
287 | BalExitOnFailure(hr, "Failed to create prequisite bootstrapper app."); | ||
288 | |||
289 | vstate.hMbapreqModule = hModule; | ||
290 | hModule = NULL; | ||
291 | |||
292 | LExit: | ||
293 | if (hModule) | ||
294 | { | ||
295 | ::FreeLibrary(hModule); | ||
296 | } | ||
297 | ReleaseStr(sczDncpreqPath); | ||
298 | |||
299 | return hr; | ||
300 | } | ||
diff --git a/src/dnchost/dnchost.h b/src/dnchost/dnchost.h index e498edaf..40c506fc 100644 --- a/src/dnchost/dnchost.h +++ b/src/dnchost/dnchost.h | |||
@@ -2,6 +2,13 @@ | |||
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 | 4 | ||
5 | extern "C" typedef HRESULT(WINAPI* PFN_DNCPREQ_BOOTSTRAPPER_APPLICATION_CREATE)( | ||
6 | __in HRESULT hrHostInitialization, | ||
7 | __in IBootstrapperEngine* pEngine, | ||
8 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
9 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
10 | ); | ||
11 | |||
5 | struct DNCSTATE | 12 | struct DNCSTATE |
6 | { | 13 | { |
7 | BOOL fInitialized; | 14 | BOOL fInitialized; |
@@ -16,4 +23,5 @@ struct DNCSTATE | |||
16 | LPWSTR sczBaFactoryRuntimeConfigPath; | 23 | LPWSTR sczBaFactoryRuntimeConfigPath; |
17 | HOSTFXR_STATE hostfxrState; | 24 | HOSTFXR_STATE hostfxrState; |
18 | IBootstrapperApplicationFactory* pAppFactory; | 25 | IBootstrapperApplicationFactory* pAppFactory; |
26 | HMODULE hMbapreqModule; | ||
19 | }; | 27 | }; |
diff --git a/src/mbahost/mbahost.cpp b/src/mbahost/mbahost.cpp index 7916ec9a..735f9f21 100644 --- a/src/mbahost/mbahost.cpp +++ b/src/mbahost/mbahost.cpp | |||
@@ -129,6 +129,8 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( | |||
129 | } | 129 | } |
130 | 130 | ||
131 | LExit: | 131 | LExit: |
132 | ReleaseNullObject(pEngine); | ||
133 | |||
132 | return hr; | 134 | return hr; |
133 | } | 135 | } |
134 | 136 | ||
diff --git a/src/wixlib/Dnc.wxs b/src/wixlib/Dnc.wxs index 65a59e61..a2779c19 100644 --- a/src/wixlib/Dnc.wxs +++ b/src/wixlib/Dnc.wxs | |||
@@ -9,6 +9,7 @@ | |||
9 | <Fragment> | 9 | <Fragment> |
10 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost' SourceFile='dnchost.dll'> | 10 | <BootstrapperApplication Id='DotNetCoreBootstrapperApplicationHost' SourceFile='dnchost.dll'> |
11 | <PayloadGroupRef Id='Dnc' /> | 11 | <PayloadGroupRef Id='Dnc' /> |
12 | <PayloadGroupRef Id='DncPreqStandard' /> | ||
12 | </BootstrapperApplication> | 13 | </BootstrapperApplication> |
13 | </Fragment> | 14 | </Fragment> |
14 | 15 | ||
@@ -16,6 +17,15 @@ | |||
16 | <PayloadGroup Id='Dnc'> | 17 | <PayloadGroup Id='Dnc'> |
17 | <Payload Compressed='yes' SourceFile='nethost.dll' /> | 18 | <Payload Compressed='yes' SourceFile='nethost.dll' /> |
18 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> | 19 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> |
20 | <Payload Compressed='yes' SourceFile='wixstdba.dll' Name='dncpreq.dll' /> | ||
21 | </PayloadGroup> | ||
22 | </Fragment> | ||
23 | |||
24 | <Fragment> | ||
25 | <PayloadGroup Id='DncPreqStandard'> | ||
26 | <Payload Name='mbapreq.thm' Compressed='yes' SourceFile='!(wix.DncPreqbaThemeXml=SourceDir\dncpreq.thm)' /> | ||
27 | <Payload Name='mbapreq.png' Compressed='yes' SourceFile='!(wix.DncPreqbaLogo=SourceDir\mbapreq.png)' /> | ||
28 | <Payload Name='mbapreq.wxl' Compressed='yes' SourceFile='!(wix.DncPreqbaThemeWxl=SourceDir\dncpreq.wxl)' /> | ||
19 | </PayloadGroup> | 29 | </PayloadGroup> |
20 | </Fragment> | 30 | </Fragment> |
21 | </Wix> | 31 | </Wix> |
diff --git a/src/wixstdba/Resources/dncpreq.thm b/src/wixstdba/Resources/dncpreq.thm new file mode 100644 index 00000000..4ae61819 --- /dev/null +++ b/src/wixstdba/Resources/dncpreq.thm | |||
@@ -0,0 +1,47 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil"> | ||
3 | <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | ||
4 | <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font> | ||
5 | <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font> | ||
6 | <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font> | ||
7 | |||
8 | <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)"> | ||
9 | <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="mbapreq.png" Visible="yes"/> | ||
10 | <Label X="80" Y="11" Width="-11" Height="96" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label> | ||
11 | |||
12 | <Page Name="Help"> | ||
13 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label> | ||
14 | <Label X="11" Y="153" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label> | ||
15 | <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
16 | <Text>#(loc.HelpCloseButton)</Text> | ||
17 | <CloseWindowAction /> | ||
18 | </Button> | ||
19 | </Page> | ||
20 | <Page Name="Install"> | ||
21 | <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="34" TabStop="yes" FontId="3">#(loc.InstallLicenseTerms)</Hypertext> | ||
22 | <Button Name="InstallButton" X="-91" Y="-11" Width="130" Height="23" TabStop="yes" FontId="0">#(loc.InstallAcceptAndInstallButton)</Button> | ||
23 | <Button Name="InstallDeclineButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
24 | <Text>#(loc.InstallDeclineButton)</Text> | ||
25 | <CloseWindowAction /> | ||
26 | </Button> | ||
27 | </Page> | ||
28 | <Page Name="Progress"> | ||
29 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label> | ||
30 | <Label X="11" Y="153" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label> | ||
31 | <Label Name="OverallProgressPackageText" X="85" Y="153" Width="-11" Height="17" FontId="3" DisablePrefix="yes">[ProgressPackageName]</Label> | ||
32 | <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="175" Width="-11" Height="15" /> | ||
33 | <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button> | ||
34 | </Page> | ||
35 | <Page Name="Failure"> | ||
36 | <Label X="11" Y="112" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FailureHeader)</Label> | ||
37 | <Hypertext Name="FailureLogFileLink" X="11" Y="153" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureLogLinkText)</Hypertext> | ||
38 | <Hypertext Name="FailureMessageText" X="22" Y="190" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes"/> | ||
39 | <Label X="-11" Y="-20" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label> | ||
40 | <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button> | ||
41 | <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0"> | ||
42 | <Text>#(loc.FailureCloseButton)</Text> | ||
43 | <CloseWindowAction /> | ||
44 | </Button> | ||
45 | </Page> | ||
46 | </Window> | ||
47 | </Theme> | ||
diff --git a/src/wixstdba/Resources/dncpreq.wxl b/src/wixstdba/Resources/dncpreq.wxl new file mode 100644 index 00000000..d6b73b5f --- /dev/null +++ b/src/wixstdba/Resources/dncpreq.wxl | |||
@@ -0,0 +1,29 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
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 | |||
4 | |||
5 | <WixLocalization Culture="en-us" Language="1033" xmlns="http://wixtoolset.org/schemas/v4/wxl"> | ||
6 | <String Id="Caption">[WixBundleName] Setup</String> | ||
7 | <String Id="Title">Microsoft .NET Core required for [WixBundleName] setup</String> | ||
8 | <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String> | ||
9 | <String Id="HelpHeader">Setup Help</String> | ||
10 | <String Id="HelpText">/passive | /quiet - displays minimal UI with no prompts or displays no UI and | ||
11 | no prompts. By default UI and all prompts are displayed. | ||
12 | |||
13 | /norestart - suppress any attempts to restart. By default UI will prompt before restart. | ||
14 | /log log.txt - logs to a specific file. By default a log file is created in %TEMP%.</String> | ||
15 | <String Id="HelpCloseButton">&Close</String> | ||
16 | <String Id="InstallLicenseTerms">Click the "Accept and Install" button to accept the Microsoft .NET Core <a href="#">license terms</a>.</String> | ||
17 | <String Id="InstallAcceptAndInstallButton">&Accept and Install</String> | ||
18 | <String Id="InstallDeclineButton">&Decline</String> | ||
19 | <String Id="ProgressHeader">Setup Progress</String> | ||
20 | <String Id="ProgressLabel">Processing:</String> | ||
21 | <String Id="ProgressCancelButton">&Cancel</String> | ||
22 | <String Id="FailureHeader">Setup Failed</String> | ||
23 | <String Id="FailureLogLinkText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the <a href="#">log file</a>.</String> | ||
24 | <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String> | ||
25 | <String Id="FailureRestartButton">&Restart</String> | ||
26 | <String Id="FailureCloseButton">&Close</String> | ||
27 | <String Id="SCDRUNTIMEFAILUREErrorMessage">[WixBundleName] cannot run on this machine. Install the latest updates and/or the latest OS to run in a supported environment.</String> | ||
28 | <String Id="ErrorFailNoActionReboot">No action was taken as a system reboot is required.</String> | ||
29 | </WixLocalization> | ||
diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index 88a26534..826c4386 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp | |||
@@ -2892,6 +2892,23 @@ private: // privates | |||
2892 | } | 2892 | } |
2893 | } | 2893 | } |
2894 | } | 2894 | } |
2895 | else if (E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal) | ||
2896 | { | ||
2897 | HRESULT hr = StrAllocString(&sczUnformattedText, L"#(loc.SCDRUNTIMEFAILUREErrorMessage)", 0); | ||
2898 | if (FAILED(hr)) | ||
2899 | { | ||
2900 | BalLogError(hr, "Failed to initialize SCDRUNTIMEFAILUREErrorMessage loc identifier."); | ||
2901 | } | ||
2902 | else | ||
2903 | { | ||
2904 | hr = LocLocalizeString(m_pWixLoc, &sczUnformattedText); | ||
2905 | if (FAILED(hr)) | ||
2906 | { | ||
2907 | BalLogError(hr, "Failed to localize SCDRUNTIMEFAILUREErrorMessage: %ls", sczUnformattedText); | ||
2908 | ReleaseNullStr(sczUnformattedText); | ||
2909 | } | ||
2910 | } | ||
2911 | } | ||
2895 | else // try to get the error message from the error code. | 2912 | else // try to get the error message from the error code. |
2896 | { | 2913 | { |
2897 | StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL); | 2914 | StrAllocFromError(&sczUnformattedText, m_hrFinal, NULL); |
@@ -2915,6 +2932,13 @@ private: // privates | |||
2915 | BalFormatString(sczUnformattedText, &sczText); | 2932 | BalFormatString(sczUnformattedText, &sczText); |
2916 | } | 2933 | } |
2917 | } | 2934 | } |
2935 | else if (E_DNCHOST_SCD_RUNTIME_FAILURE == m_hrFinal) | ||
2936 | { | ||
2937 | if (sczUnformattedText) | ||
2938 | { | ||
2939 | BalFormatString(sczUnformattedText, &sczText); | ||
2940 | } | ||
2941 | } | ||
2918 | else | 2942 | else |
2919 | { | 2943 | { |
2920 | StrAllocFormatted(&sczText, L"0x%08x - %ls", m_hrFinal, sczUnformattedText); | 2944 | StrAllocFormatted(&sczText, L"0x%08x - %ls", m_hrFinal, sczUnformattedText); |
@@ -3754,7 +3778,7 @@ HRESULT CreateBootstrapperApplication( | |||
3754 | 3778 | ||
3755 | if (BOOTSTRAPPER_DISPLAY_UNKNOWN == pArgs->pCommand->display) | 3779 | if (BOOTSTRAPPER_DISPLAY_UNKNOWN == pArgs->pCommand->display) |
3756 | { | 3780 | { |
3757 | ExitOnFailure(hr = E_INVALIDARG, "Engine requested Unknown display type."); | 3781 | BalExitOnFailure(hr = E_INVALIDARG, "Engine requested Unknown display type."); |
3758 | } | 3782 | } |
3759 | 3783 | ||
3760 | pApplication = new CWixStandardBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine, pArgs); | 3784 | pApplication = new CWixStandardBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine, pArgs); |
diff --git a/src/wixstdba/wixstdba.cpp b/src/wixstdba/wixstdba.cpp index 2767c74e..727c8cb0 100644 --- a/src/wixstdba/wixstdba.cpp +++ b/src/wixstdba/wixstdba.cpp | |||
@@ -55,6 +55,32 @@ extern "C" void WINAPI BootstrapperApplicationDestroy() | |||
55 | } | 55 | } |
56 | 56 | ||
57 | 57 | ||
58 | extern "C" HRESULT WINAPI DncPrereqBootstrapperApplicationCreate( | ||
59 | __in HRESULT hrHostInitialization, | ||
60 | __in IBootstrapperEngine* pEngine, | ||
61 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
62 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults | ||
63 | ) | ||
64 | { | ||
65 | HRESULT hr = S_OK; | ||
66 | |||
67 | BalInitialize(pEngine); | ||
68 | |||
69 | hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults, &vpApplication); | ||
70 | BalExitOnFailure(hr, "Failed to create .NET Core prerequisite bootstrapper application interface."); | ||
71 | |||
72 | LExit: | ||
73 | return hr; | ||
74 | } | ||
75 | |||
76 | |||
77 | extern "C" void WINAPI DncPrereqBootstrapperApplicationDestroy() | ||
78 | { | ||
79 | ReleaseNullObject(vpApplication); | ||
80 | BalUninitialize(); | ||
81 | } | ||
82 | |||
83 | |||
58 | extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate( | 84 | extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate( |
59 | __in HRESULT hrHostInitialization, | 85 | __in HRESULT hrHostInitialization, |
60 | __in IBootstrapperEngine* pEngine, | 86 | __in IBootstrapperEngine* pEngine, |
diff --git a/src/wixstdba/wixstdba.def b/src/wixstdba/wixstdba.def index 815d2977..ba9980d3 100644 --- a/src/wixstdba/wixstdba.def +++ b/src/wixstdba/wixstdba.def | |||
@@ -4,5 +4,7 @@ | |||
4 | EXPORTS | 4 | EXPORTS |
5 | BootstrapperApplicationCreate | 5 | BootstrapperApplicationCreate |
6 | BootstrapperApplicationDestroy | 6 | BootstrapperApplicationDestroy |
7 | DncPrereqBootstrapperApplicationCreate | ||
8 | DncPrereqBootstrapperApplicationDestroy | ||
7 | MbaPrereqBootstrapperApplicationCreate | 9 | MbaPrereqBootstrapperApplicationCreate |
8 | MbaPrereqBootstrapperApplicationDestroy | 10 | MbaPrereqBootstrapperApplicationDestroy |