OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Process Android library resources to generate R.java and crunched images.""" | 7 """Process Android library resources to generate R.java and crunched images.""" |
8 | 8 |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
11 import shlex | 11 import shlex |
12 import shutil | 12 import shutil |
13 | 13 |
14 from util import build_utils | 14 from util import build_utils # pylint: disable=F0401 |
15 | 15 |
16 def ParseArgs(): | 16 def ParseArgs(): |
17 """Parses command line options. | 17 """Parses command line options. |
18 | 18 |
19 Returns: | 19 Returns: |
20 An options object as from optparse.OptionsParser.parse_args() | 20 An options object as from optparse.OptionsParser.parse_args() |
21 """ | 21 """ |
22 parser = optparse.OptionParser() | 22 parser = optparse.OptionParser() |
23 parser.add_option('--android-sdk', help='path to the Android SDK folder') | 23 parser.add_option('--android-sdk', help='path to the Android SDK folder') |
24 parser.add_option('--android-sdk-tools', | 24 parser.add_option('--android-sdk-tools', |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 build_utils.CheckOutput(aapt_cmd, fail_if_stderr=True) | 116 build_utils.CheckOutput(aapt_cmd, fail_if_stderr=True) |
117 | 117 |
118 MoveImagesToNonMdpiFolders(options.crunch_output_dir) | 118 MoveImagesToNonMdpiFolders(options.crunch_output_dir) |
119 | 119 |
120 if options.stamp: | 120 if options.stamp: |
121 build_utils.Touch(options.stamp) | 121 build_utils.Touch(options.stamp) |
122 | 122 |
123 | 123 |
124 if __name__ == '__main__': | 124 if __name__ == '__main__': |
125 main() | 125 main() |
OLD | NEW |