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. 4 5 { 6 'variables': { 7 'content_shell_product_name': 'Content Shell', 8 # The "19" is so that sites that sniff for version think that this is 9 # something reasonably current; the "77.34.5" is a hint that this isn't a 10 # standard Chrome. 11 'content_shell_version': '19.77.34.5', 12 'conditions': [ 13 ['OS=="linux"', { 14 'use_custom_freetype%': 1, 15 }, { 16 'use_custom_freetype%': 0, 17 }], 18 ], 19 }, 20 'targets': [ 21 { 22 'target_name': 'content_shell_lib', 23 'type': 'static_library', 24 'defines': ['CONTENT_SHELL_VERSION="<(content_shell_version)"'], 25 'variables': { 26 'chromium_code': 1, 27 }, 28 'dependencies': [ 29 'content.gyp:content_app_both', 30 'content.gyp:content_browser', 31 'content.gyp:content_common', 32 'content.gyp:content_gpu', 33 'content.gyp:content_plugin', 34 'content.gyp:content_ppapi_plugin', 35 'content.gyp:content_renderer', 36 'content.gyp:content_utility', 37 'content.gyp:content_worker', 38 'content_shell_resources', 39 'test_support_content', 40 'content_resources.gyp:content_resources', 41 '../base/base.gyp:base', 42 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 43 '../components/components.gyp:breakpad_component', 44 '../ipc/ipc.gyp:ipc', 45 '../media/media.gyp:media', 46 '../net/net.gyp:net', 47 '../net/net.gyp:net_resources', 48 '../skia/skia.gyp:skia', 49 '../third_party/WebKit/public/blink_test_runner.gyp:blink_test_runner', 50 '../ui/events/events.gyp:events_base', 51 '../ui/gfx/gfx.gyp:gfx', 52 '../ui/gl/gl.gyp:gl', 53 '../ui/ui.gyp:ui', 54 '../url/url.gyp:url_lib', 55 '../v8/tools/gyp/v8.gyp:v8', 56 '../webkit/common/user_agent/webkit_user_agent.gyp:user_agent', 57 '../webkit/common/webkit_common.gyp:webkit_common', 58 '../webkit/glue/webkit_glue.gyp:glue', 59 '../webkit/webkit_resources.gyp:webkit_resources', 60 ], 61 'include_dirs': [ 62 '..', 63 ], 64 'sources': [ 65 'shell/android/shell_jni_registrar.cc', 66 'shell/android/shell_jni_registrar.h', 67 'shell/android/shell_manager.cc', 68 'shell/android/shell_manager.h', 69 'shell/app/paths_mac.h', 70 'shell/app/paths_mac.mm', 71 'shell/app/shell_breakpad_client.cc', 72 'shell/app/shell_breakpad_client.h', 73 'shell/app/shell_main_delegate.cc', 74 'shell/app/shell_main_delegate.h', 75 'shell/app/shell_main_delegate_mac.h', 76 'shell/app/shell_main_delegate_mac.mm', 77 'shell/app/webkit_test_platform_support_android.cc', 78 'shell/app/webkit_test_platform_support.h', 79 'shell/app/webkit_test_platform_support_linux.cc', 80 'shell/app/webkit_test_platform_support_mac.mm', 81 'shell/app/webkit_test_platform_support_win.cc', 82 'shell/browser/notify_done_forwarder.cc', 83 'shell/browser/notify_done_forwarder.h', 84 'shell/browser/shell_android.cc', 85 'shell/browser/shell_application_mac.h', 86 'shell/browser/shell_application_mac.mm', 87 'shell/browser/shell_aura.cc', 88 'shell/browser/shell_browser_context.cc', 89 'shell/browser/shell_browser_context.h', 90 'shell/browser/shell_browser_main.cc', 91 'shell/browser/shell_browser_main.h', 92 'shell/browser/shell_browser_main_parts.cc', 93 'shell/browser/shell_browser_main_parts.h', 94 'shell/browser/shell_browser_main_parts_mac.mm', 95 'shell/browser/shell.cc', 96 'shell/browser/shell_content_browser_client.cc', 97 'shell/browser/shell_content_browser_client.h', 98 'shell/browser/shell_devtools_delegate.cc', 99 'shell/browser/shell_devtools_delegate.h', 100 'shell/browser/shell_devtools_frontend.cc', 101 'shell/browser/shell_devtools_frontend.h', 102 'shell/browser/shell_download_manager_delegate.cc', 103 'shell/browser/shell_download_manager_delegate.h', 104 'shell/browser/shell_gtk.cc', 105 'shell/browser/shell.h', 106 'shell/browser/shell_javascript_dialog_gtk.cc', 107 'shell/browser/shell_javascript_dialog.h', 108 'shell/browser/shell_javascript_dialog_mac.mm', 109 'shell/browser/shell_javascript_dialog_manager.cc', 110 'shell/browser/shell_javascript_dialog_manager.h', 111 'shell/browser/shell_javascript_dialog_win.cc', 112 'shell/browser/shell_layout_tests_android.cc', 113 'shell/browser/shell_layout_tests_android.h', 114 'shell/browser/shell_login_dialog.cc', 115 'shell/browser/shell_login_dialog_gtk.cc', 116 'shell/browser/shell_login_dialog.h', 117 'shell/browser/shell_login_dialog_mac.mm', 118 'shell/browser/shell_mac.mm', 119 'shell/browser/shell_message_filter.cc', 120 'shell/browser/shell_message_filter.h', 121 'shell/browser/shell_net_log.cc', 122 'shell/browser/shell_net_log.h', 123 'shell/browser/shell_network_delegate.cc', 124 'shell/browser/shell_network_delegate.h', 125 'shell/browser/shell_plugin_service_filter.cc', 126 'shell/browser/shell_plugin_service_filter.h', 127 'shell/browser/shell_quota_permission_context.cc', 128 'shell/browser/shell_quota_permission_context.h', 129 'shell/browser/shell_resource_dispatcher_host_delegate.cc', 130 'shell/browser/shell_resource_dispatcher_host_delegate.h', 131 'shell/browser/shell_speech_recognition_manager_delegate.cc', 132 'shell/browser/shell_speech_recognition_manager_delegate.h', 133 'shell/browser/shell_url_request_context_getter.cc', 134 'shell/browser/shell_url_request_context_getter.h', 135 'shell/browser/shell_views.cc', 136 'shell/browser/shell_web_contents_view_delegate_android.cc', 137 'shell/browser/shell_web_contents_view_delegate_creator.h', 138 'shell/browser/shell_web_contents_view_delegate_gtk.cc', 139 'shell/browser/shell_web_contents_view_delegate.h', 140 'shell/browser/shell_web_contents_view_delegate_mac.mm', 141 'shell/browser/shell_web_contents_view_delegate_win.cc', 142 'shell/browser/shell_win.cc', 143 'shell/browser/webkit_test_controller.cc', 144 'shell/browser/webkit_test_controller.h', 145 'shell/common/shell_content_client.cc', 146 'shell/common/shell_content_client.h', 147 'shell/common/shell_messages.cc', 148 'shell/common/shell_messages.h', 149 'shell/common/shell_switches.cc', 150 'shell/common/shell_switches.h', 151 'shell/common/shell_test_configuration.cc', 152 'shell/common/shell_test_configuration.h', 153 'shell/common/webkit_test_helpers.cc', 154 'shell/common/webkit_test_helpers.h', 155 'shell/geolocation/shell_access_token_store.cc', 156 'shell/geolocation/shell_access_token_store.h', 157 'shell/renderer/gc_extension.cc', 158 'shell/renderer/gc_extension.h', 159 'shell/renderer/shell_content_renderer_client.cc', 160 'shell/renderer/shell_content_renderer_client.h', 161 'shell/renderer/shell_render_process_observer.cc', 162 'shell/renderer/shell_render_process_observer.h', 163 'shell/renderer/shell_render_view_observer.cc', 164 'shell/renderer/shell_render_view_observer.h', 165 'shell/renderer/webkit_test_runner.cc', 166 'shell/renderer/webkit_test_runner.h', 167 ], 168 'msvs_settings': { 169 'VCLinkerTool': { 170 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS 171 }, 172 }, 173 'conditions': [ 174 ['OS=="win" and win_use_allocator_shim==1', { 175 'dependencies': [ 176 '../base/allocator/allocator.gyp:allocator', 177 ], 178 }], 179 ['OS=="win"', { 180 'resource_include_dirs': [ 181 '<(SHARED_INTERMEDIATE_DIR)/webkit', 182 ], 183 'dependencies': [ 184 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings', 185 ], 186 'configurations': { 187 'Debug_Base': { 188 'msvs_settings': { 189 'VCLinkerTool': { 190 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', 191 }, 192 }, 193 }, 194 }, 195 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 196 'msvs_disabled_warnings': [ 4267, ], 197 }], # OS=="win" 198 ['OS=="linux"', { 199 'dependencies': [ 200 '../build/linux/system.gyp:fontconfig', 201 ], 202 }], 203 ['OS=="android"', { 204 'dependencies': [ 205 'content_shell_jni_headers', 206 ], 207 }, { # else: OS!="android" 208 'dependencies': [ 209 # This dependency is for running DRT against the content shell, and 210 # this combination is not yet supported on Android. 211 'test_support_content', 212 ], 213 }], # OS=="android" 214 ['os_posix == 1 and OS != "mac" and android_webview_build != 1', { 215 'dependencies': [ 216 '../components/components.gyp:breakpad_host', 217 ], 218 }], 219 ['(os_posix==1 and use_aura==1 and linux_use_tcmalloc==1) or (android_use_tcmalloc==1)', { 220 'dependencies': [ 221 # This is needed by content/app/content_main_runner.cc 222 '../base/allocator/allocator.gyp:allocator', 223 ], 224 }], 225 ['use_aura==1', { 226 'dependencies': [ 227 '../ui/aura/aura.gyp:aura', 228 '../ui/base/strings/ui_strings.gyp:ui_strings', 229 ], 230 'sources/': [ 231 ['exclude', 'shell/browser/shell_gtk.cc'], 232 ['exclude', 'shell/browser/shell_win.cc'], 233 ], 234 'conditions': [ 235 ['toolkit_views==1', { 236 'dependencies': [ 237 '../ui/resources/ui_resources.gyp:ui_resources', 238 '../ui/views/controls/webview/webview.gyp:webview', 239 '../ui/views/views.gyp:views', 240 '../ui/views/views.gyp:views_test_support', 241 ], 242 'sources/': [ 243 ['exclude', 'shell/browser/shell_aura.cc'], 244 ], 245 }, { 246 'sources/': [ 247 ['exclude', 'shell/browser/shell_views.cc'], 248 ], 249 }], 250 ], 251 }, { 252 'sources/': [ 253 ['exclude', 'shell/browser/shell_aura.cc'], 254 ['exclude', 'shell/browser/shell_views.cc'], 255 ], 256 }], # use_aura==1 257 ['chromeos==1', { 258 'dependencies': [ 259 '../chromeos/chromeos.gyp:chromeos', 260 '../ui/wm/wm.gyp:wm_test_support', 261 ], 262 }], # chromeos==1 263 ['use_custom_freetype==1', { 264 'dependencies': [ 265 '../third_party/freetype2/freetype2.gyp:freetype2', 266 ], 267 }], 268 ['enable_plugins==0', { 269 'sources/': [ 270 ['exclude', 'shell/browser/shell_plugin_service_filter.cc'], 271 ['exclude', 'shell/browser/shell_plugin_service_filter.h'], 272 ], 273 }] 274 ], 275 }, 276 { 277 'target_name': 'content_shell_resources', 278 'type': 'none', 279 'dependencies': [ 280 'generate_content_shell_resources', 281 ], 282 'variables': { 283 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', 284 }, 285 'includes': [ '../build/grit_target.gypi' ], 286 'copies': [ 287 { 288 'destination': '<(PRODUCT_DIR)', 289 'files': [ 290 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak' 291 ], 292 }, 293 ], 294 }, 295 { 296 'target_name': 'generate_content_shell_resources', 297 'type': 'none', 298 'variables': { 299 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/content', 300 }, 301 'actions': [ 302 { 303 'action_name': 'content_shell_resources', 304 'variables': { 305 'grit_grd_file': 'shell/shell_resources.grd', 306 }, 307 'includes': [ '../build/grit_action.gypi' ], 308 }, 309 ], 310 }, 311 { 312 # We build a minimal set of resources so WebKit in content_shell has 313 # access to necessary resources. 314 'target_name': 'content_shell_pak', 315 'type': 'none', 316 'dependencies': [ 317 'content_resources.gyp:content_resources', 318 'content_shell_resources', 319 '<(DEPTH)/net/net.gyp:net_resources', 320 '<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings', 321 '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources', 322 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', 323 '<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings', 324 ], 325 'conditions': [ 326 ['OS!="android" and OS!="ios"', { 327 'dependencies': [ 328 'browser/tracing/tracing_resources.gyp:tracing_resources', 329 ], 330 }], 331 ['OS!="android"', { 332 'dependencies': [ 333 'browser/devtools/devtools_resources.gyp:devtools_resources', 334 ], 335 }], 336 ], 337 'variables': { 338 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', 339 }, 340 'actions': [ 341 { 342 'action_name': 'repack_content_shell_pack', 343 'variables': { 344 'pak_inputs': [ 345 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', 346 '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak', 347 '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak', 348 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', 349 '<(SHARED_INTERMEDIATE_DIR)/ui/app_locale_settings/app_locale_settings_en-US.pak', 350 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak', 351 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/webui_resources.pak', 352 '<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings/ui_strings_en-US.pak', 353 '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', 354 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', 355 '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak', 356 ], 357 }, 358 'inputs': [ 359 '<(repack_path)', 360 '<@(pak_inputs)', 361 ], 362 'action': ['python', '<(repack_path)', '<@(_outputs)', 363 '<@(pak_inputs)'], 364 'conditions': [ 365 ['OS!="android"', { 366 'variables': { 367 'pak_inputs': [ 368 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak', 369 ], 370 }, 371 'outputs': [ 372 '<(PRODUCT_DIR)/content_shell.pak', 373 ], 374 }, { 375 'outputs': [ 376 '<(PRODUCT_DIR)/content_shell/assets/content_shell.pak', 377 ], 378 }], 379 ], 380 }, 381 ], 382 }, 383 { 384 'target_name': 'content_shell', 385 'type': 'executable', 386 'mac_bundle': 1, 387 'variables': { 388 'chromium_code': 1, 389 }, 390 'dependencies': [ 391 'content_shell_lib', 392 'content_shell_pak', 393 '../third_party/mesa/mesa.gyp:osmesa', 394 '../tools/imagediff/image_diff.gyp:image_diff', 395 ], 396 'include_dirs': [ 397 '..', 398 ], 399 'sources': [ 400 'app/startup_helper_win.cc', 401 'shell/app/shell_main.cc', 402 ], 403 'mac_bundle_resources': [ 404 'shell/app/app.icns', 405 'shell/app/app-Info.plist', 406 ], 407 # TODO(mark): Come up with a fancier way to do this. It should only 408 # be necessary to list app-Info.plist once, not the three times it is 409 # listed here. 410 'mac_bundle_resources!': [ 411 'shell/app/app-Info.plist', 412 ], 413 'xcode_settings': { 414 'INFOPLIST_FILE': 'shell/app/app-Info.plist', 415 }, 416 'msvs_settings': { 417 'VCLinkerTool': { 418 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS 419 }, 420 'VCManifestTool': { 421 'AdditionalManifestFiles': [ 422 'shell/app/shell.exe.manifest', 423 ], 424 }, 425 }, 426 'conditions': [ 427 ['OS=="win" and win_use_allocator_shim==1', { 428 'dependencies': [ 429 '../base/allocator/allocator.gyp:allocator', 430 ], 431 }], 432 ['OS=="win"', { 433 'sources': [ 434 'shell/app/shell.rc', 435 ], 436 'configurations': { 437 'Debug_Base': { 438 'msvs_settings': { 439 'VCLinkerTool': { 440 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', 441 }, 442 }, 443 }, 444 }, 445 }], # OS=="win" 446 ['OS == "win" or toolkit_uses_gtk == 1', { 447 'dependencies': [ 448 '../sandbox/sandbox.gyp:sandbox', 449 ], 450 }], # OS=="win" or toolkit_uses_gtk == 1 451 ['toolkit_uses_gtk == 1', { 452 'dependencies': [ 453 '<(DEPTH)/build/linux/system.gyp:gtk', 454 ], 455 }], # toolkit_uses_gtk 456 ['OS=="mac"', { 457 'product_name': '<(content_shell_product_name)', 458 'dependencies!': [ 459 'content_shell_lib', 460 ], 461 'dependencies': [ 462 'content_shell_framework', 463 'content_shell_helper_app', 464 ], 465 'copies': [ 466 { 467 'destination': '<(PRODUCT_DIR)/<(content_shell_product_name).app/Contents/Frameworks', 468 'files': [ 469 '<(PRODUCT_DIR)/<(content_shell_product_name) Helper.app', 470 ], 471 }, 472 ], 473 'postbuilds': [ 474 { 475 'postbuild_name': 'Copy <(content_shell_product_name) Framework.framework', 476 'action': [ 477 '../build/mac/copy_framework_unversioned.sh', 478 '${BUILT_PRODUCTS_DIR}/<(content_shell_product_name) Framework.framework', 479 '${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}/Frameworks', 480 ], 481 }, 482 { 483 # Modify the Info.plist as needed. 484 'postbuild_name': 'Tweak Info.plist', 485 'action': ['../build/mac/tweak_info_plist.py', 486 '--scm=1', 487 '--version=<(content_shell_version)'], 488 }, 489 { 490 # This postbuid step is responsible for creating the following 491 # helpers: 492 # 493 # Content Shell Helper EH.app and Content Shell Helper NP.app are 494 # created from Content Shell Helper.app. 495 # 496 # The EH helper is marked for an executable heap. The NP helper 497 # is marked for no PIE (ASLR). 498 'postbuild_name': 'Make More Helpers', 499 'action': [ 500 '../build/mac/make_more_helpers.sh', 501 'Frameworks', 502 '<(content_shell_product_name)', 503 ], 504 }, 505 { 506 # Make sure there isn't any Objective-C in the shell's 507 # executable. 508 'postbuild_name': 'Verify No Objective-C', 509 'action': [ 510 '../build/mac/verify_no_objc.sh', 511 ], 512 }, 513 ], 514 }], # OS=="mac" 515 ['OS=="android"', { 516 'dependencies!': [ 517 '../tools/imagediff/image_diff.gyp:image_diff', 518 ], 519 }], # OS=="android" 520 ['OS=="android" and android_webview_build==0', { 521 'dependencies': [ 522 '../tools/imagediff/image_diff.gyp:image_diff#host', 523 ], 524 }], # OS=="android" and android_webview_build==0 525 ], 526 }, 527 { 528 'target_name': 'content_shell_builder', 529 'type': 'none', 530 'dependencies': [ 531 'content_shell', 532 ], 533 }, 534 ], 535 'conditions': [ 536 ['OS=="mac"', { 537 'targets': [ 538 { 539 'target_name': 'content_shell_framework', 540 'type': 'shared_library', 541 'product_name': '<(content_shell_product_name) Framework', 542 'mac_bundle': 1, 543 'mac_bundle_resources': [ 544 'shell/app/English.lproj/HttpAuth.xib', 545 'shell/app/English.lproj/MainMenu.xib', 546 '<(PRODUCT_DIR)/content_shell.pak', 547 'shell/app/framework-Info.plist', 548 ], 549 'mac_bundle_resources!': [ 550 'shell/app/framework-Info.plist', 551 ], 552 'xcode_settings': { 553 # The framework is placed within the .app's Framework 554 # directory. DYLIB_INSTALL_NAME_BASE and 555 # LD_DYLIB_INSTALL_NAME affect -install_name. 556 'DYLIB_INSTALL_NAME_BASE': 557 '@executable_path/../Frameworks', 558 # See /build/mac/copy_framework_unversioned.sh for 559 # information on LD_DYLIB_INSTALL_NAME. 560 'LD_DYLIB_INSTALL_NAME': 561 '$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(WRAPPER_NAME)/$(PRODUCT_NAME)', 562 563 'INFOPLIST_FILE': 'shell/app/framework-Info.plist', 564 }, 565 'dependencies': [ 566 'content_shell_lib', 567 ], 568 'include_dirs': [ 569 '..', 570 ], 571 'sources': [ 572 'shell/app/shell_content_main.cc', 573 'shell/app/shell_content_main.h', 574 ], 575 'postbuilds': [ 576 { 577 # Modify the Info.plist as needed. The script explains why 578 # this is needed. This is also done in the chrome target. 579 # The framework needs the Breakpad keys if this feature is 580 # enabled. It does not need the Keystone keys; these always 581 # come from the outer application bundle. The framework 582 # doesn't currently use the SCM keys for anything, 583 # but this seems like a really good place to store them. 584 'postbuild_name': 'Tweak Info.plist', 585 'action': ['../build/mac/tweak_info_plist.py', 586 '--breakpad=1', 587 '--keystone=0', 588 '--scm=1', 589 '--version=<(content_shell_version)', 590 '--branding=<(content_shell_product_name)'], 591 }, 592 ], 593 'copies': [ 594 { 595 # Copy FFmpeg binaries for audio/video support. 596 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 597 'files': [ 598 '<(PRODUCT_DIR)/ffmpegsumo.so', 599 ], 600 }, 601 { 602 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources', 603 'files': [ 604 '<(PRODUCT_DIR)/crash_inspector', 605 '<(PRODUCT_DIR)/crash_report_sender.app' 606 ], 607 }, 608 ], 609 'conditions': [ 610 ['enable_webrtc==1', { 611 'variables': { 612 'libpeer_target_type%': 'static_library', 613 }, 614 'conditions': [ 615 ['libpeer_target_type!="static_library"', { 616 'copies': [{ 617 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Libraries', 618 'files': [ 619 '<(PRODUCT_DIR)/libpeerconnection.so', 620 ], 621 }], 622 }], 623 ], 624 }], 625 ], 626 }, # target content_shell_framework 627 { 628 'target_name': 'content_shell_helper_app', 629 'type': 'executable', 630 'variables': { 'enable_wexit_time_destructors': 1, }, 631 'product_name': '<(content_shell_product_name) Helper', 632 'mac_bundle': 1, 633 'dependencies': [ 634 'content_shell_framework', 635 ], 636 'sources': [ 637 'shell/app/shell_main.cc', 638 'shell/app/helper-Info.plist', 639 ], 640 # TODO(mark): Come up with a fancier way to do this. It should only 641 # be necessary to list helper-Info.plist once, not the three times it 642 # is listed here. 643 'mac_bundle_resources!': [ 644 'shell/app/helper-Info.plist', 645 ], 646 # TODO(mark): For now, don't put any resources into this app. Its 647 # resources directory will be a symbolic link to the browser app's 648 # resources directory. 649 'mac_bundle_resources/': [ 650 ['exclude', '.*'], 651 ], 652 'xcode_settings': { 653 'INFOPLIST_FILE': 'shell/app/helper-Info.plist', 654 }, 655 'postbuilds': [ 656 { 657 # The framework defines its load-time path 658 # (DYLIB_INSTALL_NAME_BASE) relative to the main executable 659 # (chrome). A different relative path needs to be used in 660 # content_shell_helper_app. 661 'postbuild_name': 'Fix Framework Link', 662 'action': [ 663 'install_name_tool', 664 '-change', 665 '@executable_path/../Frameworks/<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', 666 '@executable_path/../../../<(content_shell_product_name) Framework.framework/<(content_shell_product_name) Framework', 667 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}' 668 ], 669 }, 670 { 671 # Modify the Info.plist as needed. The script explains why this 672 # is needed. This is also done in the chrome and chrome_dll 673 # targets. In this case, --breakpad=0, --keystone=0, and --scm=0 674 # are used because Breakpad, Keystone, and SCM keys are 675 # never placed into the helper. 676 'postbuild_name': 'Tweak Info.plist', 677 'action': ['../build/mac/tweak_info_plist.py', 678 '--breakpad=0', 679 '--keystone=0', 680 '--scm=0', 681 '--version=<(content_shell_version)'], 682 }, 683 { 684 # Make sure there isn't any Objective-C in the helper app's 685 # executable. 686 'postbuild_name': 'Verify No Objective-C', 687 'action': [ 688 '../build/mac/verify_no_objc.sh', 689 ], 690 }, 691 ], 692 'conditions': [ 693 ['component=="shared_library"', { 694 'xcode_settings': { 695 'LD_RUNPATH_SEARCH_PATHS': [ 696 # Get back from Content Shell.app/Contents/Frameworks/ 697 # Helper.app/Contents/MacOS 698 '@loader_path/../../../../../..', 699 ], 700 }, 701 }], 702 ], 703 }, # target content_shell_helper_app 704 ], 705 }], # OS=="mac" 706 ['OS=="android"', { 707 'targets': [ 708 { 709 # TODO(jrg): Update this action and other jni generators to only 710 # require specifying the java directory and generate the rest. 711 'target_name': 'content_shell_jni_headers', 712 'type': 'none', 713 'sources': [ 714 'shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/ContentBrowserTestsActivity.java', 715 'shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java', 716 'shell/android/java/src/org/chromium/content_shell/ShellManager.java', 717 'shell/android/java/src/org/chromium/content_shell/Shell.java', 718 ], 719 'direct_dependent_settings': { 720 'include_dirs': [ 721 '<(SHARED_INTERMEDIATE_DIR)/content/shell', 722 ], 723 }, 724 'variables': { 725 'jni_gen_package': 'content/shell', 726 }, 727 'includes': [ '../build/jni_generator.gypi' ], 728 }, 729 { 730 'target_name': 'libcontent_shell_content_view', 731 'type': 'shared_library', 732 'dependencies': [ 733 'content_shell_jni_headers', 734 'content_shell_lib', 735 'content_shell_pak', 736 # Skia is necessary to ensure the dependencies needed by 737 # WebContents are included. 738 '../skia/skia.gyp:skia', 739 '<(DEPTH)/media/media.gyp:player_android', 740 ], 741 'sources': [ 742 'shell/android/shell_library_loader.cc', 743 'shell/android/shell_library_loader.h', 744 ], 745 'conditions': [ 746 ['android_webview_build==1', { 747 'ldflags': [ 748 '-lgabi++', # For rtti 749 ], 750 }], 751 ], 752 }, 753 { 754 'target_name': 'content_shell_java', 755 'type': 'none', 756 'dependencies': [ 757 'content.gyp:content_java', 758 ], 759 'variables': { 760 'java_in_dir': '../content/shell/android/java', 761 'has_java_resources': 1, 762 'R_package': 'org.chromium.content_shell', 763 'R_package_relpath': 'org/chromium/content_shell', 764 }, 765 'includes': [ '../build/java.gypi' ], 766 }, 767 { 768 # content_shell_apk creates a .jar as a side effect. Any java targets 769 # that need that .jar in their classpath should depend on this target, 770 # content_shell_apk_java. Dependents of content_shell_apk receive its 771 # jar path in the variable 'apk_output_jar_path'. This target should 772 # only be used by targets which instrument content_shell_apk. 773 'target_name': 'content_shell_apk_java', 774 'type': 'none', 775 'dependencies': [ 776 'content_shell_apk', 777 ], 778 'includes': [ '../build/apk_fake_jar.gypi' ], 779 }, 780 { 781 'target_name': 'content_shell_apk', 782 'type': 'none', 783 'dependencies': [ 784 'content.gyp:content_java', 785 'content_java_test_support', 786 'content_shell_java', 787 'libcontent_shell_content_view', 788 '../base/base.gyp:base_java', 789 '../media/media.gyp:media_java', 790 '../net/net.gyp:net_java', 791 '../tools/android/forwarder/forwarder.gyp:forwarder', 792 '../ui/android/ui_android.gyp:ui_java', 793 ], 794 'variables': { 795 'apk_name': 'ContentShell', 796 'manifest_package_name': 'org.chromium.content_shell_apk', 797 'java_in_dir': 'shell/android/shell_apk', 798 'resource_dir': 'shell/android/shell_apk/res', 799 'native_lib_target': 'libcontent_shell_content_view', 800 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'], 801 'asset_location': '<(PRODUCT_DIR)/content_shell/assets', 802 }, 803 'conditions': [ 804 ['android_webview_build==0', { 805 'dependencies': [ 806 '../tools/imagediff/image_diff.gyp:image_diff#host', 807 ], 808 }], 809 ], 810 'includes': [ '../build/java_apk.gypi' ], 811 }, 812 ], 813 }], # OS=="android" 814 ['OS=="win"', { 815 'targets': [ 816 { 817 'target_name': 'content_shell_crash_service', 818 'type': 'executable', 819 'dependencies': [ 820 '../base/base.gyp:base', 821 '../components/components.gyp:breakpad_crash_service', 822 ], 823 'include_dirs': [ 824 '..', 825 ], 826 'sources': [ 827 'shell/tools/content_shell_crash_service.cc', 828 ], 829 'msvs_settings': { 830 'VCLinkerTool': { 831 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS 832 }, 833 }, 834 }, 835 ], 836 }], # OS=="win" 837 ['OS=="win" and fastbuild==0 and target_arch=="ia32"', { 838 'variables': { 839 'dest_dir': '<(PRODUCT_DIR)/syzygy', 840 }, 841 'targets': [ 842 { 843 'target_name': 'content_shell_syzyasan', 844 'type': 'none', 845 'sources' : [], 846 # Instrument content_shell with SyzyAsan. 847 'actions': [ 848 { 849 'action_name': 'Instrument content_shell with SyzyAsan', 850 'msvs_cygwin_shell': 0, 851 'inputs': [ 852 '<(PRODUCT_DIR)/content_shell.exe', 853 ], 854 'outputs': [ 855 '<(dest_dir)/content_shell.exe', 856 '<(dest_dir)/content_shell.exe.pdb', 857 ], 858 'action': [ 859 'python', 860 '<(DEPTH)/chrome/tools/build/win/syzygy_instrument.py', 861 '--mode', 'asan', 862 '--input_executable', '<(PRODUCT_DIR)/content_shell.exe', 863 '--input_symbol', '<(PRODUCT_DIR)/content_shell.exe.pdb', 864 '--destination_dir', '<(dest_dir)', 865 ], 866 }, 867 ], 868 }, 869 ], 870 }], # OS=="win" and fastbuild==0 and target_arch=="ia32" 871 ] 872 } 873