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',
99 # Generated code contains unused variables.
100 '-Wno-unused-variable',
103 }, # end of target 'remoting_lib_ps'
105 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
106 # into remoting_core.dll's resources) every time
107 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
108 # both this and 'remoting_lib_idl' targets ensures that the resorces
109 # are rebuilt every time the type library is updated. GYP alone is
110 # not smart enough to figure out this dependency on its own.
112 'target_name': 'remoting_lib_rc',
115 'host/win/chromoting_lib_idl.templ',
117 'hard_dependency': 1,
118 'direct_dependent_settings': {
120 '<(SHARED_INTERMEDIATE_DIR)',
125 'rule_name': 'generate_rc',
126 'extension': 'templ',
128 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
131 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
133 'message': 'Generating <@(_outputs)',
136 }, # end of target 'remoting_lib_rc'
137 # The only difference between |remoting_console.exe| and
138 # |remoting_host.exe| is that the former is a console application.
139 # |remoting_console.exe| is used for debugging purposes.
141 'target_name': 'remoting_console',
142 'type': 'executable',
143 'variables': { 'enable_wexit_time_destructors': 1, },
145 'BINARY=BINARY_HOST_ME2ME',
149 'remoting_windows_resources',
152 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
153 'host/win/entry_point.cc',
157 'AdditionalManifestFiles': [
158 'host/win/dpi_aware.manifest',
162 'EntryPointSymbol': 'HostEntryPoint',
163 'IgnoreAllDefaultLibraries': 'true',
164 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
167 }, # end of target 'remoting_console'
169 'target_name': 'remoting_core',
170 'type': 'shared_library',
171 'variables': { 'enable_wexit_time_destructors': 1, },
173 '_ATL_APARTMENT_THREADED',
174 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
175 '_ATL_NO_AUTOMATIC_NAMESPACE',
176 '_ATL_NO_EXCEPTIONS',
177 'BINARY=BINARY_CORE',
178 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
179 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
180 'HOST_IMPLEMENTATION',
181 'ISOLATION_AWARE_ENABLED=1',
183 'VERSION=<(version_full)',
186 '../base/base.gyp:base',
187 '../base/base.gyp:base_static',
188 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
189 '../ipc/ipc.gyp:ipc',
190 '../net/net.gyp:net',
191 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
195 'remoting_host_setup_base',
196 'remoting_it2me_host_static',
200 'remoting_me2me_host_static',
201 'remoting_native_messaging_base',
203 'remoting_windows_resources',
206 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
207 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
208 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
209 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
210 'host/desktop_process_main.cc',
213 'host/it2me/it2me_native_messaging_host_main.cc',
214 'host/it2me/it2me_native_messaging_host_main.h',
215 'host/setup/me2me_native_messaging_host_main.cc',
216 'host/setup/me2me_native_messaging_host_main.h',
217 'host/win/chromoting_module.cc',
218 'host/win/chromoting_module.h',
220 'host/win/core_resource.h',
221 'host/win/host_service.cc',
222 'host/win/host_service.h',
225 'host/win/rdp_desktop_session.cc',
226 'host/win/rdp_desktop_session.h',
227 'host/win/unprivileged_process_delegate.cc',
228 'host/win/unprivileged_process_delegate.h',
229 'host/win/worker_process_launcher.cc',
230 'host/win/worker_process_launcher.h',
231 'host/win/wts_session_process_delegate.cc',
232 'host/win/wts_session_process_delegate.h',
233 'host/worker_process_ipc_delegate.h',
237 'EmbedManifest': 'true',
238 'AdditionalManifestFiles': [
239 'host/win/common-controls.manifest',
243 'AdditionalDependencies': [
250 'AdditionalOptions': [
251 # Export the proxy/stub entry points. Note that the generated
252 # routines have 'Ps' prefix to avoid conflicts with our own
254 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
255 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
256 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
257 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
262 # atlapp.h contains a global "using namespace WTL;".
263 # TODO: Remove once remoting/host/verify_config_window_win.h no
264 # longer depends on atlapp.h, http://crbug.com/5027
265 'VCCLCompilerTool': {
266 'AdditionalOptions': ['-Wno-header-hygiene'],
271 }, # end of target 'remoting_core'
273 'target_name': 'remoting_desktop',
274 'type': 'executable',
275 'variables': { 'enable_wexit_time_destructors': 1, },
277 'BINARY=BINARY_DESKTOP',
281 'remoting_windows_resources',
284 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
285 'host/win/entry_point.cc',
289 'AdditionalManifestFiles': [
290 'host/win/dpi_aware.manifest',
295 # Add 'level="requireAdministrator" uiAccess="true"' to
296 # the manifest only for the official builds because it requires
297 # the binary to be signed to work.
299 ['buildtype == "Official"', {
300 'UACExecutionLevel': 2,
301 'UACUIAccess': 'true',
304 'EntryPointSymbol': 'HostEntryPoint',
305 'IgnoreAllDefaultLibraries': 'true',
306 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
309 }, # end of target 'remoting_desktop'
311 'target_name': 'remoting_me2me_host',
312 'product_name': 'remoting_host',
313 'type': 'executable',
314 'variables': { 'enable_wexit_time_destructors': 1, },
316 'BINARY=BINARY_HOST_ME2ME',
320 'remoting_windows_resources',
323 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
324 'host/win/entry_point.cc',
328 'AdditionalManifestFiles': [
329 'host/win/dpi_aware.manifest',
333 'EntryPointSymbol': 'HostEntryPoint',
334 'IgnoreAllDefaultLibraries': 'true',
335 'OutputFile': '$(OutDir)\\remoting_host.exe',
336 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
339 }, # end of target 'remoting_me2me_host'
341 'target_name': 'remoting_me2me_native_messaging_host',
342 'type': 'executable',
343 'product_name': 'remoting_native_messaging_host',
344 'variables': { 'enable_wexit_time_destructors': 1, },
346 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
350 'remoting_windows_resources',
353 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
354 'host/setup/me2me_native_messaging_host_entry_point.cc',
358 'IgnoreAllDefaultLibraries': 'true',
359 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
362 }, # end of target 'remoting_me2me_native_messaging_host'
364 'target_name': 'remoting_it2me_native_messaging_host',
365 'type': 'executable',
366 'product_name': 'remote_assistance_host',
367 'variables': { 'enable_wexit_time_destructors': 1, },
370 'remoting_windows_resources',
373 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
374 'host/it2me/it2me_native_messaging_host_entry_point.cc',
377 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
381 'EmbedManifest': 'true',
382 'AdditionalManifestFiles': [
383 'host/win/common-controls.manifest',
384 'host/win/dpi_aware.manifest',
388 'IgnoreAllDefaultLibraries': 'true',
389 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
390 'AdditionalDependencies': [
395 }, # end of target 'remoting_it2me_native_messaging_host'
397 # GN version: //remoting/host:messages
398 'target_name': 'remoting_host_messages',
401 'remoting_resources',
403 'hard_dependency': 1,
404 'direct_dependent_settings': {
406 '<(SHARED_INTERMEDIATE_DIR)',
410 'host/win/host_messages.mc.jinja2'
414 'rule_name': 'localize',
415 'extension': 'jinja2',
417 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
420 'python', '<(remoting_localize_path)',
421 '--locale_dir', '<(webapp_locale_dir)',
422 '--template', '<(RULE_INPUT_PATH)',
423 '--output', '<@(_outputs)',
424 '--encoding', 'utf-16',
425 '<@(remoting_locales)',
427 'message': 'Localizing the event log messages'
430 }, # end of target 'remoting_host_messages'
432 # Generates localized resources for the Windows binaries.
433 # The substitution strings are taken from:
434 # - build/util/LASTCHANGE - the last source code revision. There is
435 # no explicit dependency on this file to avoid rebuilding the host
436 # after unrelated changes.
437 # - chrome/VERSION - the major, build & patch versions.
438 # - remoting/VERSION - the chromoting patch version (and overrides
439 # for chrome/VERSION).
440 # - translated webapp strings
442 'target_name': 'remoting_windows_resources',
445 'remoting_resources',
447 'hard_dependency': 1,
448 'direct_dependent_settings': {
450 '<(SHARED_INTERMEDIATE_DIR)',
454 'host/win/core.rc.jinja2',
455 'host/win/version.rc.jinja2',
459 'rule_name': 'version',
460 'extension': 'jinja2',
462 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
465 '<(chrome_version_path)',
466 '<(remoting_version_path)',
469 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
472 'python', '<(remoting_localize_path)',
473 '--variables', '<(chrome_version_path)',
474 # |remoting_version_path| must be after |chrome_version_path|
475 # because it can contain overrides for the version numbers.
476 '--variables', '<(remoting_version_path)',
477 '--variables', '<(lastchange_path)',
478 '--locale_dir', '<(webapp_locale_dir)',
479 '--template', '<(RULE_INPUT_PATH)',
480 '--output', '<@(_outputs)',
481 '--encoding', 'utf-16',
482 '<@(remoting_locales)',
484 'message': 'Localizing the version information'
487 }, # end of target 'remoting_windows_resources'
488 ], # end of 'targets'
491 # The host installation is generated only if WiX is available. If
492 # component build is used the produced installation will not work due to
493 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
495 ['wix_exists == "True" and sas_dll_exists == "True"', {
498 'target_name': 'remoting_host_installation',
501 'remoting_me2me_host_archive',
504 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
507 '<(PRODUCT_DIR)/chromoting.msi',
511 'rule_name': 'zip2msi',
517 '<(PRODUCT_DIR)/chromoting.msi',
520 'python', 'tools/zip2msi.py',
521 '--wix_path', '<(wix_path)',
522 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
523 '--target_arch', '<(target_arch)',
524 '<(RULE_INPUT_PATH)',
527 'message': 'Generating <@(_outputs)',
530 }, # end of target 'remoting_host_installation'
533 'target_name': 'remoting_me2me_host_archive',
536 '<(icu_gyp_path):icudata',
539 'remoting_it2me_native_messaging_host',
540 'remoting_me2me_host',
541 'remoting_me2me_native_messaging_host',
542 'remoting_native_messaging_manifests',
545 '<(PRODUCT_DIR)/remote_assistance_host.exe',
546 '<(PRODUCT_DIR)/remoting_core.dll',
547 '<(PRODUCT_DIR)/remoting_desktop.exe',
548 '<(PRODUCT_DIR)/remoting_host.exe',
549 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
551 'compiled_inputs_dst': [
552 'files/remote_assistance_host.exe',
553 'files/remoting_core.dll',
554 'files/remoting_desktop.exe',
555 'files/remoting_host.exe',
556 'files/remoting_native_messaging_host.exe',
559 ['buildtype == "Official"', {
563 }, { # else buildtype != "Official"
570 'BRANDING=<(branding)',
571 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
572 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
573 'VERSION=<(version_full)',
576 '<@(_compiled_inputs)',
577 '<(sas_dll_path)/sas.dll',
578 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
579 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
580 'resources/chromoting.ico',
581 '<(PRODUCT_DIR)/icudtl.dat',
583 'generated_files_dst': [
584 '<@(_compiled_inputs_dst)',
586 'files/com.google.chrome.remote_assistance.json',
587 'files/com.google.chrome.remote_desktop.json',
588 'files/chromoting.ico',
591 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
597 'action_name': 'Zip installer files for signing',
598 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
600 '<@(remoting_host_installer_win_files)',
603 '<@(_compiled_inputs)',
604 '<(sas_dll_path)/sas.dll',
606 'host/installer/build-installer-archive.py',
607 'resources/chromoting.ico',
613 'python', 'host/installer/build-installer-archive.py',
616 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
617 '--source-files', '<@(_source_files)',
618 '--generated-files', '<@(_generated_files)',
619 '--generated-files-dst', '<@(_generated_files_dst)',
620 '--defs', '<@(_defs)',
624 }, # end of target 'remoting_me2me_host_archive'
625 ], # end of 'targets'
627 # Dummy targets for when Wix is not available.
630 'target_name': 'remoting_host_installation',
635 'target_name': 'remoting_me2me_host_archive',
638 ], # end of 'targets'
639 }], # 'wix_exists == "True" and sas_dll_exists == "True"'
641 ], # end of 'conditions'