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