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