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

Side by Side Diff: remoting/host/BUILD.gn

Issue 2308813002: Moving CRD Windows targets to subdirectories. (Closed)
Patch Set: Correcting format. Created 4 years, 3 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
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("//remoting/build/config/remoting_build.gni") 5 import("//remoting/build/config/remoting_build.gni")
6 6
7 group("all_tests") {
8 testonly = true
9
10 deps = [
11 ":unit_tests",
12 ]
13 }
14
15 group("all") {
16 testonly = true
17
18 deps = [
19 ":host",
20 ]
21 if (enable_me2me_host) {
22 deps += [ "//remoting/host:remoting_me2me_host" ]
23 }
24
25 if (is_chrome_branded) {
26 deps += [ ":remoting_host_branded" ]
27 }
28
29 if (!is_chromeos && !is_android && !is_ios) {
30 deps += [
31 "//remoting/host:remoting_native_messaging_host",
32 "//remoting/host:remoting_native_messaging_manifests",
33 "//remoting/host:remoting_start_host",
34 "//remoting/host/it2me:remote_assistance_host",
35 ]
36 }
37 }
38
7 process_version("remoting_version") { 39 process_version("remoting_version") {
8 template_file = "//remoting/host/version.h.in" 40 template_file = "//remoting/host/version.h.in"
9 sources = [ 41 sources = [
10 branding_path, 42 branding_path,
11 ] 43 ]
12 output = "$target_gen_dir/version.h" 44 output = "$target_gen_dir/version.h"
13 } 45 }
14 46
15 if (is_win) {
16 import("//remoting/host/predefines_win.gni")
17 } else if (is_mac) {
18 import("//build/config/mac/rules.gni")
19 import("//third_party/icu/config.gni")
20 }
21
22 if (is_win) {
23 # Reference this manifest to indicate that a process is per-monitor DPI aware.
24 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest"
25
26 # Reference this manifest to give the binary the uiAccess privilege.
27 enable_uiaccess_manifest = "//remoting/host/win/enable_uiaccess.manifest"
28
29 # Depending on this target gives the executable a default manifest with the
30 # addition of the DPI aware tag.
31 windows_manifest("dpi_aware_exe_manifest") {
32 sources = [
33 as_invoker_manifest,
34 common_controls_manifest,
35 default_compatibility_manifest,
36 dpi_aware_manifest,
37 ]
38 type = "exe"
39 }
40
41 # Depending on this target gives the executable a default manifest with the
42 # addition of the DPI aware tag and requestedExecutionLevel of
43 # requireAdministrator.
44 windows_manifest("dpi_aware_elevated_exe_manifest") {
45 sources = [
46 common_controls_manifest,
47 default_compatibility_manifest,
48 dpi_aware_manifest,
49 require_administrator_manifest,
50 ]
51 type = "exe"
52 }
53
54 # Depending on this target gives the executable a default manifest with the
55 # addition of the DPI aware tag and enables uiAccess.
56 windows_manifest("dpi_aware_uiaccess_exe_manifest") {
57 sources = [
58 common_controls_manifest,
59 default_compatibility_manifest,
60 dpi_aware_manifest,
61 enable_uiaccess_manifest,
62 ]
63 type = "exe"
64 }
65 }
66
67 action("credits") {
68 # We put this in $root_build_dir/gen/remoting instead of
69 # $root_build_dir/gen/remoting/host (target_gen_dir) for
70 # compatibility w/ GYP, since the installer needs the file to
71 # be at the same location.
72 about_credits_file = "$root_build_dir/gen/remoting/CREDITS.txt"
73 script = "//tools/licenses.py"
74
75 inputs = [
76 "installer/credits.tmpl",
77 "installer/credits_entry.tmpl",
78 ]
79
80 outputs = [
81 about_credits_file,
82 ]
83
84 args = [
85 "credits",
86 rebase_path(about_credits_file, root_build_dir),
87 "--file-template",
88 rebase_path("installer/credits.tmpl", root_build_dir),
89 "--entry-template",
90 rebase_path("installer/credits_entry.tmpl", root_build_dir),
91 ]
92 }
93
94 # This must be a static library instead of a source set because 47 # This must be a static library instead of a source set because
95 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in, 48 # remoting_unittests requires that remoting_me2me_host.cc not be pulled in,
96 # which in turn depends on remoting_me2me_host_static which isn't part of that 49 # which in turn depends on remoting_me2me_host_static which isn't part of that
97 # build. 50 # build.
98 # 51 #
99 # TODO fix this, successful builds should not depend on static libraries 52 # TODO fix this, successful builds should not depend on static libraries
100 # stripping code. 53 # stripping code.
101 static_library("host") { 54 static_library("host") {
102 sources = [ 55 sources = [
103 "audio_capturer.cc", 56 "audio_capturer.cc",
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 "token_validator_base.h", 291 "token_validator_base.h",
339 "token_validator_factory_impl.cc", 292 "token_validator_factory_impl.cc",
340 "token_validator_factory_impl.h", 293 "token_validator_factory_impl.h",
341 "touch_injector_win.cc", 294 "touch_injector_win.cc",
342 "touch_injector_win.h", 295 "touch_injector_win.h",
343 "usage_stats_consent.h", 296 "usage_stats_consent.h",
344 "usage_stats_consent_mac.cc", 297 "usage_stats_consent_mac.cc",
345 "usage_stats_consent_win.cc", 298 "usage_stats_consent_win.cc",
346 "username.cc", 299 "username.cc",
347 "username.h", 300 "username.h",
348 "win/com_imported_mstscax.tlh",
349 "win/com_security.cc",
350 "win/com_security.h",
351 "win/elevation_helpers.cc",
352 "win/elevation_helpers.h",
353 "win/launch_process_with_token.cc",
354 "win/launch_process_with_token.h",
355 "win/omaha.cc",
356 "win/omaha.h",
357 "win/rdp_client.cc",
358 "win/rdp_client.h",
359 "win/rdp_client_window.cc",
360 "win/rdp_client_window.h",
361 "win/security_descriptor.cc",
362 "win/security_descriptor.h",
363 "win/session_desktop_environment.cc",
364 "win/session_desktop_environment.h",
365 "win/session_input_injector.cc",
366 "win/session_input_injector.h",
367 "win/window_station_and_desktop.cc",
368 "win/window_station_and_desktop.h",
369 "win/worker_process_launcher.cc",
370 "win/worker_process_launcher.h",
371 "win/wts_terminal_monitor.cc",
372 "win/wts_terminal_monitor.h",
373 "win/wts_terminal_observer.h",
374 ] 301 ]
375 302
376 libs = [] 303 libs = []
377 304
378 configs += [ 305 configs += [
379 "//build/config/compiler:wexit_time_destructors", 306 "//build/config/compiler:wexit_time_destructors",
380 "//remoting/build/config:version", 307 "//remoting/build/config:version",
381 ] 308 ]
382 309
383 defines = [ "WEBRTC_CHROMIUM_BUILD" ] 310 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
384 311
385 deps = [ 312 deps = [
386 "//base:i18n", 313 "//base:i18n",
387 "//components/policy/core/common", 314 "//components/policy/core/common",
388 "//content/public/common", 315 "//content/public/common",
389 "//crypto", 316 "//crypto",
390 "//device/power_save_blocker", 317 "//device/power_save_blocker",
391 "//google_apis", 318 "//google_apis",
392 "//ipc", 319 "//ipc",
393 "//remoting/base", 320 "//remoting/base",
394 "//remoting/host/security_key", 321 "//remoting/host/security_key",
395 "//remoting/protocol", 322 "//remoting/protocol",
396 "//remoting/resources", 323 "//remoting/resources",
397 "//ui/base", 324 "//ui/base",
398 "//ui/events:dom_keycode_converter", 325 "//ui/events:dom_keycode_converter",
399 "//ui/events/platform", 326 "//ui/events/platform",
400 ] 327 ]
401 328
329 public_deps = []
330
402 if (enable_configuration_policy) { 331 if (enable_configuration_policy) {
403 deps += [ "//components/policy:generated" ] 332 deps += [ "//components/policy:generated" ]
404 } 333 }
405 334
406 if (is_linux && !is_chromeos) { 335 if (is_linux && !is_chromeos) {
407 libs += [ "pam" ] 336 libs += [ "pam" ]
408 } 337 }
409 338
410 if (use_x11) { 339 if (use_x11) {
411 configs += [ 340 configs += [
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 # this flag and usage can be removed. 420 # this flag and usage can be removed.
492 defines += [ "GN_BUILD=1" ] 421 defines += [ "GN_BUILD=1" ]
493 deps += [ 422 deps += [
494 ":remoting_version", 423 ":remoting_version",
495 "//third_party/google_toolbox_for_mac", 424 "//third_party/google_toolbox_for_mac",
496 ] 425 ]
497 } 426 }
498 427
499 if (is_win) { 428 if (is_win) {
500 deps += [ 429 deps += [
501 ":messages", 430 "//remoting/host/win",
502 ":remoting_lib_idl", 431 "//remoting/host/win:messages",
432 "//remoting/host/win:remoting_lib_idl",
503 ] 433 ]
434
435 public_deps += [ "//remoting/host/win" ]
504 } 436 }
505 437
506 if (enable_webrtc) { 438 if (enable_webrtc) {
507 deps += [ "//third_party/webrtc/modules/desktop_capture" ] 439 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
508 } 440 }
509 441
510 if (is_android) { 442 if (is_android) {
511 sources -= [ 443 sources -= [
512 "single_window_desktop_environment.cc", 444 "single_window_desktop_environment.cc",
513 "single_window_desktop_environment.h", 445 "single_window_desktop_environment.h",
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 "resizing_host_observer_unittest.cc", 535 "resizing_host_observer_unittest.cc",
604 "resources_unittest.cc", 536 "resources_unittest.cc",
605 "screen_resolution_unittest.cc", 537 "screen_resolution_unittest.cc",
606 "server_log_entry_host_unittest.cc", 538 "server_log_entry_host_unittest.cc",
607 "setup/me2me_native_messaging_host_unittest.cc", 539 "setup/me2me_native_messaging_host_unittest.cc",
608 "setup/oauth_helper_unittest.cc", 540 "setup/oauth_helper_unittest.cc",
609 "setup/pin_validator_unittest.cc", 541 "setup/pin_validator_unittest.cc",
610 "third_party_auth_config_unittest.cc", 542 "third_party_auth_config_unittest.cc",
611 "token_validator_factory_impl_unittest.cc", 543 "token_validator_factory_impl_unittest.cc",
612 "touch_injector_win_unittest.cc", 544 "touch_injector_win_unittest.cc",
613 "win/rdp_client_unittest.cc",
614 "win/worker_process_launcher_unittest.cc",
615 ] 545 ]
616 546
617 if (!use_x11 && is_linux) { 547 if (!use_x11 && is_linux) {
618 sources -= [ "linux/unicode_to_keysym_unittest.cc" ] 548 sources -= [ "linux/unicode_to_keysym_unittest.cc" ]
619 } 549 }
620 if (use_ozone || is_chromeos) { 550 if (use_ozone || is_chromeos) {
621 sources -= [ "local_input_monitor_unittest.cc" ] 551 sources -= [ "local_input_monitor_unittest.cc" ]
622 } 552 }
623 if (is_chromeos) { 553 if (is_chromeos) {
624 sources -= [ "linux/x_server_clipboard_unittest.cc" ] 554 sources -= [ "linux/x_server_clipboard_unittest.cc" ]
625 } 555 }
626 if (is_android) { 556 if (is_android) {
627 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ] 557 sources -= [ "it2me/it2me_native_messaging_host_unittest.cc" ]
628 } 558 }
629 if (is_win) {
630 sources += [
631 "win/elevated_native_messaging_host.cc",
632 "win/elevated_native_messaging_host.h",
633 "win/launch_native_messaging_host_process.cc",
634 "win/launch_native_messaging_host_process.h",
635 ]
636 }
637 559
638 configs += [ "//remoting/build/config:version" ] 560 configs += [ "//remoting/build/config:version" ]
639 561
640 deps = [ 562 deps = [
641 ":host", 563 ":host",
642 ":test_support", 564 ":test_support",
643 "//remoting/host/it2me:common", 565 "//remoting/host/it2me:common",
644 "//remoting/host/native_messaging", 566 "//remoting/host/native_messaging",
645 "//remoting/host/security_key:unit_tests", 567 "//remoting/host/security_key:unit_tests",
646 "//remoting/host/setup", 568 "//remoting/host/setup",
647 "//remoting/proto", 569 "//remoting/proto",
648 "//remoting/resources", 570 "//remoting/resources",
649 "//skia", 571 "//skia",
650 "//testing/gmock", 572 "//testing/gmock",
651 "//testing/gtest", 573 "//testing/gtest",
652 ] 574 ]
575 if (is_win) {
576 deps += [ "//remoting/host/win:unit_tests" ]
577 }
653 578
654 if (enable_configuration_policy) { 579 if (enable_configuration_policy) {
655 deps += [ "//components/policy/core/browser:test_support" ] 580 deps += [ "//components/policy/core/browser:test_support" ]
656 } 581 }
657 } 582 }
658 583
659 if (is_win) { 584 group("remoting_host_branded") {
660 import("//build/toolchain/win/midl.gni") 585 testonly = true
Hzj_jie 2016/09/12 22:32:10 Why is this a testonly target?
nicholss 2016/09/12 23:01:43 test_only means that only other testonly targets s
661 import("//build/win/message_compiler.gni") 586 deps = []
587 if (enable_remoting_host) {
588 deps += [ ":remoting_host_installation" ]
589 }
590 if (enable_me2me_host) {
591 deps += [ "//remoting/host:remoting_me2me_host_archive" ]
592 }
593 }
662 594
663 # TODO(brettw) these should not be generated via exec_script. This should be 595 if (enable_remoting_host) {
664 # part of the build process rather than the metabuild. Instead, a script 596 group("remoting_host_installation") {
665 # should generate a header containing the #defines for this as well as the 597 deps = []
666 # IDL file with the values. 598 if (is_win) {
667 clsids = exec_script("win/get_clsids.py", 599 deps += [ "//remoting/host/installer/win:remoting_host_installation" ]
668 [
669 daemon_controller_guid,
670 rdp_desktop_session_guid,
671 chrome_version_full,
672 ],
673 "value")
674 daemon_controller_clsid = clsids[0]
675 rdp_desktop_session_clsid = clsids[1]
676
677 action("generate_idl") {
678 script = "//build/util/version.py"
679
680 inputs = [
681 "win/chromoting_lib_idl.templ",
682 ]
683 outputs = [
684 "$target_gen_dir/chromoting_lib.idl",
685 ]
686
687 args = [
688 "-e",
689 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
690 "-e",
691 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
692 rebase_path(inputs[0], root_build_dir),
693 rebase_path(outputs[0], root_build_dir),
694 ]
695 }
696
697 midl("remoting_lib_idl") {
698 sources = get_target_outputs(":generate_idl")
699 deps = [
700 ":generate_idl",
701 ]
702 }
703
704 config("MIDL_config") {
705 if (is_clang) {
706 cflags = [
707 # MIDL generated code has a habit of omitting optional braces.
708 "-Wno-missing-braces",
709
710 # Source files generated by the MIDL compiler trigger warnings with
711 # -Wincompatible-pointer-types enabled.
712 "-Wno-incompatible-pointer-types",
713
714 # Generated code contains unused variables.
715 "-Wno-unused-variable",
716
717 # PROXYFILE_LIST_START is an extern with initializer.
718 "-Wno-extern-initializer",
719 ]
720 } 600 }
721 } 601 }
722
723 static_library("remoting_lib_ps") {
724 configs += [ ":MIDL_config" ]
725
726 defines = [
727 "ENTRY_PREFIX=Ps",
728 "REGISTER_PROXY_DLL",
729 ]
730
731 deps = [
732 ":remoting_lib_idl",
733 ]
734
735 sources = [
736 "$root_gen_dir/remoting/host/chromoting_lib.dlldata.c",
737 "$root_gen_dir/remoting/host/chromoting_lib_p.c",
738 ]
739 }
740
741 # Makes the .mc file from the .mc.jinja file.
742 remoting_localize("messages_localizing") {
743 sources = [
744 "win/host_messages.mc.jinja2",
745 ]
746 locales = remoting_locales
747 locale_dir = webapp_locale_dir
748 encoding = "utf-16"
749
750 # This target is funny. It only produces one file and the output doesn't
751 # match the input. We want to generate remoting_host_messages.mc from
752 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
753 # output, so the following pattern produces the name we want with a template
754 # based on the input.
755 #
756 # TODO: This is for GYP compat. We should just make the names match instead.
757 output = "$target_gen_dir/remoting_{{source_name_part}}"
758 }
759
760 # Makes the .h/.rc files from the .mc file.
761 message_compiler("messages") {
762 compile_generated_code = false
763 sources = get_target_outputs(":messages_localizing")
764 deps = [
765 ":messages_localizing",
766 ]
767 }
768
769 executable("remoting_console") {
770 configs += [ "//build/config/compiler:wexit_time_destructors" ]
771
772 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
773
774 deps = [
775 ":dpi_aware_exe_manifest",
776 ":remoting_core",
777 ":remoting_windows_resources",
778 ]
779
780 sources = [
781 "$root_gen_dir/remoting/version.rc",
782 "win/entry_point.cc",
783 ]
784
785 ldflags = [
786 "/ENTRY:HostEntryPoint",
787 # "/NODEFAULTLIB",
788 ]
789 }
790
791 shared_library("remoting_core") {
792 configs += [ "//build/config/compiler:wexit_time_destructors" ]
793
794 defines = host_predefines + [
795 "_ATL_APARTMENT_THREADED",
796 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS",
797 "_ATL_NO_AUTOMATIC_NAMESPACE",
798 "_ATL_NO_EXCEPTIONS",
799 "BINARY=BINARY_CORE",
800 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"",
801 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"",
802 "HOST_IMPLEMENTATION",
803 "ISOLATION_AWARE_ENABLED=1",
804 "STRICT",
805 "VERSION=$chrome_version_full",
806 ]
807
808 if (remoting_multi_process != 0 && remoting_rdp_session != 0) {
809 defines += [ "REMOTING_RDP_SESSION" ]
810 }
811
812 if (remoting_multi_process != 0) {
813 defines += [ "REMOTING_MULTI_PROCESS" ]
814 }
815
816 deps = [
817 ":host",
818 ":messages",
819 ":remoting_lib_idl",
820 ":remoting_lib_ps",
821 ":remoting_me2me_host_static",
822 ":remoting_windows_resources",
823 "//base",
824 "//base:base_static",
825 "//base/allocator",
826 "//base/third_party/dynamic_annotations",
827 "//build/win:default_exe_manifest",
828 "//ipc",
829 "//net",
830 "//remoting/base",
831 "//remoting/base:breakpad",
832 "//remoting/codec",
833 "//remoting/host/it2me:common",
834 "//remoting/host/native_messaging",
835 "//remoting/host/security_key:main",
836 "//remoting/host/setup",
837 "//remoting/protocol",
838 "//sandbox/win:sandbox", # Should always use Windows version
839 "//third_party/webrtc/modules/desktop_capture",
840 ]
841
842 sources = [
843 "$root_gen_dir/remoting/core.rc",
844 "$root_gen_dir/remoting/host/remoting_host_messages.rc",
845 "$root_gen_dir/remoting/version.rc",
846 "desktop_process_main.cc",
847 "host_main.cc",
848 "host_main.h",
849 "it2me/it2me_native_messaging_host_main.cc",
850 "it2me/it2me_native_messaging_host_main.h",
851 "setup/host_starter.cc",
852 "setup/host_starter.h",
853 "setup/me2me_native_messaging_host_main.cc",
854 "setup/me2me_native_messaging_host_main.h",
855 "setup/start_host_main.cc",
856 "setup/start_host_main.h",
857 "win/chromoting_lib.rc",
858 "win/chromoting_module.cc",
859 "win/chromoting_module.h",
860 "win/core.cc",
861 "win/core_resource.h",
862 "win/elevated_native_messaging_host.cc",
863 "win/elevated_native_messaging_host.h",
864 "win/host_service.cc",
865 "win/host_service.h",
866 "win/launch_native_messaging_host_process.cc",
867 "win/launch_native_messaging_host_process.h",
868 "win/omaha.cc",
869 "win/omaha.h",
870 "win/rdp_desktop_session.cc",
871 "win/rdp_desktop_session.h",
872 "win/unprivileged_process_delegate.cc",
873 "win/unprivileged_process_delegate.h",
874 "win/wts_session_process_delegate.cc",
875 "win/wts_session_process_delegate.h",
876 "worker_process_ipc_delegate.h",
877 ]
878
879 ldflags = [
880 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE",
881 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE",
882 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE",
883 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE",
884 ]
885
886 libs = [
887 "comctl32.lib",
888 "rpcns4.lib",
889 "rpcrt4.lib",
890 "sas.lib",
891 "uuid.lib",
892 "wtsapi32.lib",
893 ]
894
895 if (is_clang) {
896 cflags = [ "-Wno-header-hygiene" ]
897 }
898 }
899
900 executable("remoting_desktop") {
901 configs += [
902 "//build/config/compiler:wexit_time_destructors",
903 "//build/config/win:windowed",
904 ]
905
906 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ]
907
908 deps = [
909 ":remoting_core",
910 ":remoting_windows_resources",
911 ]
912
913 if (is_official_build) {
914 deps += [ ":dpi_aware_elevated_exe_manifest" ]
915 } else {
916 deps += [ ":dpi_aware_exe_manifest" ]
917 }
918
919 sources = [
920 "$root_gen_dir/remoting/version.rc",
921 "win/entry_point.cc",
922 ]
923
924 ldflags = [
925 "/ENTRY:HostEntryPoint",
926 # "/NODEFAULTLIB",
927 ]
928 }
929
930 executable("remoting_native_messaging_host") {
931 configs += [ "//build/config/compiler:wexit_time_destructors" ]
932
933 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ]
934
935 deps = [
936 ":remoting_core",
937 ":remoting_windows_resources",
938 "//build/win:default_exe_manifest",
939 ]
940
941 if (is_mac) {
942 foreach(locale, remoting_locales_with_underscores) {
943 deps += [
944 ":native_messaging_host_strings_${locale}_bundle_data",
945 ":remoting_host_locale_${locale}_bundle_data",
946 ]
947 }
948 deps += [
949 ":remoting_infoplist_strings",
950 "//remoting/resources:copy_locales",
951 ]
952 }
953
954 sources = [
955 "$root_gen_dir/remoting/version.rc",
956 "setup/me2me_native_messaging_host_entry_point.cc",
957 ]
958 }
959
960 remoting_localize("remoting_windows_resources") {
961 deps = [
962 "//remoting/resources",
963 ]
964
965 sources = [
966 "win/core.rc.jinja2",
967 "win/version.rc.jinja2",
968 ]
969
970 # TODO(zijiehe): Export lastchange_path from
971 # //chrome/version.gni:process_version
972 variables = [
973 rebase_path(chrome_version_file),
974 rebase_path(remoting_version_file),
975 rebase_path("//build/util/LASTCHANGE"),
976 ]
977
978 output = "$root_gen_dir/remoting/{{source_name_part}}"
979
980 locale_dir = webapp_locale_dir
981
982 encoding = "utf-16"
983
984 locales = remoting_locales
985 }
986
987 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
988 } 602 }
989 603
990 if (enable_remoting_host && !is_android) { 604 if (enable_remoting_host && !is_android) {
991 executable("remoting_start_host") { 605 executable("remoting_start_host") {
992 sources = [ 606 sources = [
993 "setup/start_host_entry_point.cc", 607 "setup/start_host_entry_point.cc",
994 ] 608 ]
995 609
996 deps = [ 610 deps = [
997 "//build/config/sanitizers:deps", 611 "//build/config/sanitizers:deps",
998 ] 612 ]
999 613
1000 configs += [ "//build/config/compiler:wexit_time_destructors" ] 614 configs += [ "//build/config/compiler:wexit_time_destructors" ]
1001 615
1002 if (is_win) { 616 if (is_win) {
1003 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ] 617 defines = host_predefines + [ "BINARY=BINARY_REMOTING_START_HOST" ]
1004 618
1005 deps += [ 619 deps += [
1006 ":remoting_core",
1007 ":remoting_windows_resources",
1008 "//build/win:default_exe_manifest", 620 "//build/win:default_exe_manifest",
621 "//remoting/host/win:remoting_core",
622 "//remoting/host/win:remoting_windows_resources",
1009 ] 623 ]
1010 } else { 624 } else {
1011 sources += [ 625 sources += [
1012 "setup/host_starter.cc", 626 "setup/host_starter.cc",
1013 "setup/host_starter.h", 627 "setup/host_starter.h",
1014 "setup/start_host_main.cc", 628 "setup/start_host_main.cc",
1015 "setup/start_host_main.h", 629 "setup/start_host_main.h",
1016 ] 630 ]
1017 631
1018 deps += [ "//remoting/host/setup" ] 632 deps += [ "//remoting/host/setup" ]
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 738
1125 if (enable_me2me_host) { 739 if (enable_me2me_host) {
1126 static_library("remoting_me2me_host_static") { 740 static_library("remoting_me2me_host_static") {
1127 sources = [ 741 sources = [
1128 "pam_authorization_factory_posix.cc", 742 "pam_authorization_factory_posix.cc",
1129 "pam_authorization_factory_posix.h", 743 "pam_authorization_factory_posix.h",
1130 "remoting_me2me_host.cc", 744 "remoting_me2me_host.cc",
1131 ] 745 ]
1132 defines = [] 746 defines = []
1133 747
1134 configs += [ "//remoting/build/config:version" ] 748 configs += [
749 "//remoting/build/config:version",
750 "//remoting/build/config:remoting_me2me_host",
751 ]
1135 752
1136 deps = [ 753 deps = [
1137 "//base", 754 "//base",
1138 "//base:i18n", 755 "//base:i18n",
1139 "//components/policy/core/common", 756 "//components/policy/core/common",
1140 "//net", 757 "//net",
1141 "//remoting/base", 758 "//remoting/base",
1142 "//remoting/host", 759 "//remoting/host",
1143 "//remoting/proto", 760 "//remoting/proto",
1144 "//third_party/webrtc/modules/desktop_capture", 761 "//third_party/webrtc/modules/desktop_capture",
(...skipping 13 matching lines...) Expand all
1158 775
1159 if (is_desktop_linux) { 776 if (is_desktop_linux) {
1160 deps += [ "//build/config/linux/gtk2" ] 777 deps += [ "//build/config/linux/gtk2" ]
1161 } 778 }
1162 if ((is_linux && !is_chromeos) || is_mac) { 779 if ((is_linux && !is_chromeos) || is_mac) {
1163 libs = [ "pam" ] 780 libs = [ "pam" ]
1164 } 781 }
1165 782
1166 if (is_mac && is_official_build) { 783 if (is_mac && is_official_build) {
1167 sources += [ "internal/internal_mac-inl.h" ] 784 sources += [ "internal/internal_mac-inl.h" ]
1168 defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
1169 }
1170
1171 if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
1172 defines += [ "REMOTING_RDP_SESSION" ]
1173 }
1174
1175 if (remoting_multi_process != 0) {
1176 defines += [ "REMOTING_MULTI_PROCESS" ]
1177 } 785 }
1178 } 786 }
1179 787
1180 if (is_win) { 788 if (is_win) {
1181 executable("remoting_me2me_host") { 789 group("remoting_me2me_host") {
1182 configs += [ 790 deps = [
1183 "//build/config/compiler:wexit_time_destructors", 791 "//remoting/host/win:remoting_me2me_host",
1184 "//build/config/win:windowed",
1185 ] 792 ]
1186 793 }
1187 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ] 794 group("remoting_native_messaging_host") {
1188
1189 deps = [ 795 deps = [
1190 ":dpi_aware_exe_manifest", 796 "//remoting/host/win:remoting_native_messaging_host",
1191 ":remoting_core",
1192 ":remoting_windows_resources",
1193 ]
1194
1195 sources = [
1196 "$root_gen_dir/remoting/version.rc",
1197 "win/entry_point.cc",
1198 ]
1199
1200 output_name = "remoting_host"
1201
1202 ldflags = [
1203 "/ENTRY:HostEntryPoint",
1204 # "/NODEFAULTLIB",
1205 ] 797 ]
1206 } 798 }
1207 } else { 799 } else {
1208 if (is_mac) { 800 if (is_mac) {
1209 app_target_type = "mac_app_bundle" 801 app_target_type = "mac_app_bundle"
1210 } else { 802 } else {
1211 app_target_type = "executable" 803 app_target_type = "executable"
1212 } 804 }
1213 805
1214 if (is_mac) { 806 if (is_mac) {
(...skipping 22 matching lines...) Expand all
1237 sources = [ 829 sources = [
1238 "$root_gen_dir/remoting/CREDITS.txt", 830 "$root_gen_dir/remoting/CREDITS.txt",
1239 "remoting_me2me_host.icns", 831 "remoting_me2me_host.icns",
1240 ] 832 ]
1241 833
1242 outputs = [ 834 outputs = [
1243 "{{bundle_resources_dir}}/{{source_file_part}}", 835 "{{bundle_resources_dir}}/{{source_file_part}}",
1244 ] 836 ]
1245 837
1246 public_deps = [ 838 public_deps = [
1247 ":credits", 839 "//remoting/host/installer:credits",
1248 ] 840 ]
1249 841
1250 if (icu_use_data_file) { 842 if (icu_use_data_file) {
1251 sources += [ "$root_out_dir/icudtl.dat" ] 843 sources += [ "$root_out_dir/icudtl.dat" ]
1252 public_deps += [ "//third_party/icu:icudata" ] 844 public_deps += [ "//third_party/icu:icudata" ]
1253 } 845 }
1254 } 846 }
1255 } 847 }
1256 848
1257 target(app_target_type, "remoting_me2me_host") { 849 target(app_target_type, "remoting_me2me_host") {
(...skipping 13 matching lines...) Expand all
1271 sources = [ 863 sources = [
1272 "host_main.cc", 864 "host_main.cc",
1273 "host_main.h", 865 "host_main.h",
1274 ] 866 ]
1275 867
1276 if (is_mac && is_chrome_branded && is_official_build) { 868 if (is_mac && is_chrome_branded && is_official_build) {
1277 defines = [ "REMOTING_ENABLE_BREAKPAD" ] 869 defines = [ "REMOTING_ENABLE_BREAKPAD" ]
1278 } 870 }
1279 871
1280 deps = [ 872 deps = [
1281 ":credits",
1282 ":remoting_me2me_host_static", 873 ":remoting_me2me_host_static",
1283 "//build/config/sanitizers:deps", 874 "//build/config/sanitizers:deps",
1284 "//remoting/base:breakpad", 875 "//remoting/base:breakpad",
876 "//remoting/host/installer:credits",
1285 "//remoting/resources", 877 "//remoting/resources",
1286 ] 878 ]
1287 if (is_mac) { 879 if (is_mac) {
1288 foreach(locale, remoting_locales_with_underscores) { 880 foreach(locale, remoting_locales_with_underscores) {
1289 deps += [ 881 deps += [
1290 ":remoting_host_locale_${locale}_bundle_data", 882 ":remoting_host_locale_${locale}_bundle_data",
1291 ":remoting_me2me_host_strings_${locale}_bundle_data", 883 ":remoting_me2me_host_strings_${locale}_bundle_data",
1292 ] 884 ]
1293 } 885 }
1294 deps += [ 886 deps += [
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 outputs = [ 931 outputs = [
1340 "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}", 932 "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}",
1341 ] 933 ]
1342 deps = [ 934 deps = [
1343 ":remoting_infoplist_strings", 935 ":remoting_infoplist_strings",
1344 ] 936 ]
1345 } 937 }
1346 } 938 }
1347 } 939 }
1348 940
1349 target(app_target_type, "native_messaging_host") { 941 target(app_target_type, "remoting_native_messaging_host") {
1350 if (is_mac) { 942 if (is_mac) {
1351 info_plist = "setup/native_messaging_host-Info.plist" 943 info_plist = "setup/native_messaging_host-Info.plist"
1352 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] 944 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ]
1353 extra_substitutions = [ 945 extra_substitutions = [
1354 "BUNDLE_ID=$native_messaging_host_bundle_id", 946 "BUNDLE_ID=$native_messaging_host_bundle_id",
1355 "VERSION_FULL=$remoting_version_full", 947 "VERSION_FULL=$remoting_version_full",
1356 "VERSION_SHORT=$remoting_version_short", 948 "VERSION_SHORT=$remoting_version_short",
1357 "MACOSX_DEPLOYMENT_TARGET=10.7", 949 "MACOSX_DEPLOYMENT_TARGET=10.7",
1358 ] 950 ]
1359 } else { 951 } else {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 "installer/linux/build-deb.sh", 1060 "installer/linux/build-deb.sh",
1469 ] 1061 ]
1470 args = [ 1062 args = [
1471 "-s", 1063 "-s",
1472 rebase_path("//"), 1064 rebase_path("//"),
1473 "-o", 1065 "-o",
1474 rebase_path("$root_build_dir"), 1066 rebase_path("$root_build_dir"),
1475 ] 1067 ]
1476 1068
1477 deps = [ 1069 deps = [
1478 ":native_messaging_host",
1479 ":remoting_me2me_host", 1070 ":remoting_me2me_host",
1071 ":remoting_native_messaging_host",
1480 ":remoting_native_messaging_manifests", 1072 ":remoting_native_messaging_manifests",
1481 ":remoting_start_host", 1073 ":remoting_start_host",
1482 "//remoting/host/it2me:remote_assistance_host", 1074 "//remoting/host/it2me:remote_assistance_host",
1483 "//remoting/resources", 1075 "//remoting/resources",
1484 "//third_party/icu:icudata", 1076 "//third_party/icu:icudata",
1485 ] 1077 ]
1486 } 1078 }
1487 } else if (is_win) { 1079 } else if (is_win) {
1488 action("remoting_me2me_host_archive") { 1080 group("remoting_me2me_host_archive") {
1489 script = "//remoting/host/installer/build-installer-archive.py"
1490
1491 deps = [ 1081 deps = [
1492 ":credits", 1082 "//remoting/host/installer/win:remoting_me2me_host_archive",
1493 ":remoting_core",
1494 ":remoting_desktop",
1495 ":remoting_me2me_host",
1496 ":remoting_native_messaging_host",
1497 ":remoting_native_messaging_manifests",
1498 ":remoting_start_host",
1499 "it2me:remote_assistance_host",
1500 "it2me:remote_assistance_host_uiaccess",
1501 "//remoting/host/security_key:remote_security_key",
1502 "//third_party/icu:icudata",
1503 ] 1083 ]
1504
1505 _output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
1506
1507 outputs = [
1508 _output,
1509 ]
1510 if (is_chrome_branded) {
1511 _branding = "Chrome"
1512 } else {
1513 _branding = "Chromium"
1514 }
1515
1516 if (is_official_build) {
1517 _official_build = "1"
1518 } else {
1519 _official_build = "0"
1520 }
1521
1522 # Due to GN build issue http://crbug.com/633650, we need to actively set
1523 # inputs parameter to tell GN to depend on these files. So change to each
1524 # following files will trigger this target to be rebuilt.
1525 # TODO(zijiehe): Remove inputs parameter once bug 633650 has been
1526 # addressed.
1527 inputs = [
1528 "$root_out_dir/remote_assistance_host.exe",
1529 "$root_out_dir/remote_assistance_host_uiaccess.exe",
1530 "$root_out_dir/remote_security_key.exe",
1531 "$root_out_dir/remoting_core.dll",
1532 "$root_out_dir/remoting_desktop.exe",
1533 "$root_out_dir/remoting_host.exe",
1534 "$root_out_dir/remoting_native_messaging_host.exe",
1535 "$root_out_dir/remoting_start_host.exe",
1536 "$root_gen_dir/remoting/CREDITS.txt",
1537 "$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
1538 "$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
1539 "$root_out_dir/icudtl.dat",
1540 ]
1541
1542 _generated_files = rebase_path(inputs, root_build_dir)
1543 _generated_files += [ rebase_path("//remoting/resources/chromoting.ico") ]
1544
1545 # _generated_dst_files must contain the same files in the same order as
1546 # _generated_files, otherwise the Windows MSI will not be built correctly.
1547 _generated_dst_files = [
1548 "files/remote_assistance_host.exe",
1549 "files/remote_assistance_host_uiaccess.exe",
1550 "files/remote_security_key.exe",
1551 "files/remoting_core.dll",
1552 "files/remoting_desktop.exe",
1553 "files/remoting_host.exe",
1554 "files/remoting_native_messaging_host.exe",
1555 "files/remoting_start_host.exe",
1556 "files/CREDITS.txt",
1557 "files/com.google.chrome.remote_assistance.json",
1558 "files/com.google.chrome.remote_desktop.json",
1559 "files/icudtl.dat",
1560 "files/chromoting.ico",
1561 ]
1562
1563 args =
1564 [
1565 rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
1566 rebase_path(_output, root_build_dir),
1567 "--source-file-roots",
1568 rebase_path("//remoting/host/installer/win"),
1569 "--source-files",
1570 rebase_path("//remoting/host/installer/win/chromoting.wxs"),
1571 rebase_path("//remoting/host/installer/win/parameters.json"),
1572
1573 # Input files
1574 "--generated-files",
1575 ] + _generated_files +
1576 [
1577 # Position of files in zip file
1578 "--generated-files-dst",
1579 ] + _generated_dst_files +
1580 [
1581 # Defs
1582 "--defs",
1583 "BRANDING=$_branding",
1584 "DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
1585 "RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
1586 "VERSION=$chrome_version_full",
1587 "OFFICIAL_BUILD=$_official_build",
1588 ]
1589 } 1084 }
1590 } else if (is_mac) { 1085 } else if (is_mac) {
1591 import("//build/config/zip.gni") 1086 import("//build/config/zip.gni")
1592 1087
1593 action("remoting_me2me_host_archive") { 1088 action("remoting_me2me_host_archive") {
1594 # TODO(GYP) TODO(crbug.com/622415) This needs work and testing. 1089 # TODO(GYP) TODO(crbug.com/622415) This needs work and testing.
1595 1090
1596 # TODO(GYP) At the very least, we need to add in the localized strings. 1091 # TODO(GYP) At the very least, we need to add in the localized strings.
1597 1092
1598 _installer_mac_files = [ 1093 _installer_mac_files = [
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1666 "BUNDLE_ID_HOST_SERVICE=$bundle_prefix.$host_service_name_nospace ", 1161 "BUNDLE_ID_HOST_SERVICE=$bundle_prefix.$host_service_name_nospace ",
1667 "BUNDLE_ID_HOST_UNINSTALLER=$bundle_prefix.$host_uninstaller_name _nospace", 1162 "BUNDLE_ID_HOST_UNINSTALLER=$bundle_prefix.$host_uninstaller_name _nospace",
1668 "DMG_VOLUME_NAME=$host_name $chrome_version_full", 1163 "DMG_VOLUME_NAME=$host_name $chrome_version_full",
1669 "DMG_FILE_NAME=$host_name_nospace-$chrome_version_full", 1164 "DMG_FILE_NAME=$host_name_nospace-$chrome_version_full",
1670 "NATIVE_MESSAGING_HOST_BUNDLE_NAME=$native_messaging_host_bundle_ name", 1165 "NATIVE_MESSAGING_HOST_BUNDLE_NAME=$native_messaging_host_bundle_ name",
1671 "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$remote_assistance_host_bundl e_name", 1166 "REMOTE_ASSISTANCE_HOST_BUNDLE_NAME=$remote_assistance_host_bundl e_name",
1672 "PREFPANE_BUNDLE_NAME=$prefpane_bundle_name", 1167 "PREFPANE_BUNDLE_NAME=$prefpane_bundle_name",
1673 ] 1168 ]
1674 1169
1675 deps = [ 1170 deps = [
1676 ":native_messaging_host",
1677 ":remoting_host_prefpane.prefPane", 1171 ":remoting_host_prefpane.prefPane",
1678 ":remoting_host_uninstaller", 1172 ":remoting_host_uninstaller",
1679 ":remoting_me2me_host", 1173 ":remoting_me2me_host",
1174 ":remoting_native_messaging_host",
1680 ":remoting_native_messaging_manifests", 1175 ":remoting_native_messaging_manifests",
1681 "//remoting/host/it2me:remote_assistance_host", 1176 "//remoting/host/it2me:remote_assistance_host",
1682 ] 1177 ]
1683 } 1178 }
1684 1179
1685 _uninstaller_plist = 1180 _uninstaller_plist =
1686 "installer/mac/uninstaller/remoting_uninstaller-Info.plist" 1181 "installer/mac/uninstaller/remoting_uninstaller-Info.plist"
1687 1182
1688 # remoting_uninstaller-InfoPlist.strings 1183 # remoting_uninstaller-InfoPlist.strings
1689 foreach(locale, remoting_locales_with_underscores) { 1184 foreach(locale, remoting_locales_with_underscores) {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 "mac/me2me_preference_pane_confirm_pin.xib", 1365 "mac/me2me_preference_pane_confirm_pin.xib",
1871 "mac/me2me_preference_pane_disable.xib", 1366 "mac/me2me_preference_pane_disable.xib",
1872 1367
1873 #"mac/me2me_preference_pane-Info.plist", 1368 #"mac/me2me_preference_pane-Info.plist",
1874 ] 1369 ]
1875 } 1370 }
1876 } else { 1371 } else {
1877 group("remoting_me2me_host_archive") { 1372 group("remoting_me2me_host_archive") {
1878 } 1373 }
1879 } 1374 }
1880
1881 if (is_win && is_chrome_branded) {
1882 # We do not release a 64 bits binary. So to avoid any potential
1883 # misunderstanding, we only build 32 bits MSI file.
1884 if (!is_component_build && target_cpu == "x86") {
1885 # The script uses "ia32" instead of "x86".
1886 msi_script_arch = "ia32"
1887
1888 action("remoting_host_installation") {
1889 deps = [
1890 "//remoting/host:remoting_me2me_host_archive",
1891 ]
1892 script = "../tools/zip2msi.py"
1893 outputs = [
1894 "$root_out_dir/chromoting.msi",
1895 ]
1896 args = [
1897 "--wix_path",
1898 rebase_path("//third_party/wix"),
1899 "--intermediate_dir",
1900 rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
1901 "--target_arch",
1902 msi_script_arch,
1903 rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
1904 root_build_dir),
1905 rebase_path(outputs[0], root_build_dir),
1906 ]
1907 }
1908 } else {
1909 group("remoting_host_installation") {
1910 }
1911 }
1912 }
1913 } 1375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698