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