diff options
author | William Deegan <bill@baddogconsulting.com> | 2019-03-26 17:53:32 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2019-03-26 17:53:32 (GMT) |
commit | 49e73ba3ac79d657d29e9499c71b9a9e1ee21720 (patch) | |
tree | 809a0bb90b6173bd31b4ccbb56e03e9dce01ebcd /src/engine | |
parent | 3b013e92fb99ad1f25d0490234ad340eaa51efca (diff) | |
download | SCons-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.py | 22 |
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): |