From 273a2f8afce108b25b1f03d28f41ed5a6423d3e0 Mon Sep 17 00:00:00 2001 From: "bradnelson@chromium.org" Date: Wed, 3 Dec 2008 20:45:47 +0000 Subject: [PATCH] Allows scons build to use local copy of platformsdk if one is not bundled side-by-side. Review URL: http://codereview.chromium.org/12915 git-svn-id: http://src.chromium.org/svn/trunk/src/build@6305 4ff67af0-8c30-449e-8e8b-ad334ec8d88c --- SConscript.main | 10 ++++++++-- internal/essential.scons | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/SConscript.main b/SConscript.main index 52ad42e23..58d3e2707 100644 --- a/SConscript.main +++ b/SConscript.main @@ -261,11 +261,17 @@ else: # as our source checkout. visual_studio_path = msvs_drive + ':/Program Files/Microsoft Visual Studio 8' +# If side-by-side platform sdk is not available try local copy. +platform_sdk_path = '$CHROME_SRC_DIR/third_party/platformsdk_vista_6_0/files' +if (root_env['PLATFORM'] in ['win32', 'cygwin'] and + not os.path.exists(windows_env.subst(platform_sdk_path))): + platform_sdk_path = ( + msvs_drive + ':\\Program Files\\Microsoft SDKs\\Windows\\v6.0') + windows_env.Replace( CSCRIPT = 'c:\\Windows\\System32\\cscript', - PLATFORMSDK_VISTA_REL = '../third_party/platformsdk_vista_6_0', - PLATFORMSDK_VISTA = '$CHROME_SRC_DIR/third_party/platformsdk_vista_6_0', + PLATFORMSDK_VISTA = platform_sdk_path, VISUAL_STUDIO = visual_studio_path, CYGWIN_DIR = windows_env.Dir('$CHROME_SRC_DIR/third_party/cygwin'), diff --git a/internal/essential.scons b/internal/essential.scons index 56770d9ae..bca07f25c 100644 --- a/internal/essential.scons +++ b/internal/essential.scons @@ -46,8 +46,8 @@ if env['PLATFORM'] == 'win32': ('_HAS_TR1', 0), ], CPPPATH = [ - '$PLATFORMSDK_VISTA/files/Include', - '$PLATFORMSDK_VISTA/files/VC/INCLUDE', + '$PLATFORMSDK_VISTA/Include', + '$PLATFORMSDK_VISTA/VC/INCLUDE', '$VISUAL_STUDIO/VC/atlmfc/include', ], CCFLAGS = [ @@ -76,8 +76,8 @@ if env['PLATFORM'] == 'win32': '/wd4819', ], LIBPATH = [ - '$PLATFORMSDK_VISTA/files/Lib', - '$PLATFORMSDK_VISTA/files/VC/LIB', + '$PLATFORMSDK_VISTA/Lib', + '$PLATFORMSDK_VISTA/VC/LIB', '$VISUAL_STUDIO/VC/atlmfc/lib', ], LIBS = [