OLD | NEW |
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 grit_files = [] |
15 | 15 |
16 | 16 |
17 env.Prepend( | 17 env.Prepend( |
18 CPPPATH = [ | 18 CPPPATH = [ |
19 'app', | 19 'app', |
20 '$CHROME_DIR/third_party/wtl/include', | 20 '$CHROME_DIR/third_party/wtl/include', |
21 ], | 21 ], |
22 ) | 22 ) |
23 | 23 |
24 | 24 |
25 # TODO(port) | 25 # TODO(port) |
26 if env_res['PLATFORM'] == 'win32': | 26 if env_res.Bit('windows'): |
27 env_res.Append( | 27 env_res.Append( |
28 CPPPATH = [ | 28 CPPPATH = [ |
29 '.', | 29 '.', |
30 '$CHROME_SRC_DIR', | 30 '$CHROME_SRC_DIR', |
31 # For app/chrome_dll.res to #include installer_util_strings.rc. | 31 # For app/chrome_dll.res to #include installer_util_strings.rc. |
32 '$CHROME_DIR/installer/util', | 32 '$CHROME_DIR/installer/util', |
33 ], | 33 ], |
34 RCFLAGS = [ | 34 RCFLAGS = [ |
35 ['/l', '0x409'], | 35 ['/l', '0x409'], |
36 ], | 36 ], |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 'renderer', | 132 'renderer', |
133 'hunspell', | 133 'hunspell', |
134 # TODO(sgk): Windows doesn't use libevent, revisit when Linux gets here | 134 # TODO(sgk): Windows doesn't use libevent, revisit when Linux gets here |
135 #'libevent', | 135 #'libevent', |
136 'sqlite', | 136 'sqlite', |
137 'views', | 137 'views', |
138 'v8_snapshot', | 138 'v8_snapshot', |
139 ], | 139 ], |
140 ) | 140 ) |
141 | 141 |
142 if env_dll['PLATFORM'] == 'win32': | 142 if env_dll.Bit('windows'): |
143 env_dll.Append( | 143 env_dll.Append( |
144 LIBS = [ | 144 LIBS = [ |
145 # TODO(sgk): to be ported to Mac and Linux | 145 # TODO(sgk): to be ported to Mac and Linux |
146 'sdch', | 146 'sdch', |
147 | 147 |
148 #'comctl32.lib', | 148 #'comctl32.lib', |
149 #'dwmapi.lib', | 149 #'dwmapi.lib', |
150 #'rpcrt4.lib', | 150 #'rpcrt4.lib', |
151 #'shlwapi.lib', | 151 #'shlwapi.lib', |
152 #'winmm.lib', | 152 #'winmm.lib', |
(...skipping 30 matching lines...) Expand all Loading... |
183 '/ignore:4199', | 183 '/ignore:4199', |
184 '/ignore:4221', | 184 '/ignore:4221', |
185 '/nxcompat', | 185 '/nxcompat', |
186 | 186 |
187 '/PDB:${TARGETS[1]}', | 187 '/PDB:${TARGETS[1]}', |
188 ], | 188 ], |
189 ) | 189 ) |
190 | 190 |
191 input_files = [] | 191 input_files = [] |
192 | 192 |
193 if env_dll['PLATFORM'] == 'win32': | 193 if env_dll.Bit('windows'): |
194 input_files.extend([ | 194 input_files.extend([ |
195 'app/chrome_dll_main.cc', | 195 'app/chrome_dll_main.cc', |
196 '$V8_DIR/snapshot-empty$OBJSUFFIX', | 196 '$V8_DIR/snapshot-empty$OBJSUFFIX', |
197 ]) | 197 ]) |
198 | 198 |
199 | 199 |
200 | 200 |
201 # TODO(sgk): make a pseudo-Builder for these | 201 # TODO(sgk): make a pseudo-Builder for these |
202 import sys | 202 import sys |
203 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) | 203 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) |
(...skipping 15 matching lines...) Expand all Loading... |
219 | 219 |
220 # NOTE: fake target gets replaced with real targets from reading .grd | 220 # NOTE: fake target gets replaced with real targets from reading .grd |
221 google_chrome = env_grd.GRIT( | 221 google_chrome = env_grd.GRIT( |
222 '$TARGET_ROOT/grit_derived_sources/fake_google_chrome_target', | 222 '$TARGET_ROOT/grit_derived_sources/fake_google_chrome_target', |
223 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') | 223 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') |
224 grit_files.extend(google_chrome) | 224 grit_files.extend(google_chrome) |
225 | 225 |
226 | 226 |
227 | 227 |
228 # TODO(port) | 228 # TODO(port) |
229 if env_dll['PLATFORM'] == 'win32': | 229 if env_dll.Bit('windows'): |
230 dll_targets = env_dll.ChromeSharedLibrary('chrome_dll/chrome', | 230 dll_targets = env_dll.ChromeSharedLibrary('chrome_dll/chrome', |
231 dll_resources + input_files, | 231 dll_resources + input_files, |
232 PDB='chrome_dll.pdb') | 232 PDB='chrome_dll.pdb') |
233 install_targets.extend(dll_targets) | 233 install_targets.extend(dll_targets) |
234 | 234 |
235 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') ]: |
236 env_res.RES(g) | 236 env_res.RES(g) |
237 | 237 |
238 chrome_exe_version_rc = env.ChromeVersionRC( | 238 chrome_exe_version_rc = env.ChromeVersionRC( |
239 'chrome_exe_version.rc', | 239 'chrome_exe_version.rc', |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 '/dynamicbase', | 293 '/dynamicbase', |
294 '/ignore:4199', | 294 '/ignore:4199', |
295 '/nxcompat', | 295 '/nxcompat', |
296 | 296 |
297 '/PDB:${TARGETS[1]}', | 297 '/PDB:${TARGETS[1]}', |
298 #'/IMPLIB:${TARGETS[2]}', | 298 #'/IMPLIB:${TARGETS[2]}', |
299 ], | 299 ], |
300 ) | 300 ) |
301 | 301 |
302 # TODO(port) | 302 # TODO(port) |
303 if env['PLATFORM'] == 'win32': | 303 if env.Bit('windows'): |
304 chrome_exe = env_exe.ChromeProgram( | 304 chrome_exe = env_exe.ChromeProgram( |
305 'chrome_exe/chrome', | 305 'chrome_exe/chrome', |
306 [ | 306 [ |
307 chrome_exe_res, | 307 chrome_exe_res, |
308 'app/breakpad.cc', | 308 'app/breakpad.cc', |
309 'app/chrome_exe_main.cc', | 309 'app/chrome_exe_main.cc', |
310 'app/client_util.cc', | 310 'app/client_util.cc', |
311 'app/google_update_client.cc', | 311 'app/google_update_client.cc', |
312 ] | 312 ] |
313 ) | 313 ) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 'browser/resources/history.html', | 359 'browser/resources/history.html', |
360 'browser/resources/incognito_tab.html', | 360 'browser/resources/incognito_tab.html', |
361 'browser/resources/new_tab.html', | 361 'browser/resources/new_tab.html', |
362 'browser/resources/safe_browsing_malware_block.html', | 362 'browser/resources/safe_browsing_malware_block.html', |
363 'browser/resources/safe_browsing_phishing_block.html', | 363 'browser/resources/safe_browsing_phishing_block.html', |
364 'browser/security/resources/ssl_error.html', | 364 'browser/security/resources/ssl_error.html', |
365 'browser/security/resources/ssl_roadblock.html', | 365 'browser/security/resources/ssl_roadblock.html', |
366 ] | 366 ] |
367 | 367 |
368 # TODO(port) | 368 # TODO(port) |
369 if env_flat['PLATFORM'] == 'win32': | 369 if env_flat.Bit('windows'): |
370 flats_out = [] | 370 flats_out = [] |
371 for i in flats: | 371 for i in flats: |
372 flats_out.extend(env_flat.FlatHtml(i)) | 372 flats_out.extend(env_flat.FlatHtml(i)) |
373 | 373 |
374 # TODO(sgk): Remove when we upgrade to SCons 1.1.0, which | 374 # TODO(sgk): Remove when we upgrade to SCons 1.1.0, which |
375 # determines implicit dependencies from .rc files. | 375 # determines implicit dependencies from .rc files. |
376 env_flat.Depends(browser_res, flats_out) | 376 env_flat.Depends(browser_res, flats_out) |
377 | 377 |
378 sconscript_files = [] | 378 sconscript_files = [] |
379 | 379 |
380 if not env.WantSystemLib('hunspell'): | 380 if not env.WantSystemLib('hunspell'): |
381 sconscript_files.append('third_party/hunspell/SConscript') | 381 sconscript_files.append('third_party/hunspell/SConscript') |
382 if not env.WantSystemLib('sqlite'): | 382 if not env.WantSystemLib('sqlite'): |
383 sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript') | 383 sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript') |
384 | 384 |
385 # TODO(port) | 385 # TODO(port) |
386 if env['PLATFORM'] == 'win32': | 386 if env.Bit('windows'): |
387 sconscript_files.extend([ | 387 sconscript_files.extend([ |
388 'app/resources/SConscript', | 388 'app/resources/SConscript', |
389 'app/theme/SConscript', | 389 'app/theme/SConscript', |
390 'browser/views/SConscript', | 390 'browser/views/SConscript', |
391 'views/SConscript', | 391 'views/SConscript', |
392 ]) | 392 ]) |
393 | 393 |
394 env.SConscript(sconscript_files, exports=['env', 'env_res', 'env_test']) | 394 env.SConscript(sconscript_files, exports=['env', 'env_res', 'env_test']) |
395 | 395 |
396 # TODO(port) | 396 # TODO(port) |
397 if env['PLATFORM'] == 'win32': | 397 if env.Bit('windows'): |
398 env.InstallAs('$LIBS_DIR/${LIBPREFIX}jscre${LIBSUFFIX}', | 398 env.InstallAs('$LIBS_DIR/${LIBPREFIX}jscre${LIBSUFFIX}', |
399 '$WEBKIT_DIR/JavaScriptCore_pcre.lib') | 399 '$WEBKIT_DIR/JavaScriptCore_pcre.lib') |
400 | 400 |
401 | 401 |
402 env.Install('$DESTINATION_ROOT', install_targets) | 402 env.Install('$DESTINATION_ROOT', install_targets) |
403 | 403 |
404 | 404 |
405 gears_plugins = [ | 405 gears_plugins = [ |
406 '$GEARS_DIR/binaries/gears.dll', | 406 '$GEARS_DIR/binaries/gears.dll', |
407 '$GEARS_DIR/binaries/gears.pdb', | 407 '$GEARS_DIR/binaries/gears.pdb', |
408 ] | 408 ] |
409 | 409 |
410 # TODO(port) | 410 # TODO(port) |
411 if env['PLATFORM'] == 'win32': | 411 if env.Bit('windows'): |
412 env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins) | 412 env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins) |
413 | 413 |
414 env.Command('$DESTINATION_ROOT/resources/inspector', | 414 env.Command('$DESTINATION_ROOT/resources/inspector', |
415 '$CHROME_SRC_DIR/third_party/WebKit/WebCore/inspector/front-end', | 415 '$CHROME_SRC_DIR/third_party/WebKit/WebCore/inspector/front-end', |
416 Copy('$TARGET', '$SOURCE'), | 416 Copy('$TARGET', '$SOURCE'), |
417 source_scanner=DirScanner) | 417 source_scanner=DirScanner) |
OLD | NEW |