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 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 # generated by merging the resources from all libraries and the main apk | 56 # generated by merging the resources from all libraries and the main apk |
57 # project. | 57 # project. |
58 subprocess.check_call([aapt, | 58 subprocess.check_call([aapt, |
59 'package', | 59 'package', |
60 '-m', | 60 '-m', |
61 '--non-constant-id', | 61 '--non-constant-id', |
62 '--custom-package', options.R_package, | 62 '--custom-package', options.R_package, |
63 '-M', dummy_manifest, | 63 '-M', dummy_manifest, |
64 '-S', options.res_dir, | 64 '-S', options.res_dir, |
65 '-I', android_jar, | 65 '-I', android_jar, |
| 66 '--output-text-symbols', options.R_dir, |
66 '-J', options.R_dir]) | 67 '-J', options.R_dir]) |
67 | 68 |
68 # Crunch image resources. This shrinks png files and is necessary for 9-patch | 69 # Crunch image resources. This shrinks png files and is necessary for 9-patch |
69 # images to display correctly. | 70 # images to display correctly. |
70 subprocess.check_call([aapt, | 71 subprocess.check_call([aapt, |
71 'crunch', | 72 'crunch', |
72 '-S', options.res_dir, | 73 '-S', options.res_dir, |
73 '-C', options.crunched_res_dir]) | 74 '-C', options.crunched_res_dir]) |
74 | 75 |
75 | 76 |
76 if __name__ == '__main__': | 77 if __name__ == '__main__': |
77 main() | 78 main() |
OLD | NEW |