Index: third_party/WebKit/Source/devtools/BUILD.gn |
diff --git a/third_party/WebKit/Source/devtools/BUILD.gn b/third_party/WebKit/Source/devtools/BUILD.gn |
index bf9b76f82f2385a1bf1a300681a9f1b3d0f61ba5..b859aea43fa319a10fea85012ee932e5786ffc80 100644 |
--- a/third_party/WebKit/Source/devtools/BUILD.gn |
+++ b/third_party/WebKit/Source/devtools/BUILD.gn |
@@ -72,13 +72,52 @@ generated_scripts = [ |
resources_out_dir + "SupportedCSSProperties.js", |
] |
+generated_entry_files = [ |
+ resources_out_dir + "inspector.html", |
+ resources_out_dir + "inspector.js", |
+ resources_out_dir + "toolbox.html", |
+ resources_out_dir + "toolbox.js", |
+] |
+ |
+generated_workers = [ |
+ resources_out_dir + "formatter_worker.js", |
+ resources_out_dir + "heap_snapshot_worker.js", |
+ resources_out_dir + "temp_storage_shared_worker.js", |
+] |
+ |
+generated_modules = [ |
pfeldman
2016/08/30 21:07:40
generated_bundled_modules
chenwilliam
2016/08/30 22:21:21
Done.
|
+ resources_out_dir + "accessibility/accessibility_module.js", |
+ resources_out_dir + "animation/animation_module.js", |
+ resources_out_dir + "audits/audits_module.js", |
+ resources_out_dir + "components_lazy/components_lazy_module.js", |
+ resources_out_dir + "console/console_module.js", |
+ resources_out_dir + "devices/devices_module.js", |
+ resources_out_dir + "diff/diff_module.js", |
+ resources_out_dir + "elements/elements_module.js", |
+ resources_out_dir + "es_tree/es_tree_module.js", |
+ resources_out_dir + "layers/layers_module.js", |
+ resources_out_dir + "network/network_module.js", |
+ resources_out_dir + "profiler/profiler_module.js", |
+ resources_out_dir + "resources/resources_module.js", |
+ resources_out_dir + "sass/sass_module.js", |
+ resources_out_dir + "security/security_module.js", |
+ resources_out_dir + "settings/settings_module.js", |
+ resources_out_dir + "snippets/snippets_module.js", |
+ resources_out_dir + "source_frame/source_frame_module.js", |
+ resources_out_dir + "sources/sources_module.js", |
+ resources_out_dir + "text_editor/text_editor_module.js", |
+ resources_out_dir + "timeline_model/timeline_model_module.js", |
+ resources_out_dir + "timeline/timeline_module.js", |
+ resources_out_dir + "ui_lazy/ui_lazy_module.js", |
+] |
+ |
#------------------------------------------------------------------------------- |
visibility = [ "//third_party/WebKit/*" ] |
group("devtools_frontend_resources") { |
public_deps = [ |
- ":build_applications", |
+ ":build_release_devtools", |
":copy_embedder_scripts", |
":copy_emulated_devices_images", |
":copy_inspector_images", |
@@ -86,6 +125,9 @@ group("devtools_frontend_resources") { |
":frontend_protocol_sources", |
":supported_css_properties", |
] |
+ if (debug_devtools) { |
+ public_deps += [ ":build_debug_devtools" ] |
+ } |
} |
copy("copy_embedder_scripts") { |
@@ -118,58 +160,9 @@ action("generate_devtools_grd") { |
inputs = gypi_values.devtools_image_files + all_devtools_files |
inputs += gypi_values.devtools_embedder_scripts |
- if (debug_devtools) { |
- # Debug: all files are picked as-is. |
- generated_files = generated_scripts + [ |
- resources_out_dir + "inspector.html", |
- resources_out_dir + "toolbox.html", |
- ] |
- |
- # Use a response file since the static files can be too long for the |
- # command line. The args here will be added to the command line. |
- static_files = all_devtools_files + [ "front_end/Runtime.js" ] |
- response_file_contents = rebase_path(static_files, root_build_dir) |
pfeldman
2016/08/29 20:57:22
Why is this no longer needed?
chenwilliam
2016/08/29 22:45:33
I don't think we need the grd file in debug_devtoo
|
- static_files_args = [ |
- "--static_files_args", |
- "{{response_file_name}}", |
- ] |
- } else { |
- # Release: pick compiled non-remote modules and concatenated app files. |
- generated_files = [ |
- resources_out_dir + "inspector.html", |
- resources_out_dir + "inspector.js", |
- resources_out_dir + "toolbox.html", |
- resources_out_dir + "toolbox.js", |
- resources_out_dir + "formatter_worker.js", |
- resources_out_dir + "heap_snapshot_worker.js", |
- resources_out_dir + "temp_storage_shared_worker.js", |
- resources_out_dir + "accessibility/accessibility_module.js", |
- resources_out_dir + "audits/audits_module.js", |
- resources_out_dir + "animation/animation_module.js", |
- resources_out_dir + "components_lazy/components_lazy_module.js", |
- resources_out_dir + "console/console_module.js", |
- resources_out_dir + "devices/devices_module.js", |
- resources_out_dir + "diff/diff_module.js", |
- resources_out_dir + "elements/elements_module.js", |
- resources_out_dir + "es_tree/es_tree_module.js", |
- resources_out_dir + "layers/layers_module.js", |
- resources_out_dir + "network/network_module.js", |
- resources_out_dir + "profiler/profiler_module.js", |
- resources_out_dir + "resources/resources_module.js", |
- resources_out_dir + "sass/sass_module.js", |
- resources_out_dir + "security/security_module.js", |
- resources_out_dir + "settings/settings_module.js", |
- resources_out_dir + "snippets/snippets_module.js", |
- resources_out_dir + "source_frame/source_frame_module.js", |
- resources_out_dir + "sources/sources_module.js", |
- resources_out_dir + "text_editor/text_editor_module.js", |
- resources_out_dir + "timeline_model/timeline_model_module.js", |
- resources_out_dir + "timeline/timeline_module.js", |
- resources_out_dir + "ui_lazy/ui_lazy_module.js", |
- resources_out_dir + "devtools_extension_api.js", |
- ] |
- static_files_args = [] # Nothing needed for this |
- } |
+ generated_files = |
+ generated_entry_files + generated_workers + generated_modules + |
+ [ resources_out_dir + "devtools_extension_api.js" ] |
images_path = "front_end/Images" |
@@ -188,7 +181,7 @@ action("generate_devtools_grd") { |
args = rebase_path(generated_files, root_build_dir) + |
rebase_path(generated_files, root_build_dir) + |
rebase_path(gypi_values.devtools_embedder_scripts, root_build_dir) + |
- static_files_args + [ "--relative_path_dirs" ] + |
+ [ "--relative_path_dirs" ] + |
rebase_path(relative_path_dirs, root_build_dir) + |
[ |
"--images", |
@@ -243,8 +236,14 @@ action("frontend_protocol_sources") { |
] |
} |
-action("build_applications") { |
+action("build_release_devtools") { |
script = "scripts/build_applications.py" |
+ |
+ deps = [ |
+ ":frontend_protocol_sources", |
+ ":supported_css_properties", |
+ ] |
+ |
helper_scripts = [ |
"scripts/modular_build.py", |
"scripts/concatenate_application_code.py", |
@@ -256,58 +255,17 @@ action("build_applications") { |
"front_end/toolbox.html", |
] |
- outputs = [ |
- resources_out_dir + "inspector.html", |
- resources_out_dir + "toolbox.html", |
+ generated_remote_modules = [ |
pfeldman
2016/08/30 21:07:40
^^ generated_remote_modules
chenwilliam
2016/08/30 22:21:21
Done.
|
+ resources_out_dir + "cm_modes/cm_modes_module.js", |
+ resources_out_dir + "emulated_devices/emulated_devices_module.js", |
+ resources_out_dir + "gonzales/gonzales_module.js", |
+ resources_out_dir + "screencast/screencast_module.js", |
] |
- deps = [ |
- ":frontend_protocol_sources", |
- ":supported_css_properties", |
- ] |
- |
- if (debug_devtools) { |
- deps += [ ":copy_debug_non_modules" ] |
- |
- debug_mode = "1" |
- } else { |
- outputs += [ |
- resources_out_dir + "inspector.js", |
- resources_out_dir + "toolbox.js", |
- resources_out_dir + "formatter_worker.js", |
- resources_out_dir + "heap_snapshot_worker.js", |
- resources_out_dir + "temp_storage_shared_worker.js", |
- resources_out_dir + "accessibility/accessibility_module.js", |
- resources_out_dir + "animation/animation_module.js", |
- resources_out_dir + "audits/audits_module.js", |
- resources_out_dir + "cm_modes/cm_modes_module.js", |
- resources_out_dir + "components_lazy/components_lazy_module.js", |
- resources_out_dir + "console/console_module.js", |
- resources_out_dir + "devices/devices_module.js", |
- resources_out_dir + "diff/diff_module.js", |
- resources_out_dir + "elements/elements_module.js", |
- resources_out_dir + "emulated_devices/emulated_devices_module.js", |
- resources_out_dir + "es_tree/es_tree_module.js", |
- resources_out_dir + "gonzales/gonzales_module.js", |
- resources_out_dir + "layers/layers_module.js", |
- resources_out_dir + "network/network_module.js", |
- resources_out_dir + "profiler/profiler_module.js", |
- resources_out_dir + "resources/resources_module.js", |
- resources_out_dir + "sass/sass_module.js", |
- resources_out_dir + "screencast/screencast_module.js", |
- resources_out_dir + "security/security_module.js", |
- resources_out_dir + "settings/settings_module.js", |
- resources_out_dir + "snippets/snippets_module.js", |
- resources_out_dir + "source_frame/source_frame_module.js", |
- resources_out_dir + "sources/sources_module.js", |
- resources_out_dir + "text_editor/text_editor_module.js", |
- resources_out_dir + "timeline_model/timeline_model_module.js", |
- resources_out_dir + "timeline/timeline_module.js", |
- resources_out_dir + "ui_lazy/ui_lazy_module.js", |
- ] |
+ outputs = generated_entry_files + generated_workers + generated_modules + |
+ generated_remote_modules |
- debug_mode = "0" |
- } |
+ debug_mode = "0" |
args = [ |
"inspector", |
@@ -325,11 +283,49 @@ action("build_applications") { |
} |
if (debug_devtools) { |
- # Debug: copy non-module directories and core into resources_out_dir as-is. |
- group("copy_debug_non_modules") { |
+ resources_out_debug_dir = "$root_out_dir/resources/inspector/debug/" |
pfeldman
2016/08/29 20:57:22
I was hoping that we could minimize the diff via u
chenwilliam
2016/08/29 22:45:33
I had to add some boilerplate but I'm not sure how
|
+ |
+ action("build_debug_devtools") { |
+ script = "scripts/build_applications.py" |
+ |
+ deps = [ |
+ ":copy_debug_files", |
+ ] |
+ |
+ inputs = all_devtools_files + [ |
+ "front_end/inspector.html", |
+ "front_end/toolbox.html", |
+ ] |
+ |
+ outputs = [ |
+ resources_out_debug_dir + "inspector.html", |
+ resources_out_debug_dir + "toolbox.html", |
+ ] |
+ |
+ debug_mode = "1" |
+ |
+ args = [ |
+ "inspector", |
+ "toolbox", |
+ "formatter_worker", |
+ "heap_snapshot_worker", |
+ "temp_storage_shared_worker", |
+ "--input_path", |
+ rebase_path("front_end", root_build_dir), |
+ "--output_path", |
+ rebase_path(resources_out_debug_dir, root_build_dir), |
+ "--debug", |
+ debug_mode, |
pfeldman
2016/08/30 21:07:40
It seems that this flag defines the root procedure
|
+ ] |
+ } |
+ |
+ group("copy_debug_files") { |
public_deps = [ |
":copy_acorn_js_files", |
":copy_codemirror_files", |
+ ":copy_emulated_devices_images_debug", |
+ ":copy_generated_scripts", |
+ ":copy_inspector_images_debug", |
":copy_runtime_core", |
] |
} |
@@ -337,14 +333,14 @@ if (debug_devtools) { |
copy("copy_runtime_core") { |
sources = gypi_values.devtools_core_base_files |
outputs = [ |
- resources_out_dir + "/{{source_file_part}}", |
+ resources_out_debug_dir + "/{{source_file_part}}", |
] |
} |
copy("copy_acorn_js_files") { |
sources = gypi_values.devtools_acorn_files |
outputs = [ |
- resources_out_dir + "acorn/{{source_file_part}}", |
+ resources_out_debug_dir + "acorn/{{source_file_part}}", |
] |
} |
@@ -352,7 +348,31 @@ if (debug_devtools) { |
sources = |
gypi_values.devtools_cm_js_files + gypi_values.devtools_cm_css_files |
outputs = [ |
- resources_out_dir + "cm/{{source_file_part}}", |
+ resources_out_debug_dir + "cm/{{source_file_part}}", |
+ ] |
+ } |
+ |
+ copy("copy_generated_scripts") { |
+ deps = [ |
+ ":frontend_protocol_sources", |
+ ":supported_css_properties", |
+ ] |
+ sources = generated_scripts |
+ outputs = [ |
+ resources_out_debug_dir + "/{{source_file_part}}", |
+ ] |
+ } |
+ copy("copy_inspector_images_debug") { |
+ sources = gypi_values.devtools_image_files |
+ outputs = [ |
+ resources_out_debug_dir + "Images/{{source_file_part}}", |
+ ] |
+ } |
+ |
+ copy("copy_emulated_devices_images_debug") { |
+ sources = gypi_values.devtools_emulated_devices_images |
+ outputs = [ |
+ resources_out_debug_dir + "emulated_devices/{{source_file_part}}", |
] |
} |
} |