diff options
author | aurimas@chromium.org <aurimas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:52:22 +0000 |
---|---|---|
committer | aurimas@chromium.org <aurimas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:52:22 +0000 |
commit | e4fdab96e6b0afa5191d594261dc0b6b74af3059 (patch) | |
tree | f089d7338b0241587889349989b5d9172861bd47 /chrome/tools | |
parent | 52b947706a2dfb230fe098daceddd0ca0b7fbb7d (diff) | |
download | chromium_src-e4fdab96e6b0afa5191d594261dc0b6b74af3059.zip chromium_src-e4fdab96e6b0afa5191d594261dc0b6b74af3059.tar.gz chromium_src-e4fdab96e6b0afa5191d594261dc0b6b74af3059.tar.bz2 |
Add whitelist support for grit repack steps.
-Adds new repack_options variables
-Updates pragma to output numeric_id instead of resource_id
-Updates find_used_resources.py to filter for numeric_id
To use the existing system you need to do following steps:
1. Remove out directory (we need to do a clean build)
2. Append " enable_resource_whitelist_generation=1" to GYP_DEFINES
3. Run gyp
4. Build your target (e.g. chrome_shell_apk) saving output to a file
(e.g. build.txt)
5. cat build.txt | tools/resources/find_used_resources.py > whitelist.txt
6. Append " repack_options='--whitelist /path/to/whitelist.txt'"
7. Run gyp
8. Build your target again.
9. ???
10. Profit!!!
BUG=338759
Review URL: https://codereview.chromium.org/216233012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-x | chrome/tools/build/repack_locales.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/tools/build/repack_locales.py b/chrome/tools/build/repack_locales.py index 96f47eb..6dbcef5 100755 --- a/chrome/tools/build/repack_locales.py +++ b/chrome/tools/build/repack_locales.py @@ -31,6 +31,8 @@ OS = None USE_ASH = False +WHITELIST = None + # Extra input files. EXTRA_INPUT_FILES = [] @@ -153,7 +155,7 @@ def repack_locales(locales): inputs = [] inputs += calc_inputs(locale) output = calc_output(locale) - data_pack.DataPack.RePack(output, inputs) + data_pack.DataPack.RePack(output, inputs, whitelist_file=WHITELIST) def DoMain(argv): @@ -163,6 +165,7 @@ def DoMain(argv): global INT_DIR global OS global USE_ASH + global WHITELIST global EXTRA_INPUT_FILES parser = optparse.OptionParser("usage: %prog [options] locales") @@ -185,6 +188,8 @@ def DoMain(argv): help="The target OS. (e.g. mac, linux, win, etc.)") parser.add_option("--use-ash", action="store", dest="use_ash", help="Whether to include ash strings") + parser.add_option("--whitelist", action="store", help="Full path to the " + "whitelist used to filter output pak file resource IDs") options, locales = parser.parse_args(argv) if not locales: @@ -199,6 +204,7 @@ def DoMain(argv): EXTRA_INPUT_FILES = options.extra_input OS = options.os USE_ASH = options.use_ash == '1' + WHITELIST = options.whitelist if not OS: if sys.platform == 'darwin': |