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() |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 dll_resources = [ | 51 dll_resources = [ |
52 browser_res, | 52 browser_res, |
53 chrome_dll_res, | 53 chrome_dll_res, |
54 common_res, | 54 common_res, |
55 debugger_res, | 55 debugger_res, |
56 net_res, | 56 net_res, |
57 renderer_res, | 57 renderer_res, |
58 webkit_res, | 58 webkit_res, |
59 ] | 59 ] |
60 | 60 |
| 61 ############################################################################## |
| 62 # TODO(sgk): move to separate .scons file for generated_resources ########### |
| 63 |
| 64 # TODO(sgk): make a pseudo-Builder for these |
| 65 import sys |
| 66 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) |
| 67 |
| 68 env_grd = env.Clone() |
| 69 env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) |
| 70 |
| 71 # NOTE: fake target gets replaced with real targets from reading .grd |
| 72 generated = env_grd.GRIT( |
| 73 '$TARGET_ROOT/grit_derived_sources/fake_generated_target', |
| 74 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd') |
| 75 grit_files.extend(generated) |
| 76 |
| 77 # NOTE: fake target gets replaced with real targets from reading .grd |
| 78 chromium = env_grd.GRIT( |
| 79 '$TARGET_ROOT/grit_derived_sources/fake_chromium_target', |
| 80 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd') |
| 81 grit_files.extend(chromium) |
| 82 |
| 83 # NOTE: fake target gets replaced with real targets from reading .grd |
| 84 google_chrome = env_grd.GRIT( |
| 85 '$TARGET_ROOT/grit_derived_sources/fake_google_chrome_target', |
| 86 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') |
| 87 grit_files.extend(google_chrome) |
| 88 |
| 89 input_files = ChromeFileList([ |
| 90 'app/generated_resources.grd', |
| 91 'app/google_chrome_strings.grd', |
| 92 'app/chromium_strings.grd', |
| 93 Derived(env.File('$TARGET_ROOT/grit_derived_sources/' |
| 94 + 'generated_resources.h')), |
| 95 ]) |
| 96 |
| 97 p = env.ChromeMSVSProject('app/generated_resources.vcproj', |
| 98 dest=('$CHROME_SRC_DIR/chrome/' |
| 99 + 'app/generated_resources.vcproj'), |
| 100 guid='{D9DDAF60-663F-49CC-90DC-3D08CC3D1B28}', |
| 101 keyword='Win32Proj', |
| 102 # TODO(sgk): when we can intuit the hierarchy |
| 103 # from the built targets. |
| 104 #buildtargets=TODO, |
| 105 files=input_files, |
| 106 relative_path_substitutions = [ |
| 107 ('../../../grit_derived_sources', '$(IntDir)'), |
| 108 ], |
| 109 local_directory_prefix='./', |
| 110 ConfigurationType='10') |
| 111 |
| 112 p.AddToolFile('../tools/grit/build/grit_localized_resources.rules') |
| 113 |
| 114 p.AddConfig('Debug|Win32', |
| 115 InheritedPropertySheets=[ |
| 116 '$(SolutionDir)../build/common.vsprops', |
| 117 '$(SolutionDir)../build/debug.vsprops', |
| 118 ]) |
| 119 |
| 120 p.AddConfig('Release|Win32', |
| 121 InheritedPropertySheets=[ |
| 122 '$(SolutionDir)../build/common.vsprops', |
| 123 '$(SolutionDir)../build/release.vsprops', |
| 124 ]) |
| 125 |
| 126 ############################################################################## |
| 127 # TODO(sgk): move to separate .scons file for chrome.dll #################### |
| 128 |
61 env_dll = env.Clone() | 129 env_dll = env.Clone() |
62 | 130 |
63 env_dll.ApplySConscript([ | 131 env_dll.ApplySConscript([ |
64 '$CHROME_SRC_DIR/build/using_v8.scons', | 132 '$CHROME_SRC_DIR/build/using_v8.scons', |
65 '$ICU38_DIR/using_icu38.scons', | 133 '$ICU38_DIR/using_icu38.scons', |
66 ]) | 134 ]) |
67 | 135 |
68 env_dll.Prepend( | 136 env_dll.Prepend( |
69 CPPPATH = [ | 137 CPPPATH = [ |
70 "..", | 138 "..", |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 '/safeseh', | 251 '/safeseh', |
184 '/dynamicbase', | 252 '/dynamicbase', |
185 '/ignore:4199', | 253 '/ignore:4199', |
186 '/ignore:4221', | 254 '/ignore:4221', |
187 '/nxcompat', | 255 '/nxcompat', |
188 | 256 |
189 '/PDB:${TARGETS[1]}', | 257 '/PDB:${TARGETS[1]}', |
190 ], | 258 ], |
191 ) | 259 ) |
192 | 260 |
193 input_files = [] | 261 input_files = ChromeFileList([ |
194 | 262 # TODO(sgk): violate standard indentation so we don't have to |
195 if env_dll.Bit('windows'): | 263 # reindent too much when we remove the explicit MSVSFilter() calls |
196 input_files.extend([ | 264 # in favor of generating the hierarchy to reflect the file system. |
197 'app/chrome_dll_main.cc', | 265 MSVSFilter('resources', [ |
198 '$V8_DIR/snapshot-empty$OBJSUFFIX', | 266 '$WEBKIT_DIR/glue/resources/aliasb.cur', |
199 ]) | 267 'browser/browser_resources.rc', |
200 | 268 '$WEBKIT_DIR/glue/resources/cell.cur', |
201 | 269 'app/check_dependents.bat', |
202 | 270 'app/chrome.dll.deps', |
203 # TODO(sgk): make a pseudo-Builder for these | 271 'app/chrome_dll.rc', |
204 import sys | 272 'app/chrome_dll_resource.h', |
205 sys.path.append(env.Dir('$CHROME_SRC_DIR/tools/grit').abspath) | 273 'app/chrome_dll_version.rc.version', |
206 | 274 '$WEBKIT_DIR/glue/resources/col_resize.cur', |
207 env_grd = env.Clone() | 275 'common/common_resources.rc', |
208 env_grd.Tool('scons', toolpath=[env_grd.Dir('$CHROME_SRC_DIR/tools/grit/grit')]) | 276 '$WEBKIT_DIR/glue/resources/copy.cur', |
209 | 277 'browser/debugger/resources/debugger_resources.rc', |
210 # NOTE: fake target gets replaced with real targets from reading .grd | 278 Derived(env_dll.File('$TARGET_ROOT/grit_derived_sources/net_resources.rc')), |
211 generated = env_grd.GRIT( | 279 'renderer/renderer_resources.rc', |
212 '$TARGET_ROOT/grit_derived_sources/fake_generated_target', | 280 '$WEBKIT_DIR/glue/resources/row_resize.cur', |
213 '$CHROME_SRC_DIR/chrome/app/generated_resources.grd') | 281 '$WEBKIT_DIR/glue/resources/vertical_text.cur', |
214 grit_files.extend(generated) | 282 Derived(env_dll.File('$TARGET_ROOT/' |
215 | 283 + 'grit_derived_sources/webkit_resources.rc')), |
216 # NOTE: fake target gets replaced with real targets from reading .grd | 284 '$WEBKIT_DIR/glue/resources/zoom_in.cur', |
217 chromium = env_grd.GRIT( | 285 '$WEBKIT_DIR/glue/resources/zoom_out.cur', |
218 '$TARGET_ROOT/grit_derived_sources/fake_chromium_target', | 286 ]), |
219 '$CHROME_SRC_DIR/chrome/app/chromium_strings.grd') | 287 'app/chrome_dll_main.cc', |
220 grit_files.extend(chromium) | 288 ]) |
221 | |
222 # NOTE: fake target gets replaced with real targets from reading .grd | |
223 google_chrome = env_grd.GRIT( | |
224 '$TARGET_ROOT/grit_derived_sources/fake_google_chrome_target', | |
225 '$CHROME_SRC_DIR/chrome/app/google_chrome_strings.grd') | |
226 grit_files.extend(google_chrome) | |
227 | |
228 | |
229 | 289 |
230 # TODO(port) | 290 # TODO(port) |
231 if env_dll.Bit('windows'): | 291 if env_dll.Bit('windows'): |
232 dll_targets = env_dll.ChromeSharedLibrary('chrome_dll/chrome', | 292 additional = [ |
233 dll_resources + input_files, | 293 '$V8_DIR/snapshot-empty$OBJSUFFIX' |
| 294 ] |
| 295 dll_targets = env_dll.ChromeSharedLibrary('app/chrome_dll/chrome', |
| 296 #dll_resources + input_files, |
| 297 input_files + additional, |
234 PDB='chrome_dll.pdb') | 298 PDB='chrome_dll.pdb') |
235 install_targets.extend(dll_targets) | 299 install_targets.extend(dll_targets) |
236 | 300 |
237 for g in [ g for g in grit_files if str(g).endswith('.rc') ]: | 301 for g in [ g for g in grit_files if str(g).endswith('.rc') ]: |
238 env_res.RES(g) | 302 env_res.RES(g) |
239 | 303 |
240 chrome_exe_version_rc = env.ChromeVersionRC( | 304 chrome_exe_version_rc = env.ChromeVersionRC( |
241 'chrome_exe_version.rc', | 305 'chrome_exe_version.rc', |
242 'app/chrome_exe_version.rc.version' | 306 'app/chrome_exe_version.rc.version' |
243 ) | 307 ) |
244 | 308 |
245 chrome_dll_version_rc = env.ChromeVersionRC( | 309 chrome_dll_version_rc = env.ChromeVersionRC( |
246 'chrome_dll_version.rc', | 310 'chrome_dll_version.rc', |
247 'app/chrome_dll_version.rc.version', | 311 'app/chrome_dll_version.rc.version', |
248 ) | 312 ) |
249 | 313 |
250 # TODO(sgk): explicit dependencies => scanned implicit dependencies | 314 # TODO(sgk): explicit dependencies => scanned implicit dependencies |
251 Depends(chrome_exe_res, chrome_exe_version_rc) | 315 Depends(chrome_exe_res, chrome_exe_version_rc) |
252 Depends(chrome_dll_res, chrome_dll_version_rc) | 316 Depends(chrome_dll_res, chrome_dll_version_rc) |
253 | 317 |
254 chrome_exe_version_res = env_res.RES(chrome_exe_version_rc) | 318 chrome_exe_version_res = env_res.RES(chrome_exe_version_rc) |
255 chrome_dll_version_res = env_res.RES(chrome_dll_version_rc) | 319 chrome_dll_version_res = env_res.RES(chrome_dll_version_rc) |
256 | 320 |
257 install_targets.extend(chrome_exe_version_rc) | 321 install_targets.extend(chrome_exe_version_rc) |
258 install_targets.extend(chrome_exe_version_res) | 322 install_targets.extend(chrome_exe_version_res) |
259 | 323 |
260 install_targets.extend(chrome_dll_version_rc) | 324 install_targets.extend(chrome_dll_version_rc) |
261 install_targets.extend(chrome_dll_version_res) | 325 install_targets.extend(chrome_dll_version_res) |
262 | 326 |
263 env.ChromeMSVSProject('$CHROME_DIR/app/chrome_dll.vcproj', | 327 p = env.ChromeMSVSProject('app/chrome_dll.vcproj', |
264 dependencies = [ | 328 dest='$CHROME_SRC_DIR/chrome/app/chrome_dll.vcproj', |
265 '$BASE_DIR/build/base.vcproj', | 329 guid='{C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9}', |
266 '$WEBKIT_DIR/build/WebCore/WebCore.vcproj', | 330 keyword='Win32Proj', |
267 '$CHROME_DIR/plugin/plugin.vcproj', | 331 dependencies = [ |
268 '$LIBJPEG_DIR/libjpeg.vcproj', | 332 '$BASE_DIR/build/base.vcproj', |
269 '$BZIP2_DIR/bzip2.vcproj', | 333 '$WEBKIT_DIR/build/WebCore/WebCore.vcproj', |
270 '$NET_DIR/build/net.vcproj', | 334 '$CHROME_DIR/plugin/plugin.vcproj', |
271 ('$WEBKIT_DIR/build/JavaScriptCore/' + | 335 '$LIBJPEG_DIR/libjpeg.vcproj', |
272 'JavaScriptCore_pcre.vcproj'), | 336 '$BZIP2_DIR/bzip2.vcproj', |
273 '$WEBKIT_DIR/build/port/port.vcproj', | 337 '$NET_DIR/build/net.vcproj', |
274 '$CHROME_DIR/browser/debugger/debugger.vcproj', | 338 ('$WEBKIT_DIR/build/JavaScriptCore/' + |
275 '$WEBKIT_DIR/default_plugin/default_plugin.vcproj', | 339 'JavaScriptCore_pcre.vcproj'), |
276 '$CHROME_DIR/browser/browser.vcproj', | 340 '$WEBKIT_DIR/build/port/port.vcproj', |
277 '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj', | 341 '$CHROME_DIR/browser/debugger/debugger.vcproj', |
278 '$SQLITE_DIR/sqlite.vcproj', | 342 '$WEBKIT_DIR/default_plugin/default_plugin.vcproj'
, |
279 '$CHROME_DIR/views/views.vcproj', | 343 '$CHROME_DIR/browser/browser.vcproj', |
280 '$MODP_B64_DIR/modp_b64.vcproj', | 344 '$WEBKIT_DIR/build/V8Bindings/V8Bindings.vcproj', |
281 '$ZLIB_DIR/zlib.vcproj', | 345 '$SQLITE_DIR/sqlite.vcproj', |
282 '$CHROME_DIR/common/common.vcproj', | 346 '$CHROME_DIR/views/views.vcproj', |
283 '$ICU38_DIR/build/icu.vcproj', | 347 '$MODP_B64_DIR/modp_b64.vcproj', |
284 '$CHROME_DIR/renderer/renderer.vcproj', | 348 '$ZLIB_DIR/zlib.vcproj', |
285 '$BASE_DIR/build/base_gfx.vcproj', | 349 '$CHROME_DIR/common/common.vcproj', |
286 '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj', | 350 '$ICU38_DIR/build/icu.vcproj', |
287 '$CHROME_DIR/browser/resources/browser_resources.vcproj', | 351 '$CHROME_DIR/renderer/renderer.vcproj', |
288 '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj', | 352 '$BASE_DIR/build/base_gfx.vcproj', |
289 '$LIBPNG_DIR/libpng.vcproj', | 353 '$WEBKIT_DIR/build/JavaScriptCore/WTF.vcproj', |
290 '$WEBKIT_DIR/build/glue/glue.vcproj', | 354 ('$CHROME_DIR/browser/' |
291 '$SKIA_DIR/skia.vcproj', | 355 + 'resources/browser_resources.vcproj'), |
292 '$CHROME_DIR/third_party/hunspell/hunspell.vcproj', | 356 '$V8_DIR/tools/visual_studio/v8_snapshot.vcproj', |
293 '$GEARS_DIR/gears.vcproj', | 357 '$LIBPNG_DIR/libpng.vcproj', |
294 '$GOOGLEURL_DIR/build/googleurl.vcproj', | 358 '$WEBKIT_DIR/build/glue/glue.vcproj', |
295 '$CHROME_DIR/installer/util/util.vcproj', | 359 '$SKIA_DIR/skia.vcproj', |
296 '$WEBKIT_DIR/activex_shim/activex_shim.vcproj', | 360 '$CHROME_DIR/third_party/hunspell/hunspell.vcproj'
, |
297 '$SDCH_DIR/sdch.vcproj', | 361 '$GEARS_DIR/gears.vcproj', |
298 '$CHROME_DIR/browser/views/browser_views.vcproj', | 362 '$GOOGLEURL_DIR/build/googleurl.vcproj', |
299 '$LIBXSLT_DIR/build/libxslt.vcproj', | 363 '$CHROME_DIR/installer/util/util.vcproj', |
300 ], | 364 '$WEBKIT_DIR/activex_shim/activex_shim.vcproj', |
301 guid='{C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9}') | 365 '$SDCH_DIR/sdch.vcproj', |
| 366 '$CHROME_DIR/browser/views/browser_views.vcproj', |
| 367 '$LIBXSLT_DIR/build/libxslt.vcproj', |
| 368 ], |
| 369 # TODO(sgk): when we can intuit the hierarchy |
| 370 # from the built targets. |
| 371 #buildtargets=TODO, |
| 372 files=input_files, |
| 373 local_directory_prefix='./', |
| 374 relative_path_substitutions = [ |
| 375 ('../../..', '$(OutDir)'), |
| 376 ], |
| 377 ConfigurationType='2') |
| 378 |
| 379 p.AddToolFile('tools/build/win/version.rules') |
| 380 |
| 381 p.AddConfig('Debug|Win32', |
| 382 InheritedPropertySheets=[ |
| 383 '$(SolutionDir)../build/debug.vsprops', |
| 384 './chrome_dll.vsprops', |
| 385 '../installer/util/using_util.vsprops', |
| 386 ], |
| 387 tools=[ |
| 388 'VCPreBuildEventTool', |
| 389 'VCCustomBuildTool', |
| 390 'Version', |
| 391 'VCXMLDataGeneratorTool', |
| 392 'VCWebServiceProxyGeneratorTool', |
| 393 'VCMIDLTool', |
| 394 'VCCLCompilerTool', |
| 395 'VCManagedResourceCompilerTool', |
| 396 'VCResourceCompilerTool', |
| 397 'VCPreLinkEventTool', |
| 398 MSVSTool('VCLinkerTool', |
| 399 OutputFile='$(IntDir)/chrome.dll', |
| 400 ImportLibrary='$(OutDir)/lib/$(ProjectName).lib'), |
| 401 'VCALinkTool', |
| 402 MSVSTool('VCManifestTool', |
| 403 AdditionalManifestFiles=('$(SolutionDir)/app/' |
| 404 + 'chrome.dll.manifest')), |
| 405 'VCXDCMakeTool', |
| 406 'VCBscMakeTool', |
| 407 'VCFxCopTool', |
| 408 'VCAppVerifierTool', |
| 409 'VCWebDeploymentTool', |
| 410 MSVSTool('VCPostBuildEventTool', |
| 411 CommandLine=('call ' |
| 412 + '$(SolutionDir)/tools/build/' |
| 413 + 'win/hardlink_failsafe.bat ' |
| 414 + '"$(TargetPath)" ' |
| 415 + '"$(OutDir)/$(TargetFileName)"')), |
| 416 ]) |
| 417 |
| 418 p.AddConfig('Release|Win32', |
| 419 InheritedPropertySheets=[ |
| 420 '$(SolutionDir)../build/release.vsprops', |
| 421 './chrome_dll.vsprops', |
| 422 '../installer/util/using_util.vsprops', |
| 423 ], |
| 424 tools=[ |
| 425 'VCPreBuildEventTool', |
| 426 'VCCustomBuildTool', |
| 427 'Version', |
| 428 'VCXMLDataGeneratorTool', |
| 429 'VCWebServiceProxyGeneratorTool', |
| 430 'VCMIDLTool', |
| 431 'VCCLCompilerTool', |
| 432 'VCManagedResourceCompilerTool', |
| 433 'VCResourceCompilerTool', |
| 434 'VCPreLinkEventTool', |
| 435 MSVSTool('VCLinkerTool', |
| 436 OutputFile='$(OutDir)/chrome.dll', |
| 437 ImportLibrary='$(OutDir)/lib/$(ProjectName).lib'), |
| 438 'VCALinkTool', |
| 439 MSVSTool('VCManifestTool', |
| 440 AdditionalManifestFiles=('$(SolutionDir)/app/' |
| 441 + 'chrome.dll.manifest')), |
| 442 'VCXDCMakeTool', |
| 443 'VCBscMakeTool', |
| 444 'VCFxCopTool', |
| 445 'VCAppVerifierTool', |
| 446 'VCWebDeploymentTool', |
| 447 MSVSTool('VCPostBuildEventTool', |
| 448 CommandLine=('check_dependents.bat ' |
| 449 + '$(TargetPath) chrome.dll.deps')), |
| 450 ]) |
302 | 451 |
303 | 452 |
| 453 ############################################################################## |
| 454 # TODO(sgk): move to separate .scons file for chrome.exe #################### |
304 | 455 |
305 env_exe = env.Clone() | 456 env_exe = env.Clone() |
306 | 457 |
307 env_exe.Prepend( | 458 env_exe.Prepend( |
308 CPPPATH = [ | 459 CPPPATH = [ |
309 '..', | 460 '..', |
310 '$BREAKPAD_DIR/src', | 461 '$BREAKPAD_DIR/src', |
311 ], | 462 ], |
312 LIBS = [ | 463 LIBS = [ |
313 'base', | 464 'base', |
(...skipping 20 matching lines...) Expand all Loading... |
334 '/safeseh', | 485 '/safeseh', |
335 '/dynamicbase', | 486 '/dynamicbase', |
336 '/ignore:4199', | 487 '/ignore:4199', |
337 '/nxcompat', | 488 '/nxcompat', |
338 | 489 |
339 '/PDB:${TARGETS[1]}', | 490 '/PDB:${TARGETS[1]}', |
340 #'/IMPLIB:${TARGETS[2]}', | 491 #'/IMPLIB:${TARGETS[2]}', |
341 ], | 492 ], |
342 ) | 493 ) |
343 | 494 |
| 495 input_files = ChromeFileList([ |
| 496 # TODO(sgk): violate standard indentation so we don't have to |
| 497 # reindent too much when we remove the explicit MSVSFilter() calls |
| 498 # in favor of generating the hierarchy to reflect the file system. |
| 499 MSVSFilter('resources', [ |
| 500 'app/check_dependents.bat', |
| 501 'app/chrome.exe.deps', |
| 502 'app/chrome_exe.rc', |
| 503 'app/chrome_exe_resource.h', |
| 504 'app/chrome_exe_version.rc.version', |
| 505 ]), |
| 506 'app/breakpad.cc', |
| 507 'app/breakpad.h', |
| 508 'app/chrome_exe_main.cc', |
| 509 'common/chrome_switches$OBJSUFFIX', |
| 510 'app/client_util.cc', |
| 511 'app/client_util.h', |
| 512 'common/env_vars$OBJSUFFIX', |
| 513 'common/env_vars.h', |
| 514 'app/google_update_client.cc', |
| 515 'app/google_update_client.h', |
| 516 'app/result_codes.h', |
| 517 ]) |
| 518 |
344 # TODO(port) | 519 # TODO(port) |
345 if env.Bit('windows'): | 520 if env.Bit('windows'): |
346 chrome_exe = env_exe.ChromeProgram( | 521 chrome_exe = env_exe.ChromeProgram('chrome_exe/chrome', input_files) |
347 'chrome_exe/chrome', | |
348 [ | |
349 chrome_exe_res, | |
350 'app/breakpad.cc', | |
351 'app/chrome_exe_main.cc', | |
352 'app/client_util.cc', | |
353 'app/google_update_client.cc', | |
354 ] | |
355 ) | |
356 | 522 |
357 install_targets.append(chrome_exe[0]) | 523 install_targets.append(chrome_exe[0]) |
358 | 524 |
359 env.Requires('$DESTINATION_ROOT/chrome.exe', | 525 env.Requires('$DESTINATION_ROOT/chrome.exe', |
360 ['$DESTINATION_ROOT/chrome.dll', | 526 ['$DESTINATION_ROOT/chrome.dll', |
361 '$DESTINATION_ROOT/icudt38.dll', | 527 '$DESTINATION_ROOT/icudt38.dll', |
362 '$DESTINATION_ROOT/rlz.dll', | 528 '$DESTINATION_ROOT/rlz.dll', |
363 '$DESTINATION_ROOT/First Run', | 529 '$DESTINATION_ROOT/First Run', |
364 '$DESTINATION_ROOT/themes', | 530 '$DESTINATION_ROOT/themes', |
365 Alias('chrome_locales'), | 531 Alias('chrome_locales'), |
366 Alias('chrome_Dictionaries'), | 532 Alias('chrome_Dictionaries'), |
367 ]) | 533 ]) |
368 | 534 |
369 env.Install('$DESTINATION_ROOT', '$CHROME_DIR/app/FirstRun') | 535 env.Install('$DESTINATION_ROOT', '$CHROME_DIR/app/FirstRun') |
370 | 536 |
371 # For release we want to run dependencies.py, may look something like: | 537 # For release we want to run dependencies.py, may look something like: |
372 #env.AddPostAction('$TARGET_ROOT/chrome.exe', | 538 #env.AddPostAction('$TARGET_ROOT/chrome.exe', |
373 # ('$PYTHON tools/build/win/dependencies.py ' + | 539 # ('$PYTHON tools/build/win/dependencies.py ' + |
374 # '$(TargetPath) chrome.exe.deps')) | 540 # '$(TargetPath) chrome.exe.deps')) |
375 | 541 |
376 env.ChromeMSVSProject('$CHROME_DIR/app/chrome_exe.vcproj', | 542 p = env.ChromeMSVSProject('app/chrome_exe.vcproj', |
377 dependencies = [ | 543 dest='$CHROME_SRC_DIR/chrome/app/chrome_exe.vcproj', |
378 '$BASE_DIR/build/base.vcproj', | 544 guid='{7B219FAA-E360-43C8-B341-804A94EEFFAC}', |
379 '$SANDBOX_DIR/src/sandbox.vcproj', | 545 keyword='Win32Proj', |
380 '$CHROME_DIR/tools/crash_service/crash_service.vcproj', | 546 dependencies = [ |
381 '$BREAKPAD_DIR/breakpad_handler.vcproj', | 547 '$BASE_DIR/build/base.vcproj', |
382 '$CHROME_DIR/app/chrome_dll.vcproj', | 548 '$SANDBOX_DIR/src/sandbox.vcproj', |
383 '$CHROME_DIR/app/locales/en-US.vcproj', | 549 ('$CHROME_DIR/tools/' |
384 '$CHROME_DIR/installer/util/util.vcproj', | 550 + 'crash_service/crash_service.vcproj'), |
385 '$CHROME_DIR/app/theme/theme_dll.vcproj', | 551 '$BREAKPAD_DIR/breakpad_handler.vcproj', |
386 ], | 552 '$CHROME_DIR/app/chrome_dll.vcproj', |
387 guid='{7B219FAA-E360-43C8-B341-804A94EEFFAC}') | 553 '$CHROME_DIR/app/locales/en-US.vcproj', |
| 554 '$CHROME_DIR/installer/util/util.vcproj', |
| 555 '$CHROME_DIR/app/theme/theme_dll.vcproj', |
| 556 ], |
| 557 # TODO(sgk): when we can intuit the hierarchy |
| 558 # from the built targets. |
| 559 #buildtargets=TODO, |
| 560 files=input_files, |
| 561 local_directory_prefix='./', |
| 562 ConfigurationType='1') |
388 | 563 |
| 564 p.AddToolFile('tools/build/win/version.rules') |
| 565 |
| 566 p.AddConfig('Debug|Win32', |
| 567 InheritedPropertySheets=[ |
| 568 './chrome_exe.vsprops', |
| 569 '$(SolutionDir)../build/debug.vsprops', |
| 570 ], |
| 571 tools=[ |
| 572 'VCPreBuildEventTool', |
| 573 'VCCustomBuildTool', |
| 574 'Version', |
| 575 'VCXMLDataGeneratorTool', |
| 576 'VCWebServiceProxyGeneratorTool', |
| 577 'VCMIDLTool', |
| 578 MSVSTool('VCCLCompilerTool', |
| 579 BasicRuntimeChecks='0', |
| 580 BufferSecurityCheck='false'), |
| 581 'VCManagedResourceCompilerTool', |
| 582 'VCResourceCompilerTool', |
| 583 'VCPreLinkEventTool', |
| 584 MSVSTool('VCLinkerTool', |
| 585 ImportLibrary='$(OutDir)/lib/$(ProjectName).lib'), |
| 586 'VCALinkTool', |
| 587 MSVSTool('VCManifestTool', |
| 588 AdditionalManifestFiles=('$(SolutionDir)/app/' |
| 589 + 'chrome.exe.manifest')), |
| 590 'VCXDCMakeTool', |
| 591 'VCBscMakeTool', |
| 592 'VCFxCopTool', |
| 593 'VCAppVerifierTool', |
| 594 'VCWebDeploymentTool', |
| 595 MSVSTool('VCPostBuildEventTool', |
| 596 CommandLine=('copy ' |
| 597 + '$(ProjectDir)/FirstRun ' |
| 598 + '$(OutDir)/"First Run"'), |
| 599 Description='Copy first run complete sentinel file'), |
| 600 ]) |
| 601 |
| 602 p.AddConfig('Release|Win32', |
| 603 InheritedPropertySheets=[ |
| 604 './chrome_exe.vsprops', |
| 605 '$(SolutionDir)../build/release.vsprops', |
| 606 ], |
| 607 tools=[ |
| 608 'VCPreBuildEventTool', |
| 609 'VCCustomBuildTool', |
| 610 'Version', |
| 611 'VCXMLDataGeneratorTool', |
| 612 'VCWebServiceProxyGeneratorTool', |
| 613 'VCMIDLTool', |
| 614 'VCCLCompilerTool', |
| 615 'VCManagedResourceCompilerTool', |
| 616 'VCResourceCompilerTool', |
| 617 'VCPreLinkEventTool', |
| 618 MSVSTool('VCLinkerTool', |
| 619 ImportLibrary='$(OutDir)/lib/$(ProjectName).lib'), |
| 620 'VCALinkTool', |
| 621 MSVSTool('VCManifestTool', |
| 622 AdditionalManifestFiles=('$(SolutionDir)/app/' |
| 623 + 'chrome.exe.manifest')), |
| 624 'VCXDCMakeTool', |
| 625 'VCBscMakeTool', |
| 626 'VCFxCopTool', |
| 627 'VCAppVerifierTool', |
| 628 'VCWebDeploymentTool', |
| 629 MSVSTool('VCPostBuildEventTool', |
| 630 # TODO(sgk): figure out how to get \r\n through |
| 631 # Python's XML generation? |
| 632 #CommandLine=('copy ' |
| 633 # + '$(ProjectDir)/FirstRun ' |
| 634 # + '$(OutDir)/"First Run"\r\n' |
| 635 # + 'check_dependents.bat ' |
| 636 # + '$(TargetPath) ' |
| 637 # + 'chrome.exe.deps\r\n'), |
| 638 CommandLine=('copy ' |
| 639 + '$(ProjectDir)/FirstRun ' |
| 640 + '$(OutDir)/"First Run" ' |
| 641 + '&& ' |
| 642 + 'check_dependents.bat ' |
| 643 + '$(TargetPath) ' |
| 644 + 'chrome.exe.deps'), |
| 645 Description='Copy first run complete sentinel file'), |
| 646 ]) |
| 647 |
| 648 |
| 649 ############################################################################## |
| 650 # TODO(sgk): move to separate .scons file for browser_resources ############# |
389 | 651 |
390 env_flat = env.Clone( | 652 env_flat = env.Clone( |
391 BROWSER_RESOURCES = Dir('browser_resources'), | 653 BROWSER_RESOURCES = Dir('browser_resources'), |
392 HTML_INLINE = env.File( | 654 HTML_INLINE = env.File( |
393 '$CHROME_SRC_DIR/chrome/tools/build/win/html_inline.py'), | 655 '$CHROME_SRC_DIR/chrome/tools/build/win/html_inline.py'), |
394 FLATTEN_HTML_COM = '$PYTHON $HTML_INLINE $SOURCE $TARGET', | 656 FLATTEN_HTML_COM = '$PYTHON $HTML_INLINE $SOURCE $TARGET', |
395 ) | 657 ) |
396 | 658 |
397 def FlatHtmlEmitter(target, source, env): | 659 def FlatHtmlEmitter(target, source, env): |
398 # When we get the target, it will have the "_flat.html" suffix, | 660 # When we get the target, it will have the "_flat.html" suffix, |
399 # but will be next to the sourcefile. Replace it with a | 661 # but will be next to the sourcefile. Replace it with a |
400 # string that puts it in the $BROWSER_RESOURCES directory. | 662 # string that puts it in the $BROWSER_RESOURCES directory. |
401 target = [env.File('$BROWSER_RESOURCES/' + target[0].name)] | 663 target = [env.File('$BROWSER_RESOURCES/' + target[0].name)] |
402 return target, source | 664 return target, source |
403 | 665 |
404 env_flat['BUILDERS']['FlatHtml'] = Builder(action='$FLATTEN_HTML_COM', | 666 env_flat['BUILDERS']['FlatHtml'] = Builder(action='$FLATTEN_HTML_COM', |
405 suffix='_flat.html', | 667 suffix='_flat.html', |
406 source_suffix='.html', | 668 source_suffix='.html', |
407 emitter=FlatHtmlEmitter) | 669 emitter=FlatHtmlEmitter) |
408 | 670 |
409 flats = [ | 671 input_files = ChromeFileList([ |
410 'browser/resources/about_credits.html', | 672 'browser/resources/about_credits.html', |
411 'browser/resources/about_memory.html', | 673 'browser/resources/about_memory.html', |
412 'browser/resources/about_stats.html', | 674 'browser/resources/about_stats.html', |
413 'browser/resources/about_version.html', | 675 'browser/resources/about_version.html', |
414 'browser/resources/history.html', | 676 'browser/resources/history.html', |
415 'browser/resources/incognito_tab.html', | 677 'browser/resources/incognito_tab.html', |
416 'browser/resources/new_tab.html', | 678 'browser/resources/new_tab.html', |
417 'browser/resources/safe_browsing_malware_block.html', | 679 'browser/resources/safe_browsing_malware_block.html', |
418 'browser/resources/safe_browsing_phishing_block.html', | 680 'browser/resources/safe_browsing_phishing_block.html', |
419 'browser/security/resources/ssl_error.html', | 681 'browser/security/resources/ssl_error.html', |
420 'browser/security/resources/ssl_roadblock.html', | 682 'browser/security/resources/ssl_roadblock.html', |
421 ] | 683 'browser/security/resources/ssl_roadblock_background.png', |
| 684 'browser/security/resources/ssl_roadblock_icon.png', |
| 685 ]) |
422 | 686 |
423 # TODO(port) | 687 # TODO(port) |
424 if env_flat.Bit('windows'): | 688 if env_flat.Bit('windows'): |
425 flats_out = [] | 689 flats_out = [] |
426 for i in flats: | 690 for i in input_files: |
427 flats_out.extend(env_flat.FlatHtml(i)) | 691 if str(i).endswith('.html'): |
| 692 flats_out.extend(env_flat.FlatHtml(i)) |
428 | 693 |
429 # TODO(sgk): Remove when we upgrade to SCons 1.1.0, which | 694 # TODO(sgk): Remove when we upgrade to SCons 1.1.0, which |
430 # determines implicit dependencies from .rc files. | 695 # determines implicit dependencies from .rc files. |
431 env_flat.Depends(browser_res, flats_out) | 696 env_flat.Depends(browser_res, flats_out) |
432 | 697 |
| 698 p = env.ChromeMSVSProject('browser/resources/browser_resources.vcproj', |
| 699 dest=('$CHROME_SRC_DIR/chrome/' |
| 700 + 'browser/resources/browser_resources.vcproj'), |
| 701 guid='{B95AB527-F7DB-41E9-AD91-EB51EE0F56BE}', |
| 702 # TODO(sgk): when we can intuit the hierarchy |
| 703 # from the built targets. |
| 704 #buildtargets=TODO, |
| 705 files=input_files, |
| 706 local_directory_prefix='./', |
| 707 tools=[ |
| 708 'VCPreBuildEventTool', |
| 709 'Flattened HTML Resource', |
| 710 'VCCustomBuildTool', |
| 711 'VCMIDLTool', |
| 712 'VCPostBuildEventTool', |
| 713 ], |
| 714 ConfigurationType='10') |
| 715 |
| 716 p.AddToolFile('tools/build/win/flattened_html_file.rules') |
| 717 |
| 718 p.AddConfig('Debug|Win32', |
| 719 InheritedPropertySheets=[ |
| 720 '$(SolutionDir)../build/common.vsprops', |
| 721 '$(SolutionDir)../build/debug.vsprops', |
| 722 ]) |
| 723 |
| 724 p.AddConfig('Release|Win32', |
| 725 InheritedPropertySheets=[ |
| 726 '$(SolutionDir)../build/common.vsprops', |
| 727 '$(SolutionDir)../build/release.vsprops', |
| 728 ]) |
| 729 |
| 730 |
| 731 ############################################################################## |
| 732 # TODO(sgk): move to separate .scons file for browser_resources ############# |
| 733 |
433 sconscript_files = [ | 734 sconscript_files = [ |
434 'views/SConscript', | 735 'views/SConscript', |
435 ] | 736 ] |
436 | 737 |
437 if not env.WantSystemLib('hunspell'): | 738 if not env.WantSystemLib('hunspell'): |
438 sconscript_files.append('third_party/hunspell/SConscript') | 739 sconscript_files.append('third_party/hunspell/SConscript') |
439 if not env.WantSystemLib('sqlite'): | 740 if not env.WantSystemLib('sqlite'): |
440 sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript') | 741 sconscript_files.append('$THIRD_PARTY_DIR/sqlite/SConscript') |
441 | 742 |
442 # TODO(port) | 743 # TODO(port) |
(...skipping 21 matching lines...) Expand all Loading... |
464 ] | 765 ] |
465 | 766 |
466 # TODO(port) | 767 # TODO(port) |
467 if env.Bit('windows'): | 768 if env.Bit('windows'): |
468 env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins) | 769 env.Install('$DESTINATION_ROOT/plugins/gears', gears_plugins) |
469 | 770 |
470 env.Command('$DESTINATION_ROOT/resources/inspector', | 771 env.Command('$DESTINATION_ROOT/resources/inspector', |
471 '$CHROME_SRC_DIR/third_party/WebKit/WebCore/inspector/front-end', | 772 '$CHROME_SRC_DIR/third_party/WebKit/WebCore/inspector/front-end', |
472 Copy('$TARGET', '$SOURCE'), | 773 Copy('$TARGET', '$SOURCE'), |
473 source_scanner=DirScanner) | 774 source_scanner=DirScanner) |
OLD | NEW |