From: garyo Date: Wed, 25 Nov 2009 03:27:20 +0000 (+0000) Subject: A couple more test fixes, to make test/import.py work on Linux. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c72f0c51b4a85251c0ea9e8890cd8e405319d154;p=scons.git A couple more test fixes, to make test/import.py work on Linux. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4481 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py index 4fda0db6..888d8da7 100644 --- a/src/engine/SCons/Tool/MSCommon/vs.py +++ b/src/engine/SCons/Tool/MSCommon/vs.py @@ -68,11 +68,11 @@ class VisualStudio: def find_vs_dir_by_vc(self): SCons.Tool.MSCommon.vc.get_installed_vcs() - ivc = SCons.Tool.MSCommon.vc.InstalledVCMap.get(self.vc_version) - if not ivc: + dir = SCons.Tool.MSCommon.vc.find_vc_pdir(self.vc_version) + if not dir: debug('find_vs_dir(): no installed VC %s' % self.vc_version) return None - return ivc.get_vc_dir()[:-len(ivc.vc_subdir)] + return dir def find_vs_dir_by_reg(self): root = 'Software\\' diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py index 89bd985e..f43dd945 100644 --- a/src/engine/SCons/Tool/msvs.py +++ b/src/engine/SCons/Tool/msvs.py @@ -1410,7 +1410,12 @@ def generate(env): # Set-up ms tools paths for default version msvc_setup_env_once(env) - version_num, suite = msvs_parse_version(env['MSVS_VERSION']) + if env.has_key('MSVS_VERSION'): + version_num, suite = msvs_parse_version(env['MSVS_VERSION']) + else: + (version_num, suite) = (7.0, None) # guess at a default + if not env.has_key('MSVS'): + env['MSVS'] = {} if (version_num < 7.0): env['MSVS']['PROJECTSUFFIX'] = '.dsp' env['MSVS']['SOLUTIONSUFFIX'] = '.dsw'