summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_dll.gypi
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-31 18:24:12 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-31 18:24:12 +0000
commit564210fce2cac122f0fdb92cf1bada9b81aa8851 (patch)
treed2b0cc7bf1d88c5355e5cfbfc3c12e886179f0af /chrome/chrome_dll.gypi
parentff4113032669c7ee0a4c68a0d15a40681d3f2d98 (diff)
downloadchromium_src-564210fce2cac122f0fdb92cf1bada9b81aa8851.zip
chromium_src-564210fce2cac122f0fdb92cf1bada9b81aa8851.tar.gz
chromium_src-564210fce2cac122f0fdb92cf1bada9b81aa8851.tar.bz2
Revert 107967 - Introduces chromium_resources.gyp to factor out Chrome resource generation
1. Factors out Chrome/Chromium resource generation into a separate chrome_resources.gyp file. 2. Eliminates repetition between Mac and other platforms. 3. Breaks long "repack" actions out into separate files for greater readability. 4. Eliminates circular dependencies in the Aura shell, the Views components, and the compositor when utilizing Chrome resources. BUG=none TEST=try bots run gyps and build correctly. Review URL: http://codereview.chromium.org/8425002 TBR=dhollowa@chromium.org Review URL: http://codereview.chromium.org/8430011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_dll.gypi')
-rw-r--r--chrome/chrome_dll.gypi166
1 files changed, 156 insertions, 10 deletions
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index 340325b..03e342a 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -33,8 +33,8 @@
'dependencies': [
# On Windows, link the dependencies (libraries) that make
# up actual Chromium functionality into this .dll.
- 'chrome_resources.gyp:chrome_resources',
'chrome_version_resources',
+ 'chrome_resources',
'installer_util_strings',
'../content/content.gyp:content_worker',
'../crypto/crypto.gyp:crypto',
@@ -290,12 +290,6 @@
'app/theme/star.pdf',
'app/theme/star_lit.pdf',
'browser/mac/install.sh',
- '<(INTERMEDIATE_DIR)/repack/chrome.pak',
- '<(INTERMEDIATE_DIR)/repack/resources.pak',
- '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))',
- # Note: pseudo_locales are generated via the packed_resources
- # dependency but not copied to the final target. See
- # common.gypi for more info.
],
'mac_bundle_resources!': [
'app/framework-Info.plist',
@@ -308,8 +302,6 @@
# dependency here. flash_player.gyp will copy the Flash bundle
# into PRODUCT_DIR.
'../third_party/adobe/flash/flash_player.gyp:flash_player',
- 'chrome_resources.gyp:packed_extra_resources',
- 'chrome_resources.gyp:packed_resources',
],
'rules': [
{
@@ -337,8 +329,150 @@
'repack_path': '../tools/grit/grit/format/repack.py',
},
'actions': [
+ # TODO(mark): These actions are duplicated for Linux and
+ # FreeBSD in the chrome target. Can they be unified?
{
- 'includes': ['chrome_repack_theme_resources_large.gypi']
+ 'action_name': 'repack_chrome',
+ 'variables': {
+ 'pak_inputs': [
+ '<(grit_out_dir)/browser_resources.pak',
+ '<(grit_out_dir)/common_resources.pak',
+ '<(grit_out_dir)/default_plugin_resources/default_plugin_resources.pak',
+ '<(grit_out_dir)/renderer_resources.pak',
+ '<(grit_out_dir)/theme_resources.pak',
+ '<(grit_out_dir)/theme_resources_standard.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_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_resources_large',
+ 'variables': {
+ 'pak_inputs': [
+ '<(grit_out_dir)/theme_resources_large.pak',
+ ],
+ },
+ 'inputs': [
+ '<(repack_path)',
+ '<@(pak_inputs)',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/repack/theme_resources_large.pak',
+ ],
+ 'action': ['python', '<(repack_path)', '<@(_outputs)',
+ '<@(pak_inputs)'],
+ 'process_outputs_as_mac_bundle_resources': 1,
+ },
+ {
+ 'action_name': 'repack_locales',
+ 'process_outputs_as_mac_bundle_resources': 1,
+ 'variables': {
+ 'conditions': [
+ ['branding=="Chrome"', {
+ 'branding_flag': ['-b', 'google_chrome',],
+ }, { # else: branding!="Chrome"
+ 'branding_flag': ['-b', 'chromium',],
+ }],
+ ],
+ },
+ 'inputs': [
+ 'tools/build/repack_locales.py',
+ # NOTE: Ideally the common command args would be shared
+ # amongst inputs/outputs/action, but the args include shell
+ # variables which need to be passed intact, and command
+ # expansion wants to expand the shell variables. Adding the
+ # explicit quoting here was the only way it seemed to work.
+ '>!@(<(repack_locales_cmd) -i <(branding_flag) -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
+ ],
+ 'outputs': [
+ '>!@(<(repack_locales_cmd) -o -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(locales))',
+ ],
+ 'action': [
+ '<@(repack_locales_cmd)',
+ '<@(branding_flag)',
+ '-g', '<(grit_out_dir)',
+ '-s', '<(SHARED_INTERMEDIATE_DIR)',
+ '-x', '<(INTERMEDIATE_DIR)',
+ '<@(locales)',
+ ],
+ },
+ {
+ # This is an exact copy of the above phase, except for two
+ # changes:
+ # 1. process_outputs_as_mac_bundle_resources is omitted.
+ # 2. We pass 'pseudo_locales' instead of 'locales' wherever
+ # 'locales' is used.
+ # The result is a build phase that builds all pseudo locales
+ # but doesn't copy them to the final dll/framework.
+ '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',
+ # NOTE: Ideally the common command args would be shared
+ # amongst inputs/outputs/action, but the args include shell
+ # variables which need to be passed intact, and command
+ # expansion wants to expand the shell variables. Adding the
+ # explicit quoting here was the only way it seemed to work.
+ '>!@(<(repack_locales_cmd) -i <(branding_flag) -g \'<(grit_out_dir)\' -s \'<(SHARED_INTERMEDIATE_DIR)\' -x \'<(INTERMEDIATE_DIR)\' <(pseudo_locales))',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/<(pseudo_locales).pak'
+ ],
+ 'action': [
+ '<@(repack_locales_cmd)',
+ '<@(branding_flag)',
+ '-g', '<(grit_out_dir)',
+ '-s', '<(SHARED_INTERMEDIATE_DIR)',
+ '-x', '<(INTERMEDIATE_DIR)',
+ '<@(pseudo_locales)',
+ ],
+ },
+ {
+ 'action_name': 'repack_resources',
+ 'variables': {
+ 'pak_inputs': [
+ '<(grit_out_dir)/component_extension_resources.pak',
+ '<(grit_out_dir)/devtools_frontend_resources.pak',
+ '<(grit_out_dir)/devtools_resources.pak',
+ '<(grit_out_dir)/net_internals_resources.pak',
+ '<(grit_out_dir)/options_resources.pak',
+ '<(grit_out_dir)/shared_resources.pak',
+ '<(grit_out_dir)/sync_internals_resources.pak',
+ '<(grit_out_dir)/workers_resources.pak',
+ ],
+ },
+ 'inputs': [
+ '<(repack_path)',
+ '<@(pak_inputs)',
+ ],
+ 'outputs': [
+ '<(INTERMEDIATE_DIR)/repack/resources.pak',
+ ],
+ 'action': ['python', '<(repack_path)', '<@(_outputs)',
+ '<@(pak_inputs)'],
+ 'process_outputs_as_mac_bundle_resources': 1,
},
],
'postbuilds': [
@@ -418,6 +552,18 @@
],
},
{
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ '<(INTERMEDIATE_DIR)/repack/resources.pak'
+ ],
+ },
+ {
+ 'destination': '<(PRODUCT_DIR)/pseudo_locales',
+ 'files': [
+ '<(INTERMEDIATE_DIR)/<(pseudo_locales).pak'
+ ],
+ },
+ {
'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/resources',
'files': [],
'conditions': [