Adding localization files to the mac bundles for CRD.
R=dpranke@chromium.org, sergeyu@chromium.org
BUG=622415
Review-Url: https://codereview.chromium.org/2111213002
Cr-Commit-Position: refs/heads/master@{#403289}
diff --git a/remoting/host/BUILD.gn b/remoting/host/BUILD.gn
index df6ce1f..e85af02 100644
--- a/remoting/host/BUILD.gn
+++ b/remoting/host/BUILD.gn
@@ -682,6 +682,19 @@
"//build/win:default_exe_manifest",
]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":native_messaging_host_strings_${locale}_bundle_data",
+ ":remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ ":remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
+
sources = [
"$root_gen_dir/remoting/version.rc",
"setup/me2me_native_messaging_host_entry_point.cc",
@@ -799,6 +812,22 @@
]
}
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_host_locale_${locale}_bundle_data") {
+ sources = [
+ "$root_build_dir/remoting/resources/$locale.lproj/locale.pak",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ "//remoting/resources:copy_locales",
+ ]
+ }
+ }
+ }
+
action_foreach("remoting_infoplist_strings") {
sources = [
"installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2",
@@ -920,6 +949,23 @@
app_target_type = "executable"
}
+ if (is_mac) {
+ # remoting_me2me_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_me2me_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remoting_me2me_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+ }
+
target(app_target_type, "remoting_me2me_host") {
if (is_mac) {
extra_configs = [ "//remoting:version" ]
@@ -943,6 +989,18 @@
"//build/config/sanitizers:deps",
"//remoting/resources",
]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":remoting_host_locale_${locale}_bundle_data",
+ ":remoting_me2me_host_strings_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ ":remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
}
if (is_linux) {
@@ -974,6 +1032,23 @@
}
}
+ if (is_mac) {
+ # native_messaging_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("native_messaging_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/native_messaging_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+ }
+
target(app_target_type, "native_messaging_host") {
if (is_mac) {
info_plist = "setup/native_messaging_host-Info.plist"
@@ -997,6 +1072,16 @@
"//remoting/host/setup",
]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":native_messaging_host_strings_${locale}_bundle_data",
+ ":remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [ "//remoting/resources:copy_locales" ]
+ }
+
# The |major|, |build| and |patch| versions are inherited from Chrome.
# Since Chrome's |minor| version is always '0', we replace it with a
# Chromoting-specific patch version.
@@ -1284,6 +1369,21 @@
_uninstaller_plist =
"installer/mac/uninstaller/remoting_uninstaller-Info.plist"
+ # remoting_uninstaller-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remoting_uninstaller_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remoting_uninstaller-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ ":remoting_infoplist_strings",
+ ]
+ }
+ }
+
mac_app_bundle("remoting_host_uninstaller") {
info_plist = _uninstaller_plist
@@ -1312,6 +1412,9 @@
":remoting_infoplist_strings",
"//base",
]
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_uninstaller_strings_${locale}_bundle_data" ]
+ }
}
mac_xib_bundle_data("remoting_host_uninstaller_xibs") {
@@ -1377,8 +1480,12 @@
":remoting_host_prefpane_xibs",
":remoting_infoplist_strings",
"//remoting/base",
+ "//remoting/resources:copy_locales",
"//third_party/jsoncpp",
]
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [ ":remoting_host_prefpane_strings_${locale}_bundle_data" ]
+ }
}
bundle_data("remoting_host_prefpane_plist") {
diff --git a/remoting/host/it2me/BUILD.gn b/remoting/host/it2me/BUILD.gn
index 0c70d24..04c8488 100644
--- a/remoting/host/it2me/BUILD.gn
+++ b/remoting/host/it2me/BUILD.gn
@@ -5,6 +5,7 @@
import("//build/config/features.gni")
import("//remoting/remoting_enable.gni")
import("//remoting/remoting_srcs.gni")
+import("//remoting/remoting_locales.gni")
if (is_win) {
import("//remoting/host/predefines_win.gni")
@@ -76,6 +77,21 @@
} else {
if (is_mac) {
app_target_type = "mac_app_bundle"
+
+ # remote_assistance_host-InfoPlist.strings
+ foreach(locale, remoting_locales_with_underscores) {
+ bundle_data("remote_assistance_host_strings_${locale}_bundle_data") {
+ sources = [
+ "$root_gen_dir/remoting/host/remote_assistance_host-InfoPlist.strings/$locale.lproj/InfoPlist.strings",
+ ]
+ outputs = [
+ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
+ ]
+ deps = [
+ "//remoting/host:remoting_infoplist_strings",
+ ]
+ }
+ }
} else {
app_target_type = "executable"
}
@@ -108,6 +124,18 @@
"//remoting/proto",
"//ui/gfx",
]
+ if (is_mac) {
+ foreach(locale, remoting_locales_with_underscores) {
+ deps += [
+ ":remote_assistance_host_strings_${locale}_bundle_data",
+ "//remoting/host:remoting_host_locale_${locale}_bundle_data",
+ ]
+ }
+ deps += [
+ "//remoting/host:remoting_infoplist_strings",
+ "//remoting/resources:copy_locales",
+ ]
+ }
if (enable_webrtc) {
deps += [ "//third_party/libjingle:libjingle_webrtc" ]