Add support for Visual Studio 2005 Professional. Windows portability fixes for vario...
authorstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 12 Feb 2006 19:56:03 +0000 (19:56 +0000)
committerstevenknight <stevenknight@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Sun, 12 Feb 2006 19:56:03 +0000 (19:56 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@1420 fdb21ef1-2011-0410-befe-b5e4ea1792b1

16 files changed:
etc/TestSCons.py
src/CHANGES.txt
src/engine/SCons/Tool/linkloc.py
src/engine/SCons/Tool/msvc.py
src/engine/SCons/Tool/msvs.py
test/Java/JAR.py
test/Java/JARCHDIR.py
test/Java/JARFLAGS.py
test/Java/JAVAC.py
test/Java/JAVACFLAGS.py
test/Java/JAVAH.py
test/Java/RMIC.py
test/MSVS/vs-6.0-exec.py
test/MSVS/vs-7.0-exec.py
test/MSVS/vs-7.1-exec.py
test/MSVS/vs-8.0-exec.py

index 87eadfbf38f150be77c681db15b548ac1f967ce7..49e8da6d5b4ad33a7d9917ba14e9d0081df694b8 100644 (file)
@@ -505,6 +505,20 @@ print "self._msvs_versions =", str(env['MSVS']['VERSIONS'])
         result = string.replace(result, r'<PROJECT_GUID>', project_guid)
         return result
 
+    def get_msvs_executable(self, version):
+        """Returns a full path to the executable (MSDEV or devenv)
+        for the specified version of Visual Studio.
+        """
+        sub_path = {
+            '6.0' : ['Common', 'MSDev98', 'Bin', 'MSDEV.COM'],
+            '7.0' : ['Common7', 'IDE', 'devenv.com'],
+            '7.1' : ['Common7', 'IDE', 'devenv.com'],
+            '8.0' : ['Common7', 'IDE', 'devenv.com'],
+        }
+        from SCons.Tool.msvs import get_msvs_install_dirs
+        vs_path = get_msvs_install_dirs(version)['VSINSTALLDIR']
+        return apply(os.path.join, [vs_path] + sub_path[version])
+
 # In some environments, $AR will generate a warning message to stderr
 # if the library doesn't previously exist and is being created.  One
 # way to fix this is to tell AR to be quiet (sometimes the 'c' flag),
index 5a6935ee1cf086927b695eaf96be38b409b5c2ee..e2d5d7cc12b4f10bce5653efaa8abd12e5047202 100644 (file)
@@ -137,6 +137,11 @@ RELEASE 0.97 - XXX
   - Support the --debug=memory option on Windows when the Python version
     has the win32process and win32api modules.
 
+  - Add support for Visual Studio 2005 Pro.
+
+  - Fix Windows portability issues in various Visual Studio and
+    Java tests.
+
   From Christian Maaser:
 
   - Add support for Visual Studio Express Editions.
index 38538554b810f43c3a5596f9cc996dbaf63c6f1b..f7c2c5a3a51ab001b5c7d68a2fe5a579fe16d00f 100644 (file)
@@ -95,7 +95,7 @@ def generate(env):
     env['LIBLINKSUFFIX']='$LIBSUFFIX'
 
     msvs_version = env.get('MSVS_VERSION')
-    include_path, lib_path, exe_path = get_msvc_paths(msvs_version)
+    include_path, lib_path, exe_path = get_msvc_paths(env, version = msvs_version)
     env['ENV']['LIB']            = lib_path
     env['ENV']['PATH']           = exe_path
 
index bc50eaaad81b3a4d6622a31e47f0918a62cd839c..8ea4b39dee002c8e7735889491bda299c14e9fbe 100644 (file)
@@ -319,9 +319,10 @@ def _get_msvc8_path(path, version, platform, suite):
 
 def get_msvc_path(env, path, version):
     """
-    Get a list of visualstudio directories (include, lib or path).  Return
-    a string delimited by ';'. An exception will be raised if unable to
-    access the registry or appropriate registry keys not found.
+    Get a list of visualstudio directories (include, lib or path).
+    Return a string delimited by the os.pathsep separator (';'). An
+    exception will be raised if unable to access the registry or
+    appropriate registry keys not found.
     """
 
     if not SCons.Util.can_read_reg:
@@ -467,9 +468,9 @@ def _get_msvc8_default_paths(env, version, suite, use_mfc_dirs):
 
     MVSdir = None
     paths = {}
-    exe_path = ''
-    lib_path = ''
-    include_path = ''
+    exe_paths = []
+    lib_paths = []
+    include_paths = []
     try:
         paths = SCons.Tool.msvs.get_msvs_install_dirs(version)
         MVSdir = paths['VSINSTALLDIR']
@@ -486,31 +487,44 @@ def _get_msvc8_default_paths(env, version, suite, use_mfc_dirs):
         else:
             MVSVCdir = os.path.join(MVSdir,'VC')
 
-        MVSCommondir = r'%s\Common7' % MVSdir
-        include_path = r'%s\include' % (MVSVCdir)
-        lib_path = r'%s\lib' % (MVSVCdir)
-        exe_path = r'%s\IDE;%s\bin;%s\Tools;%s\Tools\bin' % (MVSCommondir,MVSVCdir, MVSCommondir, MVSCommondir)
+        MVSCommondir = os.path.join(MVSdir, 'Common7')
+        include_paths.append( os.path.join(MVSVCdir, 'include') )
+        lib_paths.append( os.path.join(MVSVCdir, 'lib') )
+        for base, subdir in [(MVSCommondir,'IDE'), (MVSVCdir,'bin'),
+                             (MVSCommondir,'Tools'), (MVSCommondir,r'Tools\bin')]:
+            exe_paths.append( os.path.join( base, subdir) )
 
         if paths.has_key('PLATFORMSDKDIR'):
             PlatformSdkDir = paths['PLATFORMSDKDIR']
-            include_path = include_path + r';%sInclude' % PlatformSdkDir
-            lib_path = lib_path + r';%s\lib' % PlatformSdkDir
-            if use_mfc_dirs:
-                include_path = include_path + r';%sInclude\mfc;%sInclude\atl' % (PlatformSdkDir, PlatformSdkDir)
-            lib_path = lib_path + r';%s\lib' % paths['PLATFORMSDKDIR']
-
-        envvar = 'include'
-        SCons.Util.get_environment_var(envvar)
-        include_path = include_path + envvar
+        else:
+            PlatformSdkDir = os.path.join(MVSVCdir,'PlatformSDK')
+        platform_include_path = os.path.join( PlatformSdkDir, 'Include' )
+        include_paths.append( platform_include_path )
+        lib_paths.append( os.path.join( PlatformSdkDir, 'Lib' ) )
+        if use_mfc_dirs:
+            if paths.has_key('PLATFORMSDKDIR'):
+                include_paths.append( os.path.join( platform_include_path, 'mfc' ) )
+                include_paths.append( os.path.join( platform_include_path, 'atl' ) )
+            else:
+                atlmfc_path = os.path.join( MVSVCdir, 'atlmfc' )
+                include_paths.append( os.path.join( atlmfc_path, 'include' ) )
+                lib_paths.append( os.path.join( atlmfc_path, 'lib' ) )
+
+        env_include_path = SCons.Util.get_environment_var('INCLUDE')
+        if env_include_path:
+            include_paths.append( env_include_path )
 
         if SCons.Util.can_read_reg and paths.has_key('FRAMEWORKSDKDIR'):
-            include_path = include_path + r';%s\include'%paths['FRAMEWORKSDKDIR']
-            lib_path = lib_path + r';%s\lib'%paths['FRAMEWORKSDKDIR']
-            exe_path = exe_path + r';%s\bin'%paths['FRAMEWORKSDKDIR']
+            include_paths.append( os.path.join( paths['FRAMEWORKSDKDIR'], 'include' ) )
+            lib_paths.append( os.path.join( paths['FRAMEWORKSDKDIR'], 'lib' ) )
+            exe_paths.append( paths['FRAMEWORKSDKDIR'], 'bin' )
 
         if SCons.Util.can_read_reg and paths.has_key('FRAMEWORKDIR') and paths.has_key('FRAMEWORKVERSION'):
-            exe_path = exe_path + r';%s\%s'%(paths['FRAMEWORKDIR'],paths['FRAMEWORKVERSION'])
+            exe_paths.append( os.path.join( paths['FRAMEWORKDIR'], paths['FRAMEWORKVERSION'] ) )
 
+    include_path = string.join( include_paths, os.pathsep )
+    lib_path = string.join(lib_paths, os.pathsep )
+    exe_path = string.join(exe_paths, os.pathsep )
     return (include_path, lib_path, exe_path)
 
 def get_msvc_paths(env, version=None, use_mfc_dirs=0):
@@ -722,6 +736,11 @@ def generate(env):
     env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS'
     env['BUILDERS']['PCH'] = pch_builder
 
+    if not env.has_key('ENV'):
+        env['ENV'] = {}
+    if not env['ENV'].has_key('SystemRoot'):    # required for dlls in the winsxs folders
+        env['ENV']['SystemRoot'] = SCons.Platform.win32.get_system_root()
+
 def exists(env):
     if SCons.Tool.msvs.is_msvs_installed():
         # there's at least one version of MSVS installed.
index 074733ace2251973e06bc0e0cf2b2eba1ef02a66..f00aca970862690c9aad9c7b168615161ffcc5b1 100644 (file)
@@ -1135,7 +1135,9 @@ def get_default_visualstudio_version(env):
     if not env.has_key('MSVS') or not SCons.Util.is_Dict(env['MSVS']):
         env['MSVS'] = {}    
 
-        if SCons.Util.can_read_reg:
+        if env['MSVS'].has_key('VERSIONS'):
+            versions = env['MSVS']['VERSIONS']
+        elif SCons.Util.can_read_reg:
             v = get_visualstudio_versions()
             if v:
                 versions = v
@@ -1275,11 +1277,28 @@ def get_visualstudio8_suites():
 
     suites = []
 
-    # ToDo: add tests for better suits than VS8 Express here.
+    # Detect Standard, Professional and Team edition
+    try:
+        idk = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
+            r'Software\Microsoft\VisualStudio\8.0')
+        id = SCons.Util.RegQueryValueEx(idk, 'InstallDir')
+        editions = { 'PRO': r'Setup\VS\Pro' }       # ToDo: add standard and team editions
+        edition_name = 'STD'
+        for name, key_suffix in editions.items():
+            try:
+                idk = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
+                    r'Software\Microsoft\VisualStudio\8.0' + '\\' + key_suffix )
+                edition_name = name
+            except SCons.Util.RegError:
+                pass
+            suites.append(edition_name)
+    except SCons.Util.RegError:
+        pass
 
