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/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//build/util/version.gni") | 7 import("//build/util/version.gni") |
8 import("//remoting/remoting_host.gni") | 8 import("//remoting/remoting_enable.gni") |
9 import("//remoting/remoting_locales.gni") | 9 import("//remoting/remoting_locales.gni") |
10 import("//remoting/remoting_options.gni") | 10 import("//remoting/remoting_options.gni") |
11 import("//remoting/remoting_srcs.gni") | 11 import("//remoting/remoting_srcs.gni") |
12 import("//remoting/remoting_version.gni") | 12 import("//remoting/remoting_version.gni") |
13 import("//remoting/tools/build/remoting_localize.gni") | 13 import("//remoting/tools/build/remoting_localize.gni") |
14 | 14 |
15 # GYP version: remoting/remoting_host:remoting_host_credits | 15 # GYP version: remoting/remoting_host:remoting_host_credits |
16 action("credits") { | 16 action("credits") { |
17 # We put this in $root_build_dir/gen/remoting instead of | 17 # We put this in $root_build_dir/gen/remoting instead of |
18 # $root_build_dir/gen/remoting/host (target_gen_dir) for | 18 # $root_build_dir/gen/remoting/host (target_gen_dir) for |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
371 ] | 371 ] |
372 } | 372 } |
373 | 373 |
374 midl("remoting_lib_idl") { | 374 midl("remoting_lib_idl") { |
375 sources = get_target_outputs(":generate_idl") | 375 sources = get_target_outputs(":generate_idl") |
376 deps = [ | 376 deps = [ |
377 ":generate_idl", | 377 ":generate_idl", |
378 ] | 378 ] |
379 } | 379 } |
380 | 380 |
381 # GYP version: remoting/remoting_host_win.gypi:remoting_lib_ps | |
382 static_library("remoting_lib_ps") { | |
383 defines = [ | |
384 "ENTRY_PREFIX=Ps", | |
385 "REGISTER_PROXY_DLL", | |
386 ] | |
387 | |
388 deps = [ | |
389 ":remoting_lib_idl", | |
390 ] | |
391 | |
392 sources = [ | |
393 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c", | |
394 "$root_gen_dir/remoting/host/chromoting_lib_p.c", | |
395 ] | |
396 | |
397 if (is_clang) { | |
398 cflags = [ | |
399 # MIDL generated code has a habit of omitting optional braces. | |
400 "-Wno-missing-braces", | |
401 | |
402 # Source files generated by the MIDL compiler trigger warnings with | |
403 # -Wincompatible-pointer-types enabled. | |
404 "-Wno-incompatible-pointer-types", | |
405 | |
406 # Generated code contains unused variables. | |
407 "-Wno-unused-variable", | |
408 | |
409 # PROXYFILE_LIST_START is an extern with initializer. | |
410 "-Wno-extern-initializer", | |
411 ] | |
Nico
2016/03/21 22:55:25
This doesn't work. You need to put this into its o
| |
412 } | |
413 } | |
414 | |
381 # Makes the .mc file from the .mc.jinja file. | 415 # Makes the .mc file from the .mc.jinja file. |
382 remoting_localize("messages_localizing") { | 416 remoting_localize("messages_localizing") { |
383 sources = [ | 417 sources = [ |
384 "win/host_messages.mc.jinja2", | 418 "win/host_messages.mc.jinja2", |
385 ] | 419 ] |
386 locales = remoting_locales | 420 locales = remoting_locales |
387 locale_dir = webapp_locale_dir | 421 locale_dir = webapp_locale_dir |
388 encoding = "utf-16" | 422 encoding = "utf-16" |
389 | 423 |
390 # This target is funny. It only produces one file and the output doesn't | 424 # This target is funny. It only produces one file and the output doesn't |
391 # match the input. We want to generate remoting_host_messages.mc from | 425 # match the input. We want to generate remoting_host_messages.mc from |
392 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the | 426 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the |
393 # output, so the following pattern produces the name we want with a templa te | 427 # output, so the following pattern produces the name we want with a templa te |
394 # based on the input. | 428 # based on the input. |
395 # | 429 # |
396 # TODO: This is for GYP compat. We should just make the names match instea d. | 430 # TODO: This is for GYP compat. We should just make the names match instea d. |
397 output = "$target_gen_dir/remoting_{{source_name_part}}" | 431 output = "$target_gen_dir/remoting_{{source_name_part}}" |
398 } | 432 } |
399 | 433 |
400 # Makes the .h/.rc files from the .mc file. | 434 # Makes the .h/.rc files from the .mc file. |
401 message_compiler("messages") { | 435 message_compiler("messages") { |
402 sources = get_target_outputs(":messages_localizing") | 436 sources = get_target_outputs(":messages_localizing") |
403 deps = [ | 437 deps = [ |
404 ":messages_localizing", | 438 ":messages_localizing", |
405 ] | 439 ] |
406 } | 440 } |
407 | 441 |
442 # GYP version: remoting/remoting_host_win.gypi:remoting_console | |
443 executable("remoting_console") { | |
444 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
445 | |
446 defines = [ "BINARY=BINARY_HOST_ME2ME" ] | |
447 | |
448 deps = [ | |
449 ":remoting_core", | |
450 ":remoting_windows_resources", | |
451 ] | |
452 | |
453 sources = [ | |
454 "$root_gen_dir/remoting/version.rc", | |
455 "win/entry_point.cc", | |
456 ] | |
457 | |
458 ldflags = [ | |
459 "/MANIFEST:EMBED", | |
460 "/MANIFESTINPUT:" + | |
461 rebase_path("win/dpi_aware.manifest", root_build_dir), | |
462 "/ENTRY:HostEntryPoint", | |
463 | |
464 # "/NODEFAULTLIB", | |
465 ] | |
466 } | |
467 | |
468 # GYP version: //remoting/remoting_host_win.gypi:remoting_core | |
469 shared_library("remoting_core") { | |
470 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
471 | |
472 defines = [ | |
473 "_ATL_APARTMENT_THREADED", | |
474 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS", | |
475 "_ATL_NO_AUTOMATIC_NAMESPACE", | |
476 "_ATL_NO_EXCEPTIONS", | |
477 "BINARY=BINARY_CORE", | |
478 "BINARY_CORE=1", | |
479 "BINARY_DESKTOP=2", | |
480 "BINARY_HOST_ME2ME=3", | |
481 "BINARY_NATIVE_MESSAGING_HOST=4", | |
482 "BINARY_REMOTE_ASSISTANCE_HOST=5", | |
483 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"", | |
484 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"", | |
485 "HOST_IMPLEMENTATION", | |
486 "ISOLATION_AWARE_ENABLED=1", | |
487 "STRICT", | |
488 "VERSION=$chrome_version_full", | |
489 ] | |
490 | |
491 if (remoting_multi_process != 0 && remoting_rdp_session != 0) { | |
492 defines += [ "REMOTING_RDP_SESSION" ] | |
493 } | |
494 | |
495 if (remoting_multi_process != 0) { | |
496 defines += [ "REMOTING_MULTI_PROCESS" ] | |
497 } | |
498 | |
499 deps = [ | |
500 ":remoting_lib_idl", | |
501 ":remoting_lib_ps", | |
502 ":remoting_me2me_host_static", | |
503 ":remoting_windows_resources", | |
504 "//base", | |
505 "//base:base_static", | |
506 "//base/allocator", | |
507 "//base/third_party/dynamic_annotations", | |
508 "//ipc", | |
509 "//net", | |
510 "//remoting/base", | |
511 "//remoting/base:breakpad", | |
512 "//remoting/codec", | |
513 "//remoting/host", | |
514 "//remoting/host:messages", | |
515 "//remoting/host/it2me:common", | |
516 "//remoting/host/native_messaging", | |
517 "//remoting/host/setup", | |
518 "//remoting/protocol", | |
519 "//sandbox/win:sandbox", # Should always use Windows version | |
520 "//third_party/webrtc/modules/desktop_capture", | |
521 ] | |
522 | |
523 sources = [ | |
524 "desktop_process_main.cc", | |
525 "host_main.cc", | |
526 "host_main.h", | |
527 "it2me/it2me_native_messaging_host_main.cc", | |
528 "it2me/it2me_native_messaging_host_main.h", | |
529 "security_key/remote_security_key_main.cc", | |
530 "security_key/remote_security_key_main.h", | |
531 "setup/me2me_native_messaging_host_main.cc", | |
532 "setup/me2me_native_messaging_host_main.h", | |
533 "win/chromoting_lib.rc", | |
534 "win/chromoting_module.cc", | |
535 "win/chromoting_module.h", | |
536 "win/core.cc", | |
537 "win/core_resource.h", | |
538 "win/host_service.cc", | |
539 "win/host_service.h", | |
540 "win/omaha.cc", | |
541 "win/omaha.h", | |
542 "win/rdp_desktop_session.cc", | |
543 "win/rdp_desktop_session.h", | |
544 "win/unprivileged_process_delegate.cc", | |
545 "win/unprivileged_process_delegate.h", | |
546 "win/wts_session_process_delegate.cc", | |
547 "win/wts_session_process_delegate.h", | |
548 "worker_process_ipc_delegate.h", | |
549 ] | |
550 | |
551 ldflags = [ | |
552 "/MANIFEST:EMBED", | |
553 "/MANIFESTINPUT:" + | |
554 rebase_path("win/common-controls.manifest", root_build_dir), | |
555 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE", | |
556 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE", | |
557 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE", | |
558 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE", | |
559 ] | |
560 | |
561 libs = [ | |
562 "comctl32.lib", | |
563 "rpcns4.lib", | |
564 "rpcrt4.lib", | |
565 "uuid.lib", | |
566 "wtsapi32.lib", | |
567 ] | |
568 | |
569 if (is_clang) { | |
570 cflags = [ "-Wno-header-hygiene" ] | |
571 } | |
572 } | |
573 | |
574 # GYP version: //remoting/remoting_host_win.gypi:remoting_desktop | |
575 executable("remoting_desktop") { | |
576 configs += [ | |
577 "//build/config/compiler:wexit_time_destructors", | |
578 "//build/config/win:windowed", | |
579 ] | |
580 | |
581 defines = [ "BINARY=BINARY_DESKTOP" ] | |
582 | |
583 deps = [ | |
584 ":remoting_core", | |
585 ":remoting_windows_resources", | |
586 ] | |
587 | |
588 sources = [ | |
589 "$root_gen_dir/remoting/version.rc", | |
590 "win/entry_point.cc", | |
591 ] | |
592 | |
593 ldflags = [ | |
594 "/MANIFEST:EMBED", | |
595 "/MANIFESTINPUT:" + | |
596 rebase_path("win/dpi_aware.manifest", root_build_dir), | |
597 "/MANIFESTUAC", | |
598 "/ENTRY:HostEntryPoint", | |
599 | |
600 # "/NODEFAULTLIB", | |
601 ] | |
602 | |
603 if (is_official_build) { | |
604 ldflags += [ | |
605 "/MANIFESTUAC:level=2", | |
606 "/MANIFESTUAC:uiAccess=true", | |
607 ] | |
608 } | |
609 } | |
610 | |
611 # GYP version: //remoting/remoting_host_win.gypi:remote_security_key | |
612 executable("remote_security_key") { | |
613 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
614 | |
615 defines = [ "BINARY=BINARY_REMOTE_SECURITY_KEY" ] | |
616 | |
617 deps = [ | |
618 ":remoting_core", | |
619 ":remoting_windows_resources", | |
620 ] | |
621 | |
622 sources = [ | |
623 "$root_gen_dir/remoting/version.rc", | |
624 "security_key/remote_security_key_entry_point.cc", | |
625 ] | |
626 } | |
627 | |
628 # GYP version: | |
629 # //remoting/remoting_host_win.gypi:remoting_me2me_native_messaging_host | |
630 executable("remoting_me2me_native_messaging_host") { | |
631 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
632 | |
633 deps = [ | |
634 ":remoting_core", | |
635 ":remoting_windows_resources", | |
636 ] | |
637 | |
638 sources = [ | |
639 "$root_gen_dir/remoting/version.rc", | |
640 "setup/me2me_native_messaging_host_entry_point.cc", | |
641 ] | |
642 } | |
643 | |
644 # GYP version: //remoting/remoting_host_win.gypi:remoting_windows_resources | |
645 remoting_localize("remoting_windows_resources") { | |
646 deps = [ | |
647 "//remoting/resources", | |
648 ] | |
649 | |
650 sources = [ | |
651 "win/core.rc.jinja2", | |
652 "win/version.rc.jinja2", | |
653 ] | |
654 | |
655 # TODO(zijiehe): Export lastchange_path from | |
656 # //chrome/version.gni:process_version | |
657 variables = [ | |
658 rebase_path(chrome_version_file), | |
659 rebase_path(remoting_version_file), | |
660 rebase_path("//build/util/LASTCHANGE"), | |
661 ] | |
662 | |
663 output = "$root_gen_dir/remoting/{{source_name_part}}" | |
664 | |
665 locale_dir = webapp_locale_dir | |
666 | |
667 encoding = "utf-16" | |
668 | |
669 locales = remoting_locales | |
670 } | |
671 | |
408 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi | 672 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi |
409 } | 673 } |
410 | 674 |
411 if (enable_remoting_host) { | 675 if (enable_remoting_host) { |
412 executable("remoting_start_host") { | 676 executable("remoting_start_host") { |
413 sources = [ | 677 sources = [ |
414 "setup/host_starter.cc", | 678 "setup/host_starter.cc", |
415 "setup/host_starter.h", | 679 "setup/host_starter.h", |
416 "setup/start_host.cc", | 680 "setup/start_host.cc", |
417 ] | 681 ] |
418 | 682 |
419 deps = [ | 683 deps = [ |
420 "//build/config/sanitizers:deps", | 684 "//build/config/sanitizers:deps", |
421 "//remoting/host/setup", | 685 "//remoting/host/setup", |
422 ] | 686 ] |
423 | 687 |
424 if (enable_webrtc) { | 688 if (enable_webrtc) { |
425 deps += [ "//third_party/libjingle:libjingle_webrtc" ] | 689 deps += [ "//third_party/libjingle:libjingle_webrtc" ] |
426 } | 690 } |
427 } | 691 } |
428 | 692 |
429 action_foreach("remoting_native_messaging_manifests") { | 693 action_foreach("remoting_native_messaging_manifests") { |
430 if (is_mac) { | 694 if (is_mac) { |
431 assert(false, "not implemented on mac yet") | 695 assert(false, "not implemented on mac yet") |
432 } else if (is_win) { | |
433 assert(false, "not implemented on win yet") | |
434 } else { | 696 } else { |
435 me2me_host_path = | 697 me2me_host_path = |
436 "/opt/google/chrome-remote-desktop/native-messaging-host" | 698 "/opt/google/chrome-remote-desktop/native-messaging-host" |
437 it2me_host_path = | 699 it2me_host_path = |
438 "/opt/google/chrome-remote-desktop/remote-assistance-host" | 700 "/opt/google/chrome-remote-desktop/remote-assistance-host" |
439 } | 701 } |
440 | 702 |
441 script = "../tools/build/remoting_localize.py" | 703 script = "../tools/build/remoting_localize.py" |
442 | 704 |
443 sources = [ | 705 sources = [ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 deps += [ "//build/config/linux/gtk2" ] | 769 deps += [ "//build/config/linux/gtk2" ] |
508 } | 770 } |
509 if ((is_linux && !is_chromeos) || is_mac) { | 771 if ((is_linux && !is_chromeos) || is_mac) { |
510 libs = [ "pam" ] | 772 libs = [ "pam" ] |
511 } | 773 } |
512 | 774 |
513 if (is_mac && is_official_build) { | 775 if (is_mac && is_official_build) { |
514 sources += [ "internal/internal_mac-inl.h" ] | 776 sources += [ "internal/internal_mac-inl.h" ] |
515 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ] | 777 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ] |
516 } | 778 } |
779 | |
780 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) { | |
781 defines += [ "REMOTING_RDP_SESSION" ] | |
782 } | |
783 | |
784 if (remoting_multi_process != 0) { | |
785 defines += [ "REMOTING_MULTI_PROCESS" ] | |
786 } | |
517 } | 787 } |
518 | 788 |
519 if (!is_win) { | 789 if (is_win) { |
790 # GYP version: //remoting/remoting_host_win.gypi:remoting_me2me_host | |
791 executable("remoting_me2me_host") { | |
792 configs += [ | |
793 "//build/config/compiler:wexit_time_destructors", | |
794 "//build/config/win:windowed", | |
795 ] | |
796 | |
797 defines = [ "BINARY=BINARY_HOST_ME2ME" ] | |
798 | |
799 deps = [ | |
800 ":remoting_core", | |
801 ":remoting_windows_resources", | |
802 ] | |
803 | |
804 sources = [ | |
805 "$root_gen_dir/remoting/version.rc", | |
806 "win/entry_point.cc", | |
807 ] | |
808 | |
809 output_name = "remoting_host" | |
810 | |
811 ldflags = [ | |
812 "/MANIFEST:EMBED", | |
813 "/MANIFESTINPUT:" + | |
814 rebase_path("win/dpi_aware.manifest", root_build_dir), | |
815 "/ENTRY:HostEntryPoint", | |
816 | |
817 # "/NODEFAULTLIB", | |
818 ] | |
819 } | |
820 } else { | |
520 executable("remoting_me2me_host") { | 821 executable("remoting_me2me_host") { |
521 sources = [ | 822 sources = [ |
522 "host_main.cc", | 823 "host_main.cc", |
523 "host_main.h", | 824 "host_main.h", |
524 ] | 825 ] |
525 | 826 |
827 if (is_mac && is_chrome_branded && is_official_build) { | |
828 defines = [ "REMOTING_ENABLE_BREAKPAD" ] | |
829 } | |
830 | |
526 deps = [ | 831 deps = [ |
527 ":credits", | 832 ":credits", |
528 ":remoting_me2me_host_static", | 833 ":remoting_me2me_host_static", |
529 "//build/config/sanitizers:deps", | 834 "//build/config/sanitizers:deps", |
530 ] | 835 ] |
531 } | 836 } |
532 | 837 |
533 executable("native_messaging_host") { | 838 executable("native_messaging_host") { |
534 sources = [ | 839 sources = [ |
535 "setup/me2me_native_messaging_host_entry_point.cc", | 840 "setup/me2me_native_messaging_host_entry_point.cc", |
(...skipping 12 matching lines...) Expand all Loading... | |
548 | 853 |
549 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 854 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
550 | 855 |
551 # The |major|, |build| and |patch| versions are inherited from Chrome. | 856 # The |major|, |build| and |patch| versions are inherited from Chrome. |
552 # Since Chrome's |minor| version is always '0', we replace it with a | 857 # Since Chrome's |minor| version is always '0', we replace it with a |
553 # Chromoting-specific patch version. | 858 # Chromoting-specific patch version. |
554 defines = [ "VERSION=" + "$chrome_version_major" + "." + | 859 defines = [ "VERSION=" + "$chrome_version_major" + "." + |
555 "$remoting_version_patch" + "." + "$chrome_version_build" + | 860 "$remoting_version_patch" + "." + "$chrome_version_build" + |
556 "." + "$chrome_version_patch" ] | 861 "." + "$chrome_version_patch" ] |
557 | 862 |
558 if (is_mac || is_win) { | 863 if (is_mac) { |
559 assert(false, "not implemented on mac or win yet") | 864 assert(false, "not implemented on mac yet") |
560 } | 865 } |
561 } | 866 } |
562 } | 867 } |
563 | 868 |
564 if (is_chrome_branded && enable_me2me_host && !is_chromeos) { | 869 if (is_chrome_branded && enable_me2me_host && !is_chromeos) { |
565 # TODO(GYP): add support for archive_chromoting_tests variable? | 870 # TODO(GYP): add support for archive_chromoting_tests variable? |
566 | 871 |
567 import("//build/config/zip.gni") | 872 import("//build/config/zip.gni") |
568 | 873 |
569 build_deb_script = "installer/linux/build_deb.py" | 874 build_deb_script = "installer/linux/build_deb.py" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
650 "//remoting/resources", | 955 "//remoting/resources", |
651 "//third_party/icu:icudata", | 956 "//third_party/icu:icudata", |
652 ] | 957 ] |
653 } | 958 } |
654 } else { | 959 } else { |
655 group("remoting_me2me_host_archive") { | 960 group("remoting_me2me_host_archive") { |
656 } | 961 } |
657 } | 962 } |
658 } | 963 } |
659 } | 964 } |
OLD | NEW |