diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-29 11:32:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-29 11:32:00 +0100 |
commit | c193286186f8743732b62420de86ee0d3f1a93b8 (patch) | |
tree | 7147c99cb088b7ae2d1446d32889135a0f011d46 /modules/mono/editor/godotsharp_builds.cpp | |
parent | 6ea8ffc12fd6739c0d8fed37cd42a7d713099137 (diff) | |
parent | 15e30187eed48c4f70efe94c2624c2e50d302295 (diff) |
Merge pull request #12475 from neikeq/ohuiii
Fix regression from #12473 and #12388
Diffstat (limited to 'modules/mono/editor/godotsharp_builds.cpp')
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index 8ec19e1500..aaea1bc839 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -71,15 +71,10 @@ String _find_build_engine_on_unix(const String &p_name) { } #endif -MonoString **godot_icall_BuildInstance_get_MSBuildInfo() { +void godot_icall_BuildInstance_get_MSBuildInfo(MonoString **r_msbuild_path, MonoString **r_framework_path) { GodotSharpBuilds::BuildTool build_tool = GodotSharpBuilds::BuildTool(int(EditorSettings::get_singleton()->get("mono/builds/build_tool"))); - MonoString *res[2] = { - NULL, // MSBuildPath - NULL // FrameworkPathOverride - }; - #if defined(WINDOWS_ENABLED) switch (build_tool) { case GodotSharpBuilds::MSBUILD: { @@ -89,12 +84,12 @@ MonoString **godot_icall_BuildInstance_get_MSBuildInfo() { if (!msbuild_tools_path.ends_with("\\")) msbuild_tools_path += "\\"; - res[0] = GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe"); + *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_tools_path + "MSBuild.exe"); // FrameworkPathOverride - res[1] = GDMonoMarshal::mono_string_from_godot(GDMono::get_singleton()->get_mono_reg_info().assembly_dir); + *r_framework_path = GDMonoMarshal::mono_string_from_godot(GDMono::get_singleton()->get_mono_reg_info().assembly_dir); - return res; + return; } if (OS::get_singleton()->is_stdout_verbose()) @@ -107,8 +102,9 @@ MonoString **godot_icall_BuildInstance_get_MSBuildInfo() { WARN_PRINTS("Cannot find msbuild ('mono/builds/build_tool'). Tried with path: " + msbuild_path); } - res[0] = GDMonoMarshal::mono_string_from_godot(msbuild_path); - return res; + *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(msbuild_path); + + return; } break; default: ERR_EXPLAIN("You don't deserve to live"); @@ -121,19 +117,20 @@ MonoString **godot_icall_BuildInstance_get_MSBuildInfo() { if (build_tool != GodotSharpBuilds::XBUILD) { if (msbuild_path.empty()) { WARN_PRINT("Cannot find msbuild ('mono/builds/build_tool')."); - return res; + return; } } else { if (xbuild_path.empty()) { WARN_PRINT("Cannot find xbuild ('mono/builds/build_tool')."); - return res; + return; } } - res[0] = GDMonoMarshal::mono_string_from_godot(build_tool != GodotSharpBuilds::XBUILD ? msbuild_path : xbuild_path); - return res; + *r_msbuild_path = GDMonoMarshal::mono_string_from_godot(build_tool != GodotSharpBuilds::XBUILD ? msbuild_path : xbuild_path); + + return; #else - return res; + return; #endif } |