summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-19 08:10:30 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-19 08:10:30 +0000
commit9e483ab325445c4070e2ea86e1b57beb652c2590 (patch)
tree0a1bd25386b08e314cd398091cff336f9a6bf7d6
parentad04a7013db13a4402160e8596ab2f7e4f19fb0d (diff)
downloadchromium_src-9e483ab325445c4070e2ea86e1b57beb652c2590.zip
chromium_src-9e483ab325445c4070e2ea86e1b57beb652c2590.tar.gz
chromium_src-9e483ab325445c4070e2ea86e1b57beb652c2590.tar.bz2
Initial generation of native Visual Studio solution files
(project files still to come). To wit: * Solution file configuration is in *_sln.scons files (base\base_sln.scons, chrome\chrome_sln.scons). * Individual Project file configuration is in the the .scons file for the relevant target (base\base_unittests.scons, third_party\libxml\libxml.scons, etc.)--that is, where their file lists will live. * MSVSProject() calls are currently placeholders that establish the existence of Project Nodes (and Project dependencies) but don't yet have actual Project configuration information (file lists, .vsprops, etc.). * Configuraiton is very manual. In particular, the entries in the .sln file will be written out in exactly the order specified in the configuration(s). The current ordering is taken from our existing .sln files, so we can generate virtually the same configurations on output. * Generated solution files are nearly byte-for-byte identical with our existing .sln files, modulo: * net\dump_cache has a WebsiteProperties sections (making that configurable per project isn't important right now); * sandbox\sandbox.sln was missing a dependency of base.vcproj on on debug_message.vcproj (present in other .sln files) * webkit\webkit.sln was missing dependencies of WebCore.vcproj on libxml_config.vcproj and libxslt_config.vcproj (present in chrome.sln); * add a handful of other miscellaneous missing dependencies on various .vcproj definitions in chrome.sln (present in other .sln files). * remove stats_viewer.csproj from chrome.sln (sorry, mbelshe), which was complicating the solution configuration with unnecessary (for us) "Mixed Platform" types; * All MSVSFolder(), MSVSProject() and MSVSSolution() calls have hard-wired guid= values taken from our existing configuration, so we can: 1) verify generation of working configs; 2) minimize diffs when checking in generated .sln files. We can remove these in the future in favor of extracting them from existing .sln files if we wish. * Add ChromeMSVSFolder(), ChromeMSVSProject() and ChromeMSVSSolution() wrappers to chromium_builders.py, that gate the underlying call to the env.MSVS*() builders based on whether env.Bit('msvs') is set (i.e., we're in --mode=msvs). * Remove platform-specific gating of to-be-ported .scons files that we now need to load on any platform to generate coheren MSVS files. Move the env.Bit('windows') tests for actually building their executables into the individual .scons files. Review URL: http://codereview.chromium.org/14472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7297 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--base/base.scons9
-rw-r--r--base/base_lib.scons6
-rw-r--r--base/base_sln.scons51
-rw-r--r--base/base_unittests.scons12
-rw-r--r--base/debug_message.scons9
-rw-r--r--base/gfx/base_gfx.scons3
-rw-r--r--breakpad/SConscript5
-rw-r--r--build/SConscript.main76
-rw-r--r--build/SConscript.v828
-rw-r--r--build/googleurl_lib.scons3
-rw-r--r--chrome/SConscript57
-rw-r--r--chrome/app/locales/locales.scons118
-rw-r--r--chrome/browser/browser.scons8
-rw-r--r--chrome/browser/debugger/debugger.scons5
-rw-r--r--chrome/browser/views/SConscript8
-rw-r--r--chrome/chrome.scons29
-rw-r--r--chrome/chrome_sln.scons544
-rw-r--r--chrome/common/common.scons7
-rw-r--r--chrome/common/ipc_tests.scons9
-rw-r--r--chrome/installer/mini_installer/installer_unittests.scons4
-rw-r--r--chrome/installer/mini_installer/mini_installer.scons101
-rw-r--r--chrome/installer/setup/setup.scons22
-rw-r--r--chrome/installer/util/util.scons35
-rw-r--r--chrome/plugin/plugin.scons2
-rw-r--r--chrome/renderer/renderer.scons6
-rw-r--r--chrome/test/activex_test_control/activex_test_control.scons12
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.scons26
-rw-r--r--chrome/test/automation/automation.scons7
-rw-r--r--chrome/test/chrome_plugin/test_chrome_plugin.scons9
-rw-r--r--chrome/test/interactive_ui/interactive_ui_tests.scons53
-rw-r--r--chrome/test/memory_test/memory_test.scons22
-rw-r--r--chrome/test/mini_installer_test/mini_installer_test.scons13
-rw-r--r--chrome/test/page_cycler/page_cycler_tests.scons24
-rw-r--r--chrome/test/perf/perftests.scons39
-rw-r--r--chrome/test/plugin/plugin_tests.scons28
-rw-r--r--chrome/test/reliability/reliability_tests.scons24
-rw-r--r--chrome/test/security_tests/security_tests.scons7
-rw-r--r--chrome/test/selenium/selenium_tests.scons24
-rw-r--r--chrome/test/startup/startup_tests.scons24
-rw-r--r--chrome/test/tab_switching/tab_switching_test.scons25
-rw-r--r--chrome/test/ui/ui_tests.scons35
-rw-r--r--chrome/test/unit/unit_tests.scons46
-rw-r--r--chrome/third_party/hunspell/SConscript4
-rw-r--r--chrome/tools/convert_dict/convert_dict.scons11
-rw-r--r--chrome/tools/crash_service/crash_service.scons16
-rw-r--r--chrome/tools/perf/flush_cache/flush_cache.scons7
-rw-r--r--chrome/tools/profiles/generate_profile.scons43
-rw-r--r--chrome/tools/test/image_diff/image_diff.scons11
-rw-r--r--chrome/views/SConscript6
-rw-r--r--google_update/SConscript6
-rw-r--r--media/media_lib.scons3
-rw-r--r--media/media_unittests.scons8
-rw-r--r--net/crash_cache.scons11
-rw-r--r--net/dump_cache.scons78
-rw-r--r--net/net.scons20
-rw-r--r--net/net_lib.scons6
-rw-r--r--net/net_perftests.scons12
-rw-r--r--net/net_resources.scons18
-rw-r--r--net/net_sln.scons74
-rw-r--r--net/net_unittests.scons14
-rw-r--r--net/stress_cache.scons9
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.scons13
-rw-r--r--rlz/SConscript2
-rw-r--r--sandbox/sandbox.scons1
-rw-r--r--sandbox/sandbox_sln.scons142
-rw-r--r--sdch/SConscript247
-rw-r--r--site_scons/site_tools/chromium_builders.py18
-rw-r--r--skia/SConscript2
-rw-r--r--testing/SConscript.gtest72
-rw-r--r--third_party/bsdiff/bsdiff.scons7
-rw-r--r--third_party/bspatch/bspatch.scons3
-rw-r--r--third_party/bzip2/bzip2.scons3
-rw-r--r--third_party/libjpeg/libjpeg.scons3
-rw-r--r--third_party/libpng/libpng.scons3
-rw-r--r--third_party/libxml/libxml.scons9
-rw-r--r--third_party/libxslt/libxslt.scons10
-rw-r--r--third_party/lzma_sdk/lzma_sdk.scons4
-rw-r--r--third_party/modp_b64/modp_b64.scons3
-rw-r--r--third_party/scons/scons-local/SCons/Environment.py4505
-rw-r--r--third_party/sqlite/SConscript3
-rw-r--r--third_party/zlib/zlib.scons3
-rw-r--r--webkit/SConscript.javascriptcore_pcre108
-rw-r--r--webkit/SConscript.port402
-rw-r--r--webkit/activex_shim/SConscript8
-rw-r--r--webkit/activex_shim_dll/SConscript7
-rw-r--r--webkit/build/JSConfig/SConscript3
-rw-r--r--webkit/build/JavaScriptCore/SConscript3
-rw-r--r--webkit/build/V8Bindings/SConscript10
-rw-r--r--webkit/build/WebCore/SConscript9
-rw-r--r--webkit/build/localized_strings/SConscript3
-rw-r--r--webkit/default_plugin/SConscript7
-rw-r--r--webkit/glue/SConscript11
-rw-r--r--webkit/glue/plugins/test/SConscript6
-rw-r--r--webkit/tools/npapi_layout_test_plugin/SConscript4
-rw-r--r--webkit/tools/test_shell/SConscript64
-rw-r--r--webkit/webkit.scons1
-rw-r--r--webkit/webkit_sln.scons168
98 files changed, 4984 insertions, 2817 deletions
diff --git a/DEPS b/DEPS
index c49c555..c1d2c7d 100644
--- a/DEPS
+++ b/DEPS
@@ -15,7 +15,7 @@ deps = {
"/trunk/deps/third_party/WebKit@7278",
"src/third_party/icu38":
- "/trunk/deps/third_party/icu38@6780",
+ "/trunk/deps/third_party/icu38@7121",
"src/v8":
"http://v8.googlecode.com/svn/trunk@968",
diff --git a/base/base.scons b/base/base.scons
index 2167d25..e817f8c 100644
--- a/base/base.scons
+++ b/base/base.scons
@@ -16,15 +16,10 @@ env.Append(
sconscript_files = [
'base_lib.scons',
+ 'base_sln.scons',
'base_unittests.scons',
'gfx/base_gfx.scons',
+ 'debug_message.scons',
]
-if env.Bit('windows'):
- # TODO(port): port this if it's needed on non-Windows systems,
- # or remove this comment if it's really Windows-specific.
- sconscript_files.extend([
- 'debug_message.scons',
- ])
-
SConscript(sconscript_files, exports=['env'])
diff --git a/base/base_lib.scons b/base/base_lib.scons
index 16da434..197832e 100644
--- a/base/base_lib.scons
+++ b/base/base_lib.scons
@@ -216,3 +216,9 @@ if env.Bit('linux'):
])
env.ChromeStaticLibrary('base', input_files)
+
+env.ChromeMSVSProject('$BASE_DIR/build/base.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ ],
+ guid='{1832A374-8A74-4F9E-B536-69A699B3E165}')
diff --git a/base/base_sln.scons b/base/base_sln.scons
new file mode 100644
index 0000000..c81f7e3
--- /dev/null
+++ b/base/base_sln.scons
@@ -0,0 +1,51 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.sln.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Tool('MSVSNew')
+
+env.ChromeMSVSFolder('base dependencies',
+ name='dependencies',
+ entries = [
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ],
+ guid='{F216062D-F9C4-4883-A52C-2BE9ECADEEA0}')
+
+
+solution = env.ChromeMSVSSolution('base.sln',
+ entries = [
+ '$BASE_DIR/build/base.vcproj',
+ '$BASE_DIR/build/base_unittests.vcproj',
+ '$BASE_DIR/build/debug_message.vcproj',
+ 'base dependencies',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ variants = [
+ 'Debug|Win32',
+ 'Release|Win32',
+ ])
+
+env.AlwaysBuild(solution)
+
+i = env.Command('$CHROME_SRC_DIR/base/base.sln', solution,
+ Copy('$TARGET', '$SOURCE'))
+Alias('solutions', i)
diff --git a/base/base_unittests.scons b/base/base_unittests.scons
index a606ebb..b14291c 100644
--- a/base/base_unittests.scons
+++ b/base/base_unittests.scons
@@ -144,6 +144,18 @@ if env.Bit('mac'):
env.ChromeTestProgram('base_unittests', input_files)
+env.ChromeMSVSProject('$BASE_DIR/build/base_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ],
+ guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}')
+
# TODO(sgk) should this be moved into base.lib like everything else? This will
# require updating a bunch of other SConscripts which link directly against
# this generated object file.
diff --git a/base/debug_message.scons b/base/debug_message.scons
index 01dd779..e21aaf2 100644
--- a/base/debug_message.scons
+++ b/base/debug_message.scons
@@ -18,4 +18,11 @@ if env.Bit('windows'):
],
)
-env.ChromeProgram('debug_message', ['debug_message.cc'])
+if env.Bit('windows'):
+ # TODO(port): port this if it's needed on non-Windows systems,
+ # or remove this comment (and merge with the above block?)
+ # if it's really Windows-specific.
+ env.ChromeProgram('debug_message', ['debug_message.cc'])
+
+env.ChromeMSVSProject('$BASE_DIR/build/debug_message.vcproj',
+ guid='{0E5474AC-5996-4B13-87C0-4AE931EE0815}')
diff --git a/base/gfx/base_gfx.scons b/base/gfx/base_gfx.scons
index 2dc9dc9..b9c2e2d 100644
--- a/base/gfx/base_gfx.scons
+++ b/base/gfx/base_gfx.scons
@@ -52,3 +52,6 @@ elif env.Bit('linux'):
])
env.ChromeStaticLibrary('base_gfx', input_files)
+
+env.ChromeMSVSProject('$BASE_DIR/build/base_gfx.vcproj',
+ guid='{A508ADD3-CECE-4E0F-8448-2F5E454DF551}')
diff --git a/breakpad/SConscript b/breakpad/SConscript
index 6fc4849..c80614b 100644
--- a/breakpad/SConscript
+++ b/breakpad/SConscript
@@ -28,6 +28,8 @@ if env.Bit('windows'):
env.ChromeStaticLibrary('breakpad_sender', sender_input_files)
+env.ChromeMSVSProject('$BREAKPAD_DIR/breakpad_sender.vcproj',
+ guid='{9946A048-043B-4F8F-9E07-9297B204714C}')
if env.Bit('windows'):
handler_input_files = [
@@ -48,3 +50,6 @@ elif env.Bit('linux'):
env.ChromeStaticLibrary('breakpad_handler', handler_input_files)
+env.ChromeMSVSProject('$BREAKPAD_DIR/breakpad_handler.vcproj',
+ guid='{B55CA863-B374-4BAF-95AC-539E4FA4C90C}')
+
diff --git a/build/SConscript.main b/build/SConscript.main
index fff2233..07d01ad3 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -379,6 +379,35 @@ windows_opt.Tool('target_optimized')
windows_opt.ApplySConscript(['$CHROME_SRC_DIR/build/release.scons'])
# --------------------------------------------------------------------------
+# Platform-independent "msvs" mode for generating Visual Studio
+# project and solution files from any platform.
+
+DeclareBit('msvs', 'Generate Visual Studio files')
+
+msvs_env = windows_env.Clone()
+
+msvs_env.Tool('target_platform_windows')
+msvs_env.Tool('component_targets_msvs') # Per target project support.
+
+del msvs_env['BUILDERS']['MSVSProject']
+del msvs_env['BUILDERS']['MSVSSolution']
+msvs_env.Tool('MSVSNew')
+
+msvs_env.Tool('midl')
+
+environment_list.append(msvs_env)
+msvs_env.Replace(
+ BUILD_TYPE = 'msvs',
+ BUILD_TYPE_DESCRIPTION = 'Generate Visual Studio files',
+ HOST_PLATFORMS = ['*'],
+ ICU_LIBS = [],
+)
+msvs_env.SetBits('windows', 'msvs')
+# TODO(sgk): turn into separate debug + release env adding
+# to a common .sln file
+msvs_env.Tool('target_debug')
+
+# --------------------------------------------------------------------------
# Linux specific
linux_env = root_env.Clone()
@@ -624,6 +653,30 @@ mac_env.Append(
)
+# --------------------------------------------------------------------------
+# Platform-independent "xcode" mode for generating XCode files
+# from any platform.
+
+DeclareBit('xcode', 'Generate XCode files')
+
+# TODO(sgk): remove this after we update Hammer modules.
+DeclareBit('mac', 'Target platform is mac.')
+
+xcode_env = mac_env.Clone()
+# TODO(sgk): uncomment when xcode generation becomes real.
+#environment_list.append(xcode_env)
+xcode_env.Replace(
+ BUILD_TYPE = 'xcode',
+ BUILD_TYPE_DESCRIPTION = 'Generate XCode files',
+ HOST_PLATFORMS = ['*'],
+ ICU_LIBS = [],
+)
+xcode_env.SetBits('mac', 'xcode')
+# TODO(sgk): turn into separate debug + release env adding
+# to a common .sln file
+xcode_env.Tool('target_debug')
+
+
# -------------------------------------------------------------------------
@@ -671,11 +724,6 @@ if GetOption('help'):
Help(help_fmt % (components, all_system_libs))
-
-Import('build_component')
-Default(None) # Reset default target to empty.
-Default(Alias(build_component)) # Set default target based on where built.
-
# -------------------------------------------------------------------------
# Invoke all the SConscripts in each of the environments that make sense on
@@ -684,6 +732,24 @@ BuildComponents(environment_list)
# -------------------------------------------------------------------------
+Default(None) # Reset default target to empty.
+
+modes = GetTargetModes().keys()
+
+if set(modes) - set(['msvs', 'xcode']):
+ # There's at least one mode being built besides the platform-
+ # independent 'msvs' or 'xcode' modes. Build the current
+ # build_component's Alias as default--that is, "base" when we're
+ # in the base/ subdirectory, "chrome" under chrome/, etc.
+ Import('build_component')
+ Default(Alias(build_component)) # Set default target based on where built.
+
+if 'msvs' in modes:
+ # We're in --mode=msvs, so add its Alias(es) to the default targets.
+ Default(Alias('solutions'))
+
+# -------------------------------------------------------------------------
+
# This must occur after BuildComponents so that the dependency graph
# will be populated.
vs_env = windows_env.Clone()
diff --git a/build/SConscript.v8 b/build/SConscript.v8
index 49c2085..c41c38d 100644
--- a/build/SConscript.v8
+++ b/build/SConscript.v8
@@ -86,3 +86,31 @@ if env.Bit('windows'):
env.ChromeStaticLibrary('v8_snapshot',
['$V8_MODE_DIR/libraries-empty${OBJSUFFIX}',
'$V8_MODE_DIR/snapshot${OBJSUFFIX}'])
+
+env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8.vcproj',
+ dependencies = [
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ ],
+ guid='{21E22961-22BF-4493-BD3A-868F93DA5179}')
+
+env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ guid='{EC8B7909-62AF-470D-A75D-E1D89C837142}')
+
+env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8_mksnapshot.vcproj',
+ dependencies = [
+ '$V8_DIR/tools/visual_studio/v8.vcproj',
+ ],
+ guid='{865575D0-37E2-405E-8CBA-5F6C485B5A26}')
+
+env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8_shell_sample.vcproj',
+ dependencies = [
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ ],
+ guid='{2DE20FFA-6F5E-48D9-84D8-09B044A5B119}')
+
+env.ChromeMSVSProject('$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ dependencies = [
+ '$V8_DIR/tools/visual_studio/v8_mksnapshot.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ ],
+ guid='{C0334F9A-1168-4101-9DD8-C30FB252D435}')
diff --git a/build/googleurl_lib.scons b/build/googleurl_lib.scons
index 4d8b6d3..22e0f53 100644
--- a/build/googleurl_lib.scons
+++ b/build/googleurl_lib.scons
@@ -47,3 +47,6 @@ input_files = [
]
env.ChromeStaticLibrary('googleurl', input_files)
+
+env.ChromeMSVSProject('$GOOGLEURL_DIR/build/googleurl.vcproj',
+ guid='{EF5E94AB-B646-4E5B-A058-52EF07B8351C}')
diff --git a/chrome/SConscript b/chrome/SConscript
index b9bbb33..944e1fd 100644
--- a/chrome/SConscript
+++ b/chrome/SConscript
@@ -258,6 +258,46 @@ if env_dll.Bit('windows'):
install_targets.extend(chrome_dll_version_rc)
install_targets.extend(chrome_dll_version_res)
+env.ChromeMSVSProject('$CHROME_DIR/app/chrome_dll.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$CHROME_DIR/browser/resources/browser_resources.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$GEARS_DIR/gears.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9}')
+
env_exe = env.Clone()
@@ -328,8 +368,21 @@ if env.Bit('windows'):
# For release we want to run dependencies.py, may look something like:
#env.AddPostAction('$TARGET_ROOT/chrome.exe',
- # '$PYTHON tools/build/win/dependencies.py $(TargetPath) chrome.exe.deps')
-
+ # ('$PYTHON tools/build/win/dependencies.py ' +
+ # '$(TargetPath) chrome.exe.deps'))
+
+env.ChromeMSVSProject('$CHROME_DIR/app/chrome_exe.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$CHROME_DIR/tools/crash_service/crash_service.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$CHROME_DIR/app/chrome_dll.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ ],
+ guid='{7B219FAA-E360-43C8-B341-804A94EEFFAC}')
env_flat = env.Clone(
diff --git a/chrome/app/locales/locales.scons b/chrome/app/locales/locales.scons
new file mode 100644
index 0000000..d36d05c
--- /dev/null
+++ b/chrome/app/locales/locales.scons
@@ -0,0 +1,118 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+locale resource configuration.
+"""
+
+Import('env')
+
+def ChromiumLocaleProject(name, guid):
+ return env.ChromeMSVSProject(name,
+ dependencies = [
+ '$WEBKIT_DIR/build/localized_strings/localized_strings.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid=guid)
+
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ar.vcproj',
+ guid='{3AB90E6A-56FF-4C9D-B918-AB76DDBF8BE8}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/bg.vcproj',
+ guid='{5BDB7EE1-A1FD-410C-9598-21519A1B7952}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/bn.vcproj',
+ guid='{4B60E8B8-416F-40B2-8A54-F75970A21992}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ca.vcproj',
+ guid='{F7790A54-4078-4E4A-8231-818BE9FB1F94}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/cs.vcproj',
+ guid='{7EA8C4AB-F9C6-4FA1-8B0A-74F5650430B2}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/da.vcproj',
+ guid='{A493331B-3180-49FE-8D0E-D121645E63AD}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/de.vcproj',
+ guid='{BA62FF5E-08A6-4102-9675-C12E8C9D4CC0}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/el.vcproj',
+ guid='{D314F1B3-9299-4866-8362-08BF811B0FA3}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/en-GB.vcproj',
+ guid='{34231B28-C51C-4C1C-AF07-C763668B1404}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/en-US.vcproj',
+ guid='{CAE2D1E6-3F19-492F-A35C-68AA7ACAD6D3}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/es.vcproj',
+ guid='{5AEA4BF6-27CD-47FC-9370-D87771CFA196}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/es-419.vcproj',
+ guid='{FA660037-EB40-4A43-AA9D-9653C57F2789}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/et.vcproj',
+ guid='{0557BC3C-DE87-4127-BDAA-9BD9BDB13FB4}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/fi.vcproj',
+ guid='{64D81334-DE73-457D-8FC1-9492508A2663}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/fil.vcproj',
+ guid='{3A932C39-AFA9-4BDC-B775-F71A426D04BF}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/fr.vcproj',
+ guid='{0D54A5C4-B78B-41A2-BF8A-5DA48AC90495}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/gu.vcproj',
+ guid='{256DECCE-9886-4C21-96A5-EE47DF5E07E9}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/he.vcproj',
+ guid='{A28310B8-7BD0-4CDF-A7D8-59CAB42AA1C4}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/hi.vcproj',
+ guid='{228DD844-9926-420E-B193-6973BF2A4D0B}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/hr.vcproj',
+ guid='{CE1426F6-7D2B-4574-9929-58387BF7B05F}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/hu.vcproj',
+ guid='{AFF332BF-AF3D-4D35-86FC-42A727F01D36}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/id.vcproj',
+ guid='{E3DF045F-2174-4685-9CF7-0630A79F324B}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/it.vcproj',
+ guid='{275F2993-EE9B-4E00-9C85-10A182FD423A}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ja.vcproj',
+ guid='{B2D715CE-4CBB-415A-A032-E700C90ADF91}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/kn.vcproj',
+ guid='{3E6B24F6-9FA9-4066-859E-BF747FA3080A}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ko.vcproj',
+ guid='{32167995-4014-4E4C-983B-F7E17C24EB25}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/lt.vcproj',
+ guid='{80E37CB5-059D-4F4B-AEF6-08265468D368}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/lv.vcproj',
+ guid='{A5C5D801-4026-49F2-BBF1-250941855306}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ml.vcproj',
+ guid='{CAB69303-0F02-4C68-A12E-FFE55DB52526}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/mr.vcproj',
+ guid='{A464166F-8507-49B4-9B02-5CB77C498B25}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/nb.vcproj',
+ guid='{B30B0E1F-1CE9-4DEF-A752-7498FD709C1F}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/nl.vcproj',
+ guid='{63011A7B-CE4D-4DF1-B5DA-1B133C14A2E8}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/or.vcproj',
+ guid='{E07D267C-34C3-4DDB-8B41-94697808714A}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/pl.vcproj',
+ guid='{9F53807E-9382-47BD-8371-E5D04F517E9C}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/pt-BR.vcproj',
+ guid='{2F914112-2657-49EC-8EA6-3BA63340DE27}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/pt-PT.vcproj',
+ guid='{0A13F602-B497-4BC1-ABD8-03CA8E95B2AF}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ro.vcproj',
+ guid='{C70D3509-57C4-4326-90C1-2EC0AE34848D}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ru.vcproj',
+ guid='{7D456640-3619-4D23-A56D-E0084400CCBF}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/sk.vcproj',
+ guid='{82F5BFE5-FDCE-47D4-8B38-BEEBED561681}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/sl.vcproj',
+ guid='{C2A444C2-9D74-4AD7-AE7C-04F5EDA17060}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/sr.vcproj',
+ guid='{300C6A09-663E-48B6-8E07-A0D50CAF8F25}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/sv.vcproj',
+ guid='{B0D5BD91-6153-4CA6-BC2F-4E3BD43E5DB7}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/ta.vcproj',
+ guid='{7A0BA0C5-0D90-49AE-919A-4BE096F69E4F}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/te.vcproj',
+ guid='{9D13D9B8-6C28-42A7-935C-B769EBC55BAA}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/th.vcproj',
+ guid='{226B3533-1FF3-42F6-A8E3-C4DDBC955290}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/tr.vcproj',
+ guid='{65C78BBB-8FCB-48E4-94C8-1F0F981929AF}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/uk.vcproj',
+ guid='{182D578D-2DAC-4BB7-AFEC-9A2855E56F94}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/vi.vcproj',
+ guid='{DA5C6FCB-FCFD-49B8-8DDA-8351638096DB}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/zh-CN.vcproj',
+ guid='{C0C7DA58-C90D-4BDE-AE44-588997339F5D}')
+ChromiumLocaleProject('$CHROME_DIR/app/locales/zh-TW.vcproj',
+ guid='{E7B11CF0-FE40-4A69-AE20-1B882F4D7585}')
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index feee5e8..8b6105b 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -308,3 +308,11 @@ if env.Bit('posix'):
if not env.Bit('mac'):
# TODO: This should work for all platforms.
env.ChromeStaticLibrary('browser', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/browser/browser.vcproj',
+ dependencies = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$GOOGLE_UPDATE_DIR/ondemand_updates.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{5BF908A7-68FB-4A4B-99E3-8C749F1FE4EA}')
diff --git a/chrome/browser/debugger/debugger.scons b/chrome/browser/debugger/debugger.scons
index 2846f89..0045c62 100644
--- a/chrome/browser/debugger/debugger.scons
+++ b/chrome/browser/debugger/debugger.scons
@@ -66,3 +66,8 @@ if not env.Bit('mac'):
# TODO(port): Enable for Mac.
env.ChromeStaticLibrary('debugger', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/browser/debugger/debugger.vcproj',
+ dependencies = [
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{57823D8C-A317-4713-9125-2C91FDFD12D6}')
diff --git a/chrome/browser/views/SConscript b/chrome/browser/views/SConscript
index 4c0e9c4..8cdcfee 100644
--- a/chrome/browser/views/SConscript
+++ b/chrome/browser/views/SConscript
@@ -138,3 +138,11 @@ if env.Bit('windows'):
])
env.ChromeStaticLibrary('browser_views', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/browser/views/browser_views.vcproj',
+ dependencies = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$GOOGLE_UPDATE_DIR/ondemand_updates.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{FA537565-7B03-4FFC-AF15-F7A979B72E22}')
diff --git a/chrome/chrome.scons b/chrome/chrome.scons
index 1081fc2..0a029ff 100644
--- a/chrome/chrome.scons
+++ b/chrome/chrome.scons
@@ -43,6 +43,8 @@ sconscript_files = env.ChromiumLoadComponentSConscripts(
LOAD_NAMES = ['chrome'],
+ chrome_sln = 'chrome_sln.scons',
+ locales = 'app/locales/locales.scons',
browser = 'browser/browser.scons',
debugger = 'browser/debugger/debugger.scons',
common = 'common/common.scons',
@@ -78,31 +80,4 @@ sconscript_files = env.ChromiumLoadComponentSConscripts(
image_diff = 'tools/test/image_diff/image_diff.scons',
)
-# TODO(port)
-if env.AnyBits('linux', 'mac'):
- remove_files = [
- 'installer/mini_installer/installer_unittests.scons',
- 'installer/mini_installer/mini_installer.scons',
- 'installer/setup/setup.scons',
- 'installer/util/util.scons',
- 'test/activex_test_control/activex_test_control.scons',
- 'test/automated_ui_tests/automated_ui_tests.scons',
- 'test/automation/automation.scons',
- 'test/interactive_ui/interactive_ui_tests.scons',
- 'test/memory_test/memory_test.scons',
- 'test/mini_installer_test/mini_installer_test.scons',
- 'test/page_cycler/page_cycler_tests.scons',
- 'test/plugin/plugin_tests.scons',
- 'test/reliability/reliability_tests.scons',
- 'test/security_tests/security_tests.scons',
- 'test/selenium/selenium_tests.scons',
- 'test/startup/startup_tests.scons',
- 'test/tab_switching/tab_switching_test.scons',
- 'test/ui/ui_tests.scons',
- 'tools/convert_dict/convert_dict.scons',
- 'tools/crash_service/crash_service.scons',
- 'tools/profiles/generate_profile.scons',
- ]
- sconscript_files = list(set(sconscript_files) - set(remove_files))
-
SConscript(sconscript_files, exports=['env'])
diff --git a/chrome/chrome_sln.scons b/chrome/chrome_sln.scons
new file mode 100644
index 0000000..b95d6cd
--- /dev/null
+++ b/chrome/chrome_sln.scons
@@ -0,0 +1,544 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.sln.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Tool('MSVSNew')
+
+# TODO(sgk): migrate these MSVSProject() definitions to other
+# .scons files as we continue to rename SConscript files.
+env.ChromeMSVSProject('$GEARS_DIR/gears.vcproj',
+ guid='{D703D7A0-EDC1-4FE6-9E22-56154155B24E}')
+
+env.ChromeMSVSProject('../tools/memory_watcher/memory_watcher.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ ],
+ guid='{3BD81303-4E14-4559-AA69-B30C3BAB08DD}')
+
+# Not until/unless we want to support C# projects.
+#env.ChromeMSVSProject('$CHROME_SRC_DIR/tools/stats_viewer/stats_viewer.csproj',
+# guid='{41735CD9-3E35-47F7-9FD1-4A9950B6B131}')
+
+env.ChromeMSVSProject('$CHROME_DIR/app/generated_resources.vcproj',
+ guid='{D9DDAF60-663F-49CC-90DC-3D08CC3D1B28}')
+
+env.ChromeMSVSProject('$CHROME_DIR/app/theme/theme_dll.vcproj',
+ guid='{FD683DD6-D9BF-4B1B-AB6D-A3AC03EDAA4D}')
+
+env.ChromeMSVSProject('$CHROME_DIR/browser/resources/browser_resources.vcproj',
+ guid='{B95AB527-F7DB-41E9-AD91-EB51EE0F56BE}')
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/gcapi/gcapi_dll.vcproj',
+ guid='{B802A2FE-E4E2-4F5A-905A-D5128875C954}')
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/gcapi/gcapi_lib.vcproj',
+ guid='{CD2FD73A-6AAB-4886-B887-760D18E8B635}')
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/gcapi/gcapi_test.vcproj',
+ dependencies = [
+ '$CHROME_DIR/installer/gcapi/gcapi_dll.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_lib.vcproj',
+ ],
+ guid='{B64B396B-8EF1-4B6B-A07E-48D40EB961AB}')
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/util/installer_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ ],
+ guid='{903F8C1E-537A-4C9E-97BE-075147CBE769}')
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/util/prebuild/util_prebuild.vcproj',
+ guid='{0026A376-C4F1-4575-A1BA-578C69F07013}')
+
+
+env.ChromeMSVSFolder('terms',
+ items = [
+ # No $CHROME_DIR prefix because these go straight into
+ # the .sln file without substitution.
+ 'app/resources/terms/terms_ar.html',
+ 'app/resources/terms/terms_bg.html',
+ 'app/resources/terms/terms_bn.html',
+ 'app/resources/terms/terms_ca.html',
+ 'app/resources/terms/terms_chromium.html',
+ 'app/resources/terms/terms_cs.html',
+ 'app/resources/terms/terms_da.html',
+ 'app/resources/terms/terms_de.html',
+ 'app/resources/terms/terms_el.html',
+ 'app/resources/terms/terms_en-GB.html',
+ 'app/resources/terms/terms_en.html',
+ 'app/resources/terms/terms_es-419.html',
+ 'app/resources/terms/terms_es.html',
+ 'app/resources/terms/terms_et.html',
+ 'app/resources/terms/terms_fi.html',
+ 'app/resources/terms/terms_fil.html',
+ 'app/resources/terms/terms_fr.html',
+ 'app/resources/terms/terms_gu.html',
+ 'app/resources/terms/terms_he.html',
+ 'app/resources/terms/terms_hi.html',
+ 'app/resources/terms/terms_hr.html',
+ 'app/resources/terms/terms_hu.html',
+ 'app/resources/terms/terms_id.html',
+ 'app/resources/terms/terms_it.html',
+ 'app/resources/terms/terms_ja.html',
+ 'app/resources/terms/terms_kn.html',
+ 'app/resources/terms/terms_ko.html',
+ 'app/resources/terms/terms_lt.html',
+ 'app/resources/terms/terms_lv.html',
+ 'app/resources/terms/terms_ml.html',
+ 'app/resources/terms/terms_mr.html',
+ 'app/resources/terms/terms_nb.html',
+ 'app/resources/terms/terms_nl.html',
+ 'app/resources/terms/terms_or.html',
+ 'app/resources/terms/terms_pl.html',
+ 'app/resources/terms/terms_pt-BR.html',
+ 'app/resources/terms/terms_pt-PT.html',
+ 'app/resources/terms/terms_ro.html',
+ 'app/resources/terms/terms_ru.html',
+ 'app/resources/terms/terms_sk.html',
+ 'app/resources/terms/terms_sl.html',
+ 'app/resources/terms/terms_sr.html',
+ 'app/resources/terms/terms_sv.html',
+ 'app/resources/terms/terms_ta.html',
+ 'app/resources/terms/terms_te.html',
+ 'app/resources/terms/terms_th.html',
+ 'app/resources/terms/terms_tr.html',
+ 'app/resources/terms/terms_uk.html',
+ 'app/resources/terms/terms_vi.html',
+ 'app/resources/terms/terms_zh-CN.html',
+ 'app/resources/terms/terms_zh-TW.html',
+ ],
+ guid='{D13F055D-4428-48F4-ABF6-18359C76EDB0}')
+
+env.ChromeMSVSFolder('locales',
+ entries = [
+ env.ChromeMSVSFolder('terms'),
+
+ '$CHROME_DIR/app/locales/ar.vcproj',
+ '$CHROME_DIR/app/locales/bg.vcproj',
+ '$CHROME_DIR/app/locales/bn.vcproj',
+ '$CHROME_DIR/app/locales/ca.vcproj',
+ '$CHROME_DIR/app/locales/cs.vcproj',
+ '$CHROME_DIR/app/locales/da.vcproj',
+ '$CHROME_DIR/app/locales/de.vcproj',
+ '$CHROME_DIR/app/locales/el.vcproj',
+ '$CHROME_DIR/app/locales/en-GB.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$CHROME_DIR/app/locales/es.vcproj',
+ '$CHROME_DIR/app/locales/es-419.vcproj',
+ '$CHROME_DIR/app/locales/et.vcproj',
+ '$CHROME_DIR/app/locales/fi.vcproj',
+ '$CHROME_DIR/app/locales/fil.vcproj',
+ '$CHROME_DIR/app/locales/fr.vcproj',
+ '$CHROME_DIR/app/locales/gu.vcproj',
+ '$CHROME_DIR/app/locales/he.vcproj',
+ '$CHROME_DIR/app/locales/hi.vcproj',
+ '$CHROME_DIR/app/locales/hr.vcproj',
+ '$CHROME_DIR/app/locales/hu.vcproj',
+ '$CHROME_DIR/app/locales/id.vcproj',
+ '$CHROME_DIR/app/locales/it.vcproj',
+ '$CHROME_DIR/app/locales/ja.vcproj',
+ '$CHROME_DIR/app/locales/kn.vcproj',
+ '$CHROME_DIR/app/locales/ko.vcproj',
+ '$CHROME_DIR/app/locales/lt.vcproj',
+ '$CHROME_DIR/app/locales/lv.vcproj',
+ '$CHROME_DIR/app/locales/ml.vcproj',
+ '$CHROME_DIR/app/locales/mr.vcproj',
+ '$CHROME_DIR/app/locales/nb.vcproj',
+ '$CHROME_DIR/app/locales/nl.vcproj',
+ '$CHROME_DIR/app/locales/or.vcproj',
+ '$CHROME_DIR/app/locales/pl.vcproj',
+ '$CHROME_DIR/app/locales/pt-BR.vcproj',
+ '$CHROME_DIR/app/locales/pt-PT.vcproj',
+ '$CHROME_DIR/app/locales/ro.vcproj',
+ '$CHROME_DIR/app/locales/ru.vcproj',
+ '$CHROME_DIR/app/locales/sk.vcproj',
+ '$CHROME_DIR/app/locales/sl.vcproj',
+ '$CHROME_DIR/app/locales/sr.vcproj',
+ '$CHROME_DIR/app/locales/sv.vcproj',
+ '$CHROME_DIR/app/locales/ta.vcproj',
+ '$CHROME_DIR/app/locales/te.vcproj',
+ '$CHROME_DIR/app/locales/th.vcproj',
+ '$CHROME_DIR/app/locales/tr.vcproj',
+ '$CHROME_DIR/app/locales/uk.vcproj',
+ '$CHROME_DIR/app/locales/vi.vcproj',
+ '$CHROME_DIR/app/locales/zh-CN.vcproj',
+ '$CHROME_DIR/app/locales/zh-TW.vcproj',
+ ],
+ items = [
+ # No $CHROME_DIR because this goes straight into
+ # the .sln file with no substitution.
+ 'app/locales/locale_settings.h',
+ ],
+ guid='{2325D8C4-8EF5-42AC-8900-492225750DE4}')
+
+env.ChromeMSVSFolder('App',
+ entries = [
+ env.ChromeMSVSFolder('locales'),
+ '$CHROME_DIR/app/chrome_dll.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ ],
+ guid='{B6867423-23BD-4588-9321-2D500F128A3D}')
+
+env.ChromeMSVSFolder('Browser',
+ entries = [
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$CHROME_DIR/browser/resources/browser_resources.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$GEARS_DIR/gears.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$RLZ_DIR/rlz.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ ],
+ guid='{97555540-8163-4D0F-BCAC-EFA0FFED3453}')
+
+env.ChromeMSVSFolder('Installer',
+ entries = [
+ '$CHROME_DIR/installer/gcapi/gcapi_dll.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_lib.vcproj',
+ '$CHROME_DIR/installer/mini_installer/mini_installer.vcproj',
+ '$GOOGLE_UPDATE_DIR/ondemand_updates.vcproj',
+ '$CHROME_DIR/installer/setup/setup.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$CHROME_DIR/installer/util/prebuild/util_prebuild.vcproj',
+ ],
+ guid='{EB684A4B-98F7-4E68-8EA7-EA74ACF7060B}')
+
+env.ChromeMSVSFolder('Breakpad',
+ entries = [
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$BREAKPAD_DIR/breakpad_sender.vcproj',
+ ],
+ guid='{873D095E-150E-4262-8C41-2D8ED02F0F57}')
+
+env.ChromeMSVSFolder('icu',
+ entries = [
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ ],
+ guid='{1AFC1EC3-24FA-4260-B099-76319EC9977A}')
+
+env.ChromeMSVSFolder('chrome libxml projects',
+ name='libxml projects',
+ entries = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ ],
+ guid='{032541FB-1E7C-4423-B657-4A71FE180C8A}')
+
+env.ChromeMSVSFolder('chrome libxslt projects',
+ name='libxslt projects',
+ entries = [
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{BC732CFC-DE0A-4CF5-B8AA-3269C2F6D399}')
+
+env.ChromeMSVSFolder('Libraries',
+ entries = [
+ env.ChromeMSVSFolder('Breakpad'),
+ env.ChromeMSVSFolder('icu'),
+ env.ChromeMSVSFolder('chrome libxml projects'),
+ env.ChromeMSVSFolder('chrome libxslt projects'),
+ '$BASE_DIR/build/base.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$BSPATCH_DIR/bspatch.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$LZMA_SDK_DIR/7z_C.vcproj',
+ '$MEDIA_DIR/build/media.vcproj',
+ '../tools/memory_watcher/memory_watcher.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ ],
+ guid='{EF78C1F9-AA17-4CA5-B6CB-39B37A73A3DA}')
+
+env.ChromeMSVSFolder('V8',
+ entries = [
+ '$V8_DIR/tools/visual_studio/v8.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_mksnapshot.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_shell_sample.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ ],
+ guid='{B353A6A5-9551-4B76-908E-0F0A9B31E4CE}')
+
+env.ChromeMSVSFolder('Test',
+ entries = [
+ '$CHROME_DIR/test/activex_test_control/activex_test_control.vcproj',
+ '$CHROME_DIR/test/automated_ui_tests/automated_ui_tests.vcproj',
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base_unittests.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_test.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$CHROME_DIR/tools/test/image_diff/image_diff.vcproj',
+ '$CHROME_DIR/installer/util/installer_unittests.vcproj',
+ '$CHROME_DIR/test/interactive_ui/interactive_ui.vcproj',
+ '$CHROME_DIR/common/ipc_tests.vcproj',
+ '$MEDIA_DIR/build/media_unittests.vcproj',
+ '$CHROME_DIR/test/memory_test/memory_test.vcproj',
+ '$CHROME_DIR/test/mini_installer_test/mini_installer_test.vcproj',
+ '$NET_DIR/build/net_perftests.vcproj',
+ '$NET_DIR/build/net_unittests.vcproj',
+ '$WEBKIT_DIR/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.vcproj',
+ '$WEBKIT_DIR/glue/plugins/test/npapi_test_plugin.vcproj',
+ '$CHROME_DIR/test/page_cycler/page_cycler_tests.vcproj',
+ '$CHROME_DIR/test/perf/perftests.vcproj',
+ '$CHROME_DIR/test/plugin/plugin_tests.vcproj',
+ '$CHROME_DIR/test/reliability/reliability_tests.vcproj',
+ '$CHROME_DIR/test/security_tests/security_tests.vcproj',
+ '$CHROME_DIR/test/selenium/selenium_tests.vcproj',
+ '$CHROME_DIR/test/startup/startup_tests.vcproj',
+ '$CHROME_DIR/test/tab_switching/tab_switching.vcproj',
+ '$CHROME_DIR/test/chrome_plugin/test_chrome_plugin.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell_tests.vcproj',
+ '$CHROME_DIR/test/ui/ui_tests.vcproj',
+ '$CHROME_DIR/test/unit/unittests.vcproj',
+ ],
+ guid='{1174D37F-6ABB-45DA-81B3-C631281273B7}')
+
+env.ChromeMSVSFolder('Tools',
+ entries = [
+ '$BSDIFF_DIR/bsdiff.vcproj',
+ '$CHROME_DIR/tools/convert_dict/convert_dict.vcproj',
+ '$CHROME_DIR/tools/crash_service/crash_service.vcproj',
+ '$CHROME_DIR/tools/perf/flush_cache/flush_cache.vcproj',
+ '$CHROME_DIR/tools/profiles/generate_profile.vcproj',
+ # Not until we actually want to support C# projects.
+ #'$CHROME_SRC_DIR/tools/stats_viewer/stats_viewer.csproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ ],
+ guid='{846901FD-A619-4BD5-A303-38174730CDD6}')
+
+env.ChromeMSVSFolder('WebKit (readonly)',
+ entries = [
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/JavaScriptCore_pcre.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+
+ ],
+ guid='{1088577A-0C49-4DE0-85CD-B68AD0BE55AA}')
+
+env.ChromeMSVSFolder('WebKit (ours)',
+ entries = [
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ '$WEBKIT_DIR/activex_shim_dll/activex_shim_dll.vcproj',
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$WEBKIT_DIR/build/localized_strings/localized_strings.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ ],
+ guid='{CB43561E-A6F8-49E2-96A2-3F2BA1FFF21E}')
+
+
+solution = env.ChromeMSVSSolution('chrome.sln',
+ entries = [
+ env.ChromeMSVSFolder('App'),
+ env.ChromeMSVSFolder('Browser'),
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$CHROME_DIR/common/ipc_tests.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ env.ChromeMSVSFolder('WebKit (readonly)'),
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ env.ChromeMSVSFolder('Libraries'),
+ env.ChromeMSVSFolder('WebKit (ours)'),
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ env.ChromeMSVSFolder('icu'),
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$CHROME_DIR/tools/test/image_diff/image_diff.vcproj',
+ env.ChromeMSVSFolder('Breakpad'),
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$BREAKPAD_DIR/breakpad_sender.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ '$LZMA_SDK_DIR/7z_C.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$CHROME_DIR/app/chrome_dll.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$WEBKIT_DIR/tools/npapi_layout_test_plugin/npapi_layout_test_plugin.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ env.ChromeMSVSFolder('V8'),
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$CHROME_DIR/test/perf/perftests.vcproj',
+ '$CHROME_DIR/test/unit/unittests.vcproj',
+ env.ChromeMSVSFolder('Test'),
+ '$CHROME_DIR/test/page_cycler/page_cycler_tests.vcproj',
+ '$CHROME_DIR/test/reliability/reliability_tests.vcproj',
+ '$CHROME_DIR/test/selenium/selenium_tests.vcproj',
+ '$CHROME_DIR/test/startup/startup_tests.vcproj',
+ '$CHROME_DIR/test/ui/ui_tests.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ env.ChromeMSVSFolder('Tools'),
+ '$CHROME_DIR/tools/profiles/generate_profile.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell_tests.vcproj',
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ # Not until we actually want to support C# projects.
+ #'$CHROME_SRC_DIR/tools/stats_viewer/stats_viewer.csproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ env.ChromeMSVSFolder('locales'),
+ '$CHROME_DIR/browser/resources/browser_resources.vcproj',
+ '$WEBKIT_DIR/build/localized_strings/localized_strings.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ '$CHROME_DIR/test/security_tests/security_tests.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$WEBKIT_DIR/glue/plugins/test/npapi_test_plugin.vcproj',
+ '$CHROME_DIR/tools/perf/flush_cache/flush_cache.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ '$NET_DIR/build/net_unittests.vcproj',
+ '$NET_DIR/build/net_perftests.vcproj',
+ '$MEDIA_DIR/build/media.vcproj',
+ '$MEDIA_DIR/build/media_unittests.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base_unittests.vcproj',
+ '$CHROME_DIR/test/plugin/plugin_tests.vcproj',
+ '$CHROME_DIR/test/interactive_ui/interactive_ui.vcproj',
+ env.ChromeMSVSFolder('Installer'),
+ '$CHROME_DIR/installer/setup/setup.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$CHROME_DIR/installer/mini_installer/mini_installer.vcproj',
+ '$BSDIFF_DIR/bsdiff.vcproj',
+ '$BSPATCH_DIR/bspatch.vcproj',
+ '$CHROME_DIR/installer/util/installer_unittests.vcproj',
+ '$WEBKIT_DIR/activex_shim_dll/activex_shim_dll.vcproj',
+ '$CHROME_DIR/app/locales/da.vcproj',
+ '$CHROME_DIR/test/activex_test_control/activex_test_control.vcproj',
+ env.ChromeMSVSFolder('chrome libxml projects'),
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ env.ChromeMSVSFolder('chrome libxslt projects'),
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/app/locales/zh-TW.vcproj',
+ '$CHROME_DIR/app/locales/he.vcproj',
+ '$CHROME_DIR/test/chrome_plugin/test_chrome_plugin.vcproj',
+ '$CHROME_DIR/test/automated_ui_tests/automated_ui_tests.vcproj',
+ '$CHROME_DIR/test/mini_installer_test/mini_installer_test.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/JavaScriptCore_pcre.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ '$GEARS_DIR/gears.vcproj',
+ '$GOOGLE_UPDATE_DIR/ondemand_updates.vcproj',
+ env.ChromeMSVSFolder('terms'),
+ '$CHROME_DIR/app/locales/ar.vcproj',
+ '$CHROME_DIR/app/locales/bg.vcproj',
+ '$CHROME_DIR/app/locales/ca.vcproj',
+ '$CHROME_DIR/app/locales/cs.vcproj',
+ '$CHROME_DIR/app/locales/de.vcproj',
+ '$CHROME_DIR/app/locales/el.vcproj',
+ '$CHROME_DIR/app/locales/en-GB.vcproj',
+ '$CHROME_DIR/app/locales/es.vcproj',
+ '$CHROME_DIR/app/locales/et.vcproj',
+ '$CHROME_DIR/app/locales/fi.vcproj',
+ '$CHROME_DIR/app/locales/fil.vcproj',
+ '$CHROME_DIR/app/locales/fr.vcproj',
+ '$CHROME_DIR/app/locales/hi.vcproj',
+ '$CHROME_DIR/app/locales/hr.vcproj',
+ '$CHROME_DIR/app/locales/hu.vcproj',
+ '$CHROME_DIR/app/locales/id.vcproj',
+ '$CHROME_DIR/app/locales/it.vcproj',
+ '$CHROME_DIR/app/locales/ja.vcproj',
+ '$CHROME_DIR/app/locales/ko.vcproj',
+ '$CHROME_DIR/app/locales/lt.vcproj',
+ '$CHROME_DIR/app/locales/lv.vcproj',
+ '$CHROME_DIR/app/locales/nl.vcproj',
+ '$CHROME_DIR/app/locales/nb.vcproj',
+ '$CHROME_DIR/app/locales/pl.vcproj',
+ '$CHROME_DIR/app/locales/pt-BR.vcproj',
+ '$CHROME_DIR/app/locales/pt-PT.vcproj',
+ '$CHROME_DIR/app/locales/ro.vcproj',
+ '$CHROME_DIR/app/locales/ru.vcproj',
+ '$CHROME_DIR/app/locales/sk.vcproj',
+ '$CHROME_DIR/app/locales/sl.vcproj',
+ '$CHROME_DIR/app/locales/sr.vcproj',
+ '$CHROME_DIR/app/locales/th.vcproj',
+ '$CHROME_DIR/app/locales/sv.vcproj',
+ '$CHROME_DIR/app/locales/tr.vcproj',
+ '$CHROME_DIR/app/locales/uk.vcproj',
+ '$CHROME_DIR/app/locales/vi.vcproj',
+ '$CHROME_DIR/app/locales/zh-CN.vcproj',
+ '$CHROME_DIR/tools/crash_service/crash_service.vcproj',
+ '../tools/memory_watcher/memory_watcher.vcproj',
+ '$RLZ_DIR/rlz.vcproj',
+ '$CHROME_DIR/app/locales/es-419.vcproj',
+ '$CHROME_DIR/test/tab_switching/tab_switching.vcproj',
+ '$CHROME_DIR/installer/util/prebuild/util_prebuild.vcproj',
+ '$CHROME_DIR/tools/convert_dict/convert_dict.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$CHROME_DIR/test/memory_test/memory_test.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ '$V8_DIR/tools/visual_studio/v8.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_mksnapshot.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_shell_sample.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/app/locales/kn.vcproj',
+ '$CHROME_DIR/app/locales/bn.vcproj',
+ '$CHROME_DIR/app/locales/gu.vcproj',
+ '$CHROME_DIR/app/locales/ml.vcproj',
+ '$CHROME_DIR/app/locales/mr.vcproj',
+ '$CHROME_DIR/app/locales/or.vcproj',
+ '$CHROME_DIR/app/locales/ta.vcproj',
+ '$CHROME_DIR/app/locales/te.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_lib.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_dll.vcproj',
+ '$CHROME_DIR/installer/gcapi/gcapi_test.vcproj',
+ ],
+ variants = [
+ 'Debug|Win32',
+ 'Release|Win32',
+ ])
+
+env.AlwaysBuild(solution)
+
+i = env.Command('$CHROME_SRC_DIR/chrome/chrome.sln', solution,
+ Copy('$TARGET', '$SOURCE'))
+Alias('solutions', i)
diff --git a/chrome/common/common.scons b/chrome/common/common.scons
index 5b82155..4ef1cef 100644
--- a/chrome/common/common.scons
+++ b/chrome/common/common.scons
@@ -132,3 +132,10 @@ if env.Bit('posix'):
if not env.Bit('mac'):
# TODO(port): This should be enabled for all platforms.
env.ChromeStaticLibrary('common', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/common/common.vcproj',
+ dependencies = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{899F1280-3441-4D1F-BA04-CCD6208D9146}')
diff --git a/chrome/common/ipc_tests.scons b/chrome/common/ipc_tests.scons
index 27d8f8e..5b64fd3 100644
--- a/chrome/common/ipc_tests.scons
+++ b/chrome/common/ipc_tests.scons
@@ -84,3 +84,12 @@ input_files = [
ipc_tests = env.ChromeTestProgram('ipc_tests', input_files)
i = env.Install('$TARGET_ROOT', ipc_tests)
Alias('chrome', i)
+
+env.ChromeMSVSProject('$CHROME_DIR/common/ipc_tests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{B92AE829-E1CD-4781-824A-DCB1603A1672}')
diff --git a/chrome/installer/mini_installer/installer_unittests.scons b/chrome/installer/mini_installer/installer_unittests.scons
index 9dd31f2..288cda2 100644
--- a/chrome/installer/mini_installer/installer_unittests.scons
+++ b/chrome/installer/mini_installer/installer_unittests.scons
@@ -65,4 +65,6 @@ input_files = [
'../util/work_item_list_unittest.cc',
]
-env.ChromeTestProgram('installer_unittests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('installer_unittests', input_files)
diff --git a/chrome/installer/mini_installer/mini_installer.scons b/chrome/installer/mini_installer/mini_installer.scons
index 89c0d62..0fefbe1 100644
--- a/chrome/installer/mini_installer/mini_installer.scons
+++ b/chrome/installer/mini_installer/mini_installer.scons
@@ -87,28 +87,97 @@ if env.Bit('windows'):
])
input_files.extend(resources)
-env.ChromeProgram('mini_installer', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeProgram('mini_installer', input_files)
env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
-packed = env.Command('$DESTINATION_ROOT/packed_files.txt',
- ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
- '$CHROME_DIR/installer/mini_installer/chrome.release'],
- ('$PYTHON ${SOURCES[0]}'
- ' --output_dir=${TARGET.dir}'
- ' --input_file=${SOURCES[1]}'))
-env.Depends(packed, '$DESTINATION_ROOT/setup.exe')
-
-# mini_installer.rc depends on the generated packed_files.txt
-# TODO(sgk): implicit dependency should be picked up automatically
-env.Depends(resources, packed)
-
+# TODO(port):
+if env.Bit('windows'):
+ packed = env.Command('$DESTINATION_ROOT/packed_files.txt',
+ ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
+ '$CHROME_DIR/installer/mini_installer/chrome.release'],
+ ('$PYTHON ${SOURCES[0]}'
+ ' --output_dir=${TARGET.dir}'
+ ' --input_file=${SOURCES[1]}'))
+ env.Depends(packed, '$DESTINATION_ROOT/setup.exe')
+
+ # mini_installer.rc depends on the generated packed_files.txt
+ # TODO(sgk): implicit dependency should be picked up automatically
+ env.Depends(resources, packed)
-exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc',
- 'mini_installer_exe_version.rc.version',
- PWD=Dir('.'))
+# TODO(port):
if env.Bit('windows'):
+ exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc',
+ 'mini_installer_exe_version.rc.version',
+ PWD=Dir('.'))
+
# TODO(sgk): implicit dependency should be picked up automatically
env_res.Depends(resources, exe_version_rc)
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/mini_installer/mini_installer.vcproj',
+ dependencies = [
+ '$CHROME_DIR/app/locales/et.vcproj',
+ '$CHROME_DIR/app/locales/pt-PT.vcproj',
+ '$CHROME_DIR/app/locales/fr.vcproj',
+ '$CHROME_DIR/app/locales/uk.vcproj',
+ '$CHROME_DIR/installer/setup/setup.vcproj',
+ '$CHROME_DIR/app/locales/th.vcproj',
+ '$CHROME_DIR/app/locales/hi.vcproj',
+ '$CHROME_DIR/app/locales/gu.vcproj',
+ '$CHROME_DIR/app/locales/it.vcproj',
+ '$CHROME_DIR/app/locales/pt-BR.vcproj',
+ '$CHROME_DIR/app/locales/sr.vcproj',
+ '$CHROME_DIR/app/locales/ko.vcproj',
+ '$CHROME_DIR/app/locales/en-GB.vcproj',
+ '$CHROME_DIR/app/locales/fil.vcproj',
+ '$CHROME_DIR/app/locales/ar.vcproj',
+ '$CHROME_DIR/app/locales/kn.vcproj',
+ '$CHROME_DIR/app/locales/bn.vcproj',
+ '$CHROME_DIR/app/locales/es.vcproj',
+ '$CHROME_DIR/app/locales/bg.vcproj',
+ '$CHROME_DIR/app/locales/nl.vcproj',
+ '$CHROME_DIR/app/locales/fi.vcproj',
+ '$CHROME_DIR/app/locales/tr.vcproj',
+ '$CHROME_DIR/app/locales/ta.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$CHROME_DIR/app/locales/ru.vcproj',
+ '$CHROME_DIR/app/locales/cs.vcproj',
+ '$CHROME_DIR/app/locales/lt.vcproj',
+ '$CHROME_DIR/app/locales/sk.vcproj',
+ ('$CHROME_DIR/tools/crash_service/' +
+ 'crash_service.vcproj'),
+ '$CHROME_DIR/app/locales/te.vcproj',
+ '$CHROME_DIR/app/locales/pl.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$CHROME_DIR/app/locales/he.vcproj',
+ '$CHROME_DIR/app/locales/mr.vcproj',
+ '$CHROME_DIR/app/locales/da.vcproj',
+ '$CHROME_DIR/app/locales/lv.vcproj',
+ '$CHROME_DIR/app/locales/hu.vcproj',
+ '$CHROME_DIR/app/locales/sv.vcproj',
+ '$CHROME_DIR/app/locales/ja.vcproj',
+ '$CHROME_DIR/app/locales/nb.vcproj',
+ '$CHROME_DIR/app/locales/de.vcproj',
+ '$RLZ_DIR/rlz.vcproj',
+ '$CHROME_DIR/app/chrome_dll.vcproj',
+ '$CHROME_DIR/app/locales/zh-CN.vcproj',
+ '$CHROME_DIR/app/locales/sl.vcproj',
+ '$CHROME_DIR/app/locales/ro.vcproj',
+ '$CHROME_DIR/app/locales/ml.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$CHROME_DIR/app/locales/hr.vcproj',
+ '$CHROME_DIR/app/locales/el.vcproj',
+ '$CHROME_DIR/app/locales/vi.vcproj',
+ '$CHROME_DIR/app/locales/or.vcproj',
+ '$BSDIFF_DIR/bsdiff.vcproj',
+ '$CHROME_DIR/app/locales/id.vcproj',
+ '$CHROME_DIR/app/locales/zh-TW.vcproj',
+ '$CHROME_DIR/app/locales/ca.vcproj',
+ '$CHROME_DIR/app/locales/es-419.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ ],
+ guid='{24A5AC7C-280B-4899-9153-6BA570A081E7}')
diff --git a/chrome/installer/setup/setup.scons b/chrome/installer/setup/setup.scons
index b0ef23b..aa500eb 100644
--- a/chrome/installer/setup/setup.scons
+++ b/chrome/installer/setup/setup.scons
@@ -81,12 +81,26 @@ input_files = [
'uninstall.cc',
]
-env.ChromeProgram('setup', resources + input_files)
-
-exe_version_rc = env.ChromeVersionRC('setup_exe_version.rc',
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeProgram('setup', resources + input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/installer/setup/setup.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$LZMA_SDK_DIR/7z_C.vcproj',
+ '$BSPATCH_DIR/bspatch.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ ],
+ guid='{21C76E6E-8B38-44D6-8148-B589C13B9554}')
+
+# TODO(port):
+if env.Bit('windows'):
+ exe_version_rc = env.ChromeVersionRC('setup_exe_version.rc',
'setup_exe_version.rc.version',
PWD = env.Dir('.'))
-if env.Bit('windows'):
# TODO(sgk): implicit dependency should be picked up automatically
env_res.Depends(resources, exe_version_rc)
diff --git a/chrome/installer/util/util.scons b/chrome/installer/util/util.scons
index e1e4957..5d43185 100644
--- a/chrome/installer/util/util.scons
+++ b/chrome/installer/util/util.scons
@@ -50,17 +50,28 @@ input_files = [
'work_item_list.cc',
]
-env.ChromeStaticLibrary('util', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeStaticLibrary('util', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/installer/util/util.vcproj',
+ dependencies = [
+ ('$CHROME_DIR/installer/util/prebuild/' +
+ 'util_prebuild.vcproj'),
+ ],
+ guid='{EFBB1436-A63F-4CD8-9E99-B89226E782EC}')
-# create_string_rc.py imports FP.py from the tools/grit/grit/extern
-# directory, so add that to PYTHONPATH for this command execution.
-env_x = env.Clone()
-env_x.AppendENVPath('PYTHONPATH',
- [env_x.Dir('$CHROME_SRC_DIR/tools/grit/grit/extern').abspath])
-env_x.Command(['$CHROME_DIR/installer/util/installer_util_strings.rc',
- '$CHROME_DIR/installer/util/installer_util_strings.h'],
- ['$CHROME_DIR/installer/util/prebuild/create_string_rc.py',
- '$CHROME_DIR/app/generated_resources.grd'] +
- env.Glob('$CHROME_DIR/app/resources/*.xtb'),
- "$PYTHON ${SOURCES[0]} ${TARGET.dir}")
+
+# TODO(port):
+if env.Bit('windows'):
+ # create_string_rc.py imports FP.py from the tools/grit/grit/extern
+ # directory, so add that to PYTHONPATH for this command execution.
+ env_x = env.Clone()
+ env_x.AppendENVPath('PYTHONPATH',
+ [env_x.Dir('$CHROME_SRC_DIR/tools/grit/grit/extern').abspath])
+ env_x.Command(['$CHROME_DIR/installer/util/installer_util_strings.rc',
+ '$CHROME_DIR/installer/util/installer_util_strings.h'],
+ ['$CHROME_DIR/installer/util/prebuild/create_string_rc.py',
+ '$CHROME_DIR/app/generated_resources.grd'] +
+ env.Glob('$CHROME_DIR/app/resources/*.xtb'),
+ "$PYTHON ${SOURCES[0]} ${TARGET.dir}")
diff --git a/chrome/plugin/plugin.scons b/chrome/plugin/plugin.scons
index c26768a..3a100652 100644
--- a/chrome/plugin/plugin.scons
+++ b/chrome/plugin/plugin.scons
@@ -58,3 +58,5 @@ if env.Bit('posix'):
env.ChromeStaticLibrary('plugin', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/plugin/plugin.vcproj',
+ guid='{20A560A0-2CD0-4D9E-A58B-1F24B99C087A}')
diff --git a/chrome/renderer/renderer.scons b/chrome/renderer/renderer.scons
index 279b143..b8eda9f 100644
--- a/chrome/renderer/renderer.scons
+++ b/chrome/renderer/renderer.scons
@@ -102,3 +102,9 @@ if env.Bit('mac'):
# TODO(port): Enable for Mac.
if not env.Bit('mac'):
env.ChromeStaticLibrary('renderer', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/renderer/renderer.vcproj',
+ dependencies = [
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{9301A569-5D2B-4D11-9332-B1E30AEACB8D}')
diff --git a/chrome/test/activex_test_control/activex_test_control.scons b/chrome/test/activex_test_control/activex_test_control.scons
index a971b48..bfbbbcf 100644
--- a/chrome/test/activex_test_control/activex_test_control.scons
+++ b/chrome/test/activex_test_control/activex_test_control.scons
@@ -36,7 +36,9 @@ if env.Bit('windows'):
],
)
-env.TypeLibrary('activex_test_control.idl')
+# TODO(port):
+if env.Bit('windows'):
+ env.TypeLibrary('activex_test_control.idl')
input_files = [
'activex_test_control.cc',
@@ -44,4 +46,10 @@ input_files = [
'chrome_test_control.cc',
]
-env.ChromeSharedLibrary('activex_test_control', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeSharedLibrary('activex_test_control', input_files)
+
+env.ChromeMSVSProject(('$CHROME_DIR/test/activex_test_control/' +
+ 'activex_test_control.vcproj'),
+ guid='{414D4D24-5D65-498B-A33F-3A29AD3CDEDC}')
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.scons b/chrome/test/automated_ui_tests/automated_ui_tests.scons
index a483ab9..269d02a 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.scons
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.scons
@@ -72,4 +72,28 @@ input_files = [
'$CHROME_DIR/test/ui/ui_test_suite$OBJSUFFIX',
]
-env.ChromeTestProgram('automated_ui_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('automated_ui_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/automated_ui_tests/automated_ui_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{D2250C20-3A94-4FB9-AF73-11BC5B73884B}')
diff --git a/chrome/test/automation/automation.scons b/chrome/test/automation/automation.scons
index c1ef519..f894f72 100644
--- a/chrome/test/automation/automation.scons
+++ b/chrome/test/automation/automation.scons
@@ -27,4 +27,9 @@ input_files = [
'window_proxy.cc',
]
-env.ChromeStaticLibrary('automation', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeStaticLibrary('automation', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/automation/automation.vcproj',
+ guid='{1556EF78-C7E6-43C8-951F-F6B43AC0DD12}')
diff --git a/chrome/test/chrome_plugin/test_chrome_plugin.scons b/chrome/test/chrome_plugin/test_chrome_plugin.scons
index e7d3661..ca6ad83 100644
--- a/chrome/test/chrome_plugin/test_chrome_plugin.scons
+++ b/chrome/test/chrome_plugin/test_chrome_plugin.scons
@@ -51,3 +51,12 @@ if env.Bit('windows'):
])
env.ChromeSharedLibrary('test_chrome_plugin', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/chrome_plugin/test_chrome_plugin.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ ],
+ guid='{7F0A70F6-BE3F-4C19-B435-956AB8F30BA4}')
diff --git a/chrome/test/interactive_ui/interactive_ui_tests.scons b/chrome/test/interactive_ui/interactive_ui_tests.scons
index fe92cf0..769405d 100644
--- a/chrome/test/interactive_ui/interactive_ui_tests.scons
+++ b/chrome/test/interactive_ui/interactive_ui_tests.scons
@@ -104,4 +104,55 @@ input_files = [
'view_event_test_base.cc',
]
-env.ChromeTestProgram('interactive_ui_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('interactive_ui_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/interactive_ui/interactive_ui.vcproj',
+ name='interactive_ui_tests',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ ('$CHROME_DIR/test/chrome_plugin/' +
+ 'test_chrome_plugin.vcproj'),
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ ('$CHROME_DIR/browser/resources/' +
+ 'browser_resources.vcproj'),
+ '$RLZ_DIR/rlz.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ ],
+ guid='{018D4F38-6272-448F-A864-976DA09F05D0}')
diff --git a/chrome/test/memory_test/memory_test.scons b/chrome/test/memory_test/memory_test.scons
index 84871c9..a7b094c 100644
--- a/chrome/test/memory_test/memory_test.scons
+++ b/chrome/test/memory_test/memory_test.scons
@@ -62,4 +62,24 @@ input_files = [
'memory_test.cc',
]
-env.ChromeTestProgram('memory_test', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('memory_test', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/memory_test/memory_test.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{A5F831FD-9B9C-4FEF-9FBA-554817B734CE}')
diff --git a/chrome/test/mini_installer_test/mini_installer_test.scons b/chrome/test/mini_installer_test/mini_installer_test.scons
index 7014079..c54cbdd 100644
--- a/chrome/test/mini_installer_test/mini_installer_test.scons
+++ b/chrome/test/mini_installer_test/mini_installer_test.scons
@@ -65,4 +65,15 @@ input_files = [
'test.cc',
]
-env.ChromeTestProgram('mini_installer_test', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('mini_installer_test', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/mini_installer_test/mini_installer_test.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ ],
+ guid='{4B6E199A-034A-49BD-AB93-458DD37E45B1}')
diff --git a/chrome/test/page_cycler/page_cycler_tests.scons b/chrome/test/page_cycler/page_cycler_tests.scons
index 46e35fc..f04bba7 100644
--- a/chrome/test/page_cycler/page_cycler_tests.scons
+++ b/chrome/test/page_cycler/page_cycler_tests.scons
@@ -68,4 +68,26 @@ input_files = [
'page_cycler_test.cc',
]
-env.ChromeTestProgram('page_cycler_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('page_cycler_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/page_cycler/page_cycler_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{C9E0BD1D-B175-4A91-8380-3FDC81FAB9D7}')
diff --git a/chrome/test/perf/perftests.scons b/chrome/test/perf/perftests.scons
index 97e57d3..2767199 100644
--- a/chrome/test/perf/perftests.scons
+++ b/chrome/test/perf/perftests.scons
@@ -76,3 +76,42 @@ if env.Bit('mac'):
if not env.Bit('mac'):
env.ChromeTestProgram('perf_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/perf/perftests.vcproj',
+ name='perf_tests',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/JavaScriptCore_pcre.vcproj',
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{9055E088-25C6-47FD-87D5-D9DD9FD75C9F}')
diff --git a/chrome/test/plugin/plugin_tests.scons b/chrome/test/plugin/plugin_tests.scons
index fb0508b..d748a64 100644
--- a/chrome/test/plugin/plugin_tests.scons
+++ b/chrome/test/plugin/plugin_tests.scons
@@ -71,4 +71,30 @@ input_files = [
]
-env.ChromeTestProgram('plugin_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('plugin_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/plugin/plugin_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$CHROME_DIR/test/activex_test_control/' +
+ 'activex_test_control.vcproj'),
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ('$CHROME_DIR/test/security_tests/' +
+ 'security_tests.vcproj'),
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{A1CAA831-C507-4B2E-87F3-AEC63C9907F9}')
diff --git a/chrome/test/reliability/reliability_tests.scons b/chrome/test/reliability/reliability_tests.scons
index 8f6ad5f..1c65f04 100644
--- a/chrome/test/reliability/reliability_tests.scons
+++ b/chrome/test/reliability/reliability_tests.scons
@@ -70,4 +70,26 @@ input_files = [
'run_all_unittests.cc',
]
-env.ChromeTestProgram('reliability_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('reliability_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/reliability/reliability_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{8A3E1774-1DE9-445C-982D-3EE37C8A752A}')
diff --git a/chrome/test/security_tests/security_tests.scons b/chrome/test/security_tests/security_tests.scons
index 2fdf83f..1797f07 100644
--- a/chrome/test/security_tests/security_tests.scons
+++ b/chrome/test/security_tests/security_tests.scons
@@ -41,4 +41,9 @@ input_files = [
'$SANDBOX_DIR/tests/validation_tests/commands${OBJSUFFIX}',
]
-env.ChromeSharedLibrary('security_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeSharedLibrary('security_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/security_tests/security_tests.vcproj',
+ guid='{E750512D-FC7C-4C98-BF04-0A0DAF882055}')
diff --git a/chrome/test/selenium/selenium_tests.scons b/chrome/test/selenium/selenium_tests.scons
index 8d98dd1..7e29c94 100644
--- a/chrome/test/selenium/selenium_tests.scons
+++ b/chrome/test/selenium/selenium_tests.scons
@@ -72,4 +72,26 @@ input_files = [
'selenium_test.cc',
]
-env.ChromeTestProgram('selenium_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('selenium_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/selenium/selenium_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{E3749617-BA3D-4230-B54C-B758E56D9FA5}')
diff --git a/chrome/test/startup/startup_tests.scons b/chrome/test/startup/startup_tests.scons
index 5ff685e..8f1faa0 100644
--- a/chrome/test/startup/startup_tests.scons
+++ b/chrome/test/startup/startup_tests.scons
@@ -67,4 +67,26 @@ input_files = [
'startup_test.cc',
]
-env.ChromeTestProgram('startup_tests', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('startup_tests', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/startup/startup_tests.vcproj',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{D3E6C0FD-54C7-4FF2-9AE1-72F2DAFD820C}')
diff --git a/chrome/test/tab_switching/tab_switching_test.scons b/chrome/test/tab_switching/tab_switching_test.scons
index f4e63e9..da0b296 100644
--- a/chrome/test/tab_switching/tab_switching_test.scons
+++ b/chrome/test/tab_switching/tab_switching_test.scons
@@ -69,5 +69,28 @@ input_files = [
#"..\..\Debug\obj\tab_switching_test\precompiled_wtl.obj"
-env.ChromeTestProgram('tab_switching_test', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('tab_switching_test', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/test/tab_switching/tab_switching.vcproj',
+ name='tab_switching_test',
+ dependencies = [
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/test/ui/ui_tests.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{A34770EA-A574-43E8-9327-F79C04770E98}')
diff --git a/chrome/test/ui/ui_tests.scons b/chrome/test/ui/ui_tests.scons
index 53113482..0654579 100644
--- a/chrome/test/ui/ui_tests.scons
+++ b/chrome/test/ui/ui_tests.scons
@@ -129,4 +129,37 @@ if env.Bit('windows'):
'$CHROME_DIR/browser/views/find_bar_win_uitest.cc',
])
-env.ChromeTestProgram('ui_tests', ui_test_files)
+ env.ChromeTestProgram('ui_tests', ui_test_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/ui/ui_tests.vcproj',
+ dependencies = [
+ ('$WEBKIT_DIR/glue/plugins/test/' +
+ 'npapi_test_plugin.vcproj'),
+ '$CHROME_DIR/test/automation/automation.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/app/chrome_exe.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/app/locales/he.vcproj',
+ '$CHROME_DIR/app/locales/da.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ ('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' +
+ 'npapi_layout_test_plugin.vcproj'),
+ '$TESTING_DIR/gtest.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ('$CHROME_DIR/test/security_tests/' +
+ 'security_tests.vcproj'),
+ '$CHROME_DIR/app/locales/zh-TW.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ ],
+ guid='{76235B67-1C27-4627-8A33-4B2E1EF93EDE}')
diff --git a/chrome/test/unit/unit_tests.scons b/chrome/test/unit/unit_tests.scons
index 3c25fb7..f198e5c 100644
--- a/chrome/test/unit/unit_tests.scons
+++ b/chrome/test/unit/unit_tests.scons
@@ -251,3 +251,49 @@ if not env.Bit('mac'):
i = env.Install('$TARGET_ROOT', unit_tests)
Alias('chrome', i)
+
+env.ChromeMSVSProject('$CHROME_DIR/test/unit/unittests.vcproj',
+ name='unit_tests',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$CHROME_DIR/test/chrome_plugin/test_chrome_plugin.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$CHROME_DIR/browser/resources/browser_resources.vcproj',
+ '$RLZ_DIR/rlz.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$CHROME_DIR/app/locales/en-US.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ '$CHROME_DIR/app/theme/theme_dll.vcproj',
+ ],
+ guid='{ECFC2BEC-9FC0-4AD9-9649-5F26793F65FC}')
diff --git a/chrome/third_party/hunspell/SConscript b/chrome/third_party/hunspell/SConscript
index 8941451..7cc57e3 100644
--- a/chrome/third_party/hunspell/SConscript
+++ b/chrome/third_party/hunspell/SConscript
@@ -85,7 +85,6 @@ input_files = [
env.ChromeStaticLibrary('hunspell', input_files)
-
dictionaries = [
'dictionaries/en-US-1-1.bdic',
'dictionaries/en-US.dic',
@@ -94,3 +93,6 @@ dictionaries = [
i = env.Install('$DESTINATION_ROOT/Dictionaries', dictionaries)
env.Alias('chrome_Dictionaries', i)
+
+env.ChromeMSVSProject('$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ guid='{D5E8DCB2-9C61-446F-8BEE-B18CA0E0936E}')
diff --git a/chrome/tools/convert_dict/convert_dict.scons b/chrome/tools/convert_dict/convert_dict.scons
index bec1668..790a40f 100644
--- a/chrome/tools/convert_dict/convert_dict.scons
+++ b/chrome/tools/convert_dict/convert_dict.scons
@@ -33,5 +33,14 @@ input_files = [
'$CHROME_DIR/third_party/hunspell/google/bdict_writer.cc',
]
-env.ChromeProgram('convert_dict', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeProgram('convert_dict', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/tools/convert_dict/convert_dict.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ ],
+ guid='{42ECD5EC-722F-41DE-B6B8-83764C8016DF}')
diff --git a/chrome/tools/crash_service/crash_service.scons b/chrome/tools/crash_service/crash_service.scons
index b106369..78bce69 100644
--- a/chrome/tools/crash_service/crash_service.scons
+++ b/chrome/tools/crash_service/crash_service.scons
@@ -47,5 +47,19 @@ input_files = [
'crash_service.cc',
]
-env.ChromeProgram('crash_service', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeProgram('crash_service', input_files)
+env.ChromeMSVSProject('$CHROME_DIR/tools/crash_service/crash_service.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BREAKPAD_DIR/breakpad_sender.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ],
+ guid='{89C1C190-A5D1-4EC4-BD6A-67FF2195C7CC}')
diff --git a/chrome/tools/perf/flush_cache/flush_cache.scons b/chrome/tools/perf/flush_cache/flush_cache.scons
index 88c6ee6..9e90c34 100644
--- a/chrome/tools/perf/flush_cache/flush_cache.scons
+++ b/chrome/tools/perf/flush_cache/flush_cache.scons
@@ -41,3 +41,10 @@ input_files = [
]
env.ChromeTestProgram('flush_cache', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/tools/perf/flush_cache/flush_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ ],
+ guid='{4539AFB3-B8DC-47F3-A491-6DAC8FD26657}')
diff --git a/chrome/tools/profiles/generate_profile.scons b/chrome/tools/profiles/generate_profile.scons
index 533dc48..e6eee04 100644
--- a/chrome/tools/profiles/generate_profile.scons
+++ b/chrome/tools/profiles/generate_profile.scons
@@ -65,4 +65,45 @@ input_files = [
'generate_profile.cc',
]
-env.ChromeTestProgram('generate_profile', input_files)
+# TODO(port):
+if env.Bit('windows'):
+ env.ChromeTestProgram('generate_profile', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/tools/profiles/generate_profile.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$CHROME_DIR/plugin/plugin.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$CHROME_DIR/browser/debugger/debugger.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$CHROME_DIR/browser/browser.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$CHROME_DIR/views/views.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$CHROME_DIR/common/common.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$CHROME_DIR/renderer/renderer.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$CHROME_DIR/third_party/hunspell/hunspell.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$CHROME_DIR/installer/util/util.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$CHROME_DIR/browser/views/browser_views.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+
+ ],
+ guid='{2E969AE9-7B12-4EDB-8E8B-48C7AE7BE357}')
diff --git a/chrome/tools/test/image_diff/image_diff.scons b/chrome/tools/test/image_diff/image_diff.scons
index 7451bfe..69b691a 100644
--- a/chrome/tools/test/image_diff/image_diff.scons
+++ b/chrome/tools/test/image_diff/image_diff.scons
@@ -47,3 +47,14 @@ input_files = [
]
env.ChromeTestProgram('image_diff', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/tools/test/image_diff/image_diff.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ ],
+ guid='{50B079C7-CD01-42D3-B8C4-9F8D9322E822}')
diff --git a/chrome/views/SConscript b/chrome/views/SConscript
index 4221600..d415f0f 100644
--- a/chrome/views/SConscript
+++ b/chrome/views/SConscript
@@ -93,3 +93,9 @@ input_files = [
]
env.ChromeStaticLibrary('views', input_files)
+
+env.ChromeMSVSProject('$CHROME_DIR/views/views.vcproj',
+ dependencies = [
+ '$CHROME_DIR/app/generated_resources.vcproj',
+ ],
+ guid='{6F9258E5-294F-47B2-919D-17FFE7A8B751}')
diff --git a/google_update/SConscript b/google_update/SConscript
index fcd57fcf..916b3cb 100644
--- a/google_update/SConscript
+++ b/google_update/SConscript
@@ -4,5 +4,9 @@
Import('env')
-env.TypeLibrary('google_update_idl')
+# TODO(port):
+if env.Bit('windows'):
+ env.TypeLibrary('google_update_idl')
+env.ChromeMSVSProject('$GOOGLE_UPDATE_DIR/ondemand_updates.vcproj',
+ guid='{4052059A-D72B-4183-B5C2-9D1B099E9E35}')
diff --git a/media/media_lib.scons b/media/media_lib.scons
index a5d26dd..c6061ce 100644
--- a/media/media_lib.scons
+++ b/media/media_lib.scons
@@ -46,3 +46,6 @@ if env.Bit('posix'):
])
env.ChromeStaticLibrary('media', input_files)
+
+env.ChromeMSVSProject('$MEDIA_DIR/build/media.vcproj',
+ guid='{6AE76406-B03B-11DD-94B1-80B556D89593}')
diff --git a/media/media_unittests.scons b/media/media_unittests.scons
index 22b1ecf..40f348d 100644
--- a/media/media_unittests.scons
+++ b/media/media_unittests.scons
@@ -52,3 +52,11 @@ input_files = [
]
env.ChromeTestProgram('media_unittests', input_files)
+
+env.ChromeMSVSProject('$MEDIA_DIR/build/media_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$MEDIA_DIR/build/media.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{C8C6183C-B03C-11DD-B471-DFD256D89593}')
diff --git a/net/crash_cache.scons b/net/crash_cache.scons
index 496f7b0..0aab3ec 100644
--- a/net/crash_cache.scons
+++ b/net/crash_cache.scons
@@ -30,5 +30,14 @@ input_files = [
]
-if not env.Bit('mac'):
+if not env.AnyBits('linux', 'mac'):
+ # TODO(port): port to linux and mac?
env.ChromeTestProgram('crash_cache', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/crash_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ ],
+ guid='{B0EE0599-2913-46A0-A847-A3EC813658D3}')
diff --git a/net/dump_cache.scons b/net/dump_cache.scons
index efbfbd5..31d34bc 100644
--- a/net/dump_cache.scons
+++ b/net/dump_cache.scons
@@ -1,35 +1,43 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-__doc__ = """
-Configuration the dump_cache{,.exe} executable.
-"""
-
-Import('env')
-
-env = env.Clone()
-
-env.ApplySConscript([
- '$BASE_DIR/using_base.scons',
- '$ICU38_DIR/using_icu38.scons',
- '$NET_DIR/using_net.scons',
-])
-
-if env.Bit('windows'):
- env.Prepend(
- CCFLAGS = [
- '/WX',
- ],
- )
-
-input_files = [
- 'tools/dump_cache/dump_cache.cc',
- 'tools/dump_cache/dump_files.cc',
- 'tools/dump_cache/upgrade.cc',
-]
-
-
-if env.Bit('windows'):
-
- env.ChromeTestProgram('dump_cache', input_files)
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration the dump_cache{,.exe} executable.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.ApplySConscript([
+ '$BASE_DIR/using_base.scons',
+ '$ICU38_DIR/using_icu38.scons',
+ '$NET_DIR/using_net.scons',
+])
+
+if env.Bit('windows'):
+ env.Prepend(
+ CCFLAGS = [
+ '/WX',
+ ],
+ )
+
+input_files = [
+ 'tools/dump_cache/dump_cache.cc',
+ 'tools/dump_cache/dump_files.cc',
+ 'tools/dump_cache/upgrade.cc',
+]
+
+
+if env.Bit('windows'):
+
+ env.ChromeTestProgram('dump_cache', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/dump_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ],
+ guid='{4A14E455-2B7C-4C0F-BCC2-35A9666C186F}')
diff --git a/net/net.scons b/net/net.scons
index 7f5f115b..4548b03 100644
--- a/net/net.scons
+++ b/net/net.scons
@@ -19,25 +19,11 @@ sconscript_files = [
'dump_cache.scons',
'net_lib.scons',
'net_perftests.scons',
+ 'net_resources.scons',
+ 'net_sln.scons',
'net_unittests.scons',
'stress_cache.scons',
+ 'tools/tld_cleanup/tld_cleanup.scons',
]
-if env.Bit('posix'):
- # Remove *.scons files whose targets still need to be ported.
- # TODO(port): delete files from this list as they get ported.
- to_be_ported = [
- 'crash_cache.scons',
- ]
- for remove in to_be_ported:
- sconscript_files.remove(remove)
-
-if env.Bit('windows'):
- # TODO: We need to port tld_cleanup before this will work on other
- # platforms.
- sconscript_files.extend([
- 'net_resources.scons',
- 'tools/tld_cleanup/tld_cleanup.scons',
- ])
-
SConscript(sconscript_files, exports=['env'])
diff --git a/net/net_lib.scons b/net/net_lib.scons
index 0cd3a15..75e33a7 100644
--- a/net/net_lib.scons
+++ b/net/net_lib.scons
@@ -170,3 +170,9 @@ if env.Bit('windows'):
input_files += [obj]
env.ChromeStaticLibrary('net', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/net.vcproj',
+ dependencies = [
+ '$NET_DIR/build/tld_cleanup.vcproj'
+ ],
+ guid='{326E9795-E760-410A-B69A-3F79DB3F5243}')
diff --git a/net/net_perftests.scons b/net/net_perftests.scons
index 667090e..686cfcd 100644
--- a/net/net_perftests.scons
+++ b/net/net_perftests.scons
@@ -48,3 +48,15 @@ input_files = [
if not env.Bit('mac'):
env.ChromeTestProgram('net_perftests', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/net_perftests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
+ guid='{AAC78796-B9A2-4CD9-BF89-09B03E92BF73}')
diff --git a/net/net_resources.scons b/net/net_resources.scons
index e884d52..c7dfc31 100644
--- a/net/net_resources.scons
+++ b/net/net_resources.scons
@@ -21,16 +21,18 @@ input_files = [
'tools/tld_cleanup/tld_cleanup.exe'
]
-# TODO: Need to figure out what to do with external resources on linux.
-# This dat file needed by net_resources is generated.
-tld_names_clean = env.Command('net/effective_tld_names_clean.dat',
+if env.Bit('windows'):
+ # TODO(port): Need to figure out what to do with external resources
+ # on linux (and mac?).
+ # This dat file needed by net_resources is generated.
+ tld_names_clean = env.Command('net/effective_tld_names_clean.dat',
input_files,
'${SOURCES[1]} ${SOURCES[0]} $TARGET')
-rc = env.Command('net_resources.rc',
- 'base/net_resources.rc',
- Copy('$TARGET', '$SOURCE'))
+ rc = env.Command('net_resources.rc',
+ 'base/net_resources.rc',
+ Copy('$TARGET', '$SOURCE'))
-env.Depends(rc, tld_names_clean)
+ env.Depends(rc, tld_names_clean)
-env.RES(rc)
+ env.RES(rc)
diff --git a/net/net_sln.scons b/net/net_sln.scons
new file mode 100644
index 0000000..7823d8d
--- /dev/null
+++ b/net/net_sln.scons
@@ -0,0 +1,74 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.sln.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Tool('MSVSNew')
+
+env.ChromeMSVSFolder('net dependencies',
+ name='dependencies',
+ entries = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
+ guid='{A04F65DF-D422-4E8F-B918-29EBA839363E}')
+
+env.ChromeMSVSFolder('net tools',
+ name='tools',
+ entries = [
+ '$NET_DIR/build/dump_cache.vcproj',
+ #'build/stress_cache.vcproj',
+ '$NET_DIR/build/crash_cache.vcproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ ],
+ guid='{E7D78B1F-F7D3-47CB-BF51-3957C646B406}')
+
+
+solution = env.ChromeMSVSSolution('net.sln',
+ entries = [
+ 'net dependencies',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$NET_DIR/build/net_unittests.vcproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ 'net tools',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$NET_DIR/build/net_perftests.vcproj',
+ '$NET_DIR/build/crash_cache.vcproj',
+ '$NET_DIR/build/stress_cache.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$NET_DIR/build/dump_cache.vcproj',
+
+ ],
+ variants = [
+ 'Debug|Win32',
+ 'Release|Win32',
+ ])
+
+env.AlwaysBuild(solution)
+
+i = env.Command('$CHROME_SRC_DIR/net/net.sln', solution,
+ Copy('$TARGET', '$SOURCE'))
+Alias('solutions', i)
diff --git a/net/net_unittests.scons b/net/net_unittests.scons
index f3457be..894a364 100644
--- a/net/net_unittests.scons
+++ b/net/net_unittests.scons
@@ -116,3 +116,17 @@ if env.Bit('mac'):
input_files = list(set(input_files) - set(to_be_ported_files))
env.ChromeTestProgram('net_unittests', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/net_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
+ guid='{E99DA267-BE90-4F45-88A1-6919DB2C7567}')
diff --git a/net/stress_cache.scons b/net/stress_cache.scons
index c4278c9..fdcd227 100644
--- a/net/stress_cache.scons
+++ b/net/stress_cache.scons
@@ -40,3 +40,12 @@ input_files = [
if not env.Bit('mac'):
env.ChromeTestProgram('stress_cache', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/stress_cache.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{B491C3A1-DE5F-4843-A1BB-AB8C4337187B}')
diff --git a/net/tools/tld_cleanup/tld_cleanup.scons b/net/tools/tld_cleanup/tld_cleanup.scons
index de9b0a0..882790f 100644
--- a/net/tools/tld_cleanup/tld_cleanup.scons
+++ b/net/tools/tld_cleanup/tld_cleanup.scons
@@ -28,4 +28,15 @@ input_files = [
'tld_cleanup.cc',
]
-env.ChromeProgram('tld_cleanup', input_files)
+if env.Bit('windows'):
+ # TODO(port): We need to port tld_cleanup before this will work on other
+ # platforms.
+ env.ChromeProgram('tld_cleanup', input_files)
+
+env.ChromeMSVSProject('$NET_DIR/build/tld_cleanup.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ ],
+ guid='{E13045CD-7E1F-4A41-9B18-8D288B2E7B41}')
diff --git a/rlz/SConscript b/rlz/SConscript
index 429f477..75c2ea7 100644
--- a/rlz/SConscript
+++ b/rlz/SConscript
@@ -8,3 +8,5 @@ env.Install('$TARGET_ROOT',
['binaries/rlz.dll',
'binaries/rlz_dll.pdb'])
+env.ChromeMSVSProject('$RLZ_DIR/rlz.vcproj',
+ guid='{BF4F447B-72B5-4059-BE1B-F94337B1F385}')
diff --git a/sandbox/sandbox.scons b/sandbox/sandbox.scons
index 22332e3..26920a3 100644
--- a/sandbox/sandbox.scons
+++ b/sandbox/sandbox.scons
@@ -16,6 +16,7 @@ env.Append(
sconscript_files = [
'src/sandbox_lib.scons',
+ 'sandbox_sln.scons',
'tests/common/sandbox_common.scons',
'tests/integration_tests/sbox_integration_tests.scons',
'tests/unit_tests/sbox_unittests.scons',
diff --git a/sandbox/sandbox_sln.scons b/sandbox/sandbox_sln.scons
new file mode 100644
index 0000000..9739155
--- /dev/null
+++ b/sandbox/sandbox_sln.scons
@@ -0,0 +1,142 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.sln.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Tool('MSVSNew')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/sandbox_poc/sandbox_poc.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$SANDBOX_DIR/sandbox_poc/pocdll/pocdll.vcproj',
+ ],
+ guid='{CF757839-F2A1-417C-8F25-DCAE480020F1}')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/sandbox_poc/pocdll/pocdll.vcproj',
+ guid='{AE5BFB87-850E-4454-B01D-58E7D8BAC224}')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/src/sandbox.vcproj',
+ guid='{881F6A97-D539-4C48-B401-DF04385B2343}')
+
+env.ChromeMSVSProject(('$SANDBOX_DIR/tests/integration_tests/' +
+ 'sbox_integration_tests.vcproj'),
+ dependencies = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{542D4B3B-98D4-4233-B68D-0103891508C6}')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/tests/unit_tests/sbox_unittests.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{883553BE-2A9D-418C-A121-61FE1DFBC562}')
+
+env.ChromeMSVSProject(('$SANDBOX_DIR/tests/validation_tests/' +
+ 'sbox_validation_tests.vcproj'),
+ dependencies = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{B9CC7B0D-145A-49C2-B887-84E43CFA0F27}')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/tools/finder/finder.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ ],
+ guid='{ACDC2E06-0366-41A4-A646-C37E130A605D}')
+
+env.ChromeMSVSProject('$SANDBOX_DIR/tools/launcher/launcher.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ ],
+ guid='{386FA217-FBC2-4461-882D-CDAD221ED800}')
+
+
+dependencies = env.ChromeMSVSFolder('sandbox_dependencies',
+ name='dependencies',
+ entries = [
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ guid='{BCE54389-D18D-48B9-977E-9D1998200F63}')
+
+proof_of_concept = env.ChromeMSVSFolder('proof_of_concept',
+ entries = [
+ ('$SANDBOX_DIR/sandbox_poc/pocdll/' +
+ 'pocdll.vcproj'),
+ ('$SANDBOX_DIR/sandbox_poc/' +
+ 'sandbox_poc.vcproj'),
+ ],
+ guid='{B607BE7B-3555-422C-A40B-28E73C0B5E24}')
+
+tests = env.ChromeMSVSFolder('tests',
+ entries = [
+ ('$SANDBOX_DIR/tests/integration_tests/' +
+ 'sbox_integration_tests.vcproj'),
+ ('$SANDBOX_DIR/tests/unit_tests/' +
+ 'sbox_unittests.vcproj'),
+ ('$SANDBOX_DIR/tests/validation_tests/' +
+ 'sbox_validation_tests.vcproj'),
+ ],
+ guid='{F7A3B82E-B8B4-4FDF-BC8E-FEC9398F57ED}')
+
+tools = env.ChromeMSVSFolder('sandbox_tools',
+ name='tools',
+ entries = [
+ '$SANDBOX_DIR/tools/launcher/launcher.vcproj',
+ '$SANDBOX_DIR/tools/finder/finder.vcproj',
+ ],
+ guid='{7F36EE20-5016-4051-B0D7-42824CDA0291}')
+
+
+solution = env.ChromeMSVSSolution('$SANDBOX_DIR/sandbox.sln',
+ entries = [
+ '$SANDBOX_DIR/src/sandbox.vcproj',
+ ('$SANDBOX_DIR/tests/unit_tests/' +
+ 'sbox_unittests.vcproj'),
+ tests,
+ ('$SANDBOX_DIR/tests/validation_tests/' +
+ 'sbox_validation_tests.vcproj'),
+ dependencies,
+ '$BASE_DIR/build/debug_message.vcproj',
+ tools,
+ proof_of_concept,
+ '$SANDBOX_DIR/sandbox_poc/sandbox_poc.vcproj',
+ '$SANDBOX_DIR/sandbox_poc/pocdll/pocdll.vcproj',
+ '$SANDBOX_DIR/tools/finder/finder.vcproj',
+ '$SANDBOX_DIR/tools/launcher/launcher.vcproj',
+ ('$SANDBOX_DIR/tests/integration_tests/' +
+ 'sbox_integration_tests.vcproj'),
+ '$BASE_DIR/build/base.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ ],
+ variants = [
+ 'Debug|Win32',
+ 'Release|Win32',
+ ],
+ websiteProperties=False)
+
+env.AlwaysBuild(solution)
+
+i = env.Command('$CHROME_SRC_DIR/sandbox/sandbox.sln', solution,
+ Copy('$TARGET', '$SOURCE'))
+Alias('solutions', i)
diff --git a/sdch/SConscript b/sdch/SConscript
index e931984..eaacaa3 100644
--- a/sdch/SConscript
+++ b/sdch/SConscript
@@ -1,122 +1,125 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import re
-
-Import('env')
-
-env = env.Clone(OPEN_VCDIFF_DIR='open-vcdiff')
-
-cpppath = [
- '$OPEN_VCDIFF_DIR/src',
-]
-
-if env.Bit('windows'):
- cpppath.append('$OPEN_VCDIFF_DIR/vsprojects')
-
-env.Prepend(CPPPATH = cpppath)
-
-input_files = [
- '$OPEN_VCDIFF_DIR/src/addrcache.cc',
- '$OPEN_VCDIFF_DIR/src/adler32.c',
- '$OPEN_VCDIFF_DIR/src/blockhash.cc',
- '$OPEN_VCDIFF_DIR/src/codetable.cc',
- '$OPEN_VCDIFF_DIR/src/decodetable.cc',
- '$OPEN_VCDIFF_DIR/src/encodetable.cc',
- '$OPEN_VCDIFF_DIR/src/headerparser.cc',
- '$OPEN_VCDIFF_DIR/src/logging.cc',
- '$OPEN_VCDIFF_DIR/src/varint_bigendian.cc',
- '$OPEN_VCDIFF_DIR/src/vcdecoder.cc',
- '$OPEN_VCDIFF_DIR/src/vcdiffengine.cc',
-]
-
-env.ChromeStaticLibrary('sdch', input_files)
-
-if env.Bit('posix'):
-
- # Generate a target config.h file from a source config.h.in file.
- #
- # The list of defines has been taken empirically from Autoconf
- # (./configure) runs on Mac OS X and Ubuntu Hardy.
-
- defines = [
- 'HAVE_DLFCN_H',
- 'HAVE_FNMATCH_H',
- 'HAVE_GETOPT_H',
- 'HAVE_GETTIMEOFDAY',
- 'HAVE_INTTYPES_H',
- 'HAVE_MEMORY_H',
- 'HAVE_MPROTECT',
- 'HAVE_PTHREAD',
- 'HAVE_STDINT_H',
- 'HAVE_STDLIB_H',
- 'HAVE_STRINGS_H',
- 'HAVE_STRING_H',
- 'HAVE_STRTOLL',
- 'HAVE_STRTOQ',
- 'HAVE_SYS_MMAN_H',
- 'HAVE_SYS_STAT_H',
- 'HAVE_SYS_TIME_H',
- 'HAVE_SYS_TYPES_H',
- 'HAVE_UINT16_T',
- 'HAVE_UNISTD_H',
- 'HAVE_U_INT16_T',
- 'HAVE___ATTRIBUTE__',
- ('PACKAGE', '"open-vcdiff"'),
- ('PACKAGE_BUGREPORT', '"opensource@google.com"'),
- ('PACKAGE_NAME', '"open-vcdiff"'),
- ('PACKAGE_STRING', '"open-vcdiff 0.1"'),
- ('PACKAGE_TARNAME', '"open-vcdiff"'),
- ('PACKAGE_VERSION', '"0.1"'),
- ('VERSION', '"0.1"'),
- 'STDC_HEADERS',
- ]
-
- if env.Bit('linux'):
- defines.extend([
- 'HAVE_MALLOC_H',
- 'HAVE_MEMALIGN',
- 'HAVE_POSIX_MEMALIGN',
- ])
-
- if env.Bit('mac'):
- defines.extend([
- 'HAVE_WORKING_KQUEUE',
- ])
-
- def AutoConfig(target, source, env):
- """
- Action to generate a config.h file from an Autotools config.h.in file,
- given the list of definitions in the DEFINES construction variable.
-
- Each entry in DEFINES is either a string, in which case it
- will be enabled with a value of 1, or a tuple, in which case
- the first element is the #define name and the second its value.
-
- Any leftover #undef lines get commented out.
- """
- contents = open(str(source[0]), 'r').read()
-
- for d in env['DEFINES']:
- if isinstance(d, tuple):
- define, value = d
- else:
- define = d
- value = 1
- undef = '^#undef %s$' % re.escape(define)
- definition = '#define %s %s' % (define, value)
- contents = re.sub(undef, definition, contents)
-
- undef_re = re.compile(r'^(#undef .*)$', re.M)
- contents = undef_re.sub(r'/* \1 */', contents)
-
- header = '/* src/config.h. Generated by SCons. */\n'
- open(str(target[0]), 'w').write(header + contents)
-
- # varlist['DEFINES'] below makes the target config.h file depend
- # on the list of definitions in the passed-in $DEFINES variable.
- env.Command('$OPEN_VCDIFF_DIR/src/config.h',
- '$OPEN_VCDIFF_DIR/src/config.h.in',
- Action(AutoConfig, varlist=['DEFINES']),
- DEFINES=defines)
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import re
+
+Import('env')
+
+env = env.Clone(OPEN_VCDIFF_DIR='open-vcdiff')
+
+cpppath = [
+ '$OPEN_VCDIFF_DIR/src',
+]
+
+if env.Bit('windows'):
+ cpppath.append('$OPEN_VCDIFF_DIR/vsprojects')
+
+env.Prepend(CPPPATH = cpppath)
+
+input_files = [
+ '$OPEN_VCDIFF_DIR/src/addrcache.cc',
+ '$OPEN_VCDIFF_DIR/src/adler32.c',
+ '$OPEN_VCDIFF_DIR/src/blockhash.cc',
+ '$OPEN_VCDIFF_DIR/src/codetable.cc',
+ '$OPEN_VCDIFF_DIR/src/decodetable.cc',
+ '$OPEN_VCDIFF_DIR/src/encodetable.cc',
+ '$OPEN_VCDIFF_DIR/src/headerparser.cc',
+ '$OPEN_VCDIFF_DIR/src/logging.cc',
+ '$OPEN_VCDIFF_DIR/src/varint_bigendian.cc',
+ '$OPEN_VCDIFF_DIR/src/vcdecoder.cc',
+ '$OPEN_VCDIFF_DIR/src/vcdiffengine.cc',
+]
+
+env.ChromeStaticLibrary('sdch', input_files)
+
+env.ChromeMSVSProject('$SDCH_DIR/sdch.vcproj',
+ guid='{F54ABC59-5C00-414A-A9BA-BAF26D1699F0}')
+
+if env.Bit('posix'):
+
+ # Generate a target config.h file from a source config.h.in file.
+ #
+ # The list of defines has been taken empirically from Autoconf
+ # (./configure) runs on Mac OS X and Ubuntu Hardy.
+
+ defines = [
+ 'HAVE_DLFCN_H',
+ 'HAVE_FNMATCH_H',
+ 'HAVE_GETOPT_H',
+ 'HAVE_GETTIMEOFDAY',
+ 'HAVE_INTTYPES_H',
+ 'HAVE_MEMORY_H',
+ 'HAVE_MPROTECT',
+ 'HAVE_PTHREAD',
+ 'HAVE_STDINT_H',
+ 'HAVE_STDLIB_H',
+ 'HAVE_STRINGS_H',
+ 'HAVE_STRING_H',
+ 'HAVE_STRTOLL',
+ 'HAVE_STRTOQ',
+ 'HAVE_SYS_MMAN_H',
+ 'HAVE_SYS_STAT_H',
+ 'HAVE_SYS_TIME_H',
+ 'HAVE_SYS_TYPES_H',
+ 'HAVE_UINT16_T',
+ 'HAVE_UNISTD_H',
+ 'HAVE_U_INT16_T',
+ 'HAVE___ATTRIBUTE__',
+ ('PACKAGE', '"open-vcdiff"'),
+ ('PACKAGE_BUGREPORT', '"opensource@google.com"'),
+ ('PACKAGE_NAME', '"open-vcdiff"'),
+ ('PACKAGE_STRING', '"open-vcdiff 0.1"'),
+ ('PACKAGE_TARNAME', '"open-vcdiff"'),
+ ('PACKAGE_VERSION', '"0.1"'),
+ ('VERSION', '"0.1"'),
+ 'STDC_HEADERS',
+ ]
+
+ if env.Bit('linux'):
+ defines.extend([
+ 'HAVE_MALLOC_H',
+ 'HAVE_MEMALIGN',
+ 'HAVE_POSIX_MEMALIGN',
+ ])
+
+ if env.Bit('mac'):
+ defines.extend([
+ 'HAVE_WORKING_KQUEUE',
+ ])
+
+ def AutoConfig(target, source, env):
+ """
+ Action to generate a config.h file from an Autotools config.h.in file,
+ given the list of definitions in the DEFINES construction variable.
+
+ Each entry in DEFINES is either a string, in which case it
+ will be enabled with a value of 1, or a tuple, in which case
+ the first element is the #define name and the second its value.
+
+ Any leftover #undef lines get commented out.
+ """
+ contents = open(str(source[0]), 'r').read()
+
+ for d in env['DEFINES']:
+ if isinstance(d, tuple):
+ define, value = d
+ else:
+ define = d
+ value = 1
+ undef = '^#undef %s$' % re.escape(define)
+ definition = '#define %s %s' % (define, value)
+ contents = re.sub(undef, definition, contents)
+
+ undef_re = re.compile(r'^(#undef .*)$', re.M)
+ contents = undef_re.sub(r'/* \1 */', contents)
+
+ header = '/* src/config.h. Generated by SCons. */\n'
+ open(str(target[0]), 'w').write(header + contents)
+
+ # varlist['DEFINES'] below makes the target config.h file depend
+ # on the list of definitions in the passed-in $DEFINES variable.
+ env.Command('$OPEN_VCDIFF_DIR/src/config.h',
+ '$OPEN_VCDIFF_DIR/src/config.h.in',
+ Action(AutoConfig, varlist=['DEFINES']),
+ DEFINES=defines)
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py
index e93dbea..01b8fcc 100644
--- a/site_scons/site_tools/chromium_builders.py
+++ b/site_scons/site_tools/chromium_builders.py
@@ -40,5 +40,23 @@ def generate(env):
return env.ComponentObject(*args, **kw)
env.AddMethod(ChromeObject)
+ def ChromeMSVSFolder(env, *args, **kw):
+ if env.Bit('msvs'):
+ return env.MSVSFolder(*args, **kw)
+ return []
+ env.AddMethod(ChromeMSVSFolder)
+
+ def ChromeMSVSProject(env, *args, **kw):
+ if env.Bit('msvs'):
+ return env.MSVSProject(*args, **kw)
+ return []
+ env.AddMethod(ChromeMSVSProject)
+
+ def ChromeMSVSSolution(env, *args, **kw):
+ if env.Bit('msvs'):
+ return env.MSVSSolution(*args, **kw)
+ return []
+ env.AddMethod(ChromeMSVSSolution)
+
def exists(env):
return True
diff --git a/skia/SConscript b/skia/SConscript
index b09299d..7401474 100644
--- a/skia/SConscript
+++ b/skia/SConscript
@@ -211,3 +211,5 @@ if env.Bit('windows'):
env.ChromeStaticLibrary('skia', input_files)
+env.ChromeMSVSProject('$SKIA_DIR/skia.vcproj',
+ guid='{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}')
diff --git a/testing/SConscript.gtest b/testing/SConscript.gtest
index ec82e4b..b8b3799 100644
--- a/testing/SConscript.gtest
+++ b/testing/SConscript.gtest
@@ -1,35 +1,37 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-
-env.Prepend(
- CPPPATH = [
- '$GTEST_DIR',
- '$GTEST_DIR/include',
- ],
-)
-
-if env.Bit('windows'):
- env.Append(
- CCFLAGS = [
- '/TP',
-
- '/WX',
- '/Wp64',
- ],
- )
-
-input_files = [
- 'gtest/src/gtest-death-test.cc',
- 'gtest/src/gtest-filepath.cc',
- 'gtest/src/gtest-port.cc',
- 'gtest/src/gtest.cc',
- 'multiprocess_func_list.cc',
-]
-
-env.ChromeStaticLibrary('gtest', input_files)
-
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+Import('env')
+
+env = env.Clone()
+
+env.Prepend(
+ CPPPATH = [
+ '$GTEST_DIR',
+ '$GTEST_DIR/include',
+ ],
+)
+
+if env.Bit('windows'):
+ env.Append(
+ CCFLAGS = [
+ '/TP',
+
+ '/WX',
+ '/Wp64',
+ ],
+ )
+
+input_files = [
+ 'gtest/src/gtest-death-test.cc',
+ 'gtest/src/gtest-filepath.cc',
+ 'gtest/src/gtest-port.cc',
+ 'gtest/src/gtest.cc',
+ 'multiprocess_func_list.cc',
+]
+
+env.ChromeStaticLibrary('gtest', input_files)
+
+env.ChromeMSVSProject('$TESTING_DIR/gtest.vcproj',
+ guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}')
diff --git a/third_party/bsdiff/bsdiff.scons b/third_party/bsdiff/bsdiff.scons
index 9705f51..d186d19 100644
--- a/third_party/bsdiff/bsdiff.scons
+++ b/third_party/bsdiff/bsdiff.scons
@@ -17,3 +17,10 @@ input_files = [
]
env.ChromeProgram('bsdiff', input_files)
+
+env.ChromeMSVSProject('$BSDIFF_DIR/bsdiff.vcproj',
+ dependencies = [
+ '$LZMA_SDK_DIR/7z_C.vcproj',
+ '$BSPATCH_DIR/bspatch.vcproj',
+ ],
+ guid='{E1D0B89E-257B-4BCA-A0C6-A2CD997A2FDC}')
diff --git a/third_party/bspatch/bspatch.scons b/third_party/bspatch/bspatch.scons
index 06db297..97cf01c 100644
--- a/third_party/bspatch/bspatch.scons
+++ b/third_party/bspatch/bspatch.scons
@@ -28,3 +28,6 @@ input_files = [
]
env.ChromeStaticLibrary('bspatch', input_files)
+
+env.ChromeMSVSProject('$BSPATCH_DIR/bspatch.vcproj',
+ guid='{D7ED06E8-6138-4CE3-A906-5EF1D9C804E0}')
diff --git a/third_party/bzip2/bzip2.scons b/third_party/bzip2/bzip2.scons
index 7b1a57a..843de84 100644
--- a/third_party/bzip2/bzip2.scons
+++ b/third_party/bzip2/bzip2.scons
@@ -39,3 +39,6 @@ input_files = [
]
env.ChromeStaticLibrary('bzip2', input_files)
+
+env.ChromeMSVSProject('$BZIP2_DIR/bzip2.vcproj',
+ guid='{2A70CBF0-847E-4E3A-B926-542A656DC7FE}')
diff --git a/third_party/libjpeg/libjpeg.scons b/third_party/libjpeg/libjpeg.scons
index 16b6bc3..0cc3919 100644
--- a/third_party/libjpeg/libjpeg.scons
+++ b/third_party/libjpeg/libjpeg.scons
@@ -100,3 +100,6 @@ input_files = [
]
env.ChromeStaticLibrary('libjpeg', input_files)
+
+env.ChromeMSVSProject('$LIBJPEG_DIR/libjpeg.vcproj',
+ guid='{238CE175-76CE-4A25-A676-69D115885601}')
diff --git a/third_party/libpng/libpng.scons b/third_party/libpng/libpng.scons
index 9187b5d..8b14dcf 100644
--- a/third_party/libpng/libpng.scons
+++ b/third_party/libpng/libpng.scons
@@ -60,3 +60,6 @@ input_files = [
]
env.ChromeStaticLibrary('libpng', input_files)
+
+env.ChromeMSVSProject('$LIBPNG_DIR/libpng.vcproj',
+ guid='{C564F145-9172-42C3-BFCB-6014CA97DBCD}')
diff --git a/third_party/libxml/libxml.scons b/third_party/libxml/libxml.scons
index d8ba51f..63cd173 100644
--- a/third_party/libxml/libxml.scons
+++ b/third_party/libxml/libxml.scons
@@ -115,6 +115,15 @@ input_files = [
env.ChromeStaticLibrary('libxml', input_files)
+env.ChromeMSVSProject('$LIBXML_DIR/build/libxml.vcproj',
+ dependencies = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ ],
+ guid='{F9810DE8-CBC3-4605-A7B1-ECA2D5292FD7}')
+
+env.ChromeMSVSProject('$LIBXML_DIR/build/libxml_config.vcproj',
+ guid='{31D88CBF-DC28-47A8-8838-BF81D528EE74}')
+
if env.Bit('windows'):
config_files = [
diff --git a/third_party/libxslt/libxslt.scons b/third_party/libxslt/libxslt.scons
index 6009d9f..f40bf8f 100644
--- a/third_party/libxslt/libxslt.scons
+++ b/third_party/libxslt/libxslt.scons
@@ -87,6 +87,16 @@ input_files = [
env.ChromeStaticLibrary('libxslt', input_files)
+env.ChromeMSVSProject('$LIBXSLT_DIR/build/libxslt.vcproj',
+ dependencies = [
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ ],
+ guid='{FC0E1FD0-5DD7-4041-A1C9-CD3C376E4EED}')
+
+env.ChromeMSVSProject('$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ guid='{4BD929D4-494B-4EE8-91F6-FD0277A51D2B}')
+
if env.Bit('windows'):
config_files = [
diff --git a/third_party/lzma_sdk/lzma_sdk.scons b/third_party/lzma_sdk/lzma_sdk.scons
index 82da4b4..fc16f9e 100644
--- a/third_party/lzma_sdk/lzma_sdk.scons
+++ b/third_party/lzma_sdk/lzma_sdk.scons
@@ -47,3 +47,7 @@ input_files = [
]
env.ChromeStaticLibrary('lzma_sdk', input_files)
+
+env.ChromeMSVSProject('$LZMA_SDK_DIR/7z_C.vcproj',
+ name='lzma_sdk',
+ guid='{B84553C8-5676-427B-B3E4-23DDDC4DBC7B}')
diff --git a/third_party/modp_b64/modp_b64.scons b/third_party/modp_b64/modp_b64.scons
index edf9650b..bdc1162 100644
--- a/third_party/modp_b64/modp_b64.scons
+++ b/third_party/modp_b64/modp_b64.scons
@@ -23,3 +23,6 @@ input_files = [
]
env.ChromeStaticLibrary('modp_b64', input_files)
+
+env.ChromeMSVSProject('$MODP_B64_DIR/modp_b64.vcproj',
+ guid='{7100F41F-868D-4E99-80A2-AF8E6574749D}')
diff --git a/third_party/scons/scons-local/SCons/Environment.py b/third_party/scons/scons-local/SCons/Environment.py
index a08dce0..55d3165 100644
--- a/third_party/scons/scons-local/SCons/Environment.py
+++ b/third_party/scons/scons-local/SCons/Environment.py
@@ -1,2252 +1,2253 @@
-"""SCons.Environment
-
-Base class for construction Environments. These are
-the primary objects used to communicate dependency and
-construction information to the build engine.
-
-Keyword arguments supplied when the construction Environment
-is created are construction variables used to initialize the
-Environment
-"""
-
-#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be included
-# in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
-# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-
-__revision__ = "src/engine/SCons/Environment.py 3603 2008/10/10 05:46:45 scons"
-
-
-import copy
-import os
-import sys
-import re
-import shlex
-import string
-from UserDict import UserDict
-
-import SCons.Action
-import SCons.Builder
-from SCons.Debug import logInstanceCreation
-import SCons.Defaults
-import SCons.Errors
-import SCons.Memoize
-import SCons.Node
-import SCons.Node.Alias
-import SCons.Node.FS
-import SCons.Node.Python
-import SCons.Platform
-import SCons.SConsign
-import SCons.Subst
-import SCons.Tool
-import SCons.Util
-import SCons.Warnings
-
-class _Null:
- pass
-
-_null = _Null
-
-_warn_copy_deprecated = True
-_warn_source_signatures_deprecated = True
-_warn_target_signatures_deprecated = True
-
-CleanTargets = {}
-CalculatorArgs = {}
-
-semi_deepcopy = SCons.Util.semi_deepcopy
-
-# Pull UserError into the global name space for the benefit of
-# Environment().SourceSignatures(), which has some import statements
-# which seem to mess up its ability to reference SCons directly.
-UserError = SCons.Errors.UserError
-
-def alias_builder(env, target, source):
- pass
-
-AliasBuilder = SCons.Builder.Builder(action = alias_builder,
- target_factory = SCons.Node.Alias.default_ans.Alias,
- source_factory = SCons.Node.FS.Entry,
- multi = 1,
- is_explicit = None,
- name='AliasBuilder')
-
-def apply_tools(env, tools, toolpath):
- # Store the toolpath in the Environment.
- if toolpath is not None:
- env['toolpath'] = toolpath
-
- if not tools:
- return
- # Filter out null tools from the list.
- for tool in filter(None, tools):
- if SCons.Util.is_List(tool) or type(tool)==type(()):
- toolname = tool[0]
- toolargs = tool[1] # should be a dict of kw args
- tool = apply(env.Tool, [toolname], toolargs)
- else:
- env.Tool(tool)
-
-# These names are controlled by SCons; users should never set or override
-# them. This warning can optionally be turned off, but scons will still
-# ignore the illegal variable names even if it's off.
-reserved_construction_var_names = \
- ['TARGET', 'TARGETS', 'SOURCE', 'SOURCES']
-
-def copy_non_reserved_keywords(dict):
- result = semi_deepcopy(dict)
- for k in result.keys():
- if k in reserved_construction_var_names:
- SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning,
- "Ignoring attempt to set reserved variable `%s'" % k)
- del result[k]
- return result
-
-def _set_reserved(env, key, value):
- msg = "Ignoring attempt to set reserved variable `%s'" % key
- SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning, msg)
-
-def _set_BUILDERS(env, key, value):
- try:
- bd = env._dict[key]
- for k in bd.keys():
- del bd[k]
- except KeyError:
- bd = BuilderDict(kwbd, env)
- env._dict[key] = bd
- bd.update(value)
-
-def _del_SCANNERS(env, key):
- del env._dict[key]
- env.scanner_map_delete()
-
-def _set_SCANNERS(env, key, value):
- env._dict[key] = value
- env.scanner_map_delete()
-
-
-
-# The following is partly based on code in a comment added by Peter
-# Shannon at the following page (there called the "transplant" class):
-#
-# ASPN : Python Cookbook : Dynamically added methods to a class
-# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81732
-#
-# We had independently been using the idiom as BuilderWrapper, but
-# factoring out the common parts into this base class, and making
-# BuilderWrapper a subclass that overrides __call__() to enforce specific
-# Builder calling conventions, simplified some of our higher-layer code.
-
-class MethodWrapper:
- """
- A generic Wrapper class that associates a method (which can
- actually be any callable) with an object. As part of creating this
- MethodWrapper object an attribute with the specified (by default,
- the name of the supplied method) is added to the underlying object.
- When that new "method" is called, our __call__() method adds the
- object as the first argument, simulating the Python behavior of
- supplying "self" on method calls.
-
- We hang on to the name by which the method was added to the underlying
- base class so that we can provide a method to "clone" ourselves onto
- a new underlying object being copied (without which we wouldn't need
- to save that info).
- """
- def __init__(self, object, method, name=None):
- if name is None:
- name = method.__name__
- self.object = object
- self.method = method
- self.name = name
- setattr(self.object, name, self)
-
- def __call__(self, *args, **kwargs):
- nargs = (self.object,) + args
- return apply(self.method, nargs, kwargs)
-
- def clone(self, new_object):
- """
- Returns an object that re-binds the underlying "method" to
- the specified new object.
- """
- return self.__class__(new_object, self.method, self.name)
-
-class BuilderWrapper(MethodWrapper):
- """
- A MethodWrapper subclass that that associates an environment with
- a Builder.
-
- This mainly exists to wrap the __call__() function so that all calls
- to Builders can have their argument lists massaged in the same way
- (treat a lone argument as the source, treat two arguments as target
- then source, make sure both target and source are lists) without
- having to have cut-and-paste code to do it.
-
- As a bit of obsessive backwards compatibility, we also intercept
- attempts to get or set the "env" or "builder" attributes, which were
- the names we used before we put the common functionality into the
- MethodWrapper base class. We'll keep this around for a while in case
- people shipped Tool modules that reached into the wrapper (like the
- Tool/qt.py module does, or did). There shouldn't be a lot attribute
- fetching or setting on these, so a little extra work shouldn't hurt.
- """
- def __call__(self, target=None, source=_null, *args, **kw):
- if source is _null:
- source = target
- target = None
- if not target is None and not SCons.Util.is_List(target):
- target = [target]
- if not source is None and not SCons.Util.is_List(source):
- source = [source]
- return apply(MethodWrapper.__call__, (self, target, source) + args, kw)
-
- def __repr__(self):
- return '<BuilderWrapper %s>' % repr(self.name)
-
- def __str__(self):
- return self.__repr__()
-
- def __getattr__(self, name):
- if name == 'env':
- return self.object
- elif name == 'builder':
- return self.method
- else:
- raise AttributeError, name
-
- def __setattr__(self, name, value):
- if name == 'env':
- self.object = value
- elif name == 'builder':
- self.method = value
- else:
- self.__dict__[name] = value
-
- # This allows a Builder to be executed directly
- # through the Environment to which it's attached.
- # In practice, we shouldn't need this, because
- # builders actually get executed through a Node.
- # But we do have a unit test for this, and can't
- # yet rule out that it would be useful in the
- # future, so leave it for now.
- #def execute(self, **kw):
- # kw['env'] = self.env
- # apply(self.builder.execute, (), kw)
-
-class BuilderDict(UserDict):
- """This is a dictionary-like class used by an Environment to hold
- the Builders. We need to do this because every time someone changes
- the Builders in the Environment's BUILDERS dictionary, we must
- update the Environment's attributes."""
- def __init__(self, dict, env):
- # Set self.env before calling the superclass initialization,
- # because it will end up calling our other methods, which will
- # need to point the values in this dictionary to self.env.
- self.env = env
- UserDict.__init__(self, dict)
-
- def __semi_deepcopy__(self):
- return self.__class__(self.data, self.env)
-
- def __setitem__(self, item, val):
- try:
- method = getattr(self.env, item).method
- except AttributeError:
- pass
- else:
- self.env.RemoveMethod(method)
- UserDict.__setitem__(self, item, val)
- BuilderWrapper(self.env, val, item)
-
- def __delitem__(self, item):
- UserDict.__delitem__(self, item)
- delattr(self.env, item)
-
- def update(self, dict):
- for i, v in dict.items():
- self.__setitem__(i, v)
-
-
-
-_is_valid_var = re.compile(r'[_a-zA-Z]\w*$')
-
-def is_valid_construction_var(varstr):
- """Return if the specified string is a legitimate construction
- variable.
- """
- return _is_valid_var.match(varstr)
-
-
-
-class SubstitutionEnvironment:
- """Base class for different flavors of construction environments.
-
- This class contains a minimal set of methods that handle contruction
- variable expansion and conversion of strings to Nodes, which may or
- may not be actually useful as a stand-alone class. Which methods
- ended up in this class is pretty arbitrary right now. They're
- basically the ones which we've empirically determined are common to
- the different construction environment subclasses, and most of the
- others that use or touch the underlying dictionary of construction
- variables.
-
- Eventually, this class should contain all the methods that we
- determine are necessary for a "minimal" interface to the build engine.
- A full "native Python" SCons environment has gotten pretty heavyweight
- with all of the methods and Tools and construction variables we've
- jammed in there, so it would be nice to have a lighter weight
- alternative for interfaces that don't need all of the bells and
- whistles. (At some point, we'll also probably rename this class
- "Base," since that more reflects what we want this class to become,
- but because we've released comments that tell people to subclass
- Environment.Base to create their own flavors of construction
- environment, we'll save that for a future refactoring when this
- class actually becomes useful.)
- """
-
- if SCons.Memoize.use_memoizer:
- __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
- def __init__(self, **kw):
- """Initialization of an underlying SubstitutionEnvironment class.
- """
- if __debug__: logInstanceCreation(self, 'Environment.SubstitutionEnvironment')
- self.fs = SCons.Node.FS.get_default_fs()
- self.ans = SCons.Node.Alias.default_ans
- self.lookup_list = SCons.Node.arg2nodes_lookups
- self._dict = kw.copy()
- self._init_special()
- self.added_methods = []
- #self._memo = {}
-
- def _init_special(self):
- """Initial the dispatch tables for special handling of
- special construction variables."""
- self._special_del = {}
- self._special_del['SCANNERS'] = _del_SCANNERS
-
- self._special_set = {}
- for key in reserved_construction_var_names:
- self._special_set[key] = _set_reserved
- self._special_set['BUILDERS'] = _set_BUILDERS
- self._special_set['SCANNERS'] = _set_SCANNERS
-
- # Freeze the keys of self._special_set in a list for use by
- # methods that need to check. (Empirically, list scanning has
- # gotten better than dict.has_key() in Python 2.5.)
- self._special_set_keys = self._special_set.keys()
-
- def __cmp__(self, other):
- return cmp(self._dict, other._dict)
-
- def __delitem__(self, key):
- special = self._special_del.get(key)
- if special:
- special(self, key)
- else:
- del self._dict[key]
-
- def __getitem__(self, key):
- return self._dict[key]
-
- def __setitem__(self, key, value):
- # This is heavily used. This implementation is the best we have
- # according to the timings in bench/env.__setitem__.py.
- #
- # The "key in self._special_set_keys" test here seems to perform
- # pretty well for the number of keys we have. A hard-coded
- # list works a little better in Python 2.5, but that has the
- # disadvantage of maybe getting out of sync if we ever add more
- # variable names. Using self._special_set.has_key() works a
- # little better in Python 2.4, but is worse then this test.
- # So right now it seems like a good trade-off, but feel free to
- # revisit this with bench/env.__setitem__.py as needed (and
- # as newer versions of Python come out).
- if key in self._special_set_keys:
- self._special_set[key](self, key, value)
- else:
- # If we already have the entry, then it's obviously a valid
- # key and we don't need to check. If we do check, using a
- # global, pre-compiled regular expression directly is more
- # efficient than calling another function or a method.
- if not self._dict.has_key(key) \
- and not _is_valid_var.match(key):
- raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
- self._dict[key] = value
-
- def get(self, key, default=None):
- "Emulates the get() method of dictionaries."""
- return self._dict.get(key, default)
-
- def has_key(self, key):
- return self._dict.has_key(key)
-
- def items(self):
- return self._dict.items()
-
- def arg2nodes(self, args, node_factory=_null, lookup_list=_null, **kw):
- if node_factory is _null:
- node_factory = self.fs.File
- if lookup_list is _null:
- lookup_list = self.lookup_list
-
- if not args:
- return []
-
- args = SCons.Util.flatten(args)
-
- nodes = []
- for v in args:
- if SCons.Util.is_String(v):
- n = None
- for l in lookup_list:
- n = l(v)
- if not n is None:
- break
- if not n is None:
- if SCons.Util.is_String(n):
- # n = self.subst(n, raw=1, **kw)
- kw['raw'] = 1
- n = apply(self.subst, (n,), kw)
- if node_factory:
- n = node_factory(n)
- if SCons.Util.is_List(n):
- nodes.extend(n)
- else:
- nodes.append(n)
- elif node_factory:
- # v = node_factory(self.subst(v, raw=1, **kw))
- kw['raw'] = 1
- v = node_factory(apply(self.subst, (v,), kw))
- if SCons.Util.is_List(v):
- nodes.extend(v)
- else:
- nodes.append(v)
- else:
- nodes.append(v)
-
- return nodes
-
- def gvars(self):
- return self._dict
-
- def lvars(self):
- return {}
-
- def subst(self, string, raw=0, target=None, source=None, conv=None):
- """Recursively interpolates construction variables from the
- Environment into the specified string, returning the expanded
- result. Construction variables are specified by a $ prefix
- in the string and begin with an initial underscore or
- alphabetic character followed by any number of underscores
- or alphanumeric characters. The construction variable names
- may be surrounded by curly braces to separate the name from
- trailing characters.
- """
- gvars = self.gvars()
- lvars = self.lvars()
- lvars['__env__'] = self
- return SCons.Subst.scons_subst(string, self, raw, target, source, gvars, lvars, conv)
-
- def subst_kw(self, kw, raw=0, target=None, source=None):
- nkw = {}
- for k, v in kw.items():
- k = self.subst(k, raw, target, source)
- if SCons.Util.is_String(v):
- v = self.subst(v, raw, target, source)
- nkw[k] = v
- return nkw
-
- def subst_list(self, string, raw=0, target=None, source=None, conv=None):
- """Calls through to SCons.Subst.scons_subst_list(). See
- the documentation for that function."""
- gvars = self.gvars()
- lvars = self.lvars()
- lvars['__env__'] = self
- return SCons.Subst.scons_subst_list(string, self, raw, target, source, gvars, lvars, conv)
-
- def subst_path(self, path, target=None, source=None):
- """Substitute a path list, turning EntryProxies into Nodes
- and leaving Nodes (and other objects) as-is."""
-
- if not SCons.Util.is_List(path):
- path = [path]
-
- def s(obj):
- """This is the "string conversion" routine that we have our
- substitutions use to return Nodes, not strings. This relies
- on the fact that an EntryProxy object has a get() method that
- returns the underlying Node that it wraps, which is a bit of
- architectural dependence that we might need to break or modify
- in the future in response to additional requirements."""
- try:
- get = obj.get
- except AttributeError:
- obj = SCons.Util.to_String_for_subst(obj)
- else:
- obj = get()
- return obj
-
- r = []
- for p in path:
- if SCons.Util.is_String(p):
- p = self.subst(p, target=target, source=source, conv=s)
- if SCons.Util.is_List(p):
- if len(p) == 1:
- p = p[0]
- else:
- # We have an object plus a string, or multiple
- # objects that we need to smush together. No choice
- # but to make them into a string.
- p = string.join(map(SCons.Util.to_String_for_subst, p), '')
- else:
- p = s(p)
- r.append(p)
- return r
-
- subst_target_source = subst
-
- def backtick(self, command):
- import subprocess
- # common arguments
- kw = { 'stdout' : subprocess.PIPE,
- 'stderr' : subprocess.PIPE,
- 'universal_newlines' : True,
- }
- # if the command is a list, assume it's been quoted
- # othewise force a shell
- if not SCons.Util.is_List(command): kw['shell'] = True
- # run constructed command
- #TODO(1.5) p = SCons.Action._subproc(self, command, **kw)
- p = apply(SCons.Action._subproc, (self, command), kw)
- out,err = p.communicate()
- status = p.wait()
- if err:
- sys.stderr.write(err)
- if status:
- raise OSError("'%s' exited %d" % (command, status))
- return out
-
- def AddMethod(self, function, name=None):
- """
- Adds the specified function as a method of this construction
- environment with the specified name. If the name is omitted,
- the default name is the name of the function itself.
- """
- method = MethodWrapper(self, function, name)
- self.added_methods.append(method)
-
- def RemoveMethod(self, function):
- """
- Removes the specified function's MethodWrapper from the
- added_methods list, so we don't re-bind it when making a clone.
- """
- is_not_func = lambda dm, f=function: not dm.method is f
- self.added_methods = filter(is_not_func, self.added_methods)
-
- def Override(self, overrides):
- """
- Produce a modified environment whose variables are overriden by
- the overrides dictionaries. "overrides" is a dictionary that
- will override the variables of this environment.
-
- This function is much more efficient than Clone() or creating
- a new Environment because it doesn't copy the construction
- environment dictionary, it just wraps the underlying construction
- environment, and doesn't even create a wrapper object if there
- are no overrides.
- """
- if not overrides: return self
- o = copy_non_reserved_keywords(overrides)
- if not o: return self
- overrides = {}
- merges = None
- for key, value in o.items():
- if key == 'parse_flags':
- merges = value
- else:
- overrides[key] = SCons.Subst.scons_subst_once(value, self, key)
- env = OverrideEnvironment(self, overrides)
- if merges: env.MergeFlags(merges)
- return env
-
- def ParseFlags(self, *flags):
- """
- Parse the set of flags and return a dict with the flags placed
- in the appropriate entry. The flags are treated as a typical
- set of command-line flags for a GNU-like toolchain and used to
- populate the entries in the dict immediately below. If one of
- the flag strings begins with a bang (exclamation mark), it is
- assumed to be a command and the rest of the string is executed;
- the result of that evaluation is then added to the dict.
- """
- dict = {
- 'ASFLAGS' : SCons.Util.CLVar(''),
- 'CFLAGS' : SCons.Util.CLVar(''),
- 'CCFLAGS' : SCons.Util.CLVar(''),
- 'CPPDEFINES' : [],
- 'CPPFLAGS' : SCons.Util.CLVar(''),
- 'CPPPATH' : [],
- 'FRAMEWORKPATH' : SCons.Util.CLVar(''),
- 'FRAMEWORKS' : SCons.Util.CLVar(''),
- 'LIBPATH' : [],
- 'LIBS' : [],
- 'LINKFLAGS' : SCons.Util.CLVar(''),
- 'RPATH' : [],
- }
-
- # The use of the "me" parameter to provide our own name for
- # recursion is an egregious hack to support Python 2.1 and before.
- def do_parse(arg, me, self = self, dict = dict):
- # if arg is a sequence, recurse with each element
- if not arg:
- return
-
- if not SCons.Util.is_String(arg):
- for t in arg: me(t, me)
- return
-
- # if arg is a command, execute it
- if arg[0] == '!':
- arg = self.backtick(arg[1:])
-
- # utility function to deal with -D option
- def append_define(name, dict = dict):
- t = string.split(name, '=')
- if len(t) == 1:
- dict['CPPDEFINES'].append(name)
- else:
- dict['CPPDEFINES'].append([t[0], string.join(t[1:], '=')])
-
- # Loop through the flags and add them to the appropriate option.
- # This tries to strike a balance between checking for all possible
- # flags and keeping the logic to a finite size, so it doesn't
- # check for some that don't occur often. It particular, if the
- # flag is not known to occur in a config script and there's a way
- # of passing the flag to the right place (by wrapping it in a -W
- # flag, for example) we don't check for it. Note that most
- # preprocessor options are not handled, since unhandled options
- # are placed in CCFLAGS, so unless the preprocessor is invoked
- # separately, these flags will still get to the preprocessor.
- # Other options not currently handled:
- # -iqoutedir (preprocessor search path)
- # -u symbol (linker undefined symbol)
- # -s (linker strip files)
- # -static* (linker static binding)
- # -shared* (linker dynamic binding)
- # -symbolic (linker global binding)
- # -R dir (deprecated linker rpath)
- # IBM compilers may also accept -qframeworkdir=foo
-
- params = shlex.split(arg)
- append_next_arg_to = None # for multi-word args
- for arg in params:
- if append_next_arg_to:
- if append_next_arg_to == 'CPPDEFINES':
- append_define(arg)
- elif append_next_arg_to == '-include':
- t = ('-include', self.fs.File(arg))
- dict['CCFLAGS'].append(t)
- elif append_next_arg_to == '-isysroot':
- t = ('-isysroot', arg)
- dict['CCFLAGS'].append(t)
- dict['LINKFLAGS'].append(t)
- elif append_next_arg_to == '-arch':
- t = ('-arch', arg)
- dict['CCFLAGS'].append(t)
- dict['LINKFLAGS'].append(t)
- else:
- dict[append_next_arg_to].append(arg)
- append_next_arg_to = None
- elif not arg[0] in ['-', '+']:
- dict['LIBS'].append(self.fs.File(arg))
- elif arg[:2] == '-L':
- if arg[2:]:
- dict['LIBPATH'].append(arg[2:])
- else:
- append_next_arg_to = 'LIBPATH'
- elif arg[:2] == '-l':
- if arg[2:]:
- dict['LIBS'].append(arg[2:])
- else:
- append_next_arg_to = 'LIBS'
- elif arg[:2] == '-I':
- if arg[2:]:
- dict['CPPPATH'].append(arg[2:])
- else:
- append_next_arg_to = 'CPPPATH'
- elif arg[:4] == '-Wa,':
- dict['ASFLAGS'].append(arg[4:])
- dict['CCFLAGS'].append(arg)
- elif arg[:4] == '-Wl,':
- if arg[:11] == '-Wl,-rpath=':
- dict['RPATH'].append(arg[11:])
- elif arg[:7] == '-Wl,-R,':
- dict['RPATH'].append(arg[7:])
- elif arg[:6] == '-Wl,-R':
- dict['RPATH'].append(arg[6:])
- else:
- dict['LINKFLAGS'].append(arg)
- elif arg[:4] == '-Wp,':
- dict['CPPFLAGS'].append(arg)
- elif arg[:2] == '-D':
- if arg[2:]:
- append_define(arg[2:])
- else:
- append_next_arg_to = 'CPPDEFINES'
- elif arg == '-framework':
- append_next_arg_to = 'FRAMEWORKS'
- elif arg[:14] == '-frameworkdir=':
- dict['FRAMEWORKPATH'].append(arg[14:])
- elif arg[:2] == '-F':
- if arg[2:]:
- dict['FRAMEWORKPATH'].append(arg[2:])
- else:
- append_next_arg_to = 'FRAMEWORKPATH'
- elif arg == '-mno-cygwin':
- dict['CCFLAGS'].append(arg)
- dict['LINKFLAGS'].append(arg)
- elif arg == '-mwindows':
- dict['LINKFLAGS'].append(arg)
- elif arg == '-pthread':
- dict['CCFLAGS'].append(arg)
- dict['LINKFLAGS'].append(arg)
- elif arg[:5] == '-std=':
- dict['CFLAGS'].append(arg) # C only
- elif arg[0] == '+':
- dict['CCFLAGS'].append(arg)
- dict['LINKFLAGS'].append(arg)
- elif arg in ['-include', '-isysroot', '-arch']:
- append_next_arg_to = arg
- else:
- dict['CCFLAGS'].append(arg)
-
- for arg in flags:
- do_parse(arg, do_parse)
- return dict
-
- def MergeFlags(self, args, unique=1, dict=None):
- """
- Merge the dict in args into the construction variables of this
- env, or the passed-in dict. If args is not a dict, it is
- converted into a dict using ParseFlags. If unique is not set,
- the flags are appended rather than merged.
- """
-
- if dict is None:
- dict = self
- if not SCons.Util.is_Dict(args):
- args = self.ParseFlags(args)
- if not unique:
- apply(self.Append, (), args)
- return self
- for key, value in args.items():
- if not value:
- continue
- try:
- orig = self[key]
- except KeyError:
- orig = value
- else:
- if not orig:
- orig = value
- elif value:
- # Add orig and value. The logic here was lifted from
- # part of env.Append() (see there for a lot of comments
- # about the order in which things are tried) and is
- # used mainly to handle coercion of strings to CLVar to
- # "do the right thing" given (e.g.) an original CCFLAGS
- # string variable like '-pipe -Wall'.
- try:
- orig = orig + value
- except (KeyError, TypeError):
- try:
- add_to_orig = orig.append
- except AttributeError:
- value.insert(0, orig)
- orig = value
- else:
- add_to_orig(value)
- t = []
- if key[-4:] == 'PATH':
- ### keep left-most occurence
- for v in orig:
- if v not in t:
- t.append(v)
- else:
- ### keep right-most occurence
- orig.reverse()
- for v in orig:
- if v not in t:
- t.insert(0, v)
- self[key] = t
- return self
-
-# def MergeShellPaths(self, args, prepend=1):
-# """
-# Merge the dict in args into the shell environment in env['ENV'].
-# Shell path elements are appended or prepended according to prepend.
-
-# Uses Pre/AppendENVPath, so it always appends or prepends uniquely.
-
-# Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'})
-# prepends /usr/local/lib to env['ENV']['LIBPATH'].
-# """
-
-# for pathname, pathval in args.items():
-# if not pathval:
-# continue
-# if prepend:
-# apply(self.PrependENVPath, (pathname, pathval))
-# else:
-# apply(self.AppendENVPath, (pathname, pathval))
-
-
-# Used by the FindSourceFiles() method, below.
-# Stuck here for support of pre-2.2 Python versions.
-def build_source(ss, result):
- for s in ss:
- if isinstance(s, SCons.Node.FS.Dir):
- build_source(s.all_children(), result)
- elif s.has_builder():
- build_source(s.sources, result)
- elif isinstance(s.disambiguate(), SCons.Node.FS.File):
- result.append(s)
-
-def default_decide_source(dependency, target, prev_ni):
- f = SCons.Defaults.DefaultEnvironment().decide_source
- return f(dependency, target, prev_ni)
-
-def default_decide_target(dependency, target, prev_ni):
- f = SCons.Defaults.DefaultEnvironment().decide_target
- return f(dependency, target, prev_ni)
-
-def default_copy_from_cache(src, dst):
- f = SCons.Defaults.DefaultEnvironment().copy_from_cache
- return f(src, dst)
-
-class Base(SubstitutionEnvironment):
- """Base class for "real" construction Environments. These are the
- primary objects used to communicate dependency and construction
- information to the build engine.
-
- Keyword arguments supplied when the construction Environment
- is created are construction variables used to initialize the
- Environment.
- """
-
- if SCons.Memoize.use_memoizer:
- __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
- memoizer_counters = []
-
- #######################################################################
- # This is THE class for interacting with the SCons build engine,
- # and it contains a lot of stuff, so we're going to try to keep this
- # a little organized by grouping the methods.
- #######################################################################
-
- #######################################################################
- # Methods that make an Environment act like a dictionary. These have
- # the expected standard names for Python mapping objects. Note that
- # we don't actually make an Environment a subclass of UserDict for
- # performance reasons. Note also that we only supply methods for
- # dictionary functionality that we actually need and use.
- #######################################################################
-
- def __init__(self,
- platform=None,
- tools=None,
- toolpath=None,
- variables=None,
- parse_flags = None,
- **kw):
- """
- Initialization of a basic SCons construction environment,
- including setting up special construction variables like BUILDER,
- PLATFORM, etc., and searching for and applying available Tools.
-
- Note that we do *not* call the underlying base class
- (SubsitutionEnvironment) initialization, because we need to
- initialize things in a very specific order that doesn't work
- with the much simpler base class initialization.
- """
- if __debug__: logInstanceCreation(self, 'Environment.Base')
- self._memo = {}
- self.fs = SCons.Node.FS.get_default_fs()
- self.ans = SCons.Node.Alias.default_ans
- self.lookup_list = SCons.Node.arg2nodes_lookups
- self._dict = semi_deepcopy(SCons.Defaults.ConstructionEnvironment)
- self._init_special()
- self.added_methods = []
-
- # We don't use AddMethod, or define these as methods in this
- # class, because we *don't* want these functions to be bound
- # methods. They need to operate independently so that the
- # settings will work properly regardless of whether a given
- # target ends up being built with a Base environment or an
- # OverrideEnvironment or what have you.
- self.decide_target = default_decide_target
- self.decide_source = default_decide_source
-
- self.copy_from_cache = default_copy_from_cache
-
- self._dict['BUILDERS'] = BuilderDict(self._dict['BUILDERS'], self)
-
- if platform is None:
- platform = self._dict.get('PLATFORM', None)
- if platform is None:
- platform = SCons.Platform.Platform()
- if SCons.Util.is_String(platform):
- platform = SCons.Platform.Platform(platform)
- self._dict['PLATFORM'] = str(platform)
- platform(self)
-
- # Apply the passed-in and customizable variables to the
- # environment before calling the tools, because they may use
- # some of them during initialization.
- if kw.has_key('options'):
- # Backwards compatibility: they may stll be using the
- # old "options" keyword.
- variables = kw['options']
- del kw['options']
- apply(self.Replace, (), kw)
- keys = kw.keys()
- if variables:
- keys = keys + variables.keys()
- variables.Update(self)
-
- save = {}
- for k in keys:
- try:
- save[k] = self._dict[k]
- except KeyError:
- # No value may have been set if they tried to pass in a
- # reserved variable name like TARGETS.
- pass
-
- SCons.Tool.Initializers(self)
-
- if tools is None:
- tools = self._dict.get('TOOLS', None)
- if tools is None:
- tools = ['default']
- apply_tools(self, tools, toolpath)
-
- # Now restore the passed-in and customized variables
- # to the environment, since the values the user set explicitly
- # should override any values set by the tools.
- for key, val in save.items():
- self._dict[key] = val
-
- # Finally, apply any flags to be merged in
- if parse_flags: self.MergeFlags(parse_flags)
-
- #######################################################################
- # Utility methods that are primarily for internal use by SCons.
- # These begin with lower-case letters.
- #######################################################################
-
- def get_builder(self, name):
- """Fetch the builder with the specified name from the environment.
- """
- try:
- return self._dict['BUILDERS'][name]
- except KeyError:
- return None
-
- def get_CacheDir(self):
- try:
- path = self._CacheDir_path
- except AttributeError:
- path = SCons.Defaults.DefaultEnvironment()._CacheDir_path
- try:
- if path == self._last_CacheDir_path:
- return self._last_CacheDir
- except AttributeError:
- pass
- cd = SCons.CacheDir.CacheDir(path)
- self._last_CacheDir_path = path
- self._last_CacheDir = cd
- return cd
-
- def get_factory(self, factory, default='File'):
- """Return a factory function for creating Nodes for this
- construction environment.
- """
- name = default
- try:
- is_node = issubclass(factory, SCons.Node.Node)
- except TypeError:
- # The specified factory isn't a Node itself--it's
- # most likely None, or possibly a callable.
- pass
- else:
- if is_node:
- # The specified factory is a Node (sub)class. Try to
- # return the FS method that corresponds to the Node's
- # name--that is, we return self.fs.Dir if they want a Dir,
- # self.fs.File for a File, etc.
- try: name = factory.__name__
- except AttributeError: pass
- else: factory = None
- if not factory:
- # They passed us None, or we picked up a name from a specified
- # class, so return the FS method. (Note that we *don't*
- # use our own self.{Dir,File} methods because that would
- # cause env.subst() to be called twice on the file name,
- # interfering with files that have $$ in them.)
- factory = getattr(self.fs, name)
- return factory
-
- memoizer_counters.append(SCons.Memoize.CountValue('_gsm'))
-
- def _gsm(self):
- try:
- return self._memo['_gsm']
- except KeyError:
- pass
-
- result = {}
-
- try:
- scanners = self._dict['SCANNERS']
- except KeyError:
- pass
- else:
- # Reverse the scanner list so that, if multiple scanners
- # claim they can scan the same suffix, earlier scanners
- # in the list will overwrite later scanners, so that
- # the result looks like a "first match" to the user.
- if not SCons.Util.is_List(scanners):
- scanners = [scanners]
- else:
- scanners = scanners[:] # copy so reverse() doesn't mod original
- scanners.reverse()
- for scanner in scanners:
- for k in scanner.get_skeys(self):
- result[k] = scanner
-
- self._memo['_gsm'] = result
-
- return result
-
- def get_scanner(self, skey):
- """Find the appropriate scanner given a key (usually a file suffix).
- """
- return self._gsm().get(skey)
-
- def scanner_map_delete(self, kw=None):
- """Delete the cached scanner map (if we need to).
- """
- try:
- del self._memo['_gsm']
- except KeyError:
- pass
-
- def _update(self, dict):
- """Update an environment's values directly, bypassing the normal
- checks that occur when users try to set items.
- """
- self._dict.update(dict)
-
- def get_src_sig_type(self):
- try:
- return self.src_sig_type
- except AttributeError:
- t = SCons.Defaults.DefaultEnvironment().src_sig_type
- self.src_sig_type = t
- return t
-
- def get_tgt_sig_type(self):
- try:
- return self.tgt_sig_type
- except AttributeError:
- t = SCons.Defaults.DefaultEnvironment().tgt_sig_type
- self.tgt_sig_type = t
- return t
-
- #######################################################################
- # Public methods for manipulating an Environment. These begin with
- # upper-case letters. The essential characteristic of methods in
- # this section is that they do *not* have corresponding same-named
- # global functions. For example, a stand-alone Append() function
- # makes no sense, because Append() is all about appending values to
- # an Environment's construction variables.
- #######################################################################
-
- def Append(self, **kw):
- """Append values to existing construction variables
- in an Environment.
- """
- kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
- # It would be easier on the eyes to write this using
- # "continue" statements whenever we finish processing an item,
- # but Python 1.5.2 apparently doesn't let you use "continue"
- # within try:-except: blocks, so we have to nest our code.
- try:
- orig = self._dict[key]
- except KeyError:
- # No existing variable in the environment, so just set
- # it to the new value.
- self._dict[key] = val
- else:
- try:
- # Check if the original looks like a dictionary.
- # If it is, we can't just try adding the value because
- # dictionaries don't have __add__() methods, and
- # things like UserList will incorrectly coerce the
- # original dict to a list (which we don't want).
- update_dict = orig.update
- except AttributeError:
- try:
- # Most straightforward: just try to add them
- # together. This will work in most cases, when the
- # original and new values are of compatible types.
- self._dict[key] = orig + val
- except (KeyError, TypeError):
- try:
- # Check if the original is a list.
- add_to_orig = orig.append
- except AttributeError:
- # The original isn't a list, but the new
- # value is (by process of elimination),
- # so insert the original in the new value
- # (if there's one to insert) and replace
- # the variable with it.
- if orig:
- val.insert(0, orig)
- self._dict[key] = val
- else:
- # The original is a list, so append the new
- # value to it (if there's a value to append).
- if val:
- add_to_orig(val)
- else:
- # The original looks like a dictionary, so update it
- # based on what we think the value looks like.
- if SCons.Util.is_List(val):
- for v in val:
- orig[v] = None
- else:
- try:
- update_dict(val)
- except (AttributeError, TypeError, ValueError):
- if SCons.Util.is_Dict(val):
- for k, v in val.items():
- orig[k] = v
- else:
- orig[val] = None
- self.scanner_map_delete(kw)
-
- def AppendENVPath(self, name, newpath, envname = 'ENV',
- sep = os.pathsep, delete_existing=1):
- """Append path elements to the path 'name' in the 'ENV'
- dictionary for this environment. Will only add any particular
- path once, and will normpath and normcase all paths to help
- assure this. This can also handle the case where the env
- variable is a list instead of a string.
-
- If delete_existing is 0, a newpath which is already in the path
- will not be moved to the end (it will be left where it is).
- """
-
- orig = ''
- if self._dict.has_key(envname) and self._dict[envname].has_key(name):
- orig = self._dict[envname][name]
-
- nv = SCons.Util.AppendPath(orig, newpath, sep, delete_existing)
-
- if not self._dict.has_key(envname):
- self._dict[envname] = {}
-
- self._dict[envname][name] = nv
-
- def AppendUnique(self, delete_existing=0, **kw):
- """Append values to existing construction variables
- in an Environment, if they're not already there.
- If delete_existing is 1, removes existing values first, so
- values move to end.
- """
- kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
- if not self._dict.has_key(key) or self._dict[key] in ('', None):
- self._dict[key] = val
- elif SCons.Util.is_Dict(self._dict[key]) and \
- SCons.Util.is_Dict(val):
- self._dict[key].update(val)
- elif SCons.Util.is_List(val):
- dk = self._dict[key]
- if not SCons.Util.is_List(dk):
- dk = [dk]
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- else:
- val = filter(lambda x, dk=dk: x not in dk, val)
- self._dict[key] = dk + val
- else:
- dk = self._dict[key]
- if SCons.Util.is_List(dk):
- # By elimination, val is not a list. Since dk is a
- # list, wrap val in a list first.
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- self._dict[key] = dk + [val]
- else:
- if not val in dk:
- self._dict[key] = dk + [val]
- else:
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- self._dict[key] = dk + val
- self.scanner_map_delete(kw)
-
- def Clone(self, tools=[], toolpath=None, parse_flags = None, **kw):
- """Return a copy of a construction Environment. The
- copy is like a Python "deep copy"--that is, independent
- copies are made recursively of each objects--except that
- a reference is copied when an object is not deep-copyable
- (like a function). There are no references to any mutable
- objects in the original Environment.
- """
- clone = copy.copy(self)
- clone._dict = semi_deepcopy(self._dict)
-
- try:
- cbd = clone._dict['BUILDERS']
- except KeyError:
- pass
- else:
- clone._dict['BUILDERS'] = BuilderDict(cbd, clone)
-
- # Check the methods added via AddMethod() and re-bind them to
- # the cloned environment. Only do this if the attribute hasn't
- # been overwritten by the user explicitly and still points to
- # the added method.
- clone.added_methods = []
- for mw in self.added_methods:
- if mw == getattr(self, mw.name):
- clone.added_methods.append(mw.clone(clone))
-
- clone._memo = {}
-
- # Apply passed-in variables before the tools
- # so the tools can use the new variables
- kw = copy_non_reserved_keywords(kw)
- new = {}
- for key, value in kw.items():
- new[key] = SCons.Subst.scons_subst_once(value, self, key)
- apply(clone.Replace, (), new)
-
- apply_tools(clone, tools, toolpath)
-
- # apply them again in case the tools overwrote them
- apply(clone.Replace, (), new)
-
- # Finally, apply any flags to be merged in
- if parse_flags: clone.MergeFlags(parse_flags)
-
- if __debug__: logInstanceCreation(self, 'Environment.EnvironmentClone')
- return clone
-
- def Copy(self, *args, **kw):
- global _warn_copy_deprecated
- if _warn_copy_deprecated:
- msg = "The env.Copy() method is deprecated; use the env.Clone() method instead."
- SCons.Warnings.warn(SCons.Warnings.DeprecatedCopyWarning, msg)
- _warn_copy_deprecated = False
- return apply(self.Clone, args, kw)
-
- def _changed_build(self, dependency, target, prev_ni):
- if dependency.changed_state(target, prev_ni):
- return 1
- return self.decide_source(dependency, target, prev_ni)
-
- def _changed_content(self, dependency, target, prev_ni):
- return dependency.changed_content(target, prev_ni)
-
- def _changed_source(self, dependency, target, prev_ni):
- target_env = dependency.get_build_env()
- type = target_env.get_tgt_sig_type()
- if type == 'source':
- return target_env.decide_source(dependency, target, prev_ni)
- else:
- return target_env.decide_target(dependency, target, prev_ni)
-
- def _changed_timestamp_then_content(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_then_content(target, prev_ni)
-
- def _changed_timestamp_newer(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_newer(target, prev_ni)
-
- def _changed_timestamp_match(self, dependency, target, prev_ni):
- return dependency.changed_timestamp_match(target, prev_ni)
-
- def _copy_from_cache(self, src, dst):
- return self.fs.copy(src, dst)
-
- def _copy2_from_cache(self, src, dst):
- return self.fs.copy2(src, dst)
-
- def Decider(self, function):
- copy_function = self._copy2_from_cache
- if function in ('MD5', 'content'):
- if not SCons.Util.md5:
- raise UserError, "MD5 signatures are not available in this version of Python."
- function = self._changed_content
- elif function == 'MD5-timestamp':
- function = self._changed_timestamp_then_content
- elif function in ('timestamp-newer', 'make'):
- function = self._changed_timestamp_newer
- copy_function = self._copy_from_cache
- elif function == 'timestamp-match':
- function = self._changed_timestamp_match
- elif not callable(function):
- raise UserError, "Unknown Decider value %s" % repr(function)
-
- # We don't use AddMethod because we don't want to turn the
- # function, which only expects three arguments, into a bound
- # method, which would add self as an initial, fourth argument.
- self.decide_target = function
- self.decide_source = function
-
- self.copy_from_cache = copy_function
-
- def Detect(self, progs):
- """Return the first available program in progs.
- """
- if not SCons.Util.is_List(progs):
- progs = [ progs ]
- for prog in progs:
- path = self.WhereIs(prog)
- if path: return prog
- return None
-
- def Dictionary(self, *args):
- if not args:
- return self._dict
- dlist = map(lambda x, s=self: s._dict[x], args)
- if len(dlist) == 1:
- dlist = dlist[0]
- return dlist
-
- def Dump(self, key = None):
- """
- Using the standard Python pretty printer, dump the contents of the
- scons build environment to stdout.
-
- If the key passed in is anything other than None, then that will
- be used as an index into the build environment dictionary and
- whatever is found there will be fed into the pretty printer. Note
- that this key is case sensitive.
- """
- import pprint
- pp = pprint.PrettyPrinter(indent=2)
- if key:
- dict = self.Dictionary(key)
- else:
- dict = self.Dictionary()
- return pp.pformat(dict)
-
- def FindIxes(self, paths, prefix, suffix):
- """
- Search a list of paths for something that matches the prefix and suffix.
-
- paths - the list of paths or nodes.
- prefix - construction variable for the prefix.
- suffix - construction variable for the suffix.
- """
-
- suffix = self.subst('$'+suffix)
- prefix = self.subst('$'+prefix)
-
- for path in paths:
- dir,name = os.path.split(str(path))
- if name[:len(prefix)] == prefix and name[-len(suffix):] == suffix:
- return path
-
- def ParseConfig(self, command, function=None, unique=1):
- """
- Use the specified function to parse the output of the command
- in order to modify the current environment. The 'command' can
- be a string or a list of strings representing a command and
- its arguments. 'Function' is an optional argument that takes
- the environment, the output of the command, and the unique flag.
- If no function is specified, MergeFlags, which treats the output
- as the result of a typical 'X-config' command (i.e. gtk-config),
- will merge the output into the appropriate variables.
- """
- if function is None:
- def parse_conf(env, cmd, unique=unique):
- return env.MergeFlags(cmd, unique)
- function = parse_conf
- if SCons.Util.is_List(command):
- command = string.join(command)
- command = self.subst(command)
- return function(self, self.backtick(command))
-
- def ParseDepends(self, filename, must_exist=None, only_one=0):
- """
- Parse a mkdep-style file for explicit dependencies. This is
- completely abusable, and should be unnecessary in the "normal"
- case of proper SCons configuration, but it may help make
- the transition from a Make hierarchy easier for some people
- to swallow. It can also be genuinely useful when using a tool
- that can write a .d file, but for which writing a scanner would
- be too complicated.
- """
- filename = self.subst(filename)
- try:
- fp = open(filename, 'r')
- except IOError:
- if must_exist:
- raise
- return
- lines = SCons.Util.LogicalLines(fp).readlines()
- lines = filter(lambda l: l[0] != '#', lines)
- tdlist = []
- for line in lines:
- try:
- target, depends = string.split(line, ':', 1)
- except (AttributeError, TypeError, ValueError):
- # Python 1.5.2 throws TypeError if line isn't a string,
- # Python 2.x throws AttributeError because it tries
- # to call line.split(). Either can throw ValueError
- # if the line doesn't split into two or more elements.
- pass
- else:
- tdlist.append((string.split(target), string.split(depends)))
- if only_one:
- targets = reduce(lambda x, y: x+y, map(lambda p: p[0], tdlist))
- if len(targets) > 1:
- raise SCons.Errors.UserError, "More than one dependency target found in `%s': %s" % (filename, targets)
- for target, depends in tdlist:
- self.Depends(target, depends)
-
- def Platform(self, platform):
- platform = self.subst(platform)
- return SCons.Platform.Platform(platform)(self)
-
- def Prepend(self, **kw):
- """Prepend values to existing construction variables
- in an Environment.
- """
- kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
- # It would be easier on the eyes to write this using
- # "continue" statements whenever we finish processing an item,
- # but Python 1.5.2 apparently doesn't let you use "continue"
- # within try:-except: blocks, so we have to nest our code.
- try:
- orig = self._dict[key]
- except KeyError:
- # No existing variable in the environment, so just set
- # it to the new value.
- self._dict[key] = val
- else:
- try:
- # Check if the original looks like a dictionary.
- # If it is, we can't just try adding the value because
- # dictionaries don't have __add__() methods, and
- # things like UserList will incorrectly coerce the
- # original dict to a list (which we don't want).
- update_dict = orig.update
- except AttributeError:
- try:
- # Most straightforward: just try to add them
- # together. This will work in most cases, when the
- # original and new values are of compatible types.
- self._dict[key] = val + orig
- except (KeyError, TypeError):
- try:
- # Check if the added value is a list.
- add_to_val = val.append
- except AttributeError:
- # The added value isn't a list, but the
- # original is (by process of elimination),
- # so insert the the new value in the original
- # (if there's one to insert).
- if val:
- orig.insert(0, val)
- else:
- # The added value is a list, so append
- # the original to it (if there's a value
- # to append).
- if orig:
- add_to_val(orig)
- self._dict[key] = val
- else:
- # The original looks like a dictionary, so update it
- # based on what we think the value looks like.
- if SCons.Util.is_List(val):
- for v in val:
- orig[v] = None
- else:
- try:
- update_dict(val)
- except (AttributeError, TypeError, ValueError):
- if SCons.Util.is_Dict(val):
- for k, v in val.items():
- orig[k] = v
- else:
- orig[val] = None
- self.scanner_map_delete(kw)
-
- def PrependENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep,
- delete_existing=1):
- """Prepend path elements to the path 'name' in the 'ENV'
- dictionary for this environment. Will only add any particular
- path once, and will normpath and normcase all paths to help
- assure this. This can also handle the case where the env
- variable is a list instead of a string.
-
- If delete_existing is 0, a newpath which is already in the path
- will not be moved to the front (it will be left where it is).
- """
-
- orig = ''
- if self._dict.has_key(envname) and self._dict[envname].has_key(name):
- orig = self._dict[envname][name]
-
- nv = SCons.Util.PrependPath(orig, newpath, sep, delete_existing)
-
- if not self._dict.has_key(envname):
- self._dict[envname] = {}
-
- self._dict[envname][name] = nv
-
- def PrependUnique(self, delete_existing=0, **kw):
- """Prepend values to existing construction variables
- in an Environment, if they're not already there.
- If delete_existing is 1, removes existing values first, so
- values move to front.
- """
- kw = copy_non_reserved_keywords(kw)
- for key, val in kw.items():
- if not self._dict.has_key(key) or self._dict[key] in ('', None):
- self._dict[key] = val
- elif SCons.Util.is_Dict(self._dict[key]) and \
- SCons.Util.is_Dict(val):
- self._dict[key].update(val)
- elif SCons.Util.is_List(val):
- dk = self._dict[key]
- if not SCons.Util.is_List(dk):
- dk = [dk]
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- else:
- val = filter(lambda x, dk=dk: x not in dk, val)
- self._dict[key] = val + dk
- else:
- dk = self._dict[key]
- if SCons.Util.is_List(dk):
- # By elimination, val is not a list. Since dk is a
- # list, wrap val in a list first.
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- self._dict[key] = [val] + dk
- else:
- if not val in dk:
- self._dict[key] = [val] + dk
- else:
- if delete_existing:
- dk = filter(lambda x, val=val: x not in val, dk)
- self._dict[key] = val + dk
- self.scanner_map_delete(kw)
-
- def Replace(self, **kw):
- """Replace existing construction variables in an Environment
- with new construction variables and/or values.
- """
- try:
- kwbd = kw['BUILDERS']
- except KeyError:
- pass
- else:
- kwbd = semi_deepcopy(kwbd)
- del kw['BUILDERS']
- self.__setitem__('BUILDERS', kwbd)
- kw = copy_non_reserved_keywords(kw)
- self._update(semi_deepcopy(kw))
- self.scanner_map_delete(kw)
-
- def ReplaceIxes(self, path, old_prefix, old_suffix, new_prefix, new_suffix):
- """
- Replace old_prefix with new_prefix and old_suffix with new_suffix.
-
- env - Environment used to interpolate variables.
- path - the path that will be modified.
- old_prefix - construction variable for the old prefix.
- old_suffix - construction variable for the old suffix.
- new_prefix - construction variable for the new prefix.
- new_suffix - construction variable for the new suffix.
- """
- old_prefix = self.subst('$'+old_prefix)
- old_suffix = self.subst('$'+old_suffix)
-
- new_prefix = self.subst('$'+new_prefix)
- new_suffix = self.subst('$'+new_suffix)
-
- dir,name = os.path.split(str(path))
- if name[:len(old_prefix)] == old_prefix:
- name = name[len(old_prefix):]
- if name[-len(old_suffix):] == old_suffix:
- name = name[:-len(old_suffix)]
- return os.path.join(dir, new_prefix+name+new_suffix)
-
- def SetDefault(self, **kw):
- for k in kw.keys():
- if self._dict.has_key(k):
- del kw[k]
- apply(self.Replace, (), kw)
-
- def _find_toolpath_dir(self, tp):
- return self.fs.Dir(self.subst(tp)).srcnode().abspath
-
- def Tool(self, tool, toolpath=None, **kw):
- if SCons.Util.is_String(tool):
- tool = self.subst(tool)
- if toolpath is None:
- toolpath = self.get('toolpath', [])
- toolpath = map(self._find_toolpath_dir, toolpath)
- tool = apply(SCons.Tool.Tool, (tool, toolpath), kw)
- tool(self)
-
- def WhereIs(self, prog, path=None, pathext=None, reject=[]):
- """Find prog in the path.
- """
- if path is None:
- try:
- path = self['ENV']['PATH']
- except KeyError:
- pass
- elif SCons.Util.is_String(path):
- path = self.subst(path)
- if pathext is None:
- try:
- pathext = self['ENV']['PATHEXT']
- except KeyError:
- pass
- elif SCons.Util.is_String(pathext):
- pathext = self.subst(pathext)
- prog = self.subst(prog)
- path = SCons.Util.WhereIs(prog, path, pathext, reject)
- if path: return path
- return None
-
- #######################################################################
- # Public methods for doing real "SCons stuff" (manipulating
- # dependencies, setting attributes on targets, etc.). These begin
- # with upper-case letters. The essential characteristic of methods
- # in this section is that they all *should* have corresponding
- # same-named global functions.
- #######################################################################
-
- def Action(self, *args, **kw):
- def subst_string(a, self=self):
- if SCons.Util.is_String(a):
- a = self.subst(a)
- return a
- nargs = map(subst_string, args)
- nkw = self.subst_kw(kw)
- return apply(SCons.Action.Action, nargs, nkw)
-
- def AddPreAction(self, files, action):
- nodes = self.arg2nodes(files, self.fs.Entry)
- action = SCons.Action.Action(action)
- uniq = {}
- for executor in map(lambda n: n.get_executor(), nodes):
- uniq[executor] = 1
- for executor in uniq.keys():
- executor.add_pre_action(action)
- return nodes
-
- def AddPostAction(self, files, action):
- nodes = self.arg2nodes(files, self.fs.Entry)
- action = SCons.Action.Action(action)
- uniq = {}
- for executor in map(lambda n: n.get_executor(), nodes):
- uniq[executor] = 1
- for executor in uniq.keys():
- executor.add_post_action(action)
- return nodes
-
- def Alias(self, target, source=[], action=None, **kw):
- tlist = self.arg2nodes(target, self.ans.Alias)
- if not SCons.Util.is_List(source):
- source = [source]
- source = filter(None, source)
-
- if not action:
- if not source:
- # There are no source files and no action, so just
- # return a target list of classic Alias Nodes, without
- # any builder. The externally visible effect is that
- # this will make the wrapping Script.BuildTask class
- # say that there's "Nothing to be done" for this Alias,
- # instead of that it's "up to date."
- return tlist
-
- # No action, but there are sources. Re-call all the target
- # builders to add the sources to each target.
- result = []
- for t in tlist:
- bld = t.get_builder(AliasBuilder)
- result.extend(bld(self, t, source))
- return result
-
- nkw = self.subst_kw(kw)
- nkw.update({
- 'action' : SCons.Action.Action(action),
- 'source_factory' : self.fs.Entry,
- 'multi' : 1,
- 'is_explicit' : None,
- })
- bld = apply(SCons.Builder.Builder, (), nkw)
-
- # Apply the Builder separately to each target so that the Aliases
- # stay separate. If we did one "normal" Builder call with the
- # whole target list, then all of the target Aliases would be
- # associated under a single Executor.
- result = []
- for t in tlist:
- # Calling the convert() method will cause a new Executor to be
- # created from scratch, so we have to explicitly initialize
- # it with the target's existing sources, plus our new ones,
- # so nothing gets lost.
- b = t.get_builder()
- if b is None or b is AliasBuilder:
- b = bld
- else:
- nkw['action'] = b.action + action
- b = apply(SCons.Builder.Builder, (), nkw)
- t.convert()
- result.extend(b(self, t, t.sources + source))
- return result
-
- def AlwaysBuild(self, *targets):
- tlist = []
- for t in targets:
- tlist.extend(self.arg2nodes(t, self.fs.Entry))
- for t in tlist:
- t.set_always_build()
- return tlist
-
- def BuildDir(self, *args, **kw):
- if kw.has_key('build_dir'):
- kw['variant_dir'] = kw['build_dir']
- del kw['build_dir']
- return apply(self.VariantDir, args, kw)
-
- def Builder(self, **kw):
- nkw = self.subst_kw(kw)
- return apply(SCons.Builder.Builder, [], nkw)
-
- def CacheDir(self, path):
- import SCons.CacheDir
- if not path is None:
- path = self.subst(path)
- self._CacheDir_path = path
-
- def Clean(self, targets, files):
- global CleanTargets
- tlist = self.arg2nodes(targets, self.fs.Entry)
- flist = self.arg2nodes(files, self.fs.Entry)
- for t in tlist:
- try:
- CleanTargets[t].extend(flist)
- except KeyError:
- CleanTargets[t] = flist
-
- def Configure(self, *args, **kw):
- nargs = [self]
- if args:
- nargs = nargs + self.subst_list(args)[0]
- nkw = self.subst_kw(kw)
- nkw['_depth'] = kw.get('_depth', 0) + 1
- try:
- nkw['custom_tests'] = self.subst_kw(nkw['custom_tests'])
- except KeyError:
- pass
- return apply(SCons.SConf.SConf, nargs, nkw)
-
- def Command(self, target, source, action, **kw):
- """Builds the supplied target files from the supplied
- source files using the supplied action. Action may
- be any type that the Builder constructor will accept
- for an action."""
- bkw = {
- 'action' : action,
- 'target_factory' : self.fs.Entry,
- 'source_factory' : self.fs.Entry,
- }
- try: bkw['source_scanner'] = kw['source_scanner']
- except KeyError: pass
- else: del kw['source_scanner']
- bld = apply(SCons.Builder.Builder, (), bkw)
- return apply(bld, (self, target, source), kw)
-
- def Depends(self, target, dependency):
- """Explicity specify that 'target's depend on 'dependency'."""
- tlist = self.arg2nodes(target, self.fs.Entry)
- dlist = self.arg2nodes(dependency, self.fs.Entry)
- for t in tlist:
- t.add_dependency(dlist)
- return tlist
-
- def Dir(self, name, *args, **kw):
- """
- """
- s = self.subst(name)
- if SCons.Util.is_Sequence(s):
- result=[]
- for e in s:
- result.append(apply(self.fs.Dir, (e,) + args, kw))
- return result
- return apply(self.fs.Dir, (s,) + args, kw)
-
- def NoClean(self, *targets):
- """Tags a target so that it will not be cleaned by -c"""
- tlist = []
- for t in targets:
- tlist.extend(self.arg2nodes(t, self.fs.Entry))
- for t in tlist:
- t.set_noclean()
- return tlist
-
- def NoCache(self, *targets):
- """Tags a target so that it will not be cached"""
- tlist = []
- for t in targets:
- tlist.extend(self.arg2nodes(t, self.fs.Entry))
- for t in tlist:
- t.set_nocache()
- return tlist
-
- def Entry(self, name, *args, **kw):
- """
- """
- s = self.subst(name)
- if SCons.Util.is_Sequence(s):
- result=[]
- for e in s:
- result.append(apply(self.fs.Entry, (e,) + args, kw))
- return result
- return apply(self.fs.Entry, (s,) + args, kw)
-
- def Environment(self, **kw):
- return apply(SCons.Environment.Environment, [], self.subst_kw(kw))
-
- def Execute(self, action, *args, **kw):
- """Directly execute an action through an Environment
- """
- action = apply(self.Action, (action,) + args, kw)
- result = action([], [], self)
- if isinstance(result, SCons.Errors.BuildError):
- errstr = result.errstr
- if result.filename:
- errstr = result.filename + ': ' + errstr
- sys.stderr.write("scons: *** %s\n" % errstr)
- return result.status
- else:
- return result
-
- def File(self, name, *args, **kw):
- """
- """
- s = self.subst(name)
- if SCons.Util.is_Sequence(s):
- result=[]
- for e in s:
- result.append(apply(self.fs.File, (e,) + args, kw))
- return result
- return apply(self.fs.File, (s,) + args, kw)
-
- def FindFile(self, file, dirs):
- file = self.subst(file)
- nodes = self.arg2nodes(dirs, self.fs.Dir)
- return SCons.Node.FS.find_file(file, tuple(nodes))
-
- def Flatten(self, sequence):
- return SCons.Util.flatten(sequence)
-
- def GetBuildPath(self, files):
- result = map(str, self.arg2nodes(files, self.fs.Entry))
- if SCons.Util.is_List(files):
- return result
- else:
- return result[0]
-
- def Glob(self, pattern, ondisk=True, source=False, strings=False):
- return self.fs.Glob(self.subst(pattern), ondisk, source, strings)
-
- def Ignore(self, target, dependency):
- """Ignore a dependency."""
- tlist = self.arg2nodes(target, self.fs.Entry)
- dlist = self.arg2nodes(dependency, self.fs.Entry)
- for t in tlist:
- t.add_ignore(dlist)
- return tlist
-
- def Literal(self, string):
- return SCons.Subst.Literal(string)
-
- def Local(self, *targets):
- ret = []
- for targ in targets:
- if isinstance(targ, SCons.Node.Node):
- targ.set_local()
- ret.append(targ)
- else:
- for t in self.arg2nodes(targ, self.fs.Entry):
- t.set_local()
- ret.append(t)
- return ret
-
- def Precious(self, *targets):
- tlist = []
- for t in targets:
- tlist.extend(self.arg2nodes(t, self.fs.Entry))
- for t in tlist:
- t.set_precious()
- return tlist
-
- def Repository(self, *dirs, **kw):
- dirs = self.arg2nodes(list(dirs), self.fs.Dir)
- apply(self.fs.Repository, dirs, kw)
-
- def Requires(self, target, prerequisite):
- """Specify that 'prerequisite' must be built before 'target',
- (but 'target' does not actually depend on 'prerequisite'
- and need not be rebuilt if it changes)."""
- tlist = self.arg2nodes(target, self.fs.Entry)
- plist = self.arg2nodes(prerequisite, self.fs.Entry)
- for t in tlist:
- t.add_prerequisite(plist)
- return tlist
-
- def Scanner(self, *args, **kw):
- nargs = []
- for arg in args:
- if SCons.Util.is_String(arg):
- arg = self.subst(arg)
- nargs.append(arg)
- nkw = self.subst_kw(kw)
- return apply(SCons.Scanner.Base, nargs, nkw)
-
- def SConsignFile(self, name=".sconsign", dbm_module=None):
- if not name is None:
- name = self.subst(name)
- if not os.path.isabs(name):
- name = os.path.join(str(self.fs.SConstruct_dir), name)
- if name:
- name = os.path.normpath(name)
- sconsign_dir = os.path.dirname(name)
- if sconsign_dir and not os.path.exists(sconsign_dir):
- self.Execute(SCons.Defaults.Mkdir(sconsign_dir))
- SCons.SConsign.File(name, dbm_module)
-
- def SideEffect(self, side_effect, target):
- """Tell scons that side_effects are built as side
- effects of building targets."""
- side_effects = self.arg2nodes(side_effect, self.fs.Entry)
- targets = self.arg2nodes(target, self.fs.Entry)
-
- for side_effect in side_effects:
- if side_effect.multiple_side_effect_has_builder():
- raise SCons.Errors.UserError, "Multiple ways to build the same target were specified for: %s" % str(side_effect)
- side_effect.add_source(targets)
- side_effect.side_effect = 1
- self.Precious(side_effect)
- for target in targets:
- target.side_effects.append(side_effect)
- return side_effects
-
- def SourceCode(self, entry, builder):
- """Arrange for a source code builder for (part of) a tree."""
- entries = self.arg2nodes(entry, self.fs.Entry)
- for entry in entries:
- entry.set_src_builder(builder)
- return entries
-
- def SourceSignatures(self, type):
- global _warn_source_signatures_deprecated
- if _warn_source_signatures_deprecated:
- msg = "The env.SourceSignatures() method is deprecated;\n" + \
- "\tconvert your build to use the env.Decider() method instead."
- SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceSignaturesWarning, msg)
- _warn_source_signatures_deprecated = False
- type = self.subst(type)
- self.src_sig_type = type
- if type == 'MD5':
- if not SCons.Util.md5:
- raise UserError, "MD5 signatures are not available in this version of Python."
- self.decide_source = self._changed_content
- elif type == 'timestamp':
- self.decide_source = self._changed_timestamp_match
- else:
- raise UserError, "Unknown source signature type '%s'" % type
-
- def Split(self, arg):
- """This function converts a string or list into a list of strings
- or Nodes. This makes things easier for users by allowing files to
- be specified as a white-space separated list to be split.
- The input rules are:
- - A single string containing names separated by spaces. These will be
- split apart at the spaces.
- - A single Node instance
- - A list containing either strings or Node instances. Any strings
- in the list are not split at spaces.
- In all cases, the function returns a list of Nodes and strings."""
- if SCons.Util.is_List(arg):
- return map(self.subst, arg)
- elif SCons.Util.is_String(arg):
- return string.split(self.subst(arg))
- else:
- return [self.subst(arg)]
-
- def TargetSignatures(self, type):
- global _warn_target_signatures_deprecated
- if _warn_target_signatures_deprecated:
- msg = "The env.TargetSignatures() method is deprecated;\n" + \
- "\tconvert your build to use the env.Decider() method instead."
- SCons.Warnings.warn(SCons.Warnings.DeprecatedTargetSignaturesWarning, msg)
- _warn_target_signatures_deprecated = False
- type = self.subst(type)
- self.tgt_sig_type = type
- if type in ('MD5', 'content'):
- if not SCons.Util.md5:
- raise UserError, "MD5 signatures are not available in this version of Python."
- self.decide_target = self._changed_content
- elif type == 'timestamp':
- self.decide_target = self._changed_timestamp_match
- elif type == 'build':
- self.decide_target = self._changed_build
- elif type == 'source':
- self.decide_target = self._changed_source
- else:
- raise UserError, "Unknown target signature type '%s'"%type
-
- def Value(self, value, built_value=None):
- """
- """
- return SCons.Node.Python.Value(value, built_value)
-
- def VariantDir(self, variant_dir, src_dir, duplicate=1):
- variant_dir = self.arg2nodes(variant_dir, self.fs.Dir)[0]
- src_dir = self.arg2nodes(src_dir, self.fs.Dir)[0]
- self.fs.VariantDir(variant_dir, src_dir, duplicate)
-
- def FindSourceFiles(self, node='.'):
- """ returns a list of all source files.
- """
- node = self.arg2nodes(node, self.fs.Entry)[0]
-
- sources = []
- # Uncomment this and get rid of the global definition when we
- # drop support for pre-2.2 Python versions.
- #def build_source(ss, result):
- # for s in ss:
- # if isinstance(s, SCons.Node.FS.Dir):
- # build_source(s.all_children(), result)
- # elif s.has_builder():
- # build_source(s.sources, result)
- # elif isinstance(s.disambiguate(), SCons.Node.FS.File):
- # result.append(s)
- build_source(node.all_children(), sources)
-
- # now strip the build_node from the sources by calling the srcnode
- # function
- def get_final_srcnode(file):
- srcnode = file.srcnode()
- while srcnode != file.srcnode():
- srcnode = file.srcnode()
- return srcnode
-
- # get the final srcnode for all nodes, this means stripping any
- # attached build node.
- map( get_final_srcnode, sources )
-
- # remove duplicates
- return list(set(sources))
-
- def FindInstalledFiles(self):
- """ returns the list of all targets of the Install and InstallAs Builder.
- """
- from SCons.Tool import install
- if install._UNIQUE_INSTALLED_FILES is None:
- install._UNIQUE_INSTALLED_FILES = SCons.Util.uniquer_hashables(install._INSTALLED_FILES)
- return install._UNIQUE_INSTALLED_FILES
-
-class OverrideEnvironment(Base):
- """A proxy that overrides variables in a wrapped construction
- environment by returning values from an overrides dictionary in
- preference to values from the underlying subject environment.
-
- This is a lightweight (I hope) proxy that passes through most use of
- attributes to the underlying Environment.Base class, but has just
- enough additional methods defined to act like a real construction
- environment with overridden values. It can wrap either a Base
- construction environment, or another OverrideEnvironment, which
- can in turn nest arbitrary OverrideEnvironments...
-
- Note that we do *not* call the underlying base class
- (SubsitutionEnvironment) initialization, because we get most of those
- from proxying the attributes of the subject construction environment.
- But because we subclass SubstitutionEnvironment, this class also
- has inherited arg2nodes() and subst*() methods; those methods can't
- be proxied because they need *this* object's methods to fetch the
- values from the overrides dictionary.
- """
-
- if SCons.Memoize.use_memoizer:
- __metaclass__ = SCons.Memoize.Memoized_Metaclass
-
- def __init__(self, subject, overrides={}):
- if __debug__: logInstanceCreation(self, 'Environment.OverrideEnvironment')
- self.__dict__['__subject'] = subject
- self.__dict__['overrides'] = overrides
-
- # Methods that make this class act like a proxy.
- def __getattr__(self, name):
- return getattr(self.__dict__['__subject'], name)
- def __setattr__(self, name, value):
- setattr(self.__dict__['__subject'], name, value)
-
- # Methods that make this class act like a dictionary.
- def __getitem__(self, key):
- try:
- return self.__dict__['overrides'][key]
- except KeyError:
- return self.__dict__['__subject'].__getitem__(key)
- def __setitem__(self, key, value):
- if not is_valid_construction_var(key):
- raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
- self.__dict__['overrides'][key] = value
- def __delitem__(self, key):
- try:
- del self.__dict__['overrides'][key]
- except KeyError:
- deleted = 0
- else:
- deleted = 1
- try:
- result = self.__dict__['__subject'].__delitem__(key)
- except KeyError:
- if not deleted:
- raise
- result = None
- return result
- def get(self, key, default=None):
- """Emulates the get() method of dictionaries."""
- try:
- return self.__dict__['overrides'][key]
- except KeyError:
- return self.__dict__['__subject'].get(key, default)
- def has_key(self, key):
- try:
- self.__dict__['overrides'][key]
- return 1
- except KeyError:
- return self.__dict__['__subject'].has_key(key)
- def Dictionary(self):
- """Emulates the items() method of dictionaries."""
- d = self.__dict__['__subject'].Dictionary().copy()
- d.update(self.__dict__['overrides'])
- return d
- def items(self):
- """Emulates the items() method of dictionaries."""
- return self.Dictionary().items()
-
- # Overridden private construction environment methods.
- def _update(self, dict):
- """Update an environment's values directly, bypassing the normal
- checks that occur when users try to set items.
- """
- self.__dict__['overrides'].update(dict)
-
- def gvars(self):
- return self.__dict__['__subject'].gvars()
-
- def lvars(self):
- lvars = self.__dict__['__subject'].lvars()
- lvars.update(self.__dict__['overrides'])
- return lvars
-
- # Overridden public construction environment methods.
- def Replace(self, **kw):
- kw = copy_non_reserved_keywords(kw)
- self.__dict__['overrides'].update(semi_deepcopy(kw))
-
-# The entry point that will be used by the external world
-# to refer to a construction environment. This allows the wrapper
-# interface to extend a construction environment for its own purposes
-# by subclassing SCons.Environment.Base and then assigning the
-# class to SCons.Environment.Environment.
-
-Environment = Base
-
-# An entry point for returning a proxy subclass instance that overrides
-# the subst*() methods so they don't actually perform construction
-# variable substitution. This is specifically intended to be the shim
-# layer in between global function calls (which don't want construction
-# variable substitution) and the DefaultEnvironment() (which would
-# substitute variables if left to its own devices)."""
-#
-# We have to wrap this in a function that allows us to delay definition of
-# the class until it's necessary, so that when it subclasses Environment
-# it will pick up whatever Environment subclass the wrapper interface
-# might have assigned to SCons.Environment.Environment.
-
-def NoSubstitutionProxy(subject):
- class _NoSubstitutionProxy(Environment):
- def __init__(self, subject):
- self.__dict__['__subject'] = subject
- def __getattr__(self, name):
- return getattr(self.__dict__['__subject'], name)
- def __setattr__(self, name, value):
- return setattr(self.__dict__['__subject'], name, value)
- def raw_to_mode(self, dict):
- try:
- raw = dict['raw']
- except KeyError:
- pass
- else:
- del dict['raw']
- dict['mode'] = raw
- def subst(self, string, *args, **kwargs):
- return string
- def subst_kw(self, kw, *args, **kwargs):
- return kw
- def subst_list(self, string, *args, **kwargs):
- nargs = (string, self,) + args
- nkw = kwargs.copy()
- nkw['gvars'] = {}
- self.raw_to_mode(nkw)
- return apply(SCons.Subst.scons_subst_list, nargs, nkw)
- def subst_target_source(self, string, *args, **kwargs):
- nargs = (string, self,) + args
- nkw = kwargs.copy()
- nkw['gvars'] = {}
- self.raw_to_mode(nkw)
- return apply(SCons.Subst.scons_subst, nargs, nkw)
- return _NoSubstitutionProxy(subject)
+"""SCons.Environment
+
+Base class for construction Environments. These are
+the primary objects used to communicate dependency and
+construction information to the build engine.
+
+Keyword arguments supplied when the construction Environment
+is created are construction variables used to initialize the
+Environment
+"""
+
+#
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "src/engine/SCons/Environment.py 3603 2008/10/10 05:46:45 scons"
+
+
+import copy
+import os
+import sys
+import re
+import shlex
+import string
+from UserDict import UserDict
+
+import SCons.Action
+import SCons.Builder
+from SCons.Debug import logInstanceCreation
+import SCons.Defaults
+import SCons.Errors
+import SCons.Memoize
+import SCons.Node
+import SCons.Node.Alias
+import SCons.Node.FS
+import SCons.Node.Python
+import SCons.Platform
+import SCons.SConsign
+import SCons.Subst
+import SCons.Tool
+import SCons.Util
+import SCons.Warnings
+
+class _Null:
+ pass
+
+_null = _Null
+
+_warn_copy_deprecated = True
+_warn_source_signatures_deprecated = True
+_warn_target_signatures_deprecated = True
+
+CleanTargets = {}
+CalculatorArgs = {}
+
+semi_deepcopy = SCons.Util.semi_deepcopy
+
+# Pull UserError into the global name space for the benefit of
+# Environment().SourceSignatures(), which has some import statements
+# which seem to mess up its ability to reference SCons directly.
+UserError = SCons.Errors.UserError
+
+def alias_builder(env, target, source):
+ pass
+
+AliasBuilder = SCons.Builder.Builder(action = alias_builder,
+ target_factory = SCons.Node.Alias.default_ans.Alias,
+ source_factory = SCons.Node.FS.Entry,
+ multi = 1,
+ is_explicit = None,
+ name='AliasBuilder')
+
+def apply_tools(env, tools, toolpath):
+ # Store the toolpath in the Environment.
+ if toolpath is not None:
+ env['toolpath'] = toolpath
+
+ if not tools:
+ return
+ # Filter out null tools from the list.
+ for tool in filter(None, tools):
+ if SCons.Util.is_List(tool) or type(tool)==type(()):
+ toolname = tool[0]
+ toolargs = tool[1] # should be a dict of kw args
+ tool = apply(env.Tool, [toolname], toolargs)
+ else:
+ env.Tool(tool)
+
+# These names are controlled by SCons; users should never set or override
+# them. This warning can optionally be turned off, but scons will still
+# ignore the illegal variable names even if it's off.
+reserved_construction_var_names = \
+ ['TARGET', 'TARGETS', 'SOURCE', 'SOURCES']
+
+def copy_non_reserved_keywords(dict):
+ result = semi_deepcopy(dict)
+ for k in result.keys():
+ if k in reserved_construction_var_names:
+ SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning,
+ "Ignoring attempt to set reserved variable `%s'" % k)
+ del result[k]
+ return result
+
+def _set_reserved(env, key, value):
+ msg = "Ignoring attempt to set reserved variable `%s'" % key
+ SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning, msg)
+
+def _set_BUILDERS(env, key, value):
+ try:
+ bd = env._dict[key]
+ for k in bd.keys():
+ del bd[k]
+ except KeyError:
+ bd = BuilderDict(kwbd, env)
+ env._dict[key] = bd
+ bd.update(value)
+
+def _del_SCANNERS(env, key):
+ del env._dict[key]
+ env.scanner_map_delete()
+
+def _set_SCANNERS(env, key, value):
+ env._dict[key] = value
+ env.scanner_map_delete()
+
+
+
+# The following is partly based on code in a comment added by Peter
+# Shannon at the following page (there called the "transplant" class):
+#
+# ASPN : Python Cookbook : Dynamically added methods to a class
+# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/81732
+#
+# We had independently been using the idiom as BuilderWrapper, but
+# factoring out the common parts into this base class, and making
+# BuilderWrapper a subclass that overrides __call__() to enforce specific
+# Builder calling conventions, simplified some of our higher-layer code.
+
+class MethodWrapper:
+ """
+ A generic Wrapper class that associates a method (which can
+ actually be any callable) with an object. As part of creating this
+ MethodWrapper object an attribute with the specified (by default,
+ the name of the supplied method) is added to the underlying object.
+ When that new "method" is called, our __call__() method adds the
+ object as the first argument, simulating the Python behavior of
+ supplying "self" on method calls.
+
+ We hang on to the name by which the method was added to the underlying
+ base class so that we can provide a method to "clone" ourselves onto
+ a new underlying object being copied (without which we wouldn't need
+ to save that info).
+ """
+ def __init__(self, object, method, name=None):
+ if name is None:
+ name = method.__name__
+ self.object = object
+ self.method = method
+ self.name = name
+ setattr(self.object, name, self)
+
+ def __call__(self, *args, **kwargs):
+ nargs = (self.object,) + args
+ return apply(self.method, nargs, kwargs)
+
+ def clone(self, new_object):
+ """
+ Returns an object that re-binds the underlying "method" to
+ the specified new object.
+ """
+ return self.__class__(new_object, self.method, self.name)
+
+class BuilderWrapper(MethodWrapper):
+ """
+ A MethodWrapper subclass that that associates an environment with
+ a Builder.
+
+ This mainly exists to wrap the __call__() function so that all calls
+ to Builders can have their argument lists massaged in the same way
+ (treat a lone argument as the source, treat two arguments as target
+ then source, make sure both target and source are lists) without
+ having to have cut-and-paste code to do it.
+
+ As a bit of obsessive backwards compatibility, we also intercept
+ attempts to get or set the "env" or "builder" attributes, which were
+ the names we used before we put the common functionality into the
+ MethodWrapper base class. We'll keep this around for a while in case
+ people shipped Tool modules that reached into the wrapper (like the
+ Tool/qt.py module does, or did). There shouldn't be a lot attribute
+ fetching or setting on these, so a little extra work shouldn't hurt.
+ """
+ def __call__(self, target=None, source=_null, *args, **kw):
+ if source is _null:
+ source = target
+ target = None
+ if not target is None and not SCons.Util.is_List(target):
+ target = [target]
+ if not source is None and not SCons.Util.is_List(source):
+ source = [source]
+ return apply(MethodWrapper.__call__, (self, target, source) + args, kw)
+
+ def __repr__(self):
+ fmt = '<BuilderWrapper %s instance at 0x%08X>'
+ return fmt % (repr(self.name), id(self))
+
+ def __str__(self):
+ return self.__repr__()
+
+ def __getattr__(self, name):
+ if name == 'env':
+ return self.object
+ elif name == 'builder':
+ return self.method
+ else:
+ raise AttributeError, name
+
+ def __setattr__(self, name, value):
+ if name == 'env':
+ self.object = value
+ elif name == 'builder':
+ self.method = value
+ else:
+ self.__dict__[name] = value
+
+ # This allows a Builder to be executed directly
+ # through the Environment to which it's attached.
+ # In practice, we shouldn't need this, because
+ # builders actually get executed through a Node.
+ # But we do have a unit test for this, and can't
+ # yet rule out that it would be useful in the
+ # future, so leave it for now.
+ #def execute(self, **kw):
+ # kw['env'] = self.env
+ # apply(self.builder.execute, (), kw)
+
+class BuilderDict(UserDict):
+ """This is a dictionary-like class used by an Environment to hold
+ the Builders. We need to do this because every time someone changes
+ the Builders in the Environment's BUILDERS dictionary, we must
+ update the Environment's attributes."""
+ def __init__(self, dict, env):
+ # Set self.env before calling the superclass initialization,
+ # because it will end up calling our other methods, which will
+ # need to point the values in this dictionary to self.env.
+ self.env = env
+ UserDict.__init__(self, dict)
+
+ def __semi_deepcopy__(self):
+ return self.__class__(self.data, self.env)
+
+ def __setitem__(self, item, val):
+ try:
+ method = getattr(self.env, item).method
+ except AttributeError:
+ pass
+ else:
+ self.env.RemoveMethod(method)
+ UserDict.__setitem__(self, item, val)
+ BuilderWrapper(self.env, val, item)
+
+ def __delitem__(self, item):
+ UserDict.__delitem__(self, item)
+ delattr(self.env, item)
+
+ def update(self, dict):
+ for i, v in dict.items():
+ self.__setitem__(i, v)
+
+
+
+_is_valid_var = re.compile(r'[_a-zA-Z]\w*$')
+
+def is_valid_construction_var(varstr):
+ """Return if the specified string is a legitimate construction
+ variable.
+ """
+ return _is_valid_var.match(varstr)
+
+
+
+class SubstitutionEnvironment:
+ """Base class for different flavors of construction environments.
+
+ This class contains a minimal set of methods that handle contruction
+ variable expansion and conversion of strings to Nodes, which may or
+ may not be actually useful as a stand-alone class. Which methods
+ ended up in this class is pretty arbitrary right now. They're
+ basically the ones which we've empirically determined are common to
+ the different construction environment subclasses, and most of the
+ others that use or touch the underlying dictionary of construction
+ variables.
+
+ Eventually, this class should contain all the methods that we
+ determine are necessary for a "minimal" interface to the build engine.
+ A full "native Python" SCons environment has gotten pretty heavyweight
+ with all of the methods and Tools and construction variables we've
+ jammed in there, so it would be nice to have a lighter weight
+ alternative for interfaces that don't need all of the bells and
+ whistles. (At some point, we'll also probably rename this class
+ "Base," since that more reflects what we want this class to become,
+ but because we've released comments that tell people to subclass
+ Environment.Base to create their own flavors of construction
+ environment, we'll save that for a future refactoring when this
+ class actually becomes useful.)
+ """
+
+ if SCons.Memoize.use_memoizer:
+ __metaclass__ = SCons.Memoize.Memoized_Metaclass
+
+ def __init__(self, **kw):
+ """Initialization of an underlying SubstitutionEnvironment class.
+ """
+ if __debug__: logInstanceCreation(self, 'Environment.SubstitutionEnvironment')
+ self.fs = SCons.Node.FS.get_default_fs()
+ self.ans = SCons.Node.Alias.default_ans
+ self.lookup_list = SCons.Node.arg2nodes_lookups
+ self._dict = kw.copy()
+ self._init_special()
+ self.added_methods = []
+ #self._memo = {}
+
+ def _init_special(self):
+ """Initial the dispatch tables for special handling of
+ special construction variables."""
+ self._special_del = {}
+ self._special_del['SCANNERS'] = _del_SCANNERS
+
+ self._special_set = {}
+ for key in reserved_construction_var_names:
+ self._special_set[key] = _set_reserved
+ self._special_set['BUILDERS'] = _set_BUILDERS
+ self._special_set['SCANNERS'] = _set_SCANNERS
+
+ # Freeze the keys of self._special_set in a list for use by
+ # methods that need to check. (Empirically, list scanning has
+ # gotten better than dict.has_key() in Python 2.5.)
+ self._special_set_keys = self._special_set.keys()
+
+ def __cmp__(self, other):
+ return cmp(self._dict, other._dict)
+
+ def __delitem__(self, key):
+ special = self._special_del.get(key)
+ if special:
+ special(self, key)
+ else:
+ del self._dict[key]
+
+ def __getitem__(self, key):
+ return self._dict[key]
+
+ def __setitem__(self, key, value):
+ # This is heavily used. This implementation is the best we have
+ # according to the timings in bench/env.__setitem__.py.
+ #
+ # The "key in self._special_set_keys" test here seems to perform
+ # pretty well for the number of keys we have. A hard-coded
+ # list works a little better in Python 2.5, but that has the
+ # disadvantage of maybe getting out of sync if we ever add more
+ # variable names. Using self._special_set.has_key() works a
+ # little better in Python 2.4, but is worse then this test.
+ # So right now it seems like a good trade-off, but feel free to
+ # revisit this with bench/env.__setitem__.py as needed (and
+ # as newer versions of Python come out).
+ if key in self._special_set_keys:
+ self._special_set[key](self, key, value)
+ else:
+ # If we already have the entry, then it's obviously a valid
+ # key and we don't need to check. If we do check, using a
+ # global, pre-compiled regular expression directly is more
+ # efficient than calling another function or a method.
+ if not self._dict.has_key(key) \
+ and not _is_valid_var.match(key):
+ raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
+ self._dict[key] = value
+
+ def get(self, key, default=None):
+ "Emulates the get() method of dictionaries."""
+ return self._dict.get(key, default)
+
+ def has_key(self, key):
+ return self._dict.has_key(key)
+
+ def items(self):
+ return self._dict.items()
+
+ def arg2nodes(self, args, node_factory=_null, lookup_list=_null, **kw):
+ if node_factory is _null:
+ node_factory = self.fs.File
+ if lookup_list is _null:
+ lookup_list = self.lookup_list
+
+ if not args:
+ return []
+
+ args = SCons.Util.flatten(args)
+
+ nodes = []
+ for v in args:
+ if SCons.Util.is_String(v):
+ n = None
+ for l in lookup_list:
+ n = l(v)
+ if not n is None:
+ break
+ if not n is None:
+ if SCons.Util.is_String(n):
+ # n = self.subst(n, raw=1, **kw)
+ kw['raw'] = 1
+ n = apply(self.subst, (n,), kw)
+ if node_factory:
+ n = node_factory(n)
+ if SCons.Util.is_List(n):
+ nodes.extend(n)
+ else:
+ nodes.append(n)
+ elif node_factory:
+ # v = node_factory(self.subst(v, raw=1, **kw))
+ kw['raw'] = 1
+ v = node_factory(apply(self.subst, (v,), kw))
+ if SCons.Util.is_List(v):
+ nodes.extend(v)
+ else:
+ nodes.append(v)
+ else:
+ nodes.append(v)
+
+ return nodes
+
+ def gvars(self):
+ return self._dict
+
+ def lvars(self):
+ return {}
+
+ def subst(self, string, raw=0, target=None, source=None, conv=None):
+ """Recursively interpolates construction variables from the
+ Environment into the specified string, returning the expanded
+ result. Construction variables are specified by a $ prefix
+ in the string and begin with an initial underscore or
+ alphabetic character followed by any number of underscores
+ or alphanumeric characters. The construction variable names
+ may be surrounded by curly braces to separate the name from
+ trailing characters.
+ """
+ gvars = self.gvars()
+ lvars = self.lvars()
+ lvars['__env__'] = self
+ return SCons.Subst.scons_subst(string, self, raw, target, source, gvars, lvars, conv)
+
+ def subst_kw(self, kw, raw=0, target=None, source=None):
+ nkw = {}
+ for k, v in kw.items():
+ k = self.subst(k, raw, target, source)
+ if SCons.Util.is_String(v):
+ v = self.subst(v, raw, target, source)
+ nkw[k] = v
+ return nkw
+
+ def subst_list(self, string, raw=0, target=None, source=None, conv=None):
+ """Calls through to SCons.Subst.scons_subst_list(). See
+ the documentation for that function."""
+ gvars = self.gvars()
+ lvars = self.lvars()
+ lvars['__env__'] = self
+ return SCons.Subst.scons_subst_list(string, self, raw, target, source, gvars, lvars, conv)
+
+ def subst_path(self, path, target=None, source=None):
+ """Substitute a path list, turning EntryProxies into Nodes
+ and leaving Nodes (and other objects) as-is."""
+
+ if not SCons.Util.is_List(path):
+ path = [path]
+
+ def s(obj):
+ """This is the "string conversion" routine that we have our
+ substitutions use to return Nodes, not strings. This relies
+ on the fact that an EntryProxy object has a get() method that
+ returns the underlying Node that it wraps, which is a bit of
+ architectural dependence that we might need to break or modify
+ in the future in response to additional requirements."""
+ try:
+ get = obj.get
+ except AttributeError:
+ obj = SCons.Util.to_String_for_subst(obj)
+ else:
+ obj = get()
+ return obj
+
+ r = []
+ for p in path:
+ if SCons.Util.is_String(p):
+ p = self.subst(p, target=target, source=source, conv=s)
+ if SCons.Util.is_List(p):
+ if len(p) == 1:
+ p = p[0]
+ else:
+ # We have an object plus a string, or multiple
+ # objects that we need to smush together. No choice
+ # but to make them into a string.
+ p = string.join(map(SCons.Util.to_String_for_subst, p), '')
+ else:
+ p = s(p)
+ r.append(p)
+ return r
+
+ subst_target_source = subst
+
+ def backtick(self, command):
+ import subprocess
+ # common arguments
+ kw = { 'stdout' : subprocess.PIPE,
+ 'stderr' : subprocess.PIPE,
+ 'universal_newlines' : True,
+ }
+ # if the command is a list, assume it's been quoted
+ # othewise force a shell
+ if not SCons.Util.is_List(command): kw['shell'] = True
+ # run constructed command
+ #TODO(1.5) p = SCons.Action._subproc(self, command, **kw)
+ p = apply(SCons.Action._subproc, (self, command), kw)
+ out,err = p.communicate()
+ status = p.wait()
+ if err:
+ sys.stderr.write(err)
+ if status:
+ raise OSError("'%s' exited %d" % (command, status))
+ return out
+
+ def AddMethod(self, function, name=None):
+ """
+ Adds the specified function as a method of this construction
+ environment with the specified name. If the name is omitted,
+ the default name is the name of the function itself.
+ """
+ method = MethodWrapper(self, function, name)
+ self.added_methods.append(method)
+
+ def RemoveMethod(self, function):
+ """
+ Removes the specified function's MethodWrapper from the
+ added_methods list, so we don't re-bind it when making a clone.
+ """
+ is_not_func = lambda dm, f=function: not dm.method is f
+ self.added_methods = filter(is_not_func, self.added_methods)
+
+ def Override(self, overrides):
+ """
+ Produce a modified environment whose variables are overriden by
+ the overrides dictionaries. "overrides" is a dictionary that
+ will override the variables of this environment.
+
+ This function is much more efficient than Clone() or creating
+ a new Environment because it doesn't copy the construction
+ environment dictionary, it just wraps the underlying construction
+ environment, and doesn't even create a wrapper object if there
+ are no overrides.
+ """
+ if not overrides: return self
+ o = copy_non_reserved_keywords(overrides)
+ if not o: return self
+ overrides = {}
+ merges = None
+ for key, value in o.items():
+ if key == 'parse_flags':
+ merges = value
+ else:
+ overrides[key] = SCons.Subst.scons_subst_once(value, self, key)
+ env = OverrideEnvironment(self, overrides)
+ if merges: env.MergeFlags(merges)
+ return env
+
+ def ParseFlags(self, *flags):
+ """
+ Parse the set of flags and return a dict with the flags placed
+ in the appropriate entry. The flags are treated as a typical
+ set of command-line flags for a GNU-like toolchain and used to
+ populate the entries in the dict immediately below. If one of
+ the flag strings begins with a bang (exclamation mark), it is
+ assumed to be a command and the rest of the string is executed;
+ the result of that evaluation is then added to the dict.
+ """
+ dict = {
+ 'ASFLAGS' : SCons.Util.CLVar(''),
+ 'CFLAGS' : SCons.Util.CLVar(''),
+ 'CCFLAGS' : SCons.Util.CLVar(''),
+ 'CPPDEFINES' : [],
+ 'CPPFLAGS' : SCons.Util.CLVar(''),
+ 'CPPPATH' : [],
+ 'FRAMEWORKPATH' : SCons.Util.CLVar(''),
+ 'FRAMEWORKS' : SCons.Util.CLVar(''),
+ 'LIBPATH' : [],
+ 'LIBS' : [],
+ 'LINKFLAGS' : SCons.Util.CLVar(''),
+ 'RPATH' : [],
+ }
+
+ # The use of the "me" parameter to provide our own name for
+ # recursion is an egregious hack to support Python 2.1 and before.
+ def do_parse(arg, me, self = self, dict = dict):
+ # if arg is a sequence, recurse with each element
+ if not arg:
+ return
+
+ if not SCons.Util.is_String(arg):
+ for t in arg: me(t, me)
+ return
+
+ # if arg is a command, execute it
+ if arg[0] == '!':
+ arg = self.backtick(arg[1:])
+
+ # utility function to deal with -D option
+ def append_define(name, dict = dict):
+ t = string.split(name, '=')
+ if len(t) == 1:
+ dict['CPPDEFINES'].append(name)
+ else:
+ dict['CPPDEFINES'].append([t[0], string.join(t[1:], '=')])
+
+ # Loop through the flags and add them to the appropriate option.
+ # This tries to strike a balance between checking for all possible
+ # flags and keeping the logic to a finite size, so it doesn't
+ # check for some that don't occur often. It particular, if the
+ # flag is not known to occur in a config script and there's a way
+ # of passing the flag to the right place (by wrapping it in a -W
+ # flag, for example) we don't check for it. Note that most
+ # preprocessor options are not handled, since unhandled options
+ # are placed in CCFLAGS, so unless the preprocessor is invoked
+ # separately, these flags will still get to the preprocessor.
+ # Other options not currently handled:
+ # -iqoutedir (preprocessor search path)
+ # -u symbol (linker undefined symbol)
+ # -s (linker strip files)
+ # -static* (linker static binding)
+ # -shared* (linker dynamic binding)
+ # -symbolic (linker global binding)
+ # -R dir (deprecated linker rpath)
+ # IBM compilers may also accept -qframeworkdir=foo
+
+ params = shlex.split(arg)
+ append_next_arg_to = None # for multi-word args
+ for arg in params:
+ if append_next_arg_to:
+ if append_next_arg_to == 'CPPDEFINES':
+ append_define(arg)
+ elif append_next_arg_to == '-include':
+ t = ('-include', self.fs.File(arg))
+ dict['CCFLAGS'].append(t)
+ elif append_next_arg_to == '-isysroot':
+ t = ('-isysroot', arg)
+ dict['CCFLAGS'].append(t)
+ dict['LINKFLAGS'].append(t)
+ elif append_next_arg_to == '-arch':
+ t = ('-arch', arg)
+ dict['CCFLAGS'].append(t)
+ dict['LINKFLAGS'].append(t)
+ else:
+ dict[append_next_arg_to].append(arg)
+ append_next_arg_to = None
+ elif not arg[0] in ['-', '+']:
+ dict['LIBS'].append(self.fs.File(arg))
+ elif arg[:2] == '-L':
+ if arg[2:]:
+ dict['LIBPATH'].append(arg[2:])
+ else:
+ append_next_arg_to = 'LIBPATH'
+ elif arg[:2] == '-l':
+ if arg[2:]:
+ dict['LIBS'].append(arg[2:])
+ else:
+ append_next_arg_to = 'LIBS'
+ elif arg[:2] == '-I':
+ if arg[2:]:
+ dict['CPPPATH'].append(arg[2:])
+ else:
+ append_next_arg_to = 'CPPPATH'
+ elif arg[:4] == '-Wa,':
+ dict['ASFLAGS'].append(arg[4:])
+ dict['CCFLAGS'].append(arg)
+ elif arg[:4] == '-Wl,':
+ if arg[:11] == '-Wl,-rpath=':
+ dict['RPATH'].append(arg[11:])
+ elif arg[:7] == '-Wl,-R,':
+ dict['RPATH'].append(arg[7:])
+ elif arg[:6] == '-Wl,-R':
+ dict['RPATH'].append(arg[6:])
+ else:
+ dict['LINKFLAGS'].append(arg)
+ elif arg[:4] == '-Wp,':
+ dict['CPPFLAGS'].append(arg)
+ elif arg[:2] == '-D':
+ if arg[2:]:
+ append_define(arg[2:])
+ else:
+ append_next_arg_to = 'CPPDEFINES'
+ elif arg == '-framework':
+ append_next_arg_to = 'FRAMEWORKS'
+ elif arg[:14] == '-frameworkdir=':
+ dict['FRAMEWORKPATH'].append(arg[14:])
+ elif arg[:2] == '-F':
+ if arg[2:]:
+ dict['FRAMEWORKPATH'].append(arg[2:])
+ else:
+ append_next_arg_to = 'FRAMEWORKPATH'
+ elif arg == '-mno-cygwin':
+ dict['CCFLAGS'].append(arg)
+ dict['LINKFLAGS'].append(arg)
+ elif arg == '-mwindows':
+ dict['LINKFLAGS'].append(arg)
+ elif arg == '-pthread':
+ dict['CCFLAGS'].append(arg)
+ dict['LINKFLAGS'].append(arg)
+ elif arg[:5] == '-std=':
+ dict['CFLAGS'].append(arg) # C only
+ elif arg[0] == '+':
+ dict['CCFLAGS'].append(arg)
+ dict['LINKFLAGS'].append(arg)
+ elif arg in ['-include', '-isysroot', '-arch']:
+ append_next_arg_to = arg
+ else:
+ dict['CCFLAGS'].append(arg)
+
+ for arg in flags:
+ do_parse(arg, do_parse)
+ return dict
+
+ def MergeFlags(self, args, unique=1, dict=None):
+ """
+ Merge the dict in args into the construction variables of this
+ env, or the passed-in dict. If args is not a dict, it is
+ converted into a dict using ParseFlags. If unique is not set,
+ the flags are appended rather than merged.
+ """
+
+ if dict is None:
+ dict = self
+ if not SCons.Util.is_Dict(args):
+ args = self.ParseFlags(args)
+ if not unique:
+ apply(self.Append, (), args)
+ return self
+ for key, value in args.items():
+ if not value:
+ continue
+ try:
+ orig = self[key]
+ except KeyError:
+ orig = value
+ else:
+ if not orig:
+ orig = value
+ elif value:
+ # Add orig and value. The logic here was lifted from
+ # part of env.Append() (see there for a lot of comments
+ # about the order in which things are tried) and is
+ # used mainly to handle coercion of strings to CLVar to
+ # "do the right thing" given (e.g.) an original CCFLAGS
+ # string variable like '-pipe -Wall'.
+ try:
+ orig = orig + value
+ except (KeyError, TypeError):
+ try:
+ add_to_orig = orig.append
+ except AttributeError:
+ value.insert(0, orig)
+ orig = value
+ else:
+ add_to_orig(value)
+ t = []
+ if key[-4:] == 'PATH':
+ ### keep left-most occurence
+ for v in orig:
+ if v not in t:
+ t.append(v)
+ else:
+ ### keep right-most occurence
+ orig.reverse()
+ for v in orig:
+ if v not in t:
+ t.insert(0, v)
+ self[key] = t
+ return self
+
+# def MergeShellPaths(self, args, prepend=1):
+# """
+# Merge the dict in args into the shell environment in env['ENV'].
+# Shell path elements are appended or prepended according to prepend.
+
+# Uses Pre/AppendENVPath, so it always appends or prepends uniquely.
+
+# Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'})
+# prepends /usr/local/lib to env['ENV']['LIBPATH'].
+# """
+
+# for pathname, pathval in args.items():
+# if not pathval:
+# continue
+# if prepend:
+# apply(self.PrependENVPath, (pathname, pathval))
+# else:
+# apply(self.AppendENVPath, (pathname, pathval))
+
+
+# Used by the FindSourceFiles() method, below.
+# Stuck here for support of pre-2.2 Python versions.
+def build_source(ss, result):
+ for s in ss:
+ if isinstance(s, SCons.Node.FS.Dir):
+ build_source(s.all_children(), result)
+ elif s.has_builder():
+ build_source(s.sources, result)
+ elif isinstance(s.disambiguate(), SCons.Node.FS.File):
+ result.append(s)
+
+def default_decide_source(dependency, target, prev_ni):
+ f = SCons.Defaults.DefaultEnvironment().decide_source
+ return f(dependency, target, prev_ni)
+
+def default_decide_target(dependency, target, prev_ni):
+ f = SCons.Defaults.DefaultEnvironment().decide_target
+ return f(dependency, target, prev_ni)
+
+def default_copy_from_cache(src, dst):
+ f = SCons.Defaults.DefaultEnvironment().copy_from_cache
+ return f(src, dst)
+
+class Base(SubstitutionEnvironment):
+ """Base class for "real" construction Environments. These are the
+ primary objects used to communicate dependency and construction
+ information to the build engine.
+
+ Keyword arguments supplied when the construction Environment
+ is created are construction variables used to initialize the
+ Environment.
+ """
+
+ if SCons.Memoize.use_memoizer:
+ __metaclass__ = SCons.Memoize.Memoized_Metaclass
+
+ memoizer_counters = []
+
+ #######################################################################
+ # This is THE class for interacting with the SCons build engine,
+ # and it contains a lot of stuff, so we're going to try to keep this
+ # a little organized by grouping the methods.
+ #######################################################################
+
+ #######################################################################
+ # Methods that make an Environment act like a dictionary. These have
+ # the expected standard names for Python mapping objects. Note that
+ # we don't actually make an Environment a subclass of UserDict for
+ # performance reasons. Note also that we only supply methods for
+ # dictionary functionality that we actually need and use.
+ #######################################################################
+
+ def __init__(self,
+ platform=None,
+ tools=None,
+ toolpath=None,
+ variables=None,
+ parse_flags = None,
+ **kw):
+ """
+ Initialization of a basic SCons construction environment,
+ including setting up special construction variables like BUILDER,
+ PLATFORM, etc., and searching for and applying available Tools.
+
+ Note that we do *not* call the underlying base class
+ (SubsitutionEnvironment) initialization, because we need to
+ initialize things in a very specific order that doesn't work
+ with the much simpler base class initialization.
+ """
+ if __debug__: logInstanceCreation(self, 'Environment.Base')
+ self._memo = {}
+ self.fs = SCons.Node.FS.get_default_fs()
+ self.ans = SCons.Node.Alias.default_ans
+ self.lookup_list = SCons.Node.arg2nodes_lookups
+ self._dict = semi_deepcopy(SCons.Defaults.ConstructionEnvironment)
+ self._init_special()
+ self.added_methods = []
+
+ # We don't use AddMethod, or define these as methods in this
+ # class, because we *don't* want these functions to be bound
+ # methods. They need to operate independently so that the
+ # settings will work properly regardless of whether a given
+ # target ends up being built with a Base environment or an
+ # OverrideEnvironment or what have you.
+ self.decide_target = default_decide_target
+ self.decide_source = default_decide_source
+
+ self.copy_from_cache = default_copy_from_cache
+
+ self._dict['BUILDERS'] = BuilderDict(self._dict['BUILDERS'], self)
+
+ if platform is None:
+ platform = self._dict.get('PLATFORM', None)
+ if platform is None:
+ platform = SCons.Platform.Platform()
+ if SCons.Util.is_String(platform):
+ platform = SCons.Platform.Platform(platform)
+ self._dict['PLATFORM'] = str(platform)
+ platform(self)
+
+ # Apply the passed-in and customizable variables to the
+ # environment before calling the tools, because they may use
+ # some of them during initialization.
+ if kw.has_key('options'):
+ # Backwards compatibility: they may stll be using the
+ # old "options" keyword.
+ variables = kw['options']
+ del kw['options']
+ apply(self.Replace, (), kw)
+ keys = kw.keys()
+ if variables:
+ keys = keys + variables.keys()
+ variables.Update(self)
+
+ save = {}
+ for k in keys:
+ try:
+ save[k] = self._dict[k]
+ except KeyError:
+ # No value may have been set if they tried to pass in a
+ # reserved variable name like TARGETS.
+ pass
+
+ SCons.Tool.Initializers(self)
+
+ if tools is None:
+ tools = self._dict.get('TOOLS', None)
+ if tools is None:
+ tools = ['default']
+ apply_tools(self, tools, toolpath)
+
+ # Now restore the passed-in and customized variables
+ # to the environment, since the values the user set explicitly
+ # should override any values set by the tools.
+ for key, val in save.items():
+ self._dict[key] = val
+
+ # Finally, apply any flags to be merged in
+ if parse_flags: self.MergeFlags(parse_flags)
+
+ #######################################################################
+ # Utility methods that are primarily for internal use by SCons.
+ # These begin with lower-case letters.
+ #######################################################################
+
+ def get_builder(self, name):
+ """Fetch the builder with the specified name from the environment.
+ """
+ try:
+ return self._dict['BUILDERS'][name]
+ except KeyError:
+ return None
+
+ def get_CacheDir(self):
+ try:
+ path = self._CacheDir_path
+ except AttributeError:
+ path = SCons.Defaults.DefaultEnvironment()._CacheDir_path
+ try:
+ if path == self._last_CacheDir_path:
+ return self._last_CacheDir
+ except AttributeError:
+ pass
+ cd = SCons.CacheDir.CacheDir(path)
+ self._last_CacheDir_path = path
+ self._last_CacheDir = cd
+ return cd
+
+ def get_factory(self, factory, default='File'):
+ """Return a factory function for creating Nodes for this
+ construction environment.
+ """
+ name = default
+ try:
+ is_node = issubclass(factory, SCons.Node.Node)
+ except TypeError:
+ # The specified factory isn't a Node itself--it's
+ # most likely None, or possibly a callable.
+ pass
+ else:
+ if is_node:
+ # The specified factory is a Node (sub)class. Try to
+ # return the FS method that corresponds to the Node's
+ # name--that is, we return self.fs.Dir if they want a Dir,
+ # self.fs.File for a File, etc.
+ try: name = factory.__name__
+ except AttributeError: pass
+ else: factory = None
+ if not factory:
+ # They passed us None, or we picked up a name from a specified
+ # class, so return the FS method. (Note that we *don't*
+ # use our own self.{Dir,File} methods because that would
+ # cause env.subst() to be called twice on the file name,
+ # interfering with files that have $$ in them.)
+ factory = getattr(self.fs, name)
+ return factory
+
+ memoizer_counters.append(SCons.Memoize.CountValue('_gsm'))
+
+ def _gsm(self):
+ try:
+ return self._memo['_gsm']
+ except KeyError:
+ pass
+
+ result = {}
+
+ try:
+ scanners = self._dict['SCANNERS']
+ except KeyError:
+ pass
+ else:
+ # Reverse the scanner list so that, if multiple scanners
+ # claim they can scan the same suffix, earlier scanners
+ # in the list will overwrite later scanners, so that
+ # the result looks like a "first match" to the user.
+ if not SCons.Util.is_List(scanners):
+ scanners = [scanners]
+ else:
+ scanners = scanners[:] # copy so reverse() doesn't mod original
+ scanners.reverse()
+ for scanner in scanners:
+ for k in scanner.get_skeys(self):
+ result[k] = scanner
+
+ self._memo['_gsm'] = result
+
+ return result
+
+ def get_scanner(self, skey):
+ """Find the appropriate scanner given a key (usually a file suffix).
+ """
+ return self._gsm().get(skey)
+
+ def scanner_map_delete(self, kw=None):
+ """Delete the cached scanner map (if we need to).
+ """
+ try:
+ del self._memo['_gsm']
+ except KeyError:
+ pass
+
+ def _update(self, dict):
+ """Update an environment's values directly, bypassing the normal
+ checks that occur when users try to set items.
+ """
+ self._dict.update(dict)
+
+ def get_src_sig_type(self):
+ try:
+ return self.src_sig_type
+ except AttributeError:
+ t = SCons.Defaults.DefaultEnvironment().src_sig_type
+ self.src_sig_type = t
+ return t
+
+ def get_tgt_sig_type(self):
+ try:
+ return self.tgt_sig_type
+ except AttributeError:
+ t = SCons.Defaults.DefaultEnvironment().tgt_sig_type
+ self.tgt_sig_type = t
+ return t
+
+ #######################################################################
+ # Public methods for manipulating an Environment. These begin with
+ # upper-case letters. The essential characteristic of methods in
+ # this section is that they do *not* have corresponding same-named
+ # global functions. For example, a stand-alone Append() function
+ # makes no sense, because Append() is all about appending values to
+ # an Environment's construction variables.
+ #######################################################################
+
+ def Append(self, **kw):
+ """Append values to existing construction variables
+ in an Environment.
+ """
+ kw = copy_non_reserved_keywords(kw)
+ for key, val in kw.items():
+ # It would be easier on the eyes to write this using
+ # "continue" statements whenever we finish processing an item,
+ # but Python 1.5.2 apparently doesn't let you use "continue"
+ # within try:-except: blocks, so we have to nest our code.
+ try:
+ orig = self._dict[key]
+ except KeyError:
+ # No existing variable in the environment, so just set
+ # it to the new value.
+ self._dict[key] = val
+ else:
+ try:
+ # Check if the original looks like a dictionary.
+ # If it is, we can't just try adding the value because
+ # dictionaries don't have __add__() methods, and
+ # things like UserList will incorrectly coerce the
+ # original dict to a list (which we don't want).
+ update_dict = orig.update
+ except AttributeError:
+ try:
+ # Most straightforward: just try to add them
+ # together. This will work in most cases, when the
+ # original and new values are of compatible types.
+ self._dict[key] = orig + val
+ except (KeyError, TypeError):
+ try:
+ # Check if the original is a list.
+ add_to_orig = orig.append
+ except AttributeError:
+ # The original isn't a list, but the new
+ # value is (by process of elimination),
+ # so insert the original in the new value
+ # (if there's one to insert) and replace
+ # the variable with it.
+ if orig:
+ val.insert(0, orig)
+ self._dict[key] = val
+ else:
+ # The original is a list, so append the new
+ # value to it (if there's a value to append).
+ if val:
+ add_to_orig(val)
+ else:
+ # The original looks like a dictionary, so update it
+ # based on what we think the value looks like.
+ if SCons.Util.is_List(val):
+ for v in val:
+ orig[v] = None
+ else:
+ try:
+ update_dict(val)
+ except (AttributeError, TypeError, ValueError):
+ if SCons.Util.is_Dict(val):
+ for k, v in val.items():
+ orig[k] = v
+ else:
+ orig[val] = None
+ self.scanner_map_delete(kw)
+
+ def AppendENVPath(self, name, newpath, envname = 'ENV',
+ sep = os.pathsep, delete_existing=1):
+ """Append path elements to the path 'name' in the 'ENV'
+ dictionary for this environment. Will only add any particular
+ path once, and will normpath and normcase all paths to help
+ assure this. This can also handle the case where the env
+ variable is a list instead of a string.
+
+ If delete_existing is 0, a newpath which is already in the path
+ will not be moved to the end (it will be left where it is).
+ """
+
+ orig = ''
+ if self._dict.has_key(envname) and self._dict[envname].has_key(name):
+ orig = self._dict[envname][name]
+
+ nv = SCons.Util.AppendPath(orig, newpath, sep, delete_existing)
+
+ if not self._dict.has_key(envname):
+ self._dict[envname] = {}
+
+ self._dict[envname][name] = nv
+
+ def AppendUnique(self, delete_existing=0, **kw):
+ """Append values to existing construction variables
+ in an Environment, if they're not already there.
+ If delete_existing is 1, removes existing values first, so
+ values move to end.
+ """
+ kw = copy_non_reserved_keywords(kw)
+ for key, val in kw.items():
+ if not self._dict.has_key(key) or self._dict[key] in ('', None):
+ self._dict[key] = val
+ elif SCons.Util.is_Dict(self._dict[key]) and \
+ SCons.Util.is_Dict(val):
+ self._dict[key].update(val)
+ elif SCons.Util.is_List(val):
+ dk = self._dict[key]
+ if not SCons.Util.is_List(dk):
+ dk = [dk]
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ else:
+ val = filter(lambda x, dk=dk: x not in dk, val)
+ self._dict[key] = dk + val
+ else:
+ dk = self._dict[key]
+ if SCons.Util.is_List(dk):
+ # By elimination, val is not a list. Since dk is a
+ # list, wrap val in a list first.
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = dk + [val]
+ else:
+ if not val in dk:
+ self._dict[key] = dk + [val]
+ else:
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = dk + val
+ self.scanner_map_delete(kw)
+
+ def Clone(self, tools=[], toolpath=None, parse_flags = None, **kw):
+ """Return a copy of a construction Environment. The
+ copy is like a Python "deep copy"--that is, independent
+ copies are made recursively of each objects--except that
+ a reference is copied when an object is not deep-copyable
+ (like a function). There are no references to any mutable
+ objects in the original Environment.
+ """
+ clone = copy.copy(self)
+ clone._dict = semi_deepcopy(self._dict)
+
+ try:
+ cbd = clone._dict['BUILDERS']
+ except KeyError:
+ pass
+ else:
+ clone._dict['BUILDERS'] = BuilderDict(cbd, clone)
+
+ # Check the methods added via AddMethod() and re-bind them to
+ # the cloned environment. Only do this if the attribute hasn't
+ # been overwritten by the user explicitly and still points to
+ # the added method.
+ clone.added_methods = []
+ for mw in self.added_methods:
+ if mw == getattr(self, mw.name):
+ clone.added_methods.append(mw.clone(clone))
+
+ clone._memo = {}
+
+ # Apply passed-in variables before the tools
+ # so the tools can use the new variables
+ kw = copy_non_reserved_keywords(kw)
+ new = {}
+ for key, value in kw.items():
+ new[key] = SCons.Subst.scons_subst_once(value, self, key)
+ apply(clone.Replace, (), new)
+
+ apply_tools(clone, tools, toolpath)
+
+ # apply them again in case the tools overwrote them
+ apply(clone.Replace, (), new)
+
+ # Finally, apply any flags to be merged in
+ if parse_flags: clone.MergeFlags(parse_flags)
+
+ if __debug__: logInstanceCreation(self, 'Environment.EnvironmentClone')
+ return clone
+
+ def Copy(self, *args, **kw):
+ global _warn_copy_deprecated
+ if _warn_copy_deprecated:
+ msg = "The env.Copy() method is deprecated; use the env.Clone() method instead."
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedCopyWarning, msg)
+ _warn_copy_deprecated = False
+ return apply(self.Clone, args, kw)
+
+ def _changed_build(self, dependency, target, prev_ni):
+ if dependency.changed_state(target, prev_ni):
+ return 1
+ return self.decide_source(dependency, target, prev_ni)
+
+ def _changed_content(self, dependency, target, prev_ni):
+ return dependency.changed_content(target, prev_ni)
+
+ def _changed_source(self, dependency, target, prev_ni):
+ target_env = dependency.get_build_env()
+ type = target_env.get_tgt_sig_type()
+ if type == 'source':
+ return target_env.decide_source(dependency, target, prev_ni)
+ else:
+ return target_env.decide_target(dependency, target, prev_ni)
+
+ def _changed_timestamp_then_content(self, dependency, target, prev_ni):
+ return dependency.changed_timestamp_then_content(target, prev_ni)
+
+ def _changed_timestamp_newer(self, dependency, target, prev_ni):
+ return dependency.changed_timestamp_newer(target, prev_ni)
+
+ def _changed_timestamp_match(self, dependency, target, prev_ni):
+ return dependency.changed_timestamp_match(target, prev_ni)
+
+ def _copy_from_cache(self, src, dst):
+ return self.fs.copy(src, dst)
+
+ def _copy2_from_cache(self, src, dst):
+ return self.fs.copy2(src, dst)
+
+ def Decider(self, function):
+ copy_function = self._copy2_from_cache
+ if function in ('MD5', 'content'):
+ if not SCons.Util.md5:
+ raise UserError, "MD5 signatures are not available in this version of Python."
+ function = self._changed_content
+ elif function == 'MD5-timestamp':
+ function = self._changed_timestamp_then_content
+ elif function in ('timestamp-newer', 'make'):
+ function = self._changed_timestamp_newer
+ copy_function = self._copy_from_cache
+ elif function == 'timestamp-match':
+ function = self._changed_timestamp_match
+ elif not callable(function):
+ raise UserError, "Unknown Decider value %s" % repr(function)
+
+ # We don't use AddMethod because we don't want to turn the
+ # function, which only expects three arguments, into a bound
+ # method, which would add self as an initial, fourth argument.
+ self.decide_target = function
+ self.decide_source = function
+
+ self.copy_from_cache = copy_function
+
+ def Detect(self, progs):
+ """Return the first available program in progs.
+ """
+ if not SCons.Util.is_List(progs):
+ progs = [ progs ]
+ for prog in progs:
+ path = self.WhereIs(prog)
+ if path: return prog
+ return None
+
+ def Dictionary(self, *args):
+ if not args:
+ return self._dict
+ dlist = map(lambda x, s=self: s._dict[x], args)
+ if len(dlist) == 1:
+ dlist = dlist[0]
+ return dlist
+
+ def Dump(self, key = None):
+ """
+ Using the standard Python pretty printer, dump the contents of the
+ scons build environment to stdout.
+
+ If the key passed in is anything other than None, then that will
+ be used as an index into the build environment dictionary and
+ whatever is found there will be fed into the pretty printer. Note
+ that this key is case sensitive.
+ """
+ import pprint
+ pp = pprint.PrettyPrinter(indent=2)
+ if key:
+ dict = self.Dictionary(key)
+ else:
+ dict = self.Dictionary()
+ return pp.pformat(dict)
+
+ def FindIxes(self, paths, prefix, suffix):
+ """
+ Search a list of paths for something that matches the prefix and suffix.
+
+ paths - the list of paths or nodes.
+ prefix - construction variable for the prefix.
+ suffix - construction variable for the suffix.
+ """
+
+ suffix = self.subst('$'+suffix)
+ prefix = self.subst('$'+prefix)
+
+ for path in paths:
+ dir,name = os.path.split(str(path))
+ if name[:len(prefix)] == prefix and name[-len(suffix):] == suffix:
+ return path
+
+ def ParseConfig(self, command, function=None, unique=1):
+ """
+ Use the specified function to parse the output of the command
+ in order to modify the current environment. The 'command' can
+ be a string or a list of strings representing a command and
+ its arguments. 'Function' is an optional argument that takes
+ the environment, the output of the command, and the unique flag.
+ If no function is specified, MergeFlags, which treats the output
+ as the result of a typical 'X-config' command (i.e. gtk-config),
+ will merge the output into the appropriate variables.
+ """
+ if function is None:
+ def parse_conf(env, cmd, unique=unique):
+ return env.MergeFlags(cmd, unique)
+ function = parse_conf
+ if SCons.Util.is_List(command):
+ command = string.join(command)
+ command = self.subst(command)
+ return function(self, self.backtick(command))
+
+ def ParseDepends(self, filename, must_exist=None, only_one=0):
+ """
+ Parse a mkdep-style file for explicit dependencies. This is
+ completely abusable, and should be unnecessary in the "normal"
+ case of proper SCons configuration, but it may help make
+ the transition from a Make hierarchy easier for some people
+ to swallow. It can also be genuinely useful when using a tool
+ that can write a .d file, but for which writing a scanner would
+ be too complicated.
+ """
+ filename = self.subst(filename)
+ try:
+ fp = open(filename, 'r')
+ except IOError:
+ if must_exist:
+ raise
+ return
+ lines = SCons.Util.LogicalLines(fp).readlines()
+ lines = filter(lambda l: l[0] != '#', lines)
+ tdlist = []
+ for line in lines:
+ try:
+ target, depends = string.split(line, ':', 1)
+ except (AttributeError, TypeError, ValueError):
+ # Python 1.5.2 throws TypeError if line isn't a string,
+ # Python 2.x throws AttributeError because it tries
+ # to call line.split(). Either can throw ValueError
+ # if the line doesn't split into two or more elements.
+ pass
+ else:
+ tdlist.append((string.split(target), string.split(depends)))
+ if only_one:
+ targets = reduce(lambda x, y: x+y, map(lambda p: p[0], tdlist))
+ if len(targets) > 1:
+ raise SCons.Errors.UserError, "More than one dependency target found in `%s': %s" % (filename, targets)
+ for target, depends in tdlist:
+ self.Depends(target, depends)
+
+ def Platform(self, platform):
+ platform = self.subst(platform)
+ return SCons.Platform.Platform(platform)(self)
+
+ def Prepend(self, **kw):
+ """Prepend values to existing construction variables
+ in an Environment.
+ """
+ kw = copy_non_reserved_keywords(kw)
+ for key, val in kw.items():
+ # It would be easier on the eyes to write this using
+ # "continue" statements whenever we finish processing an item,
+ # but Python 1.5.2 apparently doesn't let you use "continue"
+ # within try:-except: blocks, so we have to nest our code.
+ try:
+ orig = self._dict[key]
+ except KeyError:
+ # No existing variable in the environment, so just set
+ # it to the new value.
+ self._dict[key] = val
+ else:
+ try:
+ # Check if the original looks like a dictionary.
+ # If it is, we can't just try adding the value because
+ # dictionaries don't have __add__() methods, and
+ # things like UserList will incorrectly coerce the
+ # original dict to a list (which we don't want).
+ update_dict = orig.update
+ except AttributeError:
+ try:
+ # Most straightforward: just try to add them
+ # together. This will work in most cases, when the
+ # original and new values are of compatible types.
+ self._dict[key] = val + orig
+ except (KeyError, TypeError):
+ try:
+ # Check if the added value is a list.
+ add_to_val = val.append
+ except AttributeError:
+ # The added value isn't a list, but the
+ # original is (by process of elimination),
+ # so insert the the new value in the original
+ # (if there's one to insert).
+ if val:
+ orig.insert(0, val)
+ else:
+ # The added value is a list, so append
+ # the original to it (if there's a value
+ # to append).
+ if orig:
+ add_to_val(orig)
+ self._dict[key] = val
+ else:
+ # The original looks like a dictionary, so update it
+ # based on what we think the value looks like.
+ if SCons.Util.is_List(val):
+ for v in val:
+ orig[v] = None
+ else:
+ try:
+ update_dict(val)
+ except (AttributeError, TypeError, ValueError):
+ if SCons.Util.is_Dict(val):
+ for k, v in val.items():
+ orig[k] = v
+ else:
+ orig[val] = None
+ self.scanner_map_delete(kw)
+
+ def PrependENVPath(self, name, newpath, envname = 'ENV', sep = os.pathsep,
+ delete_existing=1):
+ """Prepend path elements to the path 'name' in the 'ENV'
+ dictionary for this environment. Will only add any particular
+ path once, and will normpath and normcase all paths to help
+ assure this. This can also handle the case where the env
+ variable is a list instead of a string.
+
+ If delete_existing is 0, a newpath which is already in the path
+ will not be moved to the front (it will be left where it is).
+ """
+
+ orig = ''
+ if self._dict.has_key(envname) and self._dict[envname].has_key(name):
+ orig = self._dict[envname][name]
+
+ nv = SCons.Util.PrependPath(orig, newpath, sep, delete_existing)
+
+ if not self._dict.has_key(envname):
+ self._dict[envname] = {}
+
+ self._dict[envname][name] = nv
+
+ def PrependUnique(self, delete_existing=0, **kw):
+ """Prepend values to existing construction variables
+ in an Environment, if they're not already there.
+ If delete_existing is 1, removes existing values first, so
+ values move to front.
+ """
+ kw = copy_non_reserved_keywords(kw)
+ for key, val in kw.items():
+ if not self._dict.has_key(key) or self._dict[key] in ('', None):
+ self._dict[key] = val
+ elif SCons.Util.is_Dict(self._dict[key]) and \
+ SCons.Util.is_Dict(val):
+ self._dict[key].update(val)
+ elif SCons.Util.is_List(val):
+ dk = self._dict[key]
+ if not SCons.Util.is_List(dk):
+ dk = [dk]
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ else:
+ val = filter(lambda x, dk=dk: x not in dk, val)
+ self._dict[key] = val + dk
+ else:
+ dk = self._dict[key]
+ if SCons.Util.is_List(dk):
+ # By elimination, val is not a list. Since dk is a
+ # list, wrap val in a list first.
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = [val] + dk
+ else:
+ if not val in dk:
+ self._dict[key] = [val] + dk
+ else:
+ if delete_existing:
+ dk = filter(lambda x, val=val: x not in val, dk)
+ self._dict[key] = val + dk
+ self.scanner_map_delete(kw)
+
+ def Replace(self, **kw):
+ """Replace existing construction variables in an Environment
+ with new construction variables and/or values.
+ """
+ try:
+ kwbd = kw['BUILDERS']
+ except KeyError:
+ pass
+ else:
+ kwbd = semi_deepcopy(kwbd)
+ del kw['BUILDERS']
+ self.__setitem__('BUILDERS', kwbd)
+ kw = copy_non_reserved_keywords(kw)
+ self._update(semi_deepcopy(kw))
+ self.scanner_map_delete(kw)
+
+ def ReplaceIxes(self, path, old_prefix, old_suffix, new_prefix, new_suffix):
+ """
+ Replace old_prefix with new_prefix and old_suffix with new_suffix.
+
+ env - Environment used to interpolate variables.
+ path - the path that will be modified.
+ old_prefix - construction variable for the old prefix.
+ old_suffix - construction variable for the old suffix.
+ new_prefix - construction variable for the new prefix.
+ new_suffix - construction variable for the new suffix.
+ """
+ old_prefix = self.subst('$'+old_prefix)
+ old_suffix = self.subst('$'+old_suffix)
+
+ new_prefix = self.subst('$'+new_prefix)
+ new_suffix = self.subst('$'+new_suffix)
+
+ dir,name = os.path.split(str(path))
+ if name[:len(old_prefix)] == old_prefix:
+ name = name[len(old_prefix):]
+ if name[-len(old_suffix):] == old_suffix:
+ name = name[:-len(old_suffix)]
+ return os.path.join(dir, new_prefix+name+new_suffix)
+
+ def SetDefault(self, **kw):
+ for k in kw.keys():
+ if self._dict.has_key(k):
+ del kw[k]
+ apply(self.Replace, (), kw)
+
+ def _find_toolpath_dir(self, tp):
+ return self.fs.Dir(self.subst(tp)).srcnode().abspath
+
+ def Tool(self, tool, toolpath=None, **kw):
+ if SCons.Util.is_String(tool):
+ tool = self.subst(tool)
+ if toolpath is None:
+ toolpath = self.get('toolpath', [])
+ toolpath = map(self._find_toolpath_dir, toolpath)
+ tool = apply(SCons.Tool.Tool, (tool, toolpath), kw)
+ tool(self)
+
+ def WhereIs(self, prog, path=None, pathext=None, reject=[]):
+ """Find prog in the path.
+ """
+ if path is None:
+ try:
+ path = self['ENV']['PATH']
+ except KeyError:
+ pass
+ elif SCons.Util.is_String(path):
+ path = self.subst(path)
+ if pathext is None:
+ try:
+ pathext = self['ENV']['PATHEXT']
+ except KeyError:
+ pass
+ elif SCons.Util.is_String(pathext):
+ pathext = self.subst(pathext)
+ prog = self.subst(prog)
+ path = SCons.Util.WhereIs(prog, path, pathext, reject)
+ if path: return path
+ return None
+
+ #######################################################################
+ # Public methods for doing real "SCons stuff" (manipulating
+ # dependencies, setting attributes on targets, etc.). These begin
+ # with upper-case letters. The essential characteristic of methods
+ # in this section is that they all *should* have corresponding
+ # same-named global functions.
+ #######################################################################
+
+ def Action(self, *args, **kw):
+ def subst_string(a, self=self):
+ if SCons.Util.is_String(a):
+ a = self.subst(a)
+ return a
+ nargs = map(subst_string, args)
+ nkw = self.subst_kw(kw)
+ return apply(SCons.Action.Action, nargs, nkw)
+
+ def AddPreAction(self, files, action):
+ nodes = self.arg2nodes(files, self.fs.Entry)
+ action = SCons.Action.Action(action)
+ uniq = {}
+ for executor in map(lambda n: n.get_executor(), nodes):
+ uniq[executor] = 1
+ for executor in uniq.keys():
+ executor.add_pre_action(action)
+ return nodes
+
+ def AddPostAction(self, files, action):
+ nodes = self.arg2nodes(files, self.fs.Entry)
+ action = SCons.Action.Action(action)
+ uniq = {}
+ for executor in map(lambda n: n.get_executor(), nodes):
+ uniq[executor] = 1
+ for executor in uniq.keys():
+ executor.add_post_action(action)
+ return nodes
+
+ def Alias(self, target, source=[], action=None, **kw):
+ tlist = self.arg2nodes(target, self.ans.Alias)
+ if not SCons.Util.is_List(source):
+ source = [source]
+ source = filter(None, source)
+
+ if not action:
+ if not source:
+ # There are no source files and no action, so just
+ # return a target list of classic Alias Nodes, without
+ # any builder. The externally visible effect is that
+ # this will make the wrapping Script.BuildTask class
+ # say that there's "Nothing to be done" for this Alias,
+ # instead of that it's "up to date."
+ return tlist
+
+ # No action, but there are sources. Re-call all the target
+ # builders to add the sources to each target.
+ result = []
+ for t in tlist:
+ bld = t.get_builder(AliasBuilder)
+ result.extend(bld(self, t, source))
+ return result
+
+ nkw = self.subst_kw(kw)
+ nkw.update({
+ 'action' : SCons.Action.Action(action),
+ 'source_factory' : self.fs.Entry,
+ 'multi' : 1,
+ 'is_explicit' : None,
+ })
+ bld = apply(SCons.Builder.Builder, (), nkw)
+
+ # Apply the Builder separately to each target so that the Aliases
+ # stay separate. If we did one "normal" Builder call with the
+ # whole target list, then all of the target Aliases would be
+ # associated under a single Executor.
+ result = []
+ for t in tlist:
+ # Calling the convert() method will cause a new Executor to be
+ # created from scratch, so we have to explicitly initialize
+ # it with the target's existing sources, plus our new ones,
+ # so nothing gets lost.
+ b = t.get_builder()
+ if b is None or b is AliasBuilder:
+ b = bld
+ else:
+ nkw['action'] = b.action + action
+ b = apply(SCons.Builder.Builder, (), nkw)
+ t.convert()
+ result.extend(b(self, t, t.sources + source))
+ return result
+
+ def AlwaysBuild(self, *targets):
+ tlist = []
+ for t in targets:
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
+ for t in tlist:
+ t.set_always_build()
+ return tlist
+
+ def BuildDir(self, *args, **kw):
+ if kw.has_key('build_dir'):
+ kw['variant_dir'] = kw['build_dir']
+ del kw['build_dir']
+ return apply(self.VariantDir, args, kw)
+
+ def Builder(self, **kw):
+ nkw = self.subst_kw(kw)
+ return apply(SCons.Builder.Builder, [], nkw)
+
+ def CacheDir(self, path):
+ import SCons.CacheDir
+ if not path is None:
+ path = self.subst(path)
+ self._CacheDir_path = path
+
+ def Clean(self, targets, files):
+ global CleanTargets
+ tlist = self.arg2nodes(targets, self.fs.Entry)
+ flist = self.arg2nodes(files, self.fs.Entry)
+ for t in tlist:
+ try:
+ CleanTargets[t].extend(flist)
+ except KeyError:
+ CleanTargets[t] = flist
+
+ def Configure(self, *args, **kw):
+ nargs = [self]
+ if args:
+ nargs = nargs + self.subst_list(args)[0]
+ nkw = self.subst_kw(kw)
+ nkw['_depth'] = kw.get('_depth', 0) + 1
+ try:
+ nkw['custom_tests'] = self.subst_kw(nkw['custom_tests'])
+ except KeyError:
+ pass
+ return apply(SCons.SConf.SConf, nargs, nkw)
+
+ def Command(self, target, source, action, **kw):
+ """Builds the supplied target files from the supplied
+ source files using the supplied action. Action may
+ be any type that the Builder constructor will accept
+ for an action."""
+ bkw = {
+ 'action' : action,
+ 'target_factory' : self.fs.Entry,
+ 'source_factory' : self.fs.Entry,
+ }
+ try: bkw['source_scanner'] = kw['source_scanner']
+ except KeyError: pass
+ else: del kw['source_scanner']
+ bld = apply(SCons.Builder.Builder, (), bkw)
+ return apply(bld, (self, target, source), kw)
+
+ def Depends(self, target, dependency):
+ """Explicity specify that 'target's depend on 'dependency'."""
+ tlist = self.arg2nodes(target, self.fs.Entry)
+ dlist = self.arg2nodes(dependency, self.fs.Entry)
+ for t in tlist:
+ t.add_dependency(dlist)
+ return tlist
+
+ def Dir(self, name, *args, **kw):
+ """
+ """
+ s = self.subst(name)
+ if SCons.Util.is_Sequence(s):
+ result=[]
+ for e in s:
+ result.append(apply(self.fs.Dir, (e,) + args, kw))
+ return result
+ return apply(self.fs.Dir, (s,) + args, kw)
+
+ def NoClean(self, *targets):
+ """Tags a target so that it will not be cleaned by -c"""
+ tlist = []
+ for t in targets:
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
+ for t in tlist:
+ t.set_noclean()
+ return tlist
+
+ def NoCache(self, *targets):
+ """Tags a target so that it will not be cached"""
+ tlist = []
+ for t in targets:
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
+ for t in tlist:
+ t.set_nocache()
+ return tlist
+
+ def Entry(self, name, *args, **kw):
+ """
+ """
+ s = self.subst(name)
+ if SCons.Util.is_Sequence(s):
+ result=[]
+ for e in s:
+ result.append(apply(self.fs.Entry, (e,) + args, kw))
+ return result
+ return apply(self.fs.Entry, (s,) + args, kw)
+
+ def Environment(self, **kw):
+ return apply(SCons.Environment.Environment, [], self.subst_kw(kw))
+
+ def Execute(self, action, *args, **kw):
+ """Directly execute an action through an Environment
+ """
+ action = apply(self.Action, (action,) + args, kw)
+ result = action([], [], self)
+ if isinstance(result, SCons.Errors.BuildError):
+ errstr = result.errstr
+ if result.filename:
+ errstr = result.filename + ': ' + errstr
+ sys.stderr.write("scons: *** %s\n" % errstr)
+ return result.status
+ else:
+ return result
+
+ def File(self, name, *args, **kw):
+ """
+ """
+ s = self.subst(name)
+ if SCons.Util.is_Sequence(s):
+ result=[]
+ for e in s:
+ result.append(apply(self.fs.File, (e,) + args, kw))
+ return result
+ return apply(self.fs.File, (s,) + args, kw)
+
+ def FindFile(self, file, dirs):
+ file = self.subst(file)
+ nodes = self.arg2nodes(dirs, self.fs.Dir)
+ return SCons.Node.FS.find_file(file, tuple(nodes))
+
+ def Flatten(self, sequence):
+ return SCons.Util.flatten(sequence)
+
+ def GetBuildPath(self, files):
+ result = map(str, self.arg2nodes(files, self.fs.Entry))
+ if SCons.Util.is_List(files):
+ return result
+ else:
+ return result[0]
+
+ def Glob(self, pattern, ondisk=True, source=False, strings=False):
+ return self.fs.Glob(self.subst(pattern), ondisk, source, strings)
+
+ def Ignore(self, target, dependency):
+ """Ignore a dependency."""
+ tlist = self.arg2nodes(target, self.fs.Entry)
+ dlist = self.arg2nodes(dependency, self.fs.Entry)
+ for t in tlist:
+ t.add_ignore(dlist)
+ return tlist
+
+ def Literal(self, string):
+ return SCons.Subst.Literal(string)
+
+ def Local(self, *targets):
+ ret = []
+ for targ in targets:
+ if isinstance(targ, SCons.Node.Node):
+ targ.set_local()
+ ret.append(targ)
+ else:
+ for t in self.arg2nodes(targ, self.fs.Entry):
+ t.set_local()
+ ret.append(t)
+ return ret
+
+ def Precious(self, *targets):
+ tlist = []
+ for t in targets:
+ tlist.extend(self.arg2nodes(t, self.fs.Entry))
+ for t in tlist:
+ t.set_precious()
+ return tlist
+
+ def Repository(self, *dirs, **kw):
+ dirs = self.arg2nodes(list(dirs), self.fs.Dir)
+ apply(self.fs.Repository, dirs, kw)
+
+ def Requires(self, target, prerequisite):
+ """Specify that 'prerequisite' must be built before 'target',
+ (but 'target' does not actually depend on 'prerequisite'
+ and need not be rebuilt if it changes)."""
+ tlist = self.arg2nodes(target, self.fs.Entry)
+ plist = self.arg2nodes(prerequisite, self.fs.Entry)
+ for t in tlist:
+ t.add_prerequisite(plist)
+ return tlist
+
+ def Scanner(self, *args, **kw):
+ nargs = []
+ for arg in args:
+ if SCons.Util.is_String(arg):
+ arg = self.subst(arg)
+ nargs.append(arg)
+ nkw = self.subst_kw(kw)
+ return apply(SCons.Scanner.Base, nargs, nkw)
+
+ def SConsignFile(self, name=".sconsign", dbm_module=None):
+ if not name is None:
+ name = self.subst(name)
+ if not os.path.isabs(name):
+ name = os.path.join(str(self.fs.SConstruct_dir), name)
+ if name:
+ name = os.path.normpath(name)
+ sconsign_dir = os.path.dirname(name)
+ if sconsign_dir and not os.path.exists(sconsign_dir):
+ self.Execute(SCons.Defaults.Mkdir(sconsign_dir))
+ SCons.SConsign.File(name, dbm_module)
+
+ def SideEffect(self, side_effect, target):
+ """Tell scons that side_effects are built as side
+ effects of building targets."""
+ side_effects = self.arg2nodes(side_effect, self.fs.Entry)
+ targets = self.arg2nodes(target, self.fs.Entry)
+
+ for side_effect in side_effects:
+ if side_effect.multiple_side_effect_has_builder():
+ raise SCons.Errors.UserError, "Multiple ways to build the same target were specified for: %s" % str(side_effect)
+ side_effect.add_source(targets)
+ side_effect.side_effect = 1
+ self.Precious(side_effect)
+ for target in targets:
+ target.side_effects.append(side_effect)
+ return side_effects
+
+ def SourceCode(self, entry, builder):
+ """Arrange for a source code builder for (part of) a tree."""
+ entries = self.arg2nodes(entry, self.fs.Entry)
+ for entry in entries:
+ entry.set_src_builder(builder)
+ return entries
+
+ def SourceSignatures(self, type):
+ global _warn_source_signatures_deprecated
+ if _warn_source_signatures_deprecated:
+ msg = "The env.SourceSignatures() method is deprecated;\n" + \
+ "\tconvert your build to use the env.Decider() method instead."
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceSignaturesWarning, msg)
+ _warn_source_signatures_deprecated = False
+ type = self.subst(type)
+ self.src_sig_type = type
+ if type == 'MD5':
+ if not SCons.Util.md5:
+ raise UserError, "MD5 signatures are not available in this version of Python."
+ self.decide_source = self._changed_content
+ elif type == 'timestamp':
+ self.decide_source = self._changed_timestamp_match
+ else:
+ raise UserError, "Unknown source signature type '%s'" % type
+
+ def Split(self, arg):
+ """This function converts a string or list into a list of strings
+ or Nodes. This makes things easier for users by allowing files to
+ be specified as a white-space separated list to be split.
+ The input rules are:
+ - A single string containing names separated by spaces. These will be
+ split apart at the spaces.
+ - A single Node instance
+ - A list containing either strings or Node instances. Any strings
+ in the list are not split at spaces.
+ In all cases, the function returns a list of Nodes and strings."""
+ if SCons.Util.is_List(arg):
+ return map(self.subst, arg)
+ elif SCons.Util.is_String(arg):
+ return string.split(self.subst(arg))
+ else:
+ return [self.subst(arg)]
+
+ def TargetSignatures(self, type):
+ global _warn_target_signatures_deprecated
+ if _warn_target_signatures_deprecated:
+ msg = "The env.TargetSignatures() method is deprecated;\n" + \
+ "\tconvert your build to use the env.Decider() method instead."
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedTargetSignaturesWarning, msg)
+ _warn_target_signatures_deprecated = False
+ type = self.subst(type)
+ self.tgt_sig_type = type
+ if type in ('MD5', 'content'):
+ if not SCons.Util.md5:
+ raise UserError, "MD5 signatures are not available in this version of Python."
+ self.decide_target = self._changed_content
+ elif type == 'timestamp':
+ self.decide_target = self._changed_timestamp_match
+ elif type == 'build':
+ self.decide_target = self._changed_build
+ elif type == 'source':
+ self.decide_target = self._changed_source
+ else:
+ raise UserError, "Unknown target signature type '%s'"%type
+
+ def Value(self, value, built_value=None):
+ """
+ """
+ return SCons.Node.Python.Value(value, built_value)
+
+ def VariantDir(self, variant_dir, src_dir, duplicate=1):
+ variant_dir = self.arg2nodes(variant_dir, self.fs.Dir)[0]
+ src_dir = self.arg2nodes(src_dir, self.fs.Dir)[0]
+ self.fs.VariantDir(variant_dir, src_dir, duplicate)
+
+ def FindSourceFiles(self, node='.'):
+ """ returns a list of all source files.
+ """
+ node = self.arg2nodes(node, self.fs.Entry)[0]
+
+ sources = []
+ # Uncomment this and get rid of the global definition when we
+ # drop support for pre-2.2 Python versions.
+ #def build_source(ss, result):
+ # for s in ss:
+ # if isinstance(s, SCons.Node.FS.Dir):
+ # build_source(s.all_children(), result)
+ # elif s.has_builder():
+ # build_source(s.sources, result)
+ # elif isinstance(s.disambiguate(), SCons.Node.FS.File):
+ # result.append(s)
+ build_source(node.all_children(), sources)
+
+ # now strip the build_node from the sources by calling the srcnode
+ # function
+ def get_final_srcnode(file):
+ srcnode = file.srcnode()
+ while srcnode != file.srcnode():
+ srcnode = file.srcnode()
+ return srcnode
+
+ # get the final srcnode for all nodes, this means stripping any
+ # attached build node.
+ map( get_final_srcnode, sources )
+
+ # remove duplicates
+ return list(set(sources))
+
+ def FindInstalledFiles(self):
+ """ returns the list of all targets of the Install and InstallAs Builder.
+ """
+ from SCons.Tool import install
+ if install._UNIQUE_INSTALLED_FILES is None:
+ install._UNIQUE_INSTALLED_FILES = SCons.Util.uniquer_hashables(install._INSTALLED_FILES)
+ return install._UNIQUE_INSTALLED_FILES
+
+class OverrideEnvironment(Base):
+ """A proxy that overrides variables in a wrapped construction
+ environment by returning values from an overrides dictionary in
+ preference to values from the underlying subject environment.
+
+ This is a lightweight (I hope) proxy that passes through most use of
+ attributes to the underlying Environment.Base class, but has just
+ enough additional methods defined to act like a real construction
+ environment with overridden values. It can wrap either a Base
+ construction environment, or another OverrideEnvironment, which
+ can in turn nest arbitrary OverrideEnvironments...
+
+ Note that we do *not* call the underlying base class
+ (SubsitutionEnvironment) initialization, because we get most of those
+ from proxying the attributes of the subject construction environment.
+ But because we subclass SubstitutionEnvironment, this class also
+ has inherited arg2nodes() and subst*() methods; those methods can't
+ be proxied because they need *this* object's methods to fetch the
+ values from the overrides dictionary.
+ """
+
+ if SCons.Memoize.use_memoizer:
+ __metaclass__ = SCons.Memoize.Memoized_Metaclass
+
+ def __init__(self, subject, overrides={}):
+ if __debug__: logInstanceCreation(self, 'Environment.OverrideEnvironment')
+ self.__dict__['__subject'] = subject
+ self.__dict__['overrides'] = overrides
+
+ # Methods that make this class act like a proxy.
+ def __getattr__(self, name):
+ return getattr(self.__dict__['__subject'], name)
+ def __setattr__(self, name, value):
+ setattr(self.__dict__['__subject'], name, value)
+
+ # Methods that make this class act like a dictionary.
+ def __getitem__(self, key):
+ try:
+ return self.__dict__['overrides'][key]
+ except KeyError:
+ return self.__dict__['__subject'].__getitem__(key)
+ def __setitem__(self, key, value):
+ if not is_valid_construction_var(key):
+ raise SCons.Errors.UserError, "Illegal construction variable `%s'" % key
+ self.__dict__['overrides'][key] = value
+ def __delitem__(self, key):
+ try:
+ del self.__dict__['overrides'][key]
+ except KeyError:
+ deleted = 0
+ else:
+ deleted = 1
+ try:
+ result = self.__dict__['__subject'].__delitem__(key)
+ except KeyError:
+ if not deleted:
+ raise
+ result = None
+ return result
+ def get(self, key, default=None):
+ """Emulates the get() method of dictionaries."""
+ try:
+ return self.__dict__['overrides'][key]
+ except KeyError:
+ return self.__dict__['__subject'].get(key, default)
+ def has_key(self, key):
+ try:
+ self.__dict__['overrides'][key]
+ return 1
+ except KeyError:
+ return self.__dict__['__subject'].has_key(key)
+ def Dictionary(self):
+ """Emulates the items() method of dictionaries."""
+ d = self.__dict__['__subject'].Dictionary().copy()
+ d.update(self.__dict__['overrides'])
+ return d
+ def items(self):
+ """Emulates the items() method of dictionaries."""
+ return self.Dictionary().items()
+
+ # Overridden private construction environment methods.
+ def _update(self, dict):
+ """Update an environment's values directly, bypassing the normal
+ checks that occur when users try to set items.
+ """
+ self.__dict__['overrides'].update(dict)
+
+ def gvars(self):
+ return self.__dict__['__subject'].gvars()
+
+ def lvars(self):
+ lvars = self.__dict__['__subject'].lvars()
+ lvars.update(self.__dict__['overrides'])
+ return lvars
+
+ # Overridden public construction environment methods.
+ def Replace(self, **kw):
+ kw = copy_non_reserved_keywords(kw)
+ self.__dict__['overrides'].update(semi_deepcopy(kw))
+
+# The entry point that will be used by the external world
+# to refer to a construction environment. This allows the wrapper
+# interface to extend a construction environment for its own purposes
+# by subclassing SCons.Environment.Base and then assigning the
+# class to SCons.Environment.Environment.
+
+Environment = Base
+
+# An entry point for returning a proxy subclass instance that overrides
+# the subst*() methods so they don't actually perform construction
+# variable substitution. This is specifically intended to be the shim
+# layer in between global function calls (which don't want construction
+# variable substitution) and the DefaultEnvironment() (which would
+# substitute variables if left to its own devices)."""
+#
+# We have to wrap this in a function that allows us to delay definition of
+# the class until it's necessary, so that when it subclasses Environment
+# it will pick up whatever Environment subclass the wrapper interface
+# might have assigned to SCons.Environment.Environment.
+
+def NoSubstitutionProxy(subject):
+ class _NoSubstitutionProxy(Environment):
+ def __init__(self, subject):
+ self.__dict__['__subject'] = subject
+ def __getattr__(self, name):
+ return getattr(self.__dict__['__subject'], name)
+ def __setattr__(self, name, value):
+ return setattr(self.__dict__['__subject'], name, value)
+ def raw_to_mode(self, dict):
+ try:
+ raw = dict['raw']
+ except KeyError:
+ pass
+ else:
+ del dict['raw']
+ dict['mode'] = raw
+ def subst(self, string, *args, **kwargs):
+ return string
+ def subst_kw(self, kw, *args, **kwargs):
+ return kw
+ def subst_list(self, string, *args, **kwargs):
+ nargs = (string, self,) + args
+ nkw = kwargs.copy()
+ nkw['gvars'] = {}
+ self.raw_to_mode(nkw)
+ return apply(SCons.Subst.scons_subst_list, nargs, nkw)
+ def subst_target_source(self, string, *args, **kwargs):
+ nargs = (string, self,) + args
+ nkw = kwargs.copy()
+ nkw['gvars'] = {}
+ self.raw_to_mode(nkw)
+ return apply(SCons.Subst.scons_subst, nargs, nkw)
+ return _NoSubstitutionProxy(subject)
diff --git a/third_party/sqlite/SConscript b/third_party/sqlite/SConscript
index a27c0fe..3c891b8 100644
--- a/third_party/sqlite/SConscript
+++ b/third_party/sqlite/SConscript
@@ -93,4 +93,7 @@ input_files = [
env.ChromeStaticLibrary('sqlite', input_files)
+env.ChromeMSVSProject('$SQLITE_DIR/sqlite.vcproj',
+ guid='{6EAD4A4B-2BBC-4974-8E45-BB5C16CC2AC9}')
+
# TODO(tc): There should be a target to build the stand alone sqlite shell.
diff --git a/third_party/zlib/zlib.scons b/third_party/zlib/zlib.scons
index 23809d4..a33834f 100644
--- a/third_party/zlib/zlib.scons
+++ b/third_party/zlib/zlib.scons
@@ -42,3 +42,6 @@ input_files = [
]
env.ChromeStaticLibrary('zlib', input_files)
+
+env.ChromeMSVSProject('$ZLIB_DIR/zlib.vcproj',
+ guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}')
diff --git a/webkit/SConscript.javascriptcore_pcre b/webkit/SConscript.javascriptcore_pcre
index 61ff502..6694b67 100644
--- a/webkit/SConscript.javascriptcore_pcre
+++ b/webkit/SConscript.javascriptcore_pcre
@@ -1,53 +1,55 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone(
- PCRE_DIR = '$WEBKIT_DIR/port/JavaScriptCore/pcre',
-)
-
-env.Prepend(
- CPPPATH = [
- '$WEBKIT_DIR/port/JavaScriptCore',
- '$WEBKIT_DIR/port/JavaScriptCore/pcre',
- '$WEBKIT_DIR/build/JSConfig/WebCore/v8',
- ])
-
-if env.Bit('windows'):
- env.Prepend(
- CCFLAGS = [
- '/TP',
- '/wd4127',
- '/wd4355',
- '/wd4510',
- '/wd4512',
- '/wd4610',
- '/wd4706',
- '/wd4800',
- ],
- )
-
-# Map Hammer/webkit/port/JavaScriptCore/pcre so it's backed by
-# third_party/WebKit/JavaScriptCore/pcre.
-#
-# TODO(sgk): This can be refactored to work more naturally if we just
-# mirror third_party directory structure under webkit/port, instead of
-# mapping Javascript => Javascript (here) and Webkit/WebCore => port
-# (over in ../build/SConscript.main).
-
-obj_dir = env.Dir('$PCRE_DIR')
-src_dir = env.Dir('$CHROME_SRC_DIR/third_party/WebKit/JavaScriptCore/pcre')
-obj_dir.addRepository(src_dir)
-
-input_files = [
- '$PCRE_DIR/pcre_compile.cpp',
- '$PCRE_DIR/pcre_xclass.cpp',
- '$PCRE_DIR/pcre_ucp_searchfuncs.cpp',
- '$PCRE_DIR/pcre_tables.cpp',
- '$PCRE_DIR/pcre_exec.cpp',
-]
-
-env.ChromeStaticLibrary('JavaScriptCore_pcre', input_files)
-
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+Import('env')
+
+env = env.Clone(
+ PCRE_DIR = '$WEBKIT_DIR/port/JavaScriptCore/pcre',
+)
+
+env.Prepend(
+ CPPPATH = [
+ '$WEBKIT_DIR/port/JavaScriptCore',
+ '$WEBKIT_DIR/port/JavaScriptCore/pcre',
+ '$WEBKIT_DIR/build/JSConfig/WebCore/v8',
+ ])
+
+if env.Bit('windows'):
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+ '/wd4127',
+ '/wd4355',
+ '/wd4510',
+ '/wd4512',
+ '/wd4610',
+ '/wd4706',
+ '/wd4800',
+ ],
+ )
+
+# Map Hammer/webkit/port/JavaScriptCore/pcre so it's backed by
+# third_party/WebKit/JavaScriptCore/pcre.
+#
+# TODO(sgk): This can be refactored to work more naturally if we just
+# mirror third_party directory structure under webkit/port, instead of
+# mapping Javascript => Javascript (here) and Webkit/WebCore => port
+# (over in ../build/SConscript.main).
+
+obj_dir = env.Dir('$PCRE_DIR')
+src_dir = env.Dir('$CHROME_SRC_DIR/third_party/WebKit/JavaScriptCore/pcre')
+obj_dir.addRepository(src_dir)
+
+input_files = [
+ '$PCRE_DIR/pcre_compile.cpp',
+ '$PCRE_DIR/pcre_xclass.cpp',
+ '$PCRE_DIR/pcre_ucp_searchfuncs.cpp',
+ '$PCRE_DIR/pcre_tables.cpp',
+ '$PCRE_DIR/pcre_exec.cpp',
+]
+
+env.ChromeStaticLibrary('JavaScriptCore_pcre', input_files)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/JavaScriptCore/JavaScriptCore_pcre.vcproj',
+ guid='{49909552-0B0C-4C14-8CF6-DB8A2ADE0934}')
diff --git a/webkit/SConscript.port b/webkit/SConscript.port
index 3ed960d..accad95 100644
--- a/webkit/SConscript.port
+++ b/webkit/SConscript.port
@@ -1,197 +1,205 @@
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-Import('env')
-
-env = env.Clone()
-
-if env.Bit('windows'):
- env.Prepend(
- CCFLAGS = [
- '/TP',
-
- '/wd4244',
- '/wd4291',
- '/wd4345',
- '/wd4521',
- '/wd4800',
- ],)
-elif env.Bit('linux'):
- env.Append(
- # For the image readers and decoders:
- CXXFLAGS = ["-Wno-sign-compare"],
- LIBS = ['png'],
- )
-
-input_files = [
- '$PORT_DIR/bridge/chromium/PluginsChromium.cpp',
-
- '$PORT_DIR/page/Location.cpp',
- '$PORT_DIR/page/chromium/AccessibilityObjectChromium.cpp',
- '$PORT_DIR/page/chromium/AXObjectCacheChromium.cpp',
- '$PORT_DIR/page/chromium/DragControllerChromium.cpp',
- '$PORT_DIR/page/chromium/EventHandlerChromium.cpp',
- '$PORT_DIR/page/chromium/FrameChromium.cpp',
-
- '$PORT_DIR/platform/GKURL.cpp',
-
- '$PORT_DIR/platform/chromium/ChromiumDataObject.cpp',
- '$PORT_DIR/platform/chromium/ClipboardChromium.cpp',
- '$PORT_DIR/platform/chromium/ClipboardUtilitiesChromium.cpp',
- '$PORT_DIR/platform/chromium/ContextMenuChromium.cpp',
- '$PORT_DIR/platform/chromium/ContextMenuItemChromium.cpp',
- '$PORT_DIR/platform/chromium/CursorChromium.cpp',
- '$PORT_DIR/platform/chromium/DragDataChromium.cpp',
- '$PORT_DIR/platform/chromium/DragImageChromium.cpp',
- '$PORT_DIR/platform/chromium/EditorChromium.cpp',
- '$PORT_DIR/platform/chromium/FileChooserChromium.cpp',
- '$PORT_DIR/platform/chromium/FileSystemChromium.cpp',
- '$PORT_DIR/platform/chromium/FramelessScrollView.cpp',
- '$PORT_DIR/platform/chromium/Language.cpp',
- '$PORT_DIR/platform/chromium/MimeTypeRegistryChromium.cpp',
- '$PORT_DIR/platform/chromium/PasteboardChromium.cpp',
- '$PORT_DIR/platform/chromium/PlatformKeyboardEventChromium.cpp',
- '$PORT_DIR/platform/chromium/PlatformScreenChromium.cpp',
- '$PORT_DIR/platform/chromium/PopupMenuChromium.cpp',
- '$PORT_DIR/platform/chromium/SearchPopupMenuChromium.cpp',
- '$PORT_DIR/platform/chromium/SharedTimerChromium.cpp',
- '$PORT_DIR/platform/chromium/SSLKeyGeneratorChromium.cpp',
- '$PORT_DIR/platform/chromium/SystemTimeChromium.cpp',
- '$PORT_DIR/platform/chromium/TemporaryLinkStubs.cpp',
- '$PORT_DIR/platform/chromium/TextBoundariesChromium.cpp',
- '$PORT_DIR/platform/chromium/TextBreakIteratorInternalICUChromium.cpp',
- '$PORT_DIR/platform/chromium/WidgetChromium.cpp',
- '$PORT_DIR/platform/chromium/ScrollbarThemeChromium.cpp',
-
- '$PORT_DIR/platform/graphics/skia/AffineTransformSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/ColorSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/FloatPointSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/FloatRectSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/GradientSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/GraphicsContextSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/ImageBufferSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/ImageSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/ImageSourceSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/IntPointSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/IntRectSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/NativeImageSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/PathSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/PatternSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/PlatformContextSkia.cpp',
- '$PORT_DIR/platform/graphics/skia/SkiaUtils.cpp',
-
- '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
-
- '$PORT_DIR/svg/graphics/skia/RenderPathSkia.cpp',
- '$PORT_DIR/svg/graphics/skia/SkiaSupport.cpp',
- '$PORT_DIR/svg/graphics/skia/SVGPaintServerGradientSkia.cpp',
- '$PORT_DIR/svg/graphics/skia/SVGPaintServerPatternSkia.cpp',
- '$PORT_DIR/svg/graphics/skia/SVGPaintServerSkia.cpp',
- '$PORT_DIR/svg/graphics/skia/SVGResourceFilterSkia.cpp',
- '$PORT_DIR/svg/graphics/skia/SVGResourceMaskerSkia.cpp',
-
- '$PORT_DIR/platform/image-decoders/bmp/BMPImageDecoder.cpp',
- '$PORT_DIR/platform/image-decoders/bmp/BMPImageReader.cpp',
- '$PORT_DIR/platform/image-decoders/gif/GIFImageDecoder.cpp',
- '$PORT_DIR/platform/image-decoders/gif/GIFImageReader.cpp',
- '$PORT_DIR/platform/image-decoders/ico/ICOImageDecoder.cpp',
- '$PORT_DIR/platform/image-decoders/jpeg/JPEGImageDecoder.cpp',
- '$PORT_DIR/platform/image-decoders/png/PNGImageDecoder.cpp',
- '$PORT_DIR/platform/image-decoders/xbm/XBMImageDecoder.cpp',
-
- '$PORT_DIR/platform/network/chromium/AuthenticationChallengeChromium.cpp',
- '$PORT_DIR/platform/network/chromium/CookieJarChromium.cpp',
- '$PORT_DIR/platform/network/chromium/DNSChromium.cpp',
- '$PORT_DIR/platform/network/chromium/NetworkStateNotifierChromium.cpp',
-
- '$PORT_DIR/plugins/chromium/PluginDataChromium.cpp',
-]
-
-if env.Bit('windows'):
- # Windows specific implementations.
- input_files.extend([
- '$PORT_DIR/platform/chromium/FileSystemChromiumWin.cpp',
- '$PORT_DIR/platform/chromium/ScrollBarThemeChromiumWin.cpp',
- '$PORT_DIR/platform/chromium/SoundChromiumWin.cpp',
-
- '$PORT_DIR/platform/graphics/chromium/FontCacheChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontUtilsChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/IconChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/ThemeHelperChromiumWin.cpp',
- '$PORT_DIR/platform/graphics/chromium/UniscribeHelper.cpp',
- '$PORT_DIR/platform/graphics/chromium/UniscribeHelperTextRun.cpp',
-
- '$PORT_DIR/rendering/RenderThemeWin.cpp',
- ])
-
-if env.Bit('linux'):
- # Linux specific implementations.
- input_files.extend([
- '$PORT_DIR/platform/chromium/FileSystemChromiumLinux.cpp',
- '$PORT_DIR/platform/chromium/gtk2drawing.c',
- '$PORT_DIR/platform/chromium/KeyCodeConversionGtk.cpp',
- '$PORT_DIR/platform/chromium/RenderThemeGtk.cpp',
- '$PORT_DIR/platform/chromium/ScrollbarThemeChromiumLinux.cpp',
- '$PORT_DIR/platform/chromium/SoundChromiumPosix.cpp',
-
- '$PORT_DIR/platform/graphics/chromium/FontCacheLinux.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontLinux.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontPlatformDataLinux.cpp',
- '$PORT_DIR/platform/graphics/chromium/GlyphPageTreeNodeLinux.cpp',
- '$PORT_DIR/platform/graphics/chromium/IconChromiumLinux.cpp',
- '$PORT_DIR/platform/graphics/chromium/SimpleFontDataLinux.cpp',
-
- '$PORT_DIR/platform/graphics/skia/GdkSkia.cc',
- ])
-
- # Remove from the list files that haven't yet been made portable to Linux.
- to_be_ported_files = [
- '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
- ]
- input_files = list(set(input_files) - set(to_be_ported_files))
-
-if env.Bit('mac'):
- # Mac specific implementations.
- input_files.extend([
- '$PORT_DIR/bridge/mac/FrameMac.mm',
- '$PORT_DIR/page/EventHandlerMac.mm',
- '$PORT_DIR/page/WebCoreFrameBridge.mm',
- '$PORT_DIR/platform/GKURLMac.mm',
- '$PORT_DIR/platform/PluginStubsMac.cpp',
- '$PORT_DIR/platform/mac/DragDataMac.mm',
- '$PORT_DIR/platform/graphics/mac/FontCacheMacPending.cpp',
- '$PORT_DIR/platform/graphics/skia/public/PlatformCanvasMac.cpp',
- '$PORT_DIR/platform/graphics/skia/public/PlatformDeviceMac.cpp',
- '$PORT_DIR/rendering/RenderThemeMac.mm',
- ])
-
- # Remove from the list files that haven't yet been made portable to Mac.
- to_be_ported_files = [
- '$PORT_DIR/page/chromium/AXObjectCacheChromium.cpp',
- '$PORT_DIR/page/chromium/EventHandlerChromium.cpp',
- '$PORT_DIR/platform/chromium/CursorChromium.cpp',
- '$PORT_DIR/platform/chromium/DragDataChromium.cpp',
- '$PORT_DIR/platform/chromium/PopupMenuChromium.cpp',
- '$PORT_DIR/platform/chromium/WidgetChromium.cpp',
- '$PORT_DIR/platform/chromium/ScrollbarThemeChromium.cpp',
- '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
- '$PORT_DIR/platform/graphics/skia/ImageSkia.cpp',
- ]
- input_files = list(set(input_files) - set(to_be_ported_files))
-
-if env.get('KJS'):
- input_files.extend([
- '$PORT_DIR/bridge/KJSBridge.cpp',
- '$PORT_DIR/bridge/ScriptControllerKJS.cpp',
- ])
-else:
- input_files.extend([
- '$PORT_DIR/bindings/v8/ScriptController.cpp',
- ])
-
-env.ChromeStaticLibrary("port", input_files)
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+Import('env')
+
+env = env.Clone()
+
+if env.Bit('windows'):
+ env.Prepend(
+ CCFLAGS = [
+ '/TP',
+
+ '/wd4244',
+ '/wd4291',
+ '/wd4345',
+ '/wd4521',
+ '/wd4800',
+ ],)
+elif env.Bit('linux'):
+ env.Append(
+ # For the image readers and decoders:
+ CXXFLAGS = ["-Wno-sign-compare"],
+ LIBS = ['png'],
+ )
+
+input_files = [
+ '$PORT_DIR/bridge/chromium/PluginsChromium.cpp',
+
+ '$PORT_DIR/page/Location.cpp',
+ '$PORT_DIR/page/chromium/AccessibilityObjectChromium.cpp',
+ '$PORT_DIR/page/chromium/AXObjectCacheChromium.cpp',
+ '$PORT_DIR/page/chromium/DragControllerChromium.cpp',
+ '$PORT_DIR/page/chromium/EventHandlerChromium.cpp',
+ '$PORT_DIR/page/chromium/FrameChromium.cpp',
+
+ '$PORT_DIR/platform/GKURL.cpp',
+
+ '$PORT_DIR/platform/chromium/ChromiumDataObject.cpp',
+ '$PORT_DIR/platform/chromium/ClipboardChromium.cpp',
+ '$PORT_DIR/platform/chromium/ClipboardUtilitiesChromium.cpp',
+ '$PORT_DIR/platform/chromium/ContextMenuChromium.cpp',
+ '$PORT_DIR/platform/chromium/ContextMenuItemChromium.cpp',
+ '$PORT_DIR/platform/chromium/CursorChromium.cpp',
+ '$PORT_DIR/platform/chromium/DragDataChromium.cpp',
+ '$PORT_DIR/platform/chromium/DragImageChromium.cpp',
+ '$PORT_DIR/platform/chromium/EditorChromium.cpp',
+ '$PORT_DIR/platform/chromium/FileChooserChromium.cpp',
+ '$PORT_DIR/platform/chromium/FileSystemChromium.cpp',
+ '$PORT_DIR/platform/chromium/FramelessScrollView.cpp',
+ '$PORT_DIR/platform/chromium/Language.cpp',
+ '$PORT_DIR/platform/chromium/MimeTypeRegistryChromium.cpp',
+ '$PORT_DIR/platform/chromium/PasteboardChromium.cpp',
+ '$PORT_DIR/platform/chromium/PlatformKeyboardEventChromium.cpp',
+ '$PORT_DIR/platform/chromium/PlatformScreenChromium.cpp',
+ '$PORT_DIR/platform/chromium/PopupMenuChromium.cpp',
+ '$PORT_DIR/platform/chromium/SearchPopupMenuChromium.cpp',
+ '$PORT_DIR/platform/chromium/SharedTimerChromium.cpp',
+ '$PORT_DIR/platform/chromium/SSLKeyGeneratorChromium.cpp',
+ '$PORT_DIR/platform/chromium/SystemTimeChromium.cpp',
+ '$PORT_DIR/platform/chromium/TemporaryLinkStubs.cpp',
+ '$PORT_DIR/platform/chromium/TextBoundariesChromium.cpp',
+ '$PORT_DIR/platform/chromium/TextBreakIteratorInternalICUChromium.cpp',
+ '$PORT_DIR/platform/chromium/WidgetChromium.cpp',
+ '$PORT_DIR/platform/chromium/ScrollbarThemeChromium.cpp',
+
+ '$PORT_DIR/platform/graphics/skia/AffineTransformSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/ColorSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/FloatPointSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/FloatRectSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/GradientSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/GraphicsContextSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/ImageBufferSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/ImageSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/ImageSourceSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/IntPointSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/IntRectSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/NativeImageSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/PathSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/PatternSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/PlatformContextSkia.cpp',
+ '$PORT_DIR/platform/graphics/skia/SkiaUtils.cpp',
+
+ '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
+
+ '$PORT_DIR/svg/graphics/skia/RenderPathSkia.cpp',
+ '$PORT_DIR/svg/graphics/skia/SkiaSupport.cpp',
+ '$PORT_DIR/svg/graphics/skia/SVGPaintServerGradientSkia.cpp',
+ '$PORT_DIR/svg/graphics/skia/SVGPaintServerPatternSkia.cpp',
+ '$PORT_DIR/svg/graphics/skia/SVGPaintServerSkia.cpp',
+ '$PORT_DIR/svg/graphics/skia/SVGResourceFilterSkia.cpp',
+ '$PORT_DIR/svg/graphics/skia/SVGResourceMaskerSkia.cpp',
+
+ '$PORT_DIR/platform/image-decoders/bmp/BMPImageDecoder.cpp',
+ '$PORT_DIR/platform/image-decoders/bmp/BMPImageReader.cpp',
+ '$PORT_DIR/platform/image-decoders/gif/GIFImageDecoder.cpp',
+ '$PORT_DIR/platform/image-decoders/gif/GIFImageReader.cpp',
+ '$PORT_DIR/platform/image-decoders/ico/ICOImageDecoder.cpp',
+ '$PORT_DIR/platform/image-decoders/jpeg/JPEGImageDecoder.cpp',
+ '$PORT_DIR/platform/image-decoders/png/PNGImageDecoder.cpp',
+ '$PORT_DIR/platform/image-decoders/xbm/XBMImageDecoder.cpp',
+
+ '$PORT_DIR/platform/network/chromium/AuthenticationChallengeChromium.cpp',
+ '$PORT_DIR/platform/network/chromium/CookieJarChromium.cpp',
+ '$PORT_DIR/platform/network/chromium/DNSChromium.cpp',
+ '$PORT_DIR/platform/network/chromium/NetworkStateNotifierChromium.cpp',
+
+ '$PORT_DIR/plugins/chromium/PluginDataChromium.cpp',
+]
+
+if env.Bit('windows'):
+ # Windows specific implementations.
+ input_files.extend([
+ '$PORT_DIR/platform/chromium/FileSystemChromiumWin.cpp',
+ '$PORT_DIR/platform/chromium/ScrollBarThemeChromiumWin.cpp',
+ '$PORT_DIR/platform/chromium/SoundChromiumWin.cpp',
+
+ '$PORT_DIR/platform/graphics/chromium/FontCacheChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontUtilsChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/IconChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/SimpleFontDataChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/ThemeHelperChromiumWin.cpp',
+ '$PORT_DIR/platform/graphics/chromium/UniscribeHelper.cpp',
+ '$PORT_DIR/platform/graphics/chromium/UniscribeHelperTextRun.cpp',
+
+ '$PORT_DIR/rendering/RenderThemeWin.cpp',
+ ])
+
+if env.Bit('linux'):
+ # Linux specific implementations.
+ input_files.extend([
+ '$PORT_DIR/platform/chromium/FileSystemChromiumLinux.cpp',
+ '$PORT_DIR/platform/chromium/gtk2drawing.c',
+ '$PORT_DIR/platform/chromium/KeyCodeConversionGtk.cpp',
+ '$PORT_DIR/platform/chromium/RenderThemeGtk.cpp',
+ '$PORT_DIR/platform/chromium/ScrollbarThemeChromiumLinux.cpp',
+ '$PORT_DIR/platform/chromium/SoundChromiumPosix.cpp',
+
+ '$PORT_DIR/platform/graphics/chromium/FontCacheLinux.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontLinux.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontPlatformDataLinux.cpp',
+ '$PORT_DIR/platform/graphics/chromium/GlyphPageTreeNodeLinux.cpp',
+ '$PORT_DIR/platform/graphics/chromium/IconChromiumLinux.cpp',
+ '$PORT_DIR/platform/graphics/chromium/SimpleFontDataLinux.cpp',
+
+ '$PORT_DIR/platform/graphics/skia/GdkSkia.cc',
+ ])
+
+ # Remove from the list files that haven't yet been made portable to Linux.
+ to_be_ported_files = [
+ '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
+ ]
+ input_files = list(set(input_files) - set(to_be_ported_files))
+
+if env.Bit('mac'):
+ # Mac specific implementations.
+ input_files.extend([
+ '$PORT_DIR/bridge/mac/FrameMac.mm',
+ '$PORT_DIR/page/EventHandlerMac.mm',
+ '$PORT_DIR/page/WebCoreFrameBridge.mm',
+ '$PORT_DIR/platform/GKURLMac.mm',
+ '$PORT_DIR/platform/PluginStubsMac.cpp',
+ '$PORT_DIR/platform/mac/DragDataMac.mm',
+ '$PORT_DIR/platform/graphics/mac/FontCacheMacPending.cpp',
+ '$PORT_DIR/platform/graphics/skia/public/PlatformCanvasMac.cpp',
+ '$PORT_DIR/platform/graphics/skia/public/PlatformDeviceMac.cpp',
+ '$PORT_DIR/rendering/RenderThemeMac.mm',
+ ])
+
+ # Remove from the list files that haven't yet been made portable to Mac.
+ to_be_ported_files = [
+ '$PORT_DIR/page/chromium/AXObjectCacheChromium.cpp',
+ '$PORT_DIR/page/chromium/EventHandlerChromium.cpp',
+ '$PORT_DIR/platform/chromium/CursorChromium.cpp',
+ '$PORT_DIR/platform/chromium/DragDataChromium.cpp',
+ '$PORT_DIR/platform/chromium/PopupMenuChromium.cpp',
+ '$PORT_DIR/platform/chromium/WidgetChromium.cpp',
+ '$PORT_DIR/platform/chromium/ScrollbarThemeChromium.cpp',
+ '$PORT_DIR/platform/graphics/chromium/FontCustomPlatformData.cpp',
+ '$PORT_DIR/platform/graphics/skia/ImageSkia.cpp',
+ ]
+ input_files = list(set(input_files) - set(to_be_ported_files))
+
+if env.get('KJS'):
+ input_files.extend([
+ '$PORT_DIR/bridge/KJSBridge.cpp',
+ '$PORT_DIR/bridge/ScriptControllerKJS.cpp',
+ ])
+else:
+ input_files.extend([
+ '$PORT_DIR/bindings/v8/ScriptController.cpp',
+ ])
+
+env.ChromeStaticLibrary("port", input_files)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/port/port.vcproj',
+ name = 'Port',
+ dependencies = [
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ ],
+ guid='{5597AD47-3494-4750-A235-4F9C2F864700}')
diff --git a/webkit/activex_shim/SConscript b/webkit/activex_shim/SConscript
index 78663be..41faa5d 100644
--- a/webkit/activex_shim/SConscript
+++ b/webkit/activex_shim/SConscript
@@ -40,3 +40,11 @@ input_files = [
]
env.ChromeStaticLibrary('activex_shim', input_files)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ ],
+ guid='{F4F4BCAA-EA59-445C-A119-3E6C29647A51}')
diff --git a/webkit/activex_shim_dll/SConscript b/webkit/activex_shim_dll/SConscript
index d47c246..40b423e 100644
--- a/webkit/activex_shim_dll/SConscript
+++ b/webkit/activex_shim_dll/SConscript
@@ -45,5 +45,12 @@ input_files = [
]
dll = env.ChromeSharedLibrary('npaxshim', input_files)
+
i = env.Install('$TARGET_ROOT', dll)
env.Alias('webkit', i)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/activex_shim_dll/activex_shim_dll.vcproj',
+ dependencies = [
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ ],
+ guid='{494E414B-1655-48CE-996D-6413ECFB7829}')
diff --git a/webkit/build/JSConfig/SConscript b/webkit/build/JSConfig/SConscript
index af77bdc..44feb87 100644
--- a/webkit/build/JSConfig/SConscript
+++ b/webkit/build/JSConfig/SConscript
@@ -21,3 +21,6 @@ def CopyConfigH(target, source, env):
env.Command('WebCore/config.h',
'../../config.h.in',
Action(CopyConfigH))
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ guid='{2E2D3301-2EC4-4C0F-B889-87073B30F673}')
diff --git a/webkit/build/JavaScriptCore/SConscript b/webkit/build/JavaScriptCore/SConscript
index 2ca8ec8..26a08ec 100644
--- a/webkit/build/JavaScriptCore/SConscript
+++ b/webkit/build/JavaScriptCore/SConscript
@@ -174,3 +174,6 @@ elif env.Bit('linux'):
env.ChromeStaticLibrary('WTF', wtf_inputs)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ guid='{AA8A5A85-592B-4357-BC60-E0E91E026AF6}')
diff --git a/webkit/build/V8Bindings/SConscript b/webkit/build/V8Bindings/SConscript
index 60e38aa..74d147e 100644
--- a/webkit/build/V8Bindings/SConscript
+++ b/webkit/build/V8Bindings/SConscript
@@ -348,3 +348,13 @@ if env.Bit('windows'):
inputs.append('precompiled_v8bindings.cpp')
env.ChromeStaticLibrary('V8Bindings', inputs)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ dependencies = [
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ ],
+ guid='{625A8F11-2B4E-45B4-BD99-C6D629C606C0}')
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ guid='{2F7EDFA2-EE27-4D83-8454-9EFBD5779203}')
diff --git a/webkit/build/WebCore/SConscript b/webkit/build/WebCore/SConscript
index ae587dd..dde370a 100644
--- a/webkit/build/WebCore/SConscript
+++ b/webkit/build/WebCore/SConscript
@@ -834,3 +834,12 @@ if env.Bit('windows'):
env.ChromeStaticLibrary('WebCore', input_files)
+env.ChromeMSVSProject('$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ dependencies = [
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ ],
+ guid='{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}')
diff --git a/webkit/build/localized_strings/SConscript b/webkit/build/localized_strings/SConscript
index 7e99dc7..39af769 100644
--- a/webkit/build/localized_strings/SConscript
+++ b/webkit/build/localized_strings/SConscript
@@ -37,3 +37,6 @@ generated = env_grd.GRIT(
if env_res.Bit('windows'):
for g in [g for g in generated if str(g).endswith('.rc')]:
env_res.RES(g)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/build/localized_strings/localized_strings.vcproj',
+ guid='{60B43839-95E6-4526-A661-209F16335E0E}')
diff --git a/webkit/default_plugin/SConscript b/webkit/default_plugin/SConscript
index ee48344..8b9047d 100644
--- a/webkit/default_plugin/SConscript
+++ b/webkit/default_plugin/SConscript
@@ -52,3 +52,10 @@ if env.Bit('windows'):
env.ChromeStaticLibrary('default_plugin', input_files)
+env.ChromeMSVSProject('$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ dependencies = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ ('$WEBKIT_DIR/build/localized_strings/' +
+ 'localized_strings.vcproj'),
+ ],
+ guid='{5916D37D-8C97-424F-A904-74E52594C2D6}')
diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript
index 81669fb..02570b5 100644
--- a/webkit/glue/SConscript
+++ b/webkit/glue/SConscript
@@ -133,3 +133,14 @@ if env.Bit('posix'):
env.ChromeStaticLibrary('glue', input_files)
+env.ChromeMSVSProject('$WEBKIT_DIR/build/glue/glue.vcproj',
+ name = 'Glue',
+ dependencies = [
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ ('$WEBKIT_DIR/build/V8Bindings/' +
+ 'V8Bindings_prebuild.vcproj'),
+ ('$WEBKIT_DIR/build/localized_strings/' +
+ 'localized_strings.vcproj'),
+ ],
+ guid='{C66B126D-0ECE-4CA2-B6DC-FA780AFBBF09}')
diff --git a/webkit/glue/plugins/test/SConscript b/webkit/glue/plugins/test/SConscript
index 6551a0d..245adf7 100644
--- a/webkit/glue/plugins/test/SConscript
+++ b/webkit/glue/plugins/test/SConscript
@@ -74,3 +74,9 @@ dll = env.ChromeSharedLibrary('npapi_test_plugin', input_files)
i = env.Install('$TARGET_ROOT', dll)
env.Alias('webkit', i)
+env.ChromeMSVSProject('$WEBKIT_DIR/glue/plugins/test/npapi_test_plugin.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ ],
+ guid='{0D04AEC1-6B68-492C-BCCF-808DFD69ABC6}')
diff --git a/webkit/tools/npapi_layout_test_plugin/SConscript b/webkit/tools/npapi_layout_test_plugin/SConscript
index 339643d..877b1f0 100644
--- a/webkit/tools/npapi_layout_test_plugin/SConscript
+++ b/webkit/tools/npapi_layout_test_plugin/SConscript
@@ -47,6 +47,10 @@ if env.Bit('windows'):
dll = env.ChromeSharedLibrary('npapi_layout_test_plugin', input_files)
+env.ChromeMSVSProject(('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' +
+ 'npapi_layout_test_plugin.vcproj'),
+ guid='{BE6D5659-A8D5-4890-A42C-090DD10EF62C}')
+
i = env.Install('$TARGET_ROOT/plugins', dll)
env.Alias('webkit', i)
diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript
index f335a46..52d15f6 100644
--- a/webkit/tools/test_shell/SConscript
+++ b/webkit/tools/test_shell/SConscript
@@ -135,6 +135,39 @@ elif env.Bit('linux'):
lib = env.ChromeStaticLibrary('test_shell', input_files)
+env.ChromeMSVSProject('$WEBKIT_DIR/tools/test_shell/test_shell.vcproj',
+ dependencies = [
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ ('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' +
+ 'npapi_layout_test_plugin.vcproj'),
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{FA39524D-3067-4141-888D-28A86C66F2B9}')
+
+
resources = []
exe_input_files = [
'test_shell_main.cc',
@@ -203,3 +236,34 @@ test_shell_tests = env.ChromeTestProgram('test_shell_tests',
resources + test_files)
i = env.Install('$TARGET_ROOT', test_shell_tests)
env.Alias('webkit', i)
+
+env.ChromeMSVSProject('$WEBKIT_DIR/tools/test_shell/test_shell_tests.vcproj',
+ dependencies = [
+ '$WEBKIT_DIR/glue/plugins/test/npapi_test_plugin.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj' ,
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{E6766F81-1FCD-4CD7-BC16-E36964A14867}')
diff --git a/webkit/webkit.scons b/webkit/webkit.scons
index 8c10e9b..605dbfc 100644
--- a/webkit/webkit.scons
+++ b/webkit/webkit.scons
@@ -16,6 +16,7 @@ env.Append(
sconscript_files = [
'SConscript',
+ 'webkit_sln.scons',
]
SConscript(sconscript_files, exports=['env'])
diff --git a/webkit/webkit_sln.scons b/webkit/webkit_sln.scons
new file mode 100644
index 0000000..402c889
--- /dev/null
+++ b/webkit/webkit_sln.scons
@@ -0,0 +1,168 @@
+# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+__doc__ = """
+Configuration for building base.sln.
+"""
+
+Import('env')
+
+env = env.Clone()
+
+env.Tool('MSVSNew')
+
+
+env.ChromeMSVSFolder('webkit dependencies',
+ name='dependencies',
+ entries = [
+ 'webkit libxslt projects',
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$V8_DIR/tools/visual_studio/v8.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$MEDIA_DIR/build/media.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_mksnapshot.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ 'webkit libxml projects',
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ ],
+ guid='{2C5FC2FE-B8B0-44B9-A7C4-E5B5E7292F6B}')
+
+env.ChromeMSVSFolder('webkit libxml projects',
+ name='libxml projects',
+ entries = [
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ '$LIBXML_DIR/build/libxml.vcproj',
+ ],
+ guid='{B5EEDCC4-877F-4537-AD0E-A3FA070522DF}')
+
+env.ChromeMSVSFolder('webkit libxslt projects',
+ name='libxslt projects',
+ entries = [
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ ],
+ guid='{0655DC38-C685-436C-8D99-7CF64CB2CC35}')
+
+env.ChromeMSVSFolder('webkit test',
+ name='test',
+ entries = [
+ '$WEBKIT_DIR/glue/plugins/test/npapi_test_plugin.vcproj',
+ ('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' +
+ 'npapi_layout_test_plugin.vcproj'),
+ '$WEBKIT_DIR/tools/test_shell/test_shell_tests.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell.vcproj',
+ ],
+ guid='{4A249B49-19FB-4BD1-B017-718E7A4448EF}')
+
+env.ChromeMSVSFolder('webkit (readonly)',
+ entries = [
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ ],
+ guid='{1DFD10B5-A673-4C3A-BA1D-3546FC4B7740}')
+
+env.ChromeMSVSFolder('webkit (ours)',
+ entries = [
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings_prebuild.vcproj',
+ '$WEBKIT_DIR/activex_shim_dll/activex_shim_dll.vcproj',
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ '$WEBKIT_DIR/default_plugin/default_plugin.vcproj',
+ ('$WEBKIT_DIR/build/localized_strings/' +
+ 'localized_strings.vcproj'),
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ ],
+ guid='{4BC2C9E2-78FA-446A-B6E0-85689A2B4D3D}')
+
+
+solution = env.ChromeMSVSSolution('webkit.sln',
+ entries = [
+ 'webkit dependencies',
+ '$WEBKIT_DIR/build/glue/glue.vcproj',
+ '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj',
+ '$WEBKIT_DIR/build/WebCore/WebCore.vcproj',
+ '$WEBKIT_DIR/build/JSConfig/V8Config.vcproj',
+ '$WEBKIT_DIR/build/port/port.vcproj',
+ 'webkit (readonly)',
+ '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj',
+ ('$WEBKIT_DIR/build/localized_strings/' +
+ 'localized_strings.vcproj'),
+ 'webkit (ours)',
+ 'webkit test',
+ '$BASE_DIR/build/base_gfx.vcproj',
+ '$BASE_DIR/build/base.vcproj',
+ '$BASE_DIR/build/debug_message.vcproj',
+ '$NET_DIR/build/net.vcproj',
+ '$NET_DIR/build/tld_cleanup.vcproj',
+ '$MEDIA_DIR/build/media.vcproj',
+ '$GOOGLEURL_DIR/build/googleurl.vcproj',
+ '$SKIA_DIR/skia.vcproj',
+ '$ICU38_DIR/build/icudt.vcproj',
+ '$ICU38_DIR/build/icu.vcproj',
+ '$WEBKIT_DIR/tools/test_shell/test_shell.vcproj',
+ '$LIBPNG_DIR/libpng.vcproj',
+ ('$WEBKIT_DIR/tools/test_shell/' +
+ 'test_shell_tests.vcproj'),
+ '$LIBXML_DIR/build/libxml.vcproj',
+ '$LIBXSLT_DIR/build/libxslt.vcproj',
+ '$ZLIB_DIR/zlib.vcproj',
+ '$LIBJPEG_DIR/libjpeg.vcproj',
+ '$BREAKPAD_DIR/breakpad_handler.vcproj',
+ '$MODP_B64_DIR/modp_b64.vcproj',
+ '$BZIP2_DIR/bzip2.vcproj',
+ ('$WEBKIT_DIR/glue/plugins/test/' +
+ 'npapi_test_plugin.vcproj'),
+ ('$WEBKIT_DIR/tools/npapi_layout_test_plugin/' +
+ 'npapi_layout_test_plugin.vcproj'),
+ '$WEBKIT_DIR/activex_shim/activex_shim.vcproj',
+ '$WEBKIT_DIR/activex_shim_dll/activex_shim_dll.vcproj',
+ 'webkit libxml projects',
+ '$LIBXML_DIR/build/libxml_config.vcproj',
+ 'webkit libxslt projects',
+ '$LIBXSLT_DIR/build/libxslt_config.vcproj',
+ ('$WEBKIT_DIR/default_plugin/' +
+ 'default_plugin.vcproj'),
+ ('$WEBKIT_DIR/build/JavaScriptCore/' +
+ 'JavaScriptCore_pcre.vcproj'),
+ ('$WEBKIT_DIR/build/V8Bindings/' +
+ 'V8Bindings_prebuild.vcproj'),
+ '$TESTING_DIR/gtest.vcproj',
+ '$V8_DIR/tools/visual_studio/v8_base.vcproj',
+ '$V8_DIR/tools/visual_studio/v8.vcproj',
+ ('$V8_DIR/tools/visual_studio/' +
+ 'v8_mksnapshot.vcproj'),
+ '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj',
+ '$SDCH_DIR/sdch.vcproj',
+ '$SQLITE_DIR/sqlite.vcproj',
+ ],
+ variants = [
+ 'Debug|Win32',
+ 'Release|Win32',
+ ])
+
+env.AlwaysBuild(solution)
+
+i = env.Command('$CHROME_SRC_DIR/webkit/webkit.sln', solution,
+ Copy('$TARGET', '$SOURCE'))
+Alias('solutions', i)