| 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 resources to generate R.java, and prepare for packaging. | 7 """Process Android resources to generate R.java, and prepare for packaging. |
| 8 | 8 |
| 9 This will crunch images and generate v14 compatible resources | 9 This will crunch images and generate v14 compatible resources |
| 10 (see generate_v14_compatible_resources.py). | 10 (see generate_v14_compatible_resources.py). |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 package_command.append('--shared-lib') | 400 package_command.append('--shared-lib') |
| 401 if options.app_as_shared_lib: | 401 if options.app_as_shared_lib: |
| 402 package_command.append('--app-as-shared-lib') | 402 package_command.append('--app-as-shared-lib') |
| 403 build_utils.CheckOutput(package_command, print_stderr=False) | 403 build_utils.CheckOutput(package_command, print_stderr=False) |
| 404 | 404 |
| 405 if options.extra_res_packages: | 405 if options.extra_res_packages: |
| 406 CreateExtraRJavaFiles( | 406 CreateExtraRJavaFiles( |
| 407 gen_dir, | 407 gen_dir, |
| 408 options.extra_res_packages, | 408 options.extra_res_packages, |
| 409 options.extra_r_text_files, | 409 options.extra_r_text_files, |
| 410 options.shared_resources, | 410 options.shared_resources or options.app_as_shared_lib, |
| 411 options.include_all_resources) | 411 options.include_all_resources) |
| 412 | 412 |
| 413 # This is the list of directories with resources to put in the final .zip | 413 # This is the list of directories with resources to put in the final .zip |
| 414 # file. The order of these is important so that crunched/v14 resources | 414 # file. The order of these is important so that crunched/v14 resources |
| 415 # override the normal ones. | 415 # override the normal ones. |
| 416 zip_resource_dirs = input_resource_dirs + [v14_dir] | 416 zip_resource_dirs = input_resource_dirs + [v14_dir] |
| 417 | 417 |
| 418 base_crunch_dir = os.path.join(temp_dir, 'crunch') | 418 base_crunch_dir = os.path.join(temp_dir, 'crunch') |
| 419 | 419 |
| 420 # Crunch image resources. This shrinks png files and is necessary for | 420 # Crunch image resources. This shrinks png files and is necessary for |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 options, | 485 options, |
| 486 input_paths=input_paths, | 486 input_paths=input_paths, |
| 487 input_strings=input_strings, | 487 input_strings=input_strings, |
| 488 output_paths=output_paths, | 488 output_paths=output_paths, |
| 489 # TODO(agrieve): Remove R_dir when it's no longer used (used only by GYP). | 489 # TODO(agrieve): Remove R_dir when it's no longer used (used only by GYP). |
| 490 force=options.R_dir) | 490 force=options.R_dir) |
| 491 | 491 |
| 492 | 492 |
| 493 if __name__ == '__main__': | 493 if __name__ == '__main__': |
| 494 main(sys.argv[1:]) | 494 main(sys.argv[1:]) |
| OLD | NEW |