Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//third_party/WebKit/Source/core/core.gni") | 6 import("//third_party/WebKit/Source/core/core.gni") |
| 7 | 7 |
| 8 gypi_values = exec_script("//build/gypi_to_gn.py", | 8 gypi_values = exec_script("//build/gypi_to_gn.py", |
| 9 [ rebase_path("devtools.gypi") ], | 9 [ rebase_path("devtools.gypi") ], |
| 10 "scope", | 10 "scope", |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 | 59 |
| 60 all_devtools_files = | 60 all_devtools_files = |
| 61 gypi_values.devtools_cm_css_files + gypi_values.devtools_cm_js_files + | 61 gypi_values.devtools_cm_css_files + gypi_values.devtools_cm_js_files + |
| 62 devtools_core_files + gypi_values.devtools_module_json_files + | 62 devtools_core_files + gypi_values.devtools_module_json_files + |
| 63 devtools_modules_js_files + gypi_values.devtools_acorn_files | 63 devtools_modules_js_files + gypi_values.devtools_acorn_files |
| 64 | 64 |
| 65 # FIXME: Fix the generate_devtools_grd.py script to accept trailing slashes. | 65 # FIXME: Fix the generate_devtools_grd.py script to accept trailing slashes. |
| 66 resources_out_dir_no_slash = "$root_out_dir/resources/inspector" | 66 resources_out_dir_no_slash = "$root_out_dir/resources/inspector" |
| 67 resources_out_dir = resources_out_dir_no_slash + "/" | 67 resources_out_dir = resources_out_dir_no_slash + "/" |
| 68 | 68 |
| 69 resources_test_release_dir = "$root_out_dir/resources/inspector_release/" | |
| 70 | |
| 69 generated_scripts = [ | 71 generated_scripts = [ |
| 70 resources_out_dir + "InspectorBackendCommands.js", | 72 resources_out_dir + "InspectorBackendCommands.js", |
| 71 resources_out_dir + "SupportedCSSProperties.js", | 73 resources_out_dir + "SupportedCSSProperties.js", |
| 72 ] | 74 ] |
| 73 | 75 |
| 76 build_application_outputs = [ | |
| 77 "inspector.js", | |
| 78 "toolbox.js", | |
| 79 "formatter_worker.js", | |
| 80 "heap_snapshot_worker.js", | |
| 81 "temp_storage_shared_worker.js", | |
| 82 "accessibility/accessibility_module.js", | |
| 83 "animation/animation_module.js", | |
| 84 "audits/audits_module.js", | |
| 85 "cm_modes/cm_modes_module.js", | |
| 86 "components_lazy/components_lazy_module.js", | |
| 87 "console/console_module.js", | |
| 88 "devices/devices_module.js", | |
| 89 "diff/diff_module.js", | |
| 90 "elements/elements_module.js", | |
| 91 "emulated_devices/emulated_devices_module.js", | |
| 92 "es_tree/es_tree_module.js", | |
| 93 "gonzales/gonzales_module.js", | |
| 94 "layers/layers_module.js", | |
| 95 "network/network_module.js", | |
| 96 "profiler/profiler_module.js", | |
| 97 "resources/resources_module.js", | |
| 98 "sass/sass_module.js", | |
| 99 "screencast/screencast_module.js", | |
| 100 "security/security_module.js", | |
| 101 "settings/settings_module.js", | |
| 102 "snippets/snippets_module.js", | |
| 103 "source_frame/source_frame_module.js", | |
| 104 "sources/sources_module.js", | |
| 105 "timeline_model/timeline_model_module.js", | |
| 106 "timeline/timeline_module.js", | |
| 107 "ui_lazy/ui_lazy_module.js", | |
| 108 ] | |
| 109 | |
| 74 #------------------------------------------------------------------------------- | 110 #------------------------------------------------------------------------------- |
| 75 | 111 |
| 76 visibility = [ "//third_party/WebKit/*" ] | 112 visibility = [ "//third_party/WebKit/*" ] |
| 77 | 113 |
| 78 group("devtools_frontend_resources") { | 114 group("devtools_frontend_resources") { |
| 79 public_deps = [ | 115 public_deps = [ |
| 80 ":build_applications", | 116 ":build_applications", |
| 117 ":build_release_for_test", | |
| 81 ":copy_embedder_scripts", | 118 ":copy_embedder_scripts", |
| 82 ":copy_emulated_devices_images", | 119 ":copy_emulated_devices_images", |
| 83 ":copy_inspector_images", | 120 ":copy_inspector_images", |
| 84 ":devtools_extension_api", | 121 ":devtools_extension_api", |
| 85 ":frontend_protocol_sources", | 122 ":frontend_protocol_sources", |
| 86 ":supported_css_properties", | 123 ":supported_css_properties", |
| 87 ] | 124 ] |
| 88 } | 125 } |
| 89 | 126 |
| 90 copy("copy_embedder_scripts") { | 127 copy("copy_embedder_scripts") { |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 deps = [ | 299 deps = [ |
| 263 ":frontend_protocol_sources", | 300 ":frontend_protocol_sources", |
| 264 ":supported_css_properties", | 301 ":supported_css_properties", |
| 265 ] | 302 ] |
| 266 | 303 |
| 267 if (debug_devtools) { | 304 if (debug_devtools) { |
| 268 deps += [ ":copy_debug_non_modules" ] | 305 deps += [ ":copy_debug_non_modules" ] |
| 269 | 306 |
| 270 debug_mode = "1" | 307 debug_mode = "1" |
| 271 } else { | 308 } else { |
| 272 outputs += [ | 309 foreach(output, build_application_outputs) { |
| 273 resources_out_dir + "inspector.js", | 310 outputs += [ resources_out_dir + output ] |
| 274 resources_out_dir + "toolbox.js", | 311 } |
| 275 resources_out_dir + "formatter_worker.js", | |
| 276 resources_out_dir + "heap_snapshot_worker.js", | |
| 277 resources_out_dir + "temp_storage_shared_worker.js", | |
| 278 resources_out_dir + "accessibility/accessibility_module.js", | |
| 279 resources_out_dir + "animation/animation_module.js", | |
| 280 resources_out_dir + "audits/audits_module.js", | |
| 281 resources_out_dir + "cm_modes/cm_modes_module.js", | |
| 282 resources_out_dir + "components_lazy/components_lazy_module.js", | |
| 283 resources_out_dir + "console/console_module.js", | |
| 284 resources_out_dir + "devices/devices_module.js", | |
| 285 resources_out_dir + "diff/diff_module.js", | |
| 286 resources_out_dir + "elements/elements_module.js", | |
| 287 resources_out_dir + "emulated_devices/emulated_devices_module.js", | |
| 288 resources_out_dir + "es_tree/es_tree_module.js", | |
| 289 resources_out_dir + "gonzales/gonzales_module.js", | |
| 290 resources_out_dir + "layers/layers_module.js", | |
| 291 resources_out_dir + "network/network_module.js", | |
| 292 resources_out_dir + "profiler/profiler_module.js", | |
| 293 resources_out_dir + "resources/resources_module.js", | |
| 294 resources_out_dir + "sass/sass_module.js", | |
| 295 resources_out_dir + "screencast/screencast_module.js", | |
| 296 resources_out_dir + "security/security_module.js", | |
| 297 resources_out_dir + "settings/settings_module.js", | |
| 298 resources_out_dir + "snippets/snippets_module.js", | |
| 299 resources_out_dir + "source_frame/source_frame_module.js", | |
| 300 resources_out_dir + "sources/sources_module.js", | |
| 301 resources_out_dir + "timeline_model/timeline_model_module.js", | |
| 302 resources_out_dir + "timeline/timeline_module.js", | |
| 303 resources_out_dir + "ui_lazy/ui_lazy_module.js", | |
| 304 ] | |
| 305 | 312 |
| 306 debug_mode = "0" | 313 debug_mode = "0" |
| 307 } | 314 } |
| 308 | 315 |
| 309 args = [ | 316 args = [ |
| 310 "inspector", | 317 "inspector", |
| 311 "toolbox", | 318 "toolbox", |
| 312 "formatter_worker", | 319 "formatter_worker", |
| 313 "heap_snapshot_worker", | 320 "heap_snapshot_worker", |
| 314 "temp_storage_shared_worker", | 321 "temp_storage_shared_worker", |
| 315 "--input_path", | 322 "--input_path", |
| 316 rebase_path("front_end", root_build_dir), | 323 rebase_path("front_end", root_build_dir), |
| 317 "--output_path", | 324 "--output_path", |
| 318 rebase_path(resources_out_dir, root_build_dir), | 325 rebase_path(resources_out_dir, root_build_dir), |
| 319 "--debug", | 326 "--debug", |
| 320 debug_mode, | 327 debug_mode, |
| 321 ] | 328 ] |
| 322 } | 329 } |
| 323 | 330 |
| 331 action("build_release_for_test") { | |
|
pfeldman
2016/08/24 00:36:04
Why don't we reuse regular release build here?
chenwilliam
2016/08/24 22:53:40
Done.
| |
| 332 script = "scripts/build_applications.py" | |
| 333 helper_scripts = [ | |
| 334 "scripts/modular_build.py", | |
| 335 "scripts/concatenate_application_code.py", | |
| 336 "scripts/rjsmin.py", | |
| 337 ] | |
| 338 | |
| 339 generated_scripts_release = [ | |
| 340 resources_test_release_dir + "InspectorBackendCommands.js", | |
| 341 resources_test_release_dir + "SupportedCSSProperties.js", | |
| 342 ] | |
| 343 | |
| 344 inputs = helper_scripts + all_devtools_files + generated_scripts_release + [ | |
| 345 "front_end/inspector.html", | |
| 346 "front_end/toolbox.html", | |
| 347 ] | |
| 348 | |
| 349 outputs = [ | |
| 350 resources_test_release_dir + "inspector.html", | |
| 351 resources_test_release_dir + "toolbox.html", | |
| 352 ] | |
| 353 | |
| 354 deps = [ | |
| 355 ":frontend_protocol_sources_release", | |
| 356 ":supported_css_properties_release", | |
| 357 ] | |
| 358 | |
| 359 foreach(output, build_application_outputs) { | |
| 360 outputs += [ resources_test_release_dir + output ] | |
| 361 } | |
| 362 | |
| 363 debug_mode = "0" | |
| 364 | |
| 365 args = [ | |
| 366 "inspector", | |
| 367 "toolbox", | |
| 368 "formatter_worker", | |
| 369 "heap_snapshot_worker", | |
| 370 "temp_storage_shared_worker", | |
| 371 "--input_path", | |
| 372 rebase_path("front_end", root_build_dir), | |
| 373 "--output_path", | |
| 374 rebase_path(resources_test_release_dir, root_build_dir), | |
| 375 "--debug", | |
| 376 debug_mode, | |
| 377 ] | |
| 378 } | |
| 379 | |
| 380 action("supported_css_properties_release") { | |
|
chenwilliam
2016/08/19 23:52:39
I copied the actions for SupportedCSSProperties an
| |
| 381 script = "scripts/generate_supported_css.py" | |
| 382 | |
| 383 inputs = [ | |
| 384 "../core/css/CSSProperties.in", | |
| 385 ] | |
| 386 | |
| 387 outputs = [ | |
| 388 resources_test_release_dir + "SupportedCSSProperties.js", | |
| 389 ] | |
| 390 | |
| 391 args = | |
| 392 rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir) | |
| 393 } | |
| 394 | |
| 395 action("frontend_protocol_sources_release") { | |
| 396 script = "scripts/CodeGeneratorFrontend.py" | |
| 397 deps = [ | |
| 398 "../core/inspector:protocol_version", | |
| 399 ] | |
| 400 inputs = [ | |
| 401 "$blink_core_output_dir/inspector/protocol.json", | |
| 402 ] | |
| 403 outputs = [ | |
| 404 resources_test_release_dir + "InspectorBackendCommands.js", | |
| 405 ] | |
| 406 | |
| 407 args = rebase_path(inputs, root_build_dir) + [ | |
| 408 "--output_js_dir", | |
| 409 rebase_path(resources_test_release_dir, root_build_dir), | |
| 410 ] | |
| 411 } | |
| 412 | |
| 324 if (debug_devtools) { | 413 if (debug_devtools) { |
| 325 # Debug: copy non-module directories and core into resources_out_dir as-is. | 414 # Debug: copy non-module directories and core into resources_out_dir as-is. |
| 326 group("copy_debug_non_modules") { | 415 group("copy_debug_non_modules") { |
| 327 public_deps = [ | 416 public_deps = [ |
| 328 ":copy_acorn_js_files", | 417 ":copy_acorn_js_files", |
| 329 ":copy_codemirror_files", | 418 ":copy_codemirror_files", |
| 330 ":copy_runtime_core", | 419 ":copy_runtime_core", |
| 331 ] | 420 ] |
| 332 } | 421 } |
| 333 | 422 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 346 } | 435 } |
| 347 | 436 |
| 348 copy("copy_codemirror_files") { | 437 copy("copy_codemirror_files") { |
| 349 sources = | 438 sources = |
| 350 gypi_values.devtools_cm_js_files + gypi_values.devtools_cm_css_files | 439 gypi_values.devtools_cm_js_files + gypi_values.devtools_cm_css_files |
| 351 outputs = [ | 440 outputs = [ |
| 352 resources_out_dir + "cm/{{source_file_part}}", | 441 resources_out_dir + "cm/{{source_file_part}}", |
| 353 ] | 442 ] |
| 354 } | 443 } |
| 355 } | 444 } |
| OLD | NEW |