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