Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 import("//build/config/win/console_app.gni") | 8 import("//build/config/win/console_app.gni") |
| 9 import("//build/config/win/manifest.gni") | 9 import("//build/config/win/manifest.gni") |
| 10 import("//media/media_options.gni") | 10 import("//media/media_options.gni") |
| 11 import("//mojo/public/tools/bindings/mojom.gni") | 11 import("//mojo/public/tools/bindings/mojom.gni") |
| 12 import("//tools/grit/repack.gni") | 12 import("//tools/grit/repack.gni") |
| 13 import("//tools/grit/grit_rule.gni") | 13 import("//tools/grit/grit_rule.gni") |
| 14 if (is_android) { | 14 if (is_android) { |
| 15 import("//build/config/android/config.gni") | 15 import("//build/config/android/config.gni") |
| 16 } else if (is_mac) { | 16 } else if (is_mac) { |
| 17 import("//build/config/mac/rules.gni") | 17 import("//build/config/mac/rules.gni") |
| 18 import("//build_overrides/v8.gni") | |
| 18 } | 19 } |
| 19 | 20 |
| 20 declare_args() { | 21 declare_args() { |
| 21 content_shell_product_name = "Content Shell" | 22 content_shell_product_name = "Content Shell" |
| 22 content_shell_version = "99.77.34.5" | 23 content_shell_version = "99.77.34.5" |
| 23 } | 24 } |
| 24 | 25 |
| 25 config("content_shell_lib_warnings") { | 26 config("content_shell_lib_warnings") { |
| 26 if (is_clang) { | 27 if (is_clang) { |
| 27 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out | 28 # TODO(thakis): Remove this once http://crbug.com/383820 is figured out |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 422 } | 423 } |
| 423 | 424 |
| 424 if (is_android) { | 425 if (is_android) { |
| 425 group("content_shell") { | 426 group("content_shell") { |
| 426 testonly = true | 427 testonly = true |
| 427 deps = [ | 428 deps = [ |
| 428 "//content/shell/android:content_shell_apk", | 429 "//content/shell/android:content_shell_apk", |
| 429 ] | 430 ] |
| 430 } | 431 } |
| 431 } else if (is_mac) { | 432 } else if (is_mac) { |
| 432 group("content_shell") { | 433 mac_app_bundle("content_shell") { |
| 433 testonly = true | 434 testonly = true |
| 435 output_name = content_shell_product_name | |
| 436 sources = [ | |
| 437 "app/shell_main.cc", | |
| 438 ] | |
| 434 deps = [ | 439 deps = [ |
| 435 ":content_shell_lib", | 440 ":content_shell_framework_bundle_data", |
| 441 ":content_shell_resources_bundle_data", | |
| 442 | |
| 443 # TODO(rsesek): Remove this after GYP is gone, since it only needs to | |
| 444 # be here per the comment in blink_test_platform_support_mac.mm about | |
| 445 # the bundle structure. | |
| 446 "//components/test_runner:resources", | |
| 436 ] | 447 ] |
| 448 info_plist = "app/app-Info.plist" | |
| 437 } | 449 } |
| 438 } else { | 450 } else { |
| 439 # TODO(brettw) when GYP is no longer necessary, delete | 451 # TODO(brettw) when GYP is no longer necessary, delete |
| 440 # content/shell/app/shell.exe.manifest. This file is not used in GN. | 452 # content/shell/app/shell.exe.manifest. This file is not used in GN. |
| 441 executable("content_shell") { | 453 executable("content_shell") { |
| 442 testonly = true | 454 testonly = true |
| 443 | 455 |
| 444 # TODO(GYP) mac resource bundle stuff for this target. | 456 # TODO(GYP) mac resource bundle stuff for this target. |
| 445 # TODO(GYP) Windows content shell settings: | 457 # TODO(GYP) Windows content shell settings: |
| 446 # - RC file. | 458 # - RC file. |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 462 deps += [ "//sandbox" ] | 474 deps += [ "//sandbox" ] |
| 463 if (win_console_app) { | 475 if (win_console_app) { |
| 464 defines += [ "WIN_CONSOLE_APP" ] | 476 defines += [ "WIN_CONSOLE_APP" ] |
| 465 } else { | 477 } else { |
| 466 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested. | 478 # Set /SUBSYSTEM:WINDOWS unless a console build has been requested. |
| 467 configs -= [ "//build/config/win:console" ] | 479 configs -= [ "//build/config/win:console" ] |
| 468 configs += [ "//build/config/win:windowed" ] | 480 configs += [ "//build/config/win:windowed" ] |
| 469 } | 481 } |
| 470 } | 482 } |
| 471 | 483 |
| 472 if (is_mac) { | |
| 473 # TODO(GYP) lots of stuff from GYP file here including helper_app and | |
| 474 # postbuilds. | |
| 475 output_name = content_shell_product_name | |
| 476 deps = [ | |
| 477 ":framework", | |
| 478 ] | |
| 479 } | |
| 480 | |
| 481 if (is_linux && !is_component_build) { | 484 if (is_linux && !is_component_build) { |
| 482 # Set rpath to find our own libfreetype even in a non-component build. | 485 # Set rpath to find our own libfreetype even in a non-component build. |
| 483 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] | 486 configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ] |
| 484 } | 487 } |
| 485 } | 488 } |
| 486 } | 489 } |
| 487 | 490 |
| 488 if (is_win) { | 491 if (is_win) { |
| 489 # GYP version: content/content_shell_and_tests.gyp:content_shell_crash_service | 492 # GYP version: content/content_shell_and_tests.gyp:content_shell_crash_service |
| 490 executable("content_shell_crash_service") { | 493 executable("content_shell_crash_service") { |
| 491 sources = [ | 494 sources = [ |
| 492 "tools/content_shell_crash_service.cc", | 495 "tools/content_shell_crash_service.cc", |
| 493 ] | 496 ] |
| 494 | 497 |
| 495 deps = [ | 498 deps = [ |
| 496 "//base", | 499 "//base", |
| 497 "//build/config/sanitizers:deps", | 500 "//build/config/sanitizers:deps", |
| 498 "//components/crash/content/tools:crash_service", | 501 "//components/crash/content/tools:crash_service", |
| 499 ] | 502 ] |
| 500 | 503 |
| 501 configs -= [ "//build/config/win:console" ] | 504 configs -= [ "//build/config/win:console" ] |
| 502 configs += [ "//build/config/win:windowed" ] | 505 configs += [ "//build/config/win:windowed" ] |
| 503 } | 506 } |
| 504 } | 507 } |
| 505 | 508 |
| 506 if (is_mac) { | 509 if (is_mac) { |
| 507 # TODO(GYP) this should be a bundle. Lots of other stuff in this target. | 510 mac_xib_bundle_data("content_shell_framework_xibs") { |
| 508 # GYP version: content/content_shell.gypi:content_shell_framework | 511 sources = [ |
| 509 shared_library("framework") { | 512 "app/English.lproj/HttpAuth.xib", |
| 513 "app/English.lproj/MainMenu.xib", | |
| 514 ] | |
| 515 output_path = "{{bundle_resources_dir}}/English.lproj" | |
| 516 } | |
| 517 | |
| 518 bundle_data("content_shell_framework_resources") { | |
| 519 sources = [ | |
| 520 "$root_out_dir/content_shell.pak", | |
| 521 "$root_out_dir/icudtl.dat", | |
| 522 "resources/missingImage.png", | |
| 523 "resources/textAreaResizeCorner.png", | |
| 524 ] | |
| 525 | |
| 526 public_deps = [ | |
| 527 ":pak", | |
| 528 ] | |
| 529 | |
| 530 deps = [ | |
| 531 "//third_party/icu:icudata", | |
| 532 ] | |
| 533 | |
| 534 if (v8_use_external_startup_data) { | |
| 535 sources += [ | |
| 536 "$root_out_dir/natives_blob.bin", | |
| 537 "$root_out_dir/snapshot_blob.bin", | |
| 538 ] | |
| 539 public_deps += [ "//v8" ] | |
| 540 } | |
| 541 | |
| 542 outputs = [ | |
| 543 "{{bundle_resources_dir}}/{{source_file_part}}", | |
| 544 ] | |
| 545 } | |
| 546 | |
| 547 if (enable_plugins) { | |
| 548 bundle_data("content_shell_framework_plugins") { | |
| 549 sources = [ | |
| 550 "$root_out_dir/blink_deprecated_test_plugin.plugin", | |
| 551 "$root_out_dir/blink_test_plugin.plugin", | |
| 552 ] | |
| 553 | |
| 554 outputs = [ | |
| 555 "{{bundle_root_dir}}/{{source_file_part}}", | |
| 556 ] | |
| 557 | |
| 558 public_deps = [ | |
| 559 "//ppapi:blink_deprecated_test_plugin", | |
| 560 "//ppapi:blink_test_plugin", | |
| 561 ] | |
| 562 } | |
| 563 } | |
| 564 | |
| 565 declare_args() { | |
| 566 content_shell_framework_name = "$content_shell_product_name Framework" | |
| 567 content_shell_helper_name = "$content_shell_product_name Helper" | |
| 568 } | |
|
Dirk Pranke
2016/04/25 21:29:19
You only need declare_args() for things that will
Robert Sesek
2016/04/25 21:44:08
Done.
| |
| 569 | |
| 570 mac_framework_bundle("content_shell_framework") { | |
| 510 testonly = true | 571 testonly = true |
| 511 | 572 |
| 512 # TODO(GYP) bug 546894: Fix GN and toolchains to handle spaces here. | 573 output_name = content_shell_framework_name |
| 513 #output_name = "$content_shell_product_name Framework" | |
| 514 output_name = "content_shell_framework" # Temporary one with no spaces. | |
| 515 | 574 |
| 516 sources = [ | 575 sources = [ |
| 517 "app/shell_content_main.cc", | 576 "app/shell_content_main.cc", |
| 518 "app/shell_content_main.h", | 577 "app/shell_content_main.h", |
| 519 ] | 578 ] |
| 520 | 579 |
| 580 # TODO(rsesek): Handle these missing pieces: | |
| 581 # - crash_inspector | |
| 582 # - crash_report_sender.app | |
| 583 | |
| 521 deps = [ | 584 deps = [ |
| 585 ":content_shell_framework_resources", | |
| 586 ":content_shell_framework_xibs", | |
| 522 ":content_shell_lib", | 587 ":content_shell_lib", |
| 588 "//third_party/icu:icudata", | |
| 523 ] | 589 ] |
| 590 | |
| 591 if (enable_plugins) { | |
| 592 deps += [ ":content_shell_framework_plugins" ] | |
| 593 } | |
| 594 | |
| 595 ldflags = [ | |
| 596 "-install_name", | |
| 597 "@executable_path/../Frameworks/$output_name.framework/$output_name", | |
| 598 ] | |
| 599 | |
| 600 info_plist = "app/framework-Info.plist" | |
| 524 } | 601 } |
| 525 | 602 |
| 526 mac_app_bundle("content_shell_helper_app") { | 603 mac_app_bundle("content_shell_helper_app") { |
| 527 testonly = true | 604 testonly = true |
| 528 output_name = "$content_shell_product_name Helper" | 605 output_name = content_shell_helper_name |
| 529 sources = [ | 606 sources = [ |
| 530 "app/shell_main.cc", | 607 "app/shell_main.cc", |
| 531 ] | 608 ] |
| 532 deps = [ | 609 deps = [ |
| 533 ":framework", | 610 ":content_shell_framework+link", |
|
Dirk Pranke
2016/04/25 21:29:19
This is a target generated by the mac_framework_bu
Robert Sesek
2016/04/25 21:44:08
Yup.
| |
| 534 ] | 611 ] |
| 535 info_plist = "app/helper-Info.plist" | 612 info_plist = "app/helper-Info.plist" |
| 536 } | 613 } |
| 614 | |
| 615 action("fix_helper_link_framework") { | |
| 616 testonly = true | |
| 617 script = "//build/config/mac/xcrun.py" | |
| 618 inputs = [ | |
| 619 "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/$content_shel l_helper_name", | |
| 620 ] | |
| 621 outputs = [ | |
| 622 "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/.", | |
|
Dirk Pranke
2016/04/25 21:29:19
Do you need the trailing "." here so GN doesn't ye
Robert Sesek
2016/04/25 21:44:08
Oh I forgot to call this out explicitly as weird.
| |
| 623 ] | |
| 624 args = [ | |
| 625 "install_name_tool", | |
| 626 "-change", | |
| 627 "@executable_path/../Frameworks/$content_shell_framework_name.frame work/$content_shell_framework_name", | |
| 628 "@executable_path/../../../$content_shell_framework_name.framework/ $content_shell_framework_name", | |
| 629 ] + rebase_path(inputs, root_build_dir) | |
| 630 public_deps = [ | |
| 631 ":content_shell_helper_app", | |
| 632 ] | |
| 633 } | |
| 634 | |
| 635 bundle_data("content_shell_framework_bundle_data") { | |
| 636 testonly = true | |
| 637 sources = [ | |
| 638 "$root_out_dir/$content_shell_framework_name.framework", | |
| 639 "$root_out_dir/$content_shell_helper_name.app", | |
| 640 ] | |
| 641 outputs = [ | |
| 642 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}", | |
| 643 ] | |
| 644 public_deps = [ | |
| 645 ":content_shell_framework+link", | |
| 646 ":fix_helper_link_framework", | |
| 647 ] | |
| 648 } | |
| 649 | |
| 650 bundle_data("content_shell_resources_bundle_data") { | |
| 651 testonly = true | |
| 652 sources = [ | |
| 653 "app/app.icns", | |
| 654 ] | |
| 655 outputs = [ | |
| 656 "{{bundle_resources_dir}}/{{source_file_part}}", | |
| 657 ] | |
| 658 } | |
| 537 } | 659 } |
| 538 | 660 |
| 539 mojom("mojo_bindings") { | 661 mojom("mojo_bindings") { |
| 540 sources = [ | 662 sources = [ |
| 541 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom", | 663 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom", |
| 542 ] | 664 ] |
| 543 } | 665 } |
| OLD | NEW |