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

Side by Side Diff: chrome/SConscript

Issue 8207: Fix SCons modules build on Windows:... (Closed) Base URL: svn://chrome-svn/chrome/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 | « build/SConscript.main ('k') | chrome/SConscript.ui_tests » ('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()
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 'renderer/renderer.lib', 193 'renderer/renderer.lib',
194 'third_party/hunspell/hunspell.lib', 194 'third_party/hunspell/hunspell.lib',
195 # TODO(sgk): libevent isn't used on Windows, revisit when Linux gets here 195 # TODO(sgk): libevent isn't used on Windows, revisit when Linux gets here
196 #'third_party/libevent/libevent.lib', 196 #'third_party/libevent/libevent.lib',
197 'third_party/sqlite/sqlite.lib', 197 'third_party/sqlite/sqlite.lib',
198 'views/views.lib', 198 'views/views.lib',
199 '$V8_DIR/v8.lib', 199 '$V8_DIR/v8.lib',
200 ] 200 ]
201 201
202 202
203 if env_dll['PLATFORM'] == 'win32':
204 targets = [
205 'chrome.dll',
206 'chrome_dll.pdb',
207 'chrome_dll.lib',
208 ]
209 else:
210 targets = ['chrome']
211
212
213 203
214 # TODO(sgk): make a pseudo-Builder for these 204 # TODO(sgk): make a pseudo-Builder for these
215 import sys 205 import sys
216 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) 206 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath)
217 207
218 env_grd = env.Clone() 208 env_grd = env.Clone()
219 env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) 209 env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')])
220 210
221 # NOTE: fake target gets replaced with real targets from reading .grd 211 # NOTE: fake target gets replaced with real targets from reading .grd
222 generated = env_grd.GRIT('app/resources/fake_generated_target', 212 generated = env_grd.GRIT('app/resources/fake_generated_target',
223 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd') 213 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd')
224 grit_files.extend(generated) 214 grit_files.extend(generated)
225 215
226 # NOTE: fake target gets replaced with real targets from reading .grd 216 # NOTE: fake target gets replaced with real targets from reading .grd
227 chromium = env_grd.GRIT('app/resources/fake_chromium_target', 217 chromium = env_grd.GRIT('app/resources/fake_chromium_target',
228 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd') 218 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd')
229 grit_files.extend(chromium) 219 grit_files.extend(chromium)
230 220
231 # NOTE: fake target gets replaced with real targets from reading .grd 221 # NOTE: fake target gets replaced with real targets from reading .grd
232 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target', 222 google_chrome = env_grd.GRIT('app/resources/fake_google_chrome_target',
233 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') 223 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd')
234 grit_files.extend(google_chrome) 224 grit_files.extend(google_chrome)
235 225
236 226
237 227
238 # TODO(port) 228 # TODO(port)
239 if env_dll['PLATFORM'] == 'win32': 229 if env_dll['PLATFORM'] == 'win32':
240 dll_targets = env_dll.ChromeSharedLibrary(targets, 230 dll_targets = env_dll.ChromeSharedLibrary('chrome.dll',
241 dll_resources + input_files + libs) 231 dll_resources + input_files + libs,
232 PDB='chrome_dll.pdb')
242 install_targets.extend(dll_targets) 233 install_targets.extend(dll_targets)
243 234
244 for g in [ g for g in grit_files if str(g).endswith('.rc') ]: 235 for g in [ g for g in grit_files if str(g).endswith('.rc') ]:
245 env_res.RES(g) 236 env_res.RES(g)
246 237
247 def chrome_version_emitter(target, source, env): 238 def chrome_version_emitter(target, source, env):
248 source.append('$CHROME_SRC_DIR/chrome/VERSION') 239 source.append(env.File('$CHROME_SRC_DIR/chrome/VERSION'))
249 # TODO(sgk): parameterize for chromium-vs.-google_chrome 240 # TODO(sgk): parameterize for chromium-vs.-google_chrome
250 source.append('$CHROME_SRC_DIR/chrome/app/theme/google_chrome/BRANDING') 241 source.append(env.File('$CHROME_SRC_DIR/chrome/app/theme/google_chrome/BRA NDING'))
251 return target, source 242 return target, source
252 243
253 b = Builder(action = '$CHROME_VERSION_RC_COM', 244 b = Builder(action = '$CHROME_VERSION_RC_COM',
254 emitter = chrome_version_emitter) 245 emitter = chrome_version_emitter)
255 246
256 env['BUILDERS']['ChromeVersionRC'] = b 247 env['BUILDERS']['ChromeVersionRC'] = b
257 248
258 env.Replace( 249 env.Replace(
259 CHROME_VERSION_RC_COM = 250 CHROME_VERSION_RC_COM =
260 '$VERSION_BAT $SOURCE $CHROME_SRC_DIR/chrome $PWD $TARGET', 251 '$VERSION_BAT $SOURCE $CHROME_SRC_DIR/chrome $PWD $TARGET',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 '/safeseh', 307 '/safeseh',
317 '/dynamicbase', 308 '/dynamicbase',
318 '/ignore:4199', 309 '/ignore:4199',
319 '/nxcompat', 310 '/nxcompat',
320 311
321 '/PDB:${TARGETS[1]}', 312 '/PDB:${TARGETS[1]}',
322 '/IMPLIB:${TARGETS[2]}', 313 '/IMPLIB:${TARGETS[2]}',
323 ], 314 ],
324 ) 315 )
325 316
326 if env['PLATFORM'] == 'win32':
327 targets = [
328 'chrome.exe',
329 'chrome_exe.pdb',
330 'chrome_exe_implib.lib',
331 ]
332 else:
333 targets = ['chrome']
334
335 # TODO(port) 317 # TODO(port)
336 if env['PLATFORM'] == 'win32': 318 if env['PLATFORM'] == 'win32':
337 chrome_exe = env_exe.ChromeProgram( 319 chrome_exe = env_exe.ChromeProgram(
338 targets, 320 'chrome',
339 [ 321 [
340 env_res.RES('app/chrome_exe.rc'), 322 env_res.RES('app/chrome_exe.rc'),
341 'app/breakpad.cc', 323 'app/breakpad.cc',
342 'app/chrome_exe_main.cc', 324 'app/chrome_exe_main.cc',
343 'app/client_util.cc', 325 'app/client_util.cc',
344 'app/google_update_client.cc', 326 'app/google_update_client.cc',
345 327
346 'common/common.lib', 328 'common/common.lib',
347 '$CHROME_DIR/chrome_dll.lib', 329 '$CHROME_DIR/chrome_dll.lib',
348 ] 330 ]
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 env.Alias('chrome', i) 463 env.Alias('chrome', i)
482 464
483 465
484 i = env.Command('$TARGET_ROOT/resources/inspector', 466 i = env.Command('$TARGET_ROOT/resources/inspector',
485 '$CHROME_SRC_DIR/webkit/port/page/inspector', 467 '$CHROME_SRC_DIR/webkit/port/page/inspector',
486 Copy('$TARGET', '$SOURCE'), 468 Copy('$TARGET', '$SOURCE'),
487 source_scanner=DirScanner) 469 source_scanner=DirScanner)
488 env.Alias('chrome', i) 470 env.Alias('chrome', i)
489 471
490 env.Alias('chrome', env.Alias('webkit')) 472 env.Alias('chrome', env.Alias('webkit'))
OLDNEW
« no previous file with comments | « build/SConscript.main ('k') | chrome/SConscript.ui_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698