summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 15:04:29 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-03 15:04:29 +0000
commit33d2a8a112b1f5ce2943877a279990165a963b37 (patch)
treeeaf7522effbfe740991751d1e66ed4d89c01d24b
parentd0084c88b8deb992bbf781b23fb783252ae7d9ab (diff)
downloadchromium_src-33d2a8a112b1f5ce2943877a279990165a963b37.zip
chromium_src-33d2a8a112b1f5ce2943877a279990165a963b37.tar.gz
chromium_src-33d2a8a112b1f5ce2943877a279990165a963b37.tar.bz2
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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107967 Review URL: http://codereview.chromium.org/8425002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108466 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/chrome.gyp445
-rw-r--r--chrome/chrome_browser.gypi10
-rw-r--r--chrome/chrome_common.gypi12
-rw-r--r--chrome/chrome_dll.gypi161
-rw-r--r--chrome/chrome_exe.gypi4
-rw-r--r--chrome/chrome_installer_util.gypi8
-rw-r--r--chrome/chrome_renderer.gypi4
-rw-r--r--chrome/chrome_repack_chrome.gypi45
-rw-r--r--chrome/chrome_repack_locales.gypi30
-rw-r--r--chrome/chrome_repack_pseudo_locales.gypi38
-rw-r--r--chrome/chrome_repack_resources.gypi34
-rw-r--r--chrome/chrome_repack_theme_resources_large.gypi21
-rw-r--r--chrome/chrome_resources.gyp367
-rw-r--r--chrome/chrome_tests.gypi83
-rw-r--r--chrome/nacl.gypi4
-rw-r--r--chrome_frame/chrome_frame.gyp10
-rw-r--r--ui/aura/aura.gyp6
-rw-r--r--ui/aura_shell/aura_shell.gyp16
-rw-r--r--ui/gfx/compositor/compositor.gyp6
-rw-r--r--views/views.gyp37
20 files changed, 637 insertions, 704 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 2a76224..40c7ed7 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -134,229 +134,6 @@
],
'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': [
@@ -387,10 +164,10 @@
'target_name': 'debugger',
'type': 'static_library',
'dependencies': [
- 'chrome_extra_resources',
- 'chrome_resources',
- 'chrome_strings',
- 'theme_resources',
+ 'chrome_resources.gyp:chrome_extra_resources',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
+ 'chrome_resources.gyp:theme_resources',
'../base/base.gyp:base',
'../content/content.gyp:content_browser',
'../net/net.gyp:http_server',
@@ -452,7 +229,7 @@
'..',
'<(grit_out_dir)',
],
- },
+ },
{
'target_name': 'utility',
'type': 'static_library',
@@ -821,7 +598,7 @@
'target_name': 'service',
'type': 'static_library',
'dependencies': [
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_strings',
'common',
'common_net',
'../base/base.gyp:base',
@@ -1154,7 +931,7 @@
'target_name': 'infoplist_strings_tool',
'type': 'executable',
'dependencies': [
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_strings',
'../base/base.gyp:base',
'../ui/ui.gyp:ui',
],
@@ -1211,49 +988,8 @@
'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': [
{
@@ -1482,7 +1218,7 @@
'target_name': 'automation',
'type': 'static_library',
'dependencies': [
- 'theme_resources',
+ 'chrome_resources.gyp:theme_resources',
'../base/base.gyp:test_support_base',
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
@@ -1571,168 +1307,5 @@
},
]}, # '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 014f01a..ef0619ae 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -12,21 +12,21 @@
'autofill_regexes',
'browser/sync/protocol/sync_proto.gyp:sync_proto',
'cert_logger_proto',
- 'chrome_extra_resources',
- 'chrome_resources',
- 'chrome_strings',
+ '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',
'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 136b275..b7478fc 100644
--- a/chrome/chrome_common.gypi
+++ b/chrome/chrome_common.gypi
@@ -23,13 +23,13 @@
# 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',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
+ 'chrome_resources.gyp:theme_resources',
'common_constants',
'common_net',
'common_version',
'default_plugin/default_plugin.gyp:default_plugin',
- 'theme_resources',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../base/base.gyp:base_static',
@@ -263,7 +263,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',
@@ -380,8 +380,8 @@
'common/net/x509_certificate_model.h',
],
'dependencies': [
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp: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 ea935ef..8ed2a5c 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,6 +290,12 @@
'app/theme/star.pdf',
'app/theme/star_lit.pdf',
'browser/mac/install.sh',
+ '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak',
+ '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak',
+ '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_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',
@@ -302,6 +308,8 @@
# 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': [
{
@@ -329,151 +337,8 @@
'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?
{
- '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)/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': [
- '<(INTERMEDIATE_DIR)/repack/resources.pak',
- ],
- 'action': ['python', '<(repack_path)', '<@(_outputs)',
- '<@(pak_inputs)'],
- 'process_outputs_as_mac_bundle_resources': 1,
+ 'includes': ['chrome_repack_theme_resources_large.gypi']
},
],
'postbuilds': [
@@ -553,15 +418,17 @@
],
},
{
+ # Copy of resources used by tests.
'destination': '<(PRODUCT_DIR)',
'files': [
- '<(INTERMEDIATE_DIR)/repack/resources.pak'
+ '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
],
},
{
+ # Copy of resources used by tests.
'destination': '<(PRODUCT_DIR)/pseudo_locales',
'files': [
- '<(INTERMEDIATE_DIR)/<(pseudo_locales).pak'
+ '<(SHARED_INTERMEDIATE_DIR)/<(pseudo_locales).pak'
],
},
{
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 9fa9d59..e19d4ea 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -400,8 +400,8 @@
}],
],
'dependencies': [
- 'packed_extra_resources',
- 'packed_resources',
+ 'chrome_resources.gyp:packed_extra_resources',
+ 'chrome_resources.gyp: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 fedb136..f6bbe07 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',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp: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',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
],
'sources': [
'installer/util/master_preferences.cc',
diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi
index 0e83f01..38659ce 100644
--- a/chrome/chrome_renderer.gypi
+++ b/chrome/chrome_renderer.gypi
@@ -10,8 +10,8 @@
'dependencies': [
'common',
'common_net',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp: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
new file mode 100644
index 0000000..f7f6795
--- /dev/null
+++ b/chrome/chrome_repack_chrome.gypi
@@ -0,0 +1,45 @@
+# 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': [
+ '<(SHARED_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
new file mode 100644
index 0000000..f14c17c
--- /dev/null
+++ b/chrome/chrome_repack_locales.gypi
@@ -0,0 +1,30 @@
+# 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 <(SHARED_INTERMEDIATE_DIR) <(locales))'
+ ],
+ 'action': [
+ '<@(repack_locales_cmd)',
+ '<@(branding_flag)',
+ '-g', '<(grit_out_dir)',
+ '-s', '<(SHARED_INTERMEDIATE_DIR)',
+ '-x', '<(SHARED_INTERMEDIATE_DIR)/.',
+ '<@(locales)',
+ ],
+}
diff --git a/chrome/chrome_repack_pseudo_locales.gypi b/chrome/chrome_repack_pseudo_locales.gypi
new file mode 100644
index 0000000..2f1105a
--- /dev/null
+++ b/chrome/chrome_repack_pseudo_locales.gypi
@@ -0,0 +1,38 @@
+# 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 <(SHARED_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', '<(SHARED_INTERMEDIATE_DIR)/.',
+ '<@(pseudo_locales)',
+ ],
+}
diff --git a/chrome/chrome_repack_resources.gypi b/chrome/chrome_repack_resources.gypi
new file mode 100644
index 0000000..d8d2a03
--- /dev/null
+++ b/chrome/chrome_repack_resources.gypi
@@ -0,0 +1,34 @@
+# 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)/quota_internals_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': [
+ '<(SHARED_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
new file mode 100644
index 0000000..e6d43a5
--- /dev/null
+++ b/chrome/chrome_repack_theme_resources_large.gypi
@@ -0,0 +1,21 @@
+# 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
new file mode 100644
index 0000000..7c8692f
--- /dev/null
+++ b/chrome/chrome_resources.gyp
@@ -0,0 +1,367 @@
+# 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': [
+ '<(SHARED_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': [
+ '<(SHARED_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 <(SHARED_INTERMEDIATE_DIR) <(locales))'
+ ],
+ },
+ {
+ 'destination': '<(PRODUCT_DIR)/pseudo_locales',
+ 'files': [
+ '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_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 ae7609b..8a56e3a 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1,7 +1,6 @@
# 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': [
@@ -34,17 +33,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',
- 'renderer',
'plugin',
+ 'renderer',
'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',
@@ -268,10 +267,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',
],
@@ -401,9 +400,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',
],
@@ -430,10 +429,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',
@@ -484,8 +483,8 @@
'dependencies': [
'browser/sync/protocol/sync_proto.gyp:sync_proto',
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'debugger',
'syncapi_core',
'test_support_common',
@@ -691,11 +690,11 @@
'target_name': 'ui_tests',
'type': 'executable',
'dependencies': [
- 'chrome',
'browser',
+ 'chrome',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'common',
- 'chrome_resources',
- 'chrome_strings',
'test_support_ui',
'../base/base.gyp:base',
'../net/net.gyp:net',
@@ -886,8 +885,8 @@
'dependencies': [
'browser',
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'chromedriver_support',
'common',
'syncapi_core',
@@ -1130,8 +1129,8 @@
'../ui/ui.gyp:ui_resources_standard',
'../ui/ui.gyp:ui_test_support',
'../v8/tools/gyp/v8.gyp:v8',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
],
'include_dirs': [
'..',
@@ -2169,9 +2168,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!': [
@@ -2294,8 +2293,8 @@
'browser',
'browser/sync/protocol/sync_proto.gyp:sync_proto',
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'renderer',
'test_support_common',
'../base/base.gyp:base',
@@ -2972,9 +2971,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',
@@ -3023,8 +3022,8 @@
'type': 'executable',
'dependencies': [
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'debugger',
'test_support_common',
'test_support_ui',
@@ -3261,8 +3260,8 @@
],
},{ # OS!="mac"
'dependencies': [
- 'packed_extra_resources',
- 'packed_resources'
+ 'chrome_resources.gyp:packed_extra_resources',
+ 'chrome_resources.gyp:packed_resources'
],
}],
['OS=="linux" and chromeos==1', {
@@ -3279,10 +3278,10 @@
'browser',
'browser/sync/protocol/sync_proto.gyp:sync_proto',
'chrome',
- 'chrome_resources',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'common',
'renderer',
- 'chrome_strings',
'test_support_common',
'../net/net.gyp:net',
'../net/net.gyp:net_test_support',
@@ -3583,8 +3582,8 @@
'dependencies': [
'browser',
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'renderer',
'test_support_common',
'test_support_ui',
@@ -3695,8 +3694,8 @@
'type': 'executable',
'dependencies': [
'chrome',
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp:chrome_strings',
'test_support_common',
'test_support_ui',
'../skia/skia.gyp:skia',
@@ -3767,10 +3766,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',
@@ -3896,12 +3895,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 0e717b8..79225e2 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -69,8 +69,8 @@
'python build_nacl_irt.py --inputs',
},
'dependencies': [
- 'chrome_resources',
- 'chrome_strings',
+ 'chrome_resources.gyp:chrome_resources',
+ 'chrome_resources.gyp: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 826510c..a37209a 100644
--- a/chrome_frame/chrome_frame.gyp
+++ b/chrome_frame/chrome_frame.gyp
@@ -34,10 +34,10 @@
],
'target_defaults': {
'dependencies': [
- '../chrome/chrome.gyp:chrome_resources',
- '../chrome/chrome.gyp:chrome_strings',
- '../chrome/chrome.gyp:packed_resources',
- '../chrome/chrome.gyp:theme_resources',
+ '../chrome/chrome_resources.gyp:chrome_resources',
+ '../chrome/chrome_resources.gyp:chrome_strings',
+ '../chrome/chrome_resources.gyp:packed_resources',
+ '../chrome/chrome_resources.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 34ca7efe..d012a80 100644
--- a/ui/aura/aura.gyp
+++ b/ui/aura/aura.gyp
@@ -110,6 +110,7 @@
'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',
@@ -143,11 +144,6 @@
'<(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 35d2efd7..e46f28d 100644
--- a/ui/aura_shell/aura_shell.gyp
+++ b/ui/aura_shell/aura_shell.gyp
@@ -85,6 +85,7 @@
'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',
@@ -115,13 +116,6 @@
'<(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',
@@ -129,6 +123,7 @@
'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',
@@ -156,13 +151,6 @@
'<(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 5a940ae..a4fac31 100644
--- a/ui/gfx/compositor/compositor.gyp
+++ b/ui/gfx/compositor/compositor.gyp
@@ -129,6 +129,7 @@
'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',
@@ -166,11 +167,6 @@
'<(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 b8082a4..825ef6b 100644
--- a/views/views.gyp
+++ b/views/views.gyp
@@ -1,7 +1,6 @@
# 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,
@@ -550,6 +549,10 @@
'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',
@@ -664,14 +667,6 @@
['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',
- ],
- }],
],
},
{
@@ -680,6 +675,7 @@
'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',
@@ -779,11 +775,6 @@
'examples/table_example.h',
],
}],
- ['OS!="mac"', {
- 'dependencies': [
- '../chrome/chrome.gyp:packed_resources',
- ],
- }],
],
},
{
@@ -791,6 +782,7 @@
'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',
@@ -836,11 +828,6 @@
'../third_party/wtl/include',
],
}],
- ['OS!="mac"', {
- 'dependencies': [
- '../chrome/chrome.gyp:packed_resources',
- ],
- }],
],
},
{
@@ -849,6 +836,7 @@
'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',
@@ -901,11 +889,6 @@
'../third_party/wtl/include',
],
}],
- ['OS!="mac"', {
- 'dependencies': [
- '../chrome/chrome.gyp:packed_resources',
- ],
- }],
],
},
],
@@ -918,6 +901,7 @@
'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',
@@ -949,11 +933,6 @@
'../third_party/wtl/include',
],
}],
- ['OS!="mac"', {
- 'dependencies': [
- '../chrome/chrome.gyp:packed_resources',
- ],
- }],
],
},
],