OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 fileinput | 5 import fileinput |
6 import glob | 6 import glob |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import textwrap | 9 import textwrap |
10 | 10 |
11 | 11 |
| 12 # TODO(brettw) bug 535386: This should not take a directory as an input, but |
| 13 # rather a response file listing the inputs or sometimes the build will be |
| 14 # incorrect. |
| 15 |
12 def AggregateVectorIcons(working_directory, output_cc, output_h): | 16 def AggregateVectorIcons(working_directory, output_cc, output_h): |
13 """Compiles all .icon files in a directory into two C++ files. | 17 """Compiles all .icon files in a directory into two C++ files. |
14 | 18 |
15 Args: | 19 Args: |
16 working_directory: The path to the directory that holds the .icon files | 20 working_directory: The path to the directory that holds the .icon files |
17 and C++ templates. | 21 and C++ templates. |
18 output_cc: The path that should be used to write the .cc file. | 22 output_cc: The path that should be used to write the .cc file. |
19 output_h: The path that should be used to write the .h file. | 23 output_h: The path that should be used to write the .h file. |
20 """ | 24 """ |
21 | 25 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 81 |
78 (options, args) = parser.parse_args() | 82 (options, args) = parser.parse_args() |
79 | 83 |
80 AggregateVectorIcons(options.working_directory, | 84 AggregateVectorIcons(options.working_directory, |
81 options.output_cc, | 85 options.output_cc, |
82 options.output_h) | 86 options.output_h) |
83 | 87 |
84 | 88 |
85 if __name__ == "__main__": | 89 if __name__ == "__main__": |
86 main() | 90 main() |
OLD | NEW |