diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 22:31:37 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-23 22:31:37 +0000 |
commit | 6e935f9dc3bd5a3fba995a667d264f78ff2ef135 (patch) | |
tree | 725ee5f60d5e5baed97f051b407af4a201105c5b | |
parent | b89bc86c5c27d59d61f38d92e778c3171488265c (diff) | |
download | chromium_src-6e935f9dc3bd5a3fba995a667d264f78ff2ef135.zip chromium_src-6e935f9dc3bd5a3fba995a667d264f78ff2ef135.tar.gz chromium_src-6e935f9dc3bd5a3fba995a667d264f78ff2ef135.tar.bz2 |
Switch to using .pak files for locale data on Windows.
We were using .dlls, but the .pak files are smaller and this will
allow us to share more code across platforms.
- Remove app/locales.gyp (used on win to generate the locale dlls) and references to it in other gyp(i) files.
- Update various packaging scripts.
- Move functions from resource_bundle_posix.cc to resource_bundle.cc (LoadResourcesDataPak, UnloadLocaleResources, GetLocalizedString, LoadLocaleResources) and delete the corresponding functions from resource_bundle_win.cc.
BUG=92724
Review URL: http://codereview.chromium.org/7677004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97941 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/all.gyp | 2 | ||||
-rw-r--r-- | chrome/app/locales/locales.gyp | 678 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 2 | ||||
-rw-r--r-- | chrome/installer/mini_installer.gyp | 2 | ||||
-rw-r--r-- | chrome/installer/mini_installer/chrome.release | 2 | ||||
-rw-r--r-- | chrome/tools/build/win/FILES | 98 | ||||
-rw-r--r-- | chrome/tools/build/win/FILES.cfg | 98 | ||||
-rw-r--r-- | chrome_frame/chrome_frame.gyp | 2 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle.cc | 88 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle.h | 8 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_dummy.cc | 3 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_linux.cc | 14 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_posix.cc | 69 | ||||
-rw-r--r-- | ui/base/resource/resource_bundle_win.cc | 93 | ||||
-rw-r--r-- | views/views.gyp | 2 |
15 files changed, 211 insertions, 950 deletions
diff --git a/build/all.gyp b/build/all.gyp index d93347c..cc8e292 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -115,7 +115,6 @@ 'dependencies': [ '../aura/aura.gyp:*', '../breakpad/breakpad.gyp:*', - '../chrome/app/locales/locales.gyp:*', '../chrome_frame/chrome_frame.gyp:*', '../cloud_print/virtual_driver/virtual_driver.gyp:*', '../courgette/courgette.gyp:*', @@ -525,7 +524,6 @@ 'target_name': 'chrome_official_builder', 'type': 'none', 'dependencies': [ - '../chrome/app/locales/locales.gyp:*', '../chrome/chrome.gyp:chromedriver', '../chrome/chrome.gyp:crash_service', '../chrome/chrome.gyp:crash_service_win64', diff --git a/chrome/app/locales/locales.gyp b/chrome/app/locales/locales.gyp deleted file mode 100644 index 93948da..0000000 --- a/chrome/app/locales/locales.gyp +++ /dev/null @@ -1,678 +0,0 @@ -{ - 'variables': { - 'chromium_code': 1, - 'chrome_grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome', - 'webkit_grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/webkit', - - 'ui_grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui', - 'ui_strings_out_dir': '<(ui_grit_out_dir)/ui_strings', - 'app_locale_out_dir': '<(ui_grit_out_dir)/app_locale_settings', - - # TODO(sgk): eliminate this; see comment in build/common.gypi - 'msvs_debug_link_incremental': '1', - - # Decide which .rc file to use for strings based on branding - 'conditions': [ - ['branding=="Chrome"', { - 'strings_rc_name': 'strings_google_chrome', - }, { - 'strings_rc_name': 'strings', - }], - ], - }, - 'target_defaults': { - 'type': 'loadable_module', - 'dependencies': [ - '../../chrome.gyp:chrome_strings', - '../../chrome.gyp:platform_locale_settings', - '../../../ui/base/strings/ui_strings.gyp:ui_strings', - '../../../webkit/support/webkit_support.gyp:webkit_strings', - ], - 'msvs_settings': { - 'VCLinkerTool': { - 'BaseAddress': '0x3CF00000', - 'OutputFile': '$(OutDir)\\locales\\$(ProjectName).dll', - 'LinkIncremental': '1', # 1 == No - 'LinkTimeCodeGeneration': '0', - 'ResourceOnlyDLL': 'true', - }, - }, - 'defines': [ - '_USRDLL', - 'GENERATED_RESOURCES_DLL_EXPORTS', - ], - 'include_dirs': [ - '<(chrome_grit_out_dir)', - ], - }, - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'am', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_am.rc', - '<(chrome_grit_out_dir)/generated_resources_am.rc', - '<(chrome_grit_out_dir)/locale_settings_am.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_am.rc', - '<(webkit_grit_out_dir)/webkit_strings_am.rc', - '<(ui_strings_out_dir)/ui_strings_am.rc', - '<(app_locale_out_dir)/app_locale_settings_am.rc', - ], - }, - { - 'target_name': 'ar', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ar.rc', - '<(chrome_grit_out_dir)/generated_resources_ar.rc', - '<(chrome_grit_out_dir)/locale_settings_ar.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ar.rc', - '<(webkit_grit_out_dir)/webkit_strings_ar.rc', - '<(ui_strings_out_dir)/ui_strings_ar.rc', - '<(app_locale_out_dir)/app_locale_settings_ar.rc', - ], - }, - { - 'target_name': 'bg', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_bg.rc', - '<(chrome_grit_out_dir)/generated_resources_bg.rc', - '<(chrome_grit_out_dir)/locale_settings_bg.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_bg.rc', - '<(webkit_grit_out_dir)/webkit_strings_bg.rc', - '<(ui_strings_out_dir)/ui_strings_bg.rc', - '<(app_locale_out_dir)/app_locale_settings_bg.rc', - ], - }, - { - 'target_name': 'bn', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_bn.rc', - '<(chrome_grit_out_dir)/generated_resources_bn.rc', - '<(chrome_grit_out_dir)/locale_settings_bn.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_bn.rc', - '<(webkit_grit_out_dir)/webkit_strings_bn.rc', - '<(ui_strings_out_dir)/ui_strings_bn.rc', - '<(app_locale_out_dir)/app_locale_settings_bn.rc', - ], - }, - { - 'target_name': 'ca', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ca.rc', - '<(chrome_grit_out_dir)/generated_resources_ca.rc', - '<(chrome_grit_out_dir)/locale_settings_ca.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ca.rc', - '<(webkit_grit_out_dir)/webkit_strings_ca.rc', - '<(ui_strings_out_dir)/ui_strings_ca.rc', - '<(app_locale_out_dir)/app_locale_settings_ca.rc', - ], - }, - { - 'target_name': 'cs', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_cs.rc', - '<(chrome_grit_out_dir)/generated_resources_cs.rc', - '<(chrome_grit_out_dir)/locale_settings_cs.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_cs.rc', - '<(webkit_grit_out_dir)/webkit_strings_cs.rc', - '<(ui_strings_out_dir)/ui_strings_cs.rc', - '<(app_locale_out_dir)/app_locale_settings_cs.rc', - ], - }, - { - 'target_name': 'da', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_da.rc', - '<(chrome_grit_out_dir)/generated_resources_da.rc', - '<(chrome_grit_out_dir)/locale_settings_da.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_da.rc', - '<(webkit_grit_out_dir)/webkit_strings_da.rc', - '<(ui_strings_out_dir)/ui_strings_da.rc', - '<(app_locale_out_dir)/app_locale_settings_da.rc', - ], - }, - { - 'target_name': 'de', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_de.rc', - '<(chrome_grit_out_dir)/generated_resources_de.rc', - '<(chrome_grit_out_dir)/locale_settings_de.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_de.rc', - '<(webkit_grit_out_dir)/webkit_strings_de.rc', - '<(ui_strings_out_dir)/ui_strings_de.rc', - '<(app_locale_out_dir)/app_locale_settings_de.rc', - ], - }, - { - 'target_name': 'el', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_el.rc', - '<(chrome_grit_out_dir)/generated_resources_el.rc', - '<(chrome_grit_out_dir)/locale_settings_el.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_el.rc', - '<(webkit_grit_out_dir)/webkit_strings_el.rc', - '<(ui_strings_out_dir)/ui_strings_el.rc', - '<(app_locale_out_dir)/app_locale_settings_el.rc', - ], - }, - { - 'target_name': 'en-GB', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_en-GB.rc', - '<(chrome_grit_out_dir)/generated_resources_en-GB.rc', - '<(chrome_grit_out_dir)/locale_settings_en-GB.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_en-GB.rc', - '<(webkit_grit_out_dir)/webkit_strings_en-GB.rc', - '<(ui_strings_out_dir)/ui_strings_en-GB.rc', - '<(app_locale_out_dir)/app_locale_settings_en-GB.rc', - ], - }, - { - 'target_name': 'en-US', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_en-US.rc', - '<(chrome_grit_out_dir)/generated_resources_en-US.rc', - '<(chrome_grit_out_dir)/locale_settings_en-US.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_en-US.rc', - '<(webkit_grit_out_dir)/webkit_strings_en-US.rc', - '<(ui_strings_out_dir)/ui_strings_en-US.rc', - '<(app_locale_out_dir)/app_locale_settings_en-US.rc', - ], - }, - { - 'target_name': 'es-419', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_es-419.rc', - '<(chrome_grit_out_dir)/generated_resources_es-419.rc', - '<(chrome_grit_out_dir)/locale_settings_es-419.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_es-419.rc', - '<(webkit_grit_out_dir)/webkit_strings_es-419.rc', - '<(ui_strings_out_dir)/ui_strings_es-419.rc', - '<(app_locale_out_dir)/app_locale_settings_es-419.rc', - ], - }, - { - 'target_name': 'es', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_es.rc', - '<(chrome_grit_out_dir)/generated_resources_es.rc', - '<(chrome_grit_out_dir)/locale_settings_es.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_es.rc', - '<(webkit_grit_out_dir)/webkit_strings_es.rc', - '<(ui_strings_out_dir)/ui_strings_es.rc', - '<(app_locale_out_dir)/app_locale_settings_es.rc', - ], - }, - { - 'target_name': 'et', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_et.rc', - '<(chrome_grit_out_dir)/generated_resources_et.rc', - '<(chrome_grit_out_dir)/locale_settings_et.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_et.rc', - '<(webkit_grit_out_dir)/webkit_strings_et.rc', - '<(ui_strings_out_dir)/ui_strings_et.rc', - '<(app_locale_out_dir)/app_locale_settings_et.rc', - ], - }, - { - 'target_name': 'fa', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_fa.rc', - '<(chrome_grit_out_dir)/generated_resources_fa.rc', - '<(chrome_grit_out_dir)/locale_settings_fa.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_fa.rc', - '<(webkit_grit_out_dir)/webkit_strings_fa.rc', - '<(ui_strings_out_dir)/ui_strings_fa.rc', - '<(app_locale_out_dir)/app_locale_settings_fa.rc', - ], - }, - { - 'target_name': 'fi', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_fi.rc', - '<(chrome_grit_out_dir)/generated_resources_fi.rc', - '<(chrome_grit_out_dir)/locale_settings_fi.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_fi.rc', - '<(webkit_grit_out_dir)/webkit_strings_fi.rc', - '<(ui_strings_out_dir)/ui_strings_fi.rc', - '<(app_locale_out_dir)/app_locale_settings_fi.rc', - ], - }, - { - 'target_name': 'fil', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_fil.rc', - '<(chrome_grit_out_dir)/generated_resources_fil.rc', - '<(chrome_grit_out_dir)/locale_settings_fil.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_fil.rc', - '<(webkit_grit_out_dir)/webkit_strings_fil.rc', - '<(ui_strings_out_dir)/ui_strings_fil.rc', - '<(app_locale_out_dir)/app_locale_settings_fil.rc', - ], - }, - { - 'target_name': 'fr', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_fr.rc', - '<(chrome_grit_out_dir)/generated_resources_fr.rc', - '<(chrome_grit_out_dir)/locale_settings_fr.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_fr.rc', - '<(webkit_grit_out_dir)/webkit_strings_fr.rc', - '<(ui_strings_out_dir)/ui_strings_fr.rc', - '<(app_locale_out_dir)/app_locale_settings_fr.rc', - ], - }, - { - 'target_name': 'gu', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_gu.rc', - '<(chrome_grit_out_dir)/generated_resources_gu.rc', - '<(chrome_grit_out_dir)/locale_settings_gu.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_gu.rc', - '<(webkit_grit_out_dir)/webkit_strings_gu.rc', - '<(ui_strings_out_dir)/ui_strings_gu.rc', - '<(app_locale_out_dir)/app_locale_settings_gu.rc', - ], - }, - { - 'target_name': 'he', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_he.rc', - '<(chrome_grit_out_dir)/generated_resources_he.rc', - '<(chrome_grit_out_dir)/locale_settings_he.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_he.rc', - '<(webkit_grit_out_dir)/webkit_strings_he.rc', - '<(ui_strings_out_dir)/ui_strings_he.rc', - '<(app_locale_out_dir)/app_locale_settings_he.rc', - ], - }, - { - 'target_name': 'hi', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_hi.rc', - '<(chrome_grit_out_dir)/generated_resources_hi.rc', - '<(chrome_grit_out_dir)/locale_settings_hi.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_hi.rc', - '<(webkit_grit_out_dir)/webkit_strings_hi.rc', - '<(ui_strings_out_dir)/ui_strings_hi.rc', - '<(app_locale_out_dir)/app_locale_settings_hi.rc', - ], - }, - { - 'target_name': 'hr', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_hr.rc', - '<(chrome_grit_out_dir)/generated_resources_hr.rc', - '<(chrome_grit_out_dir)/locale_settings_hr.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_hr.rc', - '<(webkit_grit_out_dir)/webkit_strings_hr.rc', - '<(ui_strings_out_dir)/ui_strings_hr.rc', - '<(app_locale_out_dir)/app_locale_settings_hr.rc', - ], - }, - { - 'target_name': 'hu', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_hu.rc', - '<(chrome_grit_out_dir)/generated_resources_hu.rc', - '<(chrome_grit_out_dir)/locale_settings_hu.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_hu.rc', - '<(webkit_grit_out_dir)/webkit_strings_hu.rc', - '<(ui_strings_out_dir)/ui_strings_hu.rc', - '<(app_locale_out_dir)/app_locale_settings_hu.rc', - ], - }, - { - 'target_name': 'id', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_id.rc', - '<(chrome_grit_out_dir)/generated_resources_id.rc', - '<(chrome_grit_out_dir)/locale_settings_id.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_id.rc', - '<(webkit_grit_out_dir)/webkit_strings_id.rc', - '<(ui_strings_out_dir)/ui_strings_id.rc', - '<(app_locale_out_dir)/app_locale_settings_id.rc', - ], - }, - { - 'target_name': 'it', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_it.rc', - '<(chrome_grit_out_dir)/generated_resources_it.rc', - '<(chrome_grit_out_dir)/locale_settings_it.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_it.rc', - '<(webkit_grit_out_dir)/webkit_strings_it.rc', - '<(ui_strings_out_dir)/ui_strings_it.rc', - '<(app_locale_out_dir)/app_locale_settings_it.rc', - ], - }, - { - 'target_name': 'ja', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ja.rc', - '<(chrome_grit_out_dir)/generated_resources_ja.rc', - '<(chrome_grit_out_dir)/locale_settings_ja.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ja.rc', - '<(webkit_grit_out_dir)/webkit_strings_ja.rc', - '<(ui_strings_out_dir)/ui_strings_ja.rc', - '<(app_locale_out_dir)/app_locale_settings_ja.rc', - ], - }, - { - 'target_name': 'kn', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_kn.rc', - '<(chrome_grit_out_dir)/generated_resources_kn.rc', - '<(chrome_grit_out_dir)/locale_settings_kn.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_kn.rc', - '<(webkit_grit_out_dir)/webkit_strings_kn.rc', - '<(ui_strings_out_dir)/ui_strings_kn.rc', - '<(app_locale_out_dir)/app_locale_settings_kn.rc', - ], - }, - { - 'target_name': 'ko', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ko.rc', - '<(chrome_grit_out_dir)/generated_resources_ko.rc', - '<(chrome_grit_out_dir)/locale_settings_ko.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ko.rc', - '<(webkit_grit_out_dir)/webkit_strings_ko.rc', - '<(ui_strings_out_dir)/ui_strings_ko.rc', - '<(app_locale_out_dir)/app_locale_settings_ko.rc', - ], - }, - { - 'target_name': 'lt', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_lt.rc', - '<(chrome_grit_out_dir)/generated_resources_lt.rc', - '<(chrome_grit_out_dir)/locale_settings_lt.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_lt.rc', - '<(webkit_grit_out_dir)/webkit_strings_lt.rc', - '<(ui_strings_out_dir)/ui_strings_lt.rc', - '<(app_locale_out_dir)/app_locale_settings_lt.rc', - ], - }, - { - 'target_name': 'lv', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_lv.rc', - '<(chrome_grit_out_dir)/generated_resources_lv.rc', - '<(chrome_grit_out_dir)/locale_settings_lv.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_lv.rc', - '<(webkit_grit_out_dir)/webkit_strings_lv.rc', - '<(ui_strings_out_dir)/ui_strings_lv.rc', - '<(app_locale_out_dir)/app_locale_settings_lv.rc', - ], - }, - { - 'target_name': 'ml', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ml.rc', - '<(chrome_grit_out_dir)/generated_resources_ml.rc', - '<(chrome_grit_out_dir)/locale_settings_ml.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ml.rc', - '<(webkit_grit_out_dir)/webkit_strings_ml.rc', - '<(ui_strings_out_dir)/ui_strings_ml.rc', - '<(app_locale_out_dir)/app_locale_settings_ml.rc', - ], - }, - { - 'target_name': 'mr', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_mr.rc', - '<(chrome_grit_out_dir)/generated_resources_mr.rc', - '<(chrome_grit_out_dir)/locale_settings_mr.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_mr.rc', - '<(webkit_grit_out_dir)/webkit_strings_mr.rc', - '<(ui_strings_out_dir)/ui_strings_mr.rc', - '<(app_locale_out_dir)/app_locale_settings_mr.rc', - ], - }, - { - 'target_name': 'nb', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_nb.rc', - '<(chrome_grit_out_dir)/generated_resources_nb.rc', - '<(chrome_grit_out_dir)/locale_settings_nb.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_nb.rc', - '<(webkit_grit_out_dir)/webkit_strings_nb.rc', - '<(ui_strings_out_dir)/ui_strings_nb.rc', - '<(app_locale_out_dir)/app_locale_settings_nb.rc', - ], - }, - { - 'target_name': 'nl', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_nl.rc', - '<(chrome_grit_out_dir)/generated_resources_nl.rc', - '<(chrome_grit_out_dir)/locale_settings_nl.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_nl.rc', - '<(webkit_grit_out_dir)/webkit_strings_nl.rc', - '<(ui_strings_out_dir)/ui_strings_nl.rc', - '<(app_locale_out_dir)/app_locale_settings_nl.rc', - ], - }, - { - 'target_name': 'pl', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_pl.rc', - '<(chrome_grit_out_dir)/generated_resources_pl.rc', - '<(chrome_grit_out_dir)/locale_settings_pl.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_pl.rc', - '<(webkit_grit_out_dir)/webkit_strings_pl.rc', - '<(ui_strings_out_dir)/ui_strings_pl.rc', - '<(app_locale_out_dir)/app_locale_settings_pl.rc', - ], - }, - { - 'target_name': 'pt-BR', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_pt-BR.rc', - '<(chrome_grit_out_dir)/generated_resources_pt-BR.rc', - '<(chrome_grit_out_dir)/locale_settings_pt-BR.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_pt-BR.rc', - '<(webkit_grit_out_dir)/webkit_strings_pt-BR.rc', - '<(ui_strings_out_dir)/ui_strings_pt-BR.rc', - '<(app_locale_out_dir)/app_locale_settings_pt-BR.rc', - ], - }, - { - 'target_name': 'pt-PT', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_pt-PT.rc', - '<(chrome_grit_out_dir)/generated_resources_pt-PT.rc', - '<(chrome_grit_out_dir)/locale_settings_pt-PT.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_pt-PT.rc', - '<(webkit_grit_out_dir)/webkit_strings_pt-PT.rc', - '<(ui_strings_out_dir)/ui_strings_pt-PT.rc', - '<(app_locale_out_dir)/app_locale_settings_pt-PT.rc', - ], - }, - { - 'target_name': 'ro', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ro.rc', - '<(chrome_grit_out_dir)/generated_resources_ro.rc', - '<(chrome_grit_out_dir)/locale_settings_ro.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ro.rc', - '<(webkit_grit_out_dir)/webkit_strings_ro.rc', - '<(ui_strings_out_dir)/ui_strings_ro.rc', - '<(app_locale_out_dir)/app_locale_settings_ro.rc', - ], - }, - { - 'target_name': 'ru', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ru.rc', - '<(chrome_grit_out_dir)/generated_resources_ru.rc', - '<(chrome_grit_out_dir)/locale_settings_ru.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ru.rc', - '<(webkit_grit_out_dir)/webkit_strings_ru.rc', - '<(ui_strings_out_dir)/ui_strings_ru.rc', - '<(app_locale_out_dir)/app_locale_settings_ru.rc', - ], - }, - { - 'target_name': 'sk', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_sk.rc', - '<(chrome_grit_out_dir)/generated_resources_sk.rc', - '<(chrome_grit_out_dir)/locale_settings_sk.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_sk.rc', - '<(webkit_grit_out_dir)/webkit_strings_sk.rc', - '<(ui_strings_out_dir)/ui_strings_sk.rc', - '<(app_locale_out_dir)/app_locale_settings_sk.rc', - ], - }, - { - 'target_name': 'sl', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_sl.rc', - '<(chrome_grit_out_dir)/generated_resources_sl.rc', - '<(chrome_grit_out_dir)/locale_settings_sl.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_sl.rc', - '<(webkit_grit_out_dir)/webkit_strings_sl.rc', - '<(ui_strings_out_dir)/ui_strings_sl.rc', - '<(app_locale_out_dir)/app_locale_settings_sl.rc', - ], - }, - { - 'target_name': 'sr', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_sr.rc', - '<(chrome_grit_out_dir)/generated_resources_sr.rc', - '<(chrome_grit_out_dir)/locale_settings_sr.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_sr.rc', - '<(webkit_grit_out_dir)/webkit_strings_sr.rc', - '<(ui_strings_out_dir)/ui_strings_sr.rc', - '<(app_locale_out_dir)/app_locale_settings_sr.rc', - ], - }, - { - 'target_name': 'sv', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_sv.rc', - '<(chrome_grit_out_dir)/generated_resources_sv.rc', - '<(chrome_grit_out_dir)/locale_settings_sv.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_sv.rc', - '<(webkit_grit_out_dir)/webkit_strings_sv.rc', - '<(ui_strings_out_dir)/ui_strings_sv.rc', - '<(app_locale_out_dir)/app_locale_settings_sv.rc', - ], - }, - { - 'target_name': 'sw', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_sw.rc', - '<(chrome_grit_out_dir)/generated_resources_sw.rc', - '<(chrome_grit_out_dir)/locale_settings_sw.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_sw.rc', - '<(webkit_grit_out_dir)/webkit_strings_sw.rc', - '<(ui_strings_out_dir)/ui_strings_sw.rc', - '<(app_locale_out_dir)/app_locale_settings_sw.rc', - ], - }, - { - 'target_name': 'ta', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_ta.rc', - '<(chrome_grit_out_dir)/generated_resources_ta.rc', - '<(chrome_grit_out_dir)/locale_settings_ta.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_ta.rc', - '<(webkit_grit_out_dir)/webkit_strings_ta.rc', - '<(ui_strings_out_dir)/ui_strings_ta.rc', - '<(app_locale_out_dir)/app_locale_settings_ta.rc', - ], - }, - { - 'target_name': 'te', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_te.rc', - '<(chrome_grit_out_dir)/generated_resources_te.rc', - '<(chrome_grit_out_dir)/locale_settings_te.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_te.rc', - '<(webkit_grit_out_dir)/webkit_strings_te.rc', - '<(ui_strings_out_dir)/ui_strings_te.rc', - '<(app_locale_out_dir)/app_locale_settings_te.rc', - ], - }, - { - 'target_name': 'th', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_th.rc', - '<(chrome_grit_out_dir)/generated_resources_th.rc', - '<(chrome_grit_out_dir)/locale_settings_th.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_th.rc', - '<(webkit_grit_out_dir)/webkit_strings_th.rc', - '<(ui_strings_out_dir)/ui_strings_th.rc', - '<(app_locale_out_dir)/app_locale_settings_th.rc', - ], - }, - { - 'target_name': 'tr', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_tr.rc', - '<(chrome_grit_out_dir)/generated_resources_tr.rc', - '<(chrome_grit_out_dir)/locale_settings_tr.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_tr.rc', - '<(webkit_grit_out_dir)/webkit_strings_tr.rc', - '<(ui_strings_out_dir)/ui_strings_tr.rc', - '<(app_locale_out_dir)/app_locale_settings_tr.rc', - ], - }, - { - 'target_name': 'uk', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_uk.rc', - '<(chrome_grit_out_dir)/generated_resources_uk.rc', - '<(chrome_grit_out_dir)/locale_settings_uk.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_uk.rc', - '<(webkit_grit_out_dir)/webkit_strings_uk.rc', - '<(ui_strings_out_dir)/ui_strings_uk.rc', - '<(app_locale_out_dir)/app_locale_settings_uk.rc', - ], - }, - { - 'target_name': 'vi', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_vi.rc', - '<(chrome_grit_out_dir)/generated_resources_vi.rc', - '<(chrome_grit_out_dir)/locale_settings_vi.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_vi.rc', - '<(webkit_grit_out_dir)/webkit_strings_vi.rc', - '<(ui_strings_out_dir)/ui_strings_vi.rc', - '<(app_locale_out_dir)/app_locale_settings_vi.rc', - ], - }, - { - 'target_name': 'zh-CN', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_zh-CN.rc', - '<(chrome_grit_out_dir)/generated_resources_zh-CN.rc', - '<(chrome_grit_out_dir)/locale_settings_zh-CN.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_zh-CN.rc', - '<(webkit_grit_out_dir)/webkit_strings_zh-CN.rc', - '<(ui_strings_out_dir)/ui_strings_zh-CN.rc', - '<(app_locale_out_dir)/app_locale_settings_zh-CN.rc', - ], - }, - { - 'target_name': 'zh-TW', - 'sources': [ - '<(chrome_grit_out_dir)/platform_locale_settings_zh-TW.rc', - '<(chrome_grit_out_dir)/generated_resources_zh-TW.rc', - '<(chrome_grit_out_dir)/locale_settings_zh-TW.rc', - '<(chrome_grit_out_dir)/<(strings_rc_name)_zh-TW.rc', - '<(webkit_grit_out_dir)/webkit_strings_zh-TW.rc', - '<(ui_strings_out_dir)/ui_strings_zh-TW.rc', - '<(app_locale_out_dir)/app_locale_settings_zh-TW.rc', - ], - }, - ], - }], - ], -} diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 83b6e98..e6aac7b 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -433,11 +433,11 @@ 'chrome_version_resources', 'installer_util', 'installer_util_strings', + 'packed_resources', '../base/base.gyp:base', '../breakpad/breakpad.gyp:breakpad_handler', '../breakpad/breakpad.gyp:breakpad_sender', '../sandbox/sandbox.gyp:sandbox', - 'app/locales/locales.gyp:*', 'app/policy/cloud_policy_codegen.gyp:policy', ], 'sources': [ diff --git a/chrome/installer/mini_installer.gyp b/chrome/installer/mini_installer.gyp index f33432a..4295fb4 100644 --- a/chrome/installer/mini_installer.gyp +++ b/chrome/installer/mini_installer.gyp @@ -193,7 +193,7 @@ '<(PRODUCT_DIR)/ppGoogleNaClPluginChrome.dll', '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', - '<(PRODUCT_DIR)/locales/en-US.dll', + '<(PRODUCT_DIR)/locales/en-US.pak', '<(PRODUCT_DIR)/icudt.dll', ], 'outputs': [ diff --git a/chrome/installer/mini_installer/chrome.release b/chrome/installer/mini_installer/chrome.release index 1457df1..555c3ee 100644 --- a/chrome/installer/mini_installer/chrome.release +++ b/chrome/installer/mini_installer/chrome.release @@ -39,7 +39,7 @@ nacl_irt_x86_32.nexe: %(VersionDir)s\ nacl_irt_x86_64.nexe: %(VersionDir)s\
icudt.dll: %(VersionDir)s\
resources.pak: %(VersionDir)s\
-locales\*.dll: %(VersionDir)s\Locales
+locales\*.pak: %(VersionDir)s\Locales
servers\*.dll: %(VersionDir)s\
servers\*.exe: %(VersionDir)s\
chrome_frame_helper.exe: %(VersionDir)s\
diff --git a/chrome/tools/build/win/FILES b/chrome/tools/build/win/FILES index d00e39d..338415b 100644 --- a/chrome/tools/build/win/FILES +++ b/chrome/tools/build/win/FILES @@ -12,55 +12,55 @@ ppGoogleNaClPluginChrome.dll nacl_irt_x86_32.nexe nacl_irt_x86_64.nexe icudt.dll -locales/ar.dll -locales/bg.dll -locales/bn.dll -locales/ca.dll -locales/cs.dll -locales/da.dll -locales/de.dll -locales/el.dll -locales/en-GB.dll -locales/en-US.dll -locales/es-419.dll -locales/es.dll -locales/et.dll -locales/fi.dll -locales/fil.dll -locales/fr.dll -locales/gu.dll -locales/he.dll -locales/hi.dll -locales/hr.dll -locales/hu.dll -locales/id.dll -locales/it.dll -locales/ja.dll -locales/kn.dll -locales/ko.dll -locales/lt.dll -locales/lv.dll -locales/ml.dll -locales/mr.dll -locales/nb.dll -locales/nl.dll -locales/pl.dll -locales/pt-BR.dll -locales/pt-PT.dll -locales/ro.dll -locales/ru.dll -locales/sk.dll -locales/sl.dll -locales/sr.dll -locales/sv.dll -locales/ta.dll -locales/te.dll -locales/th.dll -locales/tr.dll -locales/uk.dll -locales/vi.dll -locales/zh-CN.dll -locales/zh-TW.dll +locales/ar.pak +locales/bg.pak +locales/bn.pak +locales/ca.pak +locales/cs.pak +locales/da.pak +locales/de.pak +locales/el.pak +locales/en-GB.pak +locales/en-US.pak +locales/es-419.pak +locales/es.pak +locales/et.pak +locales/fi.pak +locales/fil.pak +locales/fr.pak +locales/gu.pak +locales/he.pak +locales/hi.pak +locales/hr.pak +locales/hu.pak +locales/id.pak +locales/it.pak +locales/ja.pak +locales/kn.pak +locales/ko.pak +locales/lt.pak +locales/lv.pak +locales/ml.pak +locales/mr.pak +locales/nb.pak +locales/nl.pak +locales/pl.pak +locales/pt-BR.pak +locales/pt-PT.pak +locales/ro.pak +locales/ru.pak +locales/sk.pak +locales/sl.pak +locales/sr.pak +locales/sv.pak +locales/ta.pak +locales/te.pak +locales/th.pak +locales/tr.pak +locales/uk.pak +locales/vi.pak +locales/zh-CN.pak +locales/zh-TW.pak resources.pak wow_helper.exe gcswf32.dll diff --git a/chrome/tools/build/win/FILES.cfg b/chrome/tools/build/win/FILES.cfg index 4fc4214..35657a3 100644 --- a/chrome/tools/build/win/FILES.cfg +++ b/chrome/tools/build/win/FILES.cfg @@ -71,247 +71,247 @@ FILES = [ 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ar.dll', + 'filename': 'locales/ar.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/bg.dll', + 'filename': 'locales/bg.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/bn.dll', + 'filename': 'locales/bn.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ca.dll', + 'filename': 'locales/ca.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/cs.dll', + 'filename': 'locales/cs.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/da.dll', + 'filename': 'locales/da.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/de.dll', + 'filename': 'locales/de.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/el.dll', + 'filename': 'locales/el.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/en-GB.dll', + 'filename': 'locales/en-GB.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/en-US.dll', + 'filename': 'locales/en-US.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/es-419.dll', + 'filename': 'locales/es-419.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/es.dll', + 'filename': 'locales/es.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/et.dll', + 'filename': 'locales/et.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/fi.dll', + 'filename': 'locales/fi.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/fil.dll', + 'filename': 'locales/fil.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/fr.dll', + 'filename': 'locales/fr.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/gu.dll', + 'filename': 'locales/gu.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/he.dll', + 'filename': 'locales/he.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/hi.dll', + 'filename': 'locales/hi.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/hr.dll', + 'filename': 'locales/hr.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/hu.dll', + 'filename': 'locales/hu.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/id.dll', + 'filename': 'locales/id.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/it.dll', + 'filename': 'locales/it.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ja.dll', + 'filename': 'locales/ja.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/kn.dll', + 'filename': 'locales/kn.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ko.dll', + 'filename': 'locales/ko.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/lt.dll', + 'filename': 'locales/lt.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/lv.dll', + 'filename': 'locales/lv.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ml.dll', + 'filename': 'locales/ml.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/mr.dll', + 'filename': 'locales/mr.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/nb.dll', + 'filename': 'locales/nb.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/nl.dll', + 'filename': 'locales/nl.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/pl.dll', + 'filename': 'locales/pl.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/pt-BR.dll', + 'filename': 'locales/pt-BR.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/pt-PT.dll', + 'filename': 'locales/pt-PT.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ro.dll', + 'filename': 'locales/ro.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ru.dll', + 'filename': 'locales/ru.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/sk.dll', + 'filename': 'locales/sk.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/sl.dll', + 'filename': 'locales/sl.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/sr.dll', + 'filename': 'locales/sr.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/sv.dll', + 'filename': 'locales/sv.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/ta.dll', + 'filename': 'locales/ta.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/te.dll', + 'filename': 'locales/te.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/th.dll', + 'filename': 'locales/th.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/tr.dll', + 'filename': 'locales/tr.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/uk.dll', + 'filename': 'locales/uk.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/vi.dll', + 'filename': 'locales/vi.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/zh-CN.dll', + 'filename': 'locales/zh-CN.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, { - 'filename': 'locales/zh-TW.dll', + 'filename': 'locales/zh-TW.pak', 'arch': ['32bit', '64bit'], 'buildtype': ['dev', 'official'], }, diff --git a/chrome_frame/chrome_frame.gyp b/chrome_frame/chrome_frame.gyp index 2c42b87..47154cf 100644 --- a/chrome_frame/chrome_frame.gyp +++ b/chrome_frame/chrome_frame.gyp @@ -32,9 +32,9 @@ 'target_defaults': { 'dependencies': [ # locales need to be built for the chrome frame binaries to be loadable. - '../chrome/app/locales/locales.gyp:*', '../chrome/chrome.gyp:chrome_resources', '../chrome/chrome.gyp:chrome_strings', + '../chrome/chrome.gyp:packed_resources', '../chrome/chrome.gyp:theme_resources', '../skia/skia.gyp:skia', ], diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc index 8322566..6a68f20 100644 --- a/ui/base/resource/resource_bundle.cc +++ b/ui/base/resource/resource_bundle.cc @@ -4,13 +4,19 @@ #include "ui/base/resource/resource_bundle.h" +#include "base/command_line.h" +#include "base/file_util.h" #include "base/logging.h" +#include "base/path_service.h" #include "base/stl_util.h" #include "base/string_piece.h" #include "base/synchronization/lock.h" #include "build/build_config.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/data_pack.h" +#include "ui/base/ui_base_paths.h" +#include "ui/base/ui_base_switches.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/font.h" #include "ui/gfx/image/image.h" @@ -73,6 +79,17 @@ void ResourceBundle::InitSharedInstanceForTest(const FilePath& path) { } /* static */ +DataPack* ResourceBundle::LoadResourcesDataPak(const FilePath& path) { + DataPack* datapack = new DataPack; + bool success = datapack->Load(path); + if (!success) { + delete datapack; + datapack = NULL; + } + return datapack; +} + +/* static */ std::string ResourceBundle::ReloadSharedInstance( const std::string& pref_locale) { DCHECK(g_shared_instance_ != NULL) << "ResourceBundle not initialized"; @@ -102,6 +119,74 @@ ResourceBundle& ResourceBundle::GetSharedInstance() { return *g_shared_instance_; } +#if !defined(OS_MACOSX) +/* static */ +FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { + FilePath locale_file_path; + PathService::Get(ui::DIR_LOCALES, &locale_file_path); + if (locale_file_path.empty()) + return locale_file_path; + if (app_locale.empty()) + return FilePath(); + locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak"); + if (!file_util::PathExists(locale_file_path)) + return FilePath(); + return locale_file_path; +} +#endif + +std::string ResourceBundle::LoadLocaleResources( + const std::string& pref_locale) { + DCHECK(!locale_resources_data_.get()) << "locale.pak already loaded"; + std::string app_locale = l10n_util::GetApplicationLocale(pref_locale); + FilePath locale_file_path; + CommandLine *command_line = CommandLine::ForCurrentProcess(); + if (command_line->HasSwitch(switches::kLocalePak)) { + locale_file_path = + command_line->GetSwitchValuePath(switches::kLocalePak); + } else { + locale_file_path = GetLocaleFilePath(app_locale); + } + if (locale_file_path.empty()) { + // It's possible that there is no locale.pak. + NOTREACHED(); + return std::string(); + } + locale_resources_data_.reset(LoadResourcesDataPak(locale_file_path)); + CHECK(locale_resources_data_.get()) << "failed to load locale.pak"; + return app_locale; +} + +void ResourceBundle::UnloadLocaleResources() { + locale_resources_data_.reset(); +} + +string16 ResourceBundle::GetLocalizedString(int message_id) { + // If for some reason we were unable to load a resource pak, return an empty + // string (better than crashing). + if (!locale_resources_data_.get()) { + LOG(WARNING) << "locale resources are not loaded"; + return string16(); + } + + base::StringPiece data; + if (!locale_resources_data_->GetStringPiece(message_id, &data)) { + // Fall back on the main data pack (shouldn't be any strings here except in + // unittests). + data = GetRawDataResource(message_id); + if (data.empty()) { + NOTREACHED() << "unable to find resource: " << message_id; + return string16(); + } + } + + // Data pack encodes strings as UTF16. + DCHECK_EQ(data.length() % 2, 0U); + string16 msg(reinterpret_cast<const char16*>(data.data()), + data.length() / 2); + return msg; +} + SkBitmap* ResourceBundle::GetBitmapNamed(int resource_id) { const SkBitmap* bitmap = static_cast<const SkBitmap*>(GetImageNamed(resource_id)); @@ -194,8 +279,7 @@ void ResourceBundle::ReloadFonts() { ResourceBundle::ResourceBundle() : lock_(new base::Lock), resources_data_(NULL), - large_icon_resources_data_(NULL), - locale_resources_data_(NULL) { + large_icon_resources_data_(NULL) { } void ResourceBundle::FreeImages() { diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h index 37d3ef1..7076a6e 100644 --- a/ui/base/resource/resource_bundle.h +++ b/ui/base/resource/resource_bundle.h @@ -83,6 +83,10 @@ class UI_EXPORT ResourceBundle { // Initialize the ResourceBundle using given data pack path for testing. static void InitSharedInstanceForTest(const FilePath& path); + // Load a .pak file. Returns NULL if we fail to load |path|. The caller + // is responsible for deleting up this pointer. + static DataPack* LoadResourcesDataPak(const FilePath& path); + // Changes the locale for an already-initialized ResourceBundle. Future // calls to get strings will return the strings for this new locale. This // has no effect on existing or future image resources. This has no effect @@ -271,7 +275,9 @@ class UI_EXPORT ResourceBundle { // Handles for data sources. DataHandle resources_data_; DataHandle large_icon_resources_data_; - DataHandle locale_resources_data_; +#if !defined(NACL_WIN64) + scoped_ptr<DataPack> locale_resources_data_; +#endif // References to extra data packs loaded via AddDataPackToSharedInstance. std::vector<LoadedDataPack*> data_packs_; diff --git a/ui/base/resource/resource_bundle_dummy.cc b/ui/base/resource/resource_bundle_dummy.cc index 8a2ad08..529e63a 100644 --- a/ui/base/resource/resource_bundle_dummy.cc +++ b/ui/base/resource/resource_bundle_dummy.cc @@ -45,8 +45,7 @@ ResourceBundle& ResourceBundle::GetSharedInstance() { ResourceBundle::ResourceBundle() : lock_(new base::Lock), - resources_data_(NULL), - locale_resources_data_(NULL) { + resources_data_(NULL) { } ResourceBundle::~ResourceBundle() { diff --git a/ui/base/resource/resource_bundle_linux.cc b/ui/base/resource/resource_bundle_linux.cc index d1eb654..0ea8b0d 100644 --- a/ui/base/resource/resource_bundle_linux.cc +++ b/ui/base/resource/resource_bundle_linux.cc @@ -71,20 +71,6 @@ FilePath ResourceBundle::GetLargeIconResourcesFilePath() { return FilePath(); } -// static -FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { - FilePath locale_file_path; - PathService::Get(ui::DIR_LOCALES, &locale_file_path); - if (locale_file_path.empty()) - return locale_file_path; - if (app_locale.empty()) - return FilePath(); - locale_file_path = locale_file_path.AppendASCII(app_locale + ".pak"); - if (!file_util::PathExists(locale_file_path)) - return FilePath(); - return locale_file_path; -} - gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { return *GetPixbufImpl(resource_id, false); } diff --git a/ui/base/resource/resource_bundle_posix.cc b/ui/base/resource/resource_bundle_posix.cc index d23a5b1..2669b68 100644 --- a/ui/base/resource/resource_bundle_posix.cc +++ b/ui/base/resource/resource_bundle_posix.cc @@ -18,20 +18,6 @@ namespace ui { -namespace { - -DataPack* LoadResourcesDataPak(FilePath resources_pak_path) { - DataPack* resources_pak = new DataPack; - bool success = resources_pak->Load(resources_pak_path); - if (!success) { - delete resources_pak; - resources_pak = NULL; - } - return resources_pak; -} - -} // namespace - ResourceBundle::~ResourceBundle() { FreeImages(); UnloadLocaleResources(); @@ -41,11 +27,6 @@ ResourceBundle::~ResourceBundle() { resources_data_ = NULL; } -void ResourceBundle::UnloadLocaleResources() { - delete locale_resources_data_; - locale_resources_data_ = NULL; -} - // static RefCountedStaticMemory* ResourceBundle::LoadResourceBytes( DataHandle module, int resource_id) { @@ -69,32 +50,6 @@ base::StringPiece ResourceBundle::GetRawDataResource(int resource_id) const { return data; } -string16 ResourceBundle::GetLocalizedString(int message_id) { - // If for some reason we were unable to load a resource pak, return an empty - // string (better than crashing). - if (!locale_resources_data_) { - LOG(WARNING) << "locale resources are not loaded"; - return string16(); - } - - base::StringPiece data; - if (!locale_resources_data_->GetStringPiece(message_id, &data)) { - // Fall back on the main data pack (shouldn't be any strings here except in - // unittests). - data = GetRawDataResource(message_id); - if (data.empty()) { - NOTREACHED() << "unable to find resource: " << message_id; - return string16(); - } - } - - // Data pack encodes strings as UTF16. - DCHECK_EQ(data.length() % 2, 0U); - string16 msg(reinterpret_cast<const char16*>(data.data()), - data.length() / 2); - return msg; -} - void ResourceBundle::LoadCommonResources() { DCHECK(!resources_data_) << "chrome.pak already loaded"; FilePath resources_file_path = GetResourcesFilePath(); @@ -111,34 +66,12 @@ void ResourceBundle::LoadCommonResources() { } } -std::string ResourceBundle::LoadLocaleResources( - const std::string& pref_locale) { - DCHECK(!locale_resources_data_) << "locale.pak already loaded"; - std::string app_locale = l10n_util::GetApplicationLocale(pref_locale); - FilePath locale_file_path; - CommandLine *command_line = CommandLine::ForCurrentProcess(); - if (command_line->HasSwitch(switches::kLocalePak)) { - locale_file_path = - command_line->GetSwitchValuePath(switches::kLocalePak); - } else { - locale_file_path = GetLocaleFilePath(app_locale); - } - if (locale_file_path.empty()) { - // It's possible that there is no locale.pak. - NOTREACHED(); - return std::string(); - } - locale_resources_data_ = LoadResourcesDataPak(locale_file_path); - CHECK(locale_resources_data_) << "failed to load locale.pak"; - return app_locale; -} - void ResourceBundle::LoadTestResources(const FilePath& path) { DCHECK(!resources_data_) << "resource already loaded"; // Use the given resource pak for both common and localized resources. resources_data_ = LoadResourcesDataPak(path); - locale_resources_data_ = LoadResourcesDataPak(path); + locale_resources_data_.reset(LoadResourcesDataPak(path)); } } // namespace ui diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc index d5cbaad..0024f5d 100644 --- a/ui/base/resource/resource_bundle_win.cc +++ b/ui/base/resource/resource_bundle_win.cc @@ -7,17 +7,13 @@ #include <atlbase.h> #include "base/debug/stack_trace.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/path_service.h" #include "base/resource_util.h" #include "base/stl_util.h" #include "base/string_piece.h" -#include "base/synchronization/lock.h" #include "base/win/windows_version.h" -#include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/data_pack.h" -#include "ui/base/ui_base_paths.h" #include "ui/gfx/font.h" namespace ui { @@ -55,50 +51,11 @@ void ResourceBundle::LoadCommonResources() { } } -std::string ResourceBundle::LoadLocaleResources( - const std::string& pref_locale) { - DCHECK(NULL == locale_resources_data_) << "locale dll already loaded"; - const std::string app_locale = l10n_util::GetApplicationLocale(pref_locale); - const FilePath& locale_path = GetLocaleFilePath(app_locale); - if (locale_path.value().empty()) { - // It's possible that there are no locale dlls found, in which case we just - // return. - NOTREACHED(); - return std::string(); - } - - // The dll should only have resources, not executable code. - locale_resources_data_ = LoadLibraryEx(locale_path.value().c_str(), NULL, - GetDataDllLoadFlags()); - DCHECK(locale_resources_data_ != NULL) << - "unable to load generated resources"; - return app_locale; -} - void ResourceBundle::LoadTestResources(const FilePath& path) { // On Windows, the test resources are normally compiled into the binary // itself. } -void ResourceBundle::UnloadLocaleResources() { - if (locale_resources_data_) { - BOOL rv = FreeLibrary(locale_resources_data_); - DCHECK(rv); - locale_resources_data_ = NULL; - } -} - -// static -FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale) { - FilePath locale_path; - PathService::Get(ui::DIR_LOCALES, &locale_path); - - if (app_locale.empty()) - return FilePath(); - - return locale_path.AppendASCII(app_locale + ".dll"); -} - // static RefCountedStaticMemory* ResourceBundle::LoadResourceBytes( DataHandle module, int resource_id) { @@ -125,20 +82,26 @@ HICON ResourceBundle::LoadThemeIcon(int icon_id) { base::StringPiece ResourceBundle::GetRawDataResource(int resource_id) const { void* data_ptr; size_t data_size; + base::StringPiece data; if (base::GetDataResourceFromModule(resources_data_, resource_id, &data_ptr, &data_size)) { return base::StringPiece(static_cast<const char*>(data_ptr), data_size); - } else if (locale_resources_data_ && - base::GetDataResourceFromModule(locale_resources_data_, - resource_id, - &data_ptr, - &data_size)) { - return base::StringPiece(static_cast<const char*>(data_ptr), data_size); + } else if (locale_resources_data_.get() && + locale_resources_data_->GetStringPiece(resource_id, &data)) { + return data; + } + + // TODO(tony): Remove this ATL code once we remove the strings in + // chrome.dll. + const ATLSTRINGRESOURCEIMAGE* image = AtlGetStringResourceImage( + resources_data_, resource_id); + if (image) { + return base::StringPiece(reinterpret_cast<const char*>(image->achString), + image->nLength * 2); } - base::StringPiece data; for (size_t i = 0; i < data_packs_.size(); ++i) { if (data_packs_[i]->GetStringPiece(resource_id, &data)) return data; @@ -152,36 +115,6 @@ HCURSOR ResourceBundle::LoadCursor(int cursor_id) { return ::LoadCursor(resources_data_, MAKEINTRESOURCE(cursor_id)); } -string16 ResourceBundle::GetLocalizedString(int message_id) { - // If for some reason we were unable to load a resource dll, return an empty - // string (better than crashing). - if (!locale_resources_data_) { - base::debug::StackTrace().PrintBacktrace(); // See http://crbug.com/21925. - LOG(WARNING) << "locale resources are not loaded"; - return string16(); - } - - DCHECK(IS_INTRESOURCE(message_id)); - - // Get a reference directly to the string resource. - HINSTANCE hinstance = locale_resources_data_; - const ATLSTRINGRESOURCEIMAGE* image = AtlGetStringResourceImage(hinstance, - message_id); - if (!image) { - // Fall back on the current module (shouldn't be any strings here except - // in unittests). - image = AtlGetStringResourceImage(resources_data_, message_id); - if (!image) { - // See http://crbug.com/21925. - base::debug::StackTrace().PrintBacktrace(); - NOTREACHED() << "unable to find resource: " << message_id; - return string16(); - } - } - // Copy into a string16 and return. - return string16(image->achString, image->nLength); -} - // Windows only uses SkBitmap for gfx::Image, so this is the same as // GetImageNamed. gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id) { diff --git a/views/views.gyp b/views/views.gyp index 7e5ca8a..786eac0 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -516,7 +516,7 @@ # 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/app/locales/locales.gyp:en-US', + '../chrome/chrome.gyp:packed_resources', ], 'link_settings': { 'libraries': [ |