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

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

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

Powered by Google App Engine
This is Rietveld 408576698