summaryrefslogtreecommitdiff
path: root/engine/SCons/Tool/MSCommon
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2010-03-25 20:26:34 +0100
committerLuca Falavigna <dktrkranz@debian.org>2010-03-25 20:26:34 +0100
commit738c66a8458f4ddd5c11871359938bc9d89e8d7a (patch)
tree5b57e837a551c1479efec2e2bfebf154c529bf68 /engine/SCons/Tool/MSCommon
parent8f9034d6737799e699f3d2c9c7de2c98682343bd (diff)
parent86baccee0a1dddf43f7eefe48e2d9e9037468b9c (diff)
Merge commit 'upstream/1.3.0'
Diffstat (limited to 'engine/SCons/Tool/MSCommon')
-rw-r--r--engine/SCons/Tool/MSCommon/__init__.py2
-rw-r--r--engine/SCons/Tool/MSCommon/arch.py2
-rw-r--r--engine/SCons/Tool/MSCommon/common.py2
-rw-r--r--engine/SCons/Tool/MSCommon/netframework.py2
-rw-r--r--engine/SCons/Tool/MSCommon/sdk.py26
-rw-r--r--engine/SCons/Tool/MSCommon/vc.py17
-rw-r--r--engine/SCons/Tool/MSCommon/vs.py6
7 files changed, 38 insertions, 19 deletions
diff --git a/engine/SCons/Tool/MSCommon/__init__.py b/engine/SCons/Tool/MSCommon/__init__.py
index b6cd6a0..a612d9b 100644
--- a/engine/SCons/Tool/MSCommon/__init__.py
+++ b/engine/SCons/Tool/MSCommon/__init__.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """
Common functions for Microsoft Visual Studio and Visual C/C++.
diff --git a/engine/SCons/Tool/MSCommon/arch.py b/engine/SCons/Tool/MSCommon/arch.py
index 3093455..34de46c 100644
--- a/engine/SCons/Tool/MSCommon/arch.py
+++ b/engine/SCons/Tool/MSCommon/arch.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """Module to define supported Windows chip architectures.
"""
diff --git a/engine/SCons/Tool/MSCommon/common.py b/engine/SCons/Tool/MSCommon/common.py
index aeea37b..2303d2b 100644
--- a/engine/SCons/Tool/MSCommon/common.py
+++ b/engine/SCons/Tool/MSCommon/common.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """
Common helper functions for working with the Microsoft tool chain.
diff --git a/engine/SCons/Tool/MSCommon/netframework.py b/engine/SCons/Tool/MSCommon/netframework.py
index 1185717..bd123dc 100644
--- a/engine/SCons/Tool/MSCommon/netframework.py
+++ b/engine/SCons/Tool/MSCommon/netframework.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """
"""
diff --git a/engine/SCons/Tool/MSCommon/sdk.py b/engine/SCons/Tool/MSCommon/sdk.py
index 24b85d6..54be8ca 100644
--- a/engine/SCons/Tool/MSCommon/sdk.py
+++ b/engine/SCons/Tool/MSCommon/sdk.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """Module to detect the Platform/Windows SDK
@@ -76,6 +76,7 @@ class SDKDefinition:
return None
hkey = self.HKEY_FMT % self.hkey_data
+ debug('find_sdk_dir(): checking registry:%s'%hkey)
try:
sdk_dir = common.read_reg(hkey)
@@ -83,6 +84,8 @@ class SDKDefinition:
debug('find_sdk_dir(): no SDK registry key %s' % repr(hkey))
return None
+ debug('find_sdk_dir(): Trying SDK Dir: %s'%sdk_dir)
+
if not os.path.exists(sdk_dir):
debug('find_sdk_dir(): %s not on file system' % sdk_dir)
return None
@@ -237,6 +240,7 @@ InstalledSDKMap = None
def get_installed_sdks():
global InstalledSDKList
global InstalledSDKMap
+ debug('sdk.py:get_installed_sdks()')
if InstalledSDKList is None:
InstalledSDKList = []
InstalledSDKMap = {}
@@ -319,14 +323,17 @@ def get_default_sdk():
return None
return InstalledSDKList[0]
+
+
+
def mssdk_setup_env(env):
- debug('mssdk_setup_env()')
+ debug('sdk.py:mssdk_setup_env()')
if env.has_key('MSSDK_DIR'):
sdk_dir = env['MSSDK_DIR']
if sdk_dir is None:
return
sdk_dir = env.subst(sdk_dir)
- debug('mssdk_setup_env: Using MSSDK_DIR:%s'%sdk_dir)
+ debug('sdk.py:mssdk_setup_env: Using MSSDK_DIR:%s'%sdk_dir)
elif env.has_key('MSSDK_VERSION'):
sdk_version = env['MSSDK_VERSION']
if sdk_version is None:
@@ -335,19 +342,22 @@ def mssdk_setup_env(env):
sdk_version = env.subst(sdk_version)
mssdk = get_sdk_by_version(sdk_version)
sdk_dir = mssdk.get_sdk_dir()
- debug('mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir)
+ debug('sdk.py:mssdk_setup_env: Using MSSDK_VERSION:%s'%sdk_dir)
elif env.has_key('MSVS_VERSION'):
msvs_version = env['MSVS_VERSION']
- debug('Getting MSVS_VERSION from env:%s'%msvs_version)
+ debug('sdk.py:mssdk_setup_env:Getting MSVS_VERSION from env:%s'%msvs_version)
if msvs_version is None:
+ debug('sdk.py:mssdk_setup_env thinks msvs_version is None')
return
msvs_version = env.subst(msvs_version)
import vs
msvs = vs.get_vs_by_version(msvs_version)
- debug('msvs is :%s'%msvs)
+ debug('sdk.py:mssdk_setup_env:msvs is :%s'%msvs)
if not msvs:
+ debug('sdk.py:mssdk_setup_env: no VS version detected, bailingout:%s'%msvs)
return
sdk_version = msvs.sdk_version
+ debug('sdk.py:msvs.sdk_version is %s'%sdk_version)
if not sdk_version:
return
mssdk = get_sdk_by_version(sdk_version)
@@ -356,13 +366,13 @@ def mssdk_setup_env(env):
if not mssdk:
return
sdk_dir = mssdk.get_sdk_dir()
- debug('mssdk_setup_env: Using MSVS_VERSION:%s'%sdk_dir)
+ debug('sdk.py:mssdk_setup_env: Using MSVS_VERSION:%s'%sdk_dir)
else:
mssdk = get_default_sdk()
if not mssdk:
return
sdk_dir = mssdk.get_sdk_dir()
- debug('mssdk_setup_env: not using any env values. sdk_dir:%s'%sdk_dir)
+ debug('sdk.py:mssdk_setup_env: not using any env values. sdk_dir:%s'%sdk_dir)
set_sdk_by_directory(env, sdk_dir)
diff --git a/engine/SCons/Tool/MSCommon/vc.py b/engine/SCons/Tool/MSCommon/vc.py
index f2f2a01..5ea5a53 100644
--- a/engine/SCons/Tool/MSCommon/vc.py
+++ b/engine/SCons/Tool/MSCommon/vc.py
@@ -30,12 +30,13 @@
# * test on 64 bits XP + VS 2005 (and VS 6 if possible)
# * SDK
# * Assembly
-__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """Module for Visual C/C++ detection and configuration.
"""
import SCons.compat
+import string
import os
import platform
@@ -115,16 +116,18 @@ def get_host_target(env):
return (host, target)
-_VCVER = ["10.0", "9.0", "8.0", "7.1", "7.0", "6.0"]
+_VCVER = ["10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"]
_VCVER_TO_PRODUCT_DIR = {
'10.0': [
r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'],
'9.0': [
- r'Microsoft\VisualStudio\9.0\Setup\VC\ProductDir',
+ r'Microsoft\VisualStudio\9.0\Setup\VC\ProductDir'],
+ '9.0Exp' : [
r'Microsoft\VCExpress\9.0\Setup\VC\ProductDir'],
'8.0': [
- r'Microsoft\VisualStudio\8.0\Setup\VC\ProductDir',
+ r'Microsoft\VisualStudio\8.0\Setup\VC\ProductDir'],
+ '8.0Exp': [
r'Microsoft\VCExpress\8.0\Setup\VC\ProductDir'],
'7.1': [
r'Microsoft\VisualStudio\7.1\Setup\VC\ProductDir'],
@@ -214,7 +217,9 @@ def find_batch_file(env,msvc_version):
debug('vc.py: find_batch_file() pdir:%s'%pdir)
- vernum = float(msvc_version)
+ # filter out e.g. "Exp" from the version name
+ msvc_ver_numeric = string.join(filter(lambda x: x in string.digits + ".", msvc_version), '')
+ vernum = float(msvc_ver_numeric)
if 7 <= vernum < 8:
pdir = os.path.join(pdir, os.pardir, "Common7", "Tools")
batfilename = os.path.join(pdir, "vsvars32.bat")
@@ -285,6 +290,8 @@ def get_default_version(env):
msvc_version = env.get('MSVC_VERSION')
msvs_version = env.get('MSVS_VERSION')
+
+ debug('get_default_version(): msvc_version:%s msvs_version:%s'%(msvc_version,msvs_version))
if msvs_version and not msvc_version:
SCons.Warnings.warn(
diff --git a/engine/SCons/Tool/MSCommon/vs.py b/engine/SCons/Tool/MSCommon/vs.py
index 204a32f..e634a18 100644
--- a/engine/SCons/Tool/MSCommon/vs.py
+++ b/engine/SCons/Tool/MSCommon/vs.py
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 4691 2010/03/06 16:22:36 bdbaddog"
+__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 4720 2010/03/24 03:14:11 jars"
__doc__ = """Module to detect Visual Studio and/or Visual C/C++
"""
@@ -255,7 +255,7 @@ SupportedVSList = [
# The batch file we look for is in the VC directory,
# so the VCExpress.exe executable is up in ..\..\Common7\IDE.
VisualStudio('8.0Exp',
- vc_version='8.0',
+ vc_version='8.0Exp',
sdk_version='6.0A',
hkeys=[r'Microsoft\VCExpress\8.0\Setup\VS\ProductDir'],
common_tools_var='VS80COMNTOOLS',
@@ -384,12 +384,14 @@ def get_vs_by_version(msvs):
global InstalledVSMap
global SupportedVSMap
+ debug('vs.py:get_vs_by_version()')
if not SupportedVSMap.has_key(msvs):
msg = "Visual Studio version %s is not supported" % repr(msvs)
raise SCons.Errors.UserError, msg
get_installed_visual_studios()
vs = InstalledVSMap.get(msvs)
debug('InstalledVSMap:%s'%InstalledVSMap)
+ debug('vs.py:get_vs_by_version: found vs:%s'%vs)
# Some check like this would let us provide a useful error message
# if they try to set a Visual Studio version that's not installed.
# However, we also want to be able to run tests (like the unit