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

Side by Side Diff: tools/grit/grit_info.py

Issue 2375283004: Optionally compute grit inputs precisely. (Closed)
Patch Set: Remove implicit resource ids Created 4 years, 2 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
« no previous file with comments | « third_party/google_input_tools/closure.gni ('k') | tools/grit/grit_rule.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Tool to determine inputs and outputs of a grit file. 6 '''Tool to determine inputs and outputs of a grit file.
7 ''' 7 '''
8 8
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 # grit build also supports '-E KEY=VALUE', support that to share command 117 # grit build also supports '-E KEY=VALUE', support that to share command
118 # line flags. 118 # line flags.
119 parser.add_option("-E", action="append", dest="build_env", default=[]) 119 parser.add_option("-E", action="append", dest="build_env", default=[])
120 parser.add_option("-w", action="append", dest="whitelist_files", default=[]) 120 parser.add_option("-w", action="append", dest="whitelist_files", default=[])
121 parser.add_option("--output-all-resource-defines", action="store_true", 121 parser.add_option("--output-all-resource-defines", action="store_true",
122 dest="output_all_resource_defines", default=True, 122 dest="output_all_resource_defines", default=True,
123 help="Unused") 123 help="Unused")
124 parser.add_option("--no-output-all-resource-defines", action="store_false", 124 parser.add_option("--no-output-all-resource-defines", action="store_false",
125 dest="output_all_resource_defines", default=True, 125 dest="output_all_resource_defines", default=True,
126 help="Unused") 126 help="Unused")
127 parser.add_option("-f", dest="ids_file", 127 parser.add_option("-f", dest="ids_file", default="")
128 default="GRIT_DIR/../gritsettings/resource_ids")
129 parser.add_option("-t", dest="target_platform", default=None) 128 parser.add_option("-t", dest="target_platform", default=None)
130 129
131 options, args = parser.parse_args(argv) 130 options, args = parser.parse_args(argv)
132 131
133 defines = {} 132 defines = {}
134 for define in options.defines: 133 for define in options.defines:
135 name, val = util.ParseDefine(define) 134 name, val = util.ParseDefine(define)
136 defines[name] = val 135 defines[name] = val
137 136
138 for env_pair in options.build_env: 137 for env_pair in options.build_env:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 except WrongNumberOfArguments, e: 183 except WrongNumberOfArguments, e:
185 PrintUsage() 184 PrintUsage()
186 print e 185 print e
187 return 1 186 return 1
188 print result 187 print result
189 return 0 188 return 0
190 189
191 190
192 if __name__ == '__main__': 191 if __name__ == '__main__':
193 sys.exit(main(sys.argv)) 192 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « third_party/google_input_tools/closure.gni ('k') | tools/grit/grit_rule.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698