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',
254 }, # end of target 'remoting_core'
256 'target_name': 'remoting_desktop',
257 'type': 'executable',
258 'variables': { 'enable_wexit_time_destructors': 1, },
260 'BINARY=BINARY_DESKTOP',
264 'remoting_windows_resources',
267 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
268 'host/win/entry_point.cc',
272 'AdditionalManifestFiles': [
273 'host/win/dpi_aware.manifest',
278 # Add 'level="requireAdministrator" uiAccess="true"' to
279 # the manifest only for the official builds because it requires
280 # the binary to be signed to work.
282 ['buildtype == "Official"', {
283 'UACExecutionLevel': 2,
284 'UACUIAccess': 'true',
287 'EntryPointSymbol': 'HostEntryPoint',
288 'IgnoreAllDefaultLibraries': 'true',
289 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
292 }, # end of target 'remoting_desktop'
294 'target_name': 'remoting_me2me_host',
295 'product_name': 'remoting_host',
296 'type': 'executable',
297 'variables': { 'enable_wexit_time_destructors': 1, },
299 'BINARY=BINARY_HOST_ME2ME',
303 'remoting_windows_resources',
306 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
307 'host/win/entry_point.cc',
311 'AdditionalManifestFiles': [
312 'host/win/dpi_aware.manifest',
316 'EntryPointSymbol': 'HostEntryPoint',
317 'IgnoreAllDefaultLibraries': 'true',
318 'OutputFile': '$(OutDir)\\remoting_host.exe',
319 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
322 }, # end of target 'remoting_me2me_host'
324 'target_name': 'remoting_me2me_native_messaging_host',
325 'type': 'executable',
326 'product_name': 'remoting_native_messaging_host',
327 'variables': { 'enable_wexit_time_destructors': 1, },
329 'BINARY=BINARY_NATIVE_MESSAGING_HOST',
333 'remoting_windows_resources',
336 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
337 'host/setup/me2me_native_messaging_host_entry_point.cc',
341 'IgnoreAllDefaultLibraries': 'true',
342 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
345 }, # end of target 'remoting_me2me_native_messaging_host'
347 'target_name': 'remoting_it2me_native_messaging_host',
348 'type': 'executable',
349 'product_name': 'remote_assistance_host',
350 'variables': { 'enable_wexit_time_destructors': 1, },
353 'remoting_windows_resources',
356 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
357 'host/it2me/it2me_native_messaging_host_entry_point.cc',
360 'BINARY=BINARY_REMOTE_ASSISTANCE_HOST',
364 'EmbedManifest': 'true',
365 'AdditionalManifestFiles': [
366 'host/win/common-controls.manifest',
367 'host/win/dpi_aware.manifest',
371 'IgnoreAllDefaultLibraries': 'true',
372 'SubSystem': '1', # /SUBSYSTEM:CONSOLE
373 'AdditionalDependencies': [
378 }, # end of target 'remoting_it2me_native_messaging_host'
380 'target_name': 'remoting_host_messages',
383 'remoting_resources',
385 'hard_dependency': 1,
386 'direct_dependent_settings': {
388 '<(SHARED_INTERMEDIATE_DIR)',
392 'host/win/host_messages.mc.jinja2'
396 'rule_name': 'localize',
397 'extension': 'jinja2',
399 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
402 'python', '<(remoting_localize_path)',
403 '--locale_dir', '<(webapp_locale_dir)',
404 '--template', '<(RULE_INPUT_PATH)',
405 '--output', '<@(_outputs)',
406 '--encoding', 'utf-16',
407 '<@(remoting_locales)',
409 'message': 'Localizing the event log messages'
412 }, # end of target 'remoting_host_messages'
414 # Generates localized resources for the Windows binaries.
415 # The substitution strings are taken from:
416 # - build/util/LASTCHANGE - the last source code revision. There is
417 # no explicit dependency on this file to avoid rebuilding the host
418 # after unrelated changes.
419 # - chrome/VERSION - the major, build & patch versions.
420 # - remoting/VERSION - the chromoting patch version (and overrides
421 # for chrome/VERSION).
422 # - translated webapp strings
424 'target_name': 'remoting_windows_resources',
427 'remoting_resources',
429 'hard_dependency': 1,
430 'direct_dependent_settings': {
432 '<(SHARED_INTERMEDIATE_DIR)',
436 'host/win/core.rc.jinja2',
437 'host/win/version.rc.jinja2',
441 'rule_name': 'version',
442 'extension': 'jinja2',
444 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
447 '<(chrome_version_path)',
448 '<(remoting_version_path)',
451 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
454 'python', '<(remoting_localize_path)',
455 '--variables', '<(chrome_version_path)',
456 # |remoting_version_path| must be after |chrome_version_path|
457 # because it can contain overrides for the version numbers.
458 '--variables', '<(remoting_version_path)',
459 '--variables', '<(lastchange_path)',
460 '--locale_dir', '<(webapp_locale_dir)',
461 '--template', '<(RULE_INPUT_PATH)',
462 '--output', '<@(_outputs)',
463 '--encoding', 'utf-16',
464 '<@(remoting_locales)',
466 'message': 'Localizing the version information'
469 }, # end of target 'remoting_windows_resources'
470 ], # end of 'targets'
473 # The host installation is generated only if WiX is available. If
474 # component build is used the produced installation will not work due to
475 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
477 ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
480 'target_name': 'remoting_host_installation',
483 'remoting_me2me_host_archive',
486 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
489 '<(PRODUCT_DIR)/chromoting.msi',
493 'rule_name': 'zip2msi',
499 '<(PRODUCT_DIR)/chromoting.msi',
502 'python', 'tools/zip2msi.py',
503 '--wix_path', '<(wix_path)',
504 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
505 '--target_arch', '<(target_arch)',
506 '<(RULE_INPUT_PATH)',
509 'message': 'Generating <@(_outputs)',
512 }, # end of target 'remoting_host_installation'
515 'target_name': 'remoting_me2me_host_archive',
518 '<(icu_gyp_path):icudata',
521 'remoting_it2me_native_messaging_host',
522 'remoting_me2me_host',
523 'remoting_me2me_native_messaging_host',
524 'remoting_native_messaging_manifests',
527 '<(PRODUCT_DIR)/remote_assistance_host.exe',
528 '<(PRODUCT_DIR)/remoting_core.dll',
529 '<(PRODUCT_DIR)/remoting_desktop.exe',
530 '<(PRODUCT_DIR)/remoting_host.exe',
531 '<(PRODUCT_DIR)/remoting_native_messaging_host.exe',
533 'compiled_inputs_dst': [
534 'files/remote_assistance_host.exe',
535 'files/remoting_core.dll',
536 'files/remoting_desktop.exe',
537 'files/remoting_host.exe',
538 'files/remoting_native_messaging_host.exe',
541 ['buildtype == "Official"', {
545 }, { # else buildtype != "Official"
552 'BRANDING=<(branding)',
553 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
554 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
555 'VERSION=<(version_full)',
558 '<@(_compiled_inputs)',
559 '<(sas_dll_path)/sas.dll',
560 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_assistance.json',
561 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
562 'resources/chromoting.ico',
563 '<(PRODUCT_DIR)/icudtl.dat',
565 'generated_files_dst': [
566 '<@(_compiled_inputs_dst)',
568 'files/com.google.chrome.remote_assistance.json',
569 'files/com.google.chrome.remote_desktop.json',
570 'files/chromoting.ico',
573 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
579 'action_name': 'Zip installer files for signing',
580 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
582 '<@(remoting_host_installer_win_files)',
585 '<@(_compiled_inputs)',
586 '<(sas_dll_path)/sas.dll',
588 'host/installer/build-installer-archive.py',
589 'resources/chromoting.ico',
595 'python', 'host/installer/build-installer-archive.py',
598 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
599 '--source-files', '<@(_source_files)',
600 '--generated-files', '<@(_generated_files)',
601 '--generated-files-dst', '<@(_generated_files_dst)',
602 '--defs', '<@(_defs)',
606 }, # end of target 'remoting_me2me_host_archive'
607 ], # end of 'targets'
608 }], # '<(wix_path) != ""'
610 ], # end of 'conditions'