Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: chromecast/BUILD.gn

Issue 2773453003: [Chromecast] Remove chromecast_repack_locales.py. (Closed)
Patch Set: Even more clean-up! Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/app/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/BUILD.gn
diff --git a/chromecast/BUILD.gn b/chromecast/BUILD.gn
index 223c541ffbbd3e75a81243c93206b4d319fdf52f..98f93589239eedfafb505b7d2f788e14623bfe60 100644
--- a/chromecast/BUILD.gn
+++ b/chromecast/BUILD.gn
@@ -409,56 +409,40 @@ repack("cast_shell_pak") {
}
}
-action("chromecast_locales_pak") {
- script = "//chromecast/tools/build/chromecast_repack_locales.py"
-
- # .pak resources in |grit_out_dir| with the same suffix are packed into a
- # single resource and placed in |locales_dir|. The original .pak resources
- # are generated by this target's dependencies.
- grit_out_dir = "$root_gen_dir/chromecast_strings"
- locales_dir = "$root_out_dir/chromecast_locales"
-
- sources = []
- outputs = []
-
- # |locales| is an array of suffixes declared in //build/config/locals.gni.
- foreach(locale, locales) {
- sources += [ "$grit_out_dir/chromecast_settings_$locale.pak" ]
- outputs += [ "$locales_dir/$locale.pak" ]
- }
- deps = [
- "//chromecast/app:chromecast_settings",
- ]
+# Intermediate targets that repack grit resources by locale. For each locale
+# in |locales_with_fake_bidi| (see //build/config/locales.gni), all resources
+# are packed into a single .pak file in an output directory. These targets
+# should not be depended on directly; depend on ":chromecast_locales_pak"
+# instead.
+foreach(locale, locales_with_fake_bidi) {
+ repack("_cast_repack_${locale}") {
+ visibility = [ ":chromecast_locales_pak" ]
+ output = "$root_out_dir/chromecast_locales/${locale}.pak"
+ sources = [
+ "$root_gen_dir/chromecast/app/chromecast_settings_${locale}.pak",
+ ]
+ deps = [
+ "//chromecast/app:chromecast_settings",
+ ]
+
+ if (chromecast_branding != "public") {
+ sources += [ "$root_gen_dir/chromecast/internal/webui/app_strings_${locale}.pak" ]
+ deps += [ "//chromecast/internal/webui:chromecast_app_strings" ]
- # Include string and other localized resources for internal builds.
- if (chromecast_branding != "public") {
- foreach(locale, locales) {
- sources += [ "$grit_out_dir/app_strings_$locale.pak" ]
if (enable_chromecast_webui) {
- sources += [ "$grit_out_dir/webui_localized_$locale.pak" ]
+ sources += [ "$root_gen_dir/chromecast/internal/webui/webui_localized_${locale}.pak" ]
+ deps += [ "//chromecast/internal/webui:chromecast_webui_localized" ]
}
}
- deps += [ "//chromecast/internal/webui:chromecast_app_strings" ]
- if (enable_chromecast_webui) {
- deps += [ "//chromecast/internal/webui:chromecast_webui_localized" ]
- }
}
+}
- # This script only accepts the following values for branding:
- assert(chromecast_branding == "public" || chromecast_branding == "internal" ||
- chromecast_branding == "google")
- args = [
- "-b",
- "$chromecast_branding",
- "-g",
- rebase_path("$root_gen_dir/chromecast_strings"),
- "-x",
- rebase_path("$root_out_dir/chromecast_locales"),
- ]
- if (enable_chromecast_webui) {
- args += [ "-u" ]
+# A meta-target which repacks resources by locale.
+group("chromecast_locales_pak") {
+ deps = []
+ foreach(locale, locales_with_fake_bidi) {
+ deps += [ ":_cast_repack_${locale}" ]
}
- args += locales
}
buildflag_header("chromecast_features") {
« no previous file with comments | « no previous file | chromecast/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698