diff options
author | Steven Knight <knight@baldmt.com> | 2006-02-21 05:55:52 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2006-02-21 05:55:52 (GMT) |
commit | b47d0563f5e57520c3e67d7beef04858c81f459d (patch) | |
tree | 664fd8844f50c06ffca1f614e725309cbbb5f08e /src/engine/SCons/Tool/msvc.py | |
parent | 86ebdf5ea7cc5908872f652832529d1880e0d819 (diff) | |
download | SCons-b47d0563f5e57520c3e67d7beef04858c81f459d.zip SCons-b47d0563f5e57520c3e67d7beef04858c81f459d.tar.gz SCons-b47d0563f5e57520c3e67d7beef04858c81f459d.tar.bz2 |
Fix VS8 integration for use with Express. (Christian Maaser) Portability fix in msvs.py.
Diffstat (limited to 'src/engine/SCons/Tool/msvc.py')
-rw-r--r-- | src/engine/SCons/Tool/msvc.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py index 8ea4b39..80c5896 100644 --- a/src/engine/SCons/Tool/msvc.py +++ b/src/engine/SCons/Tool/msvc.py @@ -229,9 +229,6 @@ def _parse_msvc8_overrides(version,platform,suite): # ToDo: Support for other destinations than Win32 path_dirs = path_dirs.replace('Win32|', '') dirs['PATH'] = path_dirs - - dirs['VCINSTALLDIR'] = os.getenv('VCInstallDir') - dirs['VSINSTALLDIR'] = os.getenv('VSInstallDir') else: # There are no default directories in the registry for VS8 Express :( raise SCons.Errors.InternalError, "Unable to find MSVC paths in the registry." @@ -268,7 +265,12 @@ def _get_msvc7_path(path, version, platform): if paths.has_key(key): return paths[key] else: - return '---Unknown Location %s---' % match.group() + # Now look in the global environment variables + envresult = os.getenv(key) + if not envresult is None: + return envresult + '\\' + else: + return '---Unknown Location %s---' % match.group() rv = [] for entry in p.split(os.pathsep): @@ -343,9 +345,9 @@ def get_msvc_path(env, path, version): platform = 'x86' if version_num >= 8.0: - return _get_msvc8_path(path, version, platform, suite) + return _get_msvc8_path(path, str(version_num), platform, suite) elif version_num >= 7.0: - return _get_msvc7_path(path, version, platform) + return _get_msvc7_path(path, str(version_num), platform) path = string.upper(path + ' Dirs') K = ('Software\\Microsoft\\Devstudio\\%s\\' + |