diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-07-03 09:44:53 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-07-05 09:38:23 +0200 |
| commit | 270af6fa089ccfb93ace68ada8d476bd902b10fa (patch) | |
| tree | fee771a4f58a8d799f70d37547391831f52b5cd2 /modules/mono/mono_gd/gd_mono_assembly.cpp | |
| parent | 7b569e91c0c6b84965cad416b8e86dcfdacbcfc4 (diff) | |
| download | redot-engine-270af6fa089ccfb93ace68ada8d476bd902b10fa.tar.gz | |
Re-write mono module editor code in C#
Make the build system automatically build the C# Api assemblies to be shipped with the editor.
Make the editor, editor player and debug export templates use Api assemblies built with debug symbols.
Always run MSBuild to build the editor tools and Api assemblies when building Godot.
Several bugs fixed related to assembly hot reloading and restoring state.
Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_assembly.cpp')
| -rw-r--r-- | modules/mono/mono_gd/gd_mono_assembly.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp index 1b765a09ff..8e63ef3563 100644 --- a/modules/mono/mono_gd/gd_mono_assembly.cpp +++ b/modules/mono/mono_gd/gd_mono_assembly.cpp @@ -46,6 +46,20 @@ 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; @@ -67,11 +81,19 @@ 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)); + r_search_dirs.push_back(GodotSharpDirs::get_res_assemblies_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()); + #ifdef TOOLS_ENABLED r_search_dirs.push_back(GodotSharpDirs::get_data_editor_tools_dir()); + + // For GodotTools to find the api assemblies + r_search_dirs.push_back(GodotSharpDirs::get_data_editor_prebuilt_api_dir().plus_file("Debug")); #endif } |
