A couple more test fixes, to make test/import.py work on Linux.
authorgaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 25 Nov 2009 03:27:20 +0000 (03:27 +0000)
committergaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 25 Nov 2009 03:27:20 +0000 (03:27 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@4481 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/MSCommon/vs.py
src/engine/SCons/Tool/msvs.py

index 4fda0db633f19b77b3bfc0445da83e70d3911e4c..888d8da7ad4eca2a2a6f4ffb6fb8b1d8b304d31a 100644 (file)
@@ -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\\'
index 89bd985e937be9888f3e19e9e54c6b366d01e197..f43dd9455e27cddb3782c86ea7ab3b2d5d962196 100644 (file)
@@ -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'