Commit ac59f3fd authored by nicholss's avatar nicholss Committed by Commit bot

Moving CRD Windows targets to subdirectories.

This is the windows host focused GN rewrite for Remoting Host. This
work attempts to simplify the build for Remoting so it can be more
easily understood and maintained. This is done by pushing more of the target config checking deeper into the platform specific targets and
producing build files that are more in-line with best-practice GN style.

Review-Url: https://codereview.chromium.org/2308813002
Cr-Commit-Position: refs/heads/master@{#418668}
parent b1815a33
...@@ -249,6 +249,7 @@ exec_script_whitelist = [ ...@@ -249,6 +249,7 @@ exec_script_whitelist = [
"//net/BUILD.gn", "//net/BUILD.gn",
"//remoting/host/BUILD.gn", "//remoting/host/BUILD.gn",
"//remoting/remoting_version.gni", "//remoting/remoting_version.gni",
"//remoting/host/installer/win/generate_clsids.gni",
"//third_party/angle/BUILD.gn", "//third_party/angle/BUILD.gn",
"//third_party/angle/src/tests/BUILD.gn", "//third_party/angle/src/tests/BUILD.gn",
"//third_party/angle/src/vulkan_support/BUILD.gn", "//third_party/angle/src/vulkan_support/BUILD.gn",
......
...@@ -21,8 +21,7 @@ group("remoting_all") { ...@@ -21,8 +21,7 @@ group("remoting_all") {
if (is_win) { if (is_win) {
deps += [ deps += [
"//remoting:remoting_breakpad_tester", "//remoting:remoting_breakpad_tester",
"//remoting/host:remoting_console", "//remoting/host/win:all",
"//remoting/host:remoting_desktop",
] ]
if (is_chrome_branded) { if (is_chrome_branded) {
...@@ -55,13 +54,8 @@ group("remoting_all") { ...@@ -55,13 +54,8 @@ group("remoting_all") {
} }
} }
# The same target is called differently on Linux. if (is_win || (!is_chromeos && !is_android && !is_ios)) {
# TODO(sergeyu): Rename it to remoting_native_messaging_host on all
# platforms.
if (is_win) {
deps += [ "//remoting/host:remoting_native_messaging_host" ] deps += [ "//remoting/host:remoting_native_messaging_host" ]
} else if (!is_chromeos && !is_android) {
deps += [ "//remoting/host:native_messaging_host" ]
} }
if (is_linux && !is_chromeos) { if (is_linux && !is_chromeos) {
...@@ -90,11 +84,20 @@ if (is_win) { ...@@ -90,11 +84,20 @@ if (is_win) {
"//remoting/host", "//remoting/host",
] ]
libs = []
configs += [ "//build/config/compiler:wexit_time_destructors" ] configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [ sources = [
"tools/breakpad_tester_win.cc", "tools/breakpad_tester_win.cc",
] ]
if (is_win) {
libs += [
"rpcrt4.lib",
"wtsapi32.lib",
]
}
} }
} }
...@@ -183,6 +186,9 @@ test("remoting_unittests") { ...@@ -183,6 +186,9 @@ test("remoting_unittests") {
if (enable_remoting_host) { if (enable_remoting_host) {
test("remoting_perftests") { test("remoting_perftests") {
defines = []
libs = []
sources = [ sources = [
"test/codec_perftest.cc", "test/codec_perftest.cc",
"test/protocol_perftest.cc", "test/protocol_perftest.cc",
...@@ -205,5 +211,14 @@ if (enable_remoting_host) { ...@@ -205,5 +211,14 @@ if (enable_remoting_host) {
if (enable_webrtc) { if (enable_webrtc) {
deps += [ "//third_party/libjingle:libjingle_webrtc" ] deps += [ "//third_party/libjingle:libjingle_webrtc" ]
} }
if (is_win) {
defines += [ "_ALT_NO_EXCEPTIONS" ]
libs += [
"rpcrt4.lib",
"wtsapi32.lib",
]
}
} }
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import("//build/config/features.gni") import("//build/config/features.gni")
import("//build/util/version.gni") import("//build/util/version.gni")
import("//remoting/remoting_options.gni")
# TODO(nicholss): Move this and other defines to version.h.in. # TODO(nicholss): Move this and other defines to version.h.in.
# Various remoting targets need this version definition. # Various remoting targets need this version definition.
...@@ -16,3 +17,19 @@ config("enable_webrtc_remoting_client") { ...@@ -16,3 +17,19 @@ config("enable_webrtc_remoting_client") {
defines = [ "ENABLE_WEBRTC_REMOTING_CLIENT=1" ] defines = [ "ENABLE_WEBRTC_REMOTING_CLIENT=1" ]
} }
} }
config("remoting_me2me_host") {
defines = []
if (is_mac && is_official_build) {
defines += [ "USE_REMOTING_MACOSX_INTERNAL" ]
}
if (is_win && remoting_multi_process != 0 && remoting_rdp_session != 0) {
defines += [ "REMOTING_RDP_SESSION" ]
}
if (remoting_multi_process != 0) {
defines += [ "REMOTING_MULTI_PROCESS" ]
}
}
This diff is collapsed.
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h" #include "ipc/ipc_platform_file.h"
#include "remoting/base/auto_thread_task_runner.h" #include "remoting/base/auto_thread_task_runner.h"
// MIDL-generated declarations and definitions.
#include "remoting/host/chromoting_lib.h"
#include "remoting/host/chromoting_messages.h" #include "remoting/host/chromoting_messages.h"
#include "remoting/host/daemon_process.h" #include "remoting/host/daemon_process.h"
#include "remoting/host/desktop_session.h" #include "remoting/host/desktop_session.h"
...@@ -39,6 +37,8 @@ ...@@ -39,6 +37,8 @@
#include "remoting/host/ipc_constants.h" #include "remoting/host/ipc_constants.h"
#include "remoting/host/sas_injector.h" #include "remoting/host/sas_injector.h"
#include "remoting/host/screen_resolution.h" #include "remoting/host/screen_resolution.h"
// MIDL-generated declarations and definitions.
#include "remoting/host/win/chromoting_lib.h"
#include "remoting/host/win/host_service.h" #include "remoting/host/win/host_service.h"
#include "remoting/host/win/worker_process_launcher.h" #include "remoting/host/win/worker_process_launcher.h"
#include "remoting/host/win/wts_session_process_delegate.h" #include "remoting/host/win/wts_session_process_delegate.h"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "net/base/ip_endpoint.h" #include "net/base/ip_endpoint.h"
#include "remoting/host/host_status_monitor.h" #include "remoting/host/host_status_monitor.h"
#include "remoting/host/host_status_observer.h" #include "remoting/host/host_status_observer.h"
#include "remoting/host/remoting_host_messages.h" #include "remoting/host/win/remoting_host_messages.h"
#include "remoting/protocol/transport.h" #include "remoting/protocol/transport.h"
namespace remoting { namespace remoting {
......
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//remoting/build/config/remoting_build.gni")
action("credits") {
# We put this in $root_build_dir/gen/remoting instead of
# $root_build_dir/gen/remoting/host (target_gen_dir) for
# compatibility w/ GYP, since the installer needs the file to
# be at the same location.
about_credits_file = "$root_build_dir/gen/remoting/CREDITS.txt"
script = "//tools/licenses.py"
inputs = [
"credits.tmpl",
"credits_entry.tmpl",
]
outputs = [
about_credits_file,
]
args = [
"credits",
rebase_path(about_credits_file, root_build_dir),
"--file-template",
rebase_path("credits.tmpl", root_build_dir),
"--entry-template",
rebase_path("credits_entry.tmpl", root_build_dir),
]
}
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//remoting/build/config/remoting_build.gni")
import("//remoting/host/installer/win/generate_clsids.gni")
import("//build/toolchain/win/midl.gni")
import("//build/win/message_compiler.gni")
action("remoting_me2me_host_archive") {
script = "//remoting/host/installer/build-installer-archive.py"
deps = [
"//remoting/host:remoting_native_messaging_manifests",
"//remoting/host:remoting_start_host",
"//remoting/host/installer:credits",
"//remoting/host/it2me:remote_assistance_host",
"//remoting/host/win:remoting_core",
"//remoting/host/win:remoting_desktop",
"//remoting/host/win:remoting_me2me_host",
"//remoting/host/win:remoting_native_messaging_host",
"//third_party/icu:icudata",
]
public_deps = [
"//remoting/host/security_key:remote_security_key",
]
_output = "$root_out_dir/remoting-me2me-host-$target_os.zip"
outputs = [
_output,
]
if (is_chrome_branded) {
_branding = "Chrome"
} else {
_branding = "Chromium"
}
if (is_official_build) {
_official_build = "1"
} else {
_official_build = "0"
}
# Due to GN build issue http://crbug.com/633650, we need to actively set
# inputs parameter to tell GN to depend on these files. So change to each
# following files will trigger this target to be rebuilt.
# TODO(zijiehe): Remove inputs parameter once bug 633650 has been
# addressed.
inputs = [
"$root_out_dir/remote_assistance_host.exe",
"$root_out_dir/remote_security_key.exe",
"$root_out_dir/remoting_core.dll",
"$root_out_dir/remoting_desktop.exe",
"$root_out_dir/remoting_host.exe",
"$root_out_dir/remoting_native_messaging_host.exe",
"$root_out_dir/remoting_start_host.exe",
"$root_gen_dir/remoting/CREDITS.txt",
"$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
"$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
"$root_out_dir/icudtl.dat",
]
_generated_files = rebase_path(inputs, root_build_dir)
_generated_files += [ rebase_path("//remoting/resources/chromoting.ico") ]
# _generated_dst_files must contain the same files in the same order as
# _generated_files, otherwise the Windows MSI will not be built correctly.
_generated_dst_files = [
"files/remote_assistance_host.exe",
"files/remote_security_key.exe",
"files/remoting_core.dll",
"files/remoting_desktop.exe",
"files/remoting_host.exe",
"files/remoting_native_messaging_host.exe",
"files/remoting_start_host.exe",
"files/CREDITS.txt",
"files/com.google.chrome.remote_assistance.json",
"files/com.google.chrome.remote_desktop.json",
"files/icudtl.dat",
"files/chromoting.ico",
]
args = [
rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
rebase_path(_output, root_build_dir),
"--source-file-roots",
rebase_path("//remoting/host/installer/win"),
"--source-files",
rebase_path("//remoting/host/installer/win/chromoting.wxs"),
rebase_path("//remoting/host/installer/win/parameters.json"),
# Input files
"--generated-files",
] + _generated_files +
[
# Position of files in zip file
"--generated-files-dst",
] + _generated_dst_files +
[
# Defs
"--defs",
"BRANDING=$_branding",
"DAEMON_CONTROLLER_CLSID={$daemon_controller_clsid}",
"RDP_DESKTOP_SESSION_CLSID={$rdp_desktop_session_clsid}",
"VERSION=$chrome_version_full",
"OFFICIAL_BUILD=$_official_build",
]
}
if (is_chrome_branded) {
# We do not release a 64 bits binary. So to avoid any potential
# misunderstanding, we only build 32 bits MSI file.
if (!is_component_build && target_cpu == "x86") {
# The script uses "ia32" instead of "x86".
msi_script_arch = "ia32"
action("remoting_host_installation") {
deps = [
"//remoting/host:remoting_me2me_host_archive",
]
script = "//remoting/tools/zip2msi.py"
outputs = [
"$root_out_dir/chromoting.msi",
]
args = [
"--wix_path",
rebase_path("//third_party/wix"),
"--intermediate_dir",
rebase_path("$root_gen_dir/remoting_installation", root_build_dir),
"--target_arch",
msi_script_arch,
rebase_path("$root_out_dir/remoting-me2me-host-$current_os.zip",
root_build_dir),
rebase_path(outputs[0], root_build_dir),
]
}
}
} else {
group("remoting_host_installation") {
}
}
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//remoting/build/config/remoting_build.gni")
# TODO(brettw) these should not be generated via exec_script. This should be
# part of the build process rather than the metabuild. Instead, a script
# should generate a header containing the #defines for this as well as the
# IDL file with the values.
clsids = exec_script("//remoting/host/win/get_clsids.py",
[
daemon_controller_guid,
rdp_desktop_session_guid,
chrome_version_full,
],
"value")
daemon_controller_clsid = clsids[0]
rdp_desktop_session_clsid = clsids[1]
...@@ -79,9 +79,9 @@ if (!is_chromeos && !is_android && enable_remoting_host) { ...@@ -79,9 +79,9 @@ if (!is_chromeos && !is_android && enable_remoting_host) {
deps = [ deps = [
"//base/allocator", "//base/allocator",
"//remoting/host:dpi_aware_exe_manifest", "//remoting/host/win:dpi_aware_exe_manifest",
"//remoting/host:remoting_core", "//remoting/host/win:remoting_core",
"//remoting/host:remoting_windows_resources", "//remoting/host/win:remoting_windows_resources",
] ]
sources = [ sources = [
...@@ -105,8 +105,8 @@ if (!is_chromeos && !is_android && enable_remoting_host) { ...@@ -105,8 +105,8 @@ if (!is_chromeos && !is_android && enable_remoting_host) {
deps = [ deps = [
"//base/allocator", "//base/allocator",
"//remoting/host:remoting_core", "//remoting/host/win:remoting_core",
"//remoting/host:remoting_windows_resources", "//remoting/host/win:remoting_windows_resources",
] ]
sources = [ sources = [
...@@ -127,7 +127,7 @@ if (!is_chromeos && !is_android && enable_remoting_host) { ...@@ -127,7 +127,7 @@ if (!is_chromeos && !is_android && enable_remoting_host) {
if (is_official_build) { if (is_official_build) {
deps += [ "//remoting/host:dpi_aware_uiaccess_exe_manifest" ] deps += [ "//remoting/host:dpi_aware_uiaccess_exe_manifest" ]
} else { } else {
deps += [ "//remoting/host:dpi_aware_exe_manifest" ] deps += [ "//remoting/host/win:dpi_aware_exe_manifest" ]
} }
} }
} else { } else {
......
...@@ -62,8 +62,8 @@ if (is_win) { ...@@ -62,8 +62,8 @@ if (is_win) {
deps = [ deps = [
"//build/win:default_exe_manifest", "//build/win:default_exe_manifest",
"//remoting/host:remoting_core", "//remoting/host/win:remoting_core",
"//remoting/host:remoting_windows_resources", "//remoting/host/win:remoting_windows_resources",
] ]
sources = [ sources = [
......
...@@ -44,6 +44,6 @@ source_set("setup") { ...@@ -44,6 +44,6 @@ source_set("setup") {
] ]
if (is_win) { if (is_win) {
deps += [ "//remoting/host:remoting_lib_idl" ] deps += [ "//remoting/host/win:remoting_lib_idl" ]
} }
} }
This diff is collapsed.
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "base/win/scoped_com_initializer.h" #include "base/win/scoped_com_initializer.h"
// chromoting_lib.h contains MIDL-generated declarations. // chromoting_lib.h contains MIDL-generated declarations.
#include "remoting/host/chromoting_lib.h" #include "remoting/host/win/chromoting_lib.h"
namespace base { namespace base {
namespace win { namespace win {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "base/win/scoped_comptr.h" #include "base/win/scoped_comptr.h"
// chromoting_lib.h contains MIDL-generated declarations. // chromoting_lib.h contains MIDL-generated declarations.
#include "remoting/host/chromoting_lib.h" #include "remoting/host/win/chromoting_lib.h"
#include "remoting/host/win/rdp_client.h" #include "remoting/host/win/rdp_client.h"
namespace remoting { namespace remoting {
......
...@@ -185,6 +185,8 @@ if (enable_remoting_host && !is_android && !is_chromeos) { ...@@ -185,6 +185,8 @@ if (enable_remoting_host && !is_android && !is_chromeos) {
executable("it2me_standalone_host_main") { executable("it2me_standalone_host_main") {
testonly = true testonly = true
defines = []
libs = []
sources = [ sources = [
"it2me_standalone_host_main.cc", "it2me_standalone_host_main.cc",
...@@ -198,6 +200,15 @@ if (enable_remoting_host && !is_android && !is_chromeos) { ...@@ -198,6 +200,15 @@ if (enable_remoting_host && !is_android && !is_chromeos) {
if (is_desktop_linux) { if (is_desktop_linux) {
deps += [ "//build/config/linux/gtk2" ] deps += [ "//build/config/linux/gtk2" ]
} }
if (is_win) {
defines += [ "_ALT_NO_EXCEPTIONS" ]
libs += [
"rpcrt4.lib",
"wtsapi32.lib",
]
}
} }
} }
......
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//remoting/build/config/remoting_build.gni")
group("all_tests") {
testonly = true
}
group("all") {
testonly = true
deps = []
if (is_win) {
deps += [ ":remoting_breakpad_tester" ]
}
if (enable_nacl) {
deps += [ "//remoting/tools/javascript_key_tester" ]
}
}
if (is_win) {
executable("remoting_breakpad_tester") {
deps = [
"//base",
"//build/win:default_exe_manifest",
"//remoting/host",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
sources = [
"breakpad_tester_win.cc",
]
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment