|
@@ -30,6 +30,7 @@
|
|
|
|
|
|
|
|
#include "godotsharp_builds.h"
|
|
#include "godotsharp_builds.h"
|
|
|
|
|
|
|
|
|
|
+#include "core/vector.h"
|
|
|
#include "main/main.h"
|
|
#include "main/main.h"
|
|
|
|
|
|
|
|
#include "../godotsharp_dirs.h"
|
|
#include "../godotsharp_dirs.h"
|
|
@@ -50,6 +51,16 @@ void godot_icall_BuildInstance_ExitCallback(MonoString *p_solution, MonoString *
|
|
|
GodotSharpBuilds::get_singleton()->build_exit_callback(MonoBuildInfo(solution, config), p_exit_code);
|
|
GodotSharpBuilds::get_singleton()->build_exit_callback(MonoBuildInfo(solution, config), p_exit_code);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static Vector<const char *> _get_msbuild_hint_dirs() {
|
|
|
|
|
+ Vector<const char *> ret;
|
|
|
|
|
+#ifdef OSX_ENABLED
|
|
|
|
|
+ ret.push_back("/Library/Frameworks/Mono.framework/Versions/Current/bin/");
|
|
|
|
|
+ ret.push_back("/usr/local/var/homebrew/linked/mono/bin/");
|
|
|
|
|
+#endif
|
|
|
|
|
+ ret.push_back("/opt/novell/mono/bin/");
|
|
|
|
|
+ return ret;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#ifdef UNIX_ENABLED
|
|
#ifdef UNIX_ENABLED
|
|
|
String _find_build_engine_on_unix(const String &p_name) {
|
|
String _find_build_engine_on_unix(const String &p_name) {
|
|
|
String ret = path_which(p_name);
|
|
String ret = path_which(p_name);
|
|
@@ -61,15 +72,9 @@ String _find_build_engine_on_unix(const String &p_name) {
|
|
|
if (ret_fallback.length())
|
|
if (ret_fallback.length())
|
|
|
return ret_fallback;
|
|
return ret_fallback;
|
|
|
|
|
|
|
|
- const char *locations[] = {
|
|
|
|
|
-#ifdef OSX_ENABLED
|
|
|
|
|
- "/Library/Frameworks/Mono.framework/Versions/Current/bin/",
|
|
|
|
|
- "/usr/local/var/homebrew/linked/mono/bin/",
|
|
|
|
|
-#endif
|
|
|
|
|
- "/opt/novell/mono/bin/"
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ static Vector<const char *> locations = _get_msbuild_hint_dirs();
|
|
|
|
|
|
|
|
- for (int i = 0; i < sizeof(locations) / sizeof(const char *); i++) {
|
|
|
|
|
|
|
+ for (int i = 0; i < locations.size(); i++) {
|
|
|
String hint_path = locations[i] + p_name;
|
|
String hint_path = locations[i] + p_name;
|
|
|
|
|
|
|
|
if (FileAccess::exists(hint_path)) {
|
|
if (FileAccess::exists(hint_path)) {
|