-    idk = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
-        r'Software\Microsoft\VCExpress\8.0')
+    # Detect Expression edition
     try:
+        idk = SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE,
+            r'Software\Microsoft\VCExpress\8.0')
         id = SCons.Util.RegQueryValueEx(idk, 'InstallDir')
         suites.append('EXPRESS')
     except SCons.Util.RegError:
@@ -1315,10 +1334,12 @@ def get_msvs_install_dirs(version = None):
 
     version_num, suite = msvs_parse_version(version)
 
+    K = 'Software\\Microsoft\\VisualStudio\\' + str(version_num)
     if (version_num >= 8.0):
-        K = 'Software\\Microsoft\\VCExpress\\' + str(version_num)
-    else:
-        K = 'Software\\Microsoft\\VisualStudio\\' + str(version_num)
+        try:
+            SCons.Util.RegOpenKeyEx(SCons.Util.HKEY_LOCAL_MACHINE, K )
+        except SCons.Util.RegError:
+            K = 'Software\\Microsoft\\VCExpress\\' + str(version_num)
 
     # vc++ install dir
     rv = {}
index f0e3b3adb93a60dba20b270373251e0f5b6f9f6e..1344fb1785e86a81355969398c915f29c2f51edf 100644 (file)
@@ -25,6 +25,7 @@
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 import os
+import os.path
 import string
 import sys
 import TestSCons
