summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2006-02-21 05:55:52 (GMT)
committerSteven Knight <knight@baldmt.com>2006-02-21 05:55:52 (GMT)
commitb47d0563f5e57520c3e67d7beef04858c81f459d (patch)
tree664fd8844f50c06ffca1f614e725309cbbb5f08e /src
parent86ebdf5ea7cc5908872f652832529d1880e0d819 (diff)
downloadSCons-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')
-rw-r--r--src/engine/SCons/Tool/msvc.py14
-rw-r--r--src/engine/SCons/Tool/msvs.py2
2 files changed, 9 insertions, 7 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\\' +
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index f00aca9..e17dcfd 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -739,7 +739,7 @@ class _GenerateV7DSP(_DSPGenerator):
if len(sources) > 1:
s = map(os.path.normpath, sources)
cp = os.path.commonprefix(s)
- if cp and s[0][len(cp)] == os.path.sep:
+ if cp and s[0][len(cp)] == os.sep:
sources = map(lambda s, l=len(cp): s[l:], sources)
commonprefix = cp