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/allocator.gni") | |
| 5 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 import("//build/util/version.gni") | |
| 7 import("//remoting/remoting_host.gni") | 9 import("//remoting/remoting_host.gni") |
| 8 import("//remoting/remoting_locales.gni") | 10 import("//remoting/remoting_locales.gni") |
| 11 import("//remoting/remoting_options.gni") | |
| 9 import("//remoting/remoting_srcs.gni") | 12 import("//remoting/remoting_srcs.gni") |
| 10 import("//remoting/remoting_version.gni") | 13 import("//remoting/remoting_version.gni") |
| 11 import("//remoting/tools/build/remoting_localize.gni") | 14 import("//remoting/tools/build/remoting_localize.gni") |
| 12 | 15 |
| 13 # GYP version: remoting/remoting_host:remoting_host_credits | 16 # GYP version: remoting/remoting_host:remoting_host_credits |
| 14 action("credits") { | 17 action("credits") { |
| 15 about_credits_file = "$target_gen_dir/CREDITS.txt" | 18 # We put this in $root_build_dir/gen/remoting instead of |
| 19 # $root_build_dir/gen/remoting/host (target_gen_dir) for | |
| 20 # compatibility w/ GYP, since the installer needs the file to | |
| 21 # be at the same location. | |
| 22 about_credits_file = "$root_build_dir/gen/remoting/CREDITS.txt" | |
| 16 script = "//tools/licenses.py" | 23 script = "//tools/licenses.py" |
| 17 | 24 |
| 18 inputs = [ | 25 inputs = [ |
| 19 "installer/credits.tmpl", | 26 "installer/credits.tmpl", |
| 20 "installer/credits_entry.tmpl", | 27 "installer/credits_entry.tmpl", |
| 21 ] | 28 ] |
| 22 | 29 |
| 23 outputs = [ | 30 outputs = [ |
| 24 about_credits_file, | 31 about_credits_file, |
| 25 ] | 32 ] |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 411 | 418 |
| 412 deps = [ | 419 deps = [ |
| 413 "//build/config/sanitizers:deps", | 420 "//build/config/sanitizers:deps", |
| 414 "//remoting/host/setup", | 421 "//remoting/host/setup", |
| 415 ] | 422 ] |
| 416 | 423 |
| 417 if (enable_webrtc) { | 424 if (enable_webrtc) { |
| 418 deps += [ "//third_party/libjingle:libjingle_webrtc" ] | 425 deps += [ "//third_party/libjingle:libjingle_webrtc" ] |
| 419 } | 426 } |
| 420 } | 427 } |
| 428 | |
| 429 action_foreach("remoting_native_messaging_manifests") { | |
| 430 if (is_mac) { | |
| 431 assert(false, "not implemented on mac yet") | |
| 432 } else if (is_win) { | |
| 433 assert(false, "not implemented on win yet") | |
| 434 } else { | |
| 435 me2me_host_path = | |
| 436 "/opt/google/chrome-remote-desktop/native-messaging-host" | |
| 437 it2me_host_path = | |
| 438 "/opt/google/chrome-remote-desktop/remote-assistance-host" | |
| 439 } | |
| 440 | |
| 441 script = "../tools/build/remoting_localize.py" | |
| 442 | |
| 443 sources = [ | |
| 444 "it2me/com.google.chrome.remote_assistance.json.jinja2", | |
| 445 "setup/com.google.chrome.remote_desktop.json.jinja2", | |
| 446 ] | |
| 447 | |
| 448 inputs = [ | |
| 449 branding_path, | |
| 450 ] | |
| 451 | |
| 452 outputs = [ | |
| 453 "$root_build_dir/remoting/{{source_name_part}}", | |
| 454 ] | |
| 455 | |
| 456 args = [ | |
| 457 "--define", | |
| 458 "ME2ME_HOST_PATH=$me2me_host_path", | |
| 459 "--define", | |
| 460 "IT2ME_HOST_PATH=$it2me_host_path", | |
| 461 "--variables", | |
| 462 branding_path, | |
| 463 "--template", | |
| 464 "{{source}}", | |
| 465 "--locale_output", | |
| 466 "remoting/{{source_name_part}}", | |
| 467 "en", | |
| 468 ] | |
| 469 } | |
| 470 | |
| 471 # TODO(crbug.com/512899) This still needs to be ported to GN. | |
| 472 group("remoting_infoplist_strings") { | |
| 473 } | |
| 421 } | 474 } |
| 422 | 475 |
| 423 if (enable_me2me_host) { | 476 if (enable_me2me_host) { |
| 424 source_set("remoting_me2me_host_static") { | 477 source_set("remoting_me2me_host_static") { |
| 425 sources = [ | 478 sources = [ |
| 426 "curtain_mode.h", | 479 "curtain_mode.h", |
| 427 "curtain_mode_linux.cc", | 480 "curtain_mode_linux.cc", |
| 428 "curtain_mode_mac.cc", | 481 "curtain_mode_mac.cc", |
| 429 "curtain_mode_win.cc", | 482 "curtain_mode_win.cc", |
| 430 "pam_authorization_factory_posix.cc", | 483 "pam_authorization_factory_posix.cc", |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 "host_main.cc", | 522 "host_main.cc", |
| 470 "host_main.h", | 523 "host_main.h", |
| 471 ] | 524 ] |
| 472 | 525 |
| 473 deps = [ | 526 deps = [ |
| 474 ":remoting_me2me_host_static", | 527 ":remoting_me2me_host_static", |
| 475 ":credits", | 528 ":credits", |
| 476 "//build/config/sanitizers:deps", | 529 "//build/config/sanitizers:deps", |
| 477 ] | 530 ] |
| 478 } | 531 } |
| 532 | |
| 533 executable("native_messaging_host") { | |
| 534 sources = [ | |
| 535 "setup/me2me_native_messaging_host_entry_point.cc", | |
| 536 "setup/me2me_native_messaging_host_main.cc", | |
| 537 "setup/me2me_native_messaging_host_main.h", | |
| 538 ] | |
| 539 | |
| 540 deps = [ | |
| 541 ":remoting_infoplist_strings", | |
| 542 "//base", | |
| 543 "//remoting/base:breakpad", | |
| 544 "//remoting/host", | |
| 545 "//remoting/host/setup", | |
| 546 "//remoting/host/native_messaging", | |
| 547 ] | |
| 548 | |
| 549 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
| 550 | |
| 551 # The |major|, |build| and |patch| versions are inherited from Chrome. | |
| 552 # Since Chrome's |minor| version is always '0', we replace it with a | |
| 553 # Chromoting-specific patch version. | |
| 554 defines = [ "VERSION=" + "$chrome_version_major" + "." + | |
| 555 "$remoting_version_patch" + "." + "$chrome_version_build" + | |
| 556 "." + "$chrome_version_patch" ] | |
| 557 | |
| 558 if (is_linux && use_allocator != "none") { | |
| 559 deps += [ "//base/allocator" ] | |
| 560 } else if (is_mac || is_win) { | |
| 561 assert(false, "not implemented on mac or win yet") | |
| 562 } | |
| 563 } | |
| 564 } | |
| 565 | |
| 566 if (is_chrome_branded && enable_me2me_host && !is_chromeos) { | |
| 567 # TODO(GYP): add support for archive_chromoting_tests variable? | |
| 568 | |
| 569 import("//build/config/zip.gni") | |
| 570 | |
| 571 build_deb_script = "installer/linux/build_deb.py" | |
| 572 deb_filename = | |
| 573 "$root_build_dir/" + exec_script(build_deb_script, | |
| 574 [ | |
| 575 "-p", | |
| 576 "-s", | |
| 577 rebase_path("//"), | |
| 578 ], | |
| 579 "string", | |
| 580 [ "installer/linux/build-deb.sh" ]) | |
| 581 changes_filename = | |
| 582 "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes" | |
| 583 | |
| 584 packaging_outputs = [ | |
| 585 deb_filename, | |
| 586 changes_filename, | |
| 587 | |
| 588 # TODO(GYP): These files will only be present if we're stripping | |
| 589 # binaries. We need to support linux_dump_symbols for this. | |
| 590 #"$root_build_dir/remoting_me2me_host.debug", | |
| 591 #"$root_build_dir/remoting_start_host.debug", | |
| 592 #"$root_build_dir/native_messaging_host.debug", | |
| 593 #"$root_build_dir/remote_assistance_host.debug", | |
| 594 ] | |
| 595 | |
| 596 zip("remoting_me2me_host_archive") { | |
| 597 # Store the installer package(s) into a zip file so there is a | |
| 598 # consistent filename to reference for build archiving (i.e. in | |
| 599 # FILES.cfg). This also avoids possible conflicts with "wildcard" | |
| 600 # package handling in other build/signing scripts. | |
| 601 inputs = packaging_outputs | |
| 602 output = "$root_build_dir/remoting-me2me-host-linux.zip" | |
| 603 deps = [ | |
| 604 ":remoting_me2me_host_copy", | |
| 605 ] | |
| 606 } | |
| 607 | |
| 608 copy("remoting_me2me_host_copy") { | |
| 609 # Copy the debian package file, which has version info in it, | |
| 610 # to a consistewnt filename for use on Chromoting swarming bots. | |
| 611 sources = [ | |
| 612 deb_filename, | |
| 613 ] | |
| 614 outputs = [ | |
| 615 "$root_build_dir/remoting-me2me-host.deb", | |
| 616 ] | |
| 617 public_deps = [ | |
| 618 ":remoting_me2me_host_deb_installer", | |
| 619 ] | |
| 620 } | |
| 621 | |
| 622 action("remoting_me2me_host_deb_installer") { | |
|
Dirk Pranke
2015/11/03 03:11:09
there's something wonky going on in this target th
| |
| 623 script = build_deb_script | |
| 624 inputs = [ | |
| 625 build_deb_script, | |
| 626 "installer/linux/Makefile", | |
| 627 "installer/linux/debian/chrome-remote-desktop.init", | |
| 628 "installer/linux/debian/chrome-remote-desktop.pam", | |
| 629 "installer/linux/debian/compat", | |
| 630 "installer/linux/debian/control", | |
| 631 "installer/linux/debian/copyright", | |
| 632 "installer/linux/debian/postinst", | |
| 633 "installer/linux/debian/preinst", | |
| 634 "installer/linux/debian/rules", | |
| 635 ] | |
| 636 outputs = packaging_outputs | |
| 637 sources = [ | |
| 638 "installer/linux/build-deb.sh", | |
|
Sergey Ulanov
2015/11/03 18:21:37
This script assumes that the output is always in o
Dirk Pranke
2015/11/03 21:10:20
The bots use out/Release and that probably won't c
| |
| 639 ] | |
| 640 args = [ | |
| 641 "-s", | |
| 642 rebase_path("//"), | |
| 643 "-o", | |
| 644 rebase_path("$root_build_dir"), | |
| 645 ] | |
| 646 | |
| 647 deps = [ | |
| 648 ":native_messaging_host", | |
| 649 ":remoting_me2me_host", | |
| 650 ":remoting_native_messaging_manifests", | |
| 651 ":remoting_start_host", | |
| 652 "//remoting/host/it2me:remote_assistance_host", | |
| 653 "//remoting/resources", | |
| 654 "//third_party/icu:icudata", | |
| 655 ] | |
| 656 } | |
| 657 } else { | |
| 658 group("remoting_me2me_host_archive") { | |
| 659 } | |
| 479 } | 660 } |
| 480 } | 661 } |
| 481 } | 662 } |
| OLD | NEW |