summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2006-02-12 19:56:03 (GMT)
committerSteven Knight <knight@baldmt.com>2006-02-12 19:56:03 (GMT)
commitcb3d0d67affebe678a5ea2b15500d54b0eba25a3 (patch)
tree56208f374c81c91b572cd0fc3cf28223ef80a732
parente12ccf2b9d0e046ff6c4d433d1d093e945e71d33 (diff)
downloadSCons-cb3d0d67affebe678a5ea2b15500d54b0eba25a3.zip
SCons-cb3d0d67affebe678a5ea2b15500d54b0eba25a3.tar.gz
SCons-cb3d0d67affebe678a5ea2b15500d54b0eba25a3.tar.bz2
Add support for Visual Studio 2005 Professional. Windows portability fixes for various tests. (Baptiste Lepilleur)
-rw-r--r--etc/TestSCons.py14
-rw-r--r--src/CHANGES.txt5
-rw-r--r--src/engine/SCons/Tool/linkloc.py2
-rw-r--r--src/engine/SCons/Tool/msvc.py65
-rw-r--r--src/engine/SCons/Tool/msvs.py35
-rw-r--r--test/Java/JAR.py9
-rw-r--r--test/Java/JARCHDIR.py10
-rw-r--r--test/Java/JARFLAGS.py21
-rw-r--r--test/Java/JAVAC.py7
-rw-r--r--test/Java/JAVACFLAGS.py9
-rw-r--r--test/Java/JAVAH.py4
-rw-r--r--test/Java/RMIC.py30
-rw-r--r--test/MSVS/vs-6.0-exec.py2
-rw-r--r--test/MSVS/vs-7.0-exec.py2
-rw-r--r--test/MSVS/vs-7.1-exec.py2
-rw-r--r--test/MSVS/vs-8.0-exec.py6
16 files changed, 159 insertions, 64 deletions
diff --git a/etc/TestSCons.py b/etc/TestSCons.py
index 87eadfb..49e8da6 100644
--- a/etc/TestSCons.py
+++ b/etc/TestSCons.py
@@ -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),
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 5a6935e..e2d5d7c 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -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.
diff --git a/src/engine/SCons/Tool/linkloc.py b/src/engine/SCons/Tool/linkloc.py
index 3853855..f7c2c5a 100644
--- a/src/engine/SCons/Tool/linkloc.py
+++ b/src/engine/SCons/Tool/linkloc.py
@@ -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
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index bc50eaa..8ea4b39 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/engine/SCons/Tool/msvc.py
@@ -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.
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 074733a..f00aca9 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -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 = {}
diff --git a/test/Java/JAR.py b/test/Java/JAR.py
index f0e3b3a..1344fb1 100644
--- a/test/Java/JAR.py
+++ b/test/Java/JAR.py
@@ -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')
diff --git a/test/Java/JARCHDIR.py b/test/Java/JARCHDIR.py
index dedcf4a..3ee3dee 100644
--- a/test/Java/JARCHDIR.py
+++ b/test/Java/JARCHDIR.py
@@ -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)
diff --git a/test/Java/JARFLAGS.py b/test/Java/JARFLAGS.py
index 64eb1a4..3939d98 100644
--- a/test/Java/JARFLAGS.py
+++ b/test/Java/JARFLAGS.py
@@ -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')
diff --git a/test/Java/JAVAC.py b/test/Java/JAVAC.py
index dd09e35..93f0e7b 100644
--- a/test/Java/JAVAC.py
+++ b/test/Java/JAVAC.py
@@ -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'))
diff --git a/test/Java/JAVACFLAGS.py b/test/Java/JAVACFLAGS.py
index a237e91..045fb7b 100644
--- a/test/Java/JAVACFLAGS.py
+++ b/test/Java/JAVACFLAGS.py
@@ -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'])
diff --git a/test/Java/JAVAH.py b/test/Java/JAVAH.py
index d125a06..eb70ac8 100644
--- a/test/Java/JAVAH.py
+++ b/test/Java/JAVAH.py
@@ -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')
diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py
index 3ce3dec..7ef1359 100644
--- a/test/Java/RMIC.py
+++ b/test/Java/RMIC.py
@@ -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')))
diff --git a/test/MSVS/vs-6.0-exec.py b/test/MSVS/vs-6.0-exec.py
index a963772..3fe3f16 100644
--- a/test/MSVS/vs-6.0-exec.py
+++ b/test/MSVS/vs-6.0-exec.py
@@ -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")
diff --git a/test/MSVS/vs-7.0-exec.py b/test/MSVS/vs-7.0-exec.py
index 8700d41..c4ef414 100644
--- a/test/MSVS/vs-7.0-exec.py
+++ b/test/MSVS/vs-7.0-exec.py
@@ -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")
diff --git a/test/MSVS/vs-7.1-exec.py b/test/MSVS/vs-7.1-exec.py
index ea886b2..03fec81 100644
--- a/test/MSVS/vs-7.1-exec.py
+++ b/test/MSVS/vs-7.1-exec.py
@@ -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")
diff --git a/test/MSVS/vs-8.0-exec.py b/test/MSVS/vs-8.0-exec.py
index 4554904..f41e2be 100644
--- a/test/MSVS/vs-8.0-exec.py
+++ b/test/MSVS/vs-8.0-exec.py
@@ -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")