diff options
-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:]) |