From e3a167fd613ff28fbd26c1dbbd8c47ad3a0acc2c Mon Sep 17 00:00:00 2001 From: bdbaddog Date: Fri, 19 Mar 2010 06:48:38 +0000 Subject: [PATCH] Fix for MSSDK initialiation For the user in question who had VS 8.0 express installed, the vc version was being set to 8.0, and the the vs version was being set to the same, which was then being used to detect the vs version by an expected binary. Since it though it had VS 8.0, the binary was the not there for VS8.0 Express, so it was bailing out on the initialization. The fix is to have a VC8.0Exp as well as VC8.0 (also for VS9.0Exp). git-svn-id: http://scons.tigris.org/svn/scons/trunk@4709 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- src/engine/SCons/Tool/MSCommon/sdk.py | 5 +++-- src/engine/SCons/Tool/MSCommon/vc.py | 8 +++++--- src/engine/SCons/Tool/MSCommon/vs.py | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/engine/SCons/Tool/MSCommon/sdk.py b/src/engine/SCons/Tool/MSCommon/sdk.py index 74dc43cd..fcf07a0e 100644 --- a/src/engine/SCons/Tool/MSCommon/sdk.py +++ b/src/engine/SCons/Tool/MSCommon/sdk.py @@ -333,7 +333,7 @@ def mssdk_setup_env(env): 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: @@ -342,7 +342,7 @@ 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('sdk.py:mssdk_setup_env:Getting MSVS_VERSION from env:%s'%msvs_version) @@ -354,6 +354,7 @@ def mssdk_setup_env(env): msvs = vs.get_vs_by_version(msvs_version) 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) diff --git a/src/engine/SCons/Tool/MSCommon/vc.py b/src/engine/SCons/Tool/MSCommon/vc.py index 892bb805..02f817c5 100644 --- a/src/engine/SCons/Tool/MSCommon/vc.py +++ b/src/engine/SCons/Tool/MSCommon/vc.py @@ -115,16 +115,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'], diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py index 15876f9e..b1133408 100644 --- a/src/engine/SCons/Tool/MSCommon/vs.py +++ b/src/engine/SCons/Tool/MSCommon/vs.py @@ -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', @@ -391,6 +391,7 @@ def get_vs_by_version(msvs): 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 -- 2.26.2