diff options
-rw-r--r-- | android_webview/android_webview.gyp | 14 | ||||
-rw-r--r-- | apps/apps.gypi | 14 | ||||
-rw-r--r-- | build/repack_action.gypi | 23 | ||||
-rw-r--r-- | chrome/chrome.gyp | 1 | ||||
-rw-r--r-- | chrome/chrome_dll_bundle.gypi | 1 | ||||
-rw-r--r-- | chrome/chrome_repack_chrome_100_percent.gypi | 10 | ||||
-rw-r--r-- | chrome/chrome_repack_chrome_200_percent.gypi | 10 | ||||
-rw-r--r-- | chrome/chrome_repack_locales.gypi | 21 | ||||
-rw-r--r-- | chrome/chrome_repack_pseudo_locales.gypi | 40 | ||||
-rw-r--r-- | chrome/chrome_repack_resources.gypi | 10 | ||||
-rw-r--r-- | chrome/chrome_resources.gyp | 17 | ||||
-rw-r--r-- | components/components_tests.gyp | 12 | ||||
-rw-r--r-- | content/content_shell.gypi | 38 | ||||
-rw-r--r-- | ui/resources/ui_resources.gyp | 18 |
14 files changed, 70 insertions, 159 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp index e2c1eab..ef872cc 100644 --- a/android_webview/android_webview.gyp +++ b/android_webview/android_webview.gyp @@ -51,9 +51,6 @@ '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources', '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', ], - 'variables': { - 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', - }, 'actions': [ { 'action_name': 'repack_android_webview_pack', @@ -65,16 +62,9 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', ], + 'pak_output': '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak', }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', - '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], } ], }, diff --git a/apps/apps.gypi b/apps/apps.gypi index bead5d8..9a295bf 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -117,9 +117,6 @@ '../ui/base/strings/ui_strings.gyp:ui_strings', '../ui/resources/ui_resources.gyp:ui_resources', ], - 'variables': { - 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', - }, 'actions': [ { 'action_name': 'repack_app_shell_pack', @@ -139,16 +136,9 @@ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', ], + 'pak_output': '<(PRODUCT_DIR)/app_shell.pak', }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/app_shell.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', - '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], }, ], }, diff --git a/build/repack_action.gypi b/build/repack_action.gypi new file mode 100644 index 0000000..e4bbf68 --- /dev/null +++ b/build/repack_action.gypi @@ -0,0 +1,23 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is meant to be included into an action to invoke grit repack in a +# consistent manner. To use this the following variables need to be +# defined: +# pak_inputs: list: paths of pak files that need to be combined. +# pak_output: string: the output pak file path. + +{ + 'variables': { + 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(pak_output)' + ], + 'action': ['python', '<(repack_path)', '<(pak_output)', '<@(pak_inputs)'], +} diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 6eb4f14..97a3b4c 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -22,7 +22,6 @@ 'allocator_target': '../base/allocator/allocator.gyp:allocator', 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome', 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', - 'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'], 'conditions': [ ['OS!="ios"', { 'chromium_browser_dependencies': [ diff --git a/chrome/chrome_dll_bundle.gypi b/chrome/chrome_dll_bundle.gypi index a4b6d6c..33aeb42 100644 --- a/chrome/chrome_dll_bundle.gypi +++ b/chrome/chrome_dll_bundle.gypi @@ -108,7 +108,6 @@ }], ], 'libpeer_target_type%': 'static_library', - 'repack_path': '../tools/grit/grit/format/repack.py', }, 'postbuilds': [ { diff --git a/chrome/chrome_repack_chrome_100_percent.gypi b/chrome/chrome_repack_chrome_100_percent.gypi index c07e38a..b644df6 100644 --- a/chrome/chrome_repack_chrome_100_percent.gypi +++ b/chrome/chrome_repack_chrome_100_percent.gypi @@ -10,6 +10,7 @@ '<(grit_out_dir)/renderer_resources_100_percent.pak', '<(grit_out_dir)/theme_resources_100_percent.pak', ], + 'pak_output': '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', 'conditions': [ ['OS != "ios"', { 'pak_inputs': [ @@ -23,12 +24,5 @@ }], ], }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], } diff --git a/chrome/chrome_repack_chrome_200_percent.gypi b/chrome/chrome_repack_chrome_200_percent.gypi index c9d7e58..ccd1de2 100644 --- a/chrome/chrome_repack_chrome_200_percent.gypi +++ b/chrome/chrome_repack_chrome_200_percent.gypi @@ -10,6 +10,7 @@ '<(grit_out_dir)/renderer_resources_200_percent.pak', '<(grit_out_dir)/theme_resources_200_percent.pak', ], + 'pak_output': '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', 'conditions': [ ['OS != "ios"', { 'pak_inputs': [ @@ -23,12 +24,5 @@ }], ], }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], } diff --git a/chrome/chrome_repack_locales.gypi b/chrome/chrome_repack_locales.gypi index c80c125..0e24ee2 100644 --- a/chrome/chrome_repack_locales.gypi +++ b/chrome/chrome_repack_locales.gypi @@ -1,9 +1,12 @@ # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + +# To use this the following variables need to be defined: +# pak_locales: string: the list of all the locales that need repacking { - 'action_name': 'repack_locales', 'variables': { + 'repack_locales_path': 'tools/build/repack_locales.py', 'conditions': [ ['branding=="Chrome"', { 'branding_flag': ['-b', 'google_chrome',], @@ -11,25 +14,23 @@ 'branding_flag': ['-b', 'chromium',], }], ], - 'repack_extra_flags%': [], - 'repack_output_dir%': '<(SHARED_INTERMEDIATE_DIR)', }, 'inputs': [ - 'tools/build/repack_locales.py', - '<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) --use-ash <(use_ash) <(repack_extra_flags) <(locales))' + '<(repack_locales_path)', + '<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) --use-ash <(use_ash) <(pak_locales))' ], 'outputs': [ - '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(repack_output_dir) <(locales))' + '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pak_locales))' ], 'action': [ - '<@(repack_locales_cmd)', + 'python', + '<(repack_locales_path)', '<@(branding_flag)', '-p', '<(OS)', '-g', '<(grit_out_dir)', '-s', '<(SHARED_INTERMEDIATE_DIR)', - '-x', '<(repack_output_dir)/.', + '-x', '<(SHARED_INTERMEDIATE_DIR)/.', '--use-ash', '<(use_ash)', - '<@(repack_extra_flags)', - '<@(locales)', + '<@(pak_locales)', ], } diff --git a/chrome/chrome_repack_pseudo_locales.gypi b/chrome/chrome_repack_pseudo_locales.gypi deleted file mode 100644 index 3fd0e76..0000000 --- a/chrome/chrome_repack_pseudo_locales.gypi +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'action_name': 'repack_pseudo_locales', - 'variables': { - 'conditions': [ - ['branding=="Chrome"', { - 'branding_flag': ['-b', 'google_chrome',], - }, { # else: branding!="Chrome" - 'branding_flag': ['-b', 'chromium',], - }], - ], - }, - 'inputs': [ - 'tools/build/repack_locales.py', - '<!@pymod_do_main(repack_locales -i -p <(OS) <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) --use-ash <(use_ash) <(pseudo_locales))' - ], - 'conditions': [ - ['OS == "mac" or OS == "ios"', { - 'outputs': [ - '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))' - ], - }, { # else 'OS != "mac"' - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak' - ], - }], - ], - 'action': [ - '<@(repack_locales_cmd)', - '<@(branding_flag)', - '-p', '<(OS)', - '-g', '<(grit_out_dir)', - '-s', '<(SHARED_INTERMEDIATE_DIR)', - '-x', '<(SHARED_INTERMEDIATE_DIR)/.', - '--use-ash', '<(use_ash)', - '<@(pseudo_locales)', - ], -} diff --git a/chrome/chrome_repack_resources.gypi b/chrome/chrome_repack_resources.gypi index 17bbca5..dcc2d7e 100644 --- a/chrome/chrome_repack_resources.gypi +++ b/chrome/chrome_repack_resources.gypi @@ -19,6 +19,7 @@ '<(grit_out_dir)/sync_internals_resources.pak', '<(grit_out_dir)/translate_internals_resources.pak', ], + 'pak_output': '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', 'conditions': [ ['OS != "ios"', { 'pak_inputs': [ @@ -44,12 +45,5 @@ }], ], }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], } diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp index f67bfb4..6b1d8d8 100644 --- a/chrome/chrome_resources.gyp +++ b/chrome/chrome_resources.gyp @@ -6,7 +6,6 @@ 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome', 'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html', 'additional_modules_list_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/internal/additional_modules_list.txt', - 'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'], }, 'targets': [ { @@ -320,9 +319,6 @@ { 'target_name': 'packed_extra_resources', 'type': 'none', - 'variables': { - 'repack_path': '../tools/grit/grit/format/repack.py', - }, 'dependencies': [ 'chrome_extra_resources', 'packed_resources', @@ -350,9 +346,6 @@ { 'target_name': 'packed_resources', 'type': 'none', - 'variables': { - 'repack_path': '../tools/grit/grit/format/repack.py', - }, 'dependencies': [ # MSVS needs the dependencies explictly named, Make is able to # derive the dependencies from the output files. @@ -367,10 +360,18 @@ ], 'actions': [ { + 'action_name': 'repack_locales_pack', + 'variables': { + 'pak_locales': '<(locales)', + }, 'includes': ['chrome_repack_locales.gypi'] }, { - 'includes': ['chrome_repack_pseudo_locales.gypi'] + 'action_name': 'repack_pseudo_locales_pack', + 'variables': { + 'pak_locales': '<(pseudo_locales)', + }, + 'includes': ['chrome_repack_locales.gypi'] }, { 'includes': ['chrome_repack_chrome_100_percent.gypi'] diff --git a/components/components_tests.gyp b/components/components_tests.gyp index 7758376..b3d6fec 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -561,21 +561,13 @@ { 'action_name': 'repack_components_pack', 'variables': { - 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', 'pak_inputs': [ '<(SHARED_INTERMEDIATE_DIR)/components/component_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/components/strings/component_strings_en-US.pak', ], + 'pak_output': '<(PRODUCT_DIR)/components_resources.pak', }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/components_resources.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', - '<@(pak_inputs)'], + 'includes': [ '../build/repack_action.gypi' ], }, ], 'conditions': [ diff --git a/content/content_shell.gypi b/content/content_shell.gypi index d19cdc5..5879e2d 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -473,9 +473,6 @@ ], }], ], - 'variables': { - 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', - }, 'actions': [ { 'action_name': 'repack_content_shell_pack', @@ -493,29 +490,20 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak', ], + 'conditions': [ + ['OS!="android"', { + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', + ], + }, + 'pak_output': '<(PRODUCT_DIR)/content_shell.pak', + }, { + 'pak_output': '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak', + }], + ], }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', - '<@(pak_inputs)'], - 'conditions': [ - ['OS!="android"', { - 'variables': { - 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', - ], - }, - 'outputs': [ - '<(PRODUCT_DIR)/content_shell.pak', - ], - }, { - 'outputs': [ - '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak', - ], - }], - ], + 'includes': [ '../build/repack_action.gypi' ], }, ], }, diff --git a/ui/resources/ui_resources.gyp b/ui/resources/ui_resources.gyp index 6114314..fa68ace 100644 --- a/ui/resources/ui_resources.gyp +++ b/ui/resources/ui_resources.gyp @@ -44,9 +44,6 @@ '../base/strings/ui_strings.gyp:ui_strings', 'ui_resources', ], - 'variables': { - 'repack_path': '../../tools/grit/grit/format/repack.py', - }, 'actions': [ { 'action_name': 'repack_ui_test_pack', @@ -57,20 +54,9 @@ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak', ], + 'pak_output': '<(PRODUCT_DIR)/ui_test.pak', }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(PRODUCT_DIR)/ui_test.pak', - ], - 'action': [ - 'python', - '<(repack_path)', - '<@(_outputs)', - '<@(pak_inputs)' - ], + 'includes': [ '../../build/repack_action.gypi' ], }, ], 'conditions': [ |