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

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

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

Powered by Google App Engine
This is Rietveld 408576698