summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-03-26 17:53:32 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2019-03-26 17:53:32 (GMT)
commit49e73ba3ac79d657d29e9499c71b9a9e1ee21720 (patch)
tree809a0bb90b6173bd31b4ccbb56e03e9dce01ebcd /src/engine
parent3b013e92fb99ad1f25d0490234ad340eaa51efca (diff)
downloadSCons-49e73ba3ac79d657d29e9499c71b9a9e1ee21720.zip
SCons-49e73ba3ac79d657d29e9499c71b9a9e1ee21720.tar.gz
SCons-49e73ba3ac79d657d29e9499c71b9a9e1ee21720.tar.bz2
Fix Issue #3333 - Find vswhere under 32 bit windows installs
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vc.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py
index ea053cb..c8fb19d 100644
--- a/src/engine/SCons/Tool/MSCommon/vc.py
+++ b/src/engine/SCons/Tool/MSCommon/vc.py
@@ -286,13 +286,21 @@ def find_vc_pdir_vswhere(msvc_version):
:param msvc_version:
:return: MSVC install dir or None
"""
- vswhere_path = os.path.join(
- 'C:\\',
- 'Program Files (x86)',
- 'Microsoft Visual Studio',
- 'Installer',
- 'vswhere.exe'
- )
+
+ # For bug 3333 - support default location of vswhere for both 64 and 32 bit windows
+ # installs.
+ for pf in ['Program Files (x86)', 'Program Files']:
+ vswhere_path = os.path.join(
+ 'C:\\',
+ pf,
+ 'Microsoft Visual Studio',
+ 'Installer',
+ 'vswhere.exe'
+ )
+ if os.path.exists(vswhere_path):
+ # If we found vswhere, then use it.
+ break
+
vswhere_cmd = [vswhere_path, '-products', '*', '-version', msvc_version, '-property', 'installationPath']
if os.path.exists(vswhere_path):