Disable Convolver.SIMDVerification under the ThreadSanitizer.
[chromium-blink-merge.git] / chrome / chrome_resources.gyp
blob30840648424f94eba962f63c07e5e8cb7c4191b8
1 # Copyright (c) 2012 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   'variables': {
6     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
7     'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
8     'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
9   },
10   'targets': [
11     {
12       'target_name': 'chrome_extra_resources',
13       'type': 'none',
14       # These resources end up in resources.pak because they are resources
15       # used by internal pages.  Putting them in a separate pak file makes
16       # it easier for us to reference them internally.
17       'actions': [
18         {
19           'action_name': 'memory_internals_resources',
20           'variables': {
21             'grit_grd_file': 'browser/resources/memory_internals_resources.grd',
22           },
23           'includes': [ '../build/grit_action.gypi' ],
24         },
25         {
26           'action_name': 'net_internals_resources',
27           'variables': {
28             'grit_grd_file': 'browser/resources/net_internals_resources.grd',
29           },
30           'includes': [ '../build/grit_action.gypi' ],
31         },
32         {
33           'action_name': 'signin_internals_resources',
34           'variables': {
35             'grit_grd_file': 'browser/resources/signin_internals_resources.grd',
36             },
37           'includes': ['../build/grit_action.gypi' ],
38         },
39         {
40           'action_name': 'sync_internals_resources',
41           'variables': {
42             'grit_grd_file': 'browser/resources/sync_internals_resources.grd',
43           },
44           'includes': [ '../build/grit_action.gypi' ],
45         },
46         {
47           'action_name': 'translate_internals_resources',
48           'variables': {
49             'grit_grd_file': 'browser/resources/translate_internals_resources.grd',
50           },
51           'includes': [ '../build/grit_action.gypi' ],
52         },
53       ],
54       'includes': [ '../build/grit_target.gypi' ],
55       'conditions': [
56         ['OS != "ios"', {
57           'dependencies': [
58             '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
59             '../content/browser/tracing/tracing_resources.gyp:tracing_resources',
60           ],
61           'actions': [
62             {
63               'action_name': 'component_extension_resources',
64               'variables': {
65                 'grit_grd_file': 'browser/resources/component_extension_resources.grd',
66               },
67               'includes': [ '../build/grit_action.gypi' ],
68             },
69             {
70               'action_name': 'options_resources',
71               'variables': {
72                 'grit_grd_file': 'browser/resources/options_resources.grd',
73               },
74               'includes': [ '../build/grit_action.gypi' ],
75             },
76             {
77               'action_name': 'quota_internals_resources',
78               'variables': {
79                 'grit_grd_file': 'browser/resources/quota_internals_resources.grd',
80               },
81               'includes': [ '../build/grit_action.gypi' ],
82             },
83             {
84               'action_name': 'devtools_discovery_page_resources',
85               'variables': {
86                 'grit_grd_file':
87                    'browser/devtools/frontend/devtools_discovery_page_resources.grd',
88               },
89               'includes': [ '../build/grit_action.gypi' ]
90             },
91             {
92               'action_name': 'sync_file_system_internals_resources',
93               'variables': {
94                 'grit_grd_file': 'browser/resources/sync_file_system_internals_resources.grd',
95               },
96               'includes': [ '../build/grit_action.gypi' ],
97             },
98           ],
99           'copies': [
100             {
101               'destination': '<(PRODUCT_DIR)/resources/extension/demo',
102               'files': [
103                 'browser/resources/extension_resource/demo/library.js',
104               ],
105             },
106           ],
107         }],
108       ],
109     },
110     {
111       # TODO(mark): It would be better if each static library that needed
112       # to run grit would list its own .grd files, but unfortunately some
113       # of the static libraries currently have circular dependencies among
114       # generated headers.
115       'target_name': 'chrome_resources',
116       'type': 'none',
117       'dependencies': [
118         'about_credits',
119       ],
120       'actions': [
121         # Data resources.
122         {
123           'action_name': 'browser_resources',
124           'variables': {
125             'grit_grd_file': 'browser/browser_resources.grd',
126             'grit_additional_defines': [
127               '-E', 'about_credits_file=<(about_credits_file)',
128             ],
129           },
130           'includes': [ '../build/grit_action.gypi' ],
131         },
132         {
133           'action_name': 'common_resources',
134           'variables': {
135             'grit_grd_file': 'common/common_resources.grd',
136           },
137           'includes': [ '../build/grit_action.gypi' ],
138         },
139         {
140           'action_name': 'renderer_resources',
141           'variables': {
142             'grit_grd_file': 'renderer/resources/renderer_resources.grd',
143           },
144           'includes': [ '../build/grit_action.gypi' ],
145         },
146       ],
147       'conditions': [
148         ['enable_extensions==1', {
149           'actions': [
150             {
151               'action_name': 'extensions_api_resources',
152               'variables': {
153                 'grit_grd_file': 'common/extensions_api_resources.grd',
154               },
155               'includes': [ '../build/grit_action.gypi' ],
156             }
157           ],
158         }],
159       ],
160       'includes': [ '../build/grit_target.gypi' ],
161     },
162     {
163       # TODO(mark): It would be better if each static library that needed
164       # to run grit would list its own .grd files, but unfortunately some
165       # of the static libraries currently have circular dependencies among
166       # generated headers.
167       'target_name': 'chrome_strings',
168       'type': 'none',
169       'actions': [
170         # Localizable resources.
171         {
172           'action_name': 'locale_settings',
173           'variables': {
174             'grit_grd_file': 'app/resources/locale_settings.grd',
175           },
176           'includes': [ '../build/grit_action.gypi' ],
177         },
178         {
179           'action_name': 'chromium_strings.grd',
180           'variables': {
181             'grit_grd_file': 'app/chromium_strings.grd',
182           },
183           'includes': [ '../build/grit_action.gypi' ],
184         },
185         {
186           'action_name': 'generated_resources',
187           'variables': {
188             'grit_grd_file': 'app/generated_resources.grd',
189           },
190           'includes': [ '../build/grit_action.gypi' ],
191         },
192         {
193           'action_name': 'google_chrome_strings',
194           'variables': {
195             'grit_grd_file': 'app/google_chrome_strings.grd',
196           },
197           'includes': [ '../build/grit_action.gypi' ],
198         },
199       ],
200       'includes': [ '../build/grit_target.gypi' ],
201     },
202     {
203       'target_name': 'platform_locale_settings',
204       'type': 'none',
205       'variables': {
206         'conditions': [
207           ['OS=="win"', {
208             'platform_locale_settings_grd':
209                 'app/resources/locale_settings_win.grd',
210           },],
211           ['OS=="linux"', {
212             'conditions': [
213               ['chromeos==1', {
214                 'conditions': [
215                   ['branding=="Chrome"', {
216                     'platform_locale_settings_grd':
217                         'app/resources/locale_settings_google_chromeos.grd',
218                   }, {  # branding!=Chrome
219                     'platform_locale_settings_grd':
220                         'app/resources/locale_settings_chromiumos.grd',
221                   }],
222                 ]
223               }, {  # chromeos==0
224                 'platform_locale_settings_grd':
225                     'app/resources/locale_settings_linux.grd',
226               }],
227             ],
228           },],
229           ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
230             'platform_locale_settings_grd':
231                 'app/resources/locale_settings_linux.grd',
232           },],
233           ['OS == "mac" or OS == "ios"', {
234             'platform_locale_settings_grd':
235                 'app/resources/locale_settings_mac.grd',
236           }],
237         ],  # conditions
238       },  # variables
239       'actions': [
240         {
241           'action_name': 'platform_locale_settings',
242           'variables': {
243             'grit_grd_file': '<(platform_locale_settings_grd)',
244           },
245           'includes': [ '../build/grit_action.gypi' ],
246         },
247       ],
248       'includes': [ '../build/grit_target.gypi' ],
249     },
250     {
251       'target_name': 'theme_resources_gen',
252       'type': 'none',
253       'actions': [
254         {
255           'action_name': 'theme_resources',
256           'variables': {
257             'grit_grd_file': 'app/theme/theme_resources.grd',
258           },
259           'includes': [ '../build/grit_action.gypi' ],
260         },
261       ],
262       'includes': [ '../build/grit_target.gypi' ],
263     },
264     {
265       'target_name': 'theme_resources',
266       'type': 'none',
267       'dependencies': [
268         'chrome_unscaled_resources',
269         'theme_resources_gen',
270         '<(DEPTH)/ui/ui.gyp:ui_resources',
271       ],
272     },
273     {
274       'target_name': 'packed_extra_resources',
275       'type': 'none',
276       'variables': {
277         'repack_path': '../tools/grit/grit/format/repack.py',
278       },
279       'dependencies': [
280         'chrome_extra_resources',
281       ],
282       'actions': [
283         {
284           'includes': ['chrome_repack_resources.gypi']
285         },
286       ],
287       'conditions': [
288         ['OS != "mac" and OS != "ios"', {
289           # We'll install the resource files to the product directory.  The Mac
290           # copies the results over as bundle resources in its own special way.
291           'copies': [
292             {
293               'destination': '<(PRODUCT_DIR)',
294               'files': [
295                 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
296               ],
297             },
298           ],
299         }],
300       ],
301     },
302     {
303       'target_name': 'packed_resources',
304       'type': 'none',
305       'variables': {
306         'repack_path': '../tools/grit/grit/format/repack.py',
307       },
308       'dependencies': [
309         # MSVS needs the dependencies explictly named, Make is able to
310         # derive the dependencies from the output files.
311         'chrome_resources',
312         'chrome_strings',
313         'platform_locale_settings',
314         'theme_resources',
315         '<(DEPTH)/components/component_strings.gyp:component_strings',
316         '<(DEPTH)/net/net.gyp:net_resources',
317         '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
318         '<(DEPTH)/ui/ui.gyp:ui_resources',
319       ],
320       'actions': [
321         {
322           'includes': ['chrome_repack_chrome.gypi']
323         },
324         {
325           'includes': ['chrome_repack_locales.gypi']
326         },
327         {
328           'includes': ['chrome_repack_pseudo_locales.gypi']
329         },
330         {
331           'includes': ['chrome_repack_chrome_100_percent.gypi']
332         },
333         {
334           'includes': ['chrome_repack_chrome_200_percent.gypi']
335         },
336         {
337           'includes': ['chrome_repack_chrome_touch_100_percent.gypi']
338         },
339         {
340           'includes': ['chrome_repack_chrome_touch_140_percent.gypi']
341         },
342         {
343           'includes': ['chrome_repack_chrome_touch_180_percent.gypi']
344         },
345       ],
346       'conditions': [
347         ['OS != "ios"', {
348           'dependencies': [
349             # TODO(zork): Protect this with if use_aura==1
350             '<(DEPTH)/ash/ash_strings.gyp:ash_strings',
351             '<(DEPTH)/content/content_resources.gyp:content_resources',
352             '<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
353             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
354             '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
355           ],
356         }],
357         ['use_ash==1', {
358           'dependencies': [
359              '<(DEPTH)/ash/ash.gyp:ash_resources',
360           ],
361         }],
362         ['OS != "mac" and OS != "ios"', {
363           # Copy pak files to the product directory. These files will be picked
364           # up by the following installer scripts:
365           #   - Windows: chrome/installer/mini_installer/chrome.release
366           #   - Linux: chrome/installer/linux/internal/common/installer.include
367           # Ensure that the above scripts are updated when adding or removing
368           # pak files.
369           # Copying files to the product directory is not needed on the Mac
370           # since the framework build phase will copy them into the framework
371           # bundle directly.
372           'copies': [
373             {
374               'destination': '<(PRODUCT_DIR)',
375               'files': [
376                 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome.pak'
377               ],
378             },
379             {
380               'destination': '<(PRODUCT_DIR)',
381               'files': [
382                 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
383               ],
384             },
385             {
386               'destination': '<(PRODUCT_DIR)/locales',
387               'files': [
388                 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'
389               ],
390             },
391             {
392               'destination': '<(PRODUCT_DIR)/pseudo_locales',
393               'files': [
394                 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))'
395               ],
396             },
397           ],
398           'conditions': [
399             ['branding=="Chrome"', {
400               'copies': [
401                 {
402                   # This location is for the Windows and Linux builds. For
403                   # Windows, the chrome.release file ensures that these files
404                   # are copied into the installer. Note that we have a separate
405                   # section in chrome_dll.gyp to copy these files for Mac, as it
406                   # needs to be dropped inside the framework.
407                   'destination': '<(PRODUCT_DIR)/default_apps',
408                   'files': ['<@(default_apps_list)']
409                 },
410               ],
411             }],
412             ['enable_hidpi == 1 and OS!="win"', {
413               'copies': [
414                 {
415                   'destination': '<(PRODUCT_DIR)',
416                   'files': [
417                     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
418                   ],
419                 },
420               ],
421             }],
422             ['enable_touch_ui==1', {
423               'copies': [
424                 {
425                   'destination': '<(PRODUCT_DIR)',
426                   'files': [
427                     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_100_percent.pak',
428                     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_140_percent.pak',
429                     '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_touch_180_percent.pak',
430                   ],
431                 },
432               ],
433             }],
434           ], # conditions
435         }], # end OS != "mac" and OS != "ios"
436       ], # conditions
437     },
438     {
439       'target_name': 'chrome_unscaled_resources',
440       'type': 'none',
441       'variables': {
442         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
443       },
444       'actions': [
445         {
446           'action_name': 'chrome_unscaled_resources',
447           'variables': {
448             'grit_grd_file': 'app/theme/chrome_unscaled_resources.grd',
449           },
450           'includes': [ '../build/grit_action.gypi' ],
451         },
452       ],
453       'includes': [ '../build/grit_target.gypi' ],
454     },
455     {
456       'target_name': 'about_credits',
457       'type': 'none',
458       'actions': [
459         {
460           'variables': {
461             'generator_path': '../tools/licenses.py',
462           },
463           'action_name': 'generate_about_credits',
464           'inputs': [
465             # TODO(phajdan.jr): make licenses.py print inputs too.
466             '<(generator_path)',
467           ],
468           'outputs': [
469             '<(about_credits_file)',
470           ],
471           'hard_dependency': 1,
472           'action': ['python',
473                      '<(generator_path)',
474                      'credits',
475                      '<(about_credits_file)',
476           ],
477           'message': 'Generating about:credits.',
478         },
479       ],
480     },
481   ], # targets