1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

C#: Replace libnethost dependency to find hostfxr

We want to replace libnethost as it gives us issues with some compilers.
Our implementation tries to mimic libnethost's hostfxr_resolver search
logic. We try to use the same function names for easier comparing in
case we need to update this in the future.
This commit is contained in:
Ignacio Roldán Etcheverry
2022-09-06 03:23:55 +02:00
parent 4b164b8e47
commit f784fb2000
11 changed files with 1045 additions and 390 deletions

View File

@@ -819,21 +819,12 @@ def generate_vs_project(env, num_jobs):
module_configs = ModuleConfigs()
if env.get("module_mono_enabled"):
import modules.mono.build_scripts.mono_configure as mono_configure
app_host_dir = mono_configure.find_dotnet_app_host_dir(env)
if app_host_dir and os.path.isdir(app_host_dir):
mono_defines = [("NETHOST_USE_AS_STATIC",)]
if env["tools"]:
mono_defines += [("GD_MONO_HOT_RELOAD",)]
module_configs.add_mode(
"mono",
includes=app_host_dir,
cli_args="module_mono_enabled=yes",
defines=mono_defines,
)
else:
print(".NET App Host directory not found. Generated project will not have build variants for .NET.")
mono_defines = [("GD_MONO_HOT_RELOAD",)] if env["tools"] else []
module_configs.add_mode(
"mono",
cli_args="module_mono_enabled=yes",
defines=mono_defines,
)
env["MSVSBUILDCOM"] = module_configs.build_commandline("scons")
env["MSVSREBUILDCOM"] = module_configs.build_commandline("scons vsproj=yes")