2 # Copyright (C) 2013 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
14 # * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 'target_name': 'devtools_frontend_resources',
40 'supported_css_properties',
41 'frontend_protocol_sources',
45 ['debug_devtools==0', {
47 'concatenated_inspector_css',
48 'concatenated_toolbox_css',
54 'destination': '<(PRODUCT_DIR)/resources/inspector/Images',
56 '<@(devtools_image_files)',
60 'destination': '<(PRODUCT_DIR)/resources/inspector/emulated_devices',
62 '<@(devtools_emulated_devices_images)',
66 'destination': '<(PRODUCT_DIR)/resources/inspector/',
68 '<@(devtools_compatibility_scripts)',
74 'target_name': 'devtools_extension_api',
77 'action_name': 'devtools_extension_api',
78 'script_name': 'scripts/generate_devtools_extension_api.py',
81 '<@(devtools_extension_api_files)',
83 'outputs': ['<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js'],
84 'action': ['python', '<@(_script_name)', '<@(_outputs)', '<@(devtools_extension_api_files)'],
88 'target_name': 'generate_devtools_grd',
91 'devtools_extension_api',
92 'devtools_frontend_resources',
95 ['debug_devtools==0', {
97 'action_name': 'generate_devtools_grd',
98 'script_name': 'scripts/generate_devtools_grd.py',
99 'relative_path_dirs': [
100 '<(PRODUCT_DIR)/resources/inspector',
104 # Intentionally empty. Should get rebuilt when switching from debug_devtools==1.
106 'devtools_static_files_list': '<|(devtools_static_grd_files.tmp <@(_static_files))',
108 # Core and remote modules should not be listed here.
109 '<(PRODUCT_DIR)/resources/inspector/inspector.css',
110 '<(PRODUCT_DIR)/resources/inspector/inspector.html',
111 '<(PRODUCT_DIR)/resources/inspector/inspector.js',
112 '<(PRODUCT_DIR)/resources/inspector/toolbox.css',
113 '<(PRODUCT_DIR)/resources/inspector/toolbox.html',
114 '<(PRODUCT_DIR)/resources/inspector/toolbox.js',
115 '<(PRODUCT_DIR)/resources/inspector/accessibility_module.js',
116 '<(PRODUCT_DIR)/resources/inspector/animation_module.js',
117 '<(PRODUCT_DIR)/resources/inspector/audits_module.js',
118 '<(PRODUCT_DIR)/resources/inspector/components_lazy_module.js',
119 '<(PRODUCT_DIR)/resources/inspector/console_module.js',
120 '<(PRODUCT_DIR)/resources/inspector/devices_module.js',
121 '<(PRODUCT_DIR)/resources/inspector/diff_module.js',
122 '<(PRODUCT_DIR)/resources/inspector/elements_module.js',
123 '<(PRODUCT_DIR)/resources/inspector/heap_snapshot_worker_module.js',
124 '<(PRODUCT_DIR)/resources/inspector/layers_module.js',
125 '<(PRODUCT_DIR)/resources/inspector/network_module.js',
126 '<(PRODUCT_DIR)/resources/inspector/profiler_module.js',
127 '<(PRODUCT_DIR)/resources/inspector/promises_module.js',
128 '<(PRODUCT_DIR)/resources/inspector/resources_module.js',
129 '<(PRODUCT_DIR)/resources/inspector/security_module.js',
130 '<(PRODUCT_DIR)/resources/inspector/script_formatter_worker_module.js',
131 '<(PRODUCT_DIR)/resources/inspector/settings_module.js',
132 '<(PRODUCT_DIR)/resources/inspector/snippets_module.js',
133 '<(PRODUCT_DIR)/resources/inspector/source_frame_module.js',
134 '<(PRODUCT_DIR)/resources/inspector/sources_module.js',
135 '<(PRODUCT_DIR)/resources/inspector/temp_storage_shared_worker_module.js',
136 '<(PRODUCT_DIR)/resources/inspector/timeline_module.js',
137 '<(PRODUCT_DIR)/resources/inspector/ui_lazy_module.js',
138 '<(PRODUCT_DIR)/resources/inspector/devtools_extension_api.js',
143 '<@(devtools_compatibility_scripts)',
144 '<@(_generated_files)',
145 '<@(devtools_image_files)',
146 '<(_devtools_static_files_list)',
151 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
152 'action': ['python', '<@(_script_name)', '<@(_generated_files)', '<@(devtools_compatibility_scripts)', '--static_files_list', '<(_devtools_static_files_list)', '--relative_path_dirs', '<@(_relative_path_dirs)', '--images', '<@(_images_path)', '--output', '<@(_outputs)'],
156 # If we're not concatenating devtools files, we want to
157 # run after the original files have been copied to
158 # <(PRODUCT_DIR)/resources/inspector.
159 'dependencies': ['devtools_frontend_resources'],
161 'action_name': 'generate_devtools_grd',
162 'script_name': 'scripts/generate_devtools_grd.py',
163 'relative_path_dirs': [
165 '<(PRODUCT_DIR)/resources/inspector',
168 '<@(all_devtools_files)',
169 'front_end/Runtime.js',
171 'devtools_static_files_list': '<|(devtools_static_grd_files.tmp <@(_static_files))',
173 '<(PRODUCT_DIR)/resources/inspector/InspectorBackendCommands.js',
174 '<(PRODUCT_DIR)/resources/inspector/SupportedCSSProperties.js',
175 '<(PRODUCT_DIR)/resources/inspector/inspector.html',
176 '<(PRODUCT_DIR)/resources/inspector/toolbox.html',
181 '<@(devtools_compatibility_scripts)',
182 '<@(_generated_files)',
183 '<@(devtools_image_files)',
184 '<(_devtools_static_files_list)',
189 # Note that other files are put under /devtools directory, together with declared devtools_resources.grd
190 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd'],
191 'action': ['python', '<@(_script_name)', '<@(_generated_files)', '<@(devtools_compatibility_scripts)', '--static_files_list', '<(_devtools_static_files_list)', '--relative_path_dirs', '<@(_relative_path_dirs)', '--images', '<@(_images_path)', '--output', '<@(_outputs)'],
197 'target_name': 'frontend_protocol_sources',
201 'action_name': 'generateInspectorProtocolFrontendSources',
203 # The python script in action below.
204 'scripts/CodeGeneratorFrontend.py',
205 # Input file for the script.
209 '<(PRODUCT_DIR)/resources/inspector/InspectorBackendCommands.js',
213 'scripts/CodeGeneratorFrontend.py',
215 '--output_js_dir', '<(PRODUCT_DIR)/resources/inspector/',
217 'message': 'Generating Inspector protocol frontend sources from protocol.json',
222 'target_name': 'supported_css_properties',
226 'action_name': 'generateSupportedCSSProperties',
228 # The python script in action below.
229 'scripts/generate_supported_css.py',
230 # Input files for the script.
231 '../core/css/CSSProperties.in',
234 '<(PRODUCT_DIR)/resources/inspector/SupportedCSSProperties.js',
241 'message': 'Generating supported CSS properties for front end',
246 # Frontend applications and modules.
248 'target_name': 'build_applications',
251 'supported_css_properties',
252 'frontend_protocol_sources',
254 'output_path': '<(PRODUCT_DIR)/resources/inspector/',
256 'action_name': 'build_applications',
257 'script_name': 'scripts/build_applications.py',
259 'scripts/modular_build.py',
260 'scripts/concatenate_application_code.py',
264 '<@(_helper_scripts)',
265 '<@(all_devtools_files)',
266 'front_end/inspector.html',
267 'front_end/toolbox.html',
268 '<(_output_path)/InspectorBackendCommands.js',
269 '<(_output_path)/SupportedCSSProperties.js',
271 'action': ['python', '<@(_script_name)', 'inspector', 'toolbox', '--input_path', 'front_end', '--output_path', '<@(_output_path)', '--debug', '<@(debug_devtools)'],
273 ['debug_devtools==0', { # Release
275 '<(_output_path)/inspector.html',
276 '<(_output_path)/inspector.js',
277 '<(_output_path)/toolbox.html',
278 '<(_output_path)/toolbox.js',
279 '<(_output_path)/accessibility_module.js',
280 '<(_output_path)/animation_module.js',
281 '<(_output_path)/audits_module.js',
282 '<(_output_path)/cm_modes_module.js',
283 '<(_output_path)/components_lazy_module.js',
284 '<(_output_path)/console_module.js',
285 '<(_output_path)/devices_module.js',
286 '<(_output_path)/diff_module.js',
287 '<(_output_path)/elements_module.js',
288 '<(_output_path)/emulated_devices_module.js',
289 '<(_output_path)/heap_snapshot_worker_module.js',
290 '<(_output_path)/layers_module.js',
291 '<(_output_path)/network_module.js',
292 '<(_output_path)/profiler_module.js',
293 '<(_output_path)/promises_module.js',
294 '<(_output_path)/resources_module.js',
295 '<(_output_path)/security_module.js',
296 '<(_output_path)/screencast_module.js',
297 '<(_output_path)/script_formatter_worker_module.js',
298 '<(_output_path)/settings_module.js',
299 '<(_output_path)/snippets_module.js',
300 '<(_output_path)/source_frame_module.js',
301 '<(_output_path)/sources_module.js',
302 '<(_output_path)/temp_storage_shared_worker_module.js',
303 '<(_output_path)/timeline_module.js',
304 '<(_output_path)/ui_lazy_module.js',
309 '<(_output_path)/inspector.html',
310 '<(_output_path)/toolbox.html',
316 ['debug_devtools==0', { # Release
319 # Copy runtime core and non-module directories here.
322 'destination': '<(_output_path)',
324 '<@(devtools_core_base_files)',
325 '<@(devtools_core_css_files)',
329 'destination': '<(_output_path)/acorn',
331 '<@(devtools_acorn_files)',
335 'destination': '<(_output_path)/cm',
337 '<@(devtools_cm_js_files)',
338 '<@(devtools_cm_css_files)',
347 ['debug_devtools==0', {
350 'target_name': 'concatenated_inspector_css',
353 'action_name': 'concatenate_inspector_css',
354 'script_name': 'scripts/concatenate_css_files.py',
355 'input_stylesheet': 'front_end/inspector.css',
358 '<@(_input_stylesheet)',
359 '<@(devtools_core_css_files)',
361 'search_path': [ 'front_end' ],
362 'outputs': ['<(PRODUCT_DIR)/resources/inspector/inspector.css'],
363 'action': ['python', '<@(_script_name)', '<@(_input_stylesheet)', '<@(_outputs)'],
367 'target_name': 'concatenated_toolbox_css',
370 'action_name': 'concatenate_toolbox_css',
371 'script_name': 'scripts/concatenate_css_files.py',
372 'input_stylesheet': 'front_end/toolbox.css',
375 '<@(_input_stylesheet)',
376 '<@(devtools_core_css_files)',
378 'search_path': [ 'front_end' ],
379 'outputs': ['<(PRODUCT_DIR)/resources/inspector/toolbox.css'],
380 'action': ['python', '<@(_script_name)', '<@(_input_stylesheet)', '<@(_outputs)'],