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',
188 'remoting_me2me_host_static',
189 'remoting_native_messaging_base',
191 'remoting_windows_resources',
194 '<(SHARED_INTERMEDIATE_DIR)/remoting/core.rc',
195 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
196 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
197 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
198 'host/desktop_process_main.cc',
201 'host/ipc_constants.cc',
202 'host/ipc_constants.h',
203 'host/remoting_me2me_host.cc',
204 'host/sas_injector.h',
205 'host/sas_injector_win.cc',
206 'host/setup/me2me_native_messaging_host_main.cc',
207 'host/verify_config_window_win.cc',
208 'host/verify_config_window_win.h',
209 'host/win/chromoting_module.cc',
210 'host/win/chromoting_module.h',
212 'host/win/core_resource.h',
213 'host/win/elevated_controller.cc',
214 'host/win/elevated_controller.h',
215 'host/win/host_service.cc',
216 'host/win/host_service.h',
219 'host/win/rdp_desktop_session.cc',
220 'host/win/rdp_desktop_session.h',
221 'host/win/unprivileged_process_delegate.cc',
222 'host/win/unprivileged_process_delegate.h',
223 'host/win/worker_process_launcher.cc',
224 'host/win/worker_process_launcher.h',
225 'host/win/wts_session_process_delegate.cc',
226 'host/win/wts_session_process_delegate.h',
227 'host/worker_process_ipc_delegate.h',
231 'EmbedManifest': 'true',
232 'AdditionalManifestFiles': [
233 'host/win/common-controls.manifest',
237 'AdditionalDependencies': [
244 'AdditionalOptions': [
245 # Export the proxy/stub entry points. Note that the generated
246 # routines have 'Ps' prefix to avoid conflicts with our own
248 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
249 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
250 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
251 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
255 }, # end of target 'remoting_core'
257 'target_name': 'remoting_desktop',
258 'type': 'executable',
259 'variables': { 'enable_wexit_time_destructors': 1, },
261 'BINARY=BINARY_DESKTOP',
265 'remoting_windows_resources',
268 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
269 'host/win/entry_point.cc',
273 'AdditionalManifestFiles': [
274 'host/win/dpi_aware.manifest',
279 # Add 'level="requireAdministrator" uiAccess="true"' to
280 # the manifest only for the official builds because it requires
281 # the binary to be signed to work.
283 ['buildtype == "Official"', {
284 'UACExecutionLevel': 2,
285 'UACUIAccess': 'true',
288 'EntryPointSymbol': 'HostEntryPoint',
289 'IgnoreAllDefaultLibraries': 'true',
290 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
293 }, # end of target 'remoting_desktop'
295 'target_name': 'remoting_host_exe',
296 'product_name': 'remoting_host',
297 'type': 'executable',
298 'variables': { 'enable_wexit_time_destructors': 1, },
300 'BINARY=BINARY_HOST_ME2ME',
304 'remoting_windows_resources',
307 '<(SHARED_INTERMEDIATE_DIR)/remoting/version.rc',
308 'host/win/entry_point.cc',
312 'AdditionalManifestFiles': [
313 'host/win/dpi_aware.manifest',
317 'EntryPointSymbol': 'HostEntryPoint',
318 'IgnoreAllDefaultLibraries': 'true',
319 'ImportLibrary': '$(OutDir)\\lib\\remoting_host_exe.lib',
320 'OutputFile': '$(OutDir)\\remoting_host.exe',
321 'SubSystem': '2', # /SUBSYSTEM:WINDOWS
324 }, # end of target 'remoting_host_exe'
326 'target_name': 'remoting_host_messages',
329 'remoting_resources',
331 'hard_dependency': 1,
332 'direct_dependent_settings': {
334 '<(SHARED_INTERMEDIATE_DIR)',
338 'host/win/host_messages.mc.jinja2'
342 'rule_name': 'localize',
343 'extension': 'jinja2',
345 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.mc',
348 'python', '<(remoting_localize_path)',
349 '--locale_dir', '<(webapp_locale_dir)',
350 '--template', '<(RULE_INPUT_PATH)',
351 '--output', '<@(_outputs)',
352 '--encoding', 'utf-16',
353 '<@(remoting_locales)',
355 'message': 'Localizing the event log messages'
358 }, # end of target 'remoting_host_messages'
360 # Generates localized resources for the Windows binaries.
361 # The substitution strings are taken from:
362 # - build/util/LASTCHANGE - the last source code revision. There is
363 # no explicit dependency on this file to avoid rebuilding the host
364 # after unrelated changes.
365 # - chrome/VERSION - the major, build & patch versions.
366 # - remoting/VERSION - the chromoting patch version (and overrides
367 # for chrome/VERSION).
368 # - translated webapp strings
370 'target_name': 'remoting_windows_resources',
373 'remoting_resources',
375 'hard_dependency': 1,
376 'direct_dependent_settings': {
378 '<(SHARED_INTERMEDIATE_DIR)',
382 'host/win/core.rc.jinja2',
383 'host/win/version.rc.jinja2',
387 'rule_name': 'version',
388 'extension': 'jinja2',
390 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
393 '<(chrome_version_path)',
394 '<(remoting_version_path)',
395 '<(RULE_INPUT_PATH)',
398 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)',
401 'python', '<(remoting_localize_path)',
402 '--variables', '<(chrome_version_path)',
403 # |remoting_version_path| must be after |chrome_version_path|
404 # because it can contain overrides for the version numbers.
405 '--variables', '<(remoting_version_path)',
406 '--variables', '<(lastchange_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 version information'
416 }, # end of target 'remoting_windows_resources'
417 ], # end of 'targets'
420 # The host installation is generated only if WiX is available. If
421 # component build is used the produced installation will not work due to
422 # missing DLLs. We build it anyway to make sure the GYP scripts are executed
424 ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
427 'target_name': 'remoting_host_installation',
430 'remoting_me2me_host_archive',
433 '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
436 '<(PRODUCT_DIR)/chromoting.msi',
440 'rule_name': 'zip2msi',
446 '<(PRODUCT_DIR)/chromoting.msi',
449 'python', 'tools/zip2msi.py',
450 '--wix_path', '<(wix_path)',
451 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
452 '<(RULE_INPUT_PATH)',
455 'message': 'Generating <@(_outputs)',
458 }, # end of target 'remoting_host_installation'
461 'target_name': 'remoting_me2me_host_archive',
464 '<(icu_gyp_path):icudata',
468 'remoting_native_messaging_manifests',
471 '<(PRODUCT_DIR)/remoting_core.dll',
472 '<(PRODUCT_DIR)/remoting_desktop.exe',
473 '<(PRODUCT_DIR)/remoting_host.exe',
475 'compiled_inputs_dst': [
476 'files/remoting_core.dll',
477 'files/remoting_desktop.exe',
478 'files/remoting_host.exe',
481 ['buildtype == "Official"', {
485 }, { # else buildtype != "Official"
492 'BRANDING=<(branding)',
493 'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
494 'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
495 'VERSION=<(version_full)',
498 '<@(_compiled_inputs)',
499 '<(sas_dll_path)/sas.dll',
500 '<(PRODUCT_DIR)/remoting/com.google.chrome.remote_desktop.json',
501 'resources/chromoting.ico',
502 '<(PRODUCT_DIR)/icudtl.dat',
504 'generated_files_dst': [
505 '<@(_compiled_inputs_dst)',
507 'files/com.google.chrome.remote_desktop.json',
508 'files/chromoting.ico',
511 'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
517 'action_name': 'Zip installer files for signing',
518 'temp_dir': '<(INTERMEDIATE_DIR)/installation',
520 '<@(remoting_host_installer_win_files)',
523 '<@(_compiled_inputs)',
524 '<(sas_dll_path)/sas.dll',
526 'host/installer/build-installer-archive.py',
527 'resources/chromoting.ico',
533 'python', 'host/installer/build-installer-archive.py',
536 '--source-file-roots', '<@(remoting_host_installer_win_roots)',
537 '--source-files', '<@(_source_files)',
538 '--generated-files', '<@(_generated_files)',
539 '--generated-files-dst', '<@(_generated_files_dst)',
540 '--defs', '<@(_defs)',
544 }, # end of target 'remoting_me2me_host_archive'
545 ], # end of 'targets'
546 }], # '<(wix_path) != ""'
548 ], # end of 'conditions'