summaryrefslogtreecommitdiff
path: root/modules/mono/editor
diff options
context:
space:
mode:
authorIgnacio Etcheverry <neikeq@users.noreply.github.com>2017-10-29 22:33:27 +0100
committerGitHub <noreply@github.com>2017-10-29 22:33:27 +0100
commit619e4eb23df037d152bf7776c5447d46293aadff (patch)
tree246d7e93e31511143c188a3443eca372f1a18420 /modules/mono/editor
parentdf0610e9e6d1322072f2d9e505bf95ebaa0c04e4 (diff)
parentaa5a0b550f65710f7a9511661442c7fe0b8b41c2 (diff)
Merge pull request #12491 from neikeq/waitasecond···
Fix FrameworkPathOverride and assemblies path loop
Diffstat (limited to 'modules/mono/editor')
-rw-r--r--modules/mono/editor/godotsharp_builds.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp
index aaea1bc839..83d2bb1471 100644
--- a/modules/mono/editor/godotsharp_builds.cpp
+++ b/modules/mono/editor/godotsharp_builds.cpp
@@ -32,6 +32,7 @@
#include "main/main.h"
#include "../godotsharp_dirs.h"
+#include "../mono_gd/gd_mono.h"
#include "../mono_gd/gd_mono_class.h"
#include "../mono_gd/gd_mono_marshal.h"
#include "../utils/path_utils.h"
@@ -84,10 +85,16 @@ void godot_icall_BuildInstance_get_MSBuildInfo(MonoString **r_msbuild_path, Mono
if (!msbuild_tools_path.ends_with("\\"))
msbuild_tools_path += "\\";
- *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
-
// FrameworkPathOverride
- *r_framework_path = GDMonoMarshal::mono_string_from_godot(GDMono::get_singleton()->get_mono_reg_info().assembly_dir);
+ const MonoRegInfo &mono_reg_info = GDMono::get_singleton()->get_mono_reg_info();
+ if (mono_reg_info.assembly_dir.length()) {
+ *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe");
+
+ String framework_path = path_join(mono_reg_info.assembly_dir, "mono", "4.5");
+ *r_framework_path = GDMonoMarshal::mono_string_from_godot(framework_path);
+ } else {
+ ERR_PRINT("Cannot find Mono's assemblies directory in the registry");
+ }
return;
}
@@ -130,6 +137,7 @@ void godot_icall_BuildInstance_get_MSBuildInfo(MonoString **r_msbuild_path, Mono
return;
#else
+ ERR_PRINT("Not implemented on this platform");
return;
#endif
}