diff options
author | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 06:00:51 +0000 |
---|---|---|
committer | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-28 06:00:51 +0000 |
commit | bcc23bbe7a05130a9fba01253ddacc031326820d (patch) | |
tree | 517b2296510264f1020bca4140caa2ed5fa5a489 | |
parent | 9692d128464bf0a491e50d8757a57727ff2e1c2f (diff) | |
download | chromium_src-bcc23bbe7a05130a9fba01253ddacc031326820d.zip chromium_src-bcc23bbe7a05130a9fba01253ddacc031326820d.tar.gz chromium_src-bcc23bbe7a05130a9fba01253ddacc031326820d.tar.bz2 |
Initialize the ICU library and include the ICU data file in our build.
Chrome changed its build process to use a separate ICU file rather than linking it statically in our binaries (see https://code.google.com/p/chromium/issues/detail?id=72633 for the full history around that).
Although this only seems to be *triggered* on Linux (due to platform differences in ResourceLoader and our own resources_*.cc files), there seem to be hidden dependencies on this all around base, so I intentionally chose to do this for all platforms now, rather than having to track random random failures in file_util calls due to this missing intiialization later on.
I don't think we can get away with simply disabling the icu data file flag in our directory, since we'll eventually get linked with other components that have that flag enabled. So the safest option seems to be to just accept it, call InitializeICU in all platforms, and include the datafile in all our packages.
BUG=337698
Review URL: https://codereview.chromium.org/131973023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247406 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/host/host_main.cc | 4 | ||||
-rw-r--r-- | remoting/host/installer/linux/Makefile | 3 | ||||
-rw-r--r-- | remoting/host/installer/win/chromoting.wxs | 9 | ||||
-rw-r--r-- | remoting/remoting.gyp | 4 |
4 files changed, 20 insertions, 0 deletions
diff --git a/remoting/host/host_main.cc b/remoting/host/host_main.cc index a3d163e..2e7dc66 100644 --- a/remoting/host/host_main.cc +++ b/remoting/host/host_main.cc @@ -12,6 +12,7 @@ #include "base/at_exit.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/i18n/icu_util.h" #include "base/logging.h" #include "base/strings/string_util.h" #include "base/strings/stringize_macros.h" @@ -235,6 +236,9 @@ int HostMain(int argc, char** argv) { return kUsageExitCode; } + // Required to find the ICU data file, used by some file_util routines. + base::i18n::InitializeICU(); + remoting::LoadResources(""); // Invoke the entry point. diff --git a/remoting/host/installer/linux/Makefile b/remoting/host/installer/linux/Makefile index fd56052..6fc595f 100644 --- a/remoting/host/installer/linux/Makefile +++ b/remoting/host/installer/linux/Makefile @@ -54,6 +54,9 @@ install: install "$(REMOTE_ASSISTANCE_PROGNAME)" \ "$(INSTALL_DIR)/remote-assistance-host" + install -m 0644 \ + "$(RELEASE)/icudtl.dat" "$(INSTALL_DIR)/icudtl.dat" + for locale in $(ls $(RELEASE)/remoting_locales); do \ install "$(RELEASE)/remoting_locales/$locale \ "$(INSTALL_DIR)/remoting_locales/$locale; \ diff --git a/remoting/host/installer/win/chromoting.wxs b/remoting/host/installer/win/chromoting.wxs index bd95170..4d25291 100644 --- a/remoting/host/installer/win/chromoting.wxs +++ b/remoting/host/installer/win/chromoting.wxs @@ -182,6 +182,14 @@ Vital="yes"/> </Component> + <Component Id="icudtl" Guid="*"> + <File Id="icudtl.dat" + DiskId="1" + KeyPath="yes" + Name="icudtl.dat" + Vital="yes"/> + </Component> + <Component Id="remoting_host" Guid="*"> <File Id="remoting_host.exe" DiskId="1" @@ -564,6 +572,7 @@ <?if $(var.OfficialBuild) != 0 ?> <ComponentRef Id="omaha_registration"/> <?endif?> + <ComponentRef Id="icudtl"/> <ComponentRef Id="remoting_core"/> <ComponentRef Id="remoting_desktop"/> <ComponentRef Id="remoting_host"/> diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index eeb9882..117b435 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -866,6 +866,7 @@ 'target_name': 'remoting_me2me_host_deb_installer', 'type': 'none', 'dependencies': [ + '<(icu_gyp_path):icudata', 'remoting_it2me_native_messaging_host', 'remoting_me2me_host', 'remoting_me2me_native_messaging_host', @@ -1729,6 +1730,7 @@ 'target_name': 'remoting_me2me_host_archive', 'type': 'none', 'dependencies': [ + '<(icu_gyp_path):icudata', 'remoting_core', 'remoting_desktop', 'remoting_host_exe', @@ -1766,12 +1768,14 @@ '<(sas_dll_path)/sas.dll', '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json', 'resources/chromoting.ico', + '<(PRODUCT_DIR)/icudtl.dat', ], 'generated_files_dst': [ '<@(_compiled_inputs_dst)', 'files/sas.dll', 'files/com.google.chrome.remote_desktop.json', 'files/chromoting.ico', + 'files/icudtl.dat', ], 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip', 'outputs': [ |