diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 17:52:47 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 17:52:47 +0000 |
commit | 0972da02b5c92fcaa3b52343f76663aa622ffa69 (patch) | |
tree | 9071964724c9fd0684e0cc54c3e90715fe2230ea | |
parent | 56c66f21ef57db319f453499d3bf1442e5a0455c (diff) | |
download | chromium_src-0972da02b5c92fcaa3b52343f76663aa622ffa69.zip chromium_src-0972da02b5c92fcaa3b52343f76663aa622ffa69.tar.gz chromium_src-0972da02b5c92fcaa3b52343f76663aa622ffa69.tar.bz2 |
Handle repack.py and .pak files in the GYP-based build.
Review URL: http://codereview.chromium.org/27216
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10478 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome.gyp | 71 | ||||
-rwxr-xr-x | tools/data_pack/repack.py | 6 |
2 files changed, 74 insertions, 3 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 9a0d721..e813fd6 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1348,6 +1348,77 @@ 'conditions': [ ['OS=="mac"', {'product_name': 'Chromium'}], ['OS!="win"', { + 'variables': { + 'repack_path': '../tools/data_pack/repack.py', + }, + 'actions': [ + { + 'action_name': 'repack_chrome', + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/debugger_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/chrome.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'process_outputs_as_mac_bundle_resources': 1, + }, + { + 'action_name': 'repack_theme', + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/chrome/theme_resources.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/theme.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'process_outputs_as_mac_bundle_resources': 1, + }, + { + # TODO(mark): Make this work with more languages than the + # hardcoded en-US. + 'action_name': 'repack_locale', + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/chrome/generated_resources_en-US.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/chromium_strings_en-US.pak', + '<(SHARED_INTERMEDIATE_DIR)/chrome/locale_settings_en-US.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'conditions': [ + ['OS=="mac"', { + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/English.lproj/locale.pak', + ], + }, { # else: OS!="mac" + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/locale_en-US.pak', + ], + }], + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'process_outputs_as_mac_bundle_resources': 1, + }, + ], 'sources!': [ 'app/breakpad.cc', 'app/chrome_exe_main.cc', diff --git a/tools/data_pack/repack.py b/tools/data_pack/repack.py index 5d7a344..21f568d 100755 --- a/tools/data_pack/repack.py +++ b/tools/data_pack/repack.py @@ -30,9 +30,9 @@ def RePack(output_file, input_files): data_pack.WriteDataPack(resources, output_file) def main(argv): - if len(argv) < 4: - print ("Usage:\n %s <output_filename> <input_file1> <input_file2> " - "[input_file3] ..." % argv[0]) + if len(argv) < 3: + print ("Usage:\n %s <output_filename> <input_file1> [input_file2] ... " % + argv[0]) sys.exit(-1) RePack(argv[1], argv[2:]) |