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

Side by Side Diff: remoting/host/win/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
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//remoting/build/config/remoting_build.gni")
6 import("//build/toolchain/win/midl.gni")
7 import("//build/win/message_compiler.gni")
8
9 group("all") {
10 testonly = true
11
12 deps = [
13 ":remoting_console",
14 ":remoting_desktop",
15 ":remoting_me2me_host",
16 ":remoting_native_messaging_host",
17 "//remoting/host/security_key:remote_security_key",
18 ]
19 }
20
21 # Reference this manifest to indicate that a process is per-monitor DPI aware.
22 dpi_aware_manifest = "//remoting/host/win/dpi_aware.manifest"
23
24 # Reference this manifest to give the binary the uiAccess privilege.
25 enable_uiaccess_manifest = "//remoting/host/win/enable_uiaccess.manifest"
26
27 # Depending on this target gives a default executable manifest with the addition
28 # of the DPI aware tag.
29 windows_manifest("dpi_aware_exe_manifest") {
30 sources = [
31 as_invoker_manifest,
32 common_controls_manifest,
33 default_compatibility_manifest,
34 dpi_aware_manifest,
35 ]
36 type = "exe"
37 }
38
39 # Depending on this target gives a default executable manifest with the addition
40 # of the DPI aware tag and a requestedExecutionLevel of requireAdministrator.
41 windows_manifest("dpi_aware_elevated_exe_manifest") {
42 sources = [
43 common_controls_manifest,
44 default_compatibility_manifest,
45 dpi_aware_manifest,
46 require_administrator_manifest,
47 ]
48 type = "exe"
49 }
50
51 # Depending on this target gives the executable a default manifest with the
52 # addition of the DPI aware tag and enables uiAccess.
53 windows_manifest("dpi_aware_uiaccess_exe_manifest") {
54 sources = [
55 common_controls_manifest,
56 default_compatibility_manifest,
57 dpi_aware_manifest,
58 enable_uiaccess_manifest,
59 ]
60 type = "exe"
61 }
62
63 source_set("win") {
64 sources = [
65 "com_imported_mstscax.tlh",
66 "com_security.cc",
67 "com_security.h",
68 "elevation_helpers.cc",
69 "elevation_helpers.h",
70 "launch_process_with_token.cc",
71 "launch_process_with_token.h",
72 "omaha.cc",
73 "omaha.h",
74 "rdp_client.cc",
75 "rdp_client.h",
76 "rdp_client_window.cc",
77 "rdp_client_window.h",
78 "security_descriptor.cc",
79 "security_descriptor.h",
80 "session_desktop_environment.cc",
81 "session_desktop_environment.h",
82 "session_input_injector.cc",
83 "session_input_injector.h",
84 "window_station_and_desktop.cc",
85 "window_station_and_desktop.h",
86 "worker_process_launcher.cc",
87 "worker_process_launcher.h",
88 "wts_terminal_monitor.cc",
89 "wts_terminal_monitor.h",
90 "wts_terminal_observer.h",
91 ]
92
93 configs += [
94 "//build/config/compiler:wexit_time_destructors",
95 "//remoting/build/config:version",
96 ]
97
98 defines = [ "WEBRTC_CHROMIUM_BUILD" ]
99
100 deps = [
101 "//base:i18n",
102 "//components/policy/core/common",
103 "//content/public/common",
104 "//crypto",
105 "//device/power_save_blocker",
106 "//google_apis",
107 "//ipc",
108 "//remoting/base",
109 "//remoting/host/security_key",
110 "//remoting/host/win:messages",
111 "//remoting/host/win:remoting_lib_idl",
112 "//remoting/protocol",
113 "//remoting/resources",
114 "//ui/base",
115 "//ui/events:dom_keycode_converter",
116 "//ui/events/platform",
117 ]
118
119 if (enable_configuration_policy) {
120 deps += [ "//components/policy:generated" ]
121 }
122
123 if (enable_webrtc) {
124 deps += [ "//third_party/webrtc/modules/desktop_capture" ]
125 }
126 }
127
128 source_set("unit_tests") {
129 testonly = true
130
131 sources = [
132 "elevated_native_messaging_host.cc",
133 "elevated_native_messaging_host.h",
134 "launch_native_messaging_host_process.cc",
135 "launch_native_messaging_host_process.h",
136 "rdp_client_unittest.cc",
137 "worker_process_launcher_unittest.cc",
138 ]
139
140 deps = [
141 "//remoting/host",
142 "//remoting/host:test_support",
143 "//remoting/host/it2me:common",
144 "//remoting/host/native_messaging",
145 "//remoting/host/security_key:unit_tests",
146 "//remoting/host/setup",
147 "//remoting/proto",
148 "//remoting/resources",
149 "//skia",
150 "//testing/gmock",
151 "//testing/gtest",
152 ]
153 }
154
155 # TODO(brettw) these should not be generated via exec_script. This should be
156 # part of the build process rather than the metabuild. Instead, a script
157 # should generate a header containing the #defines for this as well as the
158 # IDL file with the values.
159 clsids = exec_script("get_clsids.py",
160 [
161 daemon_controller_guid,
162 rdp_desktop_session_guid,
163 chrome_version_full,
164 ],
165 "value")
166 daemon_controller_clsid = clsids[0]
167 rdp_desktop_session_clsid = clsids[1]
168
169 action("generate_idl") {
170 script = "//build/util/version.py"
171
172 inputs = [
173 "chromoting_lib_idl.templ",
174 ]
175 outputs = [
176 "$target_gen_dir/chromoting_lib.idl",
177 ]
178
179 args = [
180 "-e",
181 "DAEMON_CONTROLLER_CLSID='$daemon_controller_clsid'",
182 "-e",
183 "RDP_DESKTOP_SESSION_CLSID='$rdp_desktop_session_clsid'",
184 rebase_path(inputs[0], root_build_dir),
185 rebase_path(outputs[0], root_build_dir),
186 ]
187 }
188
189 midl("remoting_lib_idl") {
190 sources = get_target_outputs(":generate_idl")
191 deps = [
192 ":generate_idl",
193 ]
194 }
195
196 config("MIDL_config") {
197 if (is_clang) {
198 cflags = [
199 # MIDL generated code has a habit of omitting optional braces.
200 "-Wno-missing-braces",
201
202 # Source files generated by the MIDL compiler trigger warnings with
203 # -Wincompatible-pointer-types enabled.
204 "-Wno-incompatible-pointer-types",
205
206 # Generated code contains unused variables.
207 "-Wno-unused-variable",
208
209 # PROXYFILE_LIST_START is an extern with initializer.
210 "-Wno-extern-initializer",
211 ]
212 }
213 }
214
215 static_library("remoting_lib_ps") {
216 configs += [ ":MIDL_config" ]
217
218 defines = [
219 "ENTRY_PREFIX=Ps",
220 "REGISTER_PROXY_DLL",
221 ]
222
223 deps = [
224 ":remoting_lib_idl",
225 ]
226
227 sources = [
228 "$root_gen_dir/remoting/host/win/chromoting_lib.dlldata.c",
229 "$root_gen_dir/remoting/host/win/chromoting_lib_p.c",
230 ]
231 }
232
233 # Makes the .mc file from the .mc.jinja file.
234 remoting_localize("messages_localizing") {
235 sources = [
236 "host_messages.mc.jinja2",
237 ]
238 locales = remoting_locales
239 locale_dir = webapp_locale_dir
240 encoding = "utf-16"
241
242 # This target is funny. It only produces one file and the output doesn't
243 # match the input. We want to generate remoting_host_messages.mc from
244 # host_messages.mg.jinja2. GN complains if it doesn't see a pattern in the
245 # output, so the following pattern produces the name we want with a template
246 # based on the input.
247 #
248 # TODO: This is for GYP compat. We should just make the names match instead.
249 output = "$target_gen_dir/remoting_{{source_name_part}}"
250 }
251
252 # Makes the .h/.rc files from the .mc file.
253 message_compiler("messages") {
254 compile_generated_code = false
255 sources = get_target_outputs(":messages_localizing")
256 deps = [
257 ":messages_localizing",
258 ]
259 }
260
261 executable("remoting_console") {
262 configs += [ "//build/config/compiler:wexit_time_destructors" ]
263
264 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
265
266 deps = [
267 ":dpi_aware_exe_manifest",
268 ":remoting_core",
269 ":remoting_windows_resources",
270 ]
271
272 sources = [
273 "$root_gen_dir/remoting/version.rc",
274 "entry_point.cc",
275 ]
276
277 ldflags = [
278 "/ENTRY:HostEntryPoint",
279 # "/NODEFAULTLIB",
joedow 2016/09/12 18:58:43 Was this comment from the copy/paste or something
nicholss 2016/09/12 19:56:32 This was how the target was when I moved it. I am
Hzj_jie 2016/09/12 22:32:10 The comment is in it2me/BUILD.gn. TODO(zijiehe): W
280 ]
281 }
282
283 executable("remoting_me2me_host") {
284 configs += [
285 "//build/config/compiler:wexit_time_destructors",
286 "//build/config/win:windowed",
287 "//remoting/build/config:remoting_me2me_host",
288 ]
289
290 defines = host_predefines + [ "BINARY=BINARY_HOST_ME2ME" ]
291
292 deps = [
293 ":dpi_aware_exe_manifest",
294 ":remoting_core",
295 ":remoting_windows_resources",
296 ]
297
298 sources = [
299 "$root_gen_dir/remoting/version.rc",
300 "entry_point.cc",
301 ]
302
303 output_name = "remoting_host"
304
305 ldflags = [ "/ENTRY:HostEntryPoint" ]
306 }
307
308 shared_library("remoting_core") {
309 configs += [ "//build/config/compiler:wexit_time_destructors" ]
310
311 defines = host_predefines + [
312 "_ATL_APARTMENT_THREADED",
313 "_ATL_CSTRING_EXPLICIT_CONSTRUCTORS",
314 "_ATL_NO_AUTOMATIC_NAMESPACE",
315 "_ATL_NO_EXCEPTIONS",
316 "BINARY=BINARY_CORE",
317 "DAEMON_CONTROLLER_CLSID=\"$daemon_controller_clsid\"",
318 "RDP_DESKTOP_SESSION_CLSID=\"$rdp_desktop_session_clsid\"",
319 "HOST_IMPLEMENTATION",
320 "ISOLATION_AWARE_ENABLED=1",
321 "STRICT",
322 "VERSION=$chrome_version_full",
323 ]
324
325 if (remoting_multi_process != 0 && remoting_rdp_session != 0) {
326 defines += [ "REMOTING_RDP_SESSION" ]
327 }
328
329 if (remoting_multi_process != 0) {
330 defines += [ "REMOTING_MULTI_PROCESS" ]
331 }
332
333 sources = [
334 "$root_gen_dir/remoting/core.rc",
335 "$root_gen_dir/remoting/host/win/remoting_host_messages.rc",
336 "$root_gen_dir/remoting/version.rc",
337 "//remoting/host/desktop_process_main.cc",
338 "//remoting/host/host_main.cc",
339 "//remoting/host/host_main.h",
340 "//remoting/host/it2me/it2me_native_messaging_host_main.cc",
341 "//remoting/host/it2me/it2me_native_messaging_host_main.h",
342 "//remoting/host/setup/host_starter.cc",
343 "//remoting/host/setup/host_starter.h",
344 "//remoting/host/setup/me2me_native_messaging_host_main.cc",
345 "//remoting/host/setup/me2me_native_messaging_host_main.h",
346 "//remoting/host/setup/start_host_main.cc",
347 "//remoting/host/setup/start_host_main.h",
348 "//remoting/host/worker_process_ipc_delegate.h",
349 "chromoting_lib.rc",
350 "chromoting_module.cc",
351 "chromoting_module.h",
352 "core.cc",
353 "core_resource.h",
354 "elevated_native_messaging_host.cc",
355 "elevated_native_messaging_host.h",
356 "host_service.cc",
357 "host_service.h",
358 "launch_native_messaging_host_process.cc",
359 "launch_native_messaging_host_process.h",
360 "rdp_desktop_session.cc",
361 "rdp_desktop_session.h",
362 "unprivileged_process_delegate.cc",
363 "unprivileged_process_delegate.h",
364 "wts_session_process_delegate.cc",
365 "wts_session_process_delegate.h",
366 ]
367
368 deps = [
369 ":messages",
370 ":remoting_lib_idl",
371 ":remoting_lib_ps",
372 ":remoting_windows_resources",
373 ":win",
374 "//base",
375 "//base:base_static",
376 "//base/allocator",
377 "//base/third_party/dynamic_annotations",
378 "//build/win:default_exe_manifest",
379 "//ipc",
380 "//net",
381 "//remoting/base",
382 "//remoting/base:breakpad",
383 "//remoting/codec",
384 "//remoting/host:host",
385 "//remoting/host:remoting_me2me_host_static",
386 "//remoting/host/it2me:common",
387 "//remoting/host/native_messaging",
388 "//remoting/host/security_key:main",
389 "//remoting/host/setup",
390 "//remoting/protocol",
391 "//sandbox/win:sandbox", # Should always use Windows version
392 "//third_party/webrtc/modules/desktop_capture",
393 ]
394
395 ldflags = [
396 "/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE",
397 "/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE",
398 "/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE",
399 "/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE",
400 ]
401
402 libs = [
403 "comctl32.lib",
404 "rpcns4.lib",
405 "rpcrt4.lib",
406 "sas.lib",
407 "uuid.lib",
408 "wtsapi32.lib",
409 ]
410
411 if (is_clang) {
412 cflags = [ "-Wno-header-hygiene" ]
413 }
414 }
415
416 executable("remoting_desktop") {
417 configs += [
418 "//build/config/compiler:wexit_time_destructors",
419 "//build/config/win:windowed",
420 ]
421
422 defines = host_predefines + [ "BINARY=BINARY_DESKTOP" ]
423
424 deps = [
425 ":remoting_core",
426 ":remoting_windows_resources",
427 ]
428
429 if (is_official_build) {
430 deps += [ ":dpi_aware_elevated_exe_manifest" ]
431 } else {
432 deps += [ ":dpi_aware_exe_manifest" ]
433 }
434
435 sources = [
436 "$root_gen_dir/remoting/version.rc",
437 "entry_point.cc",
438 ]
439
440 ldflags = [
441 "/ENTRY:HostEntryPoint",
442 # "/NODEFAULTLIB",
443 ]
444 }
445
446 executable("remoting_native_messaging_host") {
447 configs += [ "//build/config/compiler:wexit_time_destructors" ]
448
449 defines = host_predefines + [ "BINARY=BINARY_NATIVE_MESSAGING_HOST" ]
450
451 deps = [
452 ":remoting_core",
453 ":remoting_windows_resources",
454 "//build/win:default_exe_manifest",
455 ]
456
457 sources = [
458 "$root_gen_dir/remoting/version.rc",
459 "../setup/me2me_native_messaging_host_entry_point.cc",
460 ]
461 }
462
463 remoting_localize("remoting_windows_resources") {
464 deps = [
465 "//remoting/resources",
466 ]
467
468 sources = [
469 "core.rc.jinja2",
470 "version.rc.jinja2",
471 ]
472
473 # TODO(zijiehe): Export lastchange_path from
474 # //chrome/version.gni:process_version
475 variables = [
476 rebase_path(chrome_version_file),
477 rebase_path(remoting_version_file),
478 rebase_path("//build/util/LASTCHANGE"),
479 ]
480
481 output = "$root_gen_dir/remoting/{{source_name_part}}"
482
483 locale_dir = webapp_locale_dir
484
485 encoding = "utf-16"
486
487 locales = remoting_locales
488 }
489 # TODO(GYP) More Windows remoting targets from remoting_host_win.gypi
joedow 2016/09/12 18:58:43 Is this comment still accurate? I thought remoting
nicholss 2016/09/12 19:56:32 Acknowledged.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698