summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-24 03:20:00 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-24 03:20:00 +0000
commit08856366bb615a28da956cd02d8ad749090916ab (patch)
treea98b73e2e8c7e2088ca5d1798ac823bf8fbbaca0
parent6160649ec727ba64ff2e959b3a9f054f67b834d0 (diff)
downloadchromium_src-08856366bb615a28da956cd02d8ad749090916ab.zip
chromium_src-08856366bb615a28da956cd02d8ad749090916ab.tar.gz
chromium_src-08856366bb615a28da956cd02d8ad749090916ab.tar.bz2
Initial subset of .vcproj file generation, covering generation of:
base\build\base.vcproj base\build\base_gfx.vcproj base\build\base_unittests.vcproj base\build\debug_message.vcproj skia\skia.vcproj testing\gtest.vcproj third_party\icu38\icu.vcproj third_party\icu38\icudt.vcproj third_party\libpng\libpng.vcproj third_party\zlib\zlib.vcproj Supporting work in *.scons files: * Adds .h files to the input_files lists in the various *.scons files. * Add arguments to ChromeMSVSProject() to actually generate the .vcproj files. * Add MSVS.AddConfig() calls to the *.scons files to preserve the .vsprops inclusion in the generated .vcproj files. (These will go away eventually as we migrate away from .vsprops in favor of using the settings from the SCons configuration.) * Add MSVS.AddConfig() calls to preserve the .vsprops inclusion. * Move the special generation of dmg_fp/*.cc files ahead of the input file list so we can list the generated object files. * Change the 'solutions' Alias to 'msvs' so we don't mislead about what will actually be generated. Updates to the new _Node_MSVS.py module with latest from upstream prototype development: * Support configurability of: * buildtarget (used to generat project name) * RootNamespace * relative_path_prefix (to prepend './') * tools (to avoid repetition in the project configs) * Track the Visual Studio hierarchy in SCons Nodes, not DOM, so we can delay evaluation until after the complete configuration has been specified. * Add a FileList base class for the things that need, with a subclass hierarchy for the different concrete things in our tree, and a FileListWalk() function for traversing hierarchies. * Centralize turning strings into Nodes in the args2nodes() method and have AddFiles() just use it. Updates to chromium_builders.py to support all this * Add knowledge about stripping out noncompilable files (.h files) from input_files lists. * Return a Null() class if we're not generating MSVS files so we don't have to hide the other calls in if:-blocks. * Add custom ChromeFileList subclass of MSVS.FileList as a container for the file list manipulation we need to do. * Move the Chrome*() function definitions out to global space, and just use the generate() function for adding them to the passed-in environment as class methods. * Make a change to SCons (in Node/FS.py) to handle polymorphism in the new MSVS Node hierarchy. Review URL: http://codereview.chromium.org/16447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7467 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base_lib.scons307
-rw-r--r--base/base_sln.scons2
-rw-r--r--base/base_unittests.scons128
-rw-r--r--base/debug_message.scons51
-rw-r--r--base/gfx/base_gfx.scons65
-rw-r--r--build/SConscript.main2
-rw-r--r--chrome/chrome_sln.scons2
-rw-r--r--net/net_sln.scons2
-rw-r--r--sandbox/sandbox_sln.scons2
-rw-r--r--site_scons/site_tools/_Node_MSVS.py684
-rw-r--r--site_scons/site_tools/chromium_builders.py136
-rw-r--r--skia/SConscript565
-rw-r--r--testing/SConscript.gtest58
-rw-r--r--third_party/libpng/libpng.scons73
-rw-r--r--third_party/scons/scons-local/SCons/Node/FS.py2
-rw-r--r--third_party/zlib/zlib.scons47
-rw-r--r--webkit/webkit_sln.scons2
17 files changed, 1812 insertions, 316 deletions
diff --git a/base/base_lib.scons b/base/base_lib.scons
index 197832e..e7a83fd 100644
--- a/base/base_lib.scons
+++ b/base/base_lib.scons
@@ -21,93 +21,246 @@ if env.Bit('windows'):
],
)
+# Add object files David M Gay's dtoa and g_fmt third party lib. We
+# compile these separately so we can disable warnings.
+env_dmg_fp = env.Clone()
+if env_dmg_fp.Bit('windows'):
+ env_dmg_fp.Append(
+ CCFLAGS = [
+ '/wd4018',
+ '/wd4102',
+ '/wd4244',
+ '/wd4554',
+ ],
+ )
+elif env_dmg_fp.Bit('posix'):
+ for var in ['CCFLAGS', 'CXXFLAGS']:
+ if '-Wall' in env_dmg_fp[var]:
+ env_dmg_fp[var].remove('-Wall')
+ env_dmg_fp[var].append('-Wno-write-strings')
+
+dtoa_cc = env_dmg_fp.ChromeObject('third_party/dmg_fp/dtoa.cc')
+
+g_fmt_cc = env_dmg_fp.ChromeObject('third_party/dmg_fp/g_fmt.cc')
+
# Some files from this list are not yet ported. They are removed from
# the list, see code below.
-input_files = [
+input_files = ChromeFileList([
'at_exit.cc',
+ 'at_exit.h',
+ 'atomic_ref_count.h',
+ 'atomic_sequence_num.h',
+ 'atomicops.h',
+ 'atomicops_internals_x86_msvc.h',
+ 'base_drag_source.cc',
+ 'base_drag_source.h',
+ 'base_drop_target.cc',
+ 'base_drop_target.h',
'base_paths.cc',
+ 'base_paths.h',
+ 'base_paths_win.cc',
+ 'base_paths_win.h',
'base_switches.cc',
+ 'base_switches.h',
+ 'basictypes.h',
+ 'third_party/nss/blapi.h',
+ 'third_party/nss/blapit.h',
+ '../build/build_config.h',
'bzip2_error_handler.cc',
'clipboard.cc',
+ 'clipboard.h',
'clipboard_util.cc',
+ 'clipboard_util.h',
+ 'clipboard_win.cc',
'command_line.cc',
+ 'command_line.h',
+ 'compiler_specific.h',
+ 'condition_variable.h',
+ 'condition_variable_win.cc',
+ 'cpu.cc',
+ 'cpu.h',
+ 'debug_on_start.cc',
+ 'debug_on_start.h',
'debug_util.cc',
+ 'debug_util.h',
+ 'debug_util_win.cc',
+ 'directory_watcher.h',
+ 'directory_watcher_win.cc',
+ 'third_party/dmg_fp/dmg_fp.h',
+ dtoa_cc,
'event_recorder.cc',
+ 'event_recorder.h',
'field_trial.cc',
+ 'field_trial.h',
'file_path.cc',
+ 'file_path.h',
'file_util.cc',
+ 'file_util.h',
+ 'file_util_win.cc',
'file_version_info.cc',
+ 'file_version_info.h',
+ 'fix_wp64.h',
+ 'float_util.h',
+ g_fmt_cc,
+ 'hash_tables.h',
'histogram.cc',
+ 'histogram.h',
+ 'hmac.h',
+ 'hmac_win.cc',
+ 'iat_patch.cc',
+ 'iat_patch.h',
'icu_util.cc',
+ 'icu_util.h',
+ 'id_map.h',
'idle_timer.cc',
+ 'idle_timer.h',
+ 'image_util.cc',
+ 'image_util.h',
'json_reader.cc',
+ 'json_reader.h',
'json_writer.cc',
+ 'json_writer.h',
'lazy_instance.cc',
+ 'lazy_instance.h',
+ 'linked_ptr.h',
'lock.cc',
+ 'lock.h',
+ 'lock_impl.h',
+ 'lock_impl_win.cc',
'logging.cc',
+ 'logging.h',
'md5.cc',
+ 'md5.h',
'memory_debug.cc',
+ 'memory_debug.h',
'message_loop.cc',
+ 'message_loop.h',
+ 'message_pump.h',
'message_pump_default.cc',
+ 'message_pump_default.h',
+ 'message_pump_win.cc',
+ 'message_pump_win.h',
'non_thread_safe.cc',
+ 'non_thread_safe.h',
'object_watcher.cc',
+ 'object_watcher.h',
+ 'observer_list.h',
+ 'observer_list_threadsafe.h',
'path_service.cc',
+ 'path_service.h',
+ 'pe_image.cc',
+ 'pe_image.h',
'pickle.cc',
+ 'pickle.h',
+ 'platform_file.h',
+ 'platform_file_win.cc',
+ 'platform_thread.h',
+ 'platform_thread_win.cc',
+ 'port.h',
+ 'third_party/nspr/prcpucfg.h',
+ 'third_party/nspr/prcpucfg_win.h',
+ 'process.h',
+ 'process_util.h',
+ 'process_util_win.cc',
+ 'process_win.cc',
+ 'third_party/nspr/prtime.cc',
+ 'third_party/nspr/prtime.h',
+ 'third_party/nspr/prtypes.h',
+ 'third_party/purify/pure.h',
+ 'third_party/purify/pure_api.c',
'rand_util.cc',
+ 'rand_util.h',
+ 'rand_util_win.cc',
'ref_counted.cc',
+ 'ref_counted.h',
+ 'registry.cc',
+ 'registry.h',
'resource_util.cc',
+ 'resource_util.h',
'revocable_store.cc',
+ 'revocable_store.h',
'scoped_clipboard_writer.cc',
+ 'scoped_clipboard_writer.h',
+ 'scoped_handle.h',
+ 'scoped_nsautorelease_pool.h',
+ 'scoped_ptr.h',
'sha2.cc',
+ 'sha2.h',
+ 'third_party/nss/sha256.h',
+ 'third_party/nss/sha512.cc',
+ 'shared_memory.h',
+ 'shared_memory_win.cc',
'simple_thread.cc',
+ 'simple_thread.h',
+ 'singleton.h',
+ 'spin_wait.h',
+ 'stack_container.h',
+ 'stats_counters.h',
'stats_table.cc',
+ 'stats_table.h',
+ 'string16.h',
'string_escape.cc',
+ 'string_escape.h',
'string_piece.cc',
+ 'string_piece.h',
+ 'string_tokenizer.h',
'string_util.cc',
+ 'string_util.h',
'string_util_icu.cc',
+ 'string_util_win.h',
+ 'sys_info.h',
+ 'sys_info_win.cc',
+ 'sys_string_conversions.h',
+ 'sys_string_conversions_win.cc',
'system_monitor.cc',
- 'third_party/nspr/prtime.cc',
- 'third_party/nss/sha512.cc',
+ 'system_monitor.h',
+ 'system_monitor_win.cc',
+ 'task.h',
+ 'test_file_util_win.cc',
+ 'test_file_util.h',
'thread.cc',
+ 'thread.h',
'thread_collision_warner.cc',
+ 'thread_collision_warner.h',
+ 'thread_local.h',
+ 'thread_local_storage.h',
+ 'thread_local_storage_win.cc',
+ 'thread_local_win.cc',
'time.cc',
+ 'time.h',
'time_format.cc',
+ 'time_format.h',
+ 'time_win.cc',
'timer.cc',
+ 'timer.h',
'trace_event.cc',
+ 'trace_event.h',
'tracked.cc',
+ 'tracked.h',
'tracked_objects.cc',
+ 'tracked_objects.h',
+ 'tuple.h',
'values.cc',
+ 'values.h',
+ 'waitable_event.h',
+ 'waitable_event_win.cc',
'watchdog.cc',
+ 'watchdog.h',
+ 'win_util.cc',
+ 'win_util.h',
+ 'windows_message_list.h',
+ 'wmi_util.cc',
+ 'wmi_util.h',
'word_iterator.cc',
-]
-
-# Add object files David M Gay's dtoa and g_fmt third party lib. We
-# compile these separately so we can disable warnings.
-env_dmg_fp = env.Clone()
-if env_dmg_fp.Bit('windows'):
- env_dmg_fp.Append(
- CCFLAGS = [
- '/wd4018',
- '/wd4102',
- '/wd4244',
- '/wd4554',
- ],
- )
-elif env_dmg_fp.Bit('posix'):
- for var in ['CCFLAGS', 'CXXFLAGS']:
- if '-Wall' in env_dmg_fp[var]:
- env_dmg_fp[var].remove('-Wall')
- env_dmg_fp[var].append('-Wno-write-strings')
-
-input_files.extend([
- env_dmg_fp.Object('third_party/dmg_fp/dtoa.cc'),
- env_dmg_fp.Object('third_party/dmg_fp/g_fmt.cc'),
+ 'word_iterator.h',
+ 'worker_pool.cc',
+ 'worker_pool.h',
])
if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
- to_be_ported_files = [
+ input_files.Remove(
'clipboard_util.cc',
'event_recorder.cc',
'file_version_info.cc',
@@ -119,12 +272,16 @@ if env.Bit('posix'):
'object_watcher.cc',
'resource_util.cc', # Uses HMODULE, but may be abstractable.
- ]
- for remove in to_be_ported_files:
- input_files.remove(remove)
+ )
-if env.Bit('windows'):
- input_files.extend([
+if not env.Bit('windows'):
+ # Remove windows-specific files on non-Windows platforms.
+ # TODO(sgk):
+ # Remove the windows-specific files from the input_files list above
+ # and turn this back in to an add-on-Windows list (like we used to)
+ # once we're comfortable re-ordering the files in the generated
+ # .vcproj file(s).
+ input_files.Remove(
'base_drag_source.cc',
'base_drop_target.cc',
'base_paths_win.cc',
@@ -160,10 +317,10 @@ if env.Bit('windows'):
'win_util.cc',
'wmi_util.cc',
'worker_pool.cc',
- ])
+ )
if env.Bit('posix'):
- input_files.extend([
+ input_files.Extend([
'condition_variable_posix.cc',
'debug_util_posix.cc',
'file_util_posix.cc',
@@ -183,7 +340,7 @@ if env.Bit('posix'):
])
if env.Bit('mac'):
- input_files.extend([
+ input_files.Extend([
'base_paths_mac.mm',
'clipboard_mac.mm',
'file_util_mac.mm',
@@ -199,7 +356,7 @@ if env.Bit('mac'):
])
if env.Bit('linux'):
- input_files.extend([
+ input_files.Extend([
'atomicops_internals_x86_gcc.cc',
'base_paths_linux.cc',
'clipboard_linux.cc',
@@ -217,8 +374,76 @@ 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}')
+p = env.ChromeMSVSProject('build/base.vcproj',
+ guid='{1832A374-8A74-4F9E-B536-69A699B3E165}',
+ dependencies=[
+ 'build/debug_message.vcproj',
+ ],
+ files=input_files,
+ tools=[
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ 'VCCLCompilerTool',
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ 'VCLibrarianTool',
+ 'VCALinkTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/debug.vsprops',
+ './base.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/release.vsprops',
+ './base.vsprops',
+ ])
+
+p.AddFileConfig(
+ 'third_party/dmg_fp/dtoa.cc',
+ 'Debug|Win32',
+ tools=[
+ MSVSTool('VCCLCompilerTool',
+ DisableSpecificWarnings='4244;4554;4018;4102'),
+ ])
+
+p.AddFileConfig(
+ 'third_party/dmg_fp/dtoa.cc',
+ 'Release|Win32',
+ tools=[
+ MSVSTool('VCCLCompilerTool',
+ DisableSpecificWarnings='4244;4554;4018;4102'),
+ ])
+
+p.AddFileConfig(
+ 'third_party/dmg_fp/g_fmt.cc',
+ 'Debug|Win32',
+ tools=[
+ MSVSTool('VCCLCompilerTool', DisableSpecificWarnings='4102'),
+ ])
+
+p.AddFileConfig(
+ 'third_party/dmg_fp/g_fmt.cc',
+ 'Release|Win32',
+ tools=[
+ MSVSTool('VCCLCompilerTool', DisableSpecificWarnings='4102'),
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/base/build/base.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/base/base_sln.scons b/base/base_sln.scons
index c81f7e3..f86666c 100644
--- a/base/base_sln.scons
+++ b/base/base_sln.scons
@@ -48,4 +48,4 @@ env.AlwaysBuild(solution)
i = env.Command('$CHROME_SRC_DIR/base/base.sln', solution,
Copy('$TARGET', '$SOURCE'))
-Alias('solutions', i)
+Alias('msvs', i)
diff --git a/base/base_unittests.scons b/base/base_unittests.scons
index b14291c..66be1f3 100644
--- a/base/base_unittests.scons
+++ b/base/base_unittests.scons
@@ -41,17 +41,30 @@ if env.Bit('linux'):
],
)
-# These test files work on *all* platforms; tests that don't work
-# cross-platform live below.
-input_files = [
+input_files = ChromeFileList([
+ # TODO(sgk):
+ # We're deliberately mis-indenting the MSVSFilter() calls here
+ # so we don't have to re-indent the file name entries when the
+ # MSVSFilter() calls go away in (favor of automated generation
+ # of the heirarchy).
+ MSVSFilter('support', [
+ 'multiprocess_test.h',
+ 'no_windows2000_unittest.h',
+ 'run_all_unittests.cc',
+ 'test_suite.h',
+ ]),
+
+ MSVSFilter('base_tests', [
'at_exit_unittest.cc',
'atomicops_unittest.cc',
'clipboard_unittest.cc',
'command_line_unittest.cc',
'condition_variable_unittest.cc',
+ 'directory_watcher_unittest.cc',
'field_trial_unittest.cc',
'file_path_unittest.cc',
'file_util_unittest.cc',
+ 'file_version_info_unittest.cc',
'histogram_unittest.cc',
'hmac_unittest.cc',
'idletimer_unittest.cc',
@@ -60,14 +73,17 @@ input_files = [
'lazy_instance_unittest.cc',
'linked_ptr_unittest.cc',
'message_loop_unittest.cc',
+ 'gfx/native_theme_unittest.cc',
+ 'object_watcher_unittest.cc',
'observer_list_unittest.cc',
'path_service_unittest.cc',
+ 'pe_image_unittest.cc',
'pickle_unittest.cc',
'pr_time_unittest.cc',
'process_util_unittest.cc',
'rand_util_unittest.cc',
+ 'gfx/rect_unittest.cc',
'ref_counted_unittest.cc',
- 'run_all_unittests.cc',
'scoped_ptr_unittest.cc',
'sha2_unittest.cc',
'shared_memory_unittest.cc',
@@ -80,81 +96,127 @@ input_files = [
'string_tokenizer_unittest.cc',
'string_util_unittest.cc',
'sys_info_unittest.cc',
+ 'sys_string_conversions_unittest.cc',
+ 'system_monitor_unittest.cc',
'thread_collision_warner_unittest.cc',
'thread_local_storage_unittest.cc',
'thread_local_unittest.cc',
'thread_unittest.cc',
'time_unittest.cc',
+ 'time_unittest_win.cc',
'timer_unittest.cc',
'tracked_objects_unittest.cc',
'tuple_unittest.cc',
'values_unittest.cc',
'waitable_event_unittest.cc',
'watchdog_unittest.cc',
+ 'win_util_unittest.cc',
+ 'wmi_util_unittest.cc',
'word_iterator_unittest.cc',
- 'worker_pool_unittest.cc',
-
- 'gfx/native_theme_unittest.cc',
+ ]),
+
+ MSVSFilter('gfx_tests', [
'gfx/png_codec_unittest.cc',
- 'gfx/rect_unittest.cc',
-]
+ ]),
+])
if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
- to_be_ported_files = [
+ input_files.Remove(
# We have an implementation of idle_timer, but it's unclear if we want it
# yet, so it's commented out for now. Leave this 'unported'.
'idletimer_unittest.cc',
'gfx/native_theme_unittest.cc',
- ]
- for remove in to_be_ported_files:
- input_files.remove(remove)
+ )
if env.Bit('mac'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
- to_be_ported_files = [
+ input_files.Remove(
'process_util_unittest.cc',
'stats_table_unittest.cc',
- ]
- for remove in to_be_ported_files:
- input_files.remove(remove)
+ )
-if env.Bit('windows'):
- # Windows-specific tests.
- input_files.extend([
+if not env.Bit('windows'):
+ # Remove Windows-specific tests.
+ input_files.Remove(
'directory_watcher_unittest.cc',
'file_version_info_unittest.cc',
'object_watcher_unittest.cc',
'pe_image_unittest.cc',
+ 'system_monitor_unittest.cc',
'sys_string_conversions_unittest.cc',
'time_unittest_win.cc',
'win_util_unittest.cc',
'wmi_util_unittest.cc',
- ])
+ )
if env.Bit('mac'):
# Mac-specific tests.
- input_files.extend([
+ input_files.Extend([
'mac_util_unittest.cc',
])
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}')
+p = env.ChromeMSVSProject('build/base_unittests.vcproj',
+ guid='{27A30967-4BBA-48D1-8522-CDE95F7B1CEC}',
+ 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',
+ ],
+ files=input_files,
+ tools = [
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ MSVSTool('VCCLCompilerTool',
+ PreprocessorDefinitions='UNIT_TEST'),
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ 'VCLinkerTool',
+ 'VCALinkTool',
+ 'VCManifestTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCAppVerifierTool',
+ 'VCWebDeploymentTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '1',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/debug.vsprops',
+ './base_unittests.vsprops',
+ '$(SolutionDir)../testing/using_gtest.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '1',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/release.vsprops',
+ './base_unittests.vsprops',
+ '$(SolutionDir)../testing/using_gtest.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/base/build/base_unittests.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
# 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
diff --git a/base/debug_message.scons b/base/debug_message.scons
index e21aaf2..5ae6f24 100644
--- a/base/debug_message.scons
+++ b/base/debug_message.scons
@@ -18,11 +18,60 @@ if env.Bit('windows'):
],
)
+input_files = ChromeFileList([
+ '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.ChromeProgram('debug_message', input_files)
env.ChromeMSVSProject('$BASE_DIR/build/debug_message.vcproj',
guid='{0E5474AC-5996-4B13-87C0-4AE931EE0815}')
+
+p = env.ChromeMSVSProject('build/debug_message.vcproj',
+ guid='{0E5474AC-5996-4B13-87C0-4AE931EE0815}',
+ files=input_files,
+ root_namespace='DebugMessage',
+ tools = [
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ 'VCCLCompilerTool',
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ MSVSTool('VCLinkerTool', SubSystem='2'),
+ 'VCALinkTool',
+ 'VCManifestTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCAppVerifierTool',
+ 'VCWebDeploymentTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '1',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/debug.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '1',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/release.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/base/build/debug_message.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/base/gfx/base_gfx.scons b/base/gfx/base_gfx.scons
index b9c2e2d..bcffedc 100644
--- a/base/gfx/base_gfx.scons
+++ b/base/gfx/base_gfx.scons
@@ -24,34 +24,79 @@ if env.Bit('windows'):
],
)
-input_files = [
+input_files = ChromeFileList([
'gdi_util.cc',
+ 'gdi_util.h',
'native_theme.cc',
+ 'native_theme.h',
'png_decoder.cc',
+ 'png_decoder.h',
'png_encoder.cc',
+ 'png_encoder.h',
'point.cc',
+ 'point.h',
'rect.cc',
+ 'rect.h',
'size.cc',
-]
+ 'size.h',
+])
if env.Bit('posix'):
# Remove files that still need to be ported from the input_files list.
# TODO(port): delete files from this list as they get ported.
- to_be_ported_files = [
+ input_files.Remove(
'gdi_util.cc',
'native_theme.cc',
- ]
- for remove in to_be_ported_files:
- input_files.remove(remove)
+ )
if env.Bit('windows'):
- input_files.extend([
+ input_files.Extend([
])
elif env.Bit('linux'):
- input_files.extend([
+ input_files.Extend([
])
env.ChromeStaticLibrary('base_gfx', input_files)
-env.ChromeMSVSProject('$BASE_DIR/build/base_gfx.vcproj',
- guid='{A508ADD3-CECE-4E0F-8448-2F5E454DF551}')
+p = env.ChromeMSVSProject('../build/base_gfx.vcproj',
+ guid='{A508ADD3-CECE-4E0F-8448-2F5E454DF551}',
+ files=input_files,
+ tools=[
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ 'VCCLCompilerTool',
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ 'VCLibrarianTool',
+ 'VCALinkTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/debug.vsprops',
+ './base_gfx.vsprops',
+ '../../skia/using_skia.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/release.vsprops',
+ './base_gfx.vsprops',
+ '../../skia/using_skia.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/base/build/base_gfx.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/build/SConscript.main b/build/SConscript.main
index 07d01ad3..5e6bfb1 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -746,7 +746,7 @@ if set(modes) - set(['msvs', 'xcode']):
if 'msvs' in modes:
# We're in --mode=msvs, so add its Alias(es) to the default targets.
- Default(Alias('solutions'))
+ Default(Alias('msvs'))
# -------------------------------------------------------------------------
diff --git a/chrome/chrome_sln.scons b/chrome/chrome_sln.scons
index b95d6cd..03220ef 100644
--- a/chrome/chrome_sln.scons
+++ b/chrome/chrome_sln.scons
@@ -541,4 +541,4 @@ env.AlwaysBuild(solution)
i = env.Command('$CHROME_SRC_DIR/chrome/chrome.sln', solution,
Copy('$TARGET', '$SOURCE'))
-Alias('solutions', i)
+Alias('msvs', i)
diff --git a/net/net_sln.scons b/net/net_sln.scons
index 7823d8d..b262b60 100644
--- a/net/net_sln.scons
+++ b/net/net_sln.scons
@@ -71,4 +71,4 @@ env.AlwaysBuild(solution)
i = env.Command('$CHROME_SRC_DIR/net/net.sln', solution,
Copy('$TARGET', '$SOURCE'))
-Alias('solutions', i)
+Alias('msvs', i)
diff --git a/sandbox/sandbox_sln.scons b/sandbox/sandbox_sln.scons
index 9739155..243a8de 100644
--- a/sandbox/sandbox_sln.scons
+++ b/sandbox/sandbox_sln.scons
@@ -139,4 +139,4 @@ env.AlwaysBuild(solution)
i = env.Command('$CHROME_SRC_DIR/sandbox/sandbox.sln', solution,
Copy('$TARGET', '$SOURCE'))
-Alias('solutions', i)
+Alias('msvs', i)
diff --git a/site_scons/site_tools/_Node_MSVS.py b/site_scons/site_tools/_Node_MSVS.py
index 7cdfd82..d394d28 100644
--- a/site_scons/site_tools/_Node_MSVS.py
+++ b/site_scons/site_tools/_Node_MSVS.py
@@ -1,21 +1,43 @@
-#!/usr/bin/python2.4
-# Copyright 2008, Google Inc.
-# All rights reserved.
+#
+# __COPYRIGHT__
+#
+# 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__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
__doc__ = """SCons.Node.MSVS
-Microsoft Visual Studio nodes.
+New implementation of Visual Studio project generation for SCons.
"""
-import SCons.Node.FS
-import SCons.Script
-
-
-"""New implementation of Visual Studio project generation for SCons."""
-
import md5
import os
import random
+import re
+import UserList
+import xml.dom
+import xml.dom.minidom
+
+import SCons.Node.FS
+import SCons.Script
# Initialize random number generator
@@ -122,13 +144,81 @@ def LookupCreate(klass, item, *args, **kw):
#------------------------------------------------------------------------------
-class _MSVSFolder(SCons.Node.Node):
- """Folder in a Visual Studio project or solution."""
+class FileList(object):
+ def __init__(self, entries=None):
+ if isinstance(entries, FileList):
+ entries = entries.entries
+ self.entries = entries or []
+ def __getitem__(self, i):
+ return self.entries[i]
+ def __setitem__(self, i, item):
+ self.entries[i] = item
+ def __delitem__(self, i):
+ del self.entries[i]
+ def __add__(self, other):
+ if isinstance(other, FileList):
+ return self.__class__(self.entries + other.entries)
+ elif isinstance(other, type(self.entries)):
+ return self.__class__(self.entries + other)
+ else:
+ return self.__class__(self.entries + list(other))
+ def __radd__(self, other):
+ if isinstance(other, FileList):
+ return self.__class__(other.entries + self.entries)
+ elif isinstance(other, type(self.entries)):
+ return self.__class__(other + self.entries)
+ else:
+ return self.__class__(list(other) + self.entries)
+ def __iadd__(self, other):
+ if isinstance(other, FileList):
+ self.entries += other.entries
+ elif isinstance(other, type(self.entries)):
+ self.entries += other
+ else:
+ self.entries += list(other)
+ return self
+ def append(self, item):
+ return self.entries.append(item)
+ def extend(self, item):
+ return self.entries.extend(item)
+ def index(self, item, *args):
+ return self.entries.index(item, *args)
+ def remove(self, item):
+ return self.entries.remove(item)
+
+def FileListWalk(top, topdown=True, onerror=None):
+ """
+ """
+ try:
+ entries = top.entries
+ except AttributeError, err:
+ if onerror is not None:
+ onerror(err)
+ return
+
+ dirs, nondirs = [], []
+ for entry in entries:
+ if hasattr(entry, 'entries'):
+ dirs.append(entry)
+ else:
+ nondirs.append(entry)
+
+ if topdown:
+ yield top, dirs, nondirs
+ for entry in dirs:
+ for x in FileListWalk(entry, topdown, onerror):
+ yield x
+ if not topdown:
+ yield top, dirs, nondirs
+
+#------------------------------------------------------------------------------
+
+class _MSVSFolder(FileList):
+ """Folder in a Visual Studio solution."""
entry_type_guid = '{2150E333-8FDC-42A3-9474-1A3956D46DE8}'
- def initialize(self, path, name = None, entries = None, guid = None,
- items = None):
+ def initialize(self, path, name = None, entries = None, guid = None, items = None):
"""Initializes the folder.
Args:
@@ -143,6 +233,8 @@ class _MSVSFolder(SCons.Node.Node):
items: List of solution items to include in the folder project. May be
None, if the folder does not directly contain items.
"""
+ super(_MSVSFolder, self).__init__(entries)
+
# For folder entries, the path is the same as the name
self.msvs_path = path
self.msvs_name = name or path
@@ -150,7 +242,6 @@ class _MSVSFolder(SCons.Node.Node):
self.guid = guid
# Copy passed lists (or set to empty lists)
- self.entries = list(entries or [])
self.items = list(items or [])
def get_guid(self):
@@ -171,13 +262,183 @@ def MSVSFolder(env, item, *args, **kw):
#------------------------------------------------------------------------------
+class MSVSConfig(object):
+ """Visual Studio configuration."""
+ def __init__(self, Name, config_type, tools=[], **attrs):
+ """Initializes the configuration.
+
+ Args:
+ **attrs: Configuration attributes.
+ """
+ # Special handling for attributes that we want to make more
+ # convenient for the user.
+ ips = attrs.get('InheritedPropertySheets')
+ if ips:
+ if isinstance(ips, list):
+ ips = ';'.join(ips)
+ attrs['InheritedPropertySheets'] = ips.replace('/', '\\')
+
+ tools = tools or []
+ if not SCons.Util.is_List(tools):
+ tools = [tools]
+ tool_objects = []
+ for t in tools:
+ if not isinstance(t, MSVSTool):
+ t = MSVSTool(t)
+ tool_objects.append(t)
+
+ self.Name = Name
+ self.config_type = config_type
+ self.tools = tool_objects
+ self.attrs = attrs
+
+ def CreateElement(self, doc):
+ """Creates an element for the configuration.
+
+ Args:
+ doc: xml.dom.Document object to use for node creation.
+
+ Returns:
+ A new xml.dom.Element for the configuration.
+ """
+ node = doc.createElement(self.config_type)
+ node.setAttribute('Name', self.Name)
+ for k, v in self.attrs.items():
+ node.setAttribute(k, v)
+ for t in self.tools:
+ node.appendChild(t.CreateElement(doc))
+ return node
+
+
+class MSVSFileListBase(FileList):
+ """Base class for a file list in a Visual Studio project file."""
+
+ def CreateElement(self, doc, node_func=lambda x: x):
+ """Creates an element for an MSVSFileListBase subclass.
+
+ Args:
+ doc: xml.dom.Document object to use for node creation.
+ node_func: Function to use to return Nodes for objects that
+ don't have a CreateElement() method of their own.
+
+ Returns:
+ A new xml.dom.Element for the MSVSFileListBase object.
+ """
+ node = doc.createElement(self.element_name)
+ for entry in self.entries:
+ if hasattr(entry, 'CreateElement'):
+ n = entry.CreateElement(doc, node_func)
+ else:
+ n = node_func(entry)
+ node.appendChild(n)
+ return node
+
+
+class MSVSFiles(MSVSFileListBase):
+ """Files list in a Visual Studio project file."""
+ element_name = 'Files'
+
+
+class MSVSFilter(MSVSFileListBase):
+ """Filter (that is, a virtual folder) in a Visual Studio project file."""
+
+ element_name = 'Filter'
+
+ def __init__(self, Name, entries=None):
+ """Initializes the folder.
+
+ Args:
+ Name: Filter (folder) name.
+ entries: List of filenames and/or Filter objects contained.
+ """
+ super(MSVSFilter, self).__init__(entries)
+ self.Name = Name
+
+ def CreateElement(self, doc, node_func=lambda x: x):
+ """Creates an element for the Filter.
+
+ Args:
+ doc: xml.dom.Document object to use for node creation.
+ node_func: Function to use to return Nodes for objects that
+ don't have a CreateElement() method of their own.
+
+ Returns:
+ A new xml.dom.Element for the filter.
+ """
+ node = super(MSVSFilter, self).CreateElement(doc, node_func)
+ node.setAttribute('Name', self.Name)
+ return node
+
+
+class MSVSTool(object):
+ """Visual Studio tool."""
+
+ def __init__(self, Name, **attrs):
+ """Initializes the tool.
+
+ Args:
+ Name: Tool name.
+ **attrs: Tool attributes.
+ """
+ self.Name = Name
+ self.attrs = attrs
+
+ def CreateElement(self, doc):
+ """Creates an element for the tool.
+
+ Args:
+ doc: xml.dom.Document object to use for node creation.
+
+ Returns:
+ A new xml.dom.Element for the tool.
+ """
+ node = doc.createElement('Tool')
+ node.setAttribute('Name', self.Name)
+ for k, v in self.attrs.items():
+ node.setAttribute(k, v)
+ return node
+
+
+class MSVSToolFile(object):
+ """Visual Studio tool file specification."""
+
+ def __init__(self, node, **attrs):
+ """Initializes the tool.
+
+ Args:
+ node: Node for the Tool File
+ **attrs: Tool File attributes.
+ """
+ self.node = node
+
+ def CreateElement(self, doc, project):
+ result = doc.createElement('ToolFile')
+ result.setAttribute('RelativePath', project.get_rel_path(self.node))
+ return result
+
+
+#------------------------------------------------------------------------------
+
+def MSVSAction(target, source, env):
+ target[0].Write(env)
+
+MSVSProjectAction = SCons.Script.Action(MSVSAction,
+ "Generating Visual Studio project `$TARGET' ...")
class _MSVSProject(SCons.Node.FS.File):
"""Visual Studio project."""
entry_type_guid = '{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}'
- def initialize(self, path, name = None, dependencies = None, guid = None):
+ def initialize(self, env, path, name = None,
+ dependencies = None,
+ guid = None,
+ buildtargets = [],
+ files = [],
+ root_namespace = None,
+ relative_path_prefix = '',
+ tools = None,
+ configurations = None):
"""Initializes the project.
Args:
@@ -187,14 +448,87 @@ class _MSVSProject(SCons.Node.FS.File):
dependencies: List of other Project objects this project is dependent
upon, if not None.
guid: GUID to use for project, if not None.
+ buildtargets: List of target(s) being built by this project.
+ files: List of source files for the project. This will be
+ supplemented by any source files of buildtargets.
+ root_namespace: The value of the RootNamespace attribute of the
+ project, if not None. The default is to use the same
+ string as the name.
+ relative_path_prefix: A prefix to be appended to the beginning of
+ every file name in the list. The canonical use is to specify
+ './' to make files explicitly relative to the local directory.
+ tools: A list of MSVSTool objects or strings representing
+ tools to be used to build this project. This will be used
+ for any configurations that don't provide their own
+ per-configuration tool list.
+ configurations: A list of MSVSConfig objects representing
+ configurations built by this project.
"""
self.msvs_path = path
- self.msvs_name = name or os.path.splitext(os.path.basename(self.name))[0]
-
+ self.msvs_node = env.File(path)
+ if name is None:
+ if buildtargets:
+ name = os.path.splitext(buildtargets[0].name)[0]
+ else:
+ name = os.path.splitext(os.path.basename(path))[0]
+ self.msvs_name = name
+ self.root_namespace = root_namespace or self.msvs_name
+ self.buildtargets = buildtargets
+ self.relative_path_prefix = relative_path_prefix
+ self.tools = tools
+
+ self.env = env
self.guid = guid
- # Copy passed lists (or set to empty lists)
self.dependencies = list(dependencies or [])
+ self.configurations = list(configurations or [])
+ self.file_configurations = {}
+ self.tool_files = []
+
+ if not isinstance(files, MSVSFiles):
+ files = MSVSFiles(self.args2nodes(files))
+ self.files = files
+
+ env.Command(self, [], MSVSSolutionAction)
+
+ def args2nodes(self, entries):
+ result = []
+ for entry in entries:
+ if SCons.Util.is_String(entry):
+ entry = self.env.File(entry)
+ result.append(entry)
+ elif hasattr(entry, 'entries'):
+ entry.entries = self.args2nodes(entry.entries)
+ result.append(entry)
+ elif isinstance(entry, (list, UserList.UserList)):
+ result.extend(self.args2nodes(entry))
+ elif hasattr(entry, 'sources') and entry.sources:
+ result.extend(entry.sources)
+ else:
+ result.append(entry)
+ return result
+
+ def FindFile(self, node):
+ try:
+ flat_file_dict = self.flat_file_dict
+ except AttributeError:
+ flat_file_dict = {}
+ file_list = self.files[:]
+ while file_list:
+ entry = file_list.pop(0)
+ if not isinstance(entry, (list, UserList.UserList)):
+ entry = [entry]
+ for f in entry:
+ if hasattr(f, 'entries'):
+ file_list.extend(f.entries)
+ else:
+ flat_file_dict[f] = True
+ if hasattr(f, 'sources'):
+ for s in f.sources:
+ flat_file_dict[s] = True
+ self.flat_file_dict = flat_file_dict
+
+ return flat_file_dict.get(node)
def get_guid(self):
if self.guid is None:
@@ -220,28 +554,321 @@ class _MSVSProject(SCons.Node.FS.File):
def get_msvs_path(self, sln):
return sln.rel_path(self).replace('/', '\\')
+ def get_rel_path(self, node):
+ result = self.relative_path_prefix + self.msvs_node.rel_path(node)
+ return result.replace('/', '\\')
+
+ def AddConfig(self, Name, tools=None, **attrs):
+ """Adds a configuration to the parent node.
+
+ Args:
+ Name: The name of the configuration.
+ tools: List of tools (strings or Tool objects); may be None.
+ **attrs: Configuration attributes.
+ """
+ if tools is None:
+ # No tool list specifically for this configuration,
+ # use the Project's as a default.
+ tools = self.tools
+ c = MSVSConfig(Name, 'Configuration', tools=tools, **attrs)
+ self.configurations.append(c)
+
+ def AddFiles(self, files):
+ """Adds files to the project.
+
+ Args:
+ files: A list of Filter objects and/or relative paths to files.
+
+ This makes a copy of the file/filter tree at the time of this call. If you
+ later add files to a Filter object which was passed into a previous call
+ to AddFiles(), it will not be reflected in this project.
+ """
+ # TODO(rspangler) This also doesn't handle adding files to an existing
+ # filter. That is, it doesn't merge the trees.
+ self.files.extend(self.args2nodes(files))
+
+ def AddFileConfig(self, path, Name, tools=None, **attrs):
+ """Adds a configuration to a file.
+
+ Args:
+ path: Relative path to the file.
+ Name: Name of configuration to add.
+ tools: List of tools (strings or MSVSTool objects); may be None.
+ **attrs: Configuration attributes.
+
+ Raises:
+ ValueError: Relative path does not match any file added via AddFiles().
+ """
+ node = self.env.File(path)
+ if not self.FindFile(node):
+ raise ValueError('AddFileConfig: file "%s" not in project' % path)
+ c = MSVSConfig(Name, 'FileConfiguration', tools=tools, **attrs)
+ config_list = self.file_configurations.get(node)
+ if config_list is None:
+ config_list = []
+ self.file_configurations[node] = config_list
+ config_list.append(c)
+
+ def AddToolFile(self, path):
+ """Adds a tool file to the project.
+
+ Args:
+ path: Relative path from project to tool file.
+ """
+ tf = MSVSToolFile(self.env.File(path))
+ self.tool_files.append(tf)
+
+ def Create(self):
+ """Creates the project document.
+
+ Args:
+ name: Name of the project.
+ guid: GUID to use for project, if not None.
+ """
+ # Create XML doc
+ xml_impl = xml.dom.getDOMImplementation()
+ self.doc = xml_impl.createDocument(None, 'VisualStudioProject', None)
+
+ # Add attributes to root element
+ root = self.doc.documentElement
+ root.setAttribute('ProjectType', 'Visual C++')
+ root.setAttribute('Version', '8.00')
+ root.setAttribute('Name', self.msvs_name)
+ root.setAttribute('ProjectGUID', self.get_guid())
+ root.setAttribute('RootNamespace', self.root_namespace)
+ root.setAttribute('Keyword', 'Win32Proj')
+
+ # Add platform list
+ platforms = self.doc.createElement('Platforms')
+ root.appendChild(platforms)
+ n = self.doc.createElement('Platform')
+ n.setAttribute('Name', 'Win32')
+ platforms.appendChild(n)
+
+ # Add tool files section
+ tool_files = self.doc.createElement('ToolFiles')
+ root.appendChild(tool_files)
+ for tf in self.tool_files:
+ tool_files.appendChild(tf.CreateElement(self.doc, self))
+
+ # Add configurations section
+ configs = self.doc.createElement('Configurations')
+ root.appendChild(configs)
+ for c in self.configurations:
+ configs.appendChild(c.CreateElement(self.doc))
+
+ # Add empty References section
+ root.appendChild(self.doc.createElement('References'))
+
+ # Add files section
+ root.appendChild(self.files.CreateElement(self.doc, self.CreateFileElement))
+
+ # Add empty Globals section
+ root.appendChild(self.doc.createElement('Globals'))
+
+ def CreateFileElement(self, file):
+ """Create a DOM node for the specified file.
+
+ Args:
+ file: The file Node being considered.
+
+ Returns:
+ A DOM Node for the File, with a relative path to the current
+ project object, and any file configurations attached to the
+ project.
+ """
+
+ node = self.doc.createElement('File')
+ node.setAttribute('RelativePath', self.get_rel_path(file))
+ for c in self.file_configurations.get(file, []):
+ node.appendChild(c.CreateElement(self.doc))
+ return node
+
+ def _AddFileConfigurationDifferences(self, target, source, base_env, file_env):
+ """Adds a per-file configuration.
+
+ Args:
+ target: The target being built from the source.
+ source: The source to which the file configuration is being added.
+ base_env: The base construction environment for the project.
+ Differences from this will go into the FileConfiguration
+ in the project file.
+ file_env: The construction environment for the target, containing
+ the per-target settings.
+ """
+ pass
+
+ def _AddFileConfigurations(self, env):
+ """Adds per-file configurations for the buildtarget's sources.
+
+ Args:
+ env: The base construction environment for the project.
+ """
+ if not self.buildtargets:
+ return
+
+ bt = self.buildtargets[0]
+ additional_files = []
+ for t in bt.sources:
+ e = t.get_build_env()
+ for s in t.sources:
+ s = env.arg2nodes([s])[0]
+ if not self.FindFile(s):
+ additional_files.append(s)
+ if not env is e:
+ self._AddFileConfigurationDifferences(t, s, env, e)
+ self.AddFiles(additional_files)
+
+ def Write(self, env):
+ """Writes the project file."""
+ self._AddFileConfigurations(env)
+
+ self.Create()
+
+ f = open(str(self.msvs_node), 'wt')
+ f.write(self.formatMSVSProjectXML(self.doc))
+ f.close()
+
+ # Methods for formatting XML as nearly identically to Microsoft's
+ # .vcproj output as we can practically make it.
+ #
+ # The general design here is copied from:
+ #
+ # Bruce Eckels' MindView, Inc: 12-09-04 XML Oddyssey
+ # http://www.mindview.net/WebLog/log-0068
+ #
+ # Eckels' implementation broke up long tag definitions for readability,
+ # in much the same way that .vcproj does, but we've modified things
+ # for .vcproj quirks (like some tags *always* terminating with </Tag>,
+ # even when empty).
+
+ encoding = 'Windows-1252'
+
+ def formatMSVSProjectXML(self, xmldoc):
+ xmldoc = xmldoc.toprettyxml("", "\n", encoding=self.encoding)
+ # Remove trailing whitespace from each line:
+ xmldoc = "\n".join(
+ [line.rstrip() for line in xmldoc.split("\n")])
+ # Remove all empty lines before opening '<':
+ while xmldoc.find("\n\n<") != -1:
+ xmldoc = xmldoc.replace("\n\n<", "\n<")
+ dom = xml.dom.minidom.parseString(xmldoc)
+ xmldoc = dom.toprettyxml("\t", "", encoding=self.encoding)
+ xmldoc = xmldoc.replace('?><', '?>\n<')
+ xmldoc = self.reformatLines(xmldoc)
+ return xmldoc
+
+ def reformatLines(self, xmldoc):
+ result = []
+ for line in [line.rstrip() for line in xmldoc.split("\n")]:
+ if line.lstrip().startswith("<"):
+ result.append(self.reformatLine(line) + "\n")
+ else:
+ result.append(line + "\n")
+ return ''.join(result)
+
+ # Keyword order for specific tags.
+ #
+ # Listed keywords will come first and in the specified order.
+ # Any unlisted keywords come after, in whatever order they appear
+ # in the input config. In theory this means we would only *have* to
+ # list the keywords that we care about, but in practice we'll probably
+ # want to nail down Visual Studio's order to make sure we match them
+ # as nearly as possible.
+
+ order = {
+ 'Configuration' : [
+ 'Name',
+ 'ConfigurationType',
+ 'InheritedPropertySheets',
+ ],
+ 'FileConfiguration' : [
+ 'Name',
+ 'ExcludedFromBuild',
+ ],
+ 'Tool' : [
+ 'Name',
+ 'DisableSpecificWarnings',
+ ],
+ 'VisualStudioProject' : [
+ 'ProjectType',
+ 'Version',
+ 'Name',
+ 'ProjectGUID',
+ 'RootNamespace',
+ 'Keyword',
+ ],
+ }
+
+ force_closing_tag = [
+ 'File',
+ 'Globals',
+ 'References',
+ 'ToolFiles'
+ ]
+
+ oneLiner = re.compile("(\s*)<(\w+)(.*)>")
+ keyValuePair = re.compile('\w+="[^"]*?"')
+ def reformatLine(self, line):
+ """Reformat an xml tag to put each key-value
+ element on a single indented line, for readability"""
+ matchobj = self.oneLiner.match(line.rstrip())
+ if not matchobj:
+ return line
+ baseIndent, tag, rest = matchobj.groups()
+ slash = ''
+ if rest[-1:] == '/':
+ slash = '/'
+ rest = rest[:-1]
+ result = [baseIndent + '<' + tag]
+ indent = baseIndent + "\t"
+ pairs = self.keyValuePair.findall(rest)
+ for key in self.order.get(tag, []):
+ for p in [ p for p in pairs if p.startswith(key+'=') ]:
+ result.append("\n" + indent + p)
+ pairs.remove(p)
+ for pair in pairs:
+ result.append("\n" + indent + pair)
+ result = [''.join(result).rstrip()]
+
+ if tag in self.force_closing_tag:
+ # These force termination with </Tag>, so translate slash.
+ if rest:
+ result.append("\n")
+ result.append(indent)
+ result.append(">")
+ if slash:
+ result.append("\n")
+ result.append(baseIndent + "</" + tag + ">")
+ else:
+ if rest:
+ result.append("\n")
+ if slash:
+ result.append(baseIndent)
+ else:
+ result.append(indent)
+ result.append(slash + ">")
+
+ return ''.join(result)
+
def MSVSProject(env, item, *args, **kw):
if not SCons.Util.is_String(item):
return item
item = env.subst(item)
result = env.fs._lookup(item, None, _MSVSProject, create=1)
- result.initialize(item, *args, **kw)
+ result.initialize(env, item, *args, **kw)
LookupAdd(item, result)
return result
#------------------------------------------------------------------------------
-def MSVSAction(target, source, env):
- target[0].Write(env)
-
MSVSSolutionAction = SCons.Script.Action(MSVSAction,
"Generating Visual Studio solution `$TARGET' ...")
class _MSVSSolution(SCons.Node.FS.File):
"""Visual Studio solution."""
- def initialize(self, env, path, entries = None, variants = None,
- websiteProperties = True):
+ def initialize(self, env, path, entries = None, variants = None, websiteProperties = True):
"""Initializes the solution.
Args:
@@ -432,3 +1059,10 @@ def MSVSSolution(env, item, *args, **kw):
result.initialize(env, item, *args, **kw)
LookupAdd(item, result)
return result
+
+import __builtin__
+
+__builtin__.MSVSFilter = MSVSFilter
+__builtin__.MSVSProject = MSVSProject
+__builtin__.MSVSSolution = MSVSSolution
+__builtin__.MSVSTool = MSVSTool
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py
index 01b8fcc..24b35f1 100644
--- a/site_scons/site_tools/chromium_builders.py
+++ b/site_scons/site_tools/chromium_builders.py
@@ -8,54 +8,110 @@ wrappers around Hammer builders. This gives us a central place for any
customization we need to make to the different things we build.
"""
+import SCons.Node
+import _Node_MSVS as MSVS
+
+class Null(object):
+ def __new__(cls, *args, **kwargs):
+ if '_inst' not in vars(cls):
+ cls._inst = super(type, cls).__new__(cls, *args, **kwargs)
+ return cls._inst
+ def __init__(self, *args, **kwargs): pass
+ def __call__(self, *args, **kwargs): return self
+ def __repr__(self): return "Null()"
+ def __nonzero__(self): return False
+ def __getattr__(self, name): return self
+ def __setattr__(self, name, val): return self
+ def __delattr__(self, name): return self
+ def __getitem__(self, name): return self
+
+class ChromeFileList(MSVS.FileList):
+ def Append(self, *args):
+ for element in args:
+ self.append(element)
+ def Extend(self, *args):
+ for element in args:
+ self.extend(element)
+ def Remove(self, *args):
+ for top, lists, nonlists in MSVS.FileListWalk(self, topdown=False):
+ for element in args:
+ try:
+ top.remove(element)
+ except ValueError:
+ pass
+ def Replace(self, old, new):
+ for top, lists, nonlists in MSVS.FileListWalk(self, topdown=False):
+ try:
+ i = top.index(old)
+ except ValueError:
+ pass
+ else:
+ top[i] = new
+
+import __builtin__
+__builtin__.ChromeFileList = ChromeFileList
+
+def compilable_files(sources):
+ if not hasattr(sources, 'entries'):
+ return [x for x in sources if not str(x).endswith('.h')]
+ result = []
+ for top, folders, nonfolders in MSVS.FileListWalk(sources):
+ result.extend([x for x in nonfolders if not str(x).endswith('.h')])
+ return result
+
+def ChromeProgram(env, target, source, *args, **kw):
+ source = compilable_files(source)
+ result = env.ComponentProgram(target, source, *args, **kw)
+ if env.get('INCREMENTAL'):
+ env.Precious(result)
+ return result
+
+def ChromeTestProgram(env, target, source, *args, **kw):
+ source = compilable_files(source)
+ result = env.ComponentTestProgram(target, source, *args, **kw)
+ if env.get('INCREMENTAL'):
+ env.Precious(*result)
+ return result
+
+def ChromeStaticLibrary(env, target, source, *args, **kw):
+ source = compilable_files(source)
+ kw['COMPONENT_STATIC'] = True
+ return env.ComponentLibrary(target, source, *args, **kw)
+
+def ChromeSharedLibrary(env, target, source, *args, **kw):
+ source = compilable_files(source)
+ kw['COMPONENT_STATIC'] = False
+ result = [env.ComponentLibrary(target, source, *args, **kw)[0]]
+ if env.get('INCREMENTAL'):
+ env.Precious(result)
+ return result
+
+def ChromeObject(env, *args, **kw):
+ return env.ComponentObject(*args, **kw)
+
+def ChromeMSVSFolder(env, *args, **kw):
+ if not env.Bit('msvs'):
+ return Null()
+ return env.MSVSFolder(*args, **kw)
+
+def ChromeMSVSProject(env, *args, **kw):
+ if not env.Bit('msvs'):
+ return Null()
+ return env.MSVSProject(*args, **kw)
+
+def ChromeMSVSSolution(env, *args, **kw):
+ if not env.Bit('msvs'):
+ return Null()
+ return env.MSVSSolution(*args, **kw)
+
def generate(env):
- def ChromeProgram(env, *args, **kw):
- result = env.ComponentProgram(*args, **kw)
- if env.get('INCREMENTAL'):
- env.Precious(result)
- return result
env.AddMethod(ChromeProgram)
-
- def ChromeTestProgram(env, *args, **kw):
- result = env.ComponentTestProgram(*args, **kw)
- if env.get('INCREMENTAL'):
- env.Precious(*result)
- return result
env.AddMethod(ChromeTestProgram)
-
- def ChromeStaticLibrary(env, *args, **kw):
- kw['COMPONENT_STATIC'] = True
- return env.ComponentLibrary(*args, **kw)
env.AddMethod(ChromeStaticLibrary)
-
- def ChromeSharedLibrary(env, *args, **kw):
- kw['COMPONENT_STATIC'] = False
- result = [env.ComponentLibrary(*args, **kw)[0]]
- if env.get('INCREMENTAL'):
- env.Precious(result)
- return result
env.AddMethod(ChromeSharedLibrary)
-
- def ChromeObject(env, *args, **kw):
- 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):
diff --git a/skia/SConscript b/skia/SConscript
index 7401474..776da05 100644
--- a/skia/SConscript
+++ b/skia/SConscript
@@ -39,125 +39,362 @@ if env.Bit('windows'):
elif env.Bit('posix'):
env.Append(CCFLAGS = ['-Wno-unused'])
-input_files = [
- 'animator/SkTime.cpp',
- 'corecg/Sk64.cpp',
- 'corecg/SkBuffer.cpp',
- 'corecg/SkChunkAlloc.cpp',
- 'corecg/SkCordic.cpp',
- 'corecg/SkDebug.cpp',
- 'corecg/SkDebug_stdio.cpp',
- 'corecg/SkFloat.cpp',
- 'corecg/SkFloatBits.cpp',
- 'corecg/SkInterpolator.cpp',
- 'corecg/SkMath.cpp',
- 'corecg/SkMatrix.cpp',
- 'corecg/SkMemory_stdlib.cpp',
- 'corecg/SkPageFlipper.cpp',
- 'corecg/SkPoint.cpp',
- 'corecg/SkRect.cpp',
- 'corecg/SkRegion.cpp',
- 'effects/Sk1DPathEffect.cpp',
- 'effects/Sk2DPathEffect.cpp',
- 'effects/SkAvoidXfermode.cpp',
- 'effects/SkBlurDrawLooper.cpp',
- 'effects/SkBlurMask.cpp',
- 'effects/SkBlurMaskFilter.cpp',
- 'effects/SkCamera.cpp',
- 'effects/SkColorFilters.cpp',
- 'effects/SkColorMatrix.cpp',
- 'effects/SkColorMatrixFilter.cpp',
- 'effects/SkCornerPathEffect.cpp',
- 'effects/SkCullPoints.cpp',
- 'effects/SkDashPathEffect.cpp',
- 'effects/SkDiscretePathEffect.cpp',
- 'effects/SkEmbossMask.cpp',
- 'effects/SkEmbossMaskFilter.cpp',
- 'effects/SkGradientShader.cpp',
- 'effects/SkKernel33MaskFilter.cpp',
- 'effects/SkLayerRasterizer.cpp',
- 'effects/SkPaintFlagsDrawFilter.cpp',
- 'effects/SkPixelXorXfermode.cpp',
- 'effects/SkShaderExtras.cpp',
- 'effects/SkTransparentShader.cpp',
- 'effects/SkUnitMappers.cpp',
- 'ext/image_operations.cc',
- 'ext/convolver.cc',
- 'ext/skia_utils.cc',
- 'images/SkImageDecoder.cpp',
- 'images/SkImageRef.cpp',
- 'images/SkStream.cpp',
- 'picture/SkPathHeap.cpp',
- 'picture/SkPicture.cpp',
- 'picture/SkPictureFlat.cpp',
- 'picture/SkPicturePlayback.cpp',
- 'picture/SkPictureRecord.cpp',
- 'ports/SkFontHost_none.cpp',
- 'ports/SkGlobals_global.cpp',
- 'ports/SkImageDecoder_Factory.cpp',
- 'ports/SkOSFile_stdio.cpp',
- 'sgl/SkAlphaRuns.cpp',
- 'sgl/SkBitmap.cpp',
- 'sgl/SkBitmapProcShader.cpp',
- 'sgl/SkBitmapProcState.cpp',
- 'sgl/SkBitmapProcState_matrixProcs.cpp',
- 'sgl/SkBitmapSampler.cpp',
- 'sgl/SkBitmapShader.cpp',
- 'sgl/SkBlitRow_D16.cpp',
- 'sgl/SkBlitRow_D4444.cpp',
- 'sgl/SkBlitter.cpp',
- 'sgl/SkBlitter_4444.cpp',
- 'sgl/SkBlitter_A1.cpp',
- 'sgl/SkBlitter_A8.cpp',
- 'sgl/SkBlitter_ARGB32.cpp',
- 'sgl/SkBlitter_RGB16.cpp',
- 'sgl/SkBlitter_Sprite.cpp',
- 'sgl/SkCanvas.cpp',
- 'sgl/SkColor.cpp',
- 'sgl/SkColorFilter.cpp',
- 'sgl/SkColorTable.cpp',
- 'sgl/SkDeque.cpp',
- 'sgl/SkDevice.cpp',
- 'sgl/SkDither.cpp',
- 'sgl/SkDraw.cpp',
- 'sgl/SkEdge.cpp',
- 'sgl/SkFilterProc.cpp',
- 'sgl/SkFlattenable.cpp',
- 'sgl/SkGeometry.cpp',
- 'sgl/SkGlobals.cpp',
- 'sgl/SkGlyphCache.cpp',
- 'sgl/SkGraphics.cpp',
- 'sgl/SkMask.cpp',
- 'sgl/SkMaskFilter.cpp',
- 'sgl/SkPackBits.cpp',
- 'sgl/SkPaint.cpp',
- 'sgl/SkPath.cpp',
- 'sgl/SkPathEffect.cpp',
- 'sgl/SkPathMeasure.cpp',
- 'sgl/SkPixelRef.cpp',
- 'sgl/SkProcSpriteBlitter.cpp',
- 'sgl/SkPtrRecorder.cpp',
- 'sgl/SkRasterizer.cpp',
- 'sgl/SkRefCnt.cpp',
- 'sgl/SkRegion_path.cpp',
- 'sgl/SkScalerContext.cpp',
- 'sgl/SkScan.cpp',
- 'sgl/SkScan_Antihair.cpp',
- 'sgl/SkScan_AntiPath.cpp',
- 'sgl/SkScan_Hairline.cpp',
- 'sgl/SkScan_Path.cpp',
- 'sgl/SkShader.cpp',
- 'sgl/SkSpriteBlitter_ARGB32.cpp',
- 'sgl/SkSpriteBlitter_RGB16.cpp',
- 'sgl/SkString.cpp',
- 'sgl/SkStroke.cpp',
- 'sgl/SkStrokerPriv.cpp',
- 'sgl/SkTSearch.cpp',
- 'sgl/SkTypeface_fake.cpp',
- 'sgl/SkUtils.cpp',
- 'sgl/SkWriter32.cpp',
- 'sgl/SkXfermode.cpp',
-]
+input_files = ChromeFileList([
+ # TODO(sgk):
+ # We're deliberately mis-indenting the MSVSFilter() calls here
+ # so we don't have to re-indent the file name entries when the
+ # MSVSFilter() calls go away in (favor of automated generation
+ # of the heirarchy).
+ MSVSFilter('Header files', [
+ 'include/Sk1DPathEffect.h',
+ 'include/Sk2DPathEffect.h',
+ 'include/corecg/Sk64.h',
+ 'include/SkAnimator.h',
+ 'include/SkAnimatorView.h',
+ 'include/SkApplication.h',
+ 'include/SkAvoidXfermode.h',
+ 'include/SkBGViewArtist.h',
+ 'include/SkBitmap.h',
+ 'include/SkBlurDrawLooper.h',
+ 'include/SkBlurMaskFilter.h',
+ 'include/SkBML_WXMLParser.h',
+ 'include/SkBML_XMLParser.h',
+ 'include/SkBorderView.h',
+ 'include/SkBounder.h',
+ 'include/corecg/SkBuffer.h',
+ 'include/SkCamera.h',
+ 'include/SkCanvas.h',
+ 'include/corecg/SkChunkAlloc.h',
+ 'include/SkColor.h',
+ 'include/SkColorFilter.h',
+ 'include/SkColorMatrix.h',
+ 'include/SkColorPriv.h',
+ 'include/SkColorShader.h',
+ 'include/SkCornerPathEffect.h',
+ 'include/SkCullPoints.h',
+ 'include/SkDashPathEffect.h',
+ 'include/SkDeque.h',
+ 'include/SkDescriptor.h',
+ 'include/SkDevice.h',
+ 'include/SkDiscretePathEffect.h',
+ 'include/SkDither.h',
+ 'include/SkDOM.h',
+ 'include/SkDraw.h',
+ 'include/SkDrawExtraPathEffect.h',
+ 'include/SkDrawFilter.h',
+ 'include/SkDrawLooper.h',
+ 'include/SkEmbossMaskFilter.h',
+ 'include/corecg/SkEndian.h',
+ 'include/SkEvent.h',
+ 'include/SkEventSink.h',
+ 'include/corecg/SkFDot6.h',
+ 'include/corecg/SkFixed.h',
+ 'include/SkFlattenable.h',
+ 'include/SkFlipPixelRef.h',
+ 'include/corecg/SkFloatBits.h',
+ 'include/corecg/SkFloatingPoint.h',
+ 'include/SkFontCodec.h',
+ 'include/SkFontHost.h',
+ 'include/SkGlobals.h',
+ 'include/SkGradientShader.h',
+ 'include/SkGraphics.h',
+ 'include/SkImageDecoder.h',
+ 'include/SkImageRef.h',
+ 'include/SkImageView.h',
+ 'include/corecg/SkInterpolator.h',
+ 'include/SkJS.h',
+ 'include/SkKernel33MaskFilter.h',
+ 'include/SkKey.h',
+ 'include/SkLayerDrawLooper.h',
+ 'include/SkLayerRasterizer.h',
+ 'include/SkMallocPixelRef.h',
+ 'include/SkMask.h',
+ 'include/SkMaskFilter.h',
+ 'include/corecg/SkMath.h',
+ 'include/corecg/SkMatrix.h',
+ 'include/SkMetaData.h',
+ 'include/SkMMapStream.h',
+ 'include/SkMovie.h',
+ 'include/SkNinePatch.h',
+ 'include/SkOSFile.h',
+ 'include/SkOSMenu.h',
+ 'include/SkOSSound.h',
+ 'include/SkOSWindow_Mac.h',
+ 'include/SkOSWindow_Unix.h',
+ 'include/SkOSWindow_Win.h',
+ 'include/SkOSWindow_wxwidgets.h',
+ 'include/SkPackBits.h',
+ 'include/corecg/SkPageFlipper.h',
+ 'include/SkPaint.h',
+ 'include/SkPaintFlagsDrawFilter.h',
+ 'include/SkParse.h',
+ 'include/SkParsePaint.h',
+ 'include/SkPath.h',
+ 'include/SkPathEffect.h',
+ 'include/SkPathMeasure.h',
+ 'include/corecg/SkPerspIter.h',
+ 'include/SkPicture.h',
+ 'include/SkPixelRef.h',
+ 'include/SkPixelXorXfermode.h',
+ 'include/corecg/SkPoint.h',
+ 'include/SkPorterDuff.h',
+ 'include/corecg/SkPostConfig.h',
+ 'include/corecg/SkPreConfig.h',
+ 'include/SkProgressBarView.h',
+ 'include/SkPtrRecorder.h',
+ 'include/corecg/SkRandom.h',
+ 'include/SkRasterizer.h',
+ 'include/SkReader32.h',
+ 'include/corecg/SkRect.h',
+ 'include/SkRefCnt.h',
+ 'include/corecg/SkRegion.h',
+ 'include/corecg/SkScalar.h',
+ 'include/corecg/SkScalarCompare.h',
+ 'include/SkScalerContext.h',
+ 'include/SkScrollBarView.h',
+ 'include/SkShader.h',
+ 'include/SkShaderExtras.h',
+ 'include/SkStackViewLayout.h',
+ 'include/SkStream.h',
+ 'include/SkStream_Win.h',
+ 'include/SkString.h',
+ 'include/SkStroke.h',
+ 'include/SkSVGAttribute.h',
+ 'include/SkSVGBase.h',
+ 'include/SkSVGPaintState.h',
+ 'include/SkSVGParser.h',
+ 'include/SkSVGTypes.h',
+ 'include/SkSystemEventTypes.h',
+ 'include/SkTDArray.h',
+ 'include/SkTDict.h',
+ 'include/SkTDStack.h',
+ 'include/corecg/SkTemplates.h',
+ 'include/SkTextBox.h',
+ 'include/corecg/SkThread.h',
+ 'include/corecg/SkThread_platform.h',
+ 'include/SkTime.h',
+ 'include/SkTransparentShader.h',
+ 'include/corecg/SkTSearch.h',
+ 'include/SkTypeface.h',
+ 'include/corecg/SkTypes.h',
+ 'include/SkUnitMapper.h',
+ 'include/SkUnitMappers.h',
+ 'include/SkUnPreMultiply.h',
+ 'include/corecg/SkUserConfig.h',
+ 'include/SkUtils.h',
+ 'include/SkView.h',
+ 'include/SkViewInflate.h',
+ 'include/SkWidget.h',
+ 'include/SkWidgetViews.h',
+ 'include/SkWindow.h',
+ 'include/SkWriter32.h',
+ 'include/SkXfermode.h',
+ 'include/SkXMLParser.h',
+ 'include/SkXMLWriter.h',
+ ]),
+
+ MSVSFilter('corecg', [
+ 'corecg/Sk64.cpp',
+ 'corecg/SkBuffer.cpp',
+ 'corecg/SkChunkAlloc.cpp',
+ 'corecg/SkCordic.cpp',
+ 'corecg/SkCordic.h',
+ 'corecg/SkDebug.cpp',
+ 'corecg/SkDebug_stdio.cpp',
+ 'corecg/SkFloat.cpp',
+ 'corecg/SkFloat.h',
+ 'corecg/SkFloatBits.cpp',
+ 'corecg/SkInterpolator.cpp',
+ 'corecg/SkMath.cpp',
+ 'corecg/SkMatrix.cpp',
+ 'corecg/SkMemory_stdlib.cpp',
+ 'corecg/SkPageFlipper.cpp',
+ 'corecg/SkPoint.cpp',
+ 'corecg/SkRect.cpp',
+ 'corecg/SkRegion.cpp',
+ 'corecg/SkRegionPriv.h',
+ 'corecg/SkSinTable.h',
+ 'corecg/SkTSort.h',
+ ]),
+
+ MSVSFilter('sgl', [
+ 'sgl/SkAlphaRuns.cpp',
+ 'sgl/SkAntiRun.h',
+ 'sgl/SkAutoKern.h',
+ 'sgl/SkBitmap.cpp',
+ 'sgl/SkBitmapProcShader.cpp',
+ 'sgl/SkBitmapProcShader.h',
+ 'sgl/SkBitmapProcState.cpp',
+ 'sgl/SkBitmapProcState.h',
+ 'sgl/SkBitmapProcState_matrix.h',
+ 'sgl/SkBitmapProcState_matrixProcs.cpp',
+ 'sgl/SkBitmapSampler.cpp',
+ 'sgl/SkBitmapSampler.h',
+ 'sgl/SkBitmapSamplerTemplate.h',
+ 'sgl/SkBitmapShader.cpp',
+ 'sgl/SkBitmapShader.h',
+ 'sgl/SkBitmapShader16BilerpTemplate.h',
+ 'sgl/SkBitmapShaderTemplate.h',
+ 'sgl/SkBlitBWMaskTemplate.h',
+ 'sgl/SkBlitRow.h',
+ 'sgl/SkBlitRow_D16.cpp',
+ 'sgl/SkBlitRow_D4444.cpp',
+ 'sgl/SkBlitter.cpp',
+ 'sgl/SkBlitter.h',
+ 'sgl/SkBlitter_4444.cpp',
+ 'sgl/SkBlitter_A1.cpp',
+ 'sgl/SkBlitter_A8.cpp',
+ 'sgl/SkBlitter_ARGB32.cpp',
+ 'sgl/SkBlitter_RGB16.cpp',
+ 'sgl/SkBlitter_Sprite.cpp',
+ 'sgl/SkCanvas.cpp',
+ 'sgl/SkColor.cpp',
+ 'sgl/SkColorFilter.cpp',
+ 'sgl/SkColorTable.cpp',
+ 'sgl/SkCoreBlitters.h',
+ 'sgl/SkDeque.cpp',
+ 'sgl/SkDevice.cpp',
+ 'sgl/SkDither.cpp',
+ 'sgl/SkDraw.cpp',
+ 'sgl/SkDraw.h',
+ 'sgl/SkEdge.cpp',
+ 'sgl/SkEdge.h',
+ 'sgl/SkFilterProc.cpp',
+ 'sgl/SkFilterProc.h',
+ 'sgl/SkFlattenable.cpp',
+ 'sgl/SkFP.h',
+ 'sgl/SkGeometry.cpp',
+ 'sgl/SkGeometry.h',
+ 'sgl/SkGlobals.cpp',
+ 'sgl/SkGlyphCache.cpp',
+ 'sgl/SkGlyphCache.h',
+ 'sgl/SkGraphics.cpp',
+ 'sgl/SkMask.cpp',
+ 'sgl/SkMaskFilter.cpp',
+ 'sgl/SkPackBits.cpp',
+ 'sgl/SkPaint.cpp',
+ 'sgl/SkPath.cpp',
+ 'sgl/SkPathEffect.cpp',
+ 'sgl/SkPathMeasure.cpp',
+ 'sgl/SkPixelRef.cpp',
+ 'sgl/SkProcSpriteBlitter.cpp',
+ 'sgl/SkPtrRecorder.cpp',
+ 'sgl/SkRasterizer.cpp',
+ 'sgl/SkRefCnt.cpp',
+ 'sgl/SkRegion_path.cpp',
+ 'sgl/SkScalerContext.cpp',
+ 'sgl/SkScan.cpp',
+ 'sgl/SkScan.h',
+ 'sgl/SkScan_Antihair.cpp',
+ 'sgl/SkScan_AntiPath.cpp',
+ 'sgl/SkScan_Hairline.cpp',
+ 'sgl/SkScan_Path.cpp',
+ 'sgl/SkScanPriv.h',
+ 'sgl/SkShader.cpp',
+ 'sgl/SkSpriteBlitter.h',
+ 'sgl/SkSpriteBlitter_ARGB32.cpp',
+ 'sgl/SkSpriteBlitter_RGB16.cpp',
+ 'sgl/SkSpriteBlitterTemplate.h',
+ 'sgl/SkString.cpp',
+ 'sgl/SkStroke.cpp',
+ 'sgl/SkStrokerPriv.cpp',
+ 'sgl/SkStrokerPriv.h',
+ 'sgl/SkTemplatesPriv.h',
+ 'sgl/SkTSearch.cpp',
+ 'sgl/SkTSort.h',
+ 'sgl/SkTypeface_fake.cpp',
+ 'sgl/SkUtils.cpp',
+ 'sgl/SkWriter32.cpp',
+ 'sgl/SkXfermode.cpp',
+ ]),
+
+ MSVSFilter('ports', [
+ 'ports/sk_predefined_gamma.h',
+ 'ports/SkFontHost_none.cpp',
+ 'ports/SkGlobals_global.cpp',
+ 'ports/SkImageDecoder_Factory.cpp',
+ 'ports/SkOSFile_stdio.cpp',
+ 'ports/SkThread_win.cpp',
+ ]),
+
+ MSVSFilter('images', [
+ 'images/SkImageDecoder.cpp',
+ 'images/SkImageRef.cpp',
+ 'images/SkScaledBitmapSampler.h',
+ 'images/SkStream.cpp',
+ ]),
+
+ MSVSFilter('effects', [
+ 'effects/Sk1DPathEffect.cpp',
+ 'effects/Sk2DPathEffect.cpp',
+ 'effects/SkAvoidXfermode.cpp',
+ 'effects/SkBlurDrawLooper.cpp',
+ 'effects/SkBlurMask.cpp',
+ 'effects/SkBlurMaskFilter.cpp',
+ 'effects/SkCamera.cpp',
+ 'effects/SkColorFilters.cpp',
+ 'effects/SkColorMatrix.cpp',
+ 'effects/SkColorMatrixFilter.cpp',
+ 'effects/SkCornerPathEffect.cpp',
+ 'effects/SkCullPoints.cpp',
+ 'effects/SkDashPathEffect.cpp',
+ 'effects/SkDiscretePathEffect.cpp',
+ 'effects/SkEmbossMask.cpp',
+ 'effects/SkEmbossMaskFilter.cpp',
+ 'effects/SkGradientShader.cpp',
+ 'effects/SkKernel33MaskFilter.cpp',
+ 'effects/SkLayerRasterizer.cpp',
+ 'effects/SkPaintFlagsDrawFilter.cpp',
+ 'effects/SkPixelXorXfermode.cpp',
+ 'effects/SkRadialGradient_Table.h',
+ 'effects/SkShaderExtras.cpp',
+ 'effects/SkTransparentShader.cpp',
+ 'effects/SkUnitMappers.cpp',
+ ]),
+
+ MSVSFilter('animator', [
+ 'animator/SkTime.cpp',
+ ]),
+
+ MSVSFilter('picture', [
+ 'picture/SkPathHeap.cpp',
+ 'picture/SkPathHeap.h',
+ 'picture/SkPicture.cpp',
+ 'picture/SkPictureFlat.cpp',
+ 'picture/SkPictureFlat.h',
+ 'picture/SkPicturePlayback.cpp',
+ 'picture/SkPicturePlayback.h',
+ 'picture/SkPictureRecord.cpp',
+ 'picture/SkPictureRecord.h',
+ ]),
+
+ MSVSFilter('ext', [
+ 'ext/convolver.cc',
+ 'ext/convolver.h',
+ 'ext/bitmap_platform_device.h',
+ 'ext/bitmap_platform_device_win.cc',
+ 'ext/bitmap_platform_device_win.h',
+ 'ext/image_operations.cc',
+ 'ext/image_operations.h',
+ 'ext/platform_canvas.h',
+ 'ext/platform_canvas_win.cc',
+ 'ext/platform_canvas_win.h',
+ 'ext/platform_device.h',
+ 'ext/platform_device_win.cc',
+ 'ext/platform_device_win.h',
+ 'ext/skia_utils.cc',
+ 'ext/skia_utils.h',
+ 'ext/skia_utils_win.cc',
+ 'ext/skia_utils_win.h',
+ 'ext/vector_canvas.cc',
+ 'ext/vector_canvas.h',
+ 'ext/vector_device.cc',
+ 'ext/vector_device.h',
+
+ ]),
+
+ 'precompiled.cc',
+])
if env.Bit('linux'):
input_files.append('ext/bitmap_platform_device_linux.cc')
@@ -165,8 +402,8 @@ if env.Bit('linux'):
input_files.append('ext/platform_device_linux.cc')
# On Linux we use Skia to render fonts with FreeType and fontconfig
- input_files.remove('sgl/SkTypeface_fake.cpp')
- input_files.remove('ports/SkFontHost_none.cpp')
+ input_files.Remove('sgl/SkTypeface_fake.cpp')
+ input_files.Remove('ports/SkFontHost_none.cpp')
input_files.append('sgl/SkTypeface.cpp')
input_files.append('ports/SkFontHost_FreeType.cpp')
input_files.append('ports/SkFontHost_TrueType_Tables.cpp')
@@ -184,16 +421,25 @@ if env.Bit('mac'):
input_files.append('ext/platform_canvas_mac.cc')
input_files.append('ext/platform_device_mac.cc')
-if env.Bit('windows'):
- input_files.append('ext/bitmap_platform_device_win.cc')
- input_files.append('ext/platform_canvas_win.cc')
- input_files.append('ext/platform_device_win.cc')
- input_files.append('ext/skia_utils_win.cc')
- input_files.append('ext/vector_canvas.cc')
- input_files.append('ext/vector_device.cc')
+if not env.Bit('windows'):
+ input_files.Remove(
+ 'ext/bitmap_platform_device_win.cc',
+ 'ext/bitmap_platform_device_win.h',
+ 'ext/platform_canvas_win.cc',
+ 'ext/platform_canvas_win.h',
+ 'ext/platform_device_win.cc',
+ 'ext/platform_device_win.h',
+ 'ext/skia_utils_win.cc',
+ 'ext/skia_utils_win.h',
+ 'ext/vector_canvas.cc',
+ 'ext/vector_canvas.h',
+ 'ext/vector_device.cc',
+ 'ext/vector_device.h',
- input_files.append('ports/SkThread_win.cpp')
+ 'ports/SkThread_win.cpp',
+ )
+if env.Bit('windows'):
env_p = env.Clone(
PCHSTOP = 'SkTypes.h',
PDB = 'vc80.pdb',
@@ -207,9 +453,64 @@ if env.Bit('windows'):
# IncrediBuild installed on the build machine?
pch, obj = env_p.PCH(['skia.pch', 'precompiled.obj'], 'precompiled.cc')
env_p['PCH'] = pch
- input_files += [obj]
+ input_files.Replace('precompiled.cc', obj)
env.ChromeStaticLibrary('skia', input_files)
-env.ChromeMSVSProject('$SKIA_DIR/skia.vcproj',
- guid='{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}')
+p = env.ChromeMSVSProject('skia.vcproj',
+ guid='{CD9CA56E-4E94-444C-87D4-58CA1E6F300D}',
+ files=input_files,
+ relative_path_prefix=r'./',
+ tools = [
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ 'VCCLCompilerTool',
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ 'VCLibrarianTool',
+ 'VCALinkTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/debug.vsprops',
+ './skia.vsprops',
+ './precompiled.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/release.vsprops',
+ './skia.vsprops',
+ ])
+
+p.AddFileConfig(
+ 'precompiled.cc',
+ 'Debug|Win32',
+ tools=[
+ MSVSTool('VCCLCompilerTool', UsePrecompiledHeader='1'),
+ ])
+
+p.AddFileConfig(
+ 'precompiled.cc',
+ 'Release|Win32',
+ ExcludedFromBuild='true',
+ tools=[
+ MSVSTool('VCCLCompilerTool'),
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/skia/skia.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/testing/SConscript.gtest b/testing/SConscript.gtest
index c54b4c4..8df8d65 100644
--- a/testing/SConscript.gtest
+++ b/testing/SConscript.gtest
@@ -23,15 +23,65 @@ if env.Bit('windows'):
],
)
-input_files = [
+input_files = ChromeFileList([
+ 'gtest/include/gtest/internal/gtest-death-test-internal.h',
'gtest/src/gtest-death-test.cc',
+ 'gtest/include/gtest/gtest-death-test.h',
'gtest/src/gtest-filepath.cc',
+ 'gtest/include/gtest/internal/gtest-filepath.h',
+ 'gtest/src/gtest-internal-inl.h',
+ 'gtest/include/gtest/internal/gtest-internal.h',
+ 'gtest/include/gtest/gtest-message.h',
'gtest/src/gtest-port.cc',
+ 'gtest/include/gtest/internal/gtest-port.h',
+ 'gtest/include/gtest/gtest-spi.h',
+ 'gtest/include/gtest/internal/gtest-string.h',
'gtest/src/gtest.cc',
+ 'gtest/include/gtest/gtest.h',
+ 'gtest/include/gtest/gtest_pred_impl.h',
+ 'gtest/include/gtest/gtest_prod.h',
'multiprocess_func_list.cc',
-]
+])
env.ChromeStaticLibrary('gtest', input_files)
-env.ChromeMSVSProject('$TESTING_DIR/gtest.vcproj',
- guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}')
+p = env.ChromeMSVSProject('gtest.vcproj',
+ guid='{BFE8E2A7-3B3B-43B0-A994-3058B852DB8B}',
+ files=input_files,
+ tools = [
+ 'VCPreBuildEventTool',
+ 'VCCustomBuildTool',
+ 'VCXMLDataGeneratorTool',
+ 'VCWebServiceProxyGeneratorTool',
+ 'VCMIDLTool',
+ 'VCCLCompilerTool',
+ 'VCManagedResourceCompilerTool',
+ 'VCResourceCompilerTool',
+ 'VCPreLinkEventTool',
+ 'VCLibrarianTool',
+ 'VCALinkTool',
+ 'VCXDCMakeTool',
+ 'VCBscMakeTool',
+ 'VCFxCopTool',
+ 'VCPostBuildEventTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/debug.vsprops',
+ './using_gtest.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/release.vsprops',
+ './using_gtest.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/testing/gtest.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/third_party/libpng/libpng.scons b/third_party/libpng/libpng.scons
index 8b14dcf..8716157 100644
--- a/third_party/libpng/libpng.scons
+++ b/third_party/libpng/libpng.scons
@@ -39,27 +39,62 @@ env.Append(
],
)
-input_files = [
+input_files = ChromeFileList([
'png.c',
- 'pngwutil.c',
- 'pngwtran.c',
- 'pngwrite.c',
- 'pngwio.c',
- 'pngvcrd.c',
- 'pngtrans.c',
- 'pngset.c',
- 'pngrutil.c',
- 'pngrtran.c',
- 'pngrio.c',
- 'pngread.c',
- 'pngpread.c',
- 'pngmem.c',
- 'pngget.c',
- 'pnggccrd.c',
+ 'png.h',
+ 'pngconf.h',
'pngerror.c',
-]
+ 'pnggccrd.c',
+ 'pngget.c',
+ 'pngmem.c',
+ 'pngpread.c',
+ 'pngread.c',
+ 'pngrio.c',
+ 'pngrtran.c',
+ 'pngrutil.c',
+ 'pngset.c',
+ 'pngtrans.c',
+ 'pngusr.h',
+ 'pngvcrd.c',
+ 'pngwio.c',
+ 'pngwrite.c',
+ 'pngwtran.c',
+ 'pngwutil.c',
+])
env.ChromeStaticLibrary('libpng', input_files)
-env.ChromeMSVSProject('$LIBPNG_DIR/libpng.vcproj',
- guid='{C564F145-9172-42C3-BFCB-6014CA97DBCD}')
+p = env.ChromeMSVSProject('libpng.vcproj',
+ guid='{C564F145-9172-42C3-BFCB-6014CA97DBCD}',
+ files=input_files,
+ relative_path_prefix='./',
+ tools = [
+ 'VCLibrarianTool',
+ 'VCCLCompilerTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/debug.vsprops',
+ '$(SolutionDir)../third_party/zlib/using_zlib.vsprops',
+ '$(SolutionDir)../build/external_code.vsprops',
+ '$(SolutionDir)../third_party/libpng/using_libpng.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/release.vsprops',
+ '$(SolutionDir)../third_party/zlib/using_zlib.vsprops',
+ '$(SolutionDir)../build/external_code.vsprops',
+ '$(SolutionDir)../third_party/libpng/using_libpng.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/third_party/libpng/libpng.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/third_party/scons/scons-local/SCons/Node/FS.py b/third_party/scons/scons-local/SCons/Node/FS.py
index 6bb6f59e..ec7fd5e 100644
--- a/third_party/scons/scons-local/SCons/Node/FS.py
+++ b/third_party/scons/scons-local/SCons/Node/FS.py
@@ -554,7 +554,7 @@ class Base(SCons.Node.Node):
This node, which already existed, is being looked up as the
specified klass. Raise an exception if it isn't.
"""
- if self.__class__ is klass or klass is Entry:
+ if isinstance(self, klass) or klass is Entry:
return
raise TypeError, "Tried to lookup %s '%s' as a %s." %\
(self.__class__.__name__, self.path, klass.__name__)
diff --git a/third_party/zlib/zlib.scons b/third_party/zlib/zlib.scons
index a33834f..91c19ae 100644
--- a/third_party/zlib/zlib.scons
+++ b/third_party/zlib/zlib.scons
@@ -26,22 +26,61 @@ if env.Bit('windows'):
],
)
-input_files = [
+input_files = ChromeFileList([
'adler32.c',
'compress.c',
'crc32.c',
+ 'crc32.h',
'deflate.c',
+ 'deflate.h',
'gzio.c',
'infback.c',
'inffast.c',
+ 'inffast.h',
+ 'inffixed.h',
'inflate.c',
+ 'inflate.h',
'inftrees.c',
+ 'inftrees.h',
+ 'mozzconf.h',
'trees.c',
+ 'trees.h',
'uncompr.c',
+ 'zconf.h',
+ 'zlib.h',
'zutil.c',
-]
+ 'zutil.h',
+])
env.ChromeStaticLibrary('zlib', input_files)
-env.ChromeMSVSProject('$ZLIB_DIR/zlib.vcproj',
- guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}')
+p = env.ChromeMSVSProject('zlib.vcproj',
+ guid='{8423AF0D-4B88-4EBF-94E1-E4D00D00E21C}',
+ files=input_files,
+ relative_path_prefix=r'./',
+ tools = [
+ 'VCLibrarianTool',
+ 'VCCLCompilerTool',
+ ])
+
+p.AddConfig('Debug|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/debug.vsprops',
+ '$(SolutionDir)../build/external_code.vsprops',
+ ])
+
+p.AddConfig('Release|Win32',
+ ConfigurationType = '4',
+ InheritedPropertySheets = [
+ '$(SolutionDir)../build/common.vsprops',
+ '$(SolutionDir)../build/release.vsprops',
+ '$(SolutionDir)../build/external_code.vsprops',
+ ])
+
+env.AlwaysBuild(p)
+
+i = env.Command('$CHROME_SRC_DIR/third_party/zlib/zlib.vcproj', p,
+ Copy('$TARGET', '$SOURCE'))
+Alias('msvs', i)
diff --git a/webkit/webkit_sln.scons b/webkit/webkit_sln.scons
index 402c889..c186837 100644
--- a/webkit/webkit_sln.scons
+++ b/webkit/webkit_sln.scons
@@ -165,4 +165,4 @@ env.AlwaysBuild(solution)
i = env.Command('$CHROME_SRC_DIR/webkit/webkit.sln', solution,
Copy('$TARGET', '$SOURCE'))
-Alias('solutions', i)
+Alias('msvs', i)