@@ -146,8 +147,8 @@ os.system(string.join(sys.argv[1:], " "))
 
 test.write('SConstruct', """
 foo = Environment(tools = ['javac', 'jar'],
-                  JAVAC = '%(where_javac)s',
-                  JAR = '%(where_jar)s')
+                  JAVAC = r'%(where_javac)s',
+                  JAR = r'%(where_jar)s')
 jar = foo.Dictionary('JAR')
 bar = foo.Copy(JAR = r'%(python)s wrapper.py ' + jar)
 foo.Java(target = 'classes', source = 'com/sub/foo')
@@ -247,8 +248,10 @@ public class Example6
 
 test.run(arguments = '.')
 
+expected_wrapper_out = "wrapper.py %(where_jar)s cf bar.jar classes/com/sub/bar\n"
+expected_wrapper_out = string.replace(expected_wrapper_out, '/', os.sep)
 test.must_match('wrapper.out',
-                "wrapper.py %(where_jar)s cf bar.jar classes/com/sub/bar\n" % locals())
+                expected_wrapper_out % locals())
 
 test.must_exist('foo.jar')
 test.must_exist('bar.jar')
index dedcf4a80de3680872039e0f947433ade676eff3..3ee3deed06abd14c544f8dd3fe57dccb82905bc3 100644 (file)
@@ -43,10 +43,18 @@ else:
 if not where_javac:
     test.skip_test("Could not find Java javac, skipping test(s).\n")
 
+if test.detect_tool('jar', ENV=ENV):
+    where_jar = test.detect('JAR', 'jar', ENV=ENV)
+else:
+    where_jar = test.where_is('jar')
+if not where_jar:
+    test.skip_test("Could not find Java jar, skipping test(s).\n")
+
 test.write('SConstruct', """
 dir = 'dist'
 env = Environment(tools    = ['javac', 'jar'],
-                  JAVAC = '%(where_javac)s',
+                  JAVAC = r'%(where_javac)s',
+                  JAR = r'%(where_jar)s',
                   JARCHDIR = dir)
 bin = env.Java(dir, Dir('./'))
 jar = env.Jar(File('c.jar', dir), bin)
index 64eb1a43f5cc2f6bc80f31f3a30bdb7f2b5f8383..3939d98301147979521ec136a02499c368aa8a54 100644 (file)
@@ -24,7 +24,8 @@
 
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
-import os.path
+import os
+import string
 
 import TestSCons
 
@@ -44,14 +45,14 @@ if not where_javac:
 if test.detect_tool('jar', ENV=ENV):
     where_jar = test.detect('JAR', 'jar', ENV=ENV)
 else:
-    where_javac = test.where_is('jar')
+    where_jar = test.where_is('jar')
 if not where_jar:
     test.skip_test("Could not find Java jar, skipping test(s).\n")
 
 test.write('SConstruct', """
 env = Environment(tools = ['javac', 'jar'],
-                  JAVAC = '%(where_javac)s',
-                  JAR = '%(where_jar)s',
+                  JAVAC = r'%(where_javac)s',
+                  JAR = r'%(where_jar)s',
                   JARFLAGS = 'cvf')
 env['JARFLAGS'] = 'cvf'
 class_files = env.Java(target = 'classes', source = 'src')
@@ -72,14 +73,18 @@ public class Example1
 }
 """)
 
-test.run(arguments = '.',
-         match=TestSCons.match_re_dotall,
-         stdout = test.wrap_stdout("""\
+expect = test.wrap_stdout("""\
 %(where_javac)s -d classes -sourcepath src src/Example1\.java
 %(where_jar)s cvf test.jar classes/src/Example1\.class
 .*
 adding: classes/src/Example1\.class.*
-""" % locals()))
+""" % locals())
+
+expect = string.replace(expect, '/', os.sep)
+
+test.run(arguments = '.',
+         match=TestSCons.match_re_dotall,
+         stdout = expect)
 
 test.must_exist('test.jar')
 
index dd09e35be2e8faf8710bd859d046a99c5c3718f5..93f0e7ba2723edb30760c8cda1d8e6461d6a5ca9 100644 (file)
@@ -25,6 +25,7 @@
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
 import os
+import os.path
 import string
 import sys
 import TestSCons
@@ -113,7 +114,7 @@ os.system(string.join(sys.argv[1:], " "))
 
 test.write('SConstruct', """
 foo = Environment(tools = ['javac'],
-                  JAVAC = '%s')
+                  JAVAC = r'%s')
 javac = foo.Dictionary('JAVAC')
 bar = foo.Copy(JAVAC = r'%s wrapper.py ' + javac)
 foo.Java(target = 'class1', source = 'com/sub/foo')
@@ -285,7 +286,9 @@ class Private {
 
 test.run(arguments = '.')
 
-test.must_match('wrapper.out', "wrapper.py %s -d class2 -sourcepath com/sub/bar com/sub/bar/Example4.java com/sub/bar/Example5.java com/sub/bar/Example6.java\n" % where_javac)
+expected_wrapper_out = "wrapper.py %s -d class2 -sourcepath com/sub/bar com/sub/bar/Example4.java com/sub/bar/Example5.java com/sub/bar/Example6.java\n"
+expected_wrapper_out = string.replace(expected_wrapper_out, '/', os.sep)
+test.must_match('wrapper.out', expected_wrapper_out % where_javac)
 
 test.must_exist(test.workpath('class1', 'com', 'sub', 'foo', 'Example1.class'))
 test.must_exist(test.workpath('class1', 'com', 'other', 'Example2.class'))
index a237e91f80618c02ac6f69096a21a9217195dcd5..045fb7b36e84d45726591e4c34b06df64e04e86a 100644 (file)
@@ -24,7 +24,8 @@
 
 __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
 
-import os.path
+import os
+import string
 
 import TestSCons
 
@@ -43,7 +44,7 @@ test.subdir('src')
 
 test.write('SConstruct', """
 env = Environment(tools = ['javac'],
-                  JAVAC = '%(where_javac)s',
+                  JAVAC = r'%(where_javac)s',
                   JAVACFLAGS = '-O')
 env.Java(target = 'classes', source = 'src')
 """ % locals())
@@ -62,8 +63,10 @@ public class Example1
 }
 """)
 
+expected_wrapper_out = "%(where_javac)s -O -d classes -sourcepath src src/Example1.java\n"
+expected_wrapper_out = string.replace(expected_wrapper_out, '/', os.sep)
 test.run(arguments = '.',
-         stdout = test.wrap_stdout("%(where_javac)s -O -d classes -sourcepath src src/Example1.java\n" % locals()))
+         stdout = test.wrap_stdout(expected_wrapper_out % locals()))
 
 test.must_exist(['classes', 'src', 'Example1.class'])
 
index d125a0631a4c5646bd1b28a86baf758f63bd729e..eb70ac829f91a4774f9509671ab62ad5e19b6a7f 100644 (file)
@@ -123,8 +123,8 @@ os.system(string.join(sys.argv[1:], " "))
 
 test.write('SConstruct', """
 foo = Environment(tools = ['javac', 'javah'],
-                  JAVAC = '%(where_javac)s',
-                  JAVAH = '%(where_javah)s')
+                  JAVAC = r'%(where_javac)s',
+                  JAVAH = r'%(where_javah)s')
 javah = foo.Dictionary('JAVAH')
 bar = foo.Copy(JAVAH = r'%(python)s wrapper.py ' + javah)
 foo.Java(target = 'class1', source = 'com/sub/foo')
index 3ce3decce34bf92ac97867ccce1adac38b6f405b..7ef1359b72d704dd7dbcac449cbd4436c17964b6 100644 (file)
@@ -92,11 +92,21 @@ line 3
 
     test.fail_test(test.read(['outdir', 'test2.class']) != "test2.JAVA\nline 3\n")
 
-
-if not os.path.exists('/usr/local/j2sdk1.3.1/bin/rmic'):
-    test.skip_test("Could not find Java; skipping non-simulated test(s).\n")
-
-
+ENV = test.java_ENV()
+
+if test.detect_tool('javac', ENV=ENV):
+    where_javac = test.detect('JAVAC', 'javac', ENV=ENV)
+else:
+    where_javac = test.where_is('javac')
+if not where_javac:
+    test.skip_test("Could not find Java javac, skipping non-simulated test(s).\n")
+
+if test.detect_tool('rmic', ENV=ENV):
+    where_rmic = test.detect('JAVAC', 'rmic', ENV=ENV)
+else:
+    where_rmic = test.where_is('rmic')
+if not where_rmic:
+    test.skip_test("Could not find Java rmic, skipping non-simulated test(s).\n")
 
 test.write("wrapper.py", """\
 import os
@@ -109,8 +119,8 @@ os.system(string.join(sys.argv[1:], " "))
 test.write('SConstruct', """
 import string
 foo = Environment(tools = ['javac', 'rmic'],
-                  JAVAC = '/usr/local/j2sdk1.3.1/bin/javac',
-                  RMIC = '/usr/local/j2sdk1.3.1/bin/rmic')
+                  JAVAC = r'%(where_javac)s',
+                  RMIC = r'%(where_rmic)s')
 foo.Java(target = 'class1', source = 'com/sub/foo')
 foo.RMIC(target = 'outdir1',
           source = ['class1/com/sub/foo/Example1.class',
@@ -118,14 +128,14 @@ foo.RMIC(target = 'outdir1',
           JAVACLASSDIR = 'class1')
 
 rmic = foo.Dictionary('RMIC')
-bar = foo.Copy(RMIC = r'%s wrapper.py ' + rmic)
+bar = foo.Copy(RMIC = r'%(python)s wrapper.py ' + rmic)
 bar_classes = bar.Java(target = 'class2', source = 'com/sub/bar')
 # XXX This is kind of a Python brute-force way to do what Ant
 # does with its "excludes" attribute.  We should probably find
 # a similar friendlier way to do this.
 bar_classes = filter(lambda c: string.find(str(c), 'Hello') == -1, bar_classes)
 bar.RMIC(target = Dir('outdir2'), source = bar_classes)
-""" % python)
+""" % locals() )
 
 test.subdir('com',
             ['com', 'other'],
@@ -307,7 +317,7 @@ public class Example4 extends UnicastRemoteObject implements Hello {
 
 test.run(arguments = '.')
 
-test.fail_test(test.read('wrapper.out') != "wrapper.py /usr/local/j2sdk1.3.1/bin/rmic -d outdir2 -classpath class2 com.sub.bar.Example3 com.sub.bar.Example4\n")
+test.fail_test(test.read('wrapper.out') != "wrapper.py %s -d outdir2 -classpath class2 com.sub.bar.Example3 com.sub.bar.Example4\n" % where_rmic)
 
 test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Skel.class')))
 test.fail_test(not os.path.exists(test.workpath('outdir1', 'com', 'sub', 'foo', 'Example1_Stub.class')))
index a9637723afcde0cca0e0d9b31ad81e6681043dff..3fe3f1618884e007a31f94b04383190e23e5e6a7 100644 (file)
@@ -84,7 +84,7 @@ main(int argc, char *argv)
 test.run(chdir='sub dir', arguments='.')
 
 test.run(chdir='sub dir',
-         program=['msdev'],
+         program=[test.get_msvs_executable('6.0')],
          arguments=['Test.dsp', '/MAKE', 'foo - Win32 Release'])
 
 test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
index 8700d41659b6fed2529d6b810f282ad2e6b0885a..c4ef414d2f0de97201301bfd02df9b5c57cd0015 100644 (file)
@@ -86,7 +86,7 @@ test.run(chdir='sub dir', arguments='.')
 test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcproj'))
 
 test.run(chdir='sub dir',
-         program=['devenv'],
+         program=[test.get_msvs_executable('7.0')],
          arguments=['foo.sln', '/build', 'Release'])
 
 test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
index ea886b2bd69e2de86605fc8f04f88473be04536c..03fec8154fcb37f2a734a15e47c910f73fe68418 100644 (file)
@@ -86,7 +86,7 @@ test.run(chdir='sub dir', arguments='.')
 test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcproj'))
 
 test.run(chdir='sub dir',
-         program=['devenv'],
+         program=[test.get_msvs_executable('7.1')],
          arguments=['foo.sln', '/build', 'Release'])
 
 test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")
index 45549041ad007e365afa60fccadd4e2808f3188d..f41e2bebc0a35fc8b4418da6f7331dae1d40700b 100644 (file)
@@ -85,8 +85,12 @@ test.run(chdir='sub dir', arguments='.')
 
 test.vcproj_sys_path(test.workpath('sub dir', 'foo.vcproj'))
 
+import SCons.Platform.win32
+system_dll_path = os.path.join( SCons.Platform.win32.get_system_root(), 'System32' )
+os.environ['PATH'] = os.environ['PATH'] + os.pathsep + system_dll_path
+
 test.run(chdir='sub dir',
-         program=['devenv'],
+         program=[test.get_msvs_executable('8.0')],
          arguments=['foo.sln', '/build', 'Release'])
 
 test.run(program=test.workpath('sub dir', 'foo'), stdout="foo.c\n")