diff options
author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-03-06 21:39:24 +0100 |
---|---|---|
committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-06-14 21:07:58 +0200 |
commit | 92f13ba9ea9f18425c36a2e738cc9102f6151fa9 (patch) | |
tree | d71271ab47994e12e826779b90523cebe85f6dfe /modules/mono/mono_gd | |
parent | 33957aee69683cf1f542a8622e5a9efd23070f1c (diff) | |
download | redot-engine-92f13ba9ea9f18425c36a2e738cc9102f6151fa9.tar.gz |
C#: Unify project name handling and fix issues with the handling of some special characters
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r-- | modules/mono/mono_gd/gd_mono.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 97bf49271a..0aef45c128 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -293,20 +293,10 @@ godot_plugins_initialize_fn initialize_hostfxr_and_godot_plugins(bool &r_runtime return godot_plugins_initialize; } #else -static String get_assembly_name() { - String assembly_name = GLOBAL_GET("dotnet/project/assembly_name"); - - if (assembly_name.is_empty()) { - assembly_name = ProjectSettings::get_singleton()->get_safe_project_name(); - } - - return assembly_name; -} - godot_plugins_initialize_fn initialize_hostfxr_and_godot_plugins(bool &r_runtime_initialized) { godot_plugins_initialize_fn godot_plugins_initialize = nullptr; - String assembly_name = get_assembly_name(); + String assembly_name = path::get_csharp_project_name(); HostFxrCharString assembly_path = str_to_hostfxr(GodotSharpDirs::get_api_assemblies_dir() .path_join(assembly_name + ".dll")); @@ -331,7 +321,7 @@ godot_plugins_initialize_fn initialize_hostfxr_and_godot_plugins(bool &r_runtime } godot_plugins_initialize_fn try_load_native_aot_library(void *&r_aot_dll_handle) { - String assembly_name = get_assembly_name(); + String assembly_name = path::get_csharp_project_name(); #if defined(WINDOWS_ENABLED) String native_aot_so_path = GodotSharpDirs::get_api_assemblies_dir().path_join(assembly_name + ".dll"); @@ -476,11 +466,7 @@ void GDMono::_init_godot_api_hashes() { #ifdef TOOLS_ENABLED bool GDMono::_load_project_assembly() { - String assembly_name = GLOBAL_GET("dotnet/project/assembly_name"); - - if (assembly_name.is_empty()) { - assembly_name = ProjectSettings::get_singleton()->get_safe_project_name(); - } + String assembly_name = path::get_csharp_project_name(); String assembly_path = GodotSharpDirs::get_res_temp_assemblies_dir() .path_join(assembly_name + ".dll"); |