diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2020-07-22 18:39:50 +1000 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2020-07-22 20:13:49 +1000 |
commit | 70b5d207d799308a6c3742f5d0348ab4fca75a3d (patch) | |
tree | df6f67789de07c7cd6a84aec677c828291e87828 /src | |
parent | 71802ec02bae5f882ca3cd894abc202d63da9440 (diff) | |
download | wix-70b5d207d799308a6c3742f5d0348ab4fca75a3d.tar.gz wix-70b5d207d799308a6c3742f5d0348ab4fca75a3d.tar.bz2 wix-70b5d207d799308a6c3742f5d0348ab4fca75a3d.zip |
Upgrade DotNetAppHost package to .NET 5 to use its static nethost lib and headers.
Diffstat (limited to 'src')
-rw-r--r-- | src/dnchost/dnchost.vcxproj | 9 | ||||
-rw-r--r-- | src/dnchost/hostfxr.h | 96 | ||||
-rw-r--r-- | src/dnchost/packages.config | 2 | ||||
-rw-r--r-- | src/dnchost/precomp.h | 3 | ||||
-rw-r--r-- | src/wixlib/Dnc.wxs | 1 |
5 files changed, 5 insertions, 106 deletions
diff --git a/src/dnchost/dnchost.vcxproj b/src/dnchost/dnchost.vcxproj index a278d714..f9a2546f 100644 --- a/src/dnchost/dnchost.vcxproj +++ b/src/dnchost/dnchost.vcxproj | |||
@@ -28,8 +28,8 @@ | |||
28 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | 28 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | 29 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
30 | <PropertyGroup> | 30 | <PropertyGroup> |
31 | <NetHostPath>..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.3.1.3\runtimes\win-x86\native\</NetHostPath> | 31 | <NetHostPath>..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.5.0.0-preview.7.20364.11\runtimes\win-x86\native\</NetHostPath> |
32 | <ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)nethost.lib</ProjectAdditionalLinkLibraries> | 32 | <ProjectAdditionalLinkLibraries>shlwapi.lib;$(NetHostPath)libnethost.lib</ProjectAdditionalLinkLibraries> |
33 | </PropertyGroup> | 33 | </PropertyGroup> |
34 | <ItemGroup> | 34 | <ItemGroup> |
35 | <ClCompile Include="dnchost.cpp" /> | 35 | <ClCompile Include="dnchost.cpp" /> |
@@ -42,7 +42,6 @@ | |||
42 | <ClInclude Include="coreclrhost.h" /> | 42 | <ClInclude Include="coreclrhost.h" /> |
43 | <ClInclude Include="dnchost.h" /> | 43 | <ClInclude Include="dnchost.h" /> |
44 | <ClInclude Include="dncutil.h" /> | 44 | <ClInclude Include="dncutil.h" /> |
45 | <ClInclude Include="hostfxr.h" /> | ||
46 | <ClInclude Include="precomp.h" /> | 45 | <ClInclude Include="precomp.h" /> |
47 | </ItemGroup> | 46 | </ItemGroup> |
48 | <ItemGroup> | 47 | <ItemGroup> |
@@ -50,10 +49,6 @@ | |||
50 | </ItemGroup> | 49 | </ItemGroup> |
51 | <ItemGroup> | 50 | <ItemGroup> |
52 | <None Include="packages.config" /> | 51 | <None Include="packages.config" /> |
53 | <Content Include="$(NetHostPath)nethost.dll"> | ||
54 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
55 | <Visible>False</Visible> | ||
56 | </Content> | ||
57 | </ItemGroup> | 52 | </ItemGroup> |
58 | <ItemDefinitionGroup> | 53 | <ItemDefinitionGroup> |
59 | <ClCompile> | 54 | <ClCompile> |
diff --git a/src/dnchost/hostfxr.h b/src/dnchost/hostfxr.h deleted file mode 100644 index 85e6e0ab..00000000 --- a/src/dnchost/hostfxr.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | // Licensed to the .NET Foundation under one or more agreements. | ||
2 | // The .NET Foundation licenses this file to you under the MIT license. | ||
3 | // See the LICENSE file in the project root for more information. | ||
4 | |||
5 | |||
6 | |||
7 | // ***** ABOUT THIS HEADER ***** | ||
8 | // ************************************************************************************** | ||
9 | // | ||
10 | // This is the version on 2019-12-22 from | ||
11 | // https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/hostfxr.h | ||
12 | // | ||
13 | // ************************************************************************************** | ||
14 | // **************************** | ||
15 | |||
16 | |||
17 | #ifndef __HOSTFXR_H__ | ||
18 | #define __HOSTFXR_H__ | ||
19 | |||
20 | #include <stddef.h> | ||
21 | #include <stdint.h> | ||
22 | |||
23 | #if defined(_WIN32) | ||
24 | #define HOSTFXR_CALLTYPE __cdecl | ||
25 | #ifdef _WCHAR_T_DEFINED | ||
26 | typedef wchar_t char_t; | ||
27 | #else | ||
28 | typedef unsigned short char_t; | ||
29 | #endif | ||
30 | #else | ||
31 | #define HOSTFXR_CALLTYPE | ||
32 | typedef char char_t; | ||
33 | #endif | ||
34 | |||
35 | enum hostfxr_delegate_type | ||
36 | { | ||
37 | hdt_com_activation, | ||
38 | hdt_load_in_memory_assembly, | ||
39 | hdt_winrt_activation, | ||
40 | hdt_com_register, | ||
41 | hdt_com_unregister, | ||
42 | hdt_load_assembly_and_get_function_pointer | ||
43 | }; | ||
44 | |||
45 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv); | ||
46 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_startupinfo_fn)( | ||
47 | const int argc, | ||
48 | const char_t **argv, | ||
49 | const char_t *host_path, | ||
50 | const char_t *dotnet_root, | ||
51 | const char_t *app_path); | ||
52 | |||
53 | typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message); | ||
54 | typedef hostfxr_error_writer_fn(HOSTFXR_CALLTYPE *hostfxr_set_error_writer_fn)(hostfxr_error_writer_fn error_writer); | ||
55 | |||
56 | typedef void* hostfxr_handle; | ||
57 | struct hostfxr_initialize_parameters | ||
58 | { | ||
59 | size_t size; | ||
60 | const char_t *host_path; | ||
61 | const char_t *dotnet_root; | ||
62 | }; | ||
63 | |||
64 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)( | ||
65 | int argc, | ||
66 | const char_t **argv, | ||
67 | const struct hostfxr_initialize_parameters *parameters, | ||
68 | /*out*/ hostfxr_handle *host_context_handle); | ||
69 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_runtime_config_fn)( | ||
70 | const char_t *runtime_config_path, | ||
71 | const struct hostfxr_initialize_parameters *parameters, | ||
72 | /*out*/ hostfxr_handle *host_context_handle); | ||
73 | |||
74 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_property_value_fn)( | ||
75 | const hostfxr_handle host_context_handle, | ||
76 | const char_t *name, | ||
77 | /*out*/ const char_t **value); | ||
78 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_set_runtime_property_value_fn)( | ||
79 | const hostfxr_handle host_context_handle, | ||
80 | const char_t *name, | ||
81 | const char_t *value); | ||
82 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_properties_fn)( | ||
83 | const hostfxr_handle host_context_handle, | ||
84 | /*inout*/ size_t * count, | ||
85 | /*out*/ const char_t **keys, | ||
86 | /*out*/ const char_t **values); | ||
87 | |||
88 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_run_app_fn)(const hostfxr_handle host_context_handle); | ||
89 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_delegate_fn)( | ||
90 | const hostfxr_handle host_context_handle, | ||
91 | enum hostfxr_delegate_type type, | ||
92 | /*out*/ void **delegate); | ||
93 | |||
94 | typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_close_fn)(const hostfxr_handle host_context_handle); | ||
95 | |||
96 | #endif //__HOSTFXR_H__ \ No newline at end of file | ||
diff --git a/src/dnchost/packages.config b/src/dnchost/packages.config index e0396349..dfeefbc4 100644 --- a/src/dnchost/packages.config +++ b/src/dnchost/packages.config | |||
@@ -4,7 +4,7 @@ | |||
4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> | 5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> |
6 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> | 6 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" /> |
7 | <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="3.1.3" targetFramework="native" /> | 7 | <package id="runtime.win-x86.Microsoft.NETCore.DotNetAppHost" version="5.0.0-preview.7.20364.11" targetFramework="native" /> |
8 | <package id="WixToolset.BalUtil" version="4.0.33" targetFramework="native" /> | 8 | <package id="WixToolset.BalUtil" version="4.0.33" targetFramework="native" /> |
9 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.31" targetFramework="native" /> | 9 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.31" targetFramework="native" /> |
10 | <package id="WixToolset.DUtil" version="4.0.45" targetFramework="native" /> | 10 | <package id="WixToolset.DUtil" version="4.0.45" targetFramework="native" /> |
diff --git a/src/dnchost/precomp.h b/src/dnchost/precomp.h index 6a12ef67..d19a0780 100644 --- a/src/dnchost/precomp.h +++ b/src/dnchost/precomp.h | |||
@@ -21,9 +21,10 @@ | |||
21 | #include <balutil.h> | 21 | #include <balutil.h> |
22 | 22 | ||
23 | #include <WixToolset.Dnc.Host.h> | 23 | #include <WixToolset.Dnc.Host.h> |
24 | #define NETHOST_USE_AS_STATIC | ||
24 | #include <nethost.h> | 25 | #include <nethost.h> |
26 | #include <hostfxr.h> | ||
25 | 27 | ||
26 | #include "coreclrhost.h" | 28 | #include "coreclrhost.h" |
27 | #include "hostfxr.h" | ||
28 | #include "dncutil.h" | 29 | #include "dncutil.h" |
29 | #include "dnchost.h" | 30 | #include "dnchost.h" |
diff --git a/src/wixlib/Dnc.wxs b/src/wixlib/Dnc.wxs index 2a27050f..2663360f 100644 --- a/src/wixlib/Dnc.wxs +++ b/src/wixlib/Dnc.wxs | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | <Fragment> | 41 | <Fragment> |
42 | <PayloadGroup Id='Dnc'> | 42 | <PayloadGroup Id='Dnc'> |
43 | <Payload Compressed='yes' SourceFile='nethost.dll' /> | ||
44 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> | 43 | <Payload Compressed='yes' SourceFile='WixToolset.Dnc.Host.dll' /> |
45 | <Payload Compressed='yes' SourceFile='wixstdba.dll' Name='dncpreq.dll' /> | 44 | <Payload Compressed='yes' SourceFile='wixstdba.dll' Name='dncpreq.dll' /> |
46 | </PayloadGroup> | 45 | </PayloadGroup> |