OLD | NEW |
| (Empty) |
1 # Copyright (c) 2011 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. | |
4 { | |
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 '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:generate_devtoo
ls_grd', | |
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.gr
d', | |
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': 'workers_resources', | |
64 'variables': { | |
65 'grit_grd_file': 'browser/resources/workers_resources.grd', | |
66 }, | |
67 'includes': [ '../build/grit_action.gypi' ], | |
68 }, | |
69 { | |
70 'action_name': 'devtools_frontend_resources', | |
71 'variables': { | |
72 'grit_grd_file': | |
73 'browser/debugger/frontend/devtools_frontend_resources.grd', | |
74 }, | |
75 'includes': [ '../build/grit_action.gypi' ] | |
76 }, | |
77 { | |
78 'action_name': 'devtools_resources', | |
79 # This can't use ../build/grit_action.gypi because the grd file | |
80 # is generated a build time, so the trick of using grit_info to get | |
81 # the real inputs/outputs at GYP time isn't possible. | |
82 'variables': { | |
83 'grit_cmd': ['python', '../tools/grit/grit.py'], | |
84 'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_resou
rces.grd', | |
85 }, | |
86 'inputs': [ | |
87 '<(grit_grd_file)', | |
88 '<!@pymod_do_main(grit_info --inputs)', | |
89 ], | |
90 'outputs': [ | |
91 '<(grit_out_dir)/grit/devtools_resources.h', | |
92 '<(grit_out_dir)/devtools_resources.pak', | |
93 '<(grit_out_dir)/grit/devtools_resources_map.cc', | |
94 '<(grit_out_dir)/grit/devtools_resources_map.h', | |
95 ], | |
96 'action': ['<@(grit_cmd)', | |
97 '-i', '<(grit_grd_file)', 'build', | |
98 '-o', '<(grit_out_dir)', | |
99 '-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', | |
100 '<@(grit_defines)' ], | |
101 'message': 'Generating resources from <(grit_grd_file)', | |
102 }, | |
103 ], | |
104 'includes': [ '../build/grit_target.gypi' ], | |
105 }, | |
106 { | |
107 # TODO(mark): It would be better if each static library that needed | |
108 # to run grit would list its own .grd files, but unfortunately some | |
109 # of the static libraries currently have circular dependencies among | |
110 # generated headers. | |
111 'target_name': 'chrome_resources', | |
112 'type': 'none', | |
113 'actions': [ | |
114 # Data resources. | |
115 { | |
116 'action_name': 'browser_resources', | |
117 'variables': { | |
118 'grit_grd_file': 'browser/browser_resources.grd', | |
119 }, | |
120 'includes': [ '../build/grit_action.gypi' ], | |
121 }, | |
122 { | |
123 'action_name': 'common_resources', | |
124 'variables': { | |
125 'grit_grd_file': 'common/common_resources.grd', | |
126 }, | |
127 'includes': [ '../build/grit_action.gypi' ], | |
128 }, | |
129 { | |
130 'action_name': 'renderer_resources', | |
131 'variables': { | |
132 'grit_grd_file': 'renderer/renderer_resources.grd', | |
133 }, | |
134 'includes': [ '../build/grit_action.gypi' ], | |
135 }, | |
136 ], | |
137 'includes': [ '../build/grit_target.gypi' ], | |
138 }, | |
139 { | |
140 # TODO(mark): It would be better if each static library that needed | |
141 # to run grit would list its own .grd files, but unfortunately some | |
142 # of the static libraries currently have circular dependencies among | |
143 # generated headers. | |
144 'target_name': 'chrome_strings', | |
145 'type': 'none', | |
146 'conditions': [ | |
147 ['OS=="win"', { | |
148 # HACK(nsylvain): We want to enforce a fake dependency on | |
149 # intaller_util_string. install_util depends on both | |
150 # chrome_strings and installer_util_strings, but for some reasons | |
151 # Incredibuild does not enforce it (most likely a bug). By changing | |
152 # the type and making sure we depend on installer_util_strings, it | |
153 # will always get built before installer_util. | |
154 'type': 'dummy_executable', | |
155 'dependencies': ['chrome.gyp:installer_util_strings'], | |
156 }], | |
157 ], | |
158 'actions': [ | |
159 # Localizable resources. | |
160 { | |
161 'action_name': 'locale_settings', | |
162 'variables': { | |
163 'grit_grd_file': 'app/resources/locale_settings.grd', | |
164 }, | |
165 'includes': [ '../build/grit_action.gypi' ], | |
166 }, | |
167 { | |
168 'action_name': 'chromium_strings.grd', | |
169 'variables': { | |
170 'grit_grd_file': 'app/chromium_strings.grd', | |
171 }, | |
172 'includes': [ '../build/grit_action.gypi' ], | |
173 }, | |
174 { | |
175 'action_name': 'generated_resources', | |
176 'variables': { | |
177 'grit_grd_file': 'app/generated_resources.grd', | |
178 }, | |
179 'includes': [ '../build/grit_action.gypi' ], | |
180 }, | |
181 { | |
182 'action_name': 'google_chrome_strings', | |
183 'variables': { | |
184 'grit_grd_file': 'app/google_chrome_strings.grd', | |
185 }, | |
186 'includes': [ '../build/grit_action.gypi' ], | |
187 }, | |
188 ], | |
189 'includes': [ '../build/grit_target.gypi' ], | |
190 }, | |
191 { | |
192 'target_name': 'platform_locale_settings', | |
193 'type': 'none', | |
194 'variables': { | |
195 'conditions': [ | |
196 ['OS=="win"', { | |
197 'platform_locale_settings_grd': | |
198 'app/resources/locale_settings_win.grd', | |
199 },], | |
200 ['OS=="linux"', { | |
201 'conditions': [ | |
202 ['chromeos==1', { | |
203 'platform_locale_settings_grd': | |
204 'app/resources/locale_settings_cros.grd', | |
205 }], | |
206 ['chromeos!=1', { | |
207 'platform_locale_settings_grd': | |
208 'app/resources/locale_settings_linux.grd', | |
209 }], | |
210 ], | |
211 },], | |
212 ['os_posix == 1 and OS != "mac" and OS != "linux"', { | |
213 'platform_locale_settings_grd': | |
214 'app/resources/locale_settings_linux.grd', | |
215 },], | |
216 ['OS=="mac"', { | |
217 'platform_locale_settings_grd': | |
218 'app/resources/locale_settings_mac.grd', | |
219 }], | |
220 ], # conditions | |
221 }, # variables | |
222 'actions': [ | |
223 { | |
224 'action_name': 'platform_locale_settings', | |
225 'variables': { | |
226 'grit_grd_file': '<(platform_locale_settings_grd)', | |
227 }, | |
228 'includes': [ '../build/grit_action.gypi' ], | |
229 }, | |
230 ], | |
231 'includes': [ '../build/grit_target.gypi' ], | |
232 }, | |
233 { | |
234 'target_name': 'theme_resources', | |
235 'type': 'none', | |
236 'actions': [ | |
237 { | |
238 'action_name': 'theme_resources', | |
239 'variables': { | |
240 'grit_grd_file': 'app/theme/theme_resources.grd', | |
241 }, | |
242 'includes': [ '../build/grit_action.gypi' ], | |
243 }, | |
244 { | |
245 'action_name': 'theme_resources_large', | |
246 'variables': { | |
247 'grit_grd_file': 'app/theme/theme_resources_large.grd', | |
248 }, | |
249 'includes': [ '../build/grit_action.gypi' ], | |
250 }, | |
251 { | |
252 'action_name': 'theme_resources_standard', | |
253 'variables': { | |
254 'grit_grd_file': 'app/theme/theme_resources_standard.grd', | |
255 }, | |
256 'includes': [ '../build/grit_action.gypi' ], | |
257 }, | |
258 ], | |
259 'includes': [ '../build/grit_target.gypi' ], | |
260 }, | |
261 { | |
262 'target_name': 'packed_extra_resources', | |
263 'type': 'none', | |
264 'variables': { | |
265 'repack_path': '../tools/grit/grit/format/repack.py', | |
266 }, | |
267 'dependencies': [ | |
268 'chrome_extra_resources', | |
269 ], | |
270 'actions': [ | |
271 { | |
272 'includes': ['chrome_repack_resources.gypi'] | |
273 }, | |
274 ], | |
275 'conditions': [ | |
276 ['OS != "mac"', { | |
277 # We'll install the resource files to the product directory. The Mac | |
278 # copies the results over as bundle resources in its own special way. | |
279 'copies': [ | |
280 { | |
281 'destination': '<(PRODUCT_DIR)', | |
282 'files': [ | |
283 '<(INTERMEDIATE_DIR)/repack/resources.pak' | |
284 ], | |
285 }, | |
286 ], | |
287 }] | |
288 ] | |
289 }, | |
290 { | |
291 'target_name': 'packed_resources', | |
292 'type': 'none', | |
293 'variables': { | |
294 'repack_path': '../tools/grit/grit/format/repack.py', | |
295 }, | |
296 'dependencies': [ | |
297 # MSVS needs the dependencies explictly named, Make is able to | |
298 # derive the dependencies from the output files. | |
299 'chrome_resources', | |
300 'chrome_strings', | |
301 'default_plugin/default_plugin.gyp:default_plugin_resources', | |
302 'platform_locale_settings', | |
303 'theme_resources', | |
304 '<(DEPTH)/net/net.gyp:net_resources', | |
305 '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings', | |
306 '<(DEPTH)/ui/ui.gyp:gfx_resources', | |
307 '<(DEPTH)/ui/ui.gyp:ui_resources', | |
308 '<(DEPTH)/ui/ui.gyp:ui_resources_large', | |
309 '<(DEPTH)/ui/ui.gyp:ui_resources_standard', | |
310 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', | |
311 '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings', | |
312 ], | |
313 'actions': [ | |
314 { | |
315 'includes': ['chrome_repack_chrome.gypi'] | |
316 }, | |
317 { | |
318 'includes': ['chrome_repack_locales.gypi'] | |
319 }, | |
320 { | |
321 'includes': ['chrome_repack_pseudo_locales.gypi'] | |
322 }, | |
323 ], | |
324 'conditions': [ | |
325 ['OS != "mac"', { | |
326 # We'll install the resource files to the product directory. The Mac | |
327 # copies the results over as bundle resources in its own special way. | |
328 'copies': [ | |
329 { | |
330 'destination': '<(PRODUCT_DIR)', | |
331 'files': [ | |
332 '<(INTERMEDIATE_DIR)/repack/chrome.pak' | |
333 ], | |
334 }, | |
335 { | |
336 'destination': '<(PRODUCT_DIR)/locales', | |
337 'files': [ | |
338 '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHAR
ED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(locales))' | |
339 ], | |
340 }, | |
341 { | |
342 'destination': '<(PRODUCT_DIR)/pseudo_locales', | |
343 'files': [ | |
344 '<!@pymod_do_main(repack_locales -o -g <(grit_out_dir) -s <(SHAR
ED_INTERMEDIATE_DIR) -x <(INTERMEDIATE_DIR) <(pseudo_locales))' | |
345 ], | |
346 }, | |
347 ], | |
348 'conditions': [ | |
349 ['branding=="Chrome"', { | |
350 'copies': [ | |
351 { | |
352 # This location is for the Windows and Linux builds. For | |
353 # Windows, the chrome.release file ensures that these files | |
354 # are copied into the installer. Note that we have a separate | |
355 # section in chrome_dll.gyp to copy these files for Mac, as it | |
356 # needs to be dropped inside the framework. | |
357 'destination': '<(PRODUCT_DIR)/default_apps', | |
358 'files': ['<@(default_apps_list)'] | |
359 }, | |
360 ], | |
361 }], | |
362 ], # conditions | |
363 }], # end OS != "mac" | |
364 ], # conditions | |
365 }, | |
366 ], # targets | |
367 } | |
OLD | NEW |