Merge pull request #12642 from BrainBlasted/fix_msbuild_unix

Added fallback for msbuild.exe.
This commit is contained in:
Rémi Verschelde 2017-11-05 11:54:26 +01:00 committed by GitHub
commit 9a78efc7c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -84,12 +84,16 @@ def find_msbuild_unix(filename):
hint_path = os.path.join(hint_dir, filename)
if os.path.isfile(hint_path):
return hint_path
elif os.path.isfile(hint_path + ".exe"):
return hint_path + ".exe"
for hint_dir in os.environ["PATH"].split(os.pathsep):
hint_dir = hint_dir.strip('"')
hint_path = os.path.join(hint_dir, filename)
if os.path.isfile(hint_path) and os.access(hint_path, os.X_OK):
return hint_path
if os.path.isfile(hint_path + ".exe") and os.access(hint_path + ".exe", os.X_OK):
return hint_path + ".exe"
return None

View file

@ -53,6 +53,10 @@ String _find_build_engine_on_unix(const String &p_name) {
if (ret.length())
return ret;
String ret_fallback = path_which(p_name + ".exe");
if (ret_fallback.length())
return ret_fallback;
const char *locations[] = {
#ifdef OSX_ENABLED
"/Library/Frameworks/Mono.framework/Versions/Current/bin/",