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.
6 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
7 'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
8 'additional_modules_list_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/internal/additional_modules_list.txt',
9 'omnibox_mojom_file': '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/ui/webui/omnibox/omnibox.mojom.js',
13 # GN version: //chrome:extra_resources
14 'target_name': 'chrome_extra_resources',
16 # These resources end up in resources.pak because they are resources
17 # used by internal pages. Putting them in a separate pak file makes
18 # it easier for us to reference them internally.
21 # GN version: //chrome/browser/resources:memory_internals_resources
22 'action_name': 'generate_memory_internals_resources',
24 'grit_grd_file': 'browser/resources/memory_internals_resources.grd',
26 'includes': [ '../build/grit_action.gypi' ],
29 # GN version: //chrome/browser/resources:net_internals_resources
30 'action_name': 'generate_net_internals_resources',
32 'grit_grd_file': 'browser/resources/net_internals_resources.grd',
34 'includes': [ '../build/grit_action.gypi' ],
37 # GN version: //chrome/browser/resources:invalidations_resources
38 'action_name': 'generate_invalidations_resources',
40 'grit_grd_file': 'browser/resources/invalidations_resources.grd',
42 'includes': ['../build/grit_action.gypi' ],
45 # GN version: //chrome/browser/resources:password_manager_internals_resources
46 'action_name': 'generate_password_manager_internals_resources',
48 'grit_grd_file': 'browser/resources/password_manager_internals_resources.grd',
50 'includes': [ '../build/grit_action.gypi' ],
53 # GN version: //chrome/browser/resources:signin_internals_resources
54 'action_name': 'generate_signin_internals_resources',
56 'grit_grd_file': 'browser/resources/signin_internals_resources.grd',
58 'includes': ['../build/grit_action.gypi' ],
61 # GN version: //chrome/browser/resources:sync_internals_resources
62 'action_name': 'generate_sync_internals_resources',
64 'grit_grd_file': 'browser/resources/sync_internals_resources.grd',
66 'includes': [ '../build/grit_action.gypi' ],
69 # GN version: //chrome/browser/resources:translate_internals_resources
70 'action_name': 'generate_translate_internals_resources',
72 'grit_grd_file': 'browser/resources/translate_internals_resources.grd',
74 'includes': [ '../build/grit_action.gypi' ],
77 'includes': [ '../build/grit_target.gypi' ],
81 '../components/components_resources.gyp:components_resources',
82 '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
83 '../content/browser/tracing/tracing_resources.gyp:tracing_resources',
87 # GN version: //chrome/browser/resources:component_extension_resources
88 'action_name': 'generate_component_extension_resources',
90 'grit_grd_file': 'browser/resources/component_extension_resources.grd',
92 'includes': [ '../build/grit_action.gypi' ],
95 # GN version: //chrome/browser/resources:options_resources
96 'action_name': 'generate_options_resources',
98 'grit_grd_file': 'browser/resources/options_resources.grd',
100 'includes': [ '../build/grit_action.gypi' ],
105 # GN version: //chrome/browser/resources:extension_resource_demo
106 'destination': '<(PRODUCT_DIR)/resources/extension/demo',
108 'browser/resources/extension_resource/demo/library.js',
113 ['chromeos==1 and disable_nacl==0 and disable_nacl_untrusted==0', {
115 # TODO(dtseng): Remove use_chromevox_next once ChromeVox Next is ready for testing.
116 ['use_chromevox_next==1', {
118 'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2',
120 }, { # else use_chromevox_next == 0
122 'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox',
127 ['enable_extensions==1', {
130 # GN version: //chrome/browser/resources:quota_internals_resources
131 'action_name': 'generate_quota_internals_resources',
133 'grit_grd_file': 'browser/resources/quota_internals_resources.grd',
135 'includes': [ '../build/grit_action.gypi' ],
138 # GN version: //chrome/browser/resources:sync_file_system_internals_resources
139 'action_name': 'generate_sync_file_system_internals_resources',
141 'grit_grd_file': 'browser/resources/sync_file_system_internals_resources.grd',
143 'includes': [ '../build/grit_action.gypi' ],
150 # GN version: //chrome/browser:chrome_internal_resources_gen
151 'target_name': 'chrome_internal_resources_gen',
154 ['branding=="Chrome"', {
157 'action_name': 'generate_transform_additional_modules_list',
159 'additional_modules_input_path':
160 'browser/internal/resources/additional_modules_list.input',
161 'additional_modules_py_path':
162 'browser/internal/transform_additional_modules_list.py',
165 '<(additional_modules_input_path)',
168 '<(additional_modules_list_file)',
172 '<(additional_modules_py_path)',
173 '<(additional_modules_input_path)',
176 'message': 'Transforming additional modules list',
183 # TODO(mark): It would be better if each static library that needed
184 # to run grit would list its own .grd files, but unfortunately some
185 # of the static libraries currently have circular dependencies among
188 # GN version: //chrome:resources
189 'target_name': 'chrome_resources',
193 'chrome_internal_resources_gen',
194 'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
198 # GN version: //chrome/browser:resources
199 'action_name': 'generate_browser_resources',
201 'grit_grd_file': 'browser/browser_resources.grd',
202 'grit_additional_defines': [
203 '-E', 'about_credits_file=<(about_credits_file)',
204 '-E', 'additional_modules_list_file=<(additional_modules_list_file)',
205 '-E', 'omnibox_mojom_file=<(omnibox_mojom_file)',
208 'includes': [ '../build/grit_action.gypi' ],
211 # GN version: //chrome/common:resources
212 'action_name': 'generate_common_resources',
214 'grit_grd_file': 'common/common_resources.grd',
216 'includes': [ '../build/grit_action.gypi' ],
219 # GN version: //chrome/renderer:resources
220 'action_name': 'generate_renderer_resources',
222 'grit_grd_file': 'renderer/resources/renderer_resources.grd',
224 'includes': [ '../build/grit_action.gypi' ],
228 ['enable_extensions==1', {
231 # GN version: //chrome/common:extensions_api_resources
232 'action_name': 'generate_extensions_api_resources',
234 'grit_grd_file': 'common/extensions_api_resources.grd',
236 'includes': [ '../build/grit_action.gypi' ],
241 'includes': [ '../build/grit_target.gypi' ],
244 # TODO(mark): It would be better if each static library that needed
245 # to run grit would list its own .grd files, but unfortunately some
246 # of the static libraries currently have circular dependencies among
249 # GN version: //chrome:strings
250 'target_name': 'chrome_strings',
254 # GN version: //chrome/app/resources:locale_settings
255 'action_name': 'generate_locale_settings',
257 'grit_grd_file': 'app/resources/locale_settings.grd',
259 'includes': [ '../build/grit_action.gypi' ],
262 # GN version: //chrome/app:chromium_strings
263 'action_name': 'generate_chromium_strings',
265 'grit_grd_file': 'app/chromium_strings.grd',
267 'includes': [ '../build/grit_action.gypi' ],
270 # GN version: //chrome/app:generated_resources
271 'action_name': 'generate_generated_resources',
273 'grit_grd_file': 'app/generated_resources.grd',
275 'includes': [ '../build/grit_action.gypi' ],
278 # GN version: //chrome/app:google_chrome_strings
279 'action_name': 'generate_google_chrome_strings',
281 'grit_grd_file': 'app/google_chrome_strings.grd',
283 'includes': [ '../build/grit_action.gypi' ],
286 'includes': [ '../build/grit_target.gypi' ],
289 # GN version: //chrome/app:make_generated_resources_map
290 'target_name': 'chrome_strings_map',
292 'dependencies': [ 'chrome_strings', ],
295 'action_name': 'generate_resources_map',
297 'browser/metrics/variations/generate_resources_map.py',
298 '<(grit_out_dir)/grit/generated_resources.h'
301 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
305 'browser/metrics/variations/generate_resources_map.py',
306 '<(grit_out_dir)/grit/generated_resources.h',
307 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc'
309 'message': 'Generating generated resources map.',
314 # GN version: //chrome/app/resources:platform_locale_settings
315 'target_name': 'platform_locale_settings',
320 'platform_locale_settings_grd':
321 'app/resources/locale_settings_win.grd',
327 ['branding=="Chrome"', {
328 'platform_locale_settings_grd':
329 'app/resources/locale_settings_google_chromeos.grd',
330 }, { # branding!=Chrome
331 'platform_locale_settings_grd':
332 'app/resources/locale_settings_chromiumos.grd',
336 'platform_locale_settings_grd':
337 'app/resources/locale_settings_linux.grd',
341 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
342 'platform_locale_settings_grd':
343 'app/resources/locale_settings_linux.grd',
345 ['OS == "mac" or OS == "ios"', {
346 'platform_locale_settings_grd':
347 'app/resources/locale_settings_mac.grd',
353 'action_name': 'generate_platform_locale_settings',
355 'grit_grd_file': '<(platform_locale_settings_grd)',
357 'includes': [ '../build/grit_action.gypi' ],
360 'includes': [ '../build/grit_target.gypi' ],
363 # GN version: //chrome/app/theme:theme_resources
364 'target_name': 'theme_resources',
367 '../ui/resources/ui_resources.gyp:ui_resources',
368 'chrome_unscaled_resources',
372 'action_name': 'generate_theme_resources',
374 'grit_grd_file': 'app/theme/theme_resources.grd',
376 'includes': [ '../build/grit_action.gypi' ],
379 'includes': [ '../build/grit_target.gypi' ],
382 'target_name': 'packed_extra_resources',
385 'chrome_extra_resources',
390 'includes': ['chrome_repack_resources.gypi']
394 ['OS != "mac" and OS != "ios"', {
395 # We'll install the resource files to the product directory. The Mac
396 # copies the results over as bundle resources in its own special way.
399 'destination': '<(PRODUCT_DIR)',
401 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
409 'target_name': 'packed_resources',
412 # MSVS needs the dependencies explictly named, Make is able to
413 # derive the dependencies from the output files.
416 'platform_locale_settings',
418 '<(DEPTH)/components/components_strings.gyp:components_strings',
419 '<(DEPTH)/net/net.gyp:net_resources',
420 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
421 '<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
425 'action_name': 'repack_locales_pack',
427 'pak_locales': '<(locales)',
429 'includes': ['chrome_repack_locales.gypi']
432 'action_name': 'repack_pseudo_locales_pack',
434 'pak_locales': '<(pseudo_locales)',
436 'includes': ['chrome_repack_locales.gypi']
439 'includes': ['chrome_repack_chrome_100_percent.gypi']
442 'includes': ['chrome_repack_chrome_200_percent.gypi']
448 '<(DEPTH)/content/app/resources/content_resources.gyp:content_resources',
449 '<(DEPTH)/content/app/strings/content_strings.gyp:content_strings',
450 '<(DEPTH)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
455 '<(DEPTH)/ash/ash_resources.gyp:ash_resources',
456 '<(DEPTH)/ash/ash_strings.gyp:ash_strings',
461 '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources',
462 '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings',
465 ['enable_autofill_dialog==1 and OS!="android"', {
467 '<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings',
470 ['enable_extensions==1', {
472 '<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
473 '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
476 ['OS != "mac" and OS != "ios"', {
477 # Copy pak files to the product directory. These files will be picked
478 # up by the following installer scripts:
479 # - Windows: chrome/installer/mini_installer/chrome.release
480 # - Linux: chrome/installer/linux/internal/common/installer.include
481 # Ensure that the above scripts are updated when adding or removing
483 # Copying files to the product directory is not needed on the Mac
484 # since the framework build phase will copy them into the framework
488 'destination': '<(PRODUCT_DIR)',
490 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
494 'destination': '<(PRODUCT_DIR)/locales',
496 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'
500 'destination': '<(PRODUCT_DIR)/pseudo_locales',
502 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))'
507 ['branding=="Chrome"', {
510 # This location is for the Windows and Linux builds. For
511 # Windows, the chrome.release file ensures that these files
512 # are copied into the installer. Note that we have a separate
513 # section in chrome_dll.gyp to copy these files for Mac, as it
514 # needs to be dropped inside the framework.
515 'destination': '<(PRODUCT_DIR)/default_apps',
516 'files': ['<@(default_apps_list)']
520 ['enable_hidpi == 1', {
523 'destination': '<(PRODUCT_DIR)',
525 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
531 }], # end OS != "mac" and OS != "ios"
535 # GN version: //chrome/app/theme:chrome_unscaled_resources
536 'target_name': 'chrome_unscaled_resources',
540 'action_name': 'generate_chrome_unscaled_resources',
542 'grit_grd_file': 'app/theme/chrome_unscaled_resources.grd',
544 'includes': [ '../build/grit_action.gypi' ],
547 'includes': [ '../build/grit_target.gypi' ],
550 # GN version: //chrome/browser:about_credits
551 'target_name': 'about_credits',
556 'generator_path': '../tools/licenses.py',
558 'action_name': 'generate_about_credits',
560 # TODO(phajdan.jr): make licenses.py print inputs too.
564 '<(about_credits_file)',
566 'hard_dependency': 1,
570 '<(about_credits_file)',
572 'message': 'Generating about:credits',