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 'target_name': 'remoting_lib_idl',
31 'type': 'static_library',
33 'host/win/chromoting_lib_idl.templ',
34 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
35 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
36 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
38 # This target exports a hard dependency because dependent targets may
39 # include chromoting_lib.h, a generated header.
43 'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
46 'direct_dependent_settings': {
48 '<(SHARED_INTERMEDIATE_DIR)',
53 'rule_name': 'generate_idl',
56 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
59 'python', '<(version_py_path)',
60 '-e', "DAEMON_CONTROLLER_CLSID='<(daemon_controller_clsid)'",
61 '-e', "RDP_DESKTOP_SESSION_CLSID='<(rdp_desktop_session_clsid)'",
65 'process_outputs_as_sources': 1,
66 'message': 'Generating <@(_outputs)',
69 }, # end of target 'remoting_lib_idl'
71 # remoting_lib_ps builds the proxy/stub code generated by MIDL (see
74 'target_name': 'remoting_lib_ps',
75 'type': 'static_library',
77 # Prepend 'Ps' to the MIDL-generated routines. This includes
78 # DllGetClassObject, DllCanUnloadNow, DllRegisterServer,
79 # DllUnregisterServer, and DllMain.
87 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.dlldata.c',
88 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_p.c',
90 }, # end of target 'remoting_lib_ps'
92 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
93 # into remoting_core.dll's resources) every time
94 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
95 # both this and 'remoting_lib_idl' targets ensures that the resorces
96 # are rebuilt every time the type library is updated. GYP alone is
97 # not smart enough to figure out this dependency on its own.
99 'target_name': 'remoting_lib_rc',
102 'host/win/chromoting_lib_idl.templ',
104 'hard_dependency': 1,
105 'direct_dependent_settings': {
107 '<(SHARED_INTERMEDIATE_DIR)',
112 'rule_name': 'generate_rc',
113 'extension': 'templ',
115 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
118 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
120 'message': 'Generating <@(_outputs)',
123 }, # end of target 'remoting_lib_rc'
124 # The only difference between |remoting_console.exe| and
125 # |remoting_host.exe| is that the former is a console application.
126 # |remoting_console.exe| is used for debugging purposes.
128 'target_name': 'remoting_console',
129 'type': 'executable',
130 'variables': { 'enable_wexit_time_destructors': 1, },
132 'BINARY=BINARY_HOST_ME2ME',
136 'remoting_windows_resources',
139 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
140 'host/win/entry_point.cc',
144 'AdditionalManifestFiles': [
145 'host/win/dpi_aware.manifest',
149 'EntryPointSymbol': 'HostEntryPoint',
150 'IgnoreAllDefaultLibraries': 'true',
151 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
154 }, # end of target 'remoting_console'
156 'target_name': 'remoting_core',
157 'type': 'shared_library',
158 'variables': { 'enable_wexit_time_destructors': 1, },
160 '_ATL_APARTMENT_THREADED',
161 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
162 '_ATL_NO_AUTOMATIC_NAMESPACE',
163 '_ATL_NO_EXCEPTIONS',
164 'BINARY=BINARY_CORE',
165 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
166 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
167 'HOST_IMPLEMENTATION',
168 'ISOLATION_AWARE_ENABLED=1',
170 'VERSION=<(version_full)',
173 '../base/base.gyp:base',
174 '../base/base.gyp:base_static',
175 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
176 '../ipc/ipc.gyp:ipc',
177 '../net/net.gyp:net',
178 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
182 'remoting_host_setup_base',
183 'remoting_it2me_host_static',
187 'remoting_me2me_host_static',
188 'remoting_native_messaging_base',
190 'remoting_windows_resources',
193 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
194 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
195 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
196 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
197 'host/desktop_process_main.cc',
200 'host/it2me/it2me_native_messaging_host_main.cc',
201 'host/it2me/it2me_native_messaging_host_main.h',
202 'host/setup/me2me_native_messaging_host_main.cc',
203 'host/setup/me2me_native_messaging_host_main.h',
204 'host/win/chromoting_module.cc',
205 'host/win/chromoting_module.h',
207 'host/win/core_resource.h',
208 'host/win/host_service.cc',
209 'host/win/host_service.h',
212 'host/win/rdp_desktop_session.cc',
213 'host/win/rdp_desktop_session.h',
214 'host/win/unprivileged_process_delegate.cc',
215 'host/win/unprivileged_process_delegate.h',
216 'host/win/worker_process_launcher.cc',
217 'host/win/worker_process_launcher.h',
218 'host/win/wts_session_process_delegate.cc',
219 'host/win/wts_session_process_delegate.h',
220 'host/worker_process_ipc_delegate.h',
224 'EmbedManifest': 'true',
225 'AdditionalManifestFiles': [
226 'host/win/common-controls.manifest',
230 'AdditionalDependencies': [
237 'AdditionalOptions': [
238 # Export the proxy/stub entry points. Note that the generated
239 # routines have 'Ps' prefix to avoid conflicts with our own
241 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
242 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
243 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
244 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
249 # atlapp.h contains a global "using namespace WTL;".
250 # TODO: Remove once remoting/host/verify_config_window_win.h no
251 # longer depends on atlapp.h, http://crbug.com/5027
252 'VCCLCompilerTool': {
253 'AdditionalOptions': ['-Wno-header-hygiene'],
258 }, # end of target 'remoting_core'
260 'target_name': 'remoting_desktop',
261 'type': 'executable',
262 'variables': { 'enable_wexit_time_destructors': 1, },
264 'BINARY=BINARY_DESKTOP',
268 'remoting_windows_resources',
271 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
272 'host/win/entry_point.cc',
276 'AdditionalManifestFiles': [
277 'host/win/dpi_aware.manifest',
282 # Add 'level="requireAdministrator" uiAccess="true"' to
283 # the manifest only for the official builds because it requires
284 # the binary to be signed to work.
286 ['buildtype == "Official"', {
287 'UACExecutionLevel': 2,
288 'UACUIAccess': 'true',
291 'EntryPointSymbol': 'HostEntryPoint',
292 'IgnoreAllDefaultLibraries': 'true',
293 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
296 }, # end of target 'remoting_desktop'
298 'target_name': 'remoting_me2me_host',
299 'product_name': 'remoting_host',
300 'type': 'executable',
301 'variables': { 'enable_wexit_time_destructors': 1, },
303 'BINARY=BINARY_HOST_ME2ME',
307 'remoting_windows_resources',
310 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
311 'host/win/entry_point.cc',
315 'AdditionalManifestFiles': [
316 'host/win/dpi_aware.manifest',
320 'EntryPointSymbol': 'HostEntryPoint',
321 'IgnoreAllDefaultLibraries': 'true',
322 'OutputFile': '$(OutDir)\\remoting_host.exe',
323 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
326 }, # end of target 'remoting_me2me_host'
328 'target_name': 'remoting_me2me_native_messaging_host',
329 'type': 'executable',
330 'product_name': 'remoting_native_messaging_host',
331 'variables': { 'enable_wexit_time_destructors': 1, },
333 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
337 'remoting_windows_resources',
340 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
341 'host/setup/me2me_native_messaging_host_entry_point.cc',
345 'IgnoreAllDefaultLibraries': 'true',
346 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
349 }, # end of target 'remoting_me2me_native_messaging_host'
351 'target_name': 'remoting_it2me_native_messaging_host',
352 'type': 'executable',
353 'product_name': 'remote_assistance_host',
354 'variables': { 'enable_wexit_time_destructors': 1, },
357 'remoting_windows_resources',
360 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
361 'host/it2me/it2me_native_messaging_host_entry_point.cc',
364 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
368 'EmbedManifest': 'true',
369 'AdditionalManifestFiles': [
370 'host/win/common-controls.manifest',
371 'host/win/dpi_aware.manifest',
375 'IgnoreAllDefaultLibraries': 'true',
376 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
377 'AdditionalDependencies': [
382 }, # end of target 'remoting_it2me_native_messaging_host'
384 'target_name': 'remoting_host_messages',
387 'remoting_resources',
389 'hard_dependency': 1,
390 'direct_dependent_settings': {
392 '<(SHARED_INTERMEDIATE_DIR)',
396 'host/win/host_messages.mc.jinja2'
400 'rule_name': 'localize',
401 'extension': 'jinja2',
403 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
406 'python', '<(remoting_localize_path)',
407 '--locale_dir', '<(webapp_locale_dir)',
408 '--template', '<(RULE_INPUT_PATH)',
409 '--output', '<@(_outputs)',
410 '--encoding', 'utf-16',
411 '<@(remoting_locales)',
413 'message': 'Localizing the event log messages'
416 }, # end of target 'remoting_host_messages'
418 # Generates localized resources for the Windows binaries.
419 # The substitution strings are taken from:
420 # - build/util/LASTCHANGE - the last source code revision. There is
421 # no explicit dependency on this file to avoid rebuilding the host
422 # after unrelated changes.
423 # - chrome/VERSION - the major, build & patch versions.
424 # - remoting/VERSION - the chromoting patch version (and overrides
425 # for chrome/VERSION).
426 # - translated webapp strings
428 'target_name': 'remoting_windows_resources',
431 'remoting_resources',
433 'hard_dependency': 1,
434 'direct_dependent_settings': {
436 '<(SHARED_INTERMEDIATE_DIR)',
440 'host/win/core.rc.jinja2',
441 'host/win/version.rc.jinja2',
445 'rule_name': 'version',
446 'extension': 'jinja2',
448 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
451 '<(chrome_version_path)',
452 '<(remoting_version_path)',
455 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
458 'python', '<(remoting_localize_path)',
459 '--variables', '<(chrome_version_path)',
460 # |remoting_version_path| must be after |chrome_version_path|
461 # because it can contain overrides for the version numbers.
462 '--variables', '<(remoting_version_path)',
463 '--variables', '<(lastchange_path)',
464 '--locale_dir', '<(webapp_locale_dir)',
465 '--template', '<(RULE_INPUT_PATH)',
466 '--output', '<@(_outputs)',
467 '--encoding', 'utf-16',
468 '<@(remoting_locales)',
470 'message': 'Localizing the version information'
473 }, # end of target 'remoting_windows_resources'
474 ], # end of 'targets'
477 # The host installation is generated only if WiX is available. If
478 # component build is used the produced installation will not work due to
479 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
481 ['wix_exists == "True" and sas_dll_exists == "True"', {
484 'target_name': 'remoting_host_installation',
487 'remoting_me2me_host_archive',
490 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
493 '<(PRODUCT_DIR)/chromoting.msi',
497 'rule_name': 'zip2msi',
503 '<(PRODUCT_DIR)/chromoting.msi',
506 'python', 'tools/zip2msi.py',
507 '--wix_path', '<(wix_path)',
508 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
509 '--target_arch', '<(target_arch)',
510 '<(RULE_INPUT_PATH)',
513 'message': 'Generating <@(_outputs)',
516 }, # end of target 'remoting_host_installation'
519 'target_name': 'remoting_me2me_host_archive',
522 '<(icu_gyp_path):icudata',
525 'remoting_it2me_native_messaging_host',
526 'remoting_me2me_host',
527 'remoting_me2me_native_messaging_host',
528 'remoting_native_messaging_manifests',
531 '<(PRODUCT_DIR)/remote_assistance_host.exe',
532 '<(PRODUCT_DIR)/remoting_core.dll',
533 '<(PRODUCT_DIR)/remoting_desktop.exe',
534 '<(PRODUCT_DIR)/remoting_host.exe',
535 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
537 'compiled_inputs_dst': [
538 'files/remote_assistance_host.exe',
539 'files/remoting_core.dll',
540 'files/remoting_desktop.exe',
541 'files/remoting_host.exe',
542 'files/remoting_native_messaging_host.exe',
545 ['buildtype == "Official"', {
549 }, { # else buildtype != "Official"
556 'BRANDING=<(branding)',
557 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
558 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
559 'VERSION=<(version_full)',
562 '<@(_compiled_inputs)',
563 '<(sas_dll_path)/sas.dll',
564 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
565 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
566 'resources/chromoting.ico',
567 '<(PRODUCT_DIR)/icudtl.dat',
569 'generated_files_dst': [
570 '<@(_compiled_inputs_dst)',
572 'files/com.google.chrome.remote_assistance.json',
573 'files/com.google.chrome.remote_desktop.json',
574 'files/chromoting.ico',
577 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
583 'action_name': 'Zip installer files for signing',
584 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
586 '<@(remoting_host_installer_win_files)',
589 '<@(_compiled_inputs)',
590 '<(sas_dll_path)/sas.dll',
592 'host/installer/build-installer-archive.py',
593 'resources/chromoting.ico',
599 'python', 'host/installer/build-installer-archive.py',
602 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
603 '--source-files', '<@(_source_files)',
604 '--generated-files', '<@(_generated_files)',
605 '--generated-files-dst', '<@(_generated_files_dst)',
606 '--defs', '<@(_defs)',
610 }, # end of target 'remoting_me2me_host_archive'
611 ], # end of 'targets'
613 # Dummy targets for when Wix is not available.
616 'target_name': 'remoting_host_installation',
621 'target_name': 'remoting_me2me_host_archive',
624 ], # end of 'targets'
625 }], # 'wix_exists == "True" and sas_dll_exists == "True"'
627 ], # end of 'conditions'