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',
98 }, # end of target 'remoting_lib_ps'
100 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
101 # into remoting_core.dll's resources) every time
102 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
103 # both this and 'remoting_lib_idl' targets ensures that the resorces
104 # are rebuilt every time the type library is updated. GYP alone is
105 # not smart enough to figure out this dependency on its own.
107 'target_name': 'remoting_lib_rc',
110 'host/win/chromoting_lib_idl.templ',
112 'hard_dependency': 1,
113 'direct_dependent_settings': {
115 '<(SHARED_INTERMEDIATE_DIR)',
120 'rule_name': 'generate_rc',
121 'extension': 'templ',
123 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
126 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
128 'message': 'Generating <@(_outputs)',
131 }, # end of target 'remoting_lib_rc'
132 # The only difference between |remoting_console.exe| and
133 # |remoting_host.exe| is that the former is a console application.
134 # |remoting_console.exe| is used for debugging purposes.
136 'target_name': 'remoting_console',
137 'type': 'executable',
138 'variables': { 'enable_wexit_time_destructors': 1, },
140 'BINARY=BINARY_HOST_ME2ME',
144 'remoting_windows_resources',
147 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
148 'host/win/entry_point.cc',
152 'AdditionalManifestFiles': [
153 'host/win/dpi_aware.manifest',
157 'EntryPointSymbol': 'HostEntryPoint',
158 'IgnoreAllDefaultLibraries': 'true',
159 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
162 }, # end of target 'remoting_console'
164 'target_name': 'remoting_core',
165 'type': 'shared_library',
166 'variables': { 'enable_wexit_time_destructors': 1, },
168 '_ATL_APARTMENT_THREADED',
169 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
170 '_ATL_NO_AUTOMATIC_NAMESPACE',
171 '_ATL_NO_EXCEPTIONS',
172 'BINARY=BINARY_CORE',
173 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
174 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
175 'HOST_IMPLEMENTATION',
176 'ISOLATION_AWARE_ENABLED=1',
178 'VERSION=<(version_full)',
181 '../base/base.gyp:base',
182 '../base/base.gyp:base_static',
183 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
184 '../ipc/ipc.gyp:ipc',
185 '../net/net.gyp:net',
186 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
190 'remoting_host_setup_base',
191 'remoting_it2me_host_static',
195 'remoting_me2me_host_static',
196 'remoting_native_messaging_base',
198 'remoting_windows_resources',
201 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
202 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
203 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
204 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
205 'host/desktop_process_main.cc',
208 'host/it2me/it2me_native_messaging_host_main.cc',
209 'host/it2me/it2me_native_messaging_host_main.h',
210 'host/setup/me2me_native_messaging_host_main.cc',
211 'host/setup/me2me_native_messaging_host_main.h',
212 'host/win/chromoting_module.cc',
213 'host/win/chromoting_module.h',
215 'host/win/core_resource.h',
216 'host/win/host_service.cc',
217 'host/win/host_service.h',
220 'host/win/rdp_desktop_session.cc',
221 'host/win/rdp_desktop_session.h',
222 'host/win/unprivileged_process_delegate.cc',
223 'host/win/unprivileged_process_delegate.h',
224 'host/win/worker_process_launcher.cc',
225 'host/win/worker_process_launcher.h',
226 'host/win/wts_session_process_delegate.cc',
227 'host/win/wts_session_process_delegate.h',
228 'host/worker_process_ipc_delegate.h',
232 'EmbedManifest': 'true',
233 'AdditionalManifestFiles': [
234 'host/win/common-controls.manifest',
238 'AdditionalDependencies': [
245 'AdditionalOptions': [
246 # Export the proxy/stub entry points. Note that the generated
247 # routines have 'Ps' prefix to avoid conflicts with our own
249 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
250 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
251 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
252 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
257 # atlapp.h contains a global "using namespace WTL;".
258 # TODO: Remove once remoting/host/verify_config_window_win.h no
259 # longer depends on atlapp.h, http://crbug.com/5027
260 'VCCLCompilerTool': {
261 'AdditionalOptions': ['-Wno-header-hygiene'],
266 }, # end of target 'remoting_core'
268 'target_name': 'remoting_desktop',
269 'type': 'executable',
270 'variables': { 'enable_wexit_time_destructors': 1, },
272 'BINARY=BINARY_DESKTOP',
276 'remoting_windows_resources',
279 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
280 'host/win/entry_point.cc',
284 'AdditionalManifestFiles': [
285 'host/win/dpi_aware.manifest',
290 # Add 'level="requireAdministrator" uiAccess="true"' to
291 # the manifest only for the official builds because it requires
292 # the binary to be signed to work.
294 ['buildtype == "Official"', {
295 'UACExecutionLevel': 2,
296 'UACUIAccess': 'true',
299 'EntryPointSymbol': 'HostEntryPoint',
300 'IgnoreAllDefaultLibraries': 'true',
301 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
304 }, # end of target 'remoting_desktop'
306 'target_name': 'remoting_me2me_host',
307 'product_name': 'remoting_host',
308 'type': 'executable',
309 'variables': { 'enable_wexit_time_destructors': 1, },
311 'BINARY=BINARY_HOST_ME2ME',
315 'remoting_windows_resources',
318 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
319 'host/win/entry_point.cc',
323 'AdditionalManifestFiles': [
324 'host/win/dpi_aware.manifest',
328 'EntryPointSymbol': 'HostEntryPoint',
329 'IgnoreAllDefaultLibraries': 'true',
330 'OutputFile': '$(OutDir)\\remoting_host.exe',
331 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
334 }, # end of target 'remoting_me2me_host'
336 'target_name': 'remoting_me2me_native_messaging_host',
337 'type': 'executable',
338 'product_name': 'remoting_native_messaging_host',
339 'variables': { 'enable_wexit_time_destructors': 1, },
341 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
345 'remoting_windows_resources',
348 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
349 'host/setup/me2me_native_messaging_host_entry_point.cc',
353 'IgnoreAllDefaultLibraries': 'true',
354 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
357 }, # end of target 'remoting_me2me_native_messaging_host'
359 'target_name': 'remoting_it2me_native_messaging_host',
360 'type': 'executable',
361 'product_name': 'remote_assistance_host',
362 'variables': { 'enable_wexit_time_destructors': 1, },
365 'remoting_windows_resources',
368 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
369 'host/it2me/it2me_native_messaging_host_entry_point.cc',
372 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
376 'EmbedManifest': 'true',
377 'AdditionalManifestFiles': [
378 'host/win/common-controls.manifest',
379 'host/win/dpi_aware.manifest',
383 'IgnoreAllDefaultLibraries': 'true',
384 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
385 'AdditionalDependencies': [
390 }, # end of target 'remoting_it2me_native_messaging_host'
392 # GN version: //remoting/host:messages
393 'target_name': 'remoting_host_messages',
396 'remoting_resources',
398 'hard_dependency': 1,
399 'direct_dependent_settings': {
401 '<(SHARED_INTERMEDIATE_DIR)',
405 'host/win/host_messages.mc.jinja2'
409 'rule_name': 'localize',
410 'extension': 'jinja2',
412 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
415 'python', '<(remoting_localize_path)',
416 '--locale_dir', '<(webapp_locale_dir)',
417 '--template', '<(RULE_INPUT_PATH)',
418 '--output', '<@(_outputs)',
419 '--encoding', 'utf-16',
420 '<@(remoting_locales)',
422 'message': 'Localizing the event log messages'
425 }, # end of target 'remoting_host_messages'
427 # Generates localized resources for the Windows binaries.
428 # The substitution strings are taken from:
429 # - build/util/LASTCHANGE - the last source code revision. There is
430 # no explicit dependency on this file to avoid rebuilding the host
431 # after unrelated changes.
432 # - chrome/VERSION - the major, build & patch versions.
433 # - remoting/VERSION - the chromoting patch version (and overrides
434 # for chrome/VERSION).
435 # - translated webapp strings
437 'target_name': 'remoting_windows_resources',
440 'remoting_resources',
442 'hard_dependency': 1,
443 'direct_dependent_settings': {
445 '<(SHARED_INTERMEDIATE_DIR)',
449 'host/win/core.rc.jinja2',
450 'host/win/version.rc.jinja2',
454 'rule_name': 'version',
455 'extension': 'jinja2',
457 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
460 '<(chrome_version_path)',
461 '<(remoting_version_path)',
464 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
467 'python', '<(remoting_localize_path)',
468 '--variables', '<(chrome_version_path)',
469 # |remoting_version_path| must be after |chrome_version_path|
470 # because it can contain overrides for the version numbers.
471 '--variables', '<(remoting_version_path)',
472 '--variables', '<(lastchange_path)',
473 '--locale_dir', '<(webapp_locale_dir)',
474 '--template', '<(RULE_INPUT_PATH)',
475 '--output', '<@(_outputs)',
476 '--encoding', 'utf-16',
477 '<@(remoting_locales)',
479 'message': 'Localizing the version information'
482 }, # end of target 'remoting_windows_resources'
483 ], # end of 'targets'
486 # The host installation is generated only if WiX is available. If
487 # component build is used the produced installation will not work due to
488 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
490 ['wix_exists == "True" and sas_dll_exists == "True"', {
493 'target_name': 'remoting_host_installation',
496 'remoting_me2me_host_archive',
499 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
502 '<(PRODUCT_DIR)/chromoting.msi',
506 'rule_name': 'zip2msi',
512 '<(PRODUCT_DIR)/chromoting.msi',
515 'python', 'tools/zip2msi.py',
516 '--wix_path', '<(wix_path)',
517 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
518 '--target_arch', '<(target_arch)',
519 '<(RULE_INPUT_PATH)',
522 'message': 'Generating <@(_outputs)',
525 }, # end of target 'remoting_host_installation'
528 'target_name': 'remoting_me2me_host_archive',
531 '<(icu_gyp_path):icudata',
534 'remoting_it2me_native_messaging_host',
535 'remoting_me2me_host',
536 'remoting_me2me_native_messaging_host',
537 'remoting_native_messaging_manifests',
540 '<(PRODUCT_DIR)/remote_assistance_host.exe',
541 '<(PRODUCT_DIR)/remoting_core.dll',
542 '<(PRODUCT_DIR)/remoting_desktop.exe',
543 '<(PRODUCT_DIR)/remoting_host.exe',
544 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
546 'compiled_inputs_dst': [
547 'files/remote_assistance_host.exe',
548 'files/remoting_core.dll',
549 'files/remoting_desktop.exe',
550 'files/remoting_host.exe',
551 'files/remoting_native_messaging_host.exe',
554 ['buildtype == "Official"', {
558 }, { # else buildtype != "Official"
565 'BRANDING=<(branding)',
566 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
567 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
568 'VERSION=<(version_full)',
571 '<@(_compiled_inputs)',
572 '<(sas_dll_path)/sas.dll',
573 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
574 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
575 'resources/chromoting.ico',
576 '<(PRODUCT_DIR)/icudtl.dat',
578 'generated_files_dst': [
579 '<@(_compiled_inputs_dst)',
581 'files/com.google.chrome.remote_assistance.json',
582 'files/com.google.chrome.remote_desktop.json',
583 'files/chromoting.ico',
586 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
592 'action_name': 'Zip installer files for signing',
593 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
595 '<@(remoting_host_installer_win_files)',
598 '<@(_compiled_inputs)',
599 '<(sas_dll_path)/sas.dll',
601 'host/installer/build-installer-archive.py',
602 'resources/chromoting.ico',
608 'python', 'host/installer/build-installer-archive.py',
611 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
612 '--source-files', '<@(_source_files)',
613 '--generated-files', '<@(_generated_files)',
614 '--generated-files-dst', '<@(_generated_files_dst)',
615 '--defs', '<@(_defs)',
619 }, # end of target 'remoting_me2me_host_archive'
620 ], # end of 'targets'
622 # Dummy targets for when Wix is not available.
625 'target_name': 'remoting_host_installation',
630 'target_name': 'remoting_me2me_host_archive',
633 ], # end of 'targets'
634 }], # 'wix_exists == "True" and sas_dll_exists == "True"'
636 ], # end of 'conditions'