OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/android/rules.gni") | 6 import("//build/config/android/rules.gni") |
7 import("//build/config/locales.gni") | 7 import("//build/config/locales.gni") |
8 import("//tools/grit/repack.gni") | 8 import("//tools/grit/repack.gni") |
9 import("//tools/resources/generate_resource_whitelist.gni") | 9 import("//tools/resources/generate_resource_whitelist.gni") |
10 import("system_webview_apk_tmpl.gni") | 10 import("system_webview_apk_tmpl.gni") |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 if (enable_resource_whitelist_generation) { | 48 if (enable_resource_whitelist_generation) { |
49 repack_whitelist = system_webview_pak_whitelist | 49 repack_whitelist = system_webview_pak_whitelist |
50 deps = [ | 50 deps = [ |
51 ":system_webview_pak_whitelist", | 51 ":system_webview_pak_whitelist", |
52 ] | 52 ] |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 locale_pak_resources("locale_paks") { | 56 locale_pak_resources("locale_paks") { |
57 sources = [ | 57 sources = [] |
58 "$root_out_dir/android_webview/locales/am.pak", | 58 foreach(_locale, locales) { |
59 "$root_out_dir/android_webview/locales/ar.pak", | 59 sources += [ "$root_out_dir/android_webview/locales/$_locale.pak" ] |
60 "$root_out_dir/android_webview/locales/bg.pak", | 60 } |
61 "$root_out_dir/android_webview/locales/bn.pak", | |
62 "$root_out_dir/android_webview/locales/ca.pak", | |
63 "$root_out_dir/android_webview/locales/cs.pak", | |
64 "$root_out_dir/android_webview/locales/da.pak", | |
65 "$root_out_dir/android_webview/locales/de.pak", | |
66 "$root_out_dir/android_webview/locales/el.pak", | |
67 "$root_out_dir/android_webview/locales/en-GB.pak", | |
68 "$root_out_dir/android_webview/locales/en-US.pak", | |
69 "$root_out_dir/android_webview/locales/es-419.pak", | |
70 "$root_out_dir/android_webview/locales/es.pak", | |
71 "$root_out_dir/android_webview/locales/et.pak", | |
72 "$root_out_dir/android_webview/locales/fa.pak", | |
73 "$root_out_dir/android_webview/locales/fi.pak", | |
74 "$root_out_dir/android_webview/locales/fil.pak", | |
75 "$root_out_dir/android_webview/locales/fr.pak", | |
76 "$root_out_dir/android_webview/locales/gu.pak", | |
77 "$root_out_dir/android_webview/locales/he.pak", | |
78 "$root_out_dir/android_webview/locales/hi.pak", | |
79 "$root_out_dir/android_webview/locales/hr.pak", | |
80 "$root_out_dir/android_webview/locales/hu.pak", | |
81 "$root_out_dir/android_webview/locales/id.pak", | |
82 "$root_out_dir/android_webview/locales/it.pak", | |
83 "$root_out_dir/android_webview/locales/ja.pak", | |
84 "$root_out_dir/android_webview/locales/kn.pak", | |
85 "$root_out_dir/android_webview/locales/ko.pak", | |
86 "$root_out_dir/android_webview/locales/lt.pak", | |
87 "$root_out_dir/android_webview/locales/lv.pak", | |
88 "$root_out_dir/android_webview/locales/ml.pak", | |
89 "$root_out_dir/android_webview/locales/mr.pak", | |
90 "$root_out_dir/android_webview/locales/ms.pak", | |
91 "$root_out_dir/android_webview/locales/nb.pak", | |
92 "$root_out_dir/android_webview/locales/nl.pak", | |
93 "$root_out_dir/android_webview/locales/pl.pak", | |
94 "$root_out_dir/android_webview/locales/pt-BR.pak", | |
95 "$root_out_dir/android_webview/locales/pt-PT.pak", | |
96 "$root_out_dir/android_webview/locales/ro.pak", | |
97 "$root_out_dir/android_webview/locales/ru.pak", | |
98 "$root_out_dir/android_webview/locales/sk.pak", | |
99 "$root_out_dir/android_webview/locales/sl.pak", | |
100 "$root_out_dir/android_webview/locales/sr.pak", | |
101 "$root_out_dir/android_webview/locales/sv.pak", | |
102 "$root_out_dir/android_webview/locales/sw.pak", | |
103 "$root_out_dir/android_webview/locales/ta.pak", | |
104 "$root_out_dir/android_webview/locales/te.pak", | |
105 "$root_out_dir/android_webview/locales/th.pak", | |
106 "$root_out_dir/android_webview/locales/tr.pak", | |
107 "$root_out_dir/android_webview/locales/uk.pak", | |
108 "$root_out_dir/android_webview/locales/vi.pak", | |
109 "$root_out_dir/android_webview/locales/zh-CN.pak", | |
110 "$root_out_dir/android_webview/locales/zh-TW.pak", | |
111 ] | |
112 deps = [ | 61 deps = [ |
113 ":repack_locales", | 62 ":repack_locales", |
114 ] | 63 ] |
115 } | 64 } |
116 | 65 |
117 repack("repack_pack") { | 66 repack("repack_pack") { |
118 sources = [ | 67 sources = [ |
119 "$root_gen_dir/blink/public/resources/blink_resources.pak", | 68 "$root_gen_dir/blink/public/resources/blink_resources.pak", |
120 "$root_gen_dir/content/content_resources.pak", | 69 "$root_gen_dir/content/content_resources.pak", |
121 "$root_gen_dir/net/net_resources.pak", | 70 "$root_gen_dir/net/net_resources.pak", |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 outputs = [ | 174 outputs = [ |
226 "grit/aw_resources.h", | 175 "grit/aw_resources.h", |
227 "aw_resources.pak", | 176 "aw_resources.pak", |
228 ] | 177 ] |
229 } | 178 } |
230 | 179 |
231 grit("generate_aw_strings") { | 180 grit("generate_aw_strings") { |
232 source = "ui/aw_strings.grd" | 181 source = "ui/aw_strings.grd" |
233 outputs = [ | 182 outputs = [ |
234 "grit/aw_strings.h", | 183 "grit/aw_strings.h", |
235 "aw_strings_am.pak", | |
236 "aw_strings_ar.pak", | |
237 "aw_strings_bg.pak", | |
238 "aw_strings_bn.pak", | |
239 "aw_strings_ca.pak", | |
240 "aw_strings_cs.pak", | |
241 "aw_strings_da.pak", | |
242 "aw_strings_de.pak", | |
243 "aw_strings_el.pak", | |
244 "aw_strings_en-US.pak", | |
245 "aw_strings_en-GB.pak", | |
246 "aw_strings_es.pak", | |
247 "aw_strings_es-419.pak", | |
248 "aw_strings_et.pak", | |
249 "aw_strings_fa.pak", | |
250 "aw_strings_fi.pak", | |
251 "aw_strings_fil.pak", | |
252 "aw_strings_fr.pak", | |
253 "aw_strings_gu.pak", | |
254 "aw_strings_he.pak", | |
255 "aw_strings_hi.pak", | |
256 "aw_strings_hr.pak", | |
257 "aw_strings_hu.pak", | |
258 "aw_strings_id.pak", | |
259 "aw_strings_it.pak", | |
260 "aw_strings_ja.pak", | |
261 "aw_strings_kn.pak", | |
262 "aw_strings_ko.pak", | |
263 "aw_strings_lt.pak", | |
264 "aw_strings_lv.pak", | |
265 "aw_strings_ml.pak", | |
266 "aw_strings_mr.pak", | |
267 "aw_strings_ms.pak", | |
268 "aw_strings_nl.pak", | |
269 "aw_strings_nb.pak", | |
270 "aw_strings_pl.pak", | |
271 "aw_strings_pt-BR.pak", | |
272 "aw_strings_pt-PT.pak", | |
273 "aw_strings_ro.pak", | |
274 "aw_strings_ru.pak", | |
275 "aw_strings_sk.pak", | |
276 "aw_strings_sl.pak", | |
277 "aw_strings_sr.pak", | |
278 "aw_strings_sv.pak", | |
279 "aw_strings_sw.pak", | |
280 "aw_strings_ta.pak", | |
281 "aw_strings_te.pak", | |
282 "aw_strings_th.pak", | |
283 "aw_strings_tr.pak", | |
284 "aw_strings_uk.pak", | |
285 "aw_strings_vi.pak", | |
286 "aw_strings_zh-CN.pak", | |
287 "aw_strings_zh-TW.pak", | |
288 ] | 184 ] |
| 185 foreach(_locale, locales) { |
| 186 outputs += [ "aw_strings_${_locale}.pak" ] |
| 187 } |
289 } | 188 } |
290 | 189 |
291 grit("generate_components_strings") { | 190 grit("generate_components_strings") { |
292 source = "../components/components_strings.grd" | 191 source = "../components/components_strings.grd" |
293 | 192 |
294 # components_strings contains strings from all components. WebView | 193 # components_strings contains strings from all components. WebView |
295 # will never display most of them, so we try to limit the included | 194 # will never display most of them, so we try to limit the included |
296 # strings. This whitelist trims about 50% more than the compile-based | 195 # strings. This whitelist trims about 50% more than the compile-based |
297 # whitelist generated by :system_webview_pak_whitelist. | 196 # whitelist generated by :system_webview_pak_whitelist. |
298 whitelist = rebase_path("ui/grit_components_whitelist.txt") | 197 whitelist = rebase_path("ui/grit_components_whitelist.txt") |
299 inputs = [ | 198 inputs = [ |
300 whitelist, | 199 whitelist, |
301 ] | 200 ] |
302 grit_flags = [ | 201 grit_flags = [ |
303 "-w", | 202 "-w", |
304 whitelist, | 203 whitelist, |
305 ] | 204 ] |
306 outputs = [ | 205 outputs = [ |
307 "grit/components_strings.h", | 206 "grit/components_strings.h", |
308 "components_strings_am.pak", | |
309 "components_strings_ar.pak", | |
310 "components_strings_bg.pak", | |
311 "components_strings_bn.pak", | |
312 "components_strings_ca.pak", | |
313 "components_strings_cs.pak", | |
314 "components_strings_da.pak", | |
315 "components_strings_de.pak", | |
316 "components_strings_el.pak", | |
317 "components_strings_en-GB.pak", | |
318 "components_strings_en-US.pak", | |
319 "components_strings_es.pak", | |
320 "components_strings_es-419.pak", | |
321 "components_strings_et.pak", | |
322 "components_strings_fa.pak", | |
323 "components_strings_fake-bidi.pak", | |
324 "components_strings_fi.pak", | |
325 "components_strings_fil.pak", | |
326 "components_strings_fr.pak", | |
327 "components_strings_gu.pak", | |
328 "components_strings_he.pak", | |
329 "components_strings_hi.pak", | |
330 "components_strings_hr.pak", | |
331 "components_strings_hu.pak", | |
332 "components_strings_id.pak", | |
333 "components_strings_it.pak", | |
334 "components_strings_ja.pak", | |
335 "components_strings_kn.pak", | |
336 "components_strings_ko.pak", | |
337 "components_strings_lt.pak", | |
338 "components_strings_lv.pak", | |
339 "components_strings_ml.pak", | |
340 "components_strings_mr.pak", | |
341 "components_strings_ms.pak", | |
342 "components_strings_nl.pak", | |
343 "components_strings_nb.pak", | |
344 "components_strings_pl.pak", | |
345 "components_strings_pt-BR.pak", | |
346 "components_strings_pt-PT.pak", | |
347 "components_strings_ro.pak", | |
348 "components_strings_ru.pak", | |
349 "components_strings_sk.pak", | |
350 "components_strings_sl.pak", | |
351 "components_strings_sr.pak", | |
352 "components_strings_sv.pak", | |
353 "components_strings_sw.pak", | |
354 "components_strings_ta.pak", | |
355 "components_strings_te.pak", | |
356 "components_strings_th.pak", | |
357 "components_strings_tr.pak", | |
358 "components_strings_uk.pak", | |
359 "components_strings_vi.pak", | |
360 "components_strings_zh-CN.pak", | |
361 "components_strings_zh-TW.pak", | |
362 "java/res/values-am/components_strings.xml", | 207 "java/res/values-am/components_strings.xml", |
363 "java/res/values-ar/components_strings.xml", | 208 "java/res/values-ar/components_strings.xml", |
364 "java/res/values-bg/components_strings.xml", | 209 "java/res/values-bg/components_strings.xml", |
365 "java/res/values-ca/components_strings.xml", | 210 "java/res/values-ca/components_strings.xml", |
366 "java/res/values-cs/components_strings.xml", | 211 "java/res/values-cs/components_strings.xml", |
367 "java/res/values-da/components_strings.xml", | 212 "java/res/values-da/components_strings.xml", |
368 "java/res/values-de/components_strings.xml", | 213 "java/res/values-de/components_strings.xml", |
369 "java/res/values-el/components_strings.xml", | 214 "java/res/values-el/components_strings.xml", |
370 "java/res/values-en-rGB/components_strings.xml", | 215 "java/res/values-en-rGB/components_strings.xml", |
371 "java/res/values-es-rUS/components_strings.xml", | 216 "java/res/values-es-rUS/components_strings.xml", |
(...skipping 25 matching lines...) Expand all Loading... |
397 "java/res/values-sw/components_strings.xml", | 242 "java/res/values-sw/components_strings.xml", |
398 "java/res/values-th/components_strings.xml", | 243 "java/res/values-th/components_strings.xml", |
399 "java/res/values-tl/components_strings.xml", | 244 "java/res/values-tl/components_strings.xml", |
400 "java/res/values-tr/components_strings.xml", | 245 "java/res/values-tr/components_strings.xml", |
401 "java/res/values-uk/components_strings.xml", | 246 "java/res/values-uk/components_strings.xml", |
402 "java/res/values-vi/components_strings.xml", | 247 "java/res/values-vi/components_strings.xml", |
403 "java/res/values-zh-rCN/components_strings.xml", | 248 "java/res/values-zh-rCN/components_strings.xml", |
404 "java/res/values-zh-rTW/components_strings.xml", | 249 "java/res/values-zh-rTW/components_strings.xml", |
405 "java/res/values/components_strings.xml", | 250 "java/res/values/components_strings.xml", |
406 ] | 251 ] |
| 252 foreach(_locale, locales) { |
| 253 outputs += [ "components_strings_${_locale}.pak" ] |
| 254 } |
407 } | 255 } |
408 | 256 |
409 source_set("webview_entry_point") { | 257 source_set("webview_entry_point") { |
410 deps = [ | 258 deps = [ |
411 ":common", | 259 ":common", |
412 ] | 260 ] |
413 sources = [ | 261 sources = [ |
414 "lib/main/webview_entry_point.cc", | 262 "lib/main/webview_entry_point.cc", |
415 ] | 263 ] |
416 } | 264 } |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 system_webview_apk_tmpl("system_webview_apk") { | 688 system_webview_apk_tmpl("system_webview_apk") { |
841 android_manifest = system_webview_android_manifest | 689 android_manifest = system_webview_android_manifest |
842 android_manifest_dep = ":system_webview_manifest" | 690 android_manifest_dep = ":system_webview_manifest" |
843 deps = [ | 691 deps = [ |
844 ":system_webview_resources", | 692 ":system_webview_resources", |
845 "//android_webview/glue", | 693 "//android_webview/glue", |
846 ] | 694 ] |
847 apk_name = "SystemWebView" | 695 apk_name = "SystemWebView" |
848 } | 696 } |
849 } | 697 } |
OLD | NEW |