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/ipc_constants.cc',
203 'host/ipc_constants.h',
204 'host/it2me/it2me_native_messaging_host_main.cc',
205 'host/it2me/it2me_native_messaging_host_main.h',
206 'host/remoting_me2me_host.cc',
207 'host/sas_injector.h',
208 'host/sas_injector_win.cc',
209 'host/setup/me2me_native_messaging_host.cc',
210 'host/setup/me2me_native_messaging_host.h',
211 'host/setup/me2me_native_messaging_host_main.cc',
212 'host/setup/me2me_native_messaging_host_main.h',
213 'host/verify_config_window_win.cc',
214 'host/verify_config_window_win.h',
215 'host/win/chromoting_module.cc',
216 'host/win/chromoting_module.h',
218 'host/win/core_resource.h',
219 'host/win/elevated_controller.cc',
220 'host/win/elevated_controller.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',
261 }, # end of target 'remoting_core'
263 'target_name': 'remoting_desktop',
264 'type': 'executable',
265 'variables': { 'enable_wexit_time_destructors': 1, },
267 'BINARY=BINARY_DESKTOP',
271 'remoting_windows_resources',
274 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
275 'host/win/entry_point.cc',
279 'AdditionalManifestFiles': [
280 'host/win/dpi_aware.manifest',
285 # Add 'level="requireAdministrator" uiAccess="true"' to
286 # the manifest only for the official builds because it requires
287 # the binary to be signed to work.
289 ['buildtype == "Official"', {
290 'UACExecutionLevel': 2,
291 'UACUIAccess': 'true',
294 'EntryPointSymbol': 'HostEntryPoint',
295 'IgnoreAllDefaultLibraries': 'true',
296 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
299 }, # end of target 'remoting_desktop'
301 'target_name': 'remoting_me2me_host',
302 'product_name': 'remoting_host',
303 'type': 'executable',
304 'variables': { 'enable_wexit_time_destructors': 1, },
306 'BINARY=BINARY_HOST_ME2ME',
310 'remoting_windows_resources',
313 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
314 'host/win/entry_point.cc',
318 'AdditionalManifestFiles': [
319 'host/win/dpi_aware.manifest',
323 'EntryPointSymbol': 'HostEntryPoint',
324 'IgnoreAllDefaultLibraries': 'true',
325 'OutputFile': '$(OutDir)\\remoting_host.exe',
326 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
329 }, # end of target 'remoting_me2me_host'
331 'target_name': 'remoting_me2me_native_messaging_host',
332 'type': 'executable',
333 'product_name': 'remoting_native_messaging_host',
334 'variables': { 'enable_wexit_time_destructors': 1, },
336 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
340 'remoting_windows_resources',
343 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
344 'host/setup/me2me_native_messaging_host_entry_point.cc',
348 'IgnoreAllDefaultLibraries': 'true',
349 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
352 }, # end of target 'remoting_me2me_native_messaging_host'
354 'target_name': 'remoting_it2me_native_messaging_host',
355 'type': 'executable',
356 'product_name': 'remote_assistance_host',
357 'variables': { 'enable_wexit_time_destructors': 1, },
360 'remoting_windows_resources',
363 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
364 'host/it2me/it2me_native_messaging_host_entry_point.cc',
367 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
371 'EmbedManifest': 'true',
372 'AdditionalManifestFiles': [
373 'host/win/common-controls.manifest',
374 'host/win/dpi_aware.manifest',
378 'IgnoreAllDefaultLibraries': 'true',
379 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
380 'AdditionalDependencies': [
385 }, # end of target 'remoting_it2me_native_messaging_host'
387 'target_name': 'remoting_host_messages',
390 'remoting_resources',
392 'hard_dependency': 1,
393 'direct_dependent_settings': {
395 '<(SHARED_INTERMEDIATE_DIR)',
399 'host/win/host_messages.mc.jinja2'
403 'rule_name': 'localize',
404 'extension': 'jinja2',
406 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
409 'python', '<(remoting_localize_path)',
410 '--locale_dir', '<(webapp_locale_dir)',
411 '--template', '<(RULE_INPUT_PATH)',
412 '--output', '<@(_outputs)',
413 '--encoding', 'utf-16',
414 '<@(remoting_locales)',
416 'message': 'Localizing the event log messages'
419 }, # end of target 'remoting_host_messages'
421 # Generates localized resources for the Windows binaries.
422 # The substitution strings are taken from:
423 # - build/util/LASTCHANGE - the last source code revision. There is
424 # no explicit dependency on this file to avoid rebuilding the host
425 # after unrelated changes.
426 # - chrome/VERSION - the major, build & patch versions.
427 # - remoting/VERSION - the chromoting patch version (and overrides
428 # for chrome/VERSION).
429 # - translated webapp strings
431 'target_name': 'remoting_windows_resources',
434 'remoting_resources',
436 'hard_dependency': 1,
437 'direct_dependent_settings': {
439 '<(SHARED_INTERMEDIATE_DIR)',
443 'host/win/core.rc.jinja2',
444 'host/win/version.rc.jinja2',
448 'rule_name': 'version',
449 'extension': 'jinja2',
451 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
454 '<(chrome_version_path)',
455 '<(remoting_version_path)',
458 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
461 'python', '<(remoting_localize_path)',
462 '--variables', '<(chrome_version_path)',
463 # |remoting_version_path| must be after |chrome_version_path|
464 # because it can contain overrides for the version numbers.
465 '--variables', '<(remoting_version_path)',
466 '--variables', '<(lastchange_path)',
467 '--locale_dir', '<(webapp_locale_dir)',
468 '--template', '<(RULE_INPUT_PATH)',
469 '--output', '<@(_outputs)',
470 '--encoding', 'utf-16',
471 '<@(remoting_locales)',
473 'message': 'Localizing the version information'
476 }, # end of target 'remoting_windows_resources'
477 ], # end of 'targets'
480 # The host installation is generated only if WiX is available. If
481 # component build is used the produced installation will not work due to
482 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
484 ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
487 'target_name': 'remoting_host_installation',
490 'remoting_me2me_host_archive',
493 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
496 '<(PRODUCT_DIR)/chromoting.msi',
500 'rule_name': 'zip2msi',
506 '<(PRODUCT_DIR)/chromoting.msi',
509 'python', 'tools/zip2msi.py',
510 '--wix_path', '<(wix_path)',
511 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
512 '<(RULE_INPUT_PATH)',
515 'message': 'Generating <@(_outputs)',
518 }, # end of target 'remoting_host_installation'
521 'target_name': 'remoting_me2me_host_archive',
524 '<(icu_gyp_path):icudata',
527 'remoting_it2me_native_messaging_host',
528 'remoting_me2me_host',
529 'remoting_me2me_native_messaging_host',
530 'remoting_native_messaging_manifests',
533 '<(PRODUCT_DIR)/remote_assistance_host.exe',
534 '<(PRODUCT_DIR)/remoting_core.dll',
535 '<(PRODUCT_DIR)/remoting_desktop.exe',
536 '<(PRODUCT_DIR)/remoting_host.exe',
537 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
539 'compiled_inputs_dst': [
540 'files/remote_assistance_host.exe',
541 'files/remoting_core.dll',
542 'files/remoting_desktop.exe',
543 'files/remoting_host.exe',
544 'files/remoting_native_messaging_host.exe',
547 ['buildtype == "Official"', {
551 }, { # else buildtype != "Official"
558 'BRANDING=<(branding)',
559 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
560 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
561 'VERSION=<(version_full)',
564 '<@(_compiled_inputs)',
565 '<(sas_dll_path)/sas.dll',
566 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
567 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
568 'resources/chromoting.ico',
569 '<(PRODUCT_DIR)/icudtl.dat',
571 'generated_files_dst': [
572 '<@(_compiled_inputs_dst)',
574 'files/com.google.chrome.remote_assistance.json',
575 'files/com.google.chrome.remote_desktop.json',
576 'files/chromoting.ico',
579 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
585 'action_name': 'Zip installer files for signing',
586 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
588 '<@(remoting_host_installer_win_files)',
591 '<@(_compiled_inputs)',
592 '<(sas_dll_path)/sas.dll',
594 'host/installer/build-installer-archive.py',
595 'resources/chromoting.ico',
601 'python', 'host/installer/build-installer-archive.py',
604 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
605 '--source-files', '<@(_source_files)',
606 '--generated-files', '<@(_generated_files)',
607 '--generated-files-dst', '<@(_generated_files_dst)',
608 '--defs', '<@(_defs)',
612 }, # end of target 'remoting_me2me_host_archive'
613 ], # end of 'targets'
614 }], # '<(wix_path) != ""'
616 ], # end of 'conditions'