Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / remoting / remoting.gyp
blob596a73740a88adbc18fade004725891885df3aae
1 # Copyright (c) 2012 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.
6   'variables': {
7     # TODO(dmaclach): can we pick this up some other way? Right now it's
8     # duplicated from chrome.gyp
9     'chromium_code': 1,
11     'variables': {
12       'conditions': [
13         # Enable the multi-process host on Windows by default.
14         ['OS=="win"', {
15           'remoting_multi_process%': 1,
16         }, {
17           'remoting_multi_process%': 0,
18         }],
19       ],
20     },
22     'remoting_multi_process%': '<(remoting_multi_process)',
23     'remoting_rdp_session%': 0,
24     'remoting_use_apps_v2%': 0,
26     # The |major|, |build| and |patch| versions are inherited from Chrome.
27     # Since Chrome's |minor| version is always '0', we replace it with a
28     # Chromoting-specific patch version.
29     # Note that we check both the |chrome_version_path| file and the
30     # |remoting_version_path| so that we can override the Chrome version
31     # numbers if needed.
32     'version_py_path': '../chrome/tools/build/version.py',
33     'remoting_version_path': '../remoting/VERSION',
34     'chrome_version_path': '../chrome/VERSION',
35     'version_major':
36       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@MAJOR@")',
37     'version_minor':
38       '<!(python <(version_py_path) -f <(remoting_version_path) -t "@REMOTING_PATCH@")',
39     'version_short':
40       '<(version_major).<(version_minor).'
41       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@BUILD@")',
42     'version_full':
43       '<(version_short).'
44       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@PATCH@")',
46     'branding_path': '../remoting/branding_<(branding)',
47     'copyright_info': '<!(python <(version_py_path) -f <(branding_path) -t "@COPYRIGHT@")',
49     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
51     # Use consistent strings across all platforms.
52     # These values must match host/plugin/constants.h
53     'host_plugin_mime_type': 'application/vnd.chromium.remoting-host',
54     'host_plugin_description': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_DESCRIPTION@")',
55     'host_plugin_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
57     'conditions': [
58       # Remoting host is supported only on Windows, OSX and Linux (with X11).
59       ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0 and use_x11==1)', {
60         'enable_remoting_host': 1,
61       }, {
62         'enable_remoting_host': 0,
63       }],
64       ['OS=="mac"', {
65         'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
66         'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
67         'host_plugin_extension': 'plugin',
68         'host_plugin_prefix': '',
69       }],
70       ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
71         # linux 32 bit
72         'host_plugin_extension': 'ia32.so',
73         'host_plugin_prefix': 'lib',
74       }],
75       ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
76         # linux 64 bit
77         'host_plugin_extension': 'x64.so',
78         'host_plugin_prefix': 'lib',
79       }],
80       ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
81         'host_plugin_extension': 'arm.so',
82         'host_plugin_prefix': 'lib',
83       }],
84       ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
85         'host_plugin_extension': 'mipsel.so',
86         'host_plugin_prefix': 'lib',
87       }],
88       ['OS=="win"', {
89         'host_plugin_extension': 'dll',
90         'host_plugin_prefix': '',
91       }],
92       ['OS=="win"', {
93         # Use auto-generated CLSIDs to make sure that the newly installed COM
94         # classes will be used during/after upgrade even if there are old
95         # instances running already.
96         # The parameter passed to uuidgen.py is ignored, but needed to make sure
97         # that the script will be invoked separately for each CLSID. Otherwise
98         # GYP will reuse the value returned by the first invocation of
99         # the script.
100         'daemon_controller_clsid': '<!(python tools/uuidgen.py 1)',
101         'rdp_desktop_session_clsid': '<!(python tools/uuidgen.py 2)',
102       }],
103     ],
104     'remoting_webapp_locale_files': [
105       '<(webapp_locale_dir)/ar/messages.json',
106       '<(webapp_locale_dir)/bg/messages.json',
107       '<(webapp_locale_dir)/ca/messages.json',
108       '<(webapp_locale_dir)/cs/messages.json',
109       '<(webapp_locale_dir)/da/messages.json',
110       '<(webapp_locale_dir)/de/messages.json',
111       '<(webapp_locale_dir)/el/messages.json',
112       '<(webapp_locale_dir)/en/messages.json',
113       '<(webapp_locale_dir)/en_GB/messages.json',
114       '<(webapp_locale_dir)/es/messages.json',
115       '<(webapp_locale_dir)/es_419/messages.json',
116       '<(webapp_locale_dir)/et/messages.json',
117       '<(webapp_locale_dir)/fi/messages.json',
118       '<(webapp_locale_dir)/fil/messages.json',
119       '<(webapp_locale_dir)/fr/messages.json',
120       '<(webapp_locale_dir)/he/messages.json',
121       '<(webapp_locale_dir)/hi/messages.json',
122       '<(webapp_locale_dir)/hr/messages.json',
123       '<(webapp_locale_dir)/hu/messages.json',
124       '<(webapp_locale_dir)/id/messages.json',
125       '<(webapp_locale_dir)/it/messages.json',
126       '<(webapp_locale_dir)/ja/messages.json',
127       '<(webapp_locale_dir)/ko/messages.json',
128       '<(webapp_locale_dir)/lt/messages.json',
129       '<(webapp_locale_dir)/lv/messages.json',
130       '<(webapp_locale_dir)/nb/messages.json',
131       '<(webapp_locale_dir)/nl/messages.json',
132       '<(webapp_locale_dir)/pl/messages.json',
133       '<(webapp_locale_dir)/pt_BR/messages.json',
134       '<(webapp_locale_dir)/pt_PT/messages.json',
135       '<(webapp_locale_dir)/ro/messages.json',
136       '<(webapp_locale_dir)/ru/messages.json',
137       '<(webapp_locale_dir)/sk/messages.json',
138       '<(webapp_locale_dir)/sl/messages.json',
139       '<(webapp_locale_dir)/sr/messages.json',
140       '<(webapp_locale_dir)/sv/messages.json',
141       '<(webapp_locale_dir)/th/messages.json',
142       '<(webapp_locale_dir)/tr/messages.json',
143       '<(webapp_locale_dir)/uk/messages.json',
144       '<(webapp_locale_dir)/vi/messages.json',
145       '<(webapp_locale_dir)/zh_CN/messages.json',
146       '<(webapp_locale_dir)/zh_TW/messages.json',
147     ],
148     'remoting_webapp_files': [
149       'resources/chromoting16.webp',
150       'resources/chromoting48.webp',
151       'resources/chromoting128.webp',
152       'resources/disclosure_arrow_down.webp',
153       'resources/disclosure_arrow_right.webp',
154       'resources/host_setup_instructions.webp',
155       'resources/icon_cross.webp',
156       'resources/icon_host.webp',
157       'resources/icon_pencil.webp',
158       'resources/icon_warning.webp',
159       'resources/infographic_my_computers.webp',
160       'resources/infographic_remote_assistance.webp',
161       'resources/tick.webp',
162       'webapp/connection_history.css',
163       'webapp/connection_stats.css',
164       'webapp/main.css',
165       'webapp/main.html',
166       'webapp/manifest.json',
167       'webapp/menu_button.css',
168       'webapp/oauth2_callback.html',
169       'webapp/open_sans.css',
170       'webapp/open_sans.woff',
171       'webapp/scale-to-fit.webp',
172       'webapp/spinner.gif',
173       'webapp/toolbar.css',
174       'webapp/wcs_sandbox.html',
175     ],
176     'remoting_webapp_js_files': [
177       'webapp/client_plugin.js',
178       'webapp/client_plugin_async.js',
179       'webapp/client_screen.js',
180       'webapp/client_session.js',
181       'webapp/clipboard.js',
182       'webapp/connection_history.js',
183       'webapp/connection_stats.js',
184       'webapp/cs_oauth2_trampoline.js',
185       'webapp/error.js',
186       'webapp/event_handlers.js',
187       'webapp/format_iq.js',
188       'webapp/host.js',
189       'webapp/host_controller.js',
190       'webapp/host_list.js',
191       'webapp/host_native_messaging.js',
192       'webapp/host_plugin_wrapper.js',
193       'webapp/host_screen.js',
194       'webapp/host_session.js',
195       'webapp/host_settings.js',
196       'webapp/host_setup_dialog.js',
197       'webapp/host_table_entry.js',
198       'webapp/l10n.js',
199       'webapp/log_to_server.js',
200       'webapp/menu_button.js',
201       'webapp/oauth2.js',
202       'webapp/oauth2_callback.js',
203       'webapp/plugin_settings.js',
204       'webapp/xhr_proxy.js',
205       'webapp/remoting.js',
206       'webapp/session_connector.js',
207       'webapp/server_log_entry.js',
208       'webapp/stats_accumulator.js',
209       'webapp/storage.js',
210       'webapp/survey.js',
211       'webapp/toolbar.js',
212       'webapp/ui_mode.js',
213       'webapp/wcs.js',
214       'webapp/wcs_loader.js',
215       'webapp/wcs_sandbox_container.js',
216       'webapp/wcs_sandbox_content.js',
217       'webapp/xhr.js',
218     ],
219     'remoting_host_installer_mac_roots': [
220       'host/installer/mac/',
221       '<(DEPTH)/chrome/installer/mac/',
222     ],
223     'remoting_host_installer_mac_files': [
224       'host/installer/mac/do_signing.sh',
225       'host/installer/mac/do_signing.props',
226       'host/installer/mac/ChromotingHost.pkgproj',
227       'host/installer/mac/ChromotingHostService.pkgproj',
228       'host/installer/mac/ChromotingHostUninstaller.pkgproj',
229       'host/installer/mac/LaunchAgents/org.chromium.chromoting.plist',
230       'host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh',
231       'host/installer/mac/Config/org.chromium.chromoting.conf',
232       'host/installer/mac/Scripts/keystone_install.sh',
233       'host/installer/mac/Scripts/remoting_postflight.sh',
234       'host/installer/mac/Scripts/remoting_preflight.sh',
235       'host/installer/mac/Keystone/GoogleSoftwareUpdate.pkg',
236       '<(DEPTH)/chrome/installer/mac/pkg-dmg',
237     ],
238     'remoting_host_installer_win_roots': [
239       'host/installer/win/',
240     ],
241     'remoting_host_installer_win_files': [
242       'host/installer/win/chromoting.wxs',
243       'host/installer/win/parameters.json',
244     ],
245   },
247   'includes': [
248     '../chrome/js_unittest_vars.gypi',
249   ],
251   'target_defaults': {
252     'defines': [
253     ],
254     'include_dirs': [
255       '..',  # Root of Chrome checkout
256     ],
257     'variables': {
258       'win_debug_RuntimeChecks': '0',
259     },
260     'conditions': [
261       ['OS=="mac" and mac_breakpad==1', {
262         'defines': [
263           'REMOTING_ENABLE_BREAKPAD'
264         ],
265       }],
266       ['OS=="win" and buildtype == "Official"', {
267         'defines': [
268           'REMOTING_ENABLE_BREAKPAD'
269         ],
270       }],
271       ['OS=="win" and remoting_multi_process != 0 and \
272           remoting_rdp_session != 0', {
273         'defines': [
274           'REMOTING_RDP_SESSION',
275         ],
276       }],
277       ['remoting_multi_process != 0', {
278         'defines': [
279           'REMOTING_MULTI_PROCESS',
280         ],
281       }],
282     ],
283   },
285   'conditions': [
286     ['enable_remoting_host==1', {
287       'targets': [
288         {
289           'target_name': 'remoting_host',
290           'type': 'static_library',
291           'variables': { 'enable_wexit_time_destructors': 1, },
292           'dependencies': [
293             'remoting_base',
294             'remoting_jingle_glue',
295             'remoting_protocol',
296             '../crypto/crypto.gyp:crypto',
297             '../google_apis/google_apis.gyp:google_apis',
298             '../media/media.gyp:media',
299             '../ipc/ipc.gyp:ipc',
300           ],
301           'defines': [
302             'VERSION=<(version_full)',
303           ],
304           'sources': [
305             'host/audio_capturer.cc',
306             'host/audio_capturer.h',
307             'host/audio_capturer_linux.cc',
308             'host/audio_capturer_linux.h',
309             'host/audio_capturer_mac.cc',
310             'host/audio_capturer_win.cc',
311             'host/audio_capturer_win.h',
312             'host/audio_scheduler.cc',
313             'host/audio_scheduler.h',
314             'host/audio_silence_detector.cc',
315             'host/audio_silence_detector.h',
316             'host/basic_desktop_environment.cc',
317             'host/basic_desktop_environment.h',
318             'host/capture_scheduler.cc',
319             'host/capture_scheduler.h',
320             'host/chromoting_host.cc',
321             'host/chromoting_host.h',
322             'host/chromoting_host_context.cc',
323             'host/chromoting_host_context.h',
324             'host/chromoting_messages.cc',
325             'host/chromoting_messages.h',
326             'host/client_session.cc',
327             'host/client_session.h',
328             'host/client_session_control.h',
329             'host/clipboard.h',
330             'host/clipboard_linux.cc',
331             'host/clipboard_mac.mm',
332             'host/clipboard_win.cc',
333             'host/config_file_watcher.cc',
334             'host/config_file_watcher.h',
335             'host/constants_mac.cc',
336             'host/constants_mac.h',
337             'host/continue_window.h',
338             'host/continue_window_gtk.cc',
339             'host/continue_window_mac.mm',
340             'host/continue_window_win.cc',
341             'host/desktop_environment.h',
342             'host/desktop_resizer.h',
343             'host/desktop_resizer_linux.cc',
344             'host/desktop_resizer_mac.cc',
345             'host/desktop_resizer_win.cc',
346             'host/desktop_session_connector.h',
347             'host/desktop_session_proxy.cc',
348             'host/desktop_session_proxy.h',
349             'host/disconnect_window_gtk.cc',
350             'host/disconnect_window_mac.h',
351             'host/disconnect_window_mac.mm',
352             'host/disconnect_window_win.cc',
353             'host/dns_blackhole_checker.cc',
354             'host/dns_blackhole_checker.h',
355             'host/heartbeat_sender.cc',
356             'host/heartbeat_sender.h',
357             'host/host_change_notification_listener.cc', 
358             'host/host_change_notification_listener.h',
359             'host/host_config.cc',
360             'host/host_config.h',
361             'host/host_exit_codes.h',
362             'host/host_port_allocator.cc',
363             'host/host_port_allocator.h',
364             'host/host_secret.cc',
365             'host/host_secret.h',
366             'host/host_status_monitor.h',
367             'host/host_status_observer.h',
368             'host/host_user_interface.cc',
369             'host/host_user_interface.h',
370             'host/host_window.h',
371             'host/host_window_proxy.cc',
372             'host/host_window_proxy.h',
373             'host/in_memory_host_config.cc',
374             'host/in_memory_host_config.h',
375             'host/input_injector.h',
376             'host/input_injector_linux.cc',
377             'host/input_injector_mac.cc',
378             'host/input_injector_win.cc',
379             'host/ipc_audio_capturer.cc',
380             'host/ipc_audio_capturer.h',
381             'host/ipc_constants.cc',
382             'host/ipc_constants.h',
383             'host/ipc_desktop_environment.cc',
384             'host/ipc_desktop_environment.h',
385             'host/ipc_host_event_logger.cc',
386             'host/ipc_host_event_logger.h',
387             'host/ipc_input_injector.cc',
388             'host/ipc_input_injector.h',
389             'host/ipc_screen_controls.cc',
390             'host/ipc_screen_controls.h',
391             'host/ipc_video_frame_capturer.cc',
392             'host/ipc_video_frame_capturer.h',
393             'host/it2me_host_user_interface.cc',
394             'host/it2me_host_user_interface.h',
395             'host/json_host_config.cc',
396             'host/json_host_config.h',
397             'host/linux/audio_pipe_reader.cc',
398             'host/linux/audio_pipe_reader.h',
399             'host/linux/x11_util.cc',
400             'host/linux/x11_util.h',
401             'host/linux/x_server_clipboard.cc',
402             'host/linux/x_server_clipboard.h',
403             'host/local_input_monitor.h',
404             'host/local_input_monitor_linux.cc',
405             'host/local_input_monitor_mac.mm',
406             'host/local_input_monitor_win.cc',
407             'host/log_to_server.cc',
408             'host/log_to_server.h',
409             'host/me2me_desktop_environment.cc',
410             'host/me2me_desktop_environment.h',
411             'host/mouse_clamping_filter.cc',
412             'host/mouse_clamping_filter.h',
413             'host/network_settings.h',
414             'host/pam_authorization_factory_posix.cc',
415             'host/pam_authorization_factory_posix.h',
416             'host/pin_hash.cc',
417             'host/pin_hash.h',
418             'host/policy_hack/policy_watcher.cc',
419             'host/policy_hack/policy_watcher.h',
420             'host/policy_hack/policy_watcher_linux.cc',
421             'host/policy_hack/policy_watcher_mac.mm',
422             'host/policy_hack/policy_watcher_win.cc',
423             'host/register_support_host_request.cc',
424             'host/register_support_host_request.h',
425             'host/remote_input_filter.cc',
426             'host/remote_input_filter.h',
427             'host/resizing_host_observer.cc',
428             'host/resizing_host_observer.h',
429             'host/sas_injector.h',
430             'host/sas_injector_win.cc',
431             'host/screen_controls.h',
432             'host/screen_resolution.cc',
433             'host/screen_resolution.h',
434             'host/server_log_entry.cc',
435             'host/server_log_entry.h',
436             'host/service_client.cc',
437             'host/service_client.h',
438             'host/service_urls.cc',
439             'host/service_urls.h',
440             'host/session_manager_factory.cc',
441             'host/session_manager_factory.h',
442             'host/signaling_connector.cc',
443             'host/signaling_connector.h',
444             'host/token_validator_factory_impl.cc',
445             'host/token_validator_factory_impl.h',
446             'host/ui_strings.cc',
447             'host/ui_strings.h',
448             'host/url_request_context.cc',
449             'host/url_request_context.h',
450             'host/usage_stats_consent.h',
451             'host/usage_stats_consent_mac.cc',
452             'host/usage_stats_consent_win.cc',
453             'host/video_scheduler.cc',
454             'host/video_scheduler.h',
455             'host/vlog_net_log.cc',
456             'host/vlog_net_log.h',
457             'host/win/launch_process_with_token.cc',
458             'host/win/launch_process_with_token.h',
459             'host/win/message_window.cc',
460             'host/win/message_window.h',
461             'host/win/omaha.cc',
462             'host/win/omaha.h',
463             'host/win/rdp_client.cc',
464             'host/win/rdp_client.h',
465             'host/win/rdp_client_window.cc',
466             'host/win/rdp_client_window.h',
467             'host/win/security_descriptor.cc',
468             'host/win/security_descriptor.h',
469             'host/win/session_desktop_environment.cc',
470             'host/win/session_desktop_environment.h',
471             'host/win/session_input_injector.cc',
472             'host/win/session_input_injector.h',
473             'host/win/window_station_and_desktop.cc',
474             'host/win/window_station_and_desktop.h',
475             'host/win/wts_terminal_monitor.cc',
476             'host/win/wts_terminal_monitor.h',
477             'host/win/wts_terminal_observer.h',
478           ],
479           'conditions': [
480             ['toolkit_uses_gtk==1', {
481               'dependencies': [
482                 '../build/linux/system.gyp:gtk',
483               ],
484             }, {  # else toolkit_uses_gtk!=1
485               'sources!': [
486                 '*_gtk.cc',
487               ],
488             }],
489             ['OS=="linux"', {
490               'link_settings': {
491                 'libraries': [
492                   '-lX11',
493                   '-lXext',
494                   '-lXfixes',
495                   '-lXtst',
496                   '-lXi',
497                   '-lpam',
498                 ],
499               },
500             }],
501             ['OS=="mac"', {
502               'sources': [
503                 '../third_party/GTM/AppKit/GTMCarbonEvent.h',
504                 '../third_party/GTM/AppKit/GTMCarbonEvent.m',
505                 '../third_party/GTM/DebugUtils/GTMDebugSelectorValidation.h',
506                 '../third_party/GTM/DebugUtils/GTMTypeCasting.h',
507                 '../third_party/GTM/Foundation/GTMObjectSingleton.h',
508                 '../third_party/GTM/GTMDefines.h',
509               ],
510               'include_dirs': [
511                 '../third_party/GTM',
512                 '../third_party/GTM/AppKit',
513                 '../third_party/GTM/DebugUtils',
514                 '../third_party/GTM/Foundation',
515               ],
516               'link_settings': {
517                 'libraries': [
518                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
519                   'libpam.a',
520                ],
521               },
522             }],
523             ['OS=="win"', {
524               'defines': [
525                 '_ATL_NO_EXCEPTIONS',
526                 'ISOLATION_AWARE_ENABLED=1',
527               ],
528               'dependencies': [
529                 '../sandbox/sandbox.gyp:sandbox',
530               ],
531               'msvs_settings': {
532                 'VCCLCompilerTool': {
533                   # /MP conflicts with #import directive so we limit the number
534                   # of processes to spawn to 1.
535                   'AdditionalOptions': ['/MP1'],
536                 },
537               },
538             }],
539           ],
540         },  # end of target 'remoting_host'
542         {
543           'target_name': 'remoting_me2me_host_static',
544           'type': 'static_library',
545           'variables': { 'enable_wexit_time_destructors': 1, },
546           'dependencies': [
547             '../base/base.gyp:base',
548             '../base/base.gyp:base_i18n',
549             '../media/media.gyp:media',
550             '../net/net.gyp:net',
551             'remoting_base',
552             'remoting_breakpad',
553             'remoting_host',
554             'remoting_host_event_logger',
555             'remoting_host_logging',
556             'remoting_jingle_glue',
557           ],
558           'defines': [
559             'VERSION=<(version_full)',
560           ],
561           'sources': [
562             'host/curtain_mode.h',
563             'host/curtaining_host_observer.h',
564             'host/curtaining_host_observer.cc',
565             'host/curtain_mode_linux.cc',
566             'host/curtain_mode_mac.cc',
567             'host/curtain_mode_win.cc',
568             'host/posix/signal_handler.cc',
569             'host/posix/signal_handler.h',
570           ],
571           'conditions': [
572             ['os_posix != 1', {
573               'sources/': [
574                 ['exclude', '^host/posix/'],
575               ],
576             }],
577           ],  # end of 'conditions'
578         },  # end of target 'remoting_me2me_host_static'
580         {
581           'target_name': 'remoting_host_keygen',
582           'type': 'executable',
583           'dependencies': [
584             'remoting_base',
585             '../base/base.gyp:base',
586             '../base/base.gyp:base_i18n',
587             '../crypto/crypto.gyp:crypto',
588           ],
589           'sources': [
590             'host/keygen_main.cc',
591           ],
592         },  # end of target 'remoting_host_keygen'
594         {
595           'target_name': 'remoting_host_setup_base',
596           'type': 'static_library',
597           'variables': { 'enable_wexit_time_destructors': 1, },
598           'dependencies': [
599             '../base/base.gyp:base',
600             '../google_apis/google_apis.gyp:google_apis',
601             'remoting_host',
602           ],
603           'sources': [
604             'host/setup/daemon_controller.h',
605             'host/setup/daemon_controller_linux.cc',
606             'host/setup/daemon_controller_mac.cc',
607             'host/setup/daemon_controller_win.cc',
608             'host/setup/daemon_installer_win.cc',
609             'host/setup/daemon_installer_win.h',
610             'host/setup/host_starter.cc',
611             'host/setup/host_starter.h',
612             'host/setup/oauth_helper.cc',
613             'host/setup/oauth_helper.h',
614             'host/setup/pin_validator.cc',
615             'host/setup/pin_validator.h',
616             'host/setup/win/auth_code_getter.cc',
617             'host/setup/win/auth_code_getter.h',
618           ],
619           'conditions': [
620             ['OS=="win"', {
621               'dependencies': [
622                 '../google_update/google_update.gyp:google_update',
623                 'remoting_lib_idl',
624               ],
625               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
626               'msvs_disabled_warnings': [4267, ],
627             }],
628           ],
629         },  # end of target 'remoting_host_setup_base'
631         {
632           'target_name': 'remoting_host_plugin',
633           'type': 'loadable_module',
634           'variables': { 'enable_wexit_time_destructors': 1, },
635           'product_extension': '<(host_plugin_extension)',
636           'product_prefix': '<(host_plugin_prefix)',
637           'dependencies': [
638             'remoting_base',
639             'remoting_host',
640             'remoting_host_event_logger',
641             'remoting_host_logging',
642             'remoting_host_setup_base',
643             'remoting_jingle_glue',
644             '../net/net.gyp:net',
645             '../third_party/npapi/npapi.gyp:npapi',
646           ],
647           'sources': [
648             'base/dispatch_win.h',
649             'host/win/core_resource.h',
650             'host/plugin/host_log_handler.cc',
651             'host/plugin/host_log_handler.h',
652             'host/plugin/host_plugin.cc',
653             'host/plugin/host_plugin_utils.cc',
654             'host/plugin/host_plugin_utils.h',
655             'host/plugin/host_script_object.cc',
656             'host/plugin/host_script_object.h',
657           ],
658           'conditions': [
659             ['OS=="mac"', {
660               'mac_bundle': 1,
661               'xcode_settings': {
662                 'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
663                 'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist',
664                 'INFOPLIST_PREPROCESS': 'YES',
665                 # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to
666                 # duplicate string once
667                 # http://code.google.com/p/gyp/issues/detail?id=243 is fixed.
668                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" HOST_PLUGIN_NAME="<(host_plugin_name)" HOST_PLUGIN_DESCRIPTION="<(host_plugin_description)"',
669               },
670               # TODO(mark): Come up with a fancier way to do this.  It should
671               # only be necessary to list host_plugin-Info.plist once, not the
672               # three times it is listed here.
673               'mac_bundle_resources': [
674                 'host/disconnect_window.xib',
675                 'host/plugin/host_plugin-Info.plist',
676                 'resources/chromoting16.png',
677                 'resources/chromoting48.png',
678                 'resources/chromoting128.png',
679               ],
680               'mac_bundle_resources!': [
681                 'host/plugin/host_plugin-Info.plist',
682               ],
683               'conditions': [
684                 ['mac_breakpad==1', {
685                   'variables': {
686                     # A real .dSYM is needed for dump_syms to operate on.
687                     'mac_real_dsym': 1,
688                   },
689                 }],
690               ],  # conditions
691             }],  # OS=="mac"
692             [ 'OS=="win"', {
693               'defines': [
694                 'ISOLATION_AWARE_ENABLED=1',
695               ],
696               'dependencies': [
697                 'remoting_lib_idl',
698                 'remoting_version_resources',
699               ],
700               'include_dirs': [
701                 '<(INTERMEDIATE_DIR)',
702               ],
703               'sources': [
704                 '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_plugin_version.rc',
705                 'host/win/core.rc',
706                 'host/plugin/host_plugin.def',
707               ],
708             }],
709           ],
710         },  # end of target 'remoting_host_plugin'
712       ],  # end of 'targets'
713     }],  # 'enable_remoting_host==1'
715     ['OS!="win" and enable_remoting_host==1', {
716       'conditions': [
717         ['OS=="linux" and branding=="Chrome" and chromeos==0', {
718           'variables': {
719             'deb_cmd': 'host/installer/linux/build-deb.sh',
720             'deb_filename': 'host/installer/<!(["<(deb_cmd)", "-p", "-s", "<(DEPTH)"])',
721             'packaging_outputs': [
722               '<(deb_filename)',
723               '<!(echo <(deb_filename) | sed -e "s/.deb$/.changes/")',
724               '<(PRODUCT_DIR)/remoting_me2me_host.debug',
725               '<(PRODUCT_DIR)/remoting_start_host.debug',
726             ]
727           },
728           'targets': [
729             {
730               # Store the installer package(s) into a zip file so there is a
731               # consistent filename to reference for build archiving (i.e. in
732               # FILES.cfg). This also avoids possible conflicts with "wildcard"
733               # package handling in other build/signing scripts.
734               'target_name': 'remoting_me2me_host_archive',
735               'type': 'none',
736               'dependencies': [
737                 'remoting_me2me_host_deb_installer',
738               ],
739               'actions': [
740                 {
741                   #'variables': {
742                   #  'deb_cmd': 'host/installer/linux/build-deb.sh',
743                   #},
744                   'action_name': 'build_linux_installer_zip',
745                   'inputs': [
746                     '<@(packaging_outputs)',
747                   ],
748                   'outputs': [
749                     '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
750                   ],
751                   'action': [ 'zip', '-j', '-0', '<@(_outputs)', '<@(_inputs)' ],
752                 },
753               ],
754             },
755             {
756               'target_name': 'remoting_me2me_host_deb_installer',
757               'type': 'none',
758               'dependencies': [
759                 'remoting_me2me_host',
760                 'remoting_start_host',
761               ],
762               'actions': [
763                 {
764                   'action_name': 'build_debian_package',
765                   'inputs': [
766                     '<(deb_cmd)',
767                     'host/installer/linux/Makefile',
768                     'host/installer/linux/debian/chrome-remote-desktop.init',
769                     'host/installer/linux/debian/chrome-remote-desktop.pam',
770                     'host/installer/linux/debian/compat',
771                     'host/installer/linux/debian/control',
772                     'host/installer/linux/debian/copyright',
773                     'host/installer/linux/debian/postinst',
774                     'host/installer/linux/debian/preinst',
775                     'host/installer/linux/debian/rules',
776                   ],
777                   'outputs': [
778                     '<@(packaging_outputs)',
779                   ],
780                   'action': [ '<(deb_cmd)', '-s', '<(DEPTH)' ],
781                 },
782               ],
783             },
784           ],
785         }],
786       ],
787       'targets': [
788         {
789           'target_name': 'remoting_me2me_host',
790           'type': 'executable',
791           'variables': { 'enable_wexit_time_destructors': 1, },
792           'dependencies': [
793             '../base/base.gyp:base',
794             '../base/base.gyp:base_i18n',
795             '../media/media.gyp:media',
796             '../net/net.gyp:net',
797             'remoting_base',
798             'remoting_breakpad',
799             'remoting_host',
800             'remoting_host_event_logger',
801             'remoting_host_logging',
802             'remoting_jingle_glue',
803             'remoting_me2me_host_static',
804           ],
805           'defines': [
806             'VERSION=<(version_full)',
807           ],
808           'sources': [
809             'host/host_main.cc',
810             'host/host_main.h',
811             'host/remoting_me2me_host.cc',
812           ],
813           'conditions': [
814             ['OS=="mac"', {
815               'mac_bundle': 1,
816               'variables': {
817                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
818               },
819               'xcode_settings': {
820                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
821                 'INFOPLIST_PREPROCESS': 'YES',
822                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
823               },
824               'mac_bundle_resources': [
825                 'host/disconnect_window.xib',
826                 'host/remoting_me2me_host.icns',
827                 'host/remoting_me2me_host-Info.plist',
828               ],
829               'mac_bundle_resources!': [
830                 'host/remoting_me2me_host-Info.plist',
831               ],
832               'conditions': [
833                 ['mac_breakpad==1', {
834                   'variables': {
835                     # A real .dSYM is needed for dump_syms to operate on.
836                     'mac_real_dsym': 1,
837                   },
838                   'copies': [
839                     {
840                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
841                       'files': [
842                         '<(PRODUCT_DIR)/crash_inspector',
843                         '<(PRODUCT_DIR)/crash_report_sender.app'
844                       ],
845                     },
846                   ],
847                 }],  # mac_breakpad==1
848               ],  # conditions
849             }],  # OS=mac
850           ],  # end of 'conditions'
851         },  # end of target 'remoting_me2me_host'
853       ],  # end of 'targets'
854     }],  # 'OS!="win" and enable_remoting_host==1'
857     ['OS=="linux" and chromeos==0', {
858       'targets': [
859         # Linux breakpad processing
860         {
861           'target_name': 'remoting_linux_symbols',
862           'type': 'none',
863           'conditions': [
864             ['linux_dump_symbols==1', {
865               'actions': [
866                 {
867                   'action_name': 'dump_symbols',
868                   'variables': {
869                     'plugin_file': '<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
870                   },
871                   'inputs': [
872                     '<(DEPTH)/build/linux/dump_app_syms',
873                     '<(PRODUCT_DIR)/dump_syms',
874                     '<(PRODUCT_DIR)/<(plugin_file)',
875                   ],
876                   'outputs': [
877                     '<(PRODUCT_DIR)/<(plugin_file).breakpad.<(target_arch)',
878                   ],
879                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
880                              '<(PRODUCT_DIR)/dump_syms',
881                              '<(linux_strip_binary)',
882                              '<(PRODUCT_DIR)/<(plugin_file)',
883                              '<@(_outputs)'],
884                   'message': 'Dumping breakpad symbols to <(_outputs)',
885                   'process_outputs_as_sources': 1,
886                 },
887               ],
888               'dependencies': [
889                 'remoting_host_plugin',
890                 '../breakpad/breakpad.gyp:dump_syms',
891               ],
892             }],  # 'linux_dump_symbols==1'
893           ],  # end of 'conditions'
894         },  # end of target 'linux_symbols'
895         {
896           'target_name': 'remoting_start_host',
897           'type': 'executable',
898           'dependencies': [
899             'remoting_host_setup_base',
900           ],
901           'sources': [
902             'host/setup/start_host.cc',
903           ],
904         },  # end of target 'remoting_start_host'
905       ],  # end of 'targets'
906     }],  # 'OS=="linux"'
908     ['OS=="mac"', {
909       'targets': [
910         {
911           'target_name': 'remoting_host_uninstaller',
912           'type': 'executable',
913           'mac_bundle': 1,
914           'variables': {
915             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_ID@")',
916             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_NAME@")',
917           },
918           'dependencies': [
919             '<(DEPTH)/base/base.gyp:base',
920           ],
921           'sources': [
922             'host/constants_mac.cc',
923             'host/constants_mac.h',
924             'host/installer/mac/uninstaller/remoting_uninstaller.h',
925             'host/installer/mac/uninstaller/remoting_uninstaller.mm',
926             'host/installer/mac/uninstaller/remoting_uninstaller_app.h',
927             'host/installer/mac/uninstaller/remoting_uninstaller_app.mm',
928           ],
929           'xcode_settings': {
930             'INFOPLIST_FILE': 'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
931             'INFOPLIST_PREPROCESS': 'YES',
932             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
933           },
934           'mac_bundle_resources': [
935             'host/installer/mac/uninstaller/remoting_uninstaller.icns',
936             'host/installer/mac/uninstaller/remoting_uninstaller.xib',
937             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
938           ],
939           'mac_bundle_resources!': [
940             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
941           ],
942         },  # end of target 'remoting_host_uninstaller'
944         # This packages up the files needed for the remoting host installer so
945         # they can be sent off to be signed.
946         # We don't build an installer here because we don't have signed binaries.
947         {
948           'target_name': 'remoting_me2me_host_archive',
949           'type': 'none',
950           'dependencies': [
951             'remoting_host_prefpane',
952             'remoting_host_uninstaller',
953             'remoting_me2me_host',
954           ],
955           'variables': {
956             'host_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
957             'host_service_name': '<!(python <(version_py_path) -f <(branding_path) -t "@DAEMON_FILE_NAME@")',
958             'host_uninstaller_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_NAME@")',
959             'bundle_prefix': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_PREFIX@")',
960           },
961           'actions': [
962             {
963               'action_name': 'Zip installer files for signing',
964               'temp_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting-me2me-host',
965               'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
966               'variables': {
967                 'host_name_nospace': '<!(echo <(host_name) | sed "s/ //g")',
968                 'host_service_name_nospace': '<!(echo <(host_service_name) | sed "s/ //g")',
969                 'host_uninstaller_name_nospace': '<!(echo <(host_uninstaller_name) | sed "s/ //g")',
970               },
971               'generated_files': [
972                 '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane',
973                 '<(PRODUCT_DIR)/remoting_me2me_host.app',
974                 '<(PRODUCT_DIR)/remoting_host_uninstaller.app',
975               ],
976               'generated_files_dst': [
977                 'PreferencePanes/org.chromium.chromoting.prefPane',
978                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app',
979                 'Applications/<(host_uninstaller_name).app',
980               ],
981               'source_files': [
982                 '<@(remoting_host_installer_mac_files)',
983               ],
984               'defs': [
985                 'VERSION=<(version_full)',
986                 'VERSION_SHORT=<(version_short)',
987                 'VERSION_MAJOR=<(version_major)',
988                 'VERSION_MINOR=<(version_minor)',
989                 'COPYRIGHT_INFO=<(copyright_info)',
990                 'HOST_NAME=<(host_name)',
991                 'HOST_SERVICE_NAME=<(host_service_name)',
992                 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)',
993                 'HOST_PKG=<(host_name)',
994                 'HOST_SERVICE_PKG=<(host_service_name_nospace)',
995                 'HOST_UNINSTALLER_PKG=<(host_uninstaller_name_nospace)',
996                 'BUNDLE_ID_HOST=<(bundle_prefix).<(host_name_nospace)',
997                 'BUNDLE_ID_HOST_SERVICE=<(bundle_prefix).<(host_service_name_nospace)',
998                 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)',
999                 'DMG_VOLUME_NAME=<(host_name) <(version_full)',
1000                 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)',
1001               ],
1002               'inputs': [
1003                 'host/installer/build-installer-archive.py',
1004                 '<@(_source_files)',
1005               ],
1006               'outputs': [
1007                 '<(_zip_path)',
1008               ],
1009               'action': [
1010                 'python',
1011                 'host/installer/build-installer-archive.py',
1012                 '<(_temp_dir)',
1013                 '<(_zip_path)',
1014                 '--source-file-roots',
1015                 '<@(remoting_host_installer_mac_roots)',
1016                 '--source-files',
1017                 '<@(_source_files)',
1018                 '--generated-files',
1019                 '<@(_generated_files)',
1020                 '--generated-files-dst',
1021                 '<@(_generated_files_dst)',
1022                 '--defs',
1023                 '<@(_defs)',
1024               ],
1025             },
1026           ],  # actions
1027         }, # end of target 'remoting_me2me_host_archive'
1029         {
1030           'target_name': 'remoting_host_prefpane',
1031           'type': 'loadable_module',
1032           'mac_bundle': 1,
1033           'product_extension': 'prefPane',
1034           'defines': [
1035             'JSON_USE_EXCEPTION=0',
1036           ],
1037           'include_dirs': [
1038             '../third_party/jsoncpp/overrides/include/',
1039             '../third_party/jsoncpp/source/include/',
1040             '../third_party/jsoncpp/source/src/lib_json/',
1041           ],
1043           # These source files are included directly, instead of adding target
1044           # dependencies, because the targets are not yet built for 64-bit on
1045           # Mac OS X - http://crbug.com/125116.
1046           #
1047           # TODO(lambroslambrou): Fix this when Chrome supports building for
1048           # Mac OS X 64-bit - http://crbug.com/128122.
1049           'sources': [
1050             '../third_party/jsoncpp/source/src/lib_json/json_reader.cpp',
1051             '../third_party/jsoncpp/overrides/src/lib_json/json_value.cpp',
1052             '../third_party/jsoncpp/source/src/lib_json/json_writer.cpp',
1053             '../third_party/modp_b64/modp_b64.cc',
1054             'host/constants_mac.cc',
1055             'host/constants_mac.h',
1056             'host/host_config.cc',
1057             'host/mac/me2me_preference_pane.h',
1058             'host/mac/me2me_preference_pane.mm',
1059             'host/mac/me2me_preference_pane_confirm_pin.h',
1060             'host/mac/me2me_preference_pane_confirm_pin.mm',
1061             'host/mac/me2me_preference_pane_disable.h',
1062             'host/mac/me2me_preference_pane_disable.mm',
1063           ],
1064           'link_settings': {
1065             'libraries': [
1066               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
1067               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
1068               '$(SDKROOT)/System/Library/Frameworks/PreferencePanes.framework',
1069               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
1070             ],
1071           },
1072           'variables': {
1073             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_ID@")',
1074             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
1075             # The XML new-line entity splits the label into two lines, which
1076             # is the maximum number of lines allowed by the System Preferences
1077             # applet.
1078             # TODO(lambroslambrou): When these strings are localized, use "\n"
1079             # instead of "&#x0a;" for linebreaks.
1080             'pref_pane_icon_label': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_ICON_LABEL@")',
1081           },
1082           'xcode_settings': {
1083             'ARCHS': ['i386', 'x86_64'],
1084             'GCC_ENABLE_OBJC_GC': 'supported',
1085             'INFOPLIST_FILE': 'host/mac/me2me_preference_pane-Info.plist',
1086             'INFOPLIST_PREPROCESS': 'YES',
1087             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_INFO="<(copyright_info)" PREF_PANE_ICON_LABEL="<(pref_pane_icon_label)"',
1088           },
1089           'mac_bundle_resources': [
1090             'host/mac/me2me_preference_pane.xib',
1091             'host/mac/me2me_preference_pane_confirm_pin.xib',
1092             'host/mac/me2me_preference_pane_disable.xib',
1093             'host/mac/me2me_preference_pane-Info.plist',
1094             'resources/chromoting128.png',
1095           ],
1096           'mac_bundle_resources!': [
1097             'host/mac/me2me_preference_pane-Info.plist',
1098           ],
1099           'conditions': [
1100             ['mac_breakpad==1', {
1101               'variables': {
1102                 # A real .dSYM is needed for dump_syms to operate on.
1103                 'mac_real_dsym': 1,
1104               },
1105             }],  # 'mac_breakpad==1'
1106           ],  # conditions
1107         },  # end of target 'remoting_host_prefpane'
1108       ],  # end of 'targets'
1109       'conditions': [
1110         ['mac_breakpad==1', {
1111           'targets': [
1112             {
1113               'target_name': 'remoting_mac_symbols',
1114               'type': 'none',
1115               'dependencies': [
1116                 '../breakpad/breakpad.gyp:dump_syms',
1117                 'remoting_me2me_host',
1118               ],
1119               'actions': [
1120                 {
1121                   'action_name': 'dump_symbols',
1122                   'inputs': [
1123                     '<(DEPTH)/remoting/scripts/mac/dump_product_syms',
1124                     '<(PRODUCT_DIR)/dump_syms',
1125                     '<(PRODUCT_DIR)/remoting_me2me_host.app',
1126                   ],
1127                   'outputs': [
1128                     '<(PRODUCT_DIR)/remoting_me2me_host.app-<(version_full)-<(target_arch).breakpad',
1129                   ],
1130                   'action': [
1131                     '<@(_inputs)',
1132                     '<@(_outputs)',
1133                   ],
1134                   'message': 'Dumping breakpad symbols to <(_outputs)',
1135                 },  # end of action 'dump_symbols'
1136               ],  # end of 'actions'
1137             },  # end of target 'remoting_mac_symbols'
1138           ],  # end of 'targets'
1139         }],  # 'mac_breakpad==1'
1140       ],  # end of 'conditions'
1141     }],  # 'OS=="mac"'
1143     ['OS=="win"', {
1144       'targets': [
1145         {
1146           'target_name': 'remoting_breakpad_tester',
1147           'type': 'executable',
1148           'variables': { 'enable_wexit_time_destructors': 1, },
1149           'dependencies': [
1150             '../base/base.gyp:base',
1151             'remoting_host_logging',
1152           ],
1153           'sources': [
1154             'tools/breakpad_tester_win.cc',
1155           ],
1156         },  # end of target 'remoting_breakpad_tester'
1157         {
1158           'target_name': 'remoting_lib_idl',
1159           'type': 'static_library',
1160           'sources': [
1161             'host/win/chromoting_lib_idl.templ',
1162             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.h',
1163             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
1164             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_i.c',
1165           ],
1166           # This target exports a hard dependency because dependent targets may
1167           # include chromoting_lib.h, a generated header.
1168           'hard_dependency': 1,
1169           'msvs_settings': {
1170             'VCMIDLTool': {
1171               'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1172             },
1173           },
1174           'direct_dependent_settings': {
1175             'include_dirs': [
1176               '<(SHARED_INTERMEDIATE_DIR)',
1177             ],
1178           },
1179           'rules': [
1180             {
1181               'rule_name': 'generate_idl',
1182               'extension': 'templ',
1183               'outputs': [
1184                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.idl',
1185               ],
1186               'action': [
1187                 'python',
1188                 '<(version_py_path)',
1189                 '-e', "DAEMON_CONTROLLER_CLSID='<(daemon_controller_clsid)'",
1190                 '-e', "RDP_DESKTOP_SESSION_CLSID='<(rdp_desktop_session_clsid)'",
1191                 '<(RULE_INPUT_PATH)',
1192                 '<@(_outputs)',
1193               ],
1194               'process_outputs_as_sources': 1,
1195               'message': 'Generating <@(_outputs)',
1196               'msvs_cygwin_shell': 0,
1197             },
1198           ],
1199         },  # end of target 'remoting_lib_idl'
1201         # remoting_lib_ps builds the proxy/stub code generated by MIDL (see
1202         # remoting_lib_idl).
1203         {
1204           'target_name': 'remoting_lib_ps',
1205           'type': 'static_library',
1206           'defines': [
1207             # Prepend 'Ps' to the MIDL-generated routines. This includes
1208             # DllGetClassObject, DllCanUnloadNow, DllRegisterServer,
1209             # DllUnregisterServer, and DllMain.
1210             'ENTRY_PREFIX=Ps',
1211             'REGISTER_PROXY_DLL',
1212           ],
1213           'dependencies': [
1214             'remoting_lib_idl',
1215           ],
1216           'sources': [
1217             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.dlldata.c',
1218             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib_p.c',
1219           ],
1220         },  # end of target 'remoting_lib_ps'
1222         # Regenerates 'chromoting_lib.rc' (used to embed 'chromoting_lib.tlb'
1223         # into remoting_core.dll's resources) every time
1224         # 'chromoting_lib_idl.templ' changes. Making remoting_core depend on
1225         # both this and 'remoting_lib_idl' targets ensures that the resorces
1226         # are rebuilt every time the type library is updated. GYP alone is
1227         # not smart enough to figure out this dependency on its own.
1228         {
1229           'target_name': 'remoting_lib_rc',
1230           'type': 'none',
1231           'sources': [
1232             'host/win/chromoting_lib_idl.templ',
1233           ],
1234           'hard_dependency': 1,
1235           'direct_dependent_settings': {
1236             'include_dirs': [
1237               '<(SHARED_INTERMEDIATE_DIR)',
1238             ],
1239           },
1240           'rules': [
1241             {
1242               'rule_name': 'generate_rc',
1243               'extension': 'templ',
1244               'outputs': [
1245                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
1246               ],
1247               'action': [
1248                 'echo 1 typelib "remoting/host/chromoting_lib.tlb" > <@(_outputs)',
1249               ],
1250               'message': 'Generating <@(_outputs)',
1251               'msvs_cygwin_shell': 0,
1252             },
1253           ],
1254         },  # end of target 'remoting_lib_rc'
1255         {
1256           'target_name': 'remoting_configurer',
1257           'type': 'executable',
1258           'defines': [
1259             '_ATL_NO_EXCEPTIONS',
1260           ],
1261           'dependencies': [
1262             '../base/base.gyp:base',
1263             '../crypto/crypto.gyp:crypto',
1264             'remoting_host',
1265             'remoting_host_setup_base',
1266           ],
1267           'sources': [
1268             'host/branding.cc',
1269             'host/setup/win/host_configurer.cc',
1270             'host/setup/win/host_configurer.rc',
1271             'host/setup/win/host_configurer_window.cc',
1272             'host/setup/win/host_configurer_window.h',
1273             'host/setup/win/host_configurer_resource.h',
1274             'host/setup/win/load_string_from_resource.cc',
1275             'host/setup/win/load_string_from_resource.h',
1276             'host/setup/win/start_host_window.cc',
1277             'host/setup/win/start_host_window.h',
1278           ],
1279           'msvs_settings': {
1280             'VCLinkerTool': {
1281               'AdditionalOptions': [
1282                 "\"/manifestdependency:type='win32' "
1283                     "name='Microsoft.Windows.Common-Controls' "
1284                     "version='6.0.0.0' "
1285                     "processorArchitecture='*' "
1286                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
1287               ],
1288               # 2 == /SUBSYSTEM:WINDOWS
1289               'SubSystem': '2',
1290             },
1291           },
1292         },  # end of target 'remoting_configurer'
1293         # The only difference between |remoting_console.exe| and
1294         # |remoting_host.exe| is that the former is a console application.
1295         # |remoting_console.exe| is used for debugging purposes.
1296         {
1297           'target_name': 'remoting_console',
1298           'type': 'executable',
1299           'variables': { 'enable_wexit_time_destructors': 1, },
1300           'dependencies': [
1301             'remoting_core',
1302             'remoting_version_resources',
1303           ],
1304           'sources': [
1305             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc',
1306             'host/win/entry_point.cc',
1307           ],
1308           'msvs_settings': {
1309             'VCLinkerTool': {
1310               'EntryPointSymbol': 'HostEntryPoint',
1311               'IgnoreAllDefaultLibraries': 'true',
1312               'SubSystem': '1', # /SUBSYSTEM:CONSOLE
1313             },
1314           },
1315         },  # end of target 'remoting_console'
1316         {
1317           'target_name': 'remoting_console_manifest',
1318           'type': 'none',
1319           'dependencies': [
1320             'remoting_console',
1321           ],
1322           'hard_dependency': '1',
1323           'msvs_cygwin_shell': 0,
1324           'actions': [
1325             {
1326               'action_name': 'Embedding manifest into remoting_console.exe',
1327               'binary': '<(PRODUCT_DIR)/remoting_console.exe',
1328               'manifests': [
1329                 'host/win/dpi_aware.manifest',
1330               ],
1331               'inputs': [
1332                 '<(_binary)',
1333                 '<@(_manifests)',
1334               ],
1335               'outputs': [
1336                 '<(_binary).embedded.manifest',
1337               ],
1338               'action': [
1339                 'mt',
1340                 '-nologo',
1341                 '-manifest',
1342                 '<@(_manifests)',
1343                 '-outputresource:<(_binary);#1',
1344                 '-out:<(_binary).embedded.manifest',
1345               ],
1346             },
1347           ],  # actions
1348         },  # end of target 'remoting_console_manifest'
1349         {
1350           'target_name': 'remoting_core',
1351           'type': 'shared_library',
1352           'variables': { 'enable_wexit_time_destructors': 1, },
1353           'defines' : [
1354             '_ATL_APARTMENT_THREADED',
1355             '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
1356             '_ATL_NO_AUTOMATIC_NAMESPACE',
1357             '_ATL_NO_EXCEPTIONS',
1358             'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
1359             'RDP_DESKTOP_SESSION_CLSID="{<(rdp_desktop_session_clsid)}"',
1360             'HOST_IMPLEMENTATION',
1361             'ISOLATION_AWARE_ENABLED=1',
1362             'STRICT',
1363             'VERSION=<(version_full)',
1364           ],
1365           'dependencies': [
1366             '../base/base.gyp:base',
1367             '../base/base.gyp:base_static',
1368             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1369             '../ipc/ipc.gyp:ipc',
1370             '../media/media.gyp:media',
1371             '../net/net.gyp:net',
1372             'remoting_base',
1373             'remoting_breakpad',
1374             'remoting_host',
1375             'remoting_host_event_logger',
1376             'remoting_host_logging',
1377             'remoting_lib_idl',
1378             'remoting_lib_ps',
1379             'remoting_lib_rc',
1380             'remoting_me2me_host_static',
1381             'remoting_protocol',
1382             'remoting_version_resources',
1383           ],
1384           'sources': [
1385             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/chromoting_lib.rc',
1386             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
1387             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_core_version.rc',
1388             'host/chromoting_messages.cc',
1389             'host/chromoting_messages.h',
1390             'host/config_file_watcher.cc',
1391             'host/config_file_watcher.h',
1392             'host/daemon_process.cc',
1393             'host/daemon_process.h',
1394             'host/daemon_process_win.cc',
1395             'host/desktop_process.cc',
1396             'host/desktop_process.h',
1397             'host/desktop_process_main.cc',
1398             'host/desktop_session.cc',
1399             'host/desktop_session.h',
1400             'host/desktop_session_agent.cc',
1401             'host/desktop_session_agent.h',
1402             'host/desktop_session_agent_posix.cc',
1403             'host/desktop_session_agent_win.cc',
1404             'host/desktop_session_win.cc',
1405             'host/desktop_session_win.h',
1406             'host/host_exit_codes.h',
1407             'host/host_export.h',
1408             'host/host_main.cc',
1409             'host/host_main.h',
1410             'host/ipc_constants.cc',
1411             'host/ipc_constants.h',
1412             'host/remoting_me2me_host.cc',
1413             'host/sas_injector.h',
1414             'host/sas_injector_win.cc',
1415             'host/verify_config_window_win.cc',
1416             'host/verify_config_window_win.h',
1417             'host/win/chromoting_module.cc',
1418             'host/win/chromoting_module.h',
1419             'host/win/core.cc',
1420             'host/win/core.rc',
1421             'host/win/core_resource.h',
1422             'host/win/elevated_controller.cc',
1423             'host/win/elevated_controller.h',
1424             'host/win/host_service.cc',
1425             'host/win/host_service.h',
1426             'host/win/omaha.cc',
1427             'host/win/omaha.h',
1428             'host/win/rdp_desktop_session.cc',
1429             'host/win/rdp_desktop_session.h',
1430             'host/win/unprivileged_process_delegate.cc',
1431             'host/win/unprivileged_process_delegate.h',
1432             'host/win/worker_process_launcher.cc',
1433             'host/win/worker_process_launcher.h',
1434             'host/win/wts_console_session_process_driver.cc',
1435             'host/win/wts_console_session_process_driver.h',
1436             'host/win/wts_session_process_delegate.cc',
1437             'host/win/wts_session_process_delegate.h',
1438             'host/worker_process_ipc_delegate.h',
1439           ],
1440           'msvs_settings': {
1441             'VCLinkerTool': {
1442               'AdditionalDependencies': [
1443                 'comctl32.lib',
1444                 'rpcns4.lib',
1445                 'rpcrt4.lib',
1446                 'uuid.lib',
1447                 'wtsapi32.lib',
1448               ],
1449               # Export the proxy/stub entry points. Note that the generated
1450               # routines have 'Ps' prefix to avoid conflicts with our own
1451               # DllMain().
1452               'AdditionalOptions': [
1453                 '/EXPORT:DllGetClassObject=PsDllGetClassObject,PRIVATE',
1454                 '/EXPORT:DllCanUnloadNow=PsDllCanUnloadNow,PRIVATE',
1455                 '/EXPORT:DllRegisterServer=PsDllRegisterServer,PRIVATE',
1456                 '/EXPORT:DllUnregisterServer=PsDllUnregisterServer,PRIVATE',
1457               ],
1458             },
1459           },
1460         },  # end of target 'remoting_core'
1461         {
1462           'target_name': 'remoting_core_manifest',
1463           'type': 'none',
1464           'dependencies': [
1465             'remoting_core',
1466           ],
1467           'hard_dependency': '1',
1468           'msvs_cygwin_shell': 0,
1469           'actions': [
1470             {
1471               'action_name': 'Embedding manifest into remoting_core.dll',
1472               'binary': '<(PRODUCT_DIR)/remoting_core.dll',
1473               'manifests': [
1474                 'host/win/comctl32_v6.manifest',
1475               ],
1476               'inputs': [
1477                 '<(_binary)',
1478                 '<@(_manifests)',
1479               ],
1480               'outputs': [
1481                 '<(_binary).embedded.manifest',
1482               ],
1483               'action': [
1484                 'mt',
1485                 '-nologo',
1486                 '-manifest',
1487                 '<@(_manifests)',
1488                 '-outputresource:<(_binary);#2',
1489                 '-out:<(_binary).embedded.manifest',
1490               ],
1491             },
1492           ],  # actions
1493         },  # end of target 'remoting_core_manifest'
1494         {
1495           'target_name': 'remoting_desktop',
1496           'type': 'executable',
1497           'variables': { 'enable_wexit_time_destructors': 1, },
1498           'dependencies': [
1499             'remoting_core',
1500             'remoting_version_resources',
1501           ],
1502           'sources': [
1503             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_desktop_version.rc',
1504             'host/win/entry_point.cc',
1505           ],
1506           'msvs_settings': {
1507             'VCLinkerTool': {
1508               'EntryPointSymbol': 'HostEntryPoint',
1509               'IgnoreAllDefaultLibraries': 'true',
1510               'SubSystem': '2', # /SUBSYSTEM:WINDOWS
1511             },
1512           },
1513         },  # end of target 'remoting_desktop'
1514         {
1515           'target_name': 'remoting_desktop_manifest',
1516           'type': 'none',
1517           'dependencies': [
1518             'remoting_desktop',
1519           ],
1520           'hard_dependency': '1',
1521           'msvs_cygwin_shell': 0,
1522           'actions': [
1523             {
1524               'action_name': 'Embedding manifest into remoting_desktop.exe',
1525               'binary': '<(PRODUCT_DIR)/remoting_desktop.exe',
1526               'manifests': [
1527                 'host/win/dpi_aware.manifest',
1528               ],
1529               # Add 'level="requireAdministrator" uiAccess="true"' to
1530               # the manifest only for the official builds because it requires
1531               # the binary to be signed to work.
1532               'conditions': [
1533                 ['buildtype == "Official"', {
1534                   'manifests': [
1535                     'host/win/require_administrator.manifest',
1536                   ],
1537                 }],
1538               ],
1539               'inputs': [
1540                 '<(_binary)',
1541                 '<@(_manifests)',
1542               ],
1543               'outputs': [
1544                 '<(_binary).embedded.manifest',
1545               ],
1546               'action': [
1547                 'mt',
1548                 '-nologo',
1549                 '-manifest',
1550                 '<@(_manifests)',
1551                 '-outputresource:<(_binary);#1',
1552                 '-out:<(_binary).embedded.manifest',
1553               ],
1554             },
1555           ],  # actions
1556         },  # end of target 'remoting_desktop_manifest'
1557         {
1558           'target_name': 'remoting_host_exe',
1559           'product_name': 'remoting_host',
1560           'type': 'executable',
1561           'variables': { 'enable_wexit_time_destructors': 1, },
1562           'dependencies': [
1563             'remoting_core',
1564             'remoting_version_resources',
1565           ],
1566           'sources': [
1567             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_version.rc',
1568             'host/win/entry_point.cc',
1569           ],
1570           'msvs_settings': {
1571             'VCLinkerTool': {
1572               'EntryPointSymbol': 'HostEntryPoint',
1573               'IgnoreAllDefaultLibraries': 'true',
1574               'ImportLibrary': '$(OutDir)\\lib\\remoting_host_exe.lib',
1575               'OutputFile': '$(OutDir)\\remoting_host.exe',
1576               'SubSystem': '2', # /SUBSYSTEM:WINDOWS
1577             },
1578           },
1579         },  # end of target 'remoting_host_exe'
1580         {
1581           'target_name': 'remoting_host_manifest',
1582           'type': 'none',
1583           'dependencies': [
1584             'remoting_host_exe',
1585           ],
1586           'hard_dependency': '1',
1587           'msvs_cygwin_shell': 0,
1588           'actions': [
1589             {
1590               'action_name': 'Embedding manifest into remoting_host.exe',
1591               'binary': '<(PRODUCT_DIR)/remoting_host.exe',
1592               'manifests': [
1593                 'host/win/dpi_aware.manifest',
1594               ],
1595               'inputs': [
1596                 '<(_binary)',
1597                 '<@(_manifests)',
1598               ],
1599               'outputs': [
1600                 '<(_binary).embedded.manifest',
1601               ],
1602               'action': [
1603                 'mt',
1604                 '-nologo',
1605                 '-manifest',
1606                 '<@(_manifests)',
1607                 '-outputresource:<(_binary);#1',
1608                 '-out:<(_binary).embedded.manifest',
1609               ],
1610             },
1611           ],  # actions
1612         },  # end of target 'remoting_host_manifest'
1614         {
1615           'target_name': 'remoting_host_plugin_manifest',
1616           'type': 'none',
1617           'dependencies': [
1618             'remoting_host_plugin',
1619           ],
1620           'hard_dependency': '1',
1621           'msvs_cygwin_shell': 0,
1622           'actions': [
1623             {
1624               'action_name': 'Embedding manifest into remoting_host_plugin.dll',
1625               'binary': '<(PRODUCT_DIR)/remoting_host_plugin.dll',
1626               'manifests': [
1627                 'host/win/comctl32_v6.manifest',
1628               ],
1629               'inputs': [
1630                 '<(_binary)',
1631                 '<@(_manifests)',
1632               ],
1633               'outputs': [
1634                 '<(_binary).embedded.manifest',
1635               ],
1636               'action': [
1637                 'mt',
1638                 '-nologo',
1639                 '-manifest',
1640                 '<@(_manifests)',
1641                 '-outputresource:<(_binary);#2',
1642                 '-out:<(_binary).embedded.manifest',
1643               ],
1644             },
1645           ],  # actions
1646         },  # end of target 'remoting_host_plugin_manifest'
1648         # Generates the version information resources for the Windows binaries.
1649         # The .RC files are generated from the "version.rc.version" template and
1650         # placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder.
1651         # The substitution strings are taken from:
1652         #   - build/util/LASTCHANGE - the last source code revision.
1653         #   - chrome/VERSION - the major, build & patch versions.
1654         #   - remoting/VERSION - the chromoting patch version (and overrides
1655         #       for chrome/VERSION).
1656         #   - (branding_path) - UI/localizable strings.
1657         #   - xxx.ver - per-binary non-localizable strings such as the binary
1658         #     name.
1659         {
1660           'target_name': 'remoting_version_resources',
1661           'type': 'none',
1662           'inputs': [
1663             '<(branding_path)',
1664             'version.rc.version',
1665             '<(DEPTH)/build/util/LASTCHANGE',
1666             '<(remoting_version_path)',
1667             '<(chrome_version_path)',
1668           ],
1669           'direct_dependent_settings': {
1670             'include_dirs': [
1671               '<(SHARED_INTERMEDIATE_DIR)/remoting',
1672             ],
1673           },
1674           'sources': [
1675             'host/plugin/remoting_host_plugin.ver',
1676             'host/win/remoting_core.ver',
1677             'host/win/remoting_desktop.ver',
1678             'host/win/remoting_host.ver',
1679           ],
1680           'rules': [
1681             {
1682               'rule_name': 'version',
1683               'extension': 'ver',
1684               'variables': {
1685                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
1686                 'template_input_path': 'version.rc.version',
1687               },
1688               'inputs': [
1689                 '<(branding_path)',
1690                 '<(chrome_version_path)',
1691                 '<(lastchange_path)',
1692                 '<(remoting_version_path)',
1693                 '<(template_input_path)',
1694               ],
1695               'outputs': [
1696                 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc',
1697               ],
1698               'action': [
1699                 'python',
1700                 '<(version_py_path)',
1701                 '-f', '<(RULE_INPUT_PATH)',
1702                 '-f', '<(chrome_version_path)',
1703                 # |remoting_version_path| must be after |chrome_version_path|
1704                 # because it can contain overrides for the version numbers.
1705                 '-f', '<(remoting_version_path)',
1706                 '-f', '<(branding_path)',
1707                 '-f', '<(lastchange_path)',
1708                 '<(template_input_path)',
1709                 '<@(_outputs)',
1710               ],
1711               'message': 'Generating version information in <@(_outputs)'
1712             },
1713           ],
1714         },  # end of target 'remoting_version_resources'
1715       ],  # end of 'targets'
1716     }],  # 'OS=="win"'
1718     # The host installation is generated only if WiX is available. If
1719     # component build is used the produced installation will not work due to
1720     # missing DLLs. We build it anyway to make sure the GYP scripts are executed
1721     # by the bots.
1722     ['OS == "win" and wix_exists == "True" and sas_dll_exists == "True"', {
1723       'targets': [
1724         {
1725           'target_name': 'remoting_host_installation',
1726           'type': 'none',
1727           'dependencies': [
1728             'remoting_me2me_host_archive',
1729           ],
1730           'sources': [
1731             '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1732           ],
1733           'outputs': [
1734             '<(PRODUCT_DIR)/chromoting.msi',
1735           ],
1736           'rules': [
1737             {
1738               'rule_name': 'zip2msi',
1739               'extension': 'zip',
1740               'inputs': [
1741                 'tools/zip2msi.py',
1742               ],
1743               'outputs': [
1744                 '<(PRODUCT_DIR)/chromoting.msi',
1745               ],
1746               'msvs_cygwin_shell': 0,
1747               'action': [
1748                 'python', 'tools/zip2msi.py',
1749                 '--wix_path', '<(wix_path)',
1750                 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
1751                 '<(RULE_INPUT_PATH)',
1752                 '<@(_outputs)',
1753               ],
1754               'message': 'Generating <@(_outputs)',
1755             },
1756           ],
1757         },  # end of target 'remoting_host_installation'
1759         {
1760           'target_name': 'remoting_me2me_host_archive',
1761           'type': 'none',
1762           'dependencies': [
1763             'remoting_core_manifest',
1764             'remoting_desktop_manifest',
1765             'remoting_host_manifest',
1766           ],
1767           'compiled_inputs': [
1768             '<(PRODUCT_DIR)/remoting_core.dll',
1769             '<(PRODUCT_DIR)/remoting_desktop.exe',
1770             '<(PRODUCT_DIR)/remoting_host.exe',
1771           ],
1772           'compiled_inputs_dst': [
1773             'files/remoting_core.dll',
1774             'files/remoting_desktop.exe',
1775             'files/remoting_host.exe',
1776           ],
1777           'conditions': [
1778             ['buildtype == "Official"', {
1779               'defs': [
1780                 'OFFICIAL_BUILD=1',
1781               ],
1782             }, {  # else buildtype != "Official"
1783               'defs': [
1784                 'OFFICIAL_BUILD=0',
1785               ],
1786             }],
1787           ],
1788           'defs': [
1789             'BRANDING=<(branding)',
1790             'DAEMON_CONTROLLER_CLSID={<(daemon_controller_clsid)}',
1791             'RDP_DESKTOP_SESSION_CLSID={<(rdp_desktop_session_clsid)}',
1792             'REMOTING_MULTI_PROCESS=<(remoting_multi_process)',
1793             'VERSION=<(version_full)',
1794           ],
1795           'generated_files': [
1796             '<@(_compiled_inputs)',
1797             '<(sas_dll_path)/sas.dll',
1798             'resources/chromoting.ico',
1799           ],
1800           'generated_files_dst': [
1801             '<@(_compiled_inputs_dst)',
1802             'files/sas.dll',
1803             'files/chromoting.ico',
1804           ],
1805           'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1806           'outputs': [
1807             '<(_zip_path)',
1808           ],
1809           'actions': [
1810             {
1811               'action_name': 'Zip installer files for signing',
1812               'temp_dir': '<(INTERMEDIATE_DIR)/installation',
1813               'source_files': [
1814                 '<@(remoting_host_installer_win_files)',
1815               ],
1816               'inputs': [
1817                 '<@(_compiled_inputs)',
1818                 '<(sas_dll_path)/sas.dll',
1819                 '<@(_source_files)',
1820                 'host/installer/build-installer-archive.py',
1821                 'resources/chromoting.ico',
1822               ],
1823               'outputs': [
1824                 '<(_zip_path)',
1825               ],
1826               'action': [
1827                 'python',
1828                 'host/installer/build-installer-archive.py',
1829                 '<(_temp_dir)',
1830                 '<(_zip_path)',
1831                 '--source-file-roots',
1832                 '<@(remoting_host_installer_win_roots)',
1833                 '--source-files',
1834                 '<@(_source_files)',
1835                 '--generated-files',
1836                 '<@(_generated_files)',
1837                 '--generated-files-dst',
1838                 '<@(_generated_files_dst)',
1839                 '--defs',
1840                 '<@(_defs)',
1841               ],
1842             },
1843           ],  # actions
1844         }, # end of target 'remoting_me2me_host_archive'
1845       ],  # end of 'targets'
1846     }],  # '<(wix_path) != ""'
1848   ],  # end of 'conditions'
1850   'targets': [
1851     {
1852       'target_name': 'remoting_breakpad',
1853       'type': 'static_library',
1854       'variables': { 'enable_wexit_time_destructors': 1, },
1855       'dependencies': [
1856         '../base/base.gyp:base',
1857       ],
1858       'sources': [
1859         'base/breakpad.h',
1860         'base/breakpad_linux.cc',
1861         'base/breakpad_mac.mm',
1862         'base/breakpad_win.cc',
1863       ],
1864       'conditions': [
1865         ['OS=="mac"', {
1866           'dependencies': [
1867             '../breakpad/breakpad.gyp:breakpad',
1868           ],
1869         }],
1870         ['OS=="win"', {
1871           'dependencies': [
1872             '../breakpad/breakpad.gyp:breakpad_handler',
1873           ],
1874         }],
1875       ],
1876     },  # end of target 'remoting_breakpad'
1878     {
1879       'target_name': 'remoting_client_plugin',
1880       'type': 'static_library',
1881       'variables': { 'enable_wexit_time_destructors': 1, },
1882       'defines': [
1883         'HAVE_STDINT_H',  # Required by on2_integer.h
1884       ],
1885       'dependencies': [
1886         'remoting_base',
1887         'remoting_client',
1888         'remoting_jingle_glue',
1889         '../media/media.gyp:media',
1890         '../net/net.gyp:net',
1891         '../ppapi/ppapi.gyp:ppapi_cpp_objects',
1892         '../skia/skia.gyp:skia',
1893       ],
1894       'sources': [
1895         'client/plugin/chromoting_instance.cc',
1896         'client/plugin/chromoting_instance.h',
1897         'client/plugin/mac_key_event_processor.cc',
1898         'client/plugin/mac_key_event_processor.h',
1899         'client/plugin/pepper_audio_player.cc',
1900         'client/plugin/pepper_audio_player.h',
1901         'client/plugin/pepper_entrypoints.cc',
1902         'client/plugin/pepper_entrypoints.h',
1903         'client/plugin/pepper_input_handler.cc',
1904         'client/plugin/pepper_input_handler.h',
1905         'client/plugin/pepper_network_manager.cc',
1906         'client/plugin/pepper_network_manager.h',
1907         'client/plugin/pepper_packet_socket_factory.cc',
1908         'client/plugin/pepper_packet_socket_factory.h',
1909         'client/plugin/pepper_plugin_thread_delegate.cc',
1910         'client/plugin/pepper_plugin_thread_delegate.h',
1911         'client/plugin/pepper_port_allocator.cc',
1912         'client/plugin/pepper_port_allocator.h',
1913         'client/plugin/pepper_token_fetcher.cc',
1914         'client/plugin/pepper_token_fetcher.h',
1915         'client/plugin/pepper_view.cc',
1916         'client/plugin/pepper_view.h',
1917         'client/plugin/pepper_util.cc',
1918         'client/plugin/pepper_util.h',
1919         'client/plugin/pepper_xmpp_proxy.cc',
1920         'client/plugin/pepper_xmpp_proxy.h',
1921       ],
1922     },  # end of target 'remoting_client_plugin'
1924     {
1925       'target_name': 'remoting_host_event_logger',
1926       'type': 'static_library',
1927       'variables': { 'enable_wexit_time_destructors': 1, },
1928       'dependencies': [
1929         'remoting_base',
1930       ],
1931       'sources': [
1932         'host/host_event_logger.h',
1933         'host/host_event_logger_posix.cc',
1934         'host/host_event_logger_win.cc',
1935       ],
1936       'conditions': [
1937         ['OS=="win"', {
1938           'sources': [
1939             'host/remoting_host_messages.mc',
1940           ],
1941           'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1942           'include_dirs': [
1943             '<(_output_dir)',
1944           ],
1945           'direct_dependent_settings': {
1946             'include_dirs': [
1947               '<(_output_dir)',
1948             ],
1949           },
1950           # Rule to run the message compiler.
1951           'rules': [
1952             {
1953               'rule_name': 'message_compiler',
1954               'extension': 'mc',
1955               'inputs': [ ],
1956               'outputs': [
1957                 '<(_output_dir)/remoting_host_messages.h',
1958                 '<(_output_dir)/remoting_host_messages.rc',
1959               ],
1960               'msvs_cygwin_shell': 0,
1961               'action': [
1962                 'mc.exe',
1963                 '-h', '<(_output_dir)',
1964                 '-r', '<(_output_dir)/.',
1965                 '<(RULE_INPUT_PATH)',
1966               ],
1967               'process_outputs_as_sources': 1,
1968               'message': 'Running message compiler on <(RULE_INPUT_PATH).',
1969             },
1970           ],
1971         }],
1972       ],  # end of 'conditions'
1973     },  # end of target 'remoting_host_event_logger'
1975     {
1976       'target_name': 'remoting_webapp',
1977       'type': 'none',
1978       'dependencies': [
1979         'remoting_resources',
1980         'remoting_host_plugin',
1981       ],
1982       'sources': [
1983         'webapp/build-webapp.py',
1984         '<(remoting_version_path)',
1985         '<(chrome_version_path)',
1986         '<@(remoting_webapp_patch_files)',
1987         '<@(remoting_webapp_files)',
1988         '<@(remoting_webapp_js_files)',
1989         '<@(remoting_webapp_apps_v2_js_files)',
1990         '<@(remoting_webapp_locale_files)',
1991       ],
1993       'conditions': [
1994         ['enable_remoting_host==1', {
1995           'variables': {
1996               'plugin_path': '<(PRODUCT_DIR)/<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
1997           },
1998         }, {
1999           'variables': {
2000               'plugin_path': '',
2001           },
2002           'dependencies!': [
2003             'remoting_host_plugin',
2004           ],
2005         }],
2006         ['OS=="win"', {
2007           'dependencies': [
2008             'remoting_host_plugin_manifest',
2009           ],
2010         }],
2011         ['remoting_use_apps_v2==1', {
2012           'variables': {
2013             'remoting_webapp_patch_files': [
2014               'webapp/appsv2.patch',
2015             ],
2016             'remoting_webapp_apps_v2_js_files': [
2017               'webapp/background.js',
2018               'webapp/identity.js',
2019             ],
2020           },
2021         }, {
2022           'variables': {
2023             'remoting_webapp_patch_files': [],
2024             'remoting_webapp_apps_v2_js_files': [],
2025           },
2026         }],
2027       ],
2029       # Can't use a 'copies' because we need to manipulate
2030       # the manifest file to get the right plugin name.
2031       # Also we need to move the plugin into the me2mom
2032       # folder, which means 2 copies, and gyp doesn't
2033       # seem to guarantee the ordering of 2 copies statements
2034       # when the actual project is generated.
2035       'actions': [
2036         {
2037           'action_name': 'Build Remoting WebApp',
2038           'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
2039           'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
2040           'inputs': [
2041             'webapp/build-webapp.py',
2042             '<(remoting_version_path)',
2043             '<(chrome_version_path)',
2044             '<@(remoting_webapp_patch_files)',
2045             '<@(remoting_webapp_files)',
2046             '<@(remoting_webapp_js_files)',
2047             '<@(remoting_webapp_apps_v2_js_files)',
2048             '<@(remoting_webapp_locale_files)',
2049           ],
2050           'conditions': [
2051             ['enable_remoting_host==1', {
2052               'inputs': [
2053                 '<(plugin_path)',
2054               ],
2055             }],
2056           ],
2057           'outputs': [
2058             '<(_output_dir)',
2059             '<(_zip_path)',
2060           ],
2061           'action': [
2062             'python', 'webapp/build-webapp.py',
2063             '<(buildtype)',
2064             '<(version_full)',
2065             '<(host_plugin_mime_type)',
2066             '<(_output_dir)',
2067             '<(_zip_path)',
2068             '<(plugin_path)',
2069             '<@(remoting_webapp_files)',
2070             '<@(remoting_webapp_js_files)',
2071             '<@(remoting_webapp_apps_v2_js_files)',
2072             '--locales',
2073             '<@(remoting_webapp_locale_files)',
2074             '--patches',
2075             '<@(remoting_webapp_patch_files)',
2076           ],
2077           'msvs_cygwin_shell': 1,
2078         },
2079       ],
2080     }, # end of target 'remoting_webapp'
2082     {
2083       'target_name': 'remoting_resources',
2084       'type': 'none',
2085       'variables': {
2086         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
2087         'grit_resource_ids': 'resources/resource_ids',
2088         'sources': [
2089           'base/resources_unittest.cc',
2090           'host/plugin/host_script_object.cc',
2091           'webapp/client_screen.js',
2092           'webapp/error.js',
2093           'webapp/host_list.js',
2094           'webapp/host_table_entry.js',
2095           'webapp/host_setup_dialog.js',
2096           'webapp/main.html',
2097           'webapp/manifest.json',
2098           'webapp/remoting.js',
2099         ],
2100       },
2101       'actions': [
2102         {
2103           'action_name': 'verify_resources',
2104           'inputs': [
2105             'resources/remoting_strings.grd',
2106             'resources/common_resources.grd',
2107             'tools/verify_resources.py',
2108             '<@(sources)'
2109           ],
2110           'outputs': [
2111             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
2112           ],
2113           'action': [
2114             'python',
2115             'tools/verify_resources.py',
2116             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
2117             '-r', 'resources/remoting_strings.grd',
2118             '-r', 'resources/common_resources.grd',
2119             '<@(sources)',
2120          ],
2121         },
2122         {
2123           'action_name': 'remoting_strings',
2124           'variables': {
2125             'grit_grd_file': 'resources/remoting_strings.grd',
2126           },
2127           'includes': [ '../build/grit_action.gypi' ],
2128         },
2129         {
2130           'action_name': 'common_resources',
2131           'variables': {
2132             'grit_grd_file': 'resources/common_resources.grd',
2133           },
2134           'includes': [ '../build/grit_action.gypi' ],
2135         },
2136       ],
2137       'copies': [
2138         # Copy results to the product directory.
2139         {
2140           'destination': '<(PRODUCT_DIR)/remoting_locales',
2141           'files': [
2142             '<(grit_out_dir)/remoting/resources/ar.pak',
2143             '<(grit_out_dir)/remoting/resources/bg.pak',
2144             '<(grit_out_dir)/remoting/resources/ca.pak',
2145             '<(grit_out_dir)/remoting/resources/cs.pak',
2146             '<(grit_out_dir)/remoting/resources/da.pak',
2147             '<(grit_out_dir)/remoting/resources/de.pak',
2148             '<(grit_out_dir)/remoting/resources/el.pak',
2149             '<(grit_out_dir)/remoting/resources/en-US.pak',
2150             '<(grit_out_dir)/remoting/resources/en-GB.pak',
2151             '<(grit_out_dir)/remoting/resources/es.pak',
2152             '<(grit_out_dir)/remoting/resources/es-419.pak',
2153             '<(grit_out_dir)/remoting/resources/et.pak',
2154             '<(grit_out_dir)/remoting/resources/fi.pak',
2155             '<(grit_out_dir)/remoting/resources/fil.pak',
2156             '<(grit_out_dir)/remoting/resources/fr.pak',
2157             '<(grit_out_dir)/remoting/resources/he.pak',
2158             '<(grit_out_dir)/remoting/resources/hi.pak',
2159             '<(grit_out_dir)/remoting/resources/hr.pak',
2160             '<(grit_out_dir)/remoting/resources/hu.pak',
2161             '<(grit_out_dir)/remoting/resources/id.pak',
2162             '<(grit_out_dir)/remoting/resources/it.pak',
2163             '<(grit_out_dir)/remoting/resources/ja.pak',
2164             '<(grit_out_dir)/remoting/resources/ko.pak',
2165             '<(grit_out_dir)/remoting/resources/lt.pak',
2166             '<(grit_out_dir)/remoting/resources/lv.pak',
2167             '<(grit_out_dir)/remoting/resources/nb.pak',
2168             '<(grit_out_dir)/remoting/resources/nl.pak',
2169             '<(grit_out_dir)/remoting/resources/pl.pak',
2170             '<(grit_out_dir)/remoting/resources/pt-BR.pak',
2171             '<(grit_out_dir)/remoting/resources/pt-PT.pak',
2172             '<(grit_out_dir)/remoting/resources/ro.pak',
2173             '<(grit_out_dir)/remoting/resources/ru.pak',
2174             '<(grit_out_dir)/remoting/resources/sk.pak',
2175             '<(grit_out_dir)/remoting/resources/sl.pak',
2176             '<(grit_out_dir)/remoting/resources/sr.pak',
2177             '<(grit_out_dir)/remoting/resources/sv.pak',
2178             '<(grit_out_dir)/remoting/resources/th.pak',
2179             '<(grit_out_dir)/remoting/resources/tr.pak',
2180             '<(grit_out_dir)/remoting/resources/uk.pak',
2181             '<(grit_out_dir)/remoting/resources/vi.pak',
2182             '<(grit_out_dir)/remoting/resources/zh-CN.pak',
2183             '<(grit_out_dir)/remoting/resources/zh-TW.pak',
2184           ],
2185         },
2186         {
2187           'destination': '<(PRODUCT_DIR)',
2188           'files': [
2189             '<(grit_out_dir)/remoting/resources/chrome_remote_desktop.pak',
2190           ]
2191         },
2192       ],
2193       'includes': [ '../build/grit_target.gypi' ],
2194     },  # end of target 'remoting_resources'
2196     {
2197       'target_name': 'remoting_base',
2198       'type': 'static_library',
2199       'variables': { 'enable_wexit_time_destructors': 1, },
2200       'dependencies': [
2201         '../base/base.gyp:base',
2202         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
2203         '../ui/ui.gyp:ui',
2204         '../net/net.gyp:net',
2205         '../skia/skia.gyp:skia',
2206         '../third_party/libvpx/libvpx.gyp:libvpx',
2207         '../third_party/opus/opus.gyp:opus',
2208         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
2209         '../third_party/speex/speex.gyp:libspeex',
2210         '../media/media.gyp:media',
2211         '../media/media.gyp:shared_memory_support',
2212         '../media/media.gyp:yuv_convert',
2213         'remoting_jingle_glue',
2214         'remoting_resources',
2215         'proto/chromotocol.gyp:chromotocol_proto_lib',
2216       ],
2217       'export_dependent_settings': [
2218         '../base/base.gyp:base',
2219         '../net/net.gyp:net',
2220         '../skia/skia.gyp:skia',
2221         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
2222         'proto/chromotocol.gyp:chromotocol_proto_lib',
2223       ],
2224       # This target needs a hard dependency because dependent targets
2225       # depend on chromotocol_proto_lib for headers.
2226       'hard_dependency': 1,
2227       'sources': [
2228         'base/auto_thread.cc',
2229         'base/auto_thread.h',
2230         'base/auto_thread_task_runner.cc',
2231         'base/auto_thread_task_runner.h',
2232         'base/auth_token_util.cc',
2233         'base/auth_token_util.h',
2234         'base/compound_buffer.cc',
2235         'base/compound_buffer.h',
2236         'base/constants.cc',
2237         'base/constants.h',
2238         'base/plugin_thread_task_runner.cc',
2239         'base/plugin_thread_task_runner.h',
2240         'base/rate_counter.cc',
2241         'base/rate_counter.h',
2242         'base/resources.cc',
2243         'base/resources.h',
2244         'base/rsa_key_pair.cc',
2245         'base/rsa_key_pair.h',
2246         'base/running_average.cc',
2247         'base/running_average.h',
2248         'base/socket_reader.cc',
2249         'base/socket_reader.h',
2250         'base/stoppable.cc',
2251         'base/stoppable.h',
2252         'base/typed_buffer.h',
2253         'base/util.cc',
2254         'base/util.h',
2255         'codec/audio_decoder.cc',
2256         'codec/audio_decoder.h',
2257         'codec/audio_decoder_opus.cc',
2258         'codec/audio_decoder_opus.h',
2259         'codec/audio_decoder_speex.cc',
2260         'codec/audio_decoder_speex.h',
2261         'codec/audio_decoder_verbatim.cc',
2262         'codec/audio_decoder_verbatim.h',
2263         'codec/audio_encoder.h',
2264         'codec/audio_encoder_opus.cc',
2265         'codec/audio_encoder_opus.h',
2266         'codec/audio_encoder_speex.cc',
2267         'codec/audio_encoder_speex.h',
2268         'codec/audio_encoder_verbatim.cc',
2269         'codec/audio_encoder_verbatim.h',
2270         'codec/video_decoder.h',
2271         'codec/video_decoder_verbatim.cc',
2272         'codec/video_decoder_verbatim.h',
2273         'codec/video_decoder_vp8.cc',
2274         'codec/video_decoder_vp8.h',
2275         'codec/video_encoder.h',
2276         'codec/video_encoder_verbatim.cc',
2277         'codec/video_encoder_verbatim.h',
2278         'codec/video_encoder_vp8.cc',
2279         'codec/video_encoder_vp8.h',
2280       ],
2281     },  # end of target 'remoting_base'
2283     {
2284       'target_name': 'remoting_host_logging',
2285       'type': 'static_library',
2286       'variables': { 'enable_wexit_time_destructors': 1, },
2287       'dependencies': [
2288         '../base/base.gyp:base',
2289       ],
2290       'sources': [
2291         'host/branding.cc',
2292         'host/branding.h',
2293         'host/logging.h',
2294         'host/logging_posix.cc',
2295         'host/logging_win.cc',
2296       ],
2297     },  # end of target 'remoting_host_logging'
2299     {
2300       'target_name': 'remoting_client',
2301       'type': 'static_library',
2302       'variables': { 'enable_wexit_time_destructors': 1, },
2303       'dependencies': [
2304         'remoting_base',
2305         'remoting_jingle_glue',
2306         'remoting_protocol',
2307       ],
2308       'sources': [
2309         'client/audio_decode_scheduler.cc',
2310         'client/audio_decode_scheduler.h',
2311         'client/audio_player.cc',
2312         'client/audio_player.h',
2313         'client/chromoting_client.cc',
2314         'client/chromoting_client.h',
2315         'client/chromoting_stats.cc',
2316         'client/chromoting_stats.h',
2317         'client/client_config.cc',
2318         'client/client_config.h',
2319         'client/client_context.cc',
2320         'client/client_context.h',
2321         'client/client_user_interface.h',
2322         'client/frame_consumer.h',
2323         'client/frame_consumer_proxy.cc',
2324         'client/frame_consumer_proxy.h',
2325         'client/frame_producer.h',
2326         'client/key_event_mapper.cc',
2327         'client/key_event_mapper.h',
2328         'client/rectangle_update_decoder.cc',
2329         'client/rectangle_update_decoder.h',
2330       ],
2331     },  # end of target 'remoting_client'
2333     {
2334       'target_name': 'remoting_jingle_glue',
2335       'type': 'static_library',
2336       'variables': { 'enable_wexit_time_destructors': 1, },
2337       'dependencies': [
2338         '../base/base.gyp:base',
2339         '../jingle/jingle.gyp:jingle_glue',
2340         '../jingle/jingle.gyp:notifier',
2341         '../third_party/libjingle/libjingle.gyp:libjingle',
2342       ],
2343       'export_dependent_settings': [
2344         '../third_party/libjingle/libjingle.gyp:libjingle',
2345       ],
2346       'sources': [
2347         'jingle_glue/chromium_socket_factory.cc',
2348         'jingle_glue/chromium_socket_factory.h',
2349         'jingle_glue/iq_sender.cc',
2350         'jingle_glue/iq_sender.h',
2351         'jingle_glue/javascript_signal_strategy.cc',
2352         'jingle_glue/javascript_signal_strategy.h',
2353         'jingle_glue/jingle_info_request.cc',
2354         'jingle_glue/jingle_info_request.h',
2355         'jingle_glue/signal_strategy.h',
2356         'jingle_glue/xmpp_proxy.h',
2357         'jingle_glue/xmpp_signal_strategy.cc',
2358         'jingle_glue/xmpp_signal_strategy.h',
2359       ],
2360     },  # end of target 'remoting_jingle_glue'
2362     {
2363       'target_name': 'remoting_protocol',
2364       'type': 'static_library',
2365       'variables': { 'enable_wexit_time_destructors': 1, },
2366       'dependencies': [
2367         'remoting_base',
2368         'remoting_jingle_glue',
2369         '../crypto/crypto.gyp:crypto',
2370         '../jingle/jingle.gyp:jingle_glue',
2371         '../net/net.gyp:net',
2372       ],
2373       'export_dependent_settings': [
2374         'remoting_jingle_glue',
2375       ],
2376       'sources': [
2377         'protocol/audio_reader.cc',
2378         'protocol/audio_reader.h',
2379         'protocol/audio_stub.h',
2380         'protocol/audio_writer.cc',
2381         'protocol/audio_writer.h',
2382         'protocol/auth_util.cc',
2383         'protocol/auth_util.h',
2384         'protocol/authentication_method.cc',
2385         'protocol/authentication_method.h',
2386         'protocol/authenticator.cc',
2387         'protocol/authenticator.h',
2388         'protocol/buffered_socket_writer.cc',
2389         'protocol/buffered_socket_writer.h',
2390         'protocol/channel_authenticator.h',
2391         'protocol/channel_dispatcher_base.cc',
2392         'protocol/channel_dispatcher_base.h',
2393         'protocol/channel_multiplexer.cc',
2394         'protocol/channel_multiplexer.h',
2395         'protocol/client_control_dispatcher.cc',
2396         'protocol/client_control_dispatcher.h',
2397         'protocol/client_event_dispatcher.cc',
2398         'protocol/client_event_dispatcher.h',
2399         'protocol/client_stub.h',
2400         'protocol/clipboard_echo_filter.cc',
2401         'protocol/clipboard_echo_filter.h',
2402         'protocol/clipboard_filter.cc',
2403         'protocol/clipboard_filter.h',
2404         'protocol/clipboard_stub.h',
2405         'protocol/clipboard_thread_proxy.cc',
2406         'protocol/clipboard_thread_proxy.h',
2407         'protocol/connection_to_client.cc',
2408         'protocol/connection_to_client.h',
2409         'protocol/connection_to_host.cc',
2410         'protocol/connection_to_host.h',
2411         'protocol/content_description.cc',
2412         'protocol/content_description.h',
2413         'protocol/errors.h',
2414         'protocol/host_control_dispatcher.cc',
2415         'protocol/host_control_dispatcher.h',
2416         'protocol/host_event_dispatcher.cc',
2417         'protocol/host_event_dispatcher.h',
2418         'protocol/host_stub.h',
2419         'protocol/input_event_tracker.cc',
2420         'protocol/input_event_tracker.h',
2421         'protocol/input_filter.cc',
2422         'protocol/input_filter.h',
2423         'protocol/input_stub.h',
2424         'protocol/it2me_host_authenticator_factory.cc',
2425         'protocol/it2me_host_authenticator_factory.h',
2426         'protocol/jingle_messages.cc',
2427         'protocol/jingle_messages.h',
2428         'protocol/jingle_session.cc',
2429         'protocol/jingle_session.h',
2430         'protocol/jingle_session_manager.cc',
2431         'protocol/jingle_session_manager.h',
2432         'protocol/libjingle_transport_factory.cc',
2433         'protocol/libjingle_transport_factory.h',
2434         'protocol/me2me_host_authenticator_factory.cc',
2435         'protocol/me2me_host_authenticator_factory.h',
2436         'protocol/message_decoder.cc',
2437         'protocol/message_decoder.h',
2438         'protocol/message_reader.cc',
2439         'protocol/message_reader.h',
2440         'protocol/mouse_input_filter.cc',
2441         'protocol/mouse_input_filter.h',
2442         'protocol/name_value_map.h',
2443         'protocol/negotiating_authenticator_base.cc',
2444         'protocol/negotiating_authenticator_base.h',
2445         'protocol/negotiating_client_authenticator.cc',
2446         'protocol/negotiating_client_authenticator.h',
2447         'protocol/negotiating_host_authenticator.cc',
2448         'protocol/negotiating_host_authenticator.h',
2449         'protocol/protobuf_video_reader.cc',
2450         'protocol/protobuf_video_reader.h',
2451         'protocol/protobuf_video_writer.cc',
2452         'protocol/protobuf_video_writer.h',
2453         'protocol/session.h',
2454         'protocol/session_config.cc',
2455         'protocol/session_config.h',
2456         'protocol/session_manager.h',
2457         'protocol/ssl_hmac_channel_authenticator.cc',
2458         'protocol/ssl_hmac_channel_authenticator.h',
2459         'protocol/transport.cc',
2460         'protocol/transport.h',
2461         'protocol/transport_config.cc',
2462         'protocol/transport_config.h',
2463         'protocol/util.cc',
2464         'protocol/util.h',
2465         'protocol/third_party_authenticator_base.cc',
2466         'protocol/third_party_authenticator_base.h',
2467         'protocol/third_party_client_authenticator.cc',
2468         'protocol/third_party_client_authenticator.h',
2469         'protocol/third_party_host_authenticator.cc',
2470         'protocol/third_party_host_authenticator.h',
2471         'protocol/v2_authenticator.cc',
2472         'protocol/v2_authenticator.h',
2473         'protocol/video_reader.cc',
2474         'protocol/video_reader.h',
2475         'protocol/video_stub.h',
2476         'protocol/video_writer.cc',
2477         'protocol/video_writer.h',
2478       ],
2479     },  # end of target 'remoting_protocol'
2481     # Remoting unit tests
2482     {
2483       'target_name': 'remoting_unittests',
2484       'type': 'executable',
2485       'dependencies': [
2486         '../base/base.gyp:base',
2487         '../base/base.gyp:base_i18n',
2488         '../base/base.gyp:test_support_base',
2489         '../ipc/ipc.gyp:ipc',
2490         '../media/media.gyp:media',
2491         '../media/media.gyp:media_test_support',
2492         '../net/net.gyp:net_test_support',
2493         '../ppapi/ppapi.gyp:ppapi_cpp',
2494         '../testing/gmock.gyp:gmock',
2495         '../testing/gtest.gyp:gtest',
2496         '../ui/ui.gyp:ui',
2497         'remoting_base',
2498         'remoting_breakpad',
2499         'remoting_client',
2500         'remoting_client_plugin',
2501         'remoting_host',
2502         'remoting_host_event_logger',
2503         'remoting_host_setup_base',
2504         'remoting_jingle_glue',
2505         'remoting_protocol',
2506         'remoting_resources',
2507       ],
2508       'defines': [
2509         'VERSION=<(version_full)',
2510       ],
2511       'include_dirs': [
2512         '../testing/gmock/include',
2513       ],
2514       'sources': [
2515         '../chrome/test/base/run_all_remoting_unittests.cc',
2516         'base/auth_token_util_unittest.cc',
2517         'base/auto_thread_task_runner_unittest.cc',
2518         'base/auto_thread_unittest.cc',
2519         'base/breakpad_win_unittest.cc',
2520         'base/compound_buffer_unittest.cc',
2521         'base/rate_counter_unittest.cc',
2522         'base/resources_unittest.cc',
2523         'base/rsa_key_pair_unittest.cc',
2524         'base/running_average_unittest.cc',
2525         'base/test_rsa_key_pair.h',
2526         'base/typed_buffer_unittest.cc',
2527         'base/util_unittest.cc',
2528         'client/audio_player_unittest.cc',
2529         'client/key_event_mapper_unittest.cc',
2530         'client/plugin/mac_key_event_processor_unittest.cc',
2531         'codec/audio_encoder_opus_unittest.cc',
2532         'codec/codec_test.cc',
2533         'codec/codec_test.h',
2534         'codec/video_decoder_vp8_unittest.cc',
2535         'codec/video_encoder_verbatim_unittest.cc',
2536         'codec/video_encoder_vp8_unittest.cc',
2537         'host/audio_silence_detector_unittest.cc',
2538         'host/branding.cc',
2539         'host/branding.h',
2540         'host/capture_scheduler_unittest.cc',
2541         'host/chromoting_host_context_unittest.cc',
2542         'host/chromoting_host_unittest.cc',
2543         'host/client_session_unittest.cc',
2544         'host/config_file_watcher_unittest.cc',
2545         'host/daemon_process.cc',
2546         'host/daemon_process.h',
2547         'host/daemon_process_unittest.cc',
2548         'host/desktop_process.cc',
2549         'host/desktop_process.h',
2550         'host/desktop_process_unittest.cc',
2551         'host/desktop_session.cc',
2552         'host/desktop_session.h',
2553         'host/desktop_session_agent.cc',
2554         'host/desktop_session_agent.h',
2555         'host/desktop_session_agent_posix.cc',
2556         'host/desktop_session_agent_win.cc',
2557         'host/heartbeat_sender_unittest.cc',
2558         'host/host_change_notification_listener_unittest.cc',
2559         'host/host_mock_objects.cc',
2560         'host/host_mock_objects.h',
2561         'host/host_status_monitor_fake.h',
2562         'host/ipc_desktop_environment_unittest.cc',
2563         'host/json_host_config_unittest.cc',
2564         'host/linux/x_server_clipboard_unittest.cc',
2565         'host/local_input_monitor_unittest.cc',
2566         'host/log_to_server_unittest.cc',
2567         'host/pin_hash_unittest.cc',
2568         'host/policy_hack/fake_policy_watcher.cc',
2569         'host/policy_hack/fake_policy_watcher.h',
2570         'host/policy_hack/mock_policy_callback.cc',
2571         'host/policy_hack/mock_policy_callback.h',
2572         'host/policy_hack/policy_watcher_unittest.cc',
2573         'host/register_support_host_request_unittest.cc',
2574         'host/remote_input_filter_unittest.cc',
2575         'host/resizing_host_observer_unittest.cc',
2576         'host/screen_resolution_unittest.cc',
2577         'host/server_log_entry_unittest.cc',
2578         'host/setup/oauth_helper_unittest.cc',
2579         'host/setup/pin_validator_unittest.cc',
2580         'host/video_scheduler_unittest.cc',
2581         'host/win/message_window_unittest.cc',
2582         'host/win/rdp_client_unittest.cc',
2583         'host/win/worker_process_launcher.cc',
2584         'host/win/worker_process_launcher.h',
2585         'host/win/worker_process_launcher_unittest.cc',
2586         'jingle_glue/chromium_socket_factory_unittest.cc',
2587         'jingle_glue/fake_signal_strategy.cc',
2588         'jingle_glue/fake_signal_strategy.h',
2589         'jingle_glue/iq_sender_unittest.cc',
2590         'jingle_glue/mock_objects.cc',
2591         'jingle_glue/mock_objects.h',
2592         'protocol/authenticator_test_base.cc',
2593         'protocol/authenticator_test_base.h',
2594         'protocol/buffered_socket_writer_unittest.cc',
2595         'protocol/channel_multiplexer_unittest.cc',
2596         'protocol/clipboard_echo_filter_unittest.cc',
2597         'protocol/clipboard_filter_unittest.cc',
2598         'protocol/connection_tester.cc',
2599         'protocol/connection_tester.h',
2600         'protocol/connection_to_client_unittest.cc',
2601         'protocol/content_description_unittest.cc',
2602         'protocol/fake_authenticator.cc',
2603         'protocol/fake_authenticator.h',
2604         'protocol/fake_session.cc',
2605         'protocol/fake_session.h',
2606         'protocol/input_event_tracker_unittest.cc',
2607         'protocol/input_filter_unittest.cc',
2608         'protocol/jingle_messages_unittest.cc',
2609         'protocol/jingle_session_unittest.cc',
2610         'protocol/message_decoder_unittest.cc',
2611         'protocol/message_reader_unittest.cc',
2612         'protocol/mouse_input_filter_unittest.cc',
2613         'protocol/negotiating_authenticator_unittest.cc',
2614         'protocol/ppapi_module_stub.cc',
2615         'protocol/protocol_mock_objects.cc',
2616         'protocol/protocol_mock_objects.h',
2617         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
2618         'protocol/third_party_authenticator_unittest.cc',
2619         'protocol/v2_authenticator_unittest.cc',
2620       ],
2621       'conditions': [
2622         [ 'OS=="win"', {
2623           'defines': [
2624             '_ATL_NO_EXCEPTIONS',
2625           ],
2626           'include_dirs': [
2627             '../breakpad/src',
2628           ],
2629           'link_settings': {
2630             'libraries': [
2631               '-lrpcrt4.lib',
2632               '-lwtsapi32.lib',
2633             ],
2634           },
2635         }],
2636         ['OS=="mac" or (OS=="linux" and chromeos==0)', {
2637           # Javascript unittests are disabled on CrOS because they cause
2638           # valgrind and test errors.
2639           #
2640           # Javascript unittests are disabled on Windows because they add a
2641           # dependency on 'common_constants' which (only on Windows) requires
2642           # additional dependencies:
2643           #   '../content/content.gyp:content_common',
2644           #   'installer_util',
2645           # These targets are defined in .gypi files that would need to be
2646           # included here:
2647           #   '../chrome/chrome_common.gypi',
2648           #   '../chrome/chrome_installer.gypi',
2649           #   '../chrome/chrome_installer_util.gypi',
2650           # But we can't do that because ninja will complain about multiple
2651           # target definitions.
2652           # TODO(garykac): Move installer_util into a proper .gyp file so that
2653           # it can be included in multiple .gyp files.
2654           'includes': [
2655             '../chrome/js_unittest_rules.gypi',
2656           ],
2657           'dependencies': [
2658             '../chrome/common_constants.gyp:common_constants',
2659             '../v8/tools/gyp/v8.gyp:v8',
2660           ],
2661           'sources': [
2662             '../chrome/test/base/v8_unit_test.cc',
2663             '../chrome/test/base/v8_unit_test.h',
2664             'webapp/browser_globals.gtestjs',
2665             'webapp/all_js_load.gtestjs',
2666             'webapp/format_iq.gtestjs',
2667             '<@(remoting_webapp_js_files)',
2668           ],
2669         }],
2670         ['enable_remoting_host == 0', {
2671           'dependencies!': [
2672             'remoting_host',
2673             'remoting_host_setup_base',
2674           ],
2675           'sources/': [
2676             ['exclude', 'codec/*'],
2677             ['exclude', 'host/*'],
2678           ]
2679         }],
2680         ['toolkit_uses_gtk == 1', {
2681           'dependencies': [
2682             # Needed for the following #include chain:
2683             #   base/run_all_unittests.cc
2684             #   ../base/test_suite.h
2685             #   gtk/gtk.h
2686             '../build/linux/system.gyp:gtk',
2687             '../build/linux/system.gyp:ssl',
2688           ],
2689           'conditions': [
2690             [ 'linux_use_tcmalloc==1', {
2691                 'dependencies': [
2692                   '../base/allocator/allocator.gyp:allocator',
2693                 ],
2694               },
2695             ],
2696           ],
2697         }],  # end of 'toolkit_uses_gtk == 1'
2698       ],  # end of 'conditions'
2699     },  # end of target 'remoting_unittests'
2700   ],  # end of targets