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

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

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

Powered by Google App Engine
This is Rietveld 408576698