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',
20 'target_name': 'remoting_breakpad_tester',
22 'variables': { 'enable_wexit_time_destructors': 1, },
24 '../base/base.gyp:base',
28 'tools/breakpad_tester_win.cc',
30 }, # end of target 'remoting_breakpad_tester'
32 'target_name': 'remoting_lib_idl',
33 'type': 'static_library',
35 'host/win/chromoting_lib_idl.templ',
36 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
37 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
38 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
40 # This target exports a hard dependency because dependent targets may
41 # include chromoting_lib.h, a generated header.
45 'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
48 'direct_dependent_settings': {
50 '<(SHARED_INTERMEDIATE_DIR)',
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',
92 }, # end of target 'remoting_lib_ps'
94 # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
95 # into remoting_core.dll's resources) every time
96 # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
97 # both this and 'remoting_lib_idl' targets ensures that the resorces
98 # are rebuilt every time the type library is updated. GYP alone is
99 # not smart enough to figure out this dependency on its own.
101 'target_name': 'remoting_lib_rc',
104 'host/win/chromoting_lib_idl.templ',
106 'hard_dependency': 1,
107 'direct_dependent_settings': {
109 '<(SHARED_INTERMEDIATE_DIR)',
114 'rule_name': 'generate_rc',
115 'extension': 'templ',
117 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
120 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
122 'message': 'Generating <@(_outputs)',
125 }, # end of target 'remoting_lib_rc'
126 # The only difference between |remoting_console.exe| and
127 # |remoting_host.exe| is that the former is a console application.
128 # |remoting_console.exe| is used for debugging purposes.
130 'target_name': 'remoting_console',
131 'type': 'executable',
132 'variables': { 'enable_wexit_time_destructors': 1, },
134 'BINARY=BINARY_HOST_ME2ME',
138 'remoting_windows_resources',
141 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
142 'host/win/entry_point.cc',
146 'AdditionalManifestFiles': [
147 'host/win/dpi_aware.manifest',
151 'EntryPointSymbol': 'HostEntryPoint',
152 'IgnoreAllDefaultLibraries': 'true',
153 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
156 }, # end of target 'remoting_console'
158 'target_name': 'remoting_core',
159 'type': 'shared_library',
160 'variables': { 'enable_wexit_time_destructors': 1, },
162 '_ATL_APARTMENT_THREADED',
163 '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
164 '_ATL_NO_AUTOMATIC_NAMESPACE',
165 '_ATL_NO_EXCEPTIONS',
166 'BINARY=BINARY_CORE',
167 'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
168 'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
169 'HOST_IMPLEMENTATION',
170 'ISOLATION_AWARE_ENABLED=1',
172 'VERSION=<(version_full)',
175 '../base/base.gyp:base',
176 '../base/base.gyp:base_static',
177 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
178 '../ipc/ipc.gyp:ipc',
179 '../net/net.gyp:net',
180 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
184 'remoting_host_setup_base',
185 'remoting_it2me_host_static',
189 'remoting_me2me_host_static',
190 'remoting_native_messaging_base',
192 'remoting_windows_resources',
195 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
196 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
197 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
198 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
199 'host/desktop_process_main.cc',
202 'host/it2me/it2me_native_messaging_host_main.cc',
203 'host/it2me/it2me_native_messaging_host_main.h',
204 'host/setup/me2me_native_messaging_host_main.cc',
205 'host/setup/me2me_native_messaging_host_main.h',
206 'host/verify_config_window_win.cc',
207 'host/verify_config_window_win.h',
208 'host/win/chromoting_module.cc',
209 'host/win/chromoting_module.h',
211 'host/win/core_resource.h',
212 'host/win/elevated_controller.cc',
213 'host/win/elevated_controller.h',
214 'host/win/host_service.cc',
215 'host/win/host_service.h',
218 'host/win/rdp_desktop_session.cc',
219 'host/win/rdp_desktop_session.h',
220 'host/win/unprivileged_process_delegate.cc',
221 'host/win/unprivileged_process_delegate.h',
222 'host/win/worker_process_launcher.cc',
223 'host/win/worker_process_launcher.h',
224 'host/win/wts_session_process_delegate.cc',
225 'host/win/wts_session_process_delegate.h',
226 'host/worker_process_ipc_delegate.h',
230 'EmbedManifest': 'true',
231 'AdditionalManifestFiles': [
232 'host/win/common-controls.manifest',
236 'AdditionalDependencies': [
243 'AdditionalOptions': [
244 # Export the proxy/stub entry points. Note that the generated
245 # routines have 'Ps' prefix to avoid conflicts with our own
247 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
248 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
249 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
250 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
255 # atlapp.h contains a global "using namespace WTL;".
256 # TODO: Remove once remoting/host/verify_config_window_win.h no
257 # longer depends on atlapp.h, http://crbug.com/5027
258 'VCCLCompilerTool': {
259 'AdditionalOptions': ['-Wno-header-hygiene'],
264 }, # end of target 'remoting_core'
266 'target_name': 'remoting_desktop',
267 'type': 'executable',
268 'variables': { 'enable_wexit_time_destructors': 1, },
270 'BINARY=BINARY_DESKTOP',
274 'remoting_windows_resources',
277 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
278 'host/win/entry_point.cc',
282 'AdditionalManifestFiles': [
283 'host/win/dpi_aware.manifest',
288 # Add 'level="requireAdministrator" uiAccess="true"' to
289 # the manifest only for the official builds because it requires
290 # the binary to be signed to work.
292 ['buildtype == "Official"', {
293 'UACExecutionLevel': 2,
294 'UACUIAccess': 'true',
297 'EntryPointSymbol': 'HostEntryPoint',
298 'IgnoreAllDefaultLibraries': 'true',
299 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
302 }, # end of target 'remoting_desktop'
304 'target_name': 'remoting_me2me_host',
305 'product_name': 'remoting_host',
306 'type': 'executable',
307 'variables': { 'enable_wexit_time_destructors': 1, },
309 'BINARY=BINARY_HOST_ME2ME',
313 'remoting_windows_resources',
316 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
317 'host/win/entry_point.cc',
321 'AdditionalManifestFiles': [
322 'host/win/dpi_aware.manifest',
326 'EntryPointSymbol': 'HostEntryPoint',
327 'IgnoreAllDefaultLibraries': 'true',
328 'OutputFile': '$(OutDir)\\remoting_host.exe',
329 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
332 }, # end of target 'remoting_me2me_host'
334 'target_name': 'remoting_me2me_native_messaging_host',
335 'type': 'executable',
336 'product_name': 'remoting_native_messaging_host',
337 'variables': { 'enable_wexit_time_destructors': 1, },
339 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
343 'remoting_windows_resources',
346 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
347 'host/setup/me2me_native_messaging_host_entry_point.cc',
351 'IgnoreAllDefaultLibraries': 'true',
352 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
355 }, # end of target 'remoting_me2me_native_messaging_host'
357 'target_name': 'remoting_it2me_native_messaging_host',
358 'type': 'executable',
359 'product_name': 'remote_assistance_host',
360 'variables': { 'enable_wexit_time_destructors': 1, },
363 'remoting_windows_resources',
366 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
367 'host/it2me/it2me_native_messaging_host_entry_point.cc',
370 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
374 'EmbedManifest': 'true',
375 'AdditionalManifestFiles': [
376 'host/win/common-controls.manifest',
377 'host/win/dpi_aware.manifest',
381 'IgnoreAllDefaultLibraries': 'true',
382 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
383 'AdditionalDependencies': [
388 }, # end of target 'remoting_it2me_native_messaging_host'
390 'target_name': 'remoting_host_messages',
393 'remoting_resources',
395 'hard_dependency': 1,
396 'direct_dependent_settings': {
398 '<(SHARED_INTERMEDIATE_DIR)',
402 'host/win/host_messages.mc.jinja2'
406 'rule_name': 'localize',
407 'extension': 'jinja2',
409 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
412 'python', '<(remoting_localize_path)',
413 '--locale_dir', '<(webapp_locale_dir)',
414 '--template', '<(RULE_INPUT_PATH)',
415 '--output', '<@(_outputs)',
416 '--encoding', 'utf-16',
417 '<@(remoting_locales)',
419 'message': 'Localizing the event log messages'
422 }, # end of target 'remoting_host_messages'
424 # Generates localized resources for the Windows binaries.
425 # The substitution strings are taken from:
426 # - build/util/LASTCHANGE - the last source code revision. There is
427 # no explicit dependency on this file to avoid rebuilding the host
428 # after unrelated changes.
429 # - chrome/VERSION - the major, build & patch versions.
430 # - remoting/VERSION - the chromoting patch version (and overrides
431 # for chrome/VERSION).
432 # - translated webapp strings
434 'target_name': 'remoting_windows_resources',
437 'remoting_resources',
439 'hard_dependency': 1,
440 'direct_dependent_settings': {
442 '<(SHARED_INTERMEDIATE_DIR)',
446 'host/win/core.rc.jinja2',
447 'host/win/version.rc.jinja2',
451 'rule_name': 'version',
452 'extension': 'jinja2',
454 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
457 '<(chrome_version_path)',
458 '<(remoting_version_path)',
461 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
464 'python', '<(remoting_localize_path)',
465 '--variables', '<(chrome_version_path)',
466 # |remoting_version_path| must be after |chrome_version_path|
467 # because it can contain overrides for the version numbers.
468 '--variables', '<(remoting_version_path)',
469 '--variables', '<(lastchange_path)',
470 '--locale_dir', '<(webapp_locale_dir)',
471 '--template', '<(RULE_INPUT_PATH)',
472 '--output', '<@(_outputs)',
473 '--encoding', 'utf-16',
474 '<@(remoting_locales)',
476 'message': 'Localizing the version information'
479 }, # end of target 'remoting_windows_resources'
480 ], # end of 'targets'
483 # The host installation is generated only if WiX is available. If
484 # component build is used the produced installation will not work due to
485 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
487 ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
490 'target_name': 'remoting_host_installation',
493 'remoting_me2me_host_archive',
496 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
499 '<(PRODUCT_DIR)/chromoting.msi',
503 'rule_name': 'zip2msi',
509 '<(PRODUCT_DIR)/chromoting.msi',
512 'python', 'tools/zip2msi.py',
513 '--wix_path', '<(wix_path)',
514 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
515 '--target_arch', '<(target_arch)',
516 '<(RULE_INPUT_PATH)',
519 'message': 'Generating <@(_outputs)',
522 }, # end of target 'remoting_host_installation'
525 'target_name': 'remoting_me2me_host_archive',
528 '<(icu_gyp_path):icudata',
531 'remoting_it2me_native_messaging_host',
532 'remoting_me2me_host',
533 'remoting_me2me_native_messaging_host',
534 'remoting_native_messaging_manifests',
537 '<(PRODUCT_DIR)/remote_assistance_host.exe',
538 '<(PRODUCT_DIR)/remoting_core.dll',
539 '<(PRODUCT_DIR)/remoting_desktop.exe',
540 '<(PRODUCT_DIR)/remoting_host.exe',
541 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
543 'compiled_inputs_dst': [
544 'files/remote_assistance_host.exe',
545 'files/remoting_core.dll',
546 'files/remoting_desktop.exe',
547 'files/remoting_host.exe',
548 'files/remoting_native_messaging_host.exe',
551 ['buildtype == "Official"', {
555 }, { # else buildtype != "Official"
562 'BRANDING=<(branding)',
563 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
564 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
565 'VERSION=<(version_full)',
568 '<@(_compiled_inputs)',
569 '<(sas_dll_path)/sas.dll',
570 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
571 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
572 'resources/chromoting.ico',
573 '<(PRODUCT_DIR)/icudtl.dat',
575 'generated_files_dst': [
576 '<@(_compiled_inputs_dst)',
578 'files/com.google.chrome.remote_assistance.json',
579 'files/com.google.chrome.remote_desktop.json',
580 'files/chromoting.ico',
583 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
589 'action_name': 'Zip installer files for signing',
590 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
592 '<@(remoting_host_installer_win_files)',
595 '<@(_compiled_inputs)',
596 '<(sas_dll_path)/sas.dll',
598 'host/installer/build-installer-archive.py',
599 'resources/chromoting.ico',
605 'python', 'host/installer/build-installer-archive.py',
608 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
609 '--source-files', '<@(_source_files)',
610 '--generated-files', '<@(_generated_files)',
611 '--generated-files-dst', '<@(_generated_files_dst)',
612 '--defs', '<@(_defs)',
616 }, # end of target 'remoting_me2me_host_archive'
617 ], # end of 'targets'
618 }], # '<(wix_path) != ""'
620 ], # end of 'conditions'