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
3 # found in the LICENSE file.
7 'remoting_host_installer_win_roots': [
10 'remoting_host_installer_win_files': [
11 'host/installer/win/chromoting.wxs',
12 'host/installer/win/parameters.json',
14 }, # end of 'variables'
18 'target_name': 'remoting_breakpad_tester',
20 'variables': { 'enable_wexit_time_destructors': 1, },
22 '../base/base.gyp:base',
26 'tools/breakpad_tester_win.cc',
28 }, # end of target 'remoting_breakpad_tester'
30 # GN version: //remoting/host:remoting_lib_idl
31 'target_name': 'remoting_lib_idl',
32 'type': 'static_library',
34 'clang_warning_flags': [
35 # MIDL generates code like "#endif !_MIDL_USE_GUIDDEF_"
40 'host/win/chromoting_lib_idl.templ',
41 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
42 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
43 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
45 # This target exports a hard dependency because dependent targets may
46 # include chromoting_lib.h, a generated header.
50 'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
53 'direct_dependent_settings': {
55 '<(SHARED_INTERMEDIATE_DIR)',
60 # GN version: //remoting/host:generate_idl
61 'rule_name': 'generate_idl',
64 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
67 'python', '<(version_py_path)',
68 '-e', "DAEMON_CONTROLLER_CLSID='<(daemon_controller_clsid)'",
69 '-e', "RDP_DESKTOP_SESSION_CLSID='<(rdp_desktop_session_clsid)'",
73 'process_outputs_as_sources': 1,
74 'message': 'Generating <@(_outputs)',
77 }, # end of target 'remoting_lib_idl'
79 # remoting_lib_ps builds the proxy/stub code generated by MIDL (see
82 'target_name': 'remoting_lib_ps',
83 'type': 'static_library',
85 # Prepend 'Ps' to the MIDL-generated routines. This includes
86 # DllGetClassObject, DllCanUnloadNow, DllRegisterServer,
87 # DllUnregisterServer, and DllMain.
95 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.dlldata.c',
96 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_p.c',
99 'clang_warning_flags': [
100 # MIDL generated code has a habit of omitting optional braces.
101 '-Wno-missing-braces',
102 # Source files generated by the MIDL compiler trigger warnings with
103 # -Wincompatible-pointer-types enabled.
104 '-Wno-incompatible-pointer-types',
105 # Generated code contains unused variables.
106 '-Wno-unused-variable',
109 }, # end of target 'remoting_lib_ps'
111 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
112 # into remoting_core.dll's resources) every time
113 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
114 # both this and 'remoting_lib_idl' targets ensures that the resorces
115 # are rebuilt every time the type library is updated. GYP alone is
116 # not smart enough to figure out this dependency on its own.
118 'target_name': 'remoting_lib_rc',
121 'host/win/chromoting_lib_idl.templ',
123 'hard_dependency': 1,
124 'direct_dependent_settings': {
126 '<(SHARED_INTERMEDIATE_DIR)',
131 'rule_name': 'generate_rc',
132 'extension': 'templ',
134 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
137 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
139 'message': 'Generating <@(_outputs)',
142 }, # end of target 'remoting_lib_rc'
143 # The only difference between |remoting_console.exe| and
144 # |remoting_host.exe| is that the former is a console application.
145 # |remoting_console.exe| is used for debugging purposes.
147 'target_name': 'remoting_console',
148 'type': 'executable',
149 'variables': { 'enable_wexit_time_destructors': 1, },
151 'BINARY=BINARY_HOST_ME2ME',
155 'remoting_windows_resources',
158 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
159 'host/win/entry_point.cc',
163 'AdditionalManifestFiles': [
164 'host/win/dpi_aware.manifest',
168 'EntryPointSymbol': 'HostEntryPoint',
169 'IgnoreAllDefaultLibraries': 'true',
170 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
173 }, # end of target 'remoting_console'
175 'target_name': 'remoting_core',
176 'type': 'shared_library',
177 'variables': { 'enable_wexit_time_destructors': 1, },
179 '_ATL_APARTMENT_THREADED',
180 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
181 '_ATL_NO_AUTOMATIC_NAMESPACE',
182 '_ATL_NO_EXCEPTIONS',
183 'BINARY=BINARY_CORE',
184 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
185 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
186 'HOST_IMPLEMENTATION',
187 'ISOLATION_AWARE_ENABLED=1',
189 'VERSION=<(version_full)',
192 '../base/base.gyp:base',
193 '../base/base.gyp:base_static',
194 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
195 '../ipc/ipc.gyp:ipc',
196 '../net/net.gyp:net',
197 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
201 'remoting_host_setup_base',
202 'remoting_it2me_host_static',
206 'remoting_me2me_host_static',
207 'remoting_native_messaging_base',
209 'remoting_windows_resources',
212 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
213 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
214 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
215 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
216 'host/desktop_process_main.cc',
219 'host/it2me/it2me_native_messaging_host_main.cc',
220 'host/it2me/it2me_native_messaging_host_main.h',
221 'host/setup/me2me_native_messaging_host_main.cc',
222 'host/setup/me2me_native_messaging_host_main.h',
223 'host/win/chromoting_module.cc',
224 'host/win/chromoting_module.h',
226 'host/win/core_resource.h',
227 'host/win/host_service.cc',
228 'host/win/host_service.h',
231 'host/win/rdp_desktop_session.cc',
232 'host/win/rdp_desktop_session.h',
233 'host/win/unprivileged_process_delegate.cc',
234 'host/win/unprivileged_process_delegate.h',
235 'host/win/wts_session_process_delegate.cc',
236 'host/win/wts_session_process_delegate.h',
237 'host/worker_process_ipc_delegate.h',
241 'EmbedManifest': 'true',
242 'AdditionalManifestFiles': [
243 'host/win/common-controls.manifest',
247 'AdditionalDependencies': [
254 'AdditionalOptions': [
255 # Export the proxy/stub entry points. Note that the generated
256 # routines have 'Ps' prefix to avoid conflicts with our own
258 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
259 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
260 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
261 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
266 # atlapp.h contains a global "using namespace WTL;".
267 # TODO: Remove once remoting/host/verify_config_window_win.h no
268 # longer depends on atlapp.h, http://crbug.com/5027
269 'VCCLCompilerTool': {
270 'AdditionalOptions': ['-Wno-header-hygiene'],
275 }, # end of target 'remoting_core'
277 'target_name': 'remoting_desktop',
278 'type': 'executable',
279 'variables': { 'enable_wexit_time_destructors': 1, },
281 'BINARY=BINARY_DESKTOP',
285 'remoting_windows_resources',
288 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
289 'host/win/entry_point.cc',
293 'AdditionalManifestFiles': [
294 'host/win/dpi_aware.manifest',
299 # Add 'level="requireAdministrator" uiAccess="true"' to
300 # the manifest only for the official builds because it requires
301 # the binary to be signed to work.
303 ['buildtype == "Official"', {
304 'UACExecutionLevel': 2,
305 'UACUIAccess': 'true',
308 'EntryPointSymbol': 'HostEntryPoint',
309 'IgnoreAllDefaultLibraries': 'true',
310 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
313 }, # end of target 'remoting_desktop'
315 'target_name': 'remoting_me2me_host',
316 'product_name': 'remoting_host',
317 'type': 'executable',
318 'variables': { 'enable_wexit_time_destructors': 1, },
320 'BINARY=BINARY_HOST_ME2ME',
324 'remoting_windows_resources',
327 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
328 'host/win/entry_point.cc',
332 'AdditionalManifestFiles': [
333 'host/win/dpi_aware.manifest',
337 'EntryPointSymbol': 'HostEntryPoint',
338 'IgnoreAllDefaultLibraries': 'true',
339 'OutputFile': '$(OutDir)\\remoting_host.exe',
340 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
343 }, # end of target 'remoting_me2me_host'
345 'target_name': 'remoting_me2me_native_messaging_host',
346 'type': 'executable',
347 'product_name': 'remoting_native_messaging_host',
348 'variables': { 'enable_wexit_time_destructors': 1, },
350 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
354 'remoting_windows_resources',
357 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
358 'host/setup/me2me_native_messaging_host_entry_point.cc',
362 'IgnoreAllDefaultLibraries': 'true',
363 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
366 }, # end of target 'remoting_me2me_native_messaging_host'
368 'target_name': 'remoting_it2me_native_messaging_host',
369 'type': 'executable',
370 'product_name': 'remote_assistance_host',
371 'variables': { 'enable_wexit_time_destructors': 1, },
374 'remoting_windows_resources',
377 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
378 'host/it2me/it2me_native_messaging_host_entry_point.cc',
381 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
385 'EmbedManifest': 'true',
386 'AdditionalManifestFiles': [
387 'host/win/common-controls.manifest',
388 'host/win/dpi_aware.manifest',
392 'IgnoreAllDefaultLibraries': 'true',
393 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
394 'AdditionalDependencies': [
399 }, # end of target 'remoting_it2me_native_messaging_host'
401 # GN version: //remoting/host:messages
402 'target_name': 'remoting_host_messages',
405 'remoting_resources',
407 'hard_dependency': 1,
408 'direct_dependent_settings': {
410 '<(SHARED_INTERMEDIATE_DIR)',
414 'host/win/host_messages.mc.jinja2'
418 'rule_name': 'localize',
419 'extension': 'jinja2',
421 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
424 'python', '<(remoting_localize_path)',
425 '--locale_dir', '<(webapp_locale_dir)',
426 '--template', '<(RULE_INPUT_PATH)',
427 '--output', '<@(_outputs)',
428 '--encoding', 'utf-16',
429 '<@(remoting_locales)',
431 'message': 'Localizing the event log messages'
434 }, # end of target 'remoting_host_messages'
436 # Generates localized resources for the Windows binaries.
437 # The substitution strings are taken from:
438 # - build/util/LASTCHANGE - the last source code revision. There is
439 # no explicit dependency on this file to avoid rebuilding the host
440 # after unrelated changes.
441 # - chrome/VERSION - the major, build & patch versions.
442 # - remoting/VERSION - the chromoting patch version (and overrides
443 # for chrome/VERSION).
444 # - translated webapp strings
446 'target_name': 'remoting_windows_resources',
449 'remoting_resources',
451 'hard_dependency': 1,
452 'direct_dependent_settings': {
454 '<(SHARED_INTERMEDIATE_DIR)',
458 'host/win/core.rc.jinja2',
459 'host/win/version.rc.jinja2',
463 'rule_name': 'version',
464 'extension': 'jinja2',
466 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
469 '<(chrome_version_path)',
470 '<(remoting_version_path)',
473 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
476 'python', '<(remoting_localize_path)',
477 '--variables', '<(chrome_version_path)',
478 # |remoting_version_path| must be after |chrome_version_path|
479 # because it can contain overrides for the version numbers.
480 '--variables', '<(remoting_version_path)',
481 '--variables', '<(lastchange_path)',
482 '--locale_dir', '<(webapp_locale_dir)',
483 '--template', '<(RULE_INPUT_PATH)',
484 '--output', '<@(_outputs)',
485 '--encoding', 'utf-16',
486 '<@(remoting_locales)',
488 'message': 'Localizing the version information'
491 }, # end of target 'remoting_windows_resources'
492 ], # end of 'targets'
495 # The host installation is generated only if WiX is available. If
496 # component build is used the produced installation will not work due to
497 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
499 ['wix_exists == "True" and sas_dll_exists == "True"', {
502 'target_name': 'remoting_host_installation',
505 'remoting_me2me_host_archive',
508 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
511 '<(PRODUCT_DIR)/chromoting.msi',
515 'rule_name': 'zip2msi',
521 '<(PRODUCT_DIR)/chromoting.msi',
524 'python', 'tools/zip2msi.py',
525 '--wix_path', '<(wix_path)',
526 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
527 '--target_arch', '<(target_arch)',
528 '<(RULE_INPUT_PATH)',
531 'message': 'Generating <@(_outputs)',
534 }, # end of target 'remoting_host_installation'
537 'target_name': 'remoting_me2me_host_archive',
540 '<(icu_gyp_path):icudata',
543 'remoting_it2me_native_messaging_host',
544 'remoting_me2me_host',
545 'remoting_me2me_native_messaging_host',
546 'remoting_native_messaging_manifests',
549 '<(PRODUCT_DIR)/remote_assistance_host.exe',
550 '<(PRODUCT_DIR)/remoting_core.dll',
551 '<(PRODUCT_DIR)/remoting_desktop.exe',
552 '<(PRODUCT_DIR)/remoting_host.exe',
553 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
555 'compiled_inputs_dst': [
556 'files/remote_assistance_host.exe',
557 'files/remoting_core.dll',
558 'files/remoting_desktop.exe',
559 'files/remoting_host.exe',
560 'files/remoting_native_messaging_host.exe',
563 ['buildtype == "Official"', {
567 }, { # else buildtype != "Official"
574 'BRANDING=<(branding)',
575 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
576 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
577 'VERSION=<(version_full)',
580 '<@(_compiled_inputs)',
581 '<(sas_dll_path)/sas.dll',
582 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
583 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
584 'resources/chromoting.ico',
585 '<(PRODUCT_DIR)/icudtl.dat',
587 'generated_files_dst': [
588 '<@(_compiled_inputs_dst)',
590 'files/com.google.chrome.remote_assistance.json',
591 'files/com.google.chrome.remote_desktop.json',
592 'files/chromoting.ico',
595 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
601 'action_name': 'Zip installer files for signing',
602 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
604 '<@(remoting_host_installer_win_files)',
607 '<@(_compiled_inputs)',
608 '<(sas_dll_path)/sas.dll',
610 'host/installer/build-installer-archive.py',
611 'resources/chromoting.ico',
617 'python', 'host/installer/build-installer-archive.py',
620 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
621 '--source-files', '<@(_source_files)',
622 '--generated-files', '<@(_generated_files)',
623 '--generated-files-dst', '<@(_generated_files_dst)',
624 '--defs', '<@(_defs)',
628 }, # end of target 'remoting_me2me_host_archive'
629 ], # end of 'targets'
631 # Dummy targets for when Wix is not available.
634 'target_name': 'remoting_host_installation',
639 'target_name': 'remoting_me2me_host_archive',
642 ], # end of 'targets'
643 }], # 'wix_exists == "True" and sas_dll_exists == "True"'
645 ], # end of 'conditions'