Mainly patch from James Teh
authorbdbaddog <bdbaddog@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 10 Feb 2010 06:37:51 +0000 (06:37 +0000)
committerbdbaddog <bdbaddog@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 10 Feb 2010 06:37:51 +0000 (06:37 +0000)
+ lots of additional debug output

git-svn-id: http://scons.tigris.org/svn/scons/trunk@4669 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/MSCommon/sdk.py
src/engine/SCons/Tool/MSCommon/vc.py

index 030fc7462e5c5aff1aa2f46cb7cb365ceba450ca..f02a3191ea285d90096cd97e0fd2c27ef7d3c7d1 100644 (file)
@@ -149,11 +149,17 @@ preSDK61VCSetupScripts = { 'x86'      : r'bin\vcvars32.bat',
                            'x86_ia64' : r'bin\vcvarsx86_ia64.bat',
                            'ia64'     : r'bin\vcvarsia64.bat'}
 
-SDk61AndLaterVCSetupScripts = {'x86'      : r'bin\vcvars32.bat',
-                               'amd64'    : r'bin\amd64\vcvarsamd64.bat',
-                               'x86_amd64': r'bin\x86_amd64\vcvarsx86_amd64.bat',
-                               'x86_ia64' : r'bin\x86_ia64\vcvarsx86_ia64.bat',
-                               'ia64'     : r'bin\ia64\vcvarsia64.bat'}
+SDK61VCSetupScripts = {'x86'      : r'bin\vcvars32.bat',
+                       'amd64'    : r'bin\amd64\vcvarsamd64.bat',
+                       'x86_amd64': r'bin\x86_amd64\vcvarsx86_amd64.bat',
+                       'x86_ia64' : r'bin\x86_ia64\vcvarsx86_ia64.bat',
+                       'ia64'     : r'bin\ia64\vcvarsia64.bat'}
+
+SDK70VCSetupScripts =    { 'x86'      : r'bin\vcvars32.bat',
+                           'amd64'    : r'bin\vcvars64.bat',
+                           'x86_amd64': r'bin\vcvarsx86_amd64.bat',
+                           'x86_ia64' : r'bin\vcvarsx86_ia64.bat',
+                           'ia64'     : r'bin\vcvarsia64.bat'}
 
 # The list of support SDKs which we know how to detect.
 #
@@ -171,7 +177,7 @@ SupportedSDKList = [
                    'x86_64'    : [r'lib\x64'],
                    'ia64'      : [r'lib\ia64'],
                },
-               vc_setup_scripts = SDk61AndLaterVCSetupScripts,
+               vc_setup_scripts = SDK70VCSetupScripts,
               ),
     WindowsSDK('6.1',
                sanity_check_file=r'bin\SetEnv.Cmd',
@@ -181,7 +187,7 @@ SupportedSDKList = [
                    'x86_64'    : [r'lib\x64'],
                    'ia64'      : [r'lib\ia64'],
                },
-               vc_setup_scripts = SDk61AndLaterVCSetupScripts,
+               vc_setup_scripts = SDK61VCSetupScripts,
               ),
 
     WindowsSDK('6.0A',
index d13d59585b9c79dc66d3df87bc40923df5ad5eca..28e0d1e1dc8fbdeeb654a2881934379097a3fa44 100644 (file)
@@ -211,6 +211,8 @@ def find_batch_file(env,msvc_version):
     pdir = find_vc_pdir(msvc_version)
     if pdir is None:
         raise NoVersionFound("No version of Visual Studio found")
+        
+    debug('vc.py: find_batch_file() pdir:%s'%pdir)
 
     vernum = float(msvc_version)
     if 7 <= vernum < 8:
@@ -229,12 +231,13 @@ def find_batch_file(env,msvc_version):
     installed_sdks=get_installed_sdks()
     (host_arch,target_arch)=get_host_target(env)
     for _sdk in installed_sdks:
-        #print "Trying :%s"%_sdk.vc_setup_scripts
         sdk_bat_file=_sdk.get_sdk_vc_script(host_arch,target_arch)
         sdk_bat_file_path=os.path.join(pdir,sdk_bat_file)
-        #print "PATH: %s"%sdk_bat_file_path
+        debug('vc.py:find_batch_file() sdk_bat_file_path:%s'%sdk_bat_file_path)
         if os.path.exists(sdk_bat_file_path):
             return (batfilename,sdk_bat_file_path)
+        else:
+            debug("vc.py:find_batch_file() not found:%s"%sdk_bat_file_path)
     else:
         return (batfilename,None)
 
@@ -339,6 +342,7 @@ def msvc_setup_env(env):
 
     try:
         (vc_script,sdk_script) = find_batch_file(env,version)
+        debug('vc.py:msvc_setup_env() vc_script:%s sdk_script:%s'%(vc_script,sdk_script))
     except VisualCException, e:
         msg = str(e)
         debug('Caught exception while looking for batch file (%s)' % msg)
@@ -348,7 +352,8 @@ def msvc_setup_env(env):
         warn_msg = warn_msg % (version, cached_get_installed_vcs())
         SCons.Warnings.warn(SCons.Warnings.VisualCMissingWarning, warn_msg)
         return None
-
+    
+    debug('vc.py:msvc_setup_env() vc_script:%s sdk_script:%s'%(vc_script,sdk_script))
     use_script = env.get('MSVC_USE_SCRIPT', True)
     if SCons.Util.is_String(use_script):
         debug('use_script 1 %s\n' % repr(use_script))
@@ -369,7 +374,7 @@ def msvc_setup_env(env):
                 debug('use_script 3: failed running VC script %s: %s: Error:%s'%(repr(vc_script),arg,e))
                 vc_script=None
         if not vc_script and sdk_script:
-            debug('use_script 4: trying sdk script: %s %s'%(sdk_script,arg))
+            debug('use_script 4: trying sdk script: %s'%(sdk_script))
             try:
                 d = script_env(sdk_script,args=[])
             except BatchFileExecutionError,e:
@@ -387,6 +392,7 @@ def msvc_setup_env(env):
         return None
 
     for k, v in d.items():
+        debug('vc.py:msvc_setup_env() env:%s -> %s'%(k,v))
         env.PrependENVPath(k, v, delete_existing=True)
 
 def msvc_exists(version=None):