OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Creates a resources.zip with locale.pak files placed into appropriate |
| 6 # resource configs (e.g. en-GB.pak -> res/raw-en/en_gb.pak). Also generates |
| 7 # a locale_paks TypedArray so that resource files can be enumerated at runtime. |
| 8 # |
| 9 # If this target is included in the deps of an android resources/library/apk, |
| 10 # the resources will be included with that target. |
| 11 # |
| 12 # Variables: |
| 13 # locale_pak_files - List of .pak files to process. |
| 14 # Names must be of the form "en.pak" or "en-US.pak". |
| 15 # |
| 16 # Example |
| 17 # { |
| 18 # 'target_name': 'my_locale_resources', |
| 19 # 'type': 'none', |
| 20 # 'variables': { |
| 21 # 'locale_paks_files': ['path1/fr.pak'], |
| 22 # }, |
| 23 # 'includes': [ '../build/android/locale_pak_resources.gypi' ], |
| 24 # }, |
| 25 # |
| 26 { |
| 27 'variables': { |
| 28 'resources_zip_path': '<(PRODUCT_DIR)/res.java/<(_target_name).zip', |
| 29 }, |
| 30 'all_dependent_settings': { |
| 31 'variables': { |
| 32 'additional_input_paths': ['<(resources_zip_path)'], |
| 33 'dependencies_res_zip_paths': ['<(resources_zip_path)'], |
| 34 }, |
| 35 }, |
| 36 'actions': [{ |
| 37 'action_name': '<(_target_name)_locale_pak_resources', |
| 38 'inputs': [ |
| 39 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 40 '<(DEPTH)/build/android/gyp/locale_pak_resources.py', |
| 41 '<@(locale_pak_files)', |
| 42 ], |
| 43 'outputs': [ |
| 44 '<(resources_zip_path)', |
| 45 ], |
| 46 'action': [ |
| 47 'python', '<(DEPTH)/build/android/gyp/locale_pak_resources.py', |
| 48 '--locale-paks', '<(locale_pak_files)', |
| 49 '--resources-zip', '<(resources_zip_path)', |
| 50 ], |
| 51 }], |
| 52 } |
OLD | NEW |