summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-20 17:46:34 +0200
committerGitHub <noreply@github.com>2019-09-20 17:46:34 +0200
commit9c116f4f1df740c74664d0e480f73c40ca6634ad (patch)
treeffa7f4680d6df886421f63eaeb3df4582f83f527 /modules/mono
parent54eb4bce5f4963e110162cd198cfb89a802c6021 (diff)
parent95c685143a06420bc9cca6944b1449b675841a2d (diff)
Merge pull request #32223 from neikeq/cs_glue_version_fix
C#: Make sure cs_glue_version is present when building export templates
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/editor/bindings_generator.cpp3
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp12
2 files changed, 9 insertions, 6 deletions
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 1888bb3cb9..74710db224 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -1785,6 +1785,9 @@ Error BindingsGenerator::generate_glue(const String &p_output_dir) {
output.append("uint32_t get_bindings_version() { return ");
output.append(String::num_uint64(BINDINGS_GENERATOR_VERSION) + "; }\n");
+ output.append("uint32_t get_cs_glue_version() { return ");
+ output.append(String::num_uint64(CS_GLUE_VERSION) + "; }\n");
+
output.append("\nvoid register_generated_icalls() " OPEN_BLOCK);
output.append("\tgodot_register_glue_header_icalls();\n");
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index cd111abd4d..915a01af7e 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -44,7 +44,6 @@
#include "core/project_settings.h"
#include "../csharp_script.h"
-#include "../glue/cs_glue_version.gen.h"
#include "../godotsharp_dirs.h"
#include "../utils/path_utils.h"
#include "gd_mono_class.h"
@@ -395,23 +394,24 @@ uint64_t get_core_api_hash();
uint64_t get_editor_api_hash();
#endif
uint32_t get_bindings_version();
+uint32_t get_cs_glue_version();
void register_generated_icalls();
#else
uint64_t get_core_api_hash() {
- CRASH_NOW();
GD_UNREACHABLE();
}
#ifdef TOOLS_ENABLED
uint64_t get_editor_api_hash() {
- CRASH_NOW();
GD_UNREACHABLE();
}
#endif
uint32_t get_bindings_version() {
- CRASH_NOW();
+ GD_UNREACHABLE();
+}
+uint32_t get_cs_glue_version() {
GD_UNREACHABLE();
}
@@ -687,7 +687,7 @@ bool GDMono::_load_core_api_assembly() {
APIAssembly::Version api_assembly_ver = APIAssembly::Version::get_from_loaded_assembly(core_api_assembly, APIAssembly::API_CORE);
core_api_assembly_out_of_sync = GodotSharpBindings::get_core_api_hash() != api_assembly_ver.godot_api_hash ||
GodotSharpBindings::get_bindings_version() != api_assembly_ver.bindings_version ||
- CS_GLUE_VERSION != api_assembly_ver.cs_glue_version;
+ GodotSharpBindings::get_cs_glue_version() != api_assembly_ver.cs_glue_version;
if (!core_api_assembly_out_of_sync) {
GDMonoUtils::update_godot_api_cache();
@@ -722,7 +722,7 @@ bool GDMono::_load_editor_api_assembly() {
APIAssembly::Version api_assembly_ver = APIAssembly::Version::get_from_loaded_assembly(editor_api_assembly, APIAssembly::API_EDITOR);
editor_api_assembly_out_of_sync = GodotSharpBindings::get_editor_api_hash() != api_assembly_ver.godot_api_hash ||
GodotSharpBindings::get_bindings_version() != api_assembly_ver.bindings_version ||
- CS_GLUE_VERSION != api_assembly_ver.cs_glue_version;
+ GodotSharpBindings::get_cs_glue_version() != api_assembly_ver.cs_glue_version;
} else {
editor_api_assembly_out_of_sync = false;
}