Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: content/shell/BUILD.gn

Issue 1915863003: [Mac/GN] Build content_shell and content_shell_framework. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-info-plist
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 content_shell_framework_name = "$content_shell_product_name Framework"
566 content_shell_helper_name = "$content_shell_product_name Helper"
567
568 mac_framework_bundle("content_shell_framework") {
510 testonly = true 569 testonly = true
511 570
512 # TODO(GYP) bug 546894: Fix GN and toolchains to handle spaces here. 571 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 572
516 sources = [ 573 sources = [
517 "app/shell_content_main.cc", 574 "app/shell_content_main.cc",
518 "app/shell_content_main.h", 575 "app/shell_content_main.h",
519 ] 576 ]
520 577
578 # TODO(rsesek): Handle these missing pieces:
579 # - crash_inspector
580 # - crash_report_sender.app
581
521 deps = [ 582 deps = [
583 ":content_shell_framework_resources",
584 ":content_shell_framework_xibs",
522 ":content_shell_lib", 585 ":content_shell_lib",
586 "//third_party/icu:icudata",
523 ] 587 ]
588
589 if (enable_plugins) {
590 deps += [ ":content_shell_framework_plugins" ]
591 }
592
593 ldflags = [
594 "-install_name",
595 "@executable_path/../Frameworks/$output_name.framework/$output_name",
596 ]
597
598 info_plist = "app/framework-Info.plist"
524 } 599 }
525 600
526 mac_app_bundle("content_shell_helper_app") { 601 mac_app_bundle("content_shell_helper_app") {
527 testonly = true 602 testonly = true
528 output_name = "$content_shell_product_name Helper" 603 output_name = content_shell_helper_name
529 sources = [ 604 sources = [
530 "app/shell_main.cc", 605 "app/shell_main.cc",
531 ] 606 ]
532 deps = [ 607 deps = [
533 ":framework", 608 ":content_shell_framework+link",
534 ] 609 ]
535 info_plist = "app/helper-Info.plist" 610 info_plist = "app/helper-Info.plist"
536 } 611 }
612
613 action("fix_helper_link_framework") {
614 testonly = true
615 script = "//build/config/mac/xcrun.py"
616 inputs = [
617 "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/$content_shel l_helper_name",
618 ]
619 outputs = [
620 "$root_out_dir/$content_shell_helper_name.app/Contents/MacOS/.",
Dirk Pranke 2016/04/25 21:50:28 Does this work with 'MacOS/$content_shell_helper_n
Dirk Pranke 2016/04/25 21:50:28 Yeah, the 'MacOS/.' is just weird; I'd use 'MacOS/
Robert Sesek 2016/04/25 22:08:00 That's what I wanted to do, but ninja/GN then comp
Robert Sesek 2016/04/25 22:08:00 Done.
Nico 2016/04/26 17:35:48 The output is the directory containing the input?
621 ]
622 args = [
623 "install_name_tool",
624 "-change",
625 "@executable_path/../Frameworks/$content_shell_framework_name.frame work/$content_shell_framework_name",
626 "@executable_path/../../../$content_shell_framework_name.framework/ $content_shell_framework_name",
627 ] + rebase_path(inputs, root_build_dir)
628 public_deps = [
629 ":content_shell_helper_app",
630 ]
631 }
632
633 bundle_data("content_shell_framework_bundle_data") {
634 testonly = true
635 sources = [
636 "$root_out_dir/$content_shell_framework_name.framework",
637 "$root_out_dir/$content_shell_helper_name.app",
638 ]
639 outputs = [
640 "{{bundle_root_dir}}/Frameworks/{{source_file_part}}",
641 ]
642 public_deps = [
643 ":content_shell_framework+link",
644 ":fix_helper_link_framework",
645 ]
646 }
647
648 bundle_data("content_shell_resources_bundle_data") {
649 testonly = true
650 sources = [
651 "app/app.icns",
652 ]
653 outputs = [
654 "{{bundle_resources_dir}}/{{source_file_part}}",
655 ]
656 }
537 } 657 }
538 658
539 mojom("mojo_bindings") { 659 mojom("mojo_bindings") {
540 sources = [ 660 sources = [
541 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom", 661 "common/layout_test/layout_test_bluetooth_fake_adapter_setter.mojom",
542 ] 662 ]
543 } 663 }
OLDNEW
« no previous file with comments | « components/test_runner/BUILD.gn ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698