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' ],
103 # GN version: //chrome/browser/resources:quota_internals_resources
104 'action_name': 'generate_quota_internals_resources',
106 'grit_grd_file': 'browser/resources/quota_internals_resources.grd',
108 'includes': [ '../build/grit_action.gypi' ],
111 # GN version: //chrome/browser/resources:sync_file_system_internals_resources
112 'action_name': 'generate_sync_file_system_internals_resources',
114 'grit_grd_file': 'browser/resources/sync_file_system_internals_resources.grd',
116 'includes': [ '../build/grit_action.gypi' ],
121 # GN version: //chrome/browser/resources:extension_resource_demo
122 'destination': '<(PRODUCT_DIR)/resources/extension/demo',
124 'browser/resources/extension_resource/demo/library.js',
129 ['chromeos==1 and disable_nacl==0 and disable_nacl_untrusted==0', {
131 # TODO(dtseng): Remove use_chromevox_next once ChromeVox Next is ready for testing.
132 ['use_chromevox_next==1', {
134 'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2',
136 }, { # else use_chromevox_next == 0
138 'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox',
146 # GN version: //chrome/browser:chrome_internal_resources_gen
147 'target_name': 'chrome_internal_resources_gen',
150 ['branding=="Chrome"', {
153 'action_name': 'generate_transform_additional_modules_list',
155 'additional_modules_input_path':
156 'browser/internal/resources/additional_modules_list.input',
157 'additional_modules_py_path':
158 'browser/internal/transform_additional_modules_list.py',
161 '<(additional_modules_input_path)',
164 '<(additional_modules_list_file)',
168 '<(additional_modules_py_path)',
169 '<(additional_modules_input_path)',
172 'message': 'Transforming additional modules list',
179 # TODO(mark): It would be better if each static library that needed
180 # to run grit would list its own .grd files, but unfortunately some
181 # of the static libraries currently have circular dependencies among
184 # GN version: //chrome:resources
185 'target_name': 'chrome_resources',
189 'chrome_internal_resources_gen',
190 'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
194 # GN version: //chrome/browser:resources
195 'action_name': 'generate_browser_resources',
197 'grit_grd_file': 'browser/browser_resources.grd',
198 'grit_additional_defines': [
199 '-E', 'about_credits_file=<(about_credits_file)',
200 '-E', 'additional_modules_list_file=<(additional_modules_list_file)',
201 '-E', 'omnibox_mojom_file=<(omnibox_mojom_file)',
204 'includes': [ '../build/grit_action.gypi' ],
207 # GN version: //chrome/common:resources
208 'action_name': 'generate_common_resources',
210 'grit_grd_file': 'common/common_resources.grd',
212 'includes': [ '../build/grit_action.gypi' ],
215 # GN version: //chrome/renderer:resources
216 'action_name': 'generate_renderer_resources',
218 'grit_grd_file': 'renderer/resources/renderer_resources.grd',
220 'includes': [ '../build/grit_action.gypi' ],
224 ['enable_extensions==1', {
227 # GN version: //chrome/common:extensions_api_resources
228 'action_name': 'generate_extensions_api_resources',
230 'grit_grd_file': 'common/extensions_api_resources.grd',
232 'includes': [ '../build/grit_action.gypi' ],
237 'includes': [ '../build/grit_target.gypi' ],
240 # TODO(mark): It would be better if each static library that needed
241 # to run grit would list its own .grd files, but unfortunately some
242 # of the static libraries currently have circular dependencies among
245 # GN version: //chrome:strings
246 'target_name': 'chrome_strings',
250 # GN version: //chrome/app/resources:locale_settings
251 'action_name': 'generate_locale_settings',
253 'grit_grd_file': 'app/resources/locale_settings.grd',
255 'includes': [ '../build/grit_action.gypi' ],
258 # GN version: //chrome/app:chromium_strings
259 'action_name': 'generate_chromium_strings',
261 'grit_grd_file': 'app/chromium_strings.grd',
263 'includes': [ '../build/grit_action.gypi' ],
266 # GN version: //chrome/app:generated_resources
267 'action_name': 'generate_generated_resources',
269 'grit_grd_file': 'app/generated_resources.grd',
271 'includes': [ '../build/grit_action.gypi' ],
274 # GN version: //chrome/app:google_chrome_strings
275 'action_name': 'generate_google_chrome_strings',
277 'grit_grd_file': 'app/google_chrome_strings.grd',
279 'includes': [ '../build/grit_action.gypi' ],
282 'includes': [ '../build/grit_target.gypi' ],
285 # GN version: //chrome/app:make_generated_resources_map
286 'target_name': 'chrome_strings_map',
288 'dependencies': [ 'chrome_strings', ],
291 'action_name': 'generate_resources_map',
293 '<(grit_out_dir)/grit/generated_resources.h'
296 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
300 'browser/metrics/variations/generate_resources_map.py',
301 '<(grit_out_dir)/grit/generated_resources.h',
302 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc'
304 'message': 'Generating generated resources map.',
309 # GN version: //chrome/app/resources:platform_locale_settings
310 'target_name': 'platform_locale_settings',
315 'platform_locale_settings_grd':
316 'app/resources/locale_settings_win.grd',
322 ['branding=="Chrome"', {
323 'platform_locale_settings_grd':
324 'app/resources/locale_settings_google_chromeos.grd',
325 }, { # branding!=Chrome
326 'platform_locale_settings_grd':
327 'app/resources/locale_settings_chromiumos.grd',
331 'platform_locale_settings_grd':
332 'app/resources/locale_settings_linux.grd',
336 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
337 'platform_locale_settings_grd':
338 'app/resources/locale_settings_linux.grd',
340 ['OS == "mac" or OS == "ios"', {
341 'platform_locale_settings_grd':
342 'app/resources/locale_settings_mac.grd',
348 'action_name': 'generate_platform_locale_settings',
350 'grit_grd_file': '<(platform_locale_settings_grd)',
352 'includes': [ '../build/grit_action.gypi' ],
355 'includes': [ '../build/grit_target.gypi' ],
358 # GN version: //chrome/app/theme:theme_resources
359 'target_name': 'theme_resources',
362 '../ui/resources/ui_resources.gyp:ui_resources',
363 'chrome_unscaled_resources',
367 'action_name': 'generate_theme_resources',
369 'grit_grd_file': 'app/theme/theme_resources.grd',
371 'includes': [ '../build/grit_action.gypi' ],
374 'includes': [ '../build/grit_target.gypi' ],
377 'target_name': 'packed_extra_resources',
380 'chrome_extra_resources',
385 'includes': ['chrome_repack_resources.gypi']
389 ['OS != "mac" and OS != "ios"', {
390 # We'll install the resource files to the product directory. The Mac
391 # copies the results over as bundle resources in its own special way.
394 'destination': '<(PRODUCT_DIR)',
396 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
404 'target_name': 'packed_resources',
407 # MSVS needs the dependencies explictly named, Make is able to
408 # derive the dependencies from the output files.
411 'platform_locale_settings',
413 '<(DEPTH)/components/components_strings.gyp:components_strings',
414 '<(DEPTH)/net/net.gyp:net_resources',
415 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
416 '<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
420 'action_name': 'repack_locales_pack',
422 'pak_locales': '<(locales)',
424 'includes': ['chrome_repack_locales.gypi']
427 'action_name': 'repack_pseudo_locales_pack',
429 'pak_locales': '<(pseudo_locales)',
431 'includes': ['chrome_repack_locales.gypi']
434 'includes': ['chrome_repack_chrome_100_percent.gypi']
437 'includes': ['chrome_repack_chrome_200_percent.gypi']
443 '<(DEPTH)/content/content_resources.gyp:content_resources',
444 '<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
445 '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
446 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
447 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
452 '<(DEPTH)/ash/ash_resources.gyp:ash_resources',
453 '<(DEPTH)/ash/ash_strings.gyp:ash_strings',
458 '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources',
459 '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings',
462 ['enable_autofill_dialog==1 and OS!="android"', {
464 '<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings',
467 ['OS != "mac" and OS != "ios"', {
468 # Copy pak files to the product directory. These files will be picked
469 # up by the following installer scripts:
470 # - Windows: chrome/installer/mini_installer/chrome.release
471 # - Linux: chrome/installer/linux/internal/common/installer.include
472 # Ensure that the above scripts are updated when adding or removing
474 # Copying files to the product directory is not needed on the Mac
475 # since the framework build phase will copy them into the framework
479 'destination': '<(PRODUCT_DIR)',
481 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
485 'destination': '<(PRODUCT_DIR)/locales',
487 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'
491 'destination': '<(PRODUCT_DIR)/pseudo_locales',
493 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))'
498 ['branding=="Chrome"', {
501 # This location is for the Windows and Linux builds. For
502 # Windows, the chrome.release file ensures that these files
503 # are copied into the installer. Note that we have a separate
504 # section in chrome_dll.gyp to copy these files for Mac, as it
505 # needs to be dropped inside the framework.
506 'destination': '<(PRODUCT_DIR)/default_apps',
507 'files': ['<@(default_apps_list)']
511 ['enable_hidpi == 1', {
514 'destination': '<(PRODUCT_DIR)',
516 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
522 }], # end OS != "mac" and OS != "ios"
526 # GN version: //chrome/app/theme:chrome_unscaled_resources
527 'target_name': 'chrome_unscaled_resources',
531 'action_name': 'generate_chrome_unscaled_resources',
533 'grit_grd_file': 'app/theme/chrome_unscaled_resources.grd',
535 'includes': [ '../build/grit_action.gypi' ],
538 'includes': [ '../build/grit_target.gypi' ],
541 # GN version: //chrome/browser:about_credits
542 'target_name': 'about_credits',
547 'generator_path': '../tools/licenses.py',
549 'action_name': 'generate_about_credits',
551 # TODO(phajdan.jr): make licenses.py print inputs too.
555 '<(about_credits_file)',
557 'hard_dependency': 1,
561 '<(about_credits_file)',
563 'message': 'Generating about:credits',