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 'host/win/chromoting_lib_idl.templ',
35 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
36 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
37 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
39 # This target exports a hard dependency because dependent targets may
40 # include chromoting_lib.h, a generated header.
44 'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
47 'direct_dependent_settings': {
49 '<(SHARED_INTERMEDIATE_DIR)',
54 # GN version: //remoting/host:generate_idl
55 'rule_name': 'generate_idl',
58 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
61 'python', '<(version_py_path)',
62 '-e', "DAEMON_CONTROLLER_CLSID='<(daemon_controller_clsid)'",
63 '-e', "RDP_DESKTOP_SESSION_CLSID='<(rdp_desktop_session_clsid)'",
67 'process_outputs_as_sources': 1,
68 'message': 'Generating <@(_outputs)',
71 }, # end of target 'remoting_lib_idl'
73 # remoting_lib_ps builds the proxy/stub code generated by MIDL (see
76 'target_name': 'remoting_lib_ps',
77 'type': 'static_library',
79 # Prepend 'Ps' to the MIDL-generated routines. This includes
80 # DllGetClassObject, DllCanUnloadNow, DllRegisterServer,
81 # DllUnregisterServer, and DllMain.
89 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.dlldata.c',
90 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_p.c',
93 'clang_warning_flags': [
94 # MIDL generated code has a habit of omitting optional braces.
95 '-Wno-missing-braces',
96 # Source files generated by the MIDL compiler trigger warnings with
97 # -Wincompatible-pointer-types enabled.
98 '-Wno-incompatible-pointer-types',
101 }, # end of target 'remoting_lib_ps'
103 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
104 # into remoting_core.dll's resources) every time
105 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
106 # both this and 'remoting_lib_idl' targets ensures that the resorces
107 # are rebuilt every time the type library is updated. GYP alone is
108 # not smart enough to figure out this dependency on its own.
110 'target_name': 'remoting_lib_rc',
113 'host/win/chromoting_lib_idl.templ',
115 'hard_dependency': 1,
116 'direct_dependent_settings': {
118 '<(SHARED_INTERMEDIATE_DIR)',
123 'rule_name': 'generate_rc',
124 'extension': 'templ',
126 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
129 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
131 'message': 'Generating <@(_outputs)',
134 }, # end of target 'remoting_lib_rc'
135 # The only difference between |remoting_console.exe| and
136 # |remoting_host.exe| is that the former is a console application.
137 # |remoting_console.exe| is used for debugging purposes.
139 'target_name': 'remoting_console',
140 'type': 'executable',
141 'variables': { 'enable_wexit_time_destructors': 1, },
143 'BINARY=BINARY_HOST_ME2ME',
147 'remoting_windows_resources',
150 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
151 'host/win/entry_point.cc',
155 'AdditionalManifestFiles': [
156 'host/win/dpi_aware.manifest',
160 'EntryPointSymbol': 'HostEntryPoint',
161 'IgnoreAllDefaultLibraries': 'true',
162 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
165 }, # end of target 'remoting_console'
167 'target_name': 'remoting_core',
168 'type': 'shared_library',
169 'variables': { 'enable_wexit_time_destructors': 1, },
171 '_ATL_APARTMENT_THREADED',
172 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
173 '_ATL_NO_AUTOMATIC_NAMESPACE',
174 '_ATL_NO_EXCEPTIONS',
175 'BINARY=BINARY_CORE',
176 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
177 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
178 'HOST_IMPLEMENTATION',
179 'ISOLATION_AWARE_ENABLED=1',
181 'VERSION=<(version_full)',
184 '../base/base.gyp:base',
185 '../base/base.gyp:base_static',
186 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
187 '../ipc/ipc.gyp:ipc',
188 '../net/net.gyp:net',
189 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
193 'remoting_host_setup_base',
194 'remoting_it2me_host_static',
198 'remoting_me2me_host_static',
199 'remoting_native_messaging_base',
201 'remoting_windows_resources',
204 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
205 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
206 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
207 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
208 'host/desktop_process_main.cc',
211 'host/it2me/it2me_native_messaging_host_main.cc',
212 'host/it2me/it2me_native_messaging_host_main.h',
213 'host/setup/me2me_native_messaging_host_main.cc',
214 'host/setup/me2me_native_messaging_host_main.h',
215 'host/win/chromoting_module.cc',
216 'host/win/chromoting_module.h',
218 'host/win/core_resource.h',
219 'host/win/host_service.cc',
220 'host/win/host_service.h',
223 'host/win/rdp_desktop_session.cc',
224 'host/win/rdp_desktop_session.h',
225 'host/win/unprivileged_process_delegate.cc',
226 'host/win/unprivileged_process_delegate.h',
227 'host/win/worker_process_launcher.cc',
228 'host/win/worker_process_launcher.h',
229 'host/win/wts_session_process_delegate.cc',
230 'host/win/wts_session_process_delegate.h',
231 'host/worker_process_ipc_delegate.h',
235 'EmbedManifest': 'true',
236 'AdditionalManifestFiles': [
237 'host/win/common-controls.manifest',
241 'AdditionalDependencies': [
248 'AdditionalOptions': [
249 # Export the proxy/stub entry points. Note that the generated
250 # routines have 'Ps' prefix to avoid conflicts with our own
252 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
253 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
254 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
255 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
260 # atlapp.h contains a global "using namespace WTL;".
261 # TODO: Remove once remoting/host/verify_config_window_win.h no
262 # longer depends on atlapp.h, http://crbug.com/5027
263 'VCCLCompilerTool': {
264 'AdditionalOptions': ['-Wno-header-hygiene'],
269 }, # end of target 'remoting_core'
271 'target_name': 'remoting_desktop',
272 'type': 'executable',
273 'variables': { 'enable_wexit_time_destructors': 1, },
275 'BINARY=BINARY_DESKTOP',
279 'remoting_windows_resources',
282 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
283 'host/win/entry_point.cc',
287 'AdditionalManifestFiles': [
288 'host/win/dpi_aware.manifest',
293 # Add 'level="requireAdministrator" uiAccess="true"' to
294 # the manifest only for the official builds because it requires
295 # the binary to be signed to work.
297 ['buildtype == "Official"', {
298 'UACExecutionLevel': 2,
299 'UACUIAccess': 'true',
302 'EntryPointSymbol': 'HostEntryPoint',
303 'IgnoreAllDefaultLibraries': 'true',
304 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
307 }, # end of target 'remoting_desktop'
309 'target_name': 'remoting_me2me_host',
310 'product_name': 'remoting_host',
311 'type': 'executable',
312 'variables': { 'enable_wexit_time_destructors': 1, },
314 'BINARY=BINARY_HOST_ME2ME',
318 'remoting_windows_resources',
321 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
322 'host/win/entry_point.cc',
326 'AdditionalManifestFiles': [
327 'host/win/dpi_aware.manifest',
331 'EntryPointSymbol': 'HostEntryPoint',
332 'IgnoreAllDefaultLibraries': 'true',
333 'OutputFile': '$(OutDir)\\remoting_host.exe',
334 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
337 }, # end of target 'remoting_me2me_host'
339 'target_name': 'remoting_me2me_native_messaging_host',
340 'type': 'executable',
341 'product_name': 'remoting_native_messaging_host',
342 'variables': { 'enable_wexit_time_destructors': 1, },
344 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
348 'remoting_windows_resources',
351 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
352 'host/setup/me2me_native_messaging_host_entry_point.cc',
356 'IgnoreAllDefaultLibraries': 'true',
357 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
360 }, # end of target 'remoting_me2me_native_messaging_host'
362 'target_name': 'remoting_it2me_native_messaging_host',
363 'type': 'executable',
364 'product_name': 'remote_assistance_host',
365 'variables': { 'enable_wexit_time_destructors': 1, },
368 'remoting_windows_resources',
371 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
372 'host/it2me/it2me_native_messaging_host_entry_point.cc',
375 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
379 'EmbedManifest': 'true',
380 'AdditionalManifestFiles': [
381 'host/win/common-controls.manifest',
382 'host/win/dpi_aware.manifest',
386 'IgnoreAllDefaultLibraries': 'true',
387 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
388 'AdditionalDependencies': [
393 }, # end of target 'remoting_it2me_native_messaging_host'
395 # GN version: //remoting/host:messages
396 'target_name': 'remoting_host_messages',
399 'remoting_resources',
401 'hard_dependency': 1,
402 'direct_dependent_settings': {
404 '<(SHARED_INTERMEDIATE_DIR)',
408 'host/win/host_messages.mc.jinja2'
412 'rule_name': 'localize',
413 'extension': 'jinja2',
415 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
418 'python', '<(remoting_localize_path)',
419 '--locale_dir', '<(webapp_locale_dir)',
420 '--template', '<(RULE_INPUT_PATH)',
421 '--output', '<@(_outputs)',
422 '--encoding', 'utf-16',
423 '<@(remoting_locales)',
425 'message': 'Localizing the event log messages'
428 }, # end of target 'remoting_host_messages'
430 # Generates localized resources for the Windows binaries.
431 # The substitution strings are taken from:
432 # - build/util/LASTCHANGE - the last source code revision. There is
433 # no explicit dependency on this file to avoid rebuilding the host
434 # after unrelated changes.
435 # - chrome/VERSION - the major, build & patch versions.
436 # - remoting/VERSION - the chromoting patch version (and overrides
437 # for chrome/VERSION).
438 # - translated webapp strings
440 'target_name': 'remoting_windows_resources',
443 'remoting_resources',
445 'hard_dependency': 1,
446 'direct_dependent_settings': {
448 '<(SHARED_INTERMEDIATE_DIR)',
452 'host/win/core.rc.jinja2',
453 'host/win/version.rc.jinja2',
457 'rule_name': 'version',
458 'extension': 'jinja2',
460 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
463 '<(chrome_version_path)',
464 '<(remoting_version_path)',
467 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
470 'python', '<(remoting_localize_path)',
471 '--variables', '<(chrome_version_path)',
472 # |remoting_version_path| must be after |chrome_version_path|
473 # because it can contain overrides for the version numbers.
474 '--variables', '<(remoting_version_path)',
475 '--variables', '<(lastchange_path)',
476 '--locale_dir', '<(webapp_locale_dir)',
477 '--template', '<(RULE_INPUT_PATH)',
478 '--output', '<@(_outputs)',
479 '--encoding', 'utf-16',
480 '<@(remoting_locales)',
482 'message': 'Localizing the version information'
485 }, # end of target 'remoting_windows_resources'
486 ], # end of 'targets'
489 # The host installation is generated only if WiX is available. If
490 # component build is used the produced installation will not work due to
491 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
493 ['wix_exists == "True" and sas_dll_exists == "True"', {
496 'target_name': 'remoting_host_installation',
499 'remoting_me2me_host_archive',
502 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
505 '<(PRODUCT_DIR)/chromoting.msi',
509 'rule_name': 'zip2msi',
515 '<(PRODUCT_DIR)/chromoting.msi',
518 'python', 'tools/zip2msi.py',
519 '--wix_path', '<(wix_path)',
520 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
521 '--target_arch', '<(target_arch)',
522 '<(RULE_INPUT_PATH)',
525 'message': 'Generating <@(_outputs)',
528 }, # end of target 'remoting_host_installation'
531 'target_name': 'remoting_me2me_host_archive',
534 '<(icu_gyp_path):icudata',
537 'remoting_it2me_native_messaging_host',
538 'remoting_me2me_host',
539 'remoting_me2me_native_messaging_host',
540 'remoting_native_messaging_manifests',
543 '<(PRODUCT_DIR)/remote_assistance_host.exe',
544 '<(PRODUCT_DIR)/remoting_core.dll',
545 '<(PRODUCT_DIR)/remoting_desktop.exe',
546 '<(PRODUCT_DIR)/remoting_host.exe',
547 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
549 'compiled_inputs_dst': [
550 'files/remote_assistance_host.exe',
551 'files/remoting_core.dll',
552 'files/remoting_desktop.exe',
553 'files/remoting_host.exe',
554 'files/remoting_native_messaging_host.exe',
557 ['buildtype == "Official"', {
561 }, { # else buildtype != "Official"
568 'BRANDING=<(branding)',
569 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
570 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
571 'VERSION=<(version_full)',
574 '<@(_compiled_inputs)',
575 '<(sas_dll_path)/sas.dll',
576 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
577 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
578 'resources/chromoting.ico',
579 '<(PRODUCT_DIR)/icudtl.dat',
581 'generated_files_dst': [
582 '<@(_compiled_inputs_dst)',
584 'files/com.google.chrome.remote_assistance.json',
585 'files/com.google.chrome.remote_desktop.json',
586 'files/chromoting.ico',
589 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
595 'action_name': 'Zip installer files for signing',
596 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
598 '<@(remoting_host_installer_win_files)',
601 '<@(_compiled_inputs)',
602 '<(sas_dll_path)/sas.dll',
604 'host/installer/build-installer-archive.py',
605 'resources/chromoting.ico',
611 'python', 'host/installer/build-installer-archive.py',
614 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
615 '--source-files', '<@(_source_files)',
616 '--generated-files', '<@(_generated_files)',
617 '--generated-files-dst', '<@(_generated_files_dst)',
618 '--defs', '<@(_defs)',
622 }, # end of target 'remoting_me2me_host_archive'
623 ], # end of 'targets'
625 # Dummy targets for when Wix is not available.
628 'target_name': 'remoting_host_installation',
633 'target_name': 'remoting_me2me_host_archive',
636 ], # end of 'targets'
637 }], # 'wix_exists == "True" and sas_dll_exists == "True"'
639 ], # end of 'conditions'