summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 22:05:58 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 22:05:58 +0000
commit353a7839dcc80e0b5df8321d1b78c955385d93ad (patch)
treec8277f32f08fce86657bdc134b40c6bec3a6fd66 /chrome/app
parent98f8d9c1248dc678ef09af9436976ca5af72f42a (diff)
downloadchromium_src-353a7839dcc80e0b5df8321d1b78c955385d93ad.zip
chromium_src-353a7839dcc80e0b5df8321d1b78c955385d93ad.tar.gz
chromium_src-353a7839dcc80e0b5df8321d1b78c955385d93ad.tar.bz2
Create chrome_resources.scons, chrome_strings.scons and theme_dll.scons
which mirror the vcproj files used by Windows. Add the linux specific code to generate .pak files that we use for resources on linux. This doesn't include the necessary changes to build the theme default.dll on windows, but the windows scons build is already really broken so punting for now. Review URL: http://codereview.chromium.org/21371 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_resources.scons34
-rw-r--r--chrome/app/chrome_strings.scons22
-rw-r--r--chrome/app/resources/SConscript3
-rw-r--r--chrome/app/theme/SConscript103
-rw-r--r--chrome/app/theme/theme_dll.scons19
5 files changed, 77 insertions, 104 deletions
diff --git a/chrome/app/chrome_resources.scons b/chrome/app/chrome_resources.scons
new file mode 100644
index 0000000..6d0d32c
--- /dev/null
+++ b/chrome/app/chrome_resources.scons
@@ -0,0 +1,34 @@
+# Copyright (c) 2009 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 os
+
+Import('env')
+
+env = env.Clone()
+
+grd_files = [
+ '$CHROME_SRC_DIR/chrome/browser/browser_resources.grd',
+ '$CHROME_SRC_DIR/chrome/browser/debugger/resources/debugger_resources.grd',
+ '$CHROME_SRC_DIR/chrome/common/common_resources.grd',
+ '$CHROME_SRC_DIR/chrome/renderer/renderer_resources.grd',
+]
+
+for grd_file in grd_files:
+ # The fake target gets replaced with real targets when the GRIT Builder
+ # runs.
+ generated = env.GRIT(
+ '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file),
+ grd_file)
+
+if env.Bit('linux'):
+ chrome_pak = env.Repack('$TARGET_ROOT/chrome.pak',
+ ['$TARGET_ROOT/grit_derived_sources/browser_resources.pak',
+ '$TARGET_ROOT/grit_derived_sources/debugger_resources.pak',
+ '$TARGET_ROOT/grit_derived_sources/common_resources.pak',
+ '$TARGET_ROOT/grit_derived_sources/renderer_resources.pak',
+ ]
+ )
+ i = env.Install('$DESTINATION_ROOT', chrome_pak)
+ env.Requires('$DESTINATION_ROOT/chrome', i)
diff --git a/chrome/app/chrome_strings.scons b/chrome/app/chrome_strings.scons
new file mode 100644
index 0000000..580565f
--- /dev/null
+++ b/chrome/app/chrome_strings.scons
@@ -0,0 +1,22 @@
+# Copyright (c) 2009 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 os
+
+Import('env')
+
+env = env.Clone()
+
+grd_files = [
+ '$CHROME_SRC_DIR/chrome/app/generated_resources.grd',
+ '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd',
+ '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd',
+]
+
+for grd_file in grd_files:
+ # The fake target gets replaced with real targets when the GRIT Builder
+ # runs.
+ generated = env.GRIT(
+ '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file),
+ grd_file)
diff --git a/chrome/app/resources/SConscript b/chrome/app/resources/SConscript
index c3f1391..bddca68 100644
--- a/chrome/app/resources/SConscript
+++ b/chrome/app/resources/SConscript
@@ -153,7 +153,7 @@ locale_GUIDMap = {
gcs_rc = '$TARGET_ROOT/grit_derived_sources/google_chrome_strings_%s.rc'
cs_rc = '$TARGET_ROOT/grit_derived_sources/chromium_strings_%s.rc'
-gr_res = '$TARGET_ROOT/grit_derived_sources/generated_resources_%s.res'
+gr_rc = '$TARGET_ROOT/grit_derived_sources/generated_resources_%s.rc'
ws_res = '$TARGET_ROOT/grit_derived_sources/webkit_strings_%s.res'
dest_vcproj = '$CHROME_SRC_DIR/chrome/app/locales/%s.vcproj'
@@ -162,6 +162,7 @@ locale_dlls = []
for locale in locale_list:
res = env_res.RES('locale_settings_%s.rc' % locale)
+ gr_res = env_res.RES(gr_rc % locale)
# TODO(sgk): find out why this implicit dependency isn't discovered
env.Depends(res, gcs_rc % locale)
diff --git a/chrome/app/theme/SConscript b/chrome/app/theme/SConscript
deleted file mode 100644
index 34ebf75..0000000
--- a/chrome/app/theme/SConscript
+++ /dev/null
@@ -1,103 +0,0 @@
-# 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_res')
-
-env = env.Clone()
-env_res = env_res.Clone()
-
-env_res.Append(
- CPPPATH = [
- '.',
- '$CHROME_SRC_DIR',
- ],
-)
-
-if env.Bit('windows'):
- env_res.Append(
- RCFLAGS = [
- ['/l', '0x409'],
- ],
- )
-
- env.Append(
- LINKFLAGS = [
- '/INCREMENTAL:NO',
- '/DELAYLOAD:"dwmapi.dll"',
- '/DELAYLOAD:"uxtheme.dll"',
-
- '/NOENTRY',
- '/BASE:"0x3CE00000"',
- '/MACHINE:X86',
- '/FIXED:No',
-
- '/safeseh',
- '/dynamicbase',
- '/ignore:4199',
- '/nxcompat',
- ],
- )
-
-# TODO(tc): We need to pass in a preprocessor define for official builds.
-generated = env.GRIT(
- '$TARGET_ROOT/grit_derived_sources/fake_theme_target',
- '$CHROME_SRC_DIR/chrome/app/theme/theme_resources.grd')
-
-if env.Bit('windows'):
- input_files = ChromeFileList([
- '$TARGET_ROOT/grit_derived_sources/theme_resources.rc',
- ])
-
- # TODO(tc): This causes scons to die because the regular expression that
- # scans .rc files for dependencies overflows (see
- # SCons/Tool/Scanner/RC.py). Disable it for now because it's only for the
- # Windows build.
- #res = env.RES('$TARGET_ROOT/grit_derived_sources/theme_resources.rc')
-
- #themes_default = env.ChromeSharedLibrary("default", res)
- #env.Install("$DESTINATION_ROOT/themes", themes_default)
-
- p = env.ChromeMSVSProject('theme_dll.vcproj',
- dest=('$CHROME_SRC_DIR/chrome/'
- + 'app/theme/theme_dll.vcproj'),
- guid='{FD683DD6-D9BF-4B1B-AB6D-A3AC03EDAA4D}',
- keyword='Win32Proj',
- # TODO(sgk): when we can intuit the hierarchy
- # from the built targets.
- #buildtargets=TODO,
- files=input_files,
- tools=[
- 'VCPreBuildEventTool',
- 'VCCustomBuildTool',
- 'VCXMLDataGeneratorTool',
- 'VCWebServiceProxyGeneratorTool',
- 'VCMIDLTool',
- 'VCCLCompilerTool',
- 'VCManagedResourceCompilerTool',
- 'VCResourceCompilerTool',
- 'VCPreLinkEventTool',
- 'VCLinkerTool',
- 'VCALinkTool',
- 'VCManifestTool',
- 'VCXDCMakeTool',
- 'VCBscMakeTool',
- 'VCFxCopTool',
- 'VCAppVerifierTool',
- 'VCWebDeploymentTool',
- 'VCPostBuildEventTool',
- ],
- ConfigurationType='2')
-
-
- p.AddConfig('Debug|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/debug.vsprops',
- './theme_dll.vsprops',
- ])
-
- p.AddConfig('Release|Win32',
- InheritedPropertySheets=[
- '$(SolutionDir)../build/release.vsprops',
- './theme_dll.vsprops',
- ])
diff --git a/chrome/app/theme/theme_dll.scons b/chrome/app/theme/theme_dll.scons
new file mode 100644
index 0000000..d99f9ee
--- /dev/null
+++ b/chrome/app/theme/theme_dll.scons
@@ -0,0 +1,19 @@
+# Copyright (c) 2009 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()
+
+# The fake target gets replaced with real targets when the GRIT Builder runs.
+generated = env.GRIT(
+ '$TARGET_ROOT/grit_derived_sources/fake_theme_resources.grd',
+ '$CHROME_SRC_DIR/chrome/app/theme/theme_resources.grd')
+
+if env.Bit('linux'):
+ theme_default_pak = env.Repack('$TARGET_ROOT/themes/default.pak',
+ ['$TARGET_ROOT/grit_derived_sources/theme_resources.pak']
+ )
+ i = env.Install('$DESTINATION_ROOT/themes/', theme_default_pak)
+ env.Requires('$DESTINATION_ROOT/chrome', i)