summaryrefslogtreecommitdiffstats
path: root/net
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 /net
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
Diffstat (limited to 'net')
-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
10 files changed, 193 insertions, 62 deletions
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}')