From 70b5d207d799308a6c3742f5d0348ab4fca75a3d Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 22 Jul 2020 18:39:50 +1000 Subject: Upgrade DotNetAppHost package to .NET 5 to use its static nethost lib and headers. --- src/dnchost/dnchost.vcxproj | 9 +---- src/dnchost/hostfxr.h | 96 --------------------------------------------- src/dnchost/packages.config | 2 +- src/dnchost/precomp.h | 3 +- src/wixlib/Dnc.wxs | 1 - 5 files changed, 5 insertions(+), 106 deletions(-) delete mode 100644 src/dnchost/hostfxr.h (limited to 'src') 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 @@ - ..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.3.1.3\runtimes\win-x86\native\ - shlwapi.lib;$(NetHostPath)nethost.lib + ..\..\packages\runtime.win-x86.Microsoft.NETCore.DotNetAppHost.5.0.0-preview.7.20364.11\runtimes\win-x86\native\ + shlwapi.lib;$(NetHostPath)libnethost.lib @@ -42,7 +42,6 @@ - @@ -50,10 +49,6 @@ - - PreserveNewest - False - 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 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - - -// ***** ABOUT THIS HEADER ***** -// ************************************************************************************** -// -// This is the version on 2019-12-22 from -// https://github.com/dotnet/runtime/blob/master/src/installer/corehost/cli/hostfxr.h -// -// ************************************************************************************** -// **************************** - - -#ifndef __HOSTFXR_H__ -#define __HOSTFXR_H__ - -#include -#include - -#if defined(_WIN32) - #define HOSTFXR_CALLTYPE __cdecl - #ifdef _WCHAR_T_DEFINED - typedef wchar_t char_t; - #else - typedef unsigned short char_t; - #endif -#else - #define HOSTFXR_CALLTYPE - typedef char char_t; -#endif - -enum hostfxr_delegate_type -{ - hdt_com_activation, - hdt_load_in_memory_assembly, - hdt_winrt_activation, - hdt_com_register, - hdt_com_unregister, - hdt_load_assembly_and_get_function_pointer -}; - -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_fn)(const int argc, const char_t **argv); -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_main_startupinfo_fn)( - const int argc, - const char_t **argv, - const char_t *host_path, - const char_t *dotnet_root, - const char_t *app_path); - -typedef void(HOSTFXR_CALLTYPE *hostfxr_error_writer_fn)(const char_t *message); -typedef hostfxr_error_writer_fn(HOSTFXR_CALLTYPE *hostfxr_set_error_writer_fn)(hostfxr_error_writer_fn error_writer); - -typedef void* hostfxr_handle; -struct hostfxr_initialize_parameters -{ - size_t size; - const char_t *host_path; - const char_t *dotnet_root; -}; - -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_dotnet_command_line_fn)( - int argc, - const char_t **argv, - const struct hostfxr_initialize_parameters *parameters, - /*out*/ hostfxr_handle *host_context_handle); -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_initialize_for_runtime_config_fn)( - const char_t *runtime_config_path, - const struct hostfxr_initialize_parameters *parameters, - /*out*/ hostfxr_handle *host_context_handle); - -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_property_value_fn)( - const hostfxr_handle host_context_handle, - const char_t *name, - /*out*/ const char_t **value); -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_set_runtime_property_value_fn)( - const hostfxr_handle host_context_handle, - const char_t *name, - const char_t *value); -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_properties_fn)( - const hostfxr_handle host_context_handle, - /*inout*/ size_t * count, - /*out*/ const char_t **keys, - /*out*/ const char_t **values); - -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_run_app_fn)(const hostfxr_handle host_context_handle); -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_get_runtime_delegate_fn)( - const hostfxr_handle host_context_handle, - enum hostfxr_delegate_type type, - /*out*/ void **delegate); - -typedef int32_t(HOSTFXR_CALLTYPE *hostfxr_close_fn)(const hostfxr_handle host_context_handle); - -#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 @@ - + 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 @@ #include #include +#define NETHOST_USE_AS_STATIC #include +#include #include "coreclrhost.h" -#include "hostfxr.h" #include "dncutil.h" #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 @@ - -- cgit v1.2.3-55-g6feb