Commit 0972da02 authored by mark@chromium.org's avatar mark@chromium.org

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
parent 56c66f21
...@@ -1348,6 +1348,77 @@ ...@@ -1348,6 +1348,77 @@
'conditions': [ 'conditions': [
['OS=="mac"', {'product_name': 'Chromium'}], ['OS=="mac"', {'product_name': 'Chromium'}],
['OS!="win"', { ['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!': [ 'sources!': [
'app/breakpad.cc', 'app/breakpad.cc',
'app/chrome_exe_main.cc', 'app/chrome_exe_main.cc',
......
...@@ -30,9 +30,9 @@ def RePack(output_file, input_files): ...@@ -30,9 +30,9 @@ def RePack(output_file, input_files):
data_pack.WriteDataPack(resources, output_file) data_pack.WriteDataPack(resources, output_file)
def main(argv): def main(argv):
if len(argv) < 4: if len(argv) < 3:
print ("Usage:\n %s <output_filename> <input_file1> <input_file2> " print ("Usage:\n %s <output_filename> <input_file1> [input_file2] ... " %
"[input_file3] ..." % argv[0]) argv[0])
sys.exit(-1) sys.exit(-1)
RePack(argv[1], argv[2:]) RePack(argv[1], argv[2:])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment