Fix translation extraction failure.
[chromium-blink-merge.git] / chrome / app / BUILD.gn
blobc4525c95bcd6a65cf2714671deaae3fc0158cf3d
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//tools/grit/grit_rule.gni")
7 if (is_android) {
8   import("//build/config/android/rules.gni")
9   android_generated_java_resources = [
10     "java/res/values-am/generated_resources.xml",
11     "java/res/values-ar/generated_resources.xml",
12     "java/res/values-bg/generated_resources.xml",
13     "java/res/values-ca/generated_resources.xml",
14     "java/res/values-cs/generated_resources.xml",
15     "java/res/values-da/generated_resources.xml",
16     "java/res/values-de/generated_resources.xml",
17     "java/res/values-el/generated_resources.xml",
18     "java/res/values-en-rGB/generated_resources.xml",
19     "java/res/values-es-rUS/generated_resources.xml",
20     "java/res/values-es/generated_resources.xml",
21     "java/res/values-fa/generated_resources.xml",
22     "java/res/values-fi/generated_resources.xml",
23     "java/res/values-fr/generated_resources.xml",
24     "java/res/values-hi/generated_resources.xml",
25     "java/res/values-hr/generated_resources.xml",
26     "java/res/values-hu/generated_resources.xml",
27     "java/res/values-in/generated_resources.xml",
28     "java/res/values-it/generated_resources.xml",
29     "java/res/values-iw/generated_resources.xml",
30     "java/res/values-ja/generated_resources.xml",
31     "java/res/values-ko/generated_resources.xml",
32     "java/res/values-lt/generated_resources.xml",
33     "java/res/values-lv/generated_resources.xml",
34     "java/res/values-nb/generated_resources.xml",
35     "java/res/values-nl/generated_resources.xml",
36     "java/res/values-pl/generated_resources.xml",
37     "java/res/values-pt-rBR/generated_resources.xml",
38     "java/res/values-pt-rPT/generated_resources.xml",
39     "java/res/values-ro/generated_resources.xml",
40     "java/res/values-ru/generated_resources.xml",
41     "java/res/values-sk/generated_resources.xml",
42     "java/res/values-sl/generated_resources.xml",
43     "java/res/values-sr/generated_resources.xml",
44     "java/res/values-sv/generated_resources.xml",
45     "java/res/values-sw/generated_resources.xml",
46     "java/res/values-th/generated_resources.xml",
47     "java/res/values-tl/generated_resources.xml",
48     "java/res/values-tr/generated_resources.xml",
49     "java/res/values-uk/generated_resources.xml",
50     "java/res/values-vi/generated_resources.xml",
51     "java/res/values-zh-rCN/generated_resources.xml",
52     "java/res/values-zh-rTW/generated_resources.xml",
53     "java/res/values/generated_resources.xml",
54   ]
57 # GYP version: chrome/chrome_resources.gyp:chrome_strings
58 #              (generate_generated_resources action)
59 grit("generated_resources") {
60   source = "generated_resources.grd"
61   output_dir = "$root_gen_dir/chrome"
62   use_qualified_include = true
63   outputs = [
64     "grit/generated_resources.h",
65     "generated_resources_am.pak",
66     "generated_resources_ar.pak",
67     "generated_resources_bg.pak",
68     "generated_resources_bn.pak",
69     "generated_resources_ca.pak",
70     "generated_resources_cs.pak",
71     "generated_resources_da.pak",
72     "generated_resources_de.pak",
73     "generated_resources_el.pak",
74     "generated_resources_en-GB.pak",
75     "generated_resources_en-US.pak",
76     "generated_resources_es.pak",
77     "generated_resources_es-419.pak",
78     "generated_resources_et.pak",
79     "generated_resources_fa.pak",
80     "generated_resources_fake-bidi.pak",
81     "generated_resources_fi.pak",
82     "generated_resources_fil.pak",
83     "generated_resources_fr.pak",
84     "generated_resources_gu.pak",
85     "generated_resources_he.pak",
86     "generated_resources_hi.pak",
87     "generated_resources_hr.pak",
88     "generated_resources_hu.pak",
89     "generated_resources_id.pak",
90     "generated_resources_it.pak",
91     "generated_resources_ja.pak",
92     "generated_resources_kn.pak",
93     "generated_resources_ko.pak",
94     "generated_resources_lt.pak",
95     "generated_resources_lv.pak",
96     "generated_resources_ml.pak",
97     "generated_resources_mr.pak",
98     "generated_resources_ms.pak",
99     "generated_resources_nl.pak",
100     "generated_resources_nb.pak",
101     "generated_resources_pl.pak",
102     "generated_resources_pt-BR.pak",
103     "generated_resources_pt-PT.pak",
104     "generated_resources_ro.pak",
105     "generated_resources_ru.pak",
106     "generated_resources_sk.pak",
107     "generated_resources_sl.pak",
108     "generated_resources_sr.pak",
109     "generated_resources_sv.pak",
110     "generated_resources_sw.pak",
111     "generated_resources_ta.pak",
112     "generated_resources_te.pak",
113     "generated_resources_th.pak",
114     "generated_resources_tr.pak",
115     "generated_resources_uk.pak",
116     "generated_resources_vi.pak",
117     "generated_resources_zh-CN.pak",
118     "generated_resources_zh-TW.pak",
119   ]
121   if (is_android) {
122     outputs += android_generated_java_resources
123   }
126 if (is_android) {
127   java_strings_grd_prebuilt("java_strings_grd") {
128     grit_output_dir = "$root_gen_dir/chrome/java/res"
129     generated_files =
130         rebase_path(android_generated_java_resources, "java/res", ".")
131     deps = [
132       ":generated_resources",
133     ]
134   }
137 # GYP version: chrome/chrome_resources.gyp:chrome_strings_map
138 action("make_generated_resources_map") {
139   # Targets should depend on generated_resources_map instead.
140   visibility = [ ":generated_resources_map" ]
142   script = "//chrome/browser/metrics/variations/generate_resources_map.py"
144   inputs = [
145     "$root_gen_dir/chrome/grit/generated_resources.h",
146   ]
147   outputs = [
148     "$root_gen_dir/chrome/generated_resources_map.cc",
149   ]
151   args =
152       rebase_path(inputs, root_build_dir) + rebase_path(outputs, root_build_dir)
154   deps = [
155     ":generated_resources",
156   ]
159 # Collect the generated .cc file from make_generated_resources_map and put it
160 # in a source set so targets that depend on it will link the source rather than
161 # specifying it manually. This doesn't happen in the GYP build.
162 source_set("generated_resources_map") {
163   sources = get_target_outputs(":make_generated_resources_map")
164   deps = [
165     ":make_generated_resources_map",
166   ]
169 # GYP version: chrome/chrome_resources.gyp:chrome_strings
170 #              (generate_google_chrome_strings action)
171 grit("google_chrome_strings") {
172   source = "google_chrome_strings.grd"
173   output_dir = "$root_gen_dir/chrome"
174   use_qualified_include = true
175   outputs = [
176     "grit/google_chrome_strings.h",
177     "google_chrome_strings_am.pak",
178     "google_chrome_strings_ar.pak",
179     "google_chrome_strings_bg.pak",
180     "google_chrome_strings_bn.pak",
181     "google_chrome_strings_ca.pak",
182     "google_chrome_strings_cs.pak",
183     "google_chrome_strings_da.pak",
184     "google_chrome_strings_de.pak",
185     "google_chrome_strings_el.pak",
186     "google_chrome_strings_en-GB.pak",
187     "google_chrome_strings_en-US.pak",
188     "google_chrome_strings_es.pak",
189     "google_chrome_strings_es-419.pak",
190     "google_chrome_strings_et.pak",
191     "google_chrome_strings_fa.pak",
192     "google_chrome_strings_fi.pak",
193     "google_chrome_strings_fil.pak",
194     "google_chrome_strings_fr.pak",
195     "google_chrome_strings_gu.pak",
196     "google_chrome_strings_he.pak",
197     "google_chrome_strings_hi.pak",
198     "google_chrome_strings_hr.pak",
199     "google_chrome_strings_hu.pak",
200     "google_chrome_strings_id.pak",
201     "google_chrome_strings_it.pak",
202     "google_chrome_strings_ja.pak",
203     "google_chrome_strings_kn.pak",
204     "google_chrome_strings_ko.pak",
205     "google_chrome_strings_lt.pak",
206     "google_chrome_strings_lv.pak",
207     "google_chrome_strings_ml.pak",
208     "google_chrome_strings_mr.pak",
209     "google_chrome_strings_ms.pak",
210     "google_chrome_strings_nl.pak",
211     "google_chrome_strings_nb.pak",
212     "google_chrome_strings_pl.pak",
213     "google_chrome_strings_pt-BR.pak",
214     "google_chrome_strings_pt-PT.pak",
215     "google_chrome_strings_ro.pak",
216     "google_chrome_strings_ru.pak",
217     "google_chrome_strings_sk.pak",
218     "google_chrome_strings_sl.pak",
219     "google_chrome_strings_sr.pak",
220     "google_chrome_strings_sv.pak",
221     "google_chrome_strings_sw.pak",
222     "google_chrome_strings_ta.pak",
223     "google_chrome_strings_te.pak",
224     "google_chrome_strings_th.pak",
225     "google_chrome_strings_tr.pak",
226     "google_chrome_strings_uk.pak",
227     "google_chrome_strings_vi.pak",
228     "google_chrome_strings_zh-CN.pak",
229     "google_chrome_strings_zh-TW.pak",
230     "google_chrome_strings_fake-bidi.pak",
231   ]
234 # GYP version: chrome/chrome_resources.gyp:chrome_strings
235 #              (generate_chromium_strings action)
236 grit("chromium_strings") {
237   source = "chromium_strings.grd"
238   output_dir = "$root_gen_dir/chrome"
239   use_qualified_include = true
240   outputs = [
241     "grit/chromium_strings.h",
242     "chromium_strings_am.pak",
243     "chromium_strings_ar.pak",
244     "chromium_strings_bg.pak",
245     "chromium_strings_bn.pak",
246     "chromium_strings_ca.pak",
247     "chromium_strings_cs.pak",
248     "chromium_strings_da.pak",
249     "chromium_strings_de.pak",
250     "chromium_strings_el.pak",
251     "chromium_strings_en-GB.pak",
252     "chromium_strings_en-US.pak",
253     "chromium_strings_es.pak",
254     "chromium_strings_es-419.pak",
255     "chromium_strings_et.pak",
256     "chromium_strings_fa.pak",
257     "chromium_strings_fake-bidi.pak",
258     "chromium_strings_fi.pak",
259     "chromium_strings_fil.pak",
260     "chromium_strings_fr.pak",
261     "chromium_strings_gu.pak",
262     "chromium_strings_he.pak",
263     "chromium_strings_hi.pak",
264     "chromium_strings_hr.pak",
265     "chromium_strings_hu.pak",
266     "chromium_strings_id.pak",
267     "chromium_strings_it.pak",
268     "chromium_strings_ja.pak",
269     "chromium_strings_kn.pak",
270     "chromium_strings_ko.pak",
271     "chromium_strings_lt.pak",
272     "chromium_strings_lv.pak",
273     "chromium_strings_ml.pak",
274     "chromium_strings_mr.pak",
275     "chromium_strings_ms.pak",
276     "chromium_strings_nl.pak",
277     "chromium_strings_nb.pak",
278     "chromium_strings_pl.pak",
279     "chromium_strings_pt-BR.pak",
280     "chromium_strings_pt-PT.pak",
281     "chromium_strings_ro.pak",
282     "chromium_strings_ru.pak",
283     "chromium_strings_sk.pak",
284     "chromium_strings_sl.pak",
285     "chromium_strings_sr.pak",
286     "chromium_strings_sv.pak",
287     "chromium_strings_sw.pak",
288     "chromium_strings_ta.pak",
289     "chromium_strings_te.pak",
290     "chromium_strings_th.pak",
291     "chromium_strings_tr.pak",
292     "chromium_strings_uk.pak",
293     "chromium_strings_vi.pak",
294     "chromium_strings_zh-CN.pak",
295     "chromium_strings_zh-TW.pak",
296   ]
299 source_set("test_support") {
300   testonly = true
301   visibility = [ "//chrome/test:test_support" ]
303   sources = [
304     "chrome_main_delegate.cc",
305     "chrome_main_delegate.h",
306     "close_handle_hook_win.cc",
307     "close_handle_hook_win.h",
308   ]
310   deps = [
311     "//base",
312     "//chrome/browser",
313     "//chrome/child",
314     "//chrome/common",
315     "//chrome/plugin",
316     "//chrome/renderer",
317     "//chrome/utility",
318     "//content/public/app:both",
319     "//content/public/common",
320     "//ui/base",
321   ]
323   if (is_mac) {
324     sources += [ "chrome_main_mac.mm" ]
325   }
327   if (enable_plugins && enable_nacl) {
328     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
329   }