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