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") |
| 6 |
5 gypi_values = exec_script( | 7 gypi_values = exec_script( |
6 "//build/gypi_to_gn.py", | 8 "//build/gypi_to_gn.py", |
7 [ rebase_path("devtools.gypi") ], | 9 [ rebase_path("devtools.gypi") ], |
8 "scope", | 10 "scope", |
9 [ "devtools.gypi" ]) | 11 [ "devtools.gypi" ]) |
10 | 12 |
11 # Some of the files in the .gypi use GYP variable expansions, go through and | 13 # Some of the files in the .gypi use GYP variable expansions, go through and |
12 # fix them. | 14 # fix them. |
13 devtools_core_base_files = gypi_values.devtools_core_base_files - [ | 15 devtools_core_base_files = gypi_values.devtools_core_base_files - [ |
14 "<@(devtools_standalone_files)", | 16 "<@(devtools_standalone_files)", |
15 ] + gypi_values.devtools_standalone_files | 17 ] + gypi_values.devtools_standalone_files |
16 | 18 |
17 devtools_core_files = | 19 devtools_core_files = |
18 devtools_core_base_files + | 20 devtools_core_base_files + |
19 gypi_values.devtools_bindings_js_files + | 21 gypi_values.devtools_bindings_js_files + |
20 gypi_values.devtools_common_js_files + | 22 gypi_values.devtools_common_js_files + |
21 gypi_values.devtools_components_js_files + | 23 gypi_values.devtools_components_js_files + |
22 gypi_values.devtools_host_js_files + | 24 gypi_values.devtools_host_js_files + |
23 gypi_values.devtools_main_js_files + | 25 gypi_values.devtools_main_js_files + |
| 26 gypi_values.devtools_screencast_js_files + |
24 gypi_values.devtools_sdk_js_files + | 27 gypi_values.devtools_sdk_js_files + |
25 gypi_values.devtools_screencast_js_files + | |
26 gypi_values.devtools_toolbox_js_files + | 28 gypi_values.devtools_toolbox_js_files + |
27 gypi_values.devtools_toolbox_bootstrap_js_files + | 29 gypi_values.devtools_toolbox_bootstrap_js_files + |
28 gypi_values.devtools_ui_js_files + | 30 gypi_values.devtools_ui_js_files + |
29 gypi_values.devtools_workspace_js_files | 31 gypi_values.devtools_workspace_js_files |
30 | 32 |
31 devtools_extensions_js_files = gypi_values.devtools_extensions_js_files - | 33 devtools_extensions_js_files = gypi_values.devtools_extensions_js_files - |
32 [ "<@(devtools_extension_api_files)" ] + | 34 [ "<@(devtools_extension_api_files)" ] + |
33 gypi_values.devtools_extension_api_files | 35 gypi_values.devtools_extension_api_files |
34 | 36 |
35 devtools_modules_js_files = | 37 devtools_modules_js_files = |
(...skipping 17 matching lines...) Expand all Loading... |
53 gypi_values.devtools_timeline_js_files | 55 gypi_values.devtools_timeline_js_files |
54 | 56 |
55 all_devtools_files = | 57 all_devtools_files = |
56 gypi_values.devtools_cm_css_files + | 58 gypi_values.devtools_cm_css_files + |
57 gypi_values.devtools_cm_js_files + | 59 gypi_values.devtools_cm_js_files + |
58 devtools_core_files + | 60 devtools_core_files + |
59 gypi_values.devtools_module_json_files + | 61 gypi_values.devtools_module_json_files + |
60 devtools_modules_js_files + | 62 devtools_modules_js_files + |
61 gypi_values.devtools_uglify_files | 63 gypi_values.devtools_uglify_files |
62 | 64 |
| 65 # FIXME: Fix the generate_devtools_grd.py script to accept trailing slashes. |
| 66 resources_out_dir_no_slash = "$root_out_dir/resources/inspector" |
| 67 resources_out_dir = resources_out_dir_no_slash + "/" |
| 68 |
| 69 generated_scripts = [ |
| 70 resources_out_dir + "InspectorBackendCommands.js", |
| 71 resources_out_dir + "SupportedCSSProperties.js", |
| 72 ] |
| 73 |
63 #------------------------------------------------------------------------------- | 74 #------------------------------------------------------------------------------- |
64 | 75 |
65 visibility = [ "//third_party/WebKit/*" ] | 76 visibility = [ "//third_party/WebKit/*" ] |
66 | 77 |
67 # Probably need to parameterize this. If we set it to true, there will be some | |
68 # further work in the scripts below. | |
69 debug_devtools = false | |
70 | |
71 group("devtools_frontend_resources") { | 78 group("devtools_frontend_resources") { |
72 deps = [ | 79 deps = [ |
73 ":copy_inspector_images", | |
74 ":devtools_html", | 80 ":devtools_html", |
75 ":toolbox_html", | 81 ":toolbox_html", |
| 82 ":copy_inspector_images", |
| 83 ":copy_standalone_css", |
| 84 ":devtools_extension_api", |
76 ":frontend_protocol_sources", | 85 ":frontend_protocol_sources", |
77 ":supported_css_properties", | 86 ":supported_css_properties", |
78 ":build_applications", | 87 ":build_applications", |
79 ] | 88 ] |
80 | 89 |
81 if (!debug_devtools) { | 90 if (!debug_devtools) { |
| 91 # This overwrites application-specific core CSS (devtools.css), |
| 92 # and thus should be guarded out in Debug builds. |
82 deps += [ | 93 deps += [ |
83 ":copy_standalone_css", | |
84 ":concatenated_devtools_css", | 94 ":concatenated_devtools_css", |
85 ":concatenated_toolbox_css", | 95 ":concatenated_toolbox_css", |
86 ] | 96 ] |
87 } | 97 } |
88 } | 98 } |
89 | 99 |
90 copy("copy_inspector_images") { | 100 copy("copy_inspector_images") { |
91 sources = gypi_values.devtools_image_files | 101 sources = gypi_values.devtools_image_files |
92 outputs = [ "$root_out_dir/resources/inspector/Images/{{source_file_part}}" ] | 102 outputs = [ resources_out_dir + "Images/{{source_file_part}}" ] |
93 } | 103 } |
94 | 104 |
95 # TODO(GYP) need debug_devtools support (this runs somewhat differently). | |
96 action("generate_devtools_grd") { | 105 action("generate_devtools_grd") { |
97 script = "scripts/generate_devtools_grd.py" | 106 script = "scripts/generate_devtools_grd.py" |
98 | 107 |
99 input_pages = [ | 108 deps = [ ":devtools_frontend_resources" ] |
100 "$root_out_dir/resources/inspector/devtools.css", | 109 |
101 "$root_out_dir/resources/inspector/devtools.html", | 110 if (debug_devtools) { |
102 "$root_out_dir/resources/inspector/devtools.js", | 111 # Debug: all files are picked as-is. |
103 "$root_out_dir/resources/inspector/toolbox.css", | 112 input_pages = all_devtools_files + generated_scripts + [ |
104 "$root_out_dir/resources/inspector/toolbox.html", | 113 resources_out_dir + "devtools.html", |
105 "$root_out_dir/resources/inspector/toolbox.js", | 114 resources_out_dir + "toolbox.html", |
106 "$root_out_dir/resources/inspector/audits_module.js", | 115 ] |
107 "$root_out_dir/resources/inspector/console_module.js", | 116 } else { |
108 "$root_out_dir/resources/inspector/devices_module.js", | 117 # Release: pick compiled files and lazy-loaded CSS. |
109 "$root_out_dir/resources/inspector/documentation_module.js", | 118 input_pages = [ |
110 "$root_out_dir/resources/inspector/elements_module.js", | 119 resources_out_dir + "devtools.css", |
111 "$root_out_dir/resources/inspector/extensions_module.js", | 120 resources_out_dir + "devtools.html", |
112 "$root_out_dir/resources/inspector/heap_snapshot_worker_module.js", | 121 resources_out_dir + "devtools.js", |
113 "$root_out_dir/resources/inspector/layers_module.js", | 122 resources_out_dir + "toolbox.css", |
114 "$root_out_dir/resources/inspector/network_module.js", | 123 resources_out_dir + "toolbox.html", |
115 "$root_out_dir/resources/inspector/profiler_module.js", | 124 resources_out_dir + "toolbox.js", |
116 "$root_out_dir/resources/inspector/promises_module.js", | 125 resources_out_dir + "audits_module.js", |
117 "$root_out_dir/resources/inspector/resources_module.js", | 126 resources_out_dir + "console_module.js", |
118 "$root_out_dir/resources/inspector/script_formatter_worker_module.js", | 127 resources_out_dir + "devices_module.js", |
119 "$root_out_dir/resources/inspector/settings_module.js", | 128 resources_out_dir + "documentation_module.js", |
120 "$root_out_dir/resources/inspector/source_frame_module.js", | 129 resources_out_dir + "elements_module.js", |
121 "$root_out_dir/resources/inspector/sources_module.js", | 130 resources_out_dir + "extensions_module.js", |
122 "$root_out_dir/resources/inspector/temp_storage_shared_worker_module.js", | 131 resources_out_dir + "heap_snapshot_worker_module.js", |
123 "$root_out_dir/resources/inspector/timeline_module.js", | 132 resources_out_dir + "layers_module.js", |
124 "$root_out_dir/resources/inspector/devtools_extension_api.js", | 133 resources_out_dir + "network_module.js", |
125 ] + gypi_values.devtools_standalone_files + gypi_values.devtools_cm_css_files | 134 resources_out_dir + "profiler_module.js", |
| 135 resources_out_dir + "promises_module.js", |
| 136 resources_out_dir + "resources_module.js", |
| 137 resources_out_dir + "script_formatter_worker_module.js", |
| 138 resources_out_dir + "settings_module.js", |
| 139 resources_out_dir + "source_frame_module.js", |
| 140 resources_out_dir + "sources_module.js", |
| 141 resources_out_dir + "temp_storage_shared_worker_module.js", |
| 142 resources_out_dir + "timeline_module.js", |
| 143 resources_out_dir + "devtools_extension_api.js", |
| 144 ] |
| 145 input_pages += gypi_values.devtools_standalone_files + |
| 146 gypi_values.devtools_cm_css_files |
| 147 } |
126 | 148 |
127 images = gypi_values.devtools_image_files | 149 images = gypi_values.devtools_image_files |
128 images_path = "front_end/Images" | 150 images_path = "front_end/Images" |
129 | 151 |
130 inputs = input_pages + images | 152 inputs = input_pages + images |
131 | 153 |
132 outfile = "$root_gen_dir/devtools/devtools_resources.grd" | 154 outfile = "$root_gen_dir/devtools/devtools_resources.grd" |
133 outputs = [ outfile ] | 155 outputs = [ outfile ] |
134 | 156 |
135 relative_path_dirs = [ | 157 relative_path_dirs = [ |
136 "$root_out_dir/resources/inspector", | 158 resources_out_dir_no_slash, |
137 "front_end", | 159 "front_end", |
138 ] | 160 ] |
139 | 161 |
140 args = rebase_path(input_pages, root_build_dir) + [ | 162 args = rebase_path(input_pages, root_build_dir) + [ |
141 "--relative_path_dirs" ] + | 163 "--relative_path_dirs" ] + |
142 rebase_path(relative_path_dirs, root_build_dir) + [ | 164 rebase_path(relative_path_dirs, root_build_dir) + [ |
143 "--images", rebase_path(images_path, root_build_dir), | 165 "--images", rebase_path(images_path, root_build_dir), |
144 "--output", rebase_path(outfile, root_build_dir), | 166 "--output", rebase_path(outfile, root_build_dir), |
145 ] | 167 ] |
146 | |
147 deps = [ | |
148 ":devtools_html", | |
149 ":toolbox_html", | |
150 ":devtools_extension_api", | |
151 ":devtools_frontend_resources", | |
152 ] | |
153 } | 168 } |
154 | 169 |
155 template("generate_app_html") { | 170 template("generate_app_html") { |
156 assert(defined(invoker.app_name), target_name) | 171 assert(defined(invoker.app_name), target_name) |
| 172 app_name = invoker.app_name |
157 | 173 |
158 action(target_name) { | 174 action(target_name) { |
159 script = "scripts/generate_devtools_html.py" | 175 script = "scripts/generate_devtools_html.py" |
160 | 176 |
161 inputs = [ "front_end/" + invoker.app_name + ".html"] | 177 inputs = [ "front_end/" + app_name + ".html"] |
162 outputs = [ | 178 outputs = [ resources_out_dir + app_name + ".html" ] |
163 "$root_out_dir/resources/inspector/" + invoker.app_name + ".html" | |
164 ] | |
165 | 179 |
166 args = rebase_path(inputs, root_build_dir) + | 180 args = rebase_path(inputs, root_build_dir) + |
167 rebase_path(outputs, root_build_dir) | 181 rebase_path(outputs, root_build_dir) |
168 | 182 |
169 if (debug_devtools) { | 183 if (debug_devtools) { |
170 args += [ "1" ] | 184 args += [ "1" ] |
171 } else { | 185 } else { |
172 args += [ "0" ] | 186 args += [ "0" ] |
173 } | 187 } |
174 } | 188 } |
175 } | 189 } |
176 | 190 |
177 generate_app_html("devtools_html") { | 191 generate_app_html("devtools_html") { |
178 app_name = "devtools" | 192 app_name = "devtools" |
179 } | 193 } |
180 | 194 |
181 generate_app_html("toolbox_html") { | 195 generate_app_html("toolbox_html") { |
182 app_name = "toolbox" | 196 app_name = "toolbox" |
183 } | 197 } |
184 | 198 |
185 action("devtools_extension_api") { | 199 action("devtools_extension_api") { |
186 script = "scripts/generate_devtools_extension_api.py" | 200 script = "scripts/generate_devtools_extension_api.py" |
187 | 201 |
188 inputs = gypi_values.devtools_extension_api_files | 202 inputs = gypi_values.devtools_extension_api_files |
189 outputs = [ "$root_out_dir/resources/inspector/devtools_extension_api.js" ] | 203 outputs = [ resources_out_dir + "devtools_extension_api.js" ] |
190 | 204 |
191 args = rebase_path(outputs, root_build_dir) + | 205 args = rebase_path(outputs, root_build_dir) + |
192 rebase_path(gypi_values.devtools_extension_api_files, root_build_dir) | 206 rebase_path(gypi_values.devtools_extension_api_files, root_build_dir) |
193 } | 207 } |
194 | 208 |
195 action("supported_css_properties") { | 209 action("supported_css_properties") { |
196 script = "scripts/generate_supported_css.py" | 210 script = "scripts/generate_supported_css.py" |
197 | 211 |
198 inputs = [ | 212 inputs = [ "../core/css/CSSProperties.in" ] |
199 "../core/css/CSSProperties.in", | |
200 ] | |
201 | 213 |
202 outputs = [ | 214 outputs = [ resources_out_dir + "SupportedCSSProperties.js" ] |
203 "$root_out_dir/resources/inspector/SupportedCSSProperties.js" | |
204 ] | |
205 | 215 |
206 args = rebase_path(inputs, root_build_dir) + | 216 args = rebase_path(inputs, root_build_dir) + |
207 rebase_path(outputs, root_build_dir) | 217 rebase_path(outputs, root_build_dir) |
208 } | 218 } |
209 | 219 |
210 action("frontend_protocol_sources") { | 220 action("frontend_protocol_sources") { |
211 script = "scripts/CodeGeneratorFrontend.py" | 221 script = "scripts/CodeGeneratorFrontend.py" |
212 | 222 |
213 inputs = [ "protocol.json" ] | 223 inputs = [ "protocol.json" ] |
214 outputs = [ "$root_out_dir/resources/inspector/InspectorBackendCommands.js" ] | 224 outputs = [ resources_out_dir + "InspectorBackendCommands.js" ] |
215 | 225 |
216 args = rebase_path(inputs, root_build_dir) + [ | 226 args = rebase_path(inputs, root_build_dir) + [ |
217 "--output_js_dir", | 227 "--output_js_dir", |
218 rebase_path("$root_out_dir/resources/inspector", root_build_dir), | 228 rebase_path(resources_out_dir, root_build_dir), |
219 ] | 229 ] |
220 } | 230 } |
221 | 231 |
222 action("build_applications") { | 232 group("build_applications") { |
223 script = "scripts/build_applications.py" | 233 if (!debug_devtools) { |
224 helper_scripts = [ | 234 # Release: concatenate application code. This overwrites |
225 "scripts/modular_build.py", | 235 # application-specific scripts (devtools.js), and thus should be guarded. |
226 "scripts/concatenate_application_code.py", | 236 action("build_applications_release") { |
227 ] | 237 script = "scripts/build_applications.py" |
228 | 238 helper_scripts = [ |
229 generated_inputs = [ | 239 "scripts/modular_build.py", |
230 "$root_out_dir/resources/inspector/InspectorBackendCommands.js", | 240 "scripts/concatenate_application_code.py", |
231 "$root_out_dir/resources/inspector/SupportedCSSProperties.js", | 241 ] |
232 ] | 242 |
233 | 243 inputs = helper_scripts + all_devtools_files + generated_scripts |
234 inputs = helper_scripts + all_devtools_files + generated_inputs | 244 |
235 | 245 outputs = [ |
236 output_path = "$root_out_dir/resources/inspector/" | 246 resources_out_dir + "devtools.js", |
237 outputs = [ | 247 resources_out_dir + "toolbox.js", |
238 output_path + "devtools.js", | 248 resources_out_dir + "audits_module.js", |
239 output_path + "toolbox.js", | 249 resources_out_dir + "console_module.js", |
240 output_path + "audits_module.js", | 250 resources_out_dir + "devices_module.js", |
241 output_path + "console_module.js", | 251 resources_out_dir + "documentation_module.js", |
242 output_path + "devices_module.js", | 252 resources_out_dir + "elements_module.js", |
243 output_path + "documentation_module.js", | 253 resources_out_dir + "extensions_module.js", |
244 output_path + "elements_module.js", | 254 resources_out_dir + "heap_snapshot_worker_module.js", |
245 output_path + "extensions_module.js", | 255 resources_out_dir + "layers_module.js", |
246 output_path + "heap_snapshot_worker_module.js", | 256 resources_out_dir + "network_module.js", |
247 output_path + "layers_module.js", | 257 resources_out_dir + "profiler_module.js", |
248 output_path + "network_module.js", | 258 resources_out_dir + "promises_module.js", |
249 output_path + "profiler_module.js", | 259 resources_out_dir + "resources_module.js", |
250 output_path + "promises_module.js", | 260 resources_out_dir + "script_formatter_worker_module.js", |
251 output_path + "resources_module.js", | 261 resources_out_dir + "settings_module.js", |
252 output_path + "script_formatter_worker_module.js", | 262 resources_out_dir + "source_frame_module.js", |
253 output_path + "settings_module.js", | 263 resources_out_dir + "sources_module.js", |
254 output_path + "source_frame_module.js", | 264 resources_out_dir + "temp_storage_shared_worker_module.js", |
255 output_path + "sources_module.js", | 265 resources_out_dir + "timeline_module.js", |
256 output_path + "temp_storage_shared_worker_module.js", | 266 ] |
257 output_path + "timeline_module.js", | 267 |
258 ] | 268 args = [ |
259 | 269 "devtools", "toolbox", |
260 if (debug_devtools) { | 270 "--input_path", rebase_path("front_end", root_build_dir), |
261 debug_flag = "1" | 271 "--output_path", rebase_path(resources_out_dir, root_build_dir), |
| 272 "--debug", "0" |
| 273 ] |
| 274 |
| 275 deps = [ |
| 276 ":supported_css_properties", |
| 277 ":frontend_protocol_sources", |
| 278 ] |
| 279 } |
| 280 deps = [ |
| 281 ":build_applications_release" |
| 282 ] |
262 } else { | 283 } else { |
263 debug_flag = "0" | 284 deps = [ |
264 } | 285 ":copy_debug_modules" |
265 | 286 ] |
266 app_names = [ | 287 } |
267 "devtools", | |
268 "toolbox" | |
269 ] | |
270 | |
271 args = app_names + [ | |
272 "--input_path", rebase_path("front_end", root_build_dir), | |
273 "--output_path", rebase_path(output_path, root_build_dir), | |
274 "--debug", debug_flag | |
275 ] | |
276 | |
277 deps = [] | |
278 | |
279 if (!debug_devtools) { | |
280 deps += [ | |
281 ":devtools_html", | |
282 ":toolbox_html", | |
283 ":supported_css_properties", | |
284 ":frontend_protocol_sources", | |
285 ] | |
286 } | |
287 } | |
288 | |
289 template("concatenate_css") { | |
290 assert(defined(invoker.app_name), target_name) | |
291 | |
292 action(target_name) { | |
293 script = "scripts/concatenate_css_files.py" | |
294 | |
295 input_stylesheet = "front_end/" + invoker.app_name + ".css" | |
296 inputs = [ input_stylesheet ] + devtools_core_base_files | |
297 | |
298 outputs = [ | |
299 "$root_out_dir/resources/inspector/" + invoker.app_name + ".css" | |
300 ] | |
301 | |
302 args = [ rebase_path(input_stylesheet, root_build_dir) ] + | |
303 rebase_path(outputs, root_build_dir) | |
304 } | |
305 } | |
306 | |
307 concatenate_css("concatenated_devtools_css") { | |
308 app_name = "devtools" | |
309 } | |
310 | |
311 concatenate_css("concatenated_toolbox_css") { | |
312 app_name = "toolbox" | |
313 } | 288 } |
314 | 289 |
315 copy("copy_codemirror_css") { | 290 copy("copy_codemirror_css") { |
316 sources = gypi_values.devtools_cm_css_files | 291 sources = gypi_values.devtools_cm_css_files |
317 outputs = [ "$root_out_dir/resources/inspector/cm/{{source_file_part}}" ] | 292 outputs = [ resources_out_dir + "cm/{{source_file_part}}" ] |
318 } | 293 } |
319 | 294 |
320 copy("copy_standalone_css") { | 295 copy("copy_standalone_css") { |
321 sources = gypi_values.devtools_standalone_files | 296 sources = gypi_values.devtools_standalone_files |
322 outputs = [ "$root_out_dir/resources/inspector/{{source_file_part}}" ] | 297 outputs = [ resources_out_dir + "{{source_file_part}}" ] |
323 | 298 |
324 deps = [ ":copy_codemirror_css" ] | 299 deps = [ ":copy_codemirror_css" ] |
325 } | 300 } |
| 301 |
| 302 if (debug_devtools) { |
| 303 # Debug: copy front-end into resources_out_dir as-is. |
| 304 group("copy_debug_modules") { |
| 305 deps = [ |
| 306 ":copy_audits_module", |
| 307 ":copy_bindings_module", |
| 308 ":copy_common_module", |
| 309 ":copy_components_module", |
| 310 ":copy_console_module", |
| 311 ":copy_devices_module", |
| 312 ":copy_documentation_module", |
| 313 ":copy_elements_module", |
| 314 ":copy_extensions_module", |
| 315 ":copy_heap_snapshot_worker_module", |
| 316 ":copy_host_module", |
| 317 ":copy_layers_module", |
| 318 ":copy_main_module", |
| 319 ":copy_network_module", |
| 320 ":copy_profiler_module", |
| 321 ":copy_promises_module", |
| 322 ":copy_resources_module", |
| 323 ":copy_screencast_module", |
| 324 ":copy_script_formatter_worker_module", |
| 325 ":copy_sdk_module", |
| 326 ":copy_settings_module", |
| 327 ":copy_source_frame_module", |
| 328 ":copy_sources_module", |
| 329 ":copy_temp_storage_shared_worker_module", |
| 330 ":copy_timeline_module", |
| 331 ":copy_toolbox_module", |
| 332 ":copy_toolbox_bootstrap_module", |
| 333 ":copy_ui_module", |
| 334 ":copy_workspace_module", |
| 335 ] |
| 336 |
| 337 copy("copy_runtime_core") { |
| 338 sources = devtools_core_base_files - |
| 339 gypi_values.devtools_standalone_files |
| 340 outputs = [ resources_out_dir + "/{{source_file_part}}" ] |
| 341 } |
| 342 deps += [ ":copy_runtime_core" ] |
| 343 } |
| 344 |
| 345 # Copies module contents into resources_out_dir in debug_devtools=1 builds. |
| 346 # module_name: (String) The JS module name to process. |
| 347 # imported_files: (List of strings) The list of files the input depends on. |
| 348 template("copy_debug_module") { |
| 349 assert(defined(invoker.module_name), target_name) |
| 350 assert(defined(invoker.imported_files), target_name) |
| 351 |
| 352 imported_files = invoker.imported_files |
| 353 module_name = invoker.module_name |
| 354 module_json = "front_end/" + module_name + "/module.json" |
| 355 |
| 356 copy(target_name) { |
| 357 sources = [ module_json ] + imported_files |
| 358 outputs = [ resources_out_dir + module_name + "/{{source_file_part}}" ] |
| 359 } |
| 360 } |
| 361 |
| 362 copy_debug_module("copy_audits_module") { |
| 363 module_name = "audits" |
| 364 imported_files = gypi_values.devtools_audits_js_files |
| 365 } |
| 366 |
| 367 copy_debug_module("copy_bindings_module") { |
| 368 module_name = "bindings" |
| 369 imported_files = gypi_values.devtools_bindings_js_files |
| 370 } |
| 371 |
| 372 copy_debug_module("copy_common_module") { |
| 373 module_name = "common" |
| 374 imported_files = gypi_values.devtools_common_js_files |
| 375 } |
| 376 |
| 377 copy_debug_module("copy_components_module") { |
| 378 module_name = "components" |
| 379 imported_files = gypi_values.devtools_components_js_files |
| 380 } |
| 381 |
| 382 copy_debug_module("copy_console_module") { |
| 383 module_name = "console" |
| 384 imported_files = gypi_values.devtools_console_js_files |
| 385 } |
| 386 |
| 387 copy_debug_module("copy_devices_module") { |
| 388 module_name = "devices" |
| 389 imported_files = gypi_values.devtools_devices_js_files |
| 390 } |
| 391 |
| 392 copy_debug_module("copy_documentation_module") { |
| 393 module_name = "documentation" |
| 394 imported_files = gypi_values.devtools_documentation_js_files |
| 395 } |
| 396 |
| 397 copy_debug_module("copy_elements_module") { |
| 398 module_name = "elements" |
| 399 imported_files = gypi_values.devtools_elements_js_files |
| 400 } |
| 401 |
| 402 copy_debug_module("copy_extensions_module") { |
| 403 module_name = "extensions" |
| 404 imported_files = devtools_extensions_js_files |
| 405 } |
| 406 |
| 407 copy_debug_module("copy_heap_snapshot_worker_module") { |
| 408 module_name = "heap_snapshot_worker" |
| 409 imported_files = gypi_values.devtools_heap_snapshot_worker_js_files |
| 410 } |
| 411 |
| 412 copy_debug_module("copy_host_module") { |
| 413 module_name = "host" |
| 414 imported_files = gypi_values.devtools_host_js_files |
| 415 } |
| 416 |
| 417 copy_debug_module("copy_layers_module") { |
| 418 module_name = "layers" |
| 419 imported_files = gypi_values.devtools_layers_js_files |
| 420 } |
| 421 |
| 422 copy_debug_module("copy_main_module") { |
| 423 module_name = "main" |
| 424 imported_files = gypi_values.devtools_main_js_files |
| 425 } |
| 426 |
| 427 copy_debug_module("copy_network_module") { |
| 428 module_name = "network" |
| 429 imported_files = gypi_values.devtools_network_js_files |
| 430 } |
| 431 |
| 432 copy_debug_module("copy_profiler_module") { |
| 433 module_name = "profiler" |
| 434 imported_files = gypi_values.devtools_profiler_js_files |
| 435 } |
| 436 |
| 437 copy_debug_module("copy_promises_module") { |
| 438 module_name = "promises" |
| 439 imported_files = gypi_values.devtools_promises_js_files |
| 440 } |
| 441 |
| 442 copy_debug_module("copy_resources_module") { |
| 443 module_name = "resources" |
| 444 imported_files = gypi_values.devtools_resources_js_files |
| 445 } |
| 446 |
| 447 copy_debug_module("copy_screencast_module") { |
| 448 module_name = "screencast" |
| 449 imported_files = gypi_values.devtools_screencast_js_files |
| 450 } |
| 451 |
| 452 group("copy_script_formatter_worker_module") { |
| 453 copy_debug_module("copy_script_formatter_worker_module_base") { |
| 454 module_name = "script_formatter_worker" |
| 455 imported_files = gypi_values.devtools_uglify_files + |
| 456 gypi_values.devtools_script_formatter_worker_js_files |
| 457 } |
| 458 |
| 459 copy("copy_uglify_js_files") { |
| 460 sources = gypi_values.devtools_uglify_files |
| 461 outputs = [ resources_out_dir + "UglifyJS/{{source_file_part}}" ] |
| 462 } |
| 463 |
| 464 deps = [ |
| 465 ":copy_script_formatter_worker_module_base", |
| 466 ":copy_uglify_js_files" |
| 467 ] |
| 468 } |
| 469 |
| 470 copy_debug_module("copy_sdk_module") { |
| 471 module_name = "sdk" |
| 472 imported_files = gypi_values.devtools_sdk_js_files |
| 473 } |
| 474 |
| 475 copy_debug_module("copy_settings_module") { |
| 476 module_name = "settings" |
| 477 imported_files = gypi_values.devtools_settings_js_files |
| 478 } |
| 479 |
| 480 group("copy_source_frame_module") { |
| 481 copy_debug_module("copy_source_frame_module_base") { |
| 482 module_name = "source_frame" |
| 483 imported_files = gypi_values.devtools_source_frame_js_files |
| 484 } |
| 485 |
| 486 copy("copy_codemirror_js_files") { |
| 487 sources = gypi_values.devtools_cm_js_files |
| 488 outputs = [ resources_out_dir + "cm/{{source_file_part}}" ] |
| 489 } |
| 490 |
| 491 deps = [ |
| 492 ":copy_source_frame_module_base", |
| 493 ":copy_codemirror_js_files", |
| 494 ] |
| 495 } |
| 496 |
| 497 copy_debug_module("copy_sources_module") { |
| 498 module_name = "sources" |
| 499 imported_files = gypi_values.devtools_sources_js_files |
| 500 } |
| 501 |
| 502 copy_debug_module("copy_temp_storage_shared_worker_module") { |
| 503 module_name = "temp_storage_shared_worker" |
| 504 imported_files = gypi_values.devtools_temp_storage_shared_worker_js_files |
| 505 } |
| 506 |
| 507 copy_debug_module("copy_timeline_module") { |
| 508 module_name = "timeline" |
| 509 imported_files = gypi_values.devtools_timeline_js_files |
| 510 } |
| 511 |
| 512 copy_debug_module("copy_toolbox_module") { |
| 513 module_name = "toolbox" |
| 514 imported_files = gypi_values.devtools_toolbox_js_files |
| 515 } |
| 516 |
| 517 copy_debug_module("copy_toolbox_bootstrap_module") { |
| 518 module_name = "toolbox_bootstrap" |
| 519 imported_files = gypi_values.devtools_toolbox_bootstrap_js_files |
| 520 } |
| 521 |
| 522 copy_debug_module("copy_ui_module") { |
| 523 module_name = "ui" |
| 524 imported_files = gypi_values.devtools_ui_js_files |
| 525 } |
| 526 |
| 527 copy_debug_module("copy_workspace_module") { |
| 528 module_name = "workspace" |
| 529 imported_files = gypi_values.devtools_workspace_js_files |
| 530 } |
| 531 } |
| 532 |
| 533 if (!debug_devtools) { |
| 534 # Release: Concatenate application CSS. |
| 535 template("concatenate_css") { |
| 536 assert(defined(invoker.app_name), target_name) |
| 537 app_name = invoker.app_name |
| 538 |
| 539 action(target_name) { |
| 540 script = "scripts/concatenate_css_files.py" |
| 541 |
| 542 input_stylesheet = "front_end/" + app_name + ".css" |
| 543 inputs = [ input_stylesheet ] + devtools_core_base_files |
| 544 |
| 545 outputs = [ resources_out_dir + app_name + ".css" ] |
| 546 |
| 547 args = [ rebase_path(input_stylesheet, root_build_dir) ] + |
| 548 rebase_path(outputs, root_build_dir) |
| 549 } |
| 550 } |
| 551 |
| 552 concatenate_css("concatenated_devtools_css") { |
| 553 app_name = "devtools" |
| 554 } |
| 555 |
| 556 concatenate_css("concatenated_toolbox_css") { |
| 557 app_name = "toolbox" |
| 558 } |
| 559 } |
OLD | NEW |