Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tools/grit/grit_rule.gni

Issue 2690263004: Add option to GRIT to provide a resource ordering input file. (Closed)
Patch Set: Removed Mac resource ordering file. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« tools/grit/grit/tool/build.py ('K') | « tools/grit/grit/tool/build.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Instantiate grit. This will produce a script target to run grit, and a 5 # Instantiate grit. This will produce a script target to run grit, and a
6 # static library that compiles the .cc files. 6 # static library that compiles the .cc files.
7 # 7 #
8 # Parameters 8 # Parameters
9 # 9 #
10 # source (required) 10 # source (required)
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 # TODO(aberent): Enable for other platforms once the build machines have 244 # TODO(aberent): Enable for other platforms once the build machines have
245 # Java on them (and hence can run the closure compiler). 245 # Java on them (and hence can run the closure compiler).
246 _strip_resource_files = is_android 246 _strip_resource_files = is_android
247 _js_minifier = "//third_party/closure_compiler/js_minify.py" 247 _js_minifier = "//third_party/closure_compiler/js_minify.py"
248 248
249 grit_resource_id_file = "//tools/gritsettings/resource_ids" 249 grit_resource_id_file = "//tools/gritsettings/resource_ids"
250 grit_info_script = "//tools/grit/grit_info.py" 250 grit_info_script = "//tools/grit/grit_info.py"
251 251
252 grit_predetermined_resource_ids_file = ""
253
254 # TODO(asvitkine): Add platform-specific resource id file paths here.
255 # http://crbug.com/692670
256
252 template("grit") { 257 template("grit") {
253 assert(defined(invoker.source), 258 assert(defined(invoker.source),
254 "\"source\" must be defined for the grit template $target_name") 259 "\"source\" must be defined for the grit template $target_name")
255 260
256 if (defined(invoker.resource_ids)) { 261 if (defined(invoker.resource_ids)) {
257 resource_ids = invoker.resource_ids 262 resource_ids = invoker.resource_ids
258 } else { 263 } else {
259 resource_ids = grit_resource_id_file 264 resource_ids = grit_resource_id_file
260 } 265 }
261 266
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 299 }
295 if (defined(invoker.grit_flags)) { 300 if (defined(invoker.grit_flags)) {
296 grit_flags += invoker.grit_flags 301 grit_flags += invoker.grit_flags
297 } 302 }
298 if (resource_ids != "") { 303 if (resource_ids != "") {
299 grit_flags += [ 304 grit_flags += [
300 "-f", 305 "-f",
301 rebase_path(resource_ids, root_build_dir), 306 rebase_path(resource_ids, root_build_dir),
302 ] 307 ]
303 } 308 }
309 if (grit_predetermined_resource_ids_file != "") {
310 grit_flags += [
311 "-p",
312 rebase_path(grit_predetermined_resource_ids_file, root_build_dir),
313 ]
314 }
304 315
305 if (defined(invoker.source_is_generated)) { 316 if (defined(invoker.source_is_generated)) {
306 source_is_generated = invoker.source_is_generated 317 source_is_generated = invoker.source_is_generated
307 } else { 318 } else {
308 source_is_generated = false 319 source_is_generated = false
309 } 320 }
310 321
311 assert_files_flags = [] 322 assert_files_flags = []
312 323
313 # We want to make sure the declared outputs actually match what Grit is 324 # We want to make sure the declared outputs actually match what Grit is
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if (defined(invoker.configs)) { 483 if (defined(invoker.configs)) {
473 configs += invoker.configs 484 configs += invoker.configs
474 } 485 }
475 486
476 if (defined(invoker.visibility)) { 487 if (defined(invoker.visibility)) {
477 visibility = invoker.visibility 488 visibility = invoker.visibility
478 } 489 }
479 output_name = grit_output_name 490 output_name = grit_output_name
480 } 491 }
481 } 492 }
OLDNEW
« tools/grit/grit/tool/build.py ('K') | « tools/grit/grit/tool/build.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698