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 'target_name': 'chrome_extra_resources',
15 # These resources end up in resources.pak because they are resources
16 # used by internal pages. Putting them in a separate pak file makes
17 # it easier for us to reference them internally.
20 'action_name': 'generate_memory_internals_resources',
22 'grit_grd_file': 'browser/resources/memory_internals_resources.grd',
24 'includes': [ '../build/grit_action.gypi' ],
27 'action_name': 'generate_net_internals_resources',
29 'grit_grd_file': 'browser/resources/net_internals_resources.grd',
31 'includes': [ '../build/grit_action.gypi' ],
34 'action_name': 'generate_invalidations_resources',
36 'grit_grd_file': 'browser/resources/invalidations_resources.grd',
38 'includes': ['../build/grit_action.gypi' ],
41 'action_name': 'generate_password_manager_internals_resources',
43 'grit_grd_file': 'browser/resources/password_manager_internals_resources.grd',
45 'includes': [ '../build/grit_action.gypi' ],
48 'action_name': 'generate_signin_internals_resources',
50 'grit_grd_file': 'browser/resources/signin_internals_resources.grd',
52 'includes': ['../build/grit_action.gypi' ],
55 'action_name': 'generate_sync_internals_resources',
57 'grit_grd_file': 'browser/resources/sync_internals_resources.grd',
59 'includes': [ '../build/grit_action.gypi' ],
62 'action_name': 'generate_translate_internals_resources',
64 'grit_grd_file': 'browser/resources/translate_internals_resources.grd',
66 'includes': [ '../build/grit_action.gypi' ],
69 'includes': [ '../build/grit_target.gypi' ],
73 '../components/components_resources.gyp:components_resources',
74 '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
75 '../content/browser/tracing/tracing_resources.gyp:tracing_resources',
79 'action_name': 'generate_component_extension_resources',
81 'grit_grd_file': 'browser/resources/component_extension_resources.grd',
83 'includes': [ '../build/grit_action.gypi' ],
86 'action_name': 'generate_options_resources',
88 'grit_grd_file': 'browser/resources/options_resources.grd',
90 'includes': [ '../build/grit_action.gypi' ],
93 'action_name': 'generate_quota_internals_resources',
95 'grit_grd_file': 'browser/resources/quota_internals_resources.grd',
97 'includes': [ '../build/grit_action.gypi' ],
100 'action_name': 'generate_sync_file_system_internals_resources',
102 'grit_grd_file': 'browser/resources/sync_file_system_internals_resources.grd',
104 'includes': [ '../build/grit_action.gypi' ],
109 'destination': '<(PRODUCT_DIR)/resources/extension/demo',
111 'browser/resources/extension_resource/demo/library.js',
116 ['chromeos==1 and disable_nacl==0 and disable_nacl_untrusted==0', {
118 # TODO(dtseng): Remove use_chromevox_next once ChromeVox Next is ready for testing.
119 ['use_chromevox_next==1', {
121 'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2',
123 }, { # else use_chromevox_next == 0
125 'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox',
133 # GN version: //chrome/browser:chrome_internal_resources_gen
134 'target_name': 'chrome_internal_resources_gen',
137 ['branding=="Chrome"', {
140 'action_name': 'generate_transform_additional_modules_list',
142 'additional_modules_input_path':
143 'browser/internal/resources/additional_modules_list.input',
144 'additional_modules_py_path':
145 'browser/internal/transform_additional_modules_list.py',
148 '<(additional_modules_input_path)',
151 '<(additional_modules_list_file)',
155 '<(additional_modules_py_path)',
156 '<(additional_modules_input_path)',
159 'message': 'Transforming additional modules list',
166 # TODO(mark): It would be better if each static library that needed
167 # to run grit would list its own .grd files, but unfortunately some
168 # of the static libraries currently have circular dependencies among
171 # GN version: //chrome:resources
172 'target_name': 'chrome_resources',
176 'chrome_internal_resources_gen',
177 'chrome_web_ui_mojo_bindings.gyp:web_ui_mojo_bindings',
181 # GN version: //chrome/browser:resources
182 'action_name': 'generate_browser_resources',
184 'grit_grd_file': 'browser/browser_resources.grd',
185 'grit_additional_defines': [
186 '-E', 'about_credits_file=<(about_credits_file)',
187 '-E', 'additional_modules_list_file=<(additional_modules_list_file)',
188 '-E', 'omnibox_mojom_file=<(omnibox_mojom_file)',
191 'includes': [ '../build/grit_action.gypi' ],
194 # GN version: //chrome/common:resources
195 'action_name': 'generate_common_resources',
197 'grit_grd_file': 'common/common_resources.grd',
199 'includes': [ '../build/grit_action.gypi' ],
202 # GN version: //chrome/renderer:resources
203 'action_name': 'generate_renderer_resources',
205 'grit_grd_file': 'renderer/resources/renderer_resources.grd',
207 'includes': [ '../build/grit_action.gypi' ],
211 ['enable_extensions==1', {
214 # GN version: //chrome/common:extensions_api_resources
215 'action_name': 'generate_extensions_api_resources',
217 'grit_grd_file': 'common/extensions_api_resources.grd',
219 'includes': [ '../build/grit_action.gypi' ],
224 'includes': [ '../build/grit_target.gypi' ],
227 # TODO(mark): It would be better if each static library that needed
228 # to run grit would list its own .grd files, but unfortunately some
229 # of the static libraries currently have circular dependencies among
232 # GN version: //chrome:strings
233 'target_name': 'chrome_strings',
237 # GN version: //chrome/app/resources:locale_settings
238 'action_name': 'generate_locale_settings',
240 'grit_grd_file': 'app/resources/locale_settings.grd',
242 'includes': [ '../build/grit_action.gypi' ],
245 # GN version: //chrome/app:chromium_strings
246 'action_name': 'generate_chromium_strings',
248 'grit_grd_file': 'app/chromium_strings.grd',
250 'includes': [ '../build/grit_action.gypi' ],
253 # GN version: //chrome/app:generated_resources
254 'action_name': 'generate_generated_resources',
256 'grit_grd_file': 'app/generated_resources.grd',
258 'includes': [ '../build/grit_action.gypi' ],
261 # GN version: //chrome/app:google_chrome_strings
262 'action_name': 'generate_google_chrome_strings',
264 'grit_grd_file': 'app/google_chrome_strings.grd',
266 'includes': [ '../build/grit_action.gypi' ],
269 'includes': [ '../build/grit_target.gypi' ],
272 'target_name': 'chrome_strings_map',
274 'dependencies': [ 'chrome_strings', ],
277 'action_name': 'generate_resources_map',
279 '<(grit_out_dir)/grit/generated_resources.h'
282 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc',
286 'browser/metrics/variations/generate_resources_map.py',
287 '<(grit_out_dir)/grit/generated_resources.h',
288 '<(SHARED_INTERMEDIATE_DIR)/chrome/browser/metrics/variations/generated_resources_map.cc'
290 'message': 'Generating generated resources map.',
295 'target_name': 'platform_locale_settings',
300 'platform_locale_settings_grd':
301 'app/resources/locale_settings_win.grd',
307 ['branding=="Chrome"', {
308 'platform_locale_settings_grd':
309 'app/resources/locale_settings_google_chromeos.grd',
310 }, { # branding!=Chrome
311 'platform_locale_settings_grd':
312 'app/resources/locale_settings_chromiumos.grd',
316 'platform_locale_settings_grd':
317 'app/resources/locale_settings_linux.grd',
321 ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
322 'platform_locale_settings_grd':
323 'app/resources/locale_settings_linux.grd',
325 ['OS == "mac" or OS == "ios"', {
326 'platform_locale_settings_grd':
327 'app/resources/locale_settings_mac.grd',
333 'action_name': 'generate_platform_locale_settings',
335 'grit_grd_file': '<(platform_locale_settings_grd)',
337 'includes': [ '../build/grit_action.gypi' ],
340 'includes': [ '../build/grit_target.gypi' ],
343 # GN version: //chrome/app/theme:theme_resources
344 'target_name': 'theme_resources',
347 '../ui/resources/ui_resources.gyp:ui_resources',
348 'chrome_unscaled_resources',
352 'action_name': 'generate_theme_resources',
354 'grit_grd_file': 'app/theme/theme_resources.grd',
356 'includes': [ '../build/grit_action.gypi' ],
359 'includes': [ '../build/grit_target.gypi' ],
362 'target_name': 'packed_extra_resources',
365 'chrome_extra_resources',
370 'includes': ['chrome_repack_resources.gypi']
374 ['OS != "mac" and OS != "ios"', {
375 # We'll install the resource files to the product directory. The Mac
376 # copies the results over as bundle resources in its own special way.
379 'destination': '<(PRODUCT_DIR)',
381 '<(SHARED_INTERMEDIATE_DIR)/repack/resources.pak'
389 'target_name': 'packed_resources',
392 # MSVS needs the dependencies explictly named, Make is able to
393 # derive the dependencies from the output files.
396 'platform_locale_settings',
398 '<(DEPTH)/components/components_strings.gyp:components_strings',
399 '<(DEPTH)/net/net.gyp:net_resources',
400 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
401 '<(DEPTH)/ui/strings/ui_strings.gyp:ui_strings',
405 'action_name': 'repack_locales_pack',
407 'pak_locales': '<(locales)',
409 'includes': ['chrome_repack_locales.gypi']
412 'action_name': 'repack_pseudo_locales_pack',
414 'pak_locales': '<(pseudo_locales)',
416 'includes': ['chrome_repack_locales.gypi']
419 'includes': ['chrome_repack_chrome_100_percent.gypi']
422 'includes': ['chrome_repack_chrome_200_percent.gypi']
428 '<(DEPTH)/content/content_resources.gyp:content_resources',
429 '<(DEPTH)/device/bluetooth/bluetooth_strings.gyp:device_bluetooth_strings',
430 '<(DEPTH)/extensions/extensions_strings.gyp:extensions_strings',
431 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
432 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
437 '<(DEPTH)/ash/ash_resources.gyp:ash_resources',
438 '<(DEPTH)/ash/ash_strings.gyp:ash_strings',
441 ['enable_autofill_dialog==1 and OS!="android"', {
443 '<(DEPTH)/third_party/libaddressinput/libaddressinput.gyp:libaddressinput_strings',
446 ['OS != "mac" and OS != "ios"', {
447 # Copy pak files to the product directory. These files will be picked
448 # up by the following installer scripts:
449 # - Windows: chrome/installer/mini_installer/chrome.release
450 # - Linux: chrome/installer/linux/internal/common/installer.include
451 # Ensure that the above scripts are updated when adding or removing
453 # Copying files to the product directory is not needed on the Mac
454 # since the framework build phase will copy them into the framework
458 'destination': '<(PRODUCT_DIR)',
460 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_100_percent.pak'
464 'destination': '<(PRODUCT_DIR)/locales',
466 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(locales))'
470 'destination': '<(PRODUCT_DIR)/pseudo_locales',
472 '<!@pymod_do_main(repack_locales -o -p <(OS) -g <(grit_out_dir) -s <(SHARED_INTERMEDIATE_DIR) -x <(SHARED_INTERMEDIATE_DIR) <(pseudo_locales))'
477 ['branding=="Chrome"', {
480 # This location is for the Windows and Linux builds. For
481 # Windows, the chrome.release file ensures that these files
482 # are copied into the installer. Note that we have a separate
483 # section in chrome_dll.gyp to copy these files for Mac, as it
484 # needs to be dropped inside the framework.
485 'destination': '<(PRODUCT_DIR)/default_apps',
486 'files': ['<@(default_apps_list)']
490 ['enable_hidpi == 1', {
493 'destination': '<(PRODUCT_DIR)',
495 '<(SHARED_INTERMEDIATE_DIR)/repack/chrome_200_percent.pak',
501 }], # end OS != "mac" and OS != "ios"
505 'target_name': 'chrome_unscaled_resources',
509 'action_name': 'generate_chrome_unscaled_resources',
511 'grit_grd_file': 'app/theme/chrome_unscaled_resources.grd',
513 'includes': [ '../build/grit_action.gypi' ],
516 'includes': [ '../build/grit_target.gypi' ],
519 # GN version: //chrome/browser:about_credits
520 'target_name': 'about_credits',
525 'generator_path': '../tools/licenses.py',
527 'action_name': 'generate_about_credits',
529 # TODO(phajdan.jr): make licenses.py print inputs too.
533 '<(about_credits_file)',
535 'hard_dependency': 1,
539 '<(about_credits_file)',
541 'message': 'Generating about:credits',