summaryrefslogtreecommitdiff
path: root/modules/mono/SCsub
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/SCsub
parentdf0610e9e6d1322072f2d9e505bf95ebaa0c04e4 (diff)
parentaa5a0b550f65710f7a9511661442c7fe0b8b41c2 (diff)
Merge pull request #12491 from neikeq/waitasecond···
Fix FrameworkPathOverride and assemblies path loop
Diffstat (limited to 'modules/mono/SCsub')
-rw-r--r--modules/mono/SCsub38
1 files changed, 20 insertions, 18 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index 9f90a7b70c..27e60c4623 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -97,29 +97,31 @@ def find_msbuild_unix(filename):
def find_msbuild_windows():
import mono_reg_utils as monoreg
- msbuild_tools_path = monoreg.find_msbuild_tools_path_reg()
+ bits = env['bits']
- if msbuild_tools_path:
- return (os.path.join(msbuild_tools_path, 'MSBuild.exe'), '')
+ if bits == '32':
+ if os.getenv('MONO32_PREFIX'):
+ mono_root = os.getenv('MONO32_PREFIX')
+ else:
+ mono_root = monoreg.find_mono_root_dir(bits)
else:
- bits = env['bits']
-
- if bits == '32':
- if os.getenv('MONO32_PREFIX'):
- mono_root = os.getenv('MONO32_PREFIX')
- else:
- mono_root = monoreg.find_mono_root_dir(bits)
+ if os.getenv('MONO64_PREFIX'):
+ mono_root = os.getenv('MONO64_PREFIX')
else:
- if os.getenv('MONO64_PREFIX'):
- mono_root = os.getenv('MONO64_PREFIX')
- else:
- mono_root = monoreg.find_mono_root_dir(bits)
+ mono_root = monoreg.find_mono_root_dir(bits)
- if mono_root:
- msbuild_mono = os.path.join(mono_root, 'bin', 'msbuild.bat')
+ if not mono_root:
+ raise RuntimeError('Cannot find mono root directory')
+
+ msbuild_tools_path = monoreg.find_msbuild_tools_path_reg()
+
+ if msbuild_tools_path:
+ return (os.path.join(msbuild_tools_path, 'MSBuild.exe'), os.path.join(mono_root, 'lib', 'mono', '4.5'))
+ else:
+ msbuild_mono = os.path.join(mono_root, 'bin', 'msbuild.bat')
- if os.path.isfile(msbuild_mono):
- return (msbuild_mono, os.path.join(mono_root, 'lib', 'mono', '4.5'))
+ if os.path.isfile(msbuild_mono):
+ return (msbuild_mono, '')
return None