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 | 6 |
7 gypi_values = exec_script("//build/gypi_to_gn.py", | 7 gypi_values = exec_script("//build/gypi_to_gn.py", |
8 [ rebase_path("devtools.gypi") ], | 8 [ rebase_path("devtools.gypi") ], |
9 "scope", | 9 "scope", |
10 [ "devtools.gypi" ]) | 10 [ "devtools.gypi" ]) |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 resources_out_dir + "emulated_devices/{{source_file_part}}", | 114 resources_out_dir + "emulated_devices/{{source_file_part}}", |
115 ] | 115 ] |
116 } | 116 } |
117 | 117 |
118 action("generate_devtools_grd") { | 118 action("generate_devtools_grd") { |
119 script = "scripts/generate_devtools_grd.py" | 119 script = "scripts/generate_devtools_grd.py" |
120 | 120 |
121 deps = [ | 121 deps = [ |
122 ":devtools_frontend_resources", | 122 ":devtools_frontend_resources", |
123 ] | 123 ] |
124 static_files_list = "$target_gen_dir/devtools_static_grd_files.tmp" | |
125 inputs = gypi_values.devtools_image_files + all_devtools_files | 124 inputs = gypi_values.devtools_image_files + all_devtools_files |
126 inputs += gypi_values.devtools_compatibility_scripts | 125 inputs += gypi_values.devtools_compatibility_scripts |
127 inputs += [ static_files_list ] | |
128 | |
129 static_files = [] | |
130 | 126 |
131 if (debug_devtools) { | 127 if (debug_devtools) { |
132 # Debug: all files are picked as-is. | 128 # Debug: all files are picked as-is. |
133 generated_files = generated_scripts + [ | 129 generated_files = generated_scripts + [ |
134 resources_out_dir + "inspector.html", | 130 resources_out_dir + "inspector.html", |
135 resources_out_dir + "toolbox.html", | 131 resources_out_dir + "toolbox.html", |
136 ] | 132 ] |
137 static_files += all_devtools_files + [ "front_end/Runtime.js" ] | 133 |
| 134 # Use a response file since the static files can be too long for the |
| 135 # command line. The args here will be added to the command line. |
| 136 static_files = all_devtools_files + [ "front_end/Runtime.js" ] |
| 137 response_file_contents = rebase_path(static_files, root_build_dir) |
| 138 static_files_args = [ |
| 139 "--static_files_args", |
| 140 "{{response_file_name}}", |
| 141 ] |
138 } else { | 142 } else { |
139 # Release: pick compiled non-remote files and lazy-loaded CSS. | 143 # Release: pick compiled non-remote files and lazy-loaded CSS. |
140 generated_files = [ | 144 generated_files = [ |
141 resources_out_dir + "inspector.css", | 145 resources_out_dir + "inspector.css", |
142 resources_out_dir + "inspector.html", | 146 resources_out_dir + "inspector.html", |
143 resources_out_dir + "inspector.js", | 147 resources_out_dir + "inspector.js", |
144 resources_out_dir + "toolbox.css", | 148 resources_out_dir + "toolbox.css", |
145 resources_out_dir + "toolbox.html", | 149 resources_out_dir + "toolbox.html", |
146 resources_out_dir + "toolbox.js", | 150 resources_out_dir + "toolbox.js", |
147 resources_out_dir + "accessibility_module.js", | 151 resources_out_dir + "accessibility_module.js", |
(...skipping 14 matching lines...) Expand all Loading... |
162 resources_out_dir + "script_formatter_worker_module.js", | 166 resources_out_dir + "script_formatter_worker_module.js", |
163 resources_out_dir + "settings_module.js", | 167 resources_out_dir + "settings_module.js", |
164 resources_out_dir + "snippets_module.js", | 168 resources_out_dir + "snippets_module.js", |
165 resources_out_dir + "source_frame_module.js", | 169 resources_out_dir + "source_frame_module.js", |
166 resources_out_dir + "sources_module.js", | 170 resources_out_dir + "sources_module.js", |
167 resources_out_dir + "temp_storage_shared_worker_module.js", | 171 resources_out_dir + "temp_storage_shared_worker_module.js", |
168 resources_out_dir + "timeline_module.js", | 172 resources_out_dir + "timeline_module.js", |
169 resources_out_dir + "ui_lazy_module.js", | 173 resources_out_dir + "ui_lazy_module.js", |
170 resources_out_dir + "devtools_extension_api.js", | 174 resources_out_dir + "devtools_extension_api.js", |
171 ] | 175 ] |
| 176 static_files_args = [] # Nothing needed for this |
172 } | 177 } |
173 | 178 |
174 write_file(static_files_list, rebase_path(static_files, root_build_dir)) | |
175 images_path = "front_end/Images" | 179 images_path = "front_end/Images" |
176 | 180 |
177 inputs += generated_files | 181 inputs += generated_files |
178 | 182 |
179 outfile = "$root_gen_dir/devtools/devtools_resources.grd" | 183 outfile = "$root_gen_dir/devtools/devtools_resources.grd" |
180 outputs = [ | 184 outputs = [ |
181 outfile, | 185 outfile, |
182 ] | 186 ] |
183 | 187 |
184 relative_path_dirs = [ | 188 relative_path_dirs = [ |
185 resources_out_dir_no_slash, | 189 resources_out_dir_no_slash, |
186 "front_end", | 190 "front_end", |
187 ] | 191 ] |
188 | 192 |
189 args = | 193 args = |
190 rebase_path(generated_files, root_build_dir) + | 194 rebase_path(generated_files, root_build_dir) + |
191 rebase_path(generated_files, root_build_dir) + | 195 rebase_path(generated_files, root_build_dir) + |
192 rebase_path(gypi_values.devtools_compatibility_scripts, root_build_dir) + | 196 rebase_path(gypi_values.devtools_compatibility_scripts, root_build_dir) + |
193 [ | 197 static_files_args + [ "--relative_path_dirs" ] + |
194 "--static_files_list", | 198 rebase_path(relative_path_dirs, root_build_dir) + |
195 rebase_path(static_files_list, root_build_dir), | |
196 "--relative_path_dirs", | |
197 ] + rebase_path(relative_path_dirs, root_build_dir) + | |
198 [ | 199 [ |
199 "--images", | 200 "--images", |
200 rebase_path(images_path, root_build_dir), | 201 rebase_path(images_path, root_build_dir), |
201 "--output", | 202 "--output", |
202 rebase_path(outfile, root_build_dir), | 203 rebase_path(outfile, root_build_dir), |
203 ] | 204 ] |
204 } | 205 } |
205 | 206 |
206 action("devtools_extension_api") { | 207 action("devtools_extension_api") { |
207 script = "scripts/generate_devtools_extension_api.py" | 208 script = "scripts/generate_devtools_extension_api.py" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 376 } |
376 | 377 |
377 concatenate_css("concatenated_inspector_css") { | 378 concatenate_css("concatenated_inspector_css") { |
378 app_name = "inspector" | 379 app_name = "inspector" |
379 } | 380 } |
380 | 381 |
381 concatenate_css("concatenated_toolbox_css") { | 382 concatenate_css("concatenated_toolbox_css") { |
382 app_name = "toolbox" | 383 app_name = "toolbox" |
383 } | 384 } |
384 } | 385 } |
OLD | NEW |