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