diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 18:24:12 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 18:24:12 +0000 |
commit | 564210fce2cac122f0fdb92cf1bada9b81aa8851 (patch) | |
tree | d2b0cc7bf1d88c5355e5cfbfc3c12e886179f0af | |
parent | ff4113032669c7ee0a4c68a0d15a40681d3f2d98 (diff) | |
download | chromium_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
-rw-r--r-- | chrome/chrome.gyp | 445 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 10 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 12 | ||||
-rw-r--r-- | chrome/chrome_dll.gypi | 166 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 4 | ||||
-rw-r--r-- | chrome/chrome_installer_util.gypi | 8 | ||||
-rw-r--r-- | chrome/chrome_renderer.gypi | 4 | ||||
-rw-r--r-- | chrome/chrome_repack_chrome.gypi | 45 | ||||
-rw-r--r-- | chrome/chrome_repack_locales.gypi | 30 | ||||
-rw-r--r-- | chrome/chrome_repack_pseudo_locales.gypi | 38 | ||||
-rw-r--r-- | chrome/chrome_repack_resources.gypi | 33 | ||||
-rw-r--r-- | chrome/chrome_repack_theme_resources_large.gypi | 21 | ||||
-rw-r--r-- | chrome/chrome_resources.gyp | 367 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 83 | ||||
-rw-r--r-- | chrome/nacl.gypi | 4 | ||||
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 10 | ||||
-rw-r--r-- | ui/aura/aura.gyp | 6 | ||||
-rw-r--r-- | ui/aura_shell/aura_shell.gyp | 16 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor.gyp | 6 | ||||
-rw-r--r-- | views/views.gyp | 37 |
20 files changed, 713 insertions, 632 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 40c7ed7..2a76224 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -134,6 +134,229 @@ ], 'targets': [ { + # TODO(mark): It would be better if each static library that needed + # to run grit would list its own .grd files, but unfortunately some + # of the static libraries currently have circular dependencies among + # generated headers. + 'target_name': 'chrome_resources', + 'type': 'none', + 'actions': [ + # Data resources. + { + 'action_name': 'browser_resources', + 'variables': { + 'grit_grd_file': 'browser/browser_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'common_resources', + 'variables': { + 'grit_grd_file': 'common/common_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'renderer_resources', + 'variables': { + 'grit_grd_file': 'renderer/renderer_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { + # TODO(mark): It would be better if each static library that needed + # to run grit would list its own .grd files, but unfortunately some + # of the static libraries currently have circular dependencies among + # generated headers. + 'target_name': 'chrome_strings', + 'type': 'none', + 'conditions': [ + ['OS=="win"', { + # HACK(nsylvain): We want to enforce a fake dependency on + # intaller_util_string. install_util depends on both + # chrome_strings and installer_util_strings, but for some reasons + # Incredibuild does not enforce it (most likely a bug). By changing + # the type and making sure we depend on installer_util_strings, it + # will always get built before installer_util. + 'type': 'dummy_executable', + 'dependencies': ['installer_util_strings'], + }], + ], + 'actions': [ + # Localizable resources. + { + 'action_name': 'locale_settings', + 'variables': { + 'grit_grd_file': 'app/resources/locale_settings.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'chromium_strings.grd', + 'variables': { + 'grit_grd_file': 'app/chromium_strings.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'generated_resources', + 'variables': { + 'grit_grd_file': 'app/generated_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'google_chrome_strings', + 'variables': { + 'grit_grd_file': 'app/google_chrome_strings.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { + 'target_name': 'theme_resources', + 'type': 'none', + 'actions': [ + { + 'action_name': 'theme_resources', + 'variables': { + 'grit_grd_file': 'app/theme/theme_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'theme_resources_large', + 'variables': { + 'grit_grd_file': 'app/theme/theme_resources_large.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'theme_resources_standard', + 'variables': { + 'grit_grd_file': 'app/theme/theme_resources_standard.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { + 'target_name': 'platform_locale_settings', + 'type': 'none', + 'actions': [ + { + 'action_name': 'platform_locale_settings', + 'variables': { + 'grit_grd_file': '<(platform_locale_settings_grd)', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { + 'target_name': 'chrome_extra_resources', + 'type': 'none', + 'dependencies': [ + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd', + ], + # These resources end up in resources.pak because they are resources + # used by internal pages. Putting them in a spearate pak file makes + # it easier for us to reference them internally. + 'actions': [ + { + 'action_name': 'component_extension_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/component_extension_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'net_internals_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/net_internals_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'options_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/options_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'quota_internals_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/quota_internals_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'shared_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/shared_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'sync_internals_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/sync_internals_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'workers_resources', + 'variables': { + 'grit_grd_file': 'browser/resources/workers_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ], + }, + { + 'action_name': 'devtools_frontend_resources', + 'variables': { + 'grit_grd_file': + 'browser/debugger/frontend/devtools_frontend_resources.grd', + }, + 'includes': [ '../build/grit_action.gypi' ] + }, + { + 'action_name': 'devtools_resources', + # This can't use ../build/grit_action.gypi because the grd file + # is generated a build time, so the trick of using grit_info to get + # the real inputs/outputs at GYP time isn't possible. + 'variables': { + 'grit_cmd': ['python', '../tools/grit/grit.py'], + 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd', + }, + 'inputs': [ + '<(grit_grd_file)', + '<!@pymod_do_main(grit_info --inputs)', + ], + 'outputs': [ + '<(grit_out_dir)/grit/devtools_resources.h', + '<(grit_out_dir)/devtools_resources.pak', + '<(grit_out_dir)/grit/devtools_resources_map.cc', + '<(grit_out_dir)/grit/devtools_resources_map.h', + ], + 'action': ['<@(grit_cmd)', + '-i', '<(grit_grd_file)', 'build', + '-o', '<(grit_out_dir)', + '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', + '<@(grit_defines)' ], + 'message': 'Generating resources from <(grit_grd_file)', + }, + ], + 'includes': [ '../build/grit_target.gypi' ], + }, + { 'target_name': 'default_extensions', 'type': 'none', 'conditions': [ @@ -164,10 +387,10 @@ 'target_name': 'debugger', 'type': 'static_library', 'dependencies': [ - 'chrome_resources.gyp:chrome_extra_resources', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:theme_resources', + 'chrome_extra_resources', + 'chrome_resources', + 'chrome_strings', + 'theme_resources', '../base/base.gyp:base', '../content/content.gyp:content_browser', '../net/net.gyp:http_server', @@ -229,7 +452,7 @@ '..', '<(grit_out_dir)', ], - }, + }, { 'target_name': 'utility', 'type': 'static_library', @@ -598,7 +821,7 @@ 'target_name': 'service', 'type': 'static_library', 'dependencies': [ - 'chrome_resources.gyp:chrome_strings', + 'chrome_strings', 'common', 'common_net', '../base/base.gyp:base', @@ -931,7 +1154,7 @@ 'target_name': 'infoplist_strings_tool', 'type': 'executable', 'dependencies': [ - 'chrome_resources.gyp:chrome_strings', + 'chrome_strings', '../base/base.gyp:base', '../ui/ui.gyp:ui', ], @@ -988,8 +1211,49 @@ 'tools/perf/flush_cache/flush_cache.cc', ], }, + { + # Mac needs 'process_outputs_as_mac_bundle_resources' to be set, + # and the option is only effective when the target type is native + # binary. Hence we cannot build the Mac bundle resources here and + # the action is duplicated in chrome_dll.gypi. + 'target_name': 'packed_extra_resources', + 'type': 'none', + 'variables': { + 'repack_path': '../tools/grit/grit/format/repack.py', + }, + 'dependencies': [ + 'chrome_extra_resources', + ], + 'actions': [ + { + '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)/options_resources.pak', + '<(grit_out_dir)/net_internals_resources.pak', + '<(grit_out_dir)/quota_internals_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': [ + '<(PRODUCT_DIR)/resources.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', + '<@(pak_inputs)'], + }, + ] + } ], - }], # OS!="mac" + },], # OS!="mac" ['OS=="linux"', { 'targets': [ { @@ -1218,7 +1482,7 @@ 'target_name': 'automation', 'type': 'static_library', 'dependencies': [ - 'chrome_resources.gyp:theme_resources', + 'theme_resources', '../base/base.gyp:test_support_base', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', @@ -1307,5 +1571,168 @@ }, ]}, # 'targets' ], # OS=="win" + ['OS != "mac"', { + 'targets': [{ + '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. + 'chrome_resources', + 'chrome_strings', + 'default_plugin/default_plugin.gyp:default_plugin_resources', + 'platform_locale_settings', + 'theme_resources', + '<(DEPTH)/net/net.gyp:net_resources', + '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings', + '<(DEPTH)/ui/ui.gyp:gfx_resources', + '<(DEPTH)/ui/ui.gyp:ui_resources', + '<(DEPTH)/ui/ui.gyp:ui_resources_large', + '<(DEPTH)/ui/ui.gyp:ui_resources_standard', + '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', + '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', + ], + 'actions': [ + # TODO(mark): These actions are duplicated for the Mac in the + # chrome_dll target. Can they be unified? + # + # Mac needs 'process_outputs_as_mac_bundle_resources' to be set, + # and the option is only effective when the target type is native + # binary. Hence we cannot build the Mac bundle resources here. + { + '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', + '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', + ], + 'conditions': [ + ['touchui==0', { + 'pak_inputs': [ + '<(grit_out_dir)/theme_resources_standard.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', + ], + }, { # else: touchui!=0 + 'pak_inputs': [ + '<(grit_out_dir)/theme_resources_large.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_large/ui_resources_large.pak', + ], + }], + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/repack/chrome.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', + '<@(pak_inputs)'], + }, + { + 'action_name': 'repack_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 <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))' + ], + 'outputs': [ + '<!@pymod_do_main(repack_locales -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)', + ], + }, + { + '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 <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' + ], + 'outputs': [ + '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' + ], + 'action': [ + '<@(repack_locales_cmd)', + '<@(branding_flag)', + '-g', '<(grit_out_dir)', + '-s', '<(SHARED_INTERMEDIATE_DIR)', + '-x', '<(INTERMEDIATE_DIR)', + '<@(pseudo_locales)', + ], + }, + ], + # We'll install the resource files to the product directory. + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/locales', + 'files': [ + '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))' + ], + }, + { + 'destination': '<(PRODUCT_DIR)/pseudo_locales', + 'files': [ + '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' + ], + }, + { + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<(INTERMEDIATE_DIR)/repack/chrome.pak' + ], + }, + ], + 'conditions': [ + ['branding=="Chrome"', { + 'copies': [ + { + # This location is for the Windows and Linux builds. For + # Windows, the chrome.release file ensures that these files are + # copied into the installer. Note that we have a separate + # section in chrome_dll.gyp to copy these files for Mac, as it + # needs to be dropped inside the framework. + 'destination': '<(PRODUCT_DIR)/default_apps', + 'files': ['<@(default_apps_list)'] + }, + ], + }], + ], + }], # targets + }], # OS != "mac" ], # 'conditions' } diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 5283e22..94cee8b 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -11,21 +11,21 @@ 'app/policy/cloud_policy_codegen.gyp:policy', 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'cert_logger_proto', - 'chrome_resources.gyp:chrome_extra_resources', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:platform_locale_settings', - 'chrome_resources.gyp:theme_resources', + 'chrome_extra_resources', + 'chrome_resources', + 'chrome_strings', 'common', 'common_net', 'debugger', 'in_memory_url_index_cache_proto', 'installer_util', + 'platform_locale_settings', 'safe_browsing_proto', 'safe_browsing_report_proto', # TODO(sync): Make browser not depend on syncapi_core directly. 'syncapi_core', 'syncapi_service', + 'theme_resources', 'userfeedback_proto', '../build/temp_gyp/googleurl.gyp:googleurl', '../content/content.gyp:content_browser', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 50934fb..9c2c4c2 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -23,12 +23,12 @@ # shared with the 64-bit target, but it does not work due to a gyp # issue. 'app/policy/cloud_policy_codegen.gyp:policy', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:theme_resources', + 'chrome_resources', + 'chrome_strings', 'common_constants', 'common_net', 'default_plugin/default_plugin.gyp:default_plugin', + 'theme_resources', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../base/base.gyp:base_static', @@ -262,7 +262,7 @@ 'common/native_web_keyboard_event_views.cc', 'common/native_web_keyboard_event_views.h', ], - }], + }], ['use_aura==1', { 'dependencies!': [ 'default_plugin/default_plugin.gyp:default_plugin', @@ -371,8 +371,8 @@ 'common/net/x509_certificate_model.h', ], 'dependencies': [ - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', '../base/base.gyp:base', '../crypto/crypto.gyp:crypto', '../gpu/gpu.gyp:gpu_ipc', 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': [ diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index e19d4ea..9fa9d59 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -400,8 +400,8 @@ }], ], 'dependencies': [ - 'chrome_resources.gyp:packed_extra_resources', - 'chrome_resources.gyp:packed_resources', + 'packed_extra_resources', + 'packed_resources', # Copy Flash Player files to PRODUCT_DIR if applicable. Let the .gyp # file decide what to do on a per-OS basis; on Mac, internal plugins # go inside the framework, so this dependency is in chrome_dll.gypi. diff --git a/chrome/chrome_installer_util.gypi b/chrome/chrome_installer_util.gypi index f6bbe07..fedb136 100644 --- a/chrome/chrome_installer_util.gypi +++ b/chrome/chrome_installer_util.gypi @@ -99,8 +99,8 @@ 'installer_util_strings', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', 'common_constants', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', '../content/content.gyp:content_common', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', @@ -174,8 +174,8 @@ 'type': 'static_library', 'dependencies': [ 'common_constants', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', ], 'sources': [ 'installer/util/master_preferences.cc', diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 38659ce..0e83f01 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -10,8 +10,8 @@ 'dependencies': [ 'common', 'common_net', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'safe_browsing_proto', '../content/content.gyp:content_renderer', '../net/net.gyp:net', diff --git a/chrome/chrome_repack_chrome.gypi b/chrome/chrome_repack_chrome.gypi deleted file mode 100644 index 9c37419..0000000 --- a/chrome/chrome_repack_chrome.gypi +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2011 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_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', - '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', - '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', - ], - 'conditions': [ - ['OS != "mac"', { - 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak', - ] - }], - ['touchui==0 or OS == "mac"', { - 'pak_inputs': [ - '<(grit_out_dir)/theme_resources_standard.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.pak', - ], - }, { # else: touchui!=0 - 'pak_inputs': [ - '<(grit_out_dir)/theme_resources_large.pak', - '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_large/ui_resources_large.pak', - ], - }], - ], - }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/repack/chrome.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], -} diff --git a/chrome/chrome_repack_locales.gypi b/chrome/chrome_repack_locales.gypi deleted file mode 100644 index df261d3..0000000 --- a/chrome/chrome_repack_locales.gypi +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2011 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_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 <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))' - ], - 'outputs': [ - '<!@pymod_do_main(repack_locales -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)', - ], -} diff --git a/chrome/chrome_repack_pseudo_locales.gypi b/chrome/chrome_repack_pseudo_locales.gypi deleted file mode 100644 index 168650c..0000000 --- a/chrome/chrome_repack_pseudo_locales.gypi +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2011 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 <(branding_flag) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' - ], - 'conditions': [ - ['OS == "mac"', { - 'outputs': [ - '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' - ], - }, { # else 'OS != "mac"' - '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)', - ], -} diff --git a/chrome/chrome_repack_resources.gypi b/chrome/chrome_repack_resources.gypi deleted file mode 100644 index 0770712..0000000 --- a/chrome/chrome_repack_resources.gypi +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2011 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_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', - ], - 'conditions': [ - ['OS != "mac"', { - 'pak_inputs': [ - '<(grit_out_dir)/quota_internals_resources.pak', - ], - }], - ], - }, - 'inputs': [ - '<(repack_path)', - '<@(pak_inputs)', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/repack/resources.pak', - ], - 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'], -} diff --git a/chrome/chrome_repack_theme_resources_large.gypi b/chrome/chrome_repack_theme_resources_large.gypi deleted file mode 100644 index e6d43a5..0000000 --- a/chrome/chrome_repack_theme_resources_large.gypi +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) 2011 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_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, -} diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp deleted file mode 100644 index 531e12a..0000000 --- a/chrome/chrome_resources.gyp +++ /dev/null @@ -1,367 +0,0 @@ -# Copyright (c) 2011 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. -{ - 'variables': { - 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome', - 'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'], - }, - 'targets': [ - { - 'target_name': 'chrome_extra_resources', - 'type': 'none', - 'dependencies': [ - '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtools_grd', - ], - # These resources end up in resources.pak because they are resources - # used by internal pages. Putting them in a spearate pak file makes - # it easier for us to reference them internally. - 'actions': [ - { - 'action_name': 'component_extension_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/component_extension_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'net_internals_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/net_internals_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'options_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/options_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'quota_internals_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/quota_internals_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'shared_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/shared_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'sync_internals_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/sync_internals_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'workers_resources', - 'variables': { - 'grit_grd_file': 'browser/resources/workers_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'devtools_frontend_resources', - 'variables': { - 'grit_grd_file': - 'browser/debugger/frontend/devtools_frontend_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ] - }, - { - 'action_name': 'devtools_resources', - # This can't use ../build/grit_action.gypi because the grd file - # is generated a build time, so the trick of using grit_info to get - # the real inputs/outputs at GYP time isn't possible. - 'variables': { - 'grit_cmd': ['python', '../tools/grit/grit.py'], - 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resources.grd', - }, - 'inputs': [ - '<(grit_grd_file)', - '<!@pymod_do_main(grit_info --inputs)', - ], - 'outputs': [ - '<(grit_out_dir)/grit/devtools_resources.h', - '<(grit_out_dir)/devtools_resources.pak', - '<(grit_out_dir)/grit/devtools_resources_map.cc', - '<(grit_out_dir)/grit/devtools_resources_map.h', - ], - 'action': ['<@(grit_cmd)', - '-i', '<(grit_grd_file)', 'build', - '-o', '<(grit_out_dir)', - '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', - '<@(grit_defines)' ], - 'message': 'Generating resources from <(grit_grd_file)', - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - { - # TODO(mark): It would be better if each static library that needed - # to run grit would list its own .grd files, but unfortunately some - # of the static libraries currently have circular dependencies among - # generated headers. - 'target_name': 'chrome_resources', - 'type': 'none', - 'actions': [ - # Data resources. - { - 'action_name': 'browser_resources', - 'variables': { - 'grit_grd_file': 'browser/browser_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'common_resources', - 'variables': { - 'grit_grd_file': 'common/common_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'renderer_resources', - 'variables': { - 'grit_grd_file': 'renderer/renderer_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - { - # TODO(mark): It would be better if each static library that needed - # to run grit would list its own .grd files, but unfortunately some - # of the static libraries currently have circular dependencies among - # generated headers. - 'target_name': 'chrome_strings', - 'type': 'none', - 'conditions': [ - ['OS=="win"', { - # HACK(nsylvain): We want to enforce a fake dependency on - # intaller_util_string. install_util depends on both - # chrome_strings and installer_util_strings, but for some reasons - # Incredibuild does not enforce it (most likely a bug). By changing - # the type and making sure we depend on installer_util_strings, it - # will always get built before installer_util. - 'type': 'dummy_executable', - 'dependencies': ['chrome.gyp:installer_util_strings'], - }], - ], - 'actions': [ - # Localizable resources. - { - 'action_name': 'locale_settings', - 'variables': { - 'grit_grd_file': 'app/resources/locale_settings.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'chromium_strings.grd', - 'variables': { - 'grit_grd_file': 'app/chromium_strings.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'generated_resources', - 'variables': { - 'grit_grd_file': 'app/generated_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'google_chrome_strings', - 'variables': { - 'grit_grd_file': 'app/google_chrome_strings.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - { - 'target_name': 'platform_locale_settings', - 'type': 'none', - 'variables': { - 'conditions': [ - ['OS=="win"', { - 'platform_locale_settings_grd': - 'app/resources/locale_settings_win.grd', - },], - ['OS=="linux"', { - 'conditions': [ - ['chromeos==1', { - 'platform_locale_settings_grd': - 'app/resources/locale_settings_cros.grd', - }], - ['chromeos!=1', { - 'platform_locale_settings_grd': - 'app/resources/locale_settings_linux.grd', - }], - ], - },], - ['os_posix == 1 and OS != "mac" and OS != "linux"', { - 'platform_locale_settings_grd': - 'app/resources/locale_settings_linux.grd', - },], - ['OS=="mac"', { - 'platform_locale_settings_grd': - 'app/resources/locale_settings_mac.grd', - }], - ], # conditions - }, # variables - 'actions': [ - { - 'action_name': 'platform_locale_settings', - 'variables': { - 'grit_grd_file': '<(platform_locale_settings_grd)', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - { - 'target_name': 'theme_resources', - 'type': 'none', - 'actions': [ - { - 'action_name': 'theme_resources', - 'variables': { - 'grit_grd_file': 'app/theme/theme_resources.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'theme_resources_large', - 'variables': { - 'grit_grd_file': 'app/theme/theme_resources_large.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - { - 'action_name': 'theme_resources_standard', - 'variables': { - 'grit_grd_file': 'app/theme/theme_resources_standard.grd', - }, - 'includes': [ '../build/grit_action.gypi' ], - }, - ], - 'includes': [ '../build/grit_target.gypi' ], - }, - { - 'target_name': 'packed_extra_resources', - 'type': 'none', - 'variables': { - 'repack_path': '../tools/grit/grit/format/repack.py', - }, - 'dependencies': [ - 'chrome_extra_resources', - ], - 'actions': [ - { - 'includes': ['chrome_repack_resources.gypi'] - }, - ], - 'conditions': [ - ['OS != "mac"', { - # We'll install the resource files to the product directory. The Mac - # copies the results over as bundle resources in its own special way. - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(INTERMEDIATE_DIR)/repack/resources.pak' - ], - }, - ], - }] - ] - }, - { - '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. - 'chrome_resources', - 'chrome_strings', - 'default_plugin/default_plugin.gyp:default_plugin_resources', - 'platform_locale_settings', - 'theme_resources', - '<(DEPTH)/net/net.gyp:net_resources', - '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings', - '<(DEPTH)/ui/ui.gyp:gfx_resources', - '<(DEPTH)/ui/ui.gyp:ui_resources', - '<(DEPTH)/ui/ui.gyp:ui_resources_large', - '<(DEPTH)/ui/ui.gyp:ui_resources_standard', - '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', - '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', - ], - 'actions': [ - { - 'includes': ['chrome_repack_chrome.gypi'] - }, - { - 'includes': ['chrome_repack_locales.gypi'] - }, - { - 'includes': ['chrome_repack_pseudo_locales.gypi'] - }, - ], - 'conditions': [ - ['OS != "mac"', { - # We'll install the resource files to the product directory. The Mac - # copies the results over as bundle resources in its own special way. - 'copies': [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': [ - '<(INTERMEDIATE_DIR)/repack/chrome.pak' - ], - }, - { - 'destination': '<(PRODUCT_DIR)/locales', - 'files': [ - '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))' - ], - }, - { - 'destination': '<(PRODUCT_DIR)/pseudo_locales', - 'files': [ - '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' - ], - }, - ], - 'conditions': [ - ['branding=="Chrome"', { - 'copies': [ - { - # This location is for the Windows and Linux builds. For - # Windows, the chrome.release file ensures that these files - # are copied into the installer. Note that we have a separate - # section in chrome_dll.gyp to copy these files for Mac, as it - # needs to be dropped inside the framework. - 'destination': '<(PRODUCT_DIR)/default_apps', - 'files': ['<@(default_apps_list)'] - }, - ], - }], - ], # conditions - }], # end OS != "mac" - ], # conditions - }, - ], # targets -} diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 3ab46d9..fcbf94c 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -1,6 +1,7 @@ # Copyright (c) 2011 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. + { 'variables' : { 'pyautolib_sources': [ @@ -33,17 +34,17 @@ 'target_name': 'test_support_common', 'type': 'static_library', 'dependencies': [ - 'app/policy/cloud_policy_codegen.gyp:policy', 'browser', - 'browser/sync/protocol/sync_proto.gyp:sync_proto', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:theme_resources', 'common', - 'plugin', 'renderer', + 'plugin', 'service', 'utility', + 'chrome_resources', + 'chrome_strings', + 'app/policy/cloud_policy_codegen.gyp:policy', + 'browser/sync/protocol/sync_proto.gyp:sync_proto', + 'theme_resources', '../base/base.gyp:test_support_base', '../content/content.gyp:content_app', '../content/content.gyp:content_gpu', @@ -265,10 +266,10 @@ 'target_name': 'test_support_ui', 'type': 'static_library', 'dependencies': [ - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:theme_resources', 'test_support_common', + 'chrome_resources', + 'chrome_strings', + 'theme_resources', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', ], @@ -398,9 +399,9 @@ 'target_name': 'test_support_unit', 'type': 'static_library', 'dependencies': [ - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', 'test_support_common', + 'chrome_resources', + 'chrome_strings', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', ], @@ -427,10 +428,10 @@ 'type': 'executable', 'dependencies': [ 'browser', - 'chrome_resources.gyp:theme_resources', 'renderer', 'test_support_common', 'test_support_ui', + 'theme_resources', '../base/base.gyp:base', '../skia/skia.gyp:skia', '../third_party/libxml/libxml.gyp:libxml', @@ -481,8 +482,8 @@ 'dependencies': [ 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'debugger', 'syncapi_core', 'test_support_common', @@ -682,11 +683,11 @@ 'target_name': 'ui_tests', 'type': 'executable', 'dependencies': [ - 'browser', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'browser', 'common', + 'chrome_resources', + 'chrome_strings', 'test_support_ui', '../base/base.gyp:base', '../net/net.gyp:net', @@ -877,8 +878,8 @@ 'dependencies': [ 'browser', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'chromedriver_support', 'common', 'syncapi_core', @@ -1121,8 +1122,8 @@ '../ui/ui.gyp:ui_resources_standard', '../ui/ui.gyp:ui_test_support', '../v8/tools/gyp/v8.gyp:v8', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', ], 'include_dirs': [ '..', @@ -2156,9 +2157,9 @@ ], }, { # OS != "mac" 'dependencies': [ - 'chrome_resources.gyp:packed_extra_resources', - 'chrome_resources.gyp:packed_resources', 'convert_dict_lib', + 'packed_extra_resources', + 'packed_resources', '../third_party/hunspell/hunspell.gyp:hunspell', ], 'sources!': [ @@ -2281,8 +2282,8 @@ 'browser', 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'renderer', 'test_support_common', '../base/base.gyp:base', @@ -2951,9 +2952,9 @@ 'dependencies': [ 'browser', 'chrome', - 'chrome_resources.gyp:theme_resources', 'test_support_common', 'test_support_ui', + 'theme_resources', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', @@ -3002,8 +3003,8 @@ 'type': 'executable', 'dependencies': [ 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'debugger', 'test_support_common', 'test_support_ui', @@ -3236,8 +3237,8 @@ ], },{ # OS!="mac" 'dependencies': [ - 'chrome_resources.gyp:packed_extra_resources', - 'chrome_resources.gyp:packed_resources' + 'packed_extra_resources', + 'packed_resources' ], }], ['OS=="linux" and chromeos==1', { @@ -3254,10 +3255,10 @@ 'browser', 'browser/sync/protocol/sync_proto.gyp:sync_proto', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', 'common', 'renderer', + 'chrome_strings', 'test_support_common', '../net/net.gyp:net', '../net/net.gyp:net_test_support', @@ -3550,8 +3551,8 @@ 'dependencies': [ 'browser', 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'renderer', 'test_support_common', 'test_support_ui', @@ -3658,8 +3659,8 @@ 'type': 'executable', 'dependencies': [ 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'test_support_common', 'test_support_ui', '../skia/skia.gyp:skia', @@ -3730,10 +3731,10 @@ 'type': 'executable', 'dependencies': [ 'browser', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', 'common', 'renderer', + 'chrome_resources', + 'chrome_strings', '../content/content.gyp:content_gpu', '../content/content.gyp:test_support_content', '../base/base.gyp:base', @@ -3859,12 +3860,12 @@ 'product_prefix': '_', 'dependencies': [ 'chrome', - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', - 'chrome_resources.gyp:theme_resources', 'debugger', 'syncapi_core', 'test_support_common', + 'chrome_resources', + 'chrome_strings', + 'theme_resources', '../skia/skia.gyp:skia', '../testing/gtest.gyp:gtest', ], diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi index 79225e2..0e717b8 100644 --- a/chrome/nacl.gypi +++ b/chrome/nacl.gypi @@ -69,8 +69,8 @@ 'python build_nacl_irt.py --inputs', }, 'dependencies': [ - 'chrome_resources.gyp:chrome_resources', - 'chrome_resources.gyp:chrome_strings', + 'chrome_resources', + 'chrome_strings', 'common', '../webkit/support/webkit_support.gyp:glue', '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome', diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index a37209a..826510c 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -34,10 +34,10 @@ ], 'target_defaults': { 'dependencies': [ - '../chrome/chrome_resources.gyp:chrome_resources', - '../chrome/chrome_resources.gyp:chrome_strings', - '../chrome/chrome_resources.gyp:packed_resources', - '../chrome/chrome_resources.gyp:theme_resources', + '../chrome/chrome.gyp:chrome_resources', + '../chrome/chrome.gyp:chrome_strings', + '../chrome/chrome.gyp:packed_resources', + '../chrome/chrome.gyp:theme_resources', '../skia/skia.gyp:skia', ], 'defines': [ 'ISOLATION_AWARE_ENABLED=1' ], @@ -376,10 +376,10 @@ 'dependencies': [ '../base/base.gyp:test_support_base', '../chrome/chrome.gyp:browser', + '../chrome/chrome.gyp:chrome_resources', '../chrome/chrome.gyp:debugger', '../chrome/chrome.gyp:renderer', '../chrome/chrome.gyp:syncapi_core', - '../chrome/chrome_resources.gyp:chrome_resources', '../content/content.gyp:content_gpu', '../net/net.gyp:net', '../net/net.gyp:net_test_support', diff --git a/ui/aura/aura.gyp b/ui/aura/aura.gyp index d012a80..34ca7efe 100644 --- a/ui/aura/aura.gyp +++ b/ui/aura/aura.gyp @@ -110,7 +110,6 @@ 'type': 'executable', 'dependencies': [ '../../base/base.gyp:test_support_base', - '../../chrome/chrome_resources.gyp:packed_resources', '../../skia/skia.gyp:skia', '../../testing/gtest.gyp:gtest', '../gfx/compositor/compositor.gyp:compositor_test_support', @@ -144,6 +143,11 @@ '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa', ], }], + ['OS!="mac"', { + 'dependencies': [ + '../../chrome/chrome.gyp:packed_resources', + ], + }], ], }, ], diff --git a/ui/aura_shell/aura_shell.gyp b/ui/aura_shell/aura_shell.gyp index 202a94f..743b832 100644 --- a/ui/aura_shell/aura_shell.gyp +++ b/ui/aura_shell/aura_shell.gyp @@ -80,7 +80,6 @@ 'dependencies': [ '../../base/base.gyp:base', '../../base/base.gyp:test_support_base', - '../../chrome/chrome_resources.gyp:packed_resources', '../../build/temp_gyp/googleurl.gyp:googleurl', '../../skia/skia.gyp:skia', '../../testing/gtest.gyp:gtest', @@ -111,6 +110,13 @@ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.rc', ], + 'conditions': [ + ['OS!="mac"', { + 'dependencies': [ + '../../chrome/chrome.gyp:packed_resources', + ], + }], + ], }, { 'target_name': 'aura_shell_exe', @@ -118,7 +124,6 @@ 'dependencies': [ '../../base/base.gyp:base', '../../base/base.gyp:base_i18n', - '../../chrome/chrome_resources.gyp:packed_resources', '../../skia/skia.gyp:skia', '../../third_party/icu/icu.gyp:icui18n', '../../third_party/icu/icu.gyp:icuuc', @@ -146,6 +151,13 @@ '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources_standard/ui_resources_standard.rc', ], + 'conditions': [ + ['OS!="mac"', { + 'dependencies': [ + '../../chrome/chrome.gyp:packed_resources', + ], + }], + ], }, # It's convenient for aura_shell developers to be able to build all # compositor and aura targets from within this solution. diff --git a/ui/gfx/compositor/compositor.gyp b/ui/gfx/compositor/compositor.gyp index 24f2d6f..d5fa818 100644 --- a/ui/gfx/compositor/compositor.gyp +++ b/ui/gfx/compositor/compositor.gyp @@ -130,7 +130,6 @@ 'dependencies': [ '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/base.gyp:test_support_base', - '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/testing/gtest.gyp:gtest', '<(DEPTH)/ui/gfx/gl/gl.gyp:gl', @@ -164,6 +163,11 @@ '<(DEPTH)/third_party/mesa/mesa.gyp:osmesa', ], }], + ['OS!="mac"', { + 'dependencies': [ + '<(DEPTH)/chrome/chrome.gyp:packed_resources', + ], + }], ], }, { diff --git a/views/views.gyp b/views/views.gyp index b5552d4..09cadf9 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -1,6 +1,7 @@ # Copyright (c) 2011 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. + { 'variables': { 'chromium_code': 1, @@ -549,10 +550,6 @@ 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:test_support_base', - # TODO(jcivelli): ideally the resource needed by views would be - # factored out. (for some reason it pulls in a bunch - # unrelated things like v8, sqlite nss...). - '../chrome/chrome_resources.gyp:packed_resources', '../build/temp_gyp/googleurl.gyp:googleurl', '../skia/skia.gyp:skia', '../testing/gmock.gyp:gmock', @@ -668,6 +665,14 @@ ['exclude', '../ui/aura/test/test_desktop_delegate.h'], ], }], + ['OS!="mac"', { + 'dependencies': [ + # TODO(jcivelli): ideally the resource needed by views would be + # factored out. (for some reason it pulls in a bunch + # unrelated things like v8, sqlite nss...). + '../chrome/chrome.gyp:packed_resources', + ], + }], ], }, { @@ -676,7 +681,6 @@ 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', - '../chrome/chrome_resources.gyp:packed_resources', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', @@ -776,6 +780,11 @@ 'examples/table_example.h', ], }], + ['OS!="mac"', { + 'dependencies': [ + '../chrome/chrome.gyp:packed_resources', + ], + }], ], }, { @@ -783,7 +792,6 @@ 'type': 'static_library', 'dependencies': [ '../base/base.gyp:base', - '../chrome/chrome_resources.gyp:packed_resources', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', @@ -829,6 +837,11 @@ '../third_party/wtl/include', ], }], + ['OS!="mac"', { + 'dependencies': [ + '../chrome/chrome.gyp:packed_resources', + ], + }], ], }, { @@ -837,7 +850,6 @@ 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', - '../chrome/chrome_resources.gyp:packed_resources', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', @@ -890,6 +902,11 @@ '../third_party/wtl/include', ], }], + ['OS!="mac"', { + 'dependencies': [ + '../chrome/chrome.gyp:packed_resources', + ], + }], ], }, ], @@ -902,7 +919,6 @@ 'dependencies': [ '../base/base.gyp:base', '../base/base.gyp:base_i18n', - '../chrome/chrome_resources.gyp:packed_resources', '../skia/skia.gyp:skia', '../third_party/icu/icu.gyp:icui18n', '../third_party/icu/icu.gyp:icuuc', @@ -934,6 +950,11 @@ '../third_party/wtl/include', ], }], + ['OS!="mac"', { + 'dependencies': [ + '../chrome/chrome.gyp:packed_resources', + ], + }], ], }, ], |