diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-09 21:59:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 21:59:32 +0200 |
commit | d2e620b8fcd21aaca2cbf8716edea550d3f02537 (patch) | |
tree | 3bba9e762601bc8d794f0ff7429b845ea1c76a2b | |
parent | ff0554d05502644b8c898be5be5d73c59a744f34 (diff) | |
parent | 4af03e52bdd7f4fd60a8f77d714c403d9f49177c (diff) |
Merge pull request #30463 from neikeq/fix-search-dirs
Fix export templates ignoring assemblies in 'res://.mono/assemblies'
-rw-r--r-- | modules/mono/build_scripts/solution_builder.py | 10 | ||||
-rw-r--r-- | modules/mono/mono_gd/gd_mono_assembly.cpp | 25 |
2 files changed, 12 insertions, 23 deletions
diff --git a/modules/mono/build_scripts/solution_builder.py b/modules/mono/build_scripts/solution_builder.py index 9f549a10ed..147dce45d9 100644 --- a/modules/mono/build_scripts/solution_builder.py +++ b/modules/mono/build_scripts/solution_builder.py @@ -112,6 +112,11 @@ def find_msbuild_windows(env): mono_bin_dir = os.path.join(mono_root, 'bin') msbuild_mono = os.path.join(mono_bin_dir, 'msbuild.bat') + msbuild_tools_path = find_msbuild_tools_path_reg() + + if msbuild_tools_path: + return (os.path.join(msbuild_tools_path, 'MSBuild.exe'), framework_path, {}) + if os.path.isfile(msbuild_mono): # The (Csc/Vbc/Fsc)ToolExe environment variables are required when # building with Mono's MSBuild. They must point to the batch files @@ -123,11 +128,6 @@ def find_msbuild_windows(env): } return (msbuild_mono, framework_path, mono_msbuild_env) - msbuild_tools_path = find_msbuild_tools_path_reg() - - if msbuild_tools_path: - return (os.path.join(msbuild_tools_path, 'MSBuild.exe'), framework_path, {}) - return None diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index 8e63ef3563..761c7f6fcb 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -46,20 +46,6 @@ bool GDMonoAssembly::in_preload = false; Vector<String> GDMonoAssembly::search_dirs; -static String _get_expected_api_build_config() { -#ifdef TOOLS_ENABLED - return "Debug"; -#else - -#ifdef DEBUG_ENABLED - return "Debug"; -#else - return "Release"; -#endif - -#endif -} - void GDMonoAssembly::fill_search_dirs(Vector<String> &r_search_dirs, const String &p_custom_config, const String &p_custom_bcl_dir) { String framework_dir; @@ -81,11 +67,14 @@ void GDMonoAssembly::fill_search_dirs(Vector<String> &r_search_dirs, const Strin r_search_dirs.push_back(GodotSharpDirs::get_res_temp_assemblies_dir()); } - String api_config = p_custom_config.empty() ? _get_expected_api_build_config() : - (p_custom_config == "Release" ? "Release" : "Debug"); - r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_base_dir().plus_file(api_config)); + if (p_custom_config.empty()) { + r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir()); + } else { + String api_config = p_custom_config == "Release" ? "Release" : "Debug"; + r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_base_dir().plus_file(api_config)); + } - r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_dir()); + r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_base_dir()); r_search_dirs.push_back(OS::get_singleton()->get_resource_dir()); r_search_dirs.push_back(OS::get_singleton()->get_executable_path().get_base_dir()); |