Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(756)

Side by Side Diff: chrome/SConscript

Issue 7247: Run GRIT on all platforms.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/grit/grit/scons.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 Import(['env']) 7 Import(['env'])
8 8
9 env_res = env.Clone() 9 env_res = env.Clone()
10 env_test = env.Clone() 10 env_test = env.Clone()
11 env = env.Clone() 11 env = env.Clone()
12 12
13 install_targets = [] 13 install_targets = []
14 grit_files = []
14 15
15 16
16 env.Prepend( 17 env.Prepend(
17 CPPPATH = [ 18 CPPPATH = [
18 'app', 19 'app',
19 '$CHROME_DIR/third_party/wtl/include', 20 '$CHROME_DIR/third_party/wtl/include',
20 ], 21 ],
21 ) 22 )
22 23
23 24
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 202
202 if env_dll['PLATFORM'] == 'win32': 203 if env_dll['PLATFORM'] == 'win32':
203 targets = [ 204 targets = [
204 'chrome.dll', 205 'chrome.dll',
205 'chrome_dll.pdb', 206 'chrome_dll.pdb',
206 'chrome_dll.lib', 207 'chrome_dll.lib',
207 ] 208 ]
208 else: 209 else:
209 targets = ['chrome'] 210 targets = ['chrome']
210 211
212
213
214 # TODO(sgk): make a pseudo-Builder for these
215 import sys
216 sys.path.append(Dir('#/../tools/grit').abspath)
217
218 env_grd = env.Clone()
219 env_grd.Tool('scons', toolpath=['#/../tools/grit/grit'])
220
221 # NOTE: fake target gets replaced with real targets from reading .grd
222 generated = env_grd.GRIT('app/resources/fake_generated_target',
223 '#/../chrome/app/generated_resources.grd')
224 grit_files.extend(generated)
225
226 # NOTE: fake target gets replaced with real targets from reading .grd
227 chromium = env_grd.GRIT('app/resources/fake_chromium_target',
228 '#/../chrome/app/chromium_strings.grd')
229 grit_files.extend(chromium)
230
231 # NOTE: fake target gets replaced with real targets from reading .grd
232 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target',
233 '#/../chrome/app/google_chrome_strings.grd')
234 grit_files.extend(google_chrome)
235
236
237
211 # TODO(port) 238 # TODO(port)
212 if env_dll['PLATFORM'] == 'win32': 239 if env_dll['PLATFORM'] == 'win32':
213 dll_targets = env_dll.ChromeSharedLibrary(targets, 240 dll_targets = env_dll.ChromeSharedLibrary(targets,
214 dll_resources + input_files + libs) 241 dll_resources + input_files + libs)
215 install_targets.extend(dll_targets) 242 install_targets.extend(dll_targets)
216 243
217 # TODO(sgk): make a pseudo-Builder for these 244 for g in [ g for g in grit_files if str(g).endswith('.rc') ]:
218 import os 245 env_res.RES(g)
219 import sys
220 sys.path.append(Dir('#/../tools/grit').abspath)
221
222 env_grd = env.Clone()
223 env_grd.Tool('scons', toolpath=['#/../tools/grit/grit'])
224
225 # NOTE: fake target gets replaced with real targets from reading .grd
226 generated = env_grd.GRIT('app/resources/fake_generated_target',
227 '#/../chrome/app/generated_resources.grd')
228 for g in [ g for g in generated if str(g).endswith('.rc') ]:
229 env_res.RES(g)
230
231 # NOTE: fake target gets replaced with real targets from reading .grd
232 chromium = env_grd.GRIT('app/resources/fake_chromium_target',
233 '#/../chrome/app/chromium_strings.grd')
234 for g in [ g for g in chromium if str(g).endswith('.rc') ]:
235 env_res.RES(g)
236
237 # NOTE: fake target gets replaced with real targets from reading .grd
238 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target',
239 '#/../chrome/app/google_chrome_strings.grd')
240 for g in [ g for g in google_chrome if str(g).endswith('.rc') ]:
241 env_res.RES(g)
242
243
244 246
245 def chrome_version_emitter(target, source, env): 247 def chrome_version_emitter(target, source, env):
246 source.append('$CHROME_SRC_DIR/VERSION') 248 source.append('$CHROME_SRC_DIR/VERSION')
247 # TODO(sgk): parameterize for chromium-vs.-google_chrome 249 # TODO(sgk): parameterize for chromium-vs.-google_chrome
248 source.append('$CHROME_SRC_DIR/app/theme/google_chrome/BRANDING') 250 source.append('$CHROME_SRC_DIR/app/theme/google_chrome/BRANDING')
249 return target, source 251 return target, source
250 252
251 b = Builder(action = '$CHROME_VERSION_RC_COM', 253 b = Builder(action = '$CHROME_VERSION_RC_COM',
252 emitter = chrome_version_emitter) 254 emitter = chrome_version_emitter)
253 255
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 env.Alias('chrome', i) 470 env.Alias('chrome', i)
469 471
470 472
471 i = env.Command('$TARGET_ROOT/resources/inspector', 473 i = env.Command('$TARGET_ROOT/resources/inspector',
472 '#/../webkit/port/page/inspector', 474 '#/../webkit/port/page/inspector',
473 Copy('$TARGET', '$SOURCE'), 475 Copy('$TARGET', '$SOURCE'),
474 source_scanner=DirScanner) 476 source_scanner=DirScanner)
475 env.Alias('chrome', i) 477 env.Alias('chrome', i)
476 478
477 env.Alias('chrome', env.Alias('webkit')) 479 env.Alias('chrome', env.Alias('webkit'))
OLDNEW
« no previous file with comments | « no previous file | tools/grit/grit/scons.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698