Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / remoting / remoting.gyp
bloba36f680295feff291a4691ce71051dcee43a02e6
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_use_apps_v2%': 0,
25     # The |major|, |build| and |patch| versions are inherited from Chrome.
26     # Since Chrome's |minor| version is always '0', we replace it with a
27     # Chromoting-specific patch version.
28     # Note that we check both the |chrome_version_path| file and the
29     # |remoting_version_path| so that we can override the Chrome version
30     # numbers if needed.
31     'version_py_path': '../chrome/tools/build/version.py',
32     'remoting_version_path': '../remoting/VERSION',
33     'chrome_version_path': '../chrome/VERSION',
34     'version_major':
35       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@MAJOR@")',
36     'version_minor':
37       '<!(python <(version_py_path) -f <(remoting_version_path) -t "@REMOTING_PATCH@")',
38     'version_short':
39       '<(version_major).<(version_minor).'
40       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@BUILD@")',
41     'version_full':
42       '<(version_short).'
43       '<!(python <(version_py_path) -f <(chrome_version_path) -f <(remoting_version_path) -t "@PATCH@")',
45     'branding_path': '../remoting/branding_<(branding)',
46     'copyright_info': '<!(python <(version_py_path) -f <(branding_path) -t "@COPYRIGHT@")',
48     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
50     # Use consistent strings across all platforms.
51     # These values must match host/plugin/constants.h
52     'host_plugin_mime_type': 'application/vnd.chromium.remoting-host',
53     'host_plugin_description': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_DESCRIPTION@")',
54     'host_plugin_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
56     'conditions': [
57       # Remoting host is supported only on Windows, OSX and Linux.
58       ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
59         'enable_remoting_host': 1,
60       }, {
61         'enable_remoting_host': 0,
62       }],
63       ['OS=="mac"', {
64         'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
65         'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
66         'host_plugin_extension': 'plugin',
67         'host_plugin_prefix': '',
68       }],
69       ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
70         # linux 32 bit
71         'host_plugin_extension': 'ia32.so',
72         'host_plugin_prefix': 'lib',
73       }],
74       ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
75         # linux 64 bit
76         'host_plugin_extension': 'x64.so',
77         'host_plugin_prefix': 'lib',
78       }],
79       ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
80         'host_plugin_extension': 'arm.so',
81         'host_plugin_prefix': 'lib',
82       }],
83       ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
84         'host_plugin_extension': 'mipsel.so',
85         'host_plugin_prefix': 'lib',
86       }],
87       ['OS=="win"', {
88         'host_plugin_extension': 'dll',
89         'host_plugin_prefix': '',
90       }],
91       ['OS=="win"', {
92         # Use auto-generated CLSID for the daemon controller to make sure that
93         # the newly installed version of the controller will be used during
94         # upgrade even if there is an old instance running already.
95         'daemon_controller_clsid': '<!(python tools/uuidgen.py)',
96       }],
97     ],
98     'remoting_webapp_locale_files': [
99       '<(webapp_locale_dir)/ar/messages.json',
100       '<(webapp_locale_dir)/bg/messages.json',
101       '<(webapp_locale_dir)/ca/messages.json',
102       '<(webapp_locale_dir)/cs/messages.json',
103       '<(webapp_locale_dir)/da/messages.json',
104       '<(webapp_locale_dir)/de/messages.json',
105       '<(webapp_locale_dir)/el/messages.json',
106       '<(webapp_locale_dir)/en/messages.json',
107       '<(webapp_locale_dir)/en_GB/messages.json',
108       '<(webapp_locale_dir)/es/messages.json',
109       '<(webapp_locale_dir)/es_419/messages.json',
110       '<(webapp_locale_dir)/et/messages.json',
111       '<(webapp_locale_dir)/fi/messages.json',
112       '<(webapp_locale_dir)/fil/messages.json',
113       '<(webapp_locale_dir)/fr/messages.json',
114       '<(webapp_locale_dir)/he/messages.json',
115       '<(webapp_locale_dir)/hi/messages.json',
116       '<(webapp_locale_dir)/hr/messages.json',
117       '<(webapp_locale_dir)/hu/messages.json',
118       '<(webapp_locale_dir)/id/messages.json',
119       '<(webapp_locale_dir)/it/messages.json',
120       '<(webapp_locale_dir)/ja/messages.json',
121       '<(webapp_locale_dir)/ko/messages.json',
122       '<(webapp_locale_dir)/lt/messages.json',
123       '<(webapp_locale_dir)/lv/messages.json',
124       '<(webapp_locale_dir)/nb/messages.json',
125       '<(webapp_locale_dir)/nl/messages.json',
126       '<(webapp_locale_dir)/pl/messages.json',
127       '<(webapp_locale_dir)/pt_BR/messages.json',
128       '<(webapp_locale_dir)/pt_PT/messages.json',
129       '<(webapp_locale_dir)/ro/messages.json',
130       '<(webapp_locale_dir)/ru/messages.json',
131       '<(webapp_locale_dir)/sk/messages.json',
132       '<(webapp_locale_dir)/sl/messages.json',
133       '<(webapp_locale_dir)/sr/messages.json',
134       '<(webapp_locale_dir)/sv/messages.json',
135       '<(webapp_locale_dir)/th/messages.json',
136       '<(webapp_locale_dir)/tr/messages.json',
137       '<(webapp_locale_dir)/uk/messages.json',
138       '<(webapp_locale_dir)/vi/messages.json',
139       '<(webapp_locale_dir)/zh_CN/messages.json',
140       '<(webapp_locale_dir)/zh_TW/messages.json',
141     ],
142     'remoting_webapp_files': [
143       'resources/chromoting16.png',
144       'resources/chromoting48.png',
145       'resources/chromoting128.png',
146       'resources/disclosure_arrow_down.png',
147       'resources/disclosure_arrow_right.png',
148       'resources/host_setup_instructions.png',
149       'resources/icon_cross.png',
150       'resources/icon_host.png',
151       'resources/icon_pencil.png',
152       'resources/icon_warning.png',
153       'resources/infographic_my_computers.png',
154       'resources/infographic_remote_assistance.png',
155       'resources/tick.png',
156       'webapp/connection_history.css',
157       'webapp/connection_stats.css',
158       'webapp/main.css',
159       'webapp/main.html',
160       'webapp/manifest.json',
161       'webapp/menu_button.css',
162       'webapp/oauth2_callback.html',
163       'webapp/scale-to-fit.png',
164       'webapp/spinner.gif',
165       'webapp/toolbar.css',
166     ],
167     'remoting_webapp_js_files': [
168       'webapp/client_plugin.js',
169       'webapp/client_plugin_async.js',
170       'webapp/client_screen.js',
171       'webapp/client_session.js',
172       'webapp/clipboard.js',
173       'webapp/connection_history.js',
174       'webapp/connection_stats.js',
175       'webapp/cs_oauth2_trampoline.js',
176       'webapp/event_handlers.js',
177       'webapp/format_iq.js',
178       'webapp/host_controller.js',
179       'webapp/host_list.js',
180       'webapp/host_screen.js',
181       'webapp/host_session.js',
182       'webapp/host_settings.js',
183       'webapp/host_setup_dialog.js',
184       'webapp/host_table_entry.js',
185       'webapp/l10n.js',
186       'webapp/log_to_server.js',
187       'webapp/menu_button.js',
188       'webapp/oauth2.js',
189       'webapp/oauth2_callback.js',
190       'webapp/plugin_settings.js',
191       'webapp/remoting.js',
192       'webapp/server_log_entry.js',
193       'webapp/stats_accumulator.js',
194       'webapp/storage.js',
195       'webapp/suspend_monitor.js',
196       'webapp/toolbar.js',
197       'webapp/ui_mode.js',
198       'webapp/wcs.js',
199       'webapp/wcs_loader.js',
200       'webapp/xhr.js',
201     ],
202     'remoting_host_installer_mac_roots': [
203       'host/installer/mac/',
204       '<(DEPTH)/chrome/installer/mac/',
205     ],
206     'remoting_host_installer_mac_files': [
207       'host/installer/mac/do_signing.sh',
208       'host/installer/mac/do_signing.props',
209       'host/installer/mac/ChromotingHost.pkgproj',
210       'host/installer/mac/ChromotingHostService.pkgproj',
211       'host/installer/mac/ChromotingHostUninstaller.pkgproj',
212       'host/installer/mac/LaunchAgents/org.chromium.chromoting.plist',
213       'host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh',
214       'host/installer/mac/Scripts/keystone_install.sh',
215       'host/installer/mac/Scripts/remoting_postflight.sh',
216       'host/installer/mac/Scripts/remoting_preflight.sh',
217       'host/installer/mac/Keystone/GoogleSoftwareUpdate.pkg',
218       '<(DEPTH)/chrome/installer/mac/pkg-dmg',
219     ],
220     'remoting_host_installer_win_roots': [
221       'host/installer/win/',
222     ],
223     'remoting_host_installer_win_files': [
224       'host/installer/win/chromoting.wxs',
225       'host/installer/win/parameters.json',
226     ],
227   },
229   'includes': [
230     '../chrome/js_unittest_vars.gypi',
231   ],
233   'target_defaults': {
234     'defines': [
235     ],
236     'include_dirs': [
237       '..',  # Root of Chrome checkout
238     ],
239     'conditions': [
240       ['remoting_multi_process != 0', {
241         'defines': [
242           'REMOTING_MULTI_PROCESS',
243         ],
244       }],
245     ],
246   },
248   'conditions': [
249     ['enable_remoting_host==1', {
250       'targets': [
251         {
252           'target_name': 'remoting_host',
253           'type': 'static_library',
254           'variables': { 'enable_wexit_time_destructors': 1, },
255           'dependencies': [
256             'remoting_base',
257             'remoting_jingle_glue',
258             'remoting_protocol',
259             '../crypto/crypto.gyp:crypto',
260             '../google_apis/google_apis.gyp:google_apis',
261             '../media/media.gyp:media',
262             '../ipc/ipc.gyp:ipc',
263           ],
264           'defines': [
265             'VERSION=<(version_full)',
266           ],
267           'sources': [
268             'host/audio_capturer.cc',
269             'host/audio_capturer.h',
270             'host/audio_capturer_linux.cc',
271             'host/audio_capturer_linux.h',
272             'host/audio_capturer_mac.cc',
273             'host/audio_capturer_win.cc',
274             'host/audio_capturer_win.h',
275             'host/audio_scheduler.cc',
276             'host/audio_scheduler.h',
277             'host/audio_silence_detector.cc',
278             'host/audio_silence_detector.h',
279             'host/basic_desktop_environment.cc',
280             'host/basic_desktop_environment.h',
281             'host/capture_scheduler.cc',
282             'host/capture_scheduler.h',
283             'host/chromoting_host.cc',
284             'host/chromoting_host.h',
285             'host/chromoting_host_context.cc',
286             'host/chromoting_host_context.h',
287             'host/chromoting_messages.cc',
288             'host/chromoting_messages.h',
289             'host/client_session.cc',
290             'host/client_session.h',
291             'host/clipboard.h',
292             'host/clipboard_linux.cc',
293             'host/clipboard_mac.mm',
294             'host/clipboard_win.cc',
295             'host/constants_mac.cc',
296             'host/constants_mac.h',
297             'host/continue_window.h',
298             'host/continue_window_gtk.cc',
299             'host/continue_window_mac.mm',
300             'host/continue_window_win.cc',
301             'host/desktop_environment.h',
302             'host/desktop_resizer.h',
303             'host/desktop_resizer_linux.cc',
304             'host/desktop_resizer_win.cc',
305             'host/desktop_resizer_mac.cc',
306             'host/desktop_session_connector.h',
307             'host/desktop_session_proxy.cc',
308             'host/desktop_session_proxy.h',
309             'host/disconnect_window.h',
310             'host/disconnect_window_gtk.cc',
311             'host/disconnect_window_mac.h',
312             'host/disconnect_window_mac.mm',
313             'host/disconnect_window_win.cc',
314             'host/dns_blackhole_checker.cc',
315             'host/dns_blackhole_checker.h',
316             'host/event_executor.h',
317             'host/event_executor_fake.cc',
318             'host/event_executor_fake.h',
319             'host/event_executor_linux.cc',
320             'host/event_executor_mac.cc',
321             'host/event_executor_win.cc',
322             'host/heartbeat_sender.cc',
323             'host/heartbeat_sender.h',
324             'host/host_config.cc',
325             'host/host_config.h',
326             'host/host_exit_codes.h',
327             'host/host_key_pair.cc',
328             'host/host_key_pair.h',
329             'host/host_port_allocator.cc',
330             'host/host_port_allocator.h',
331             'host/host_secret.cc',
332             'host/host_secret.h',
333             'host/host_status_observer.h',
334             'host/host_user_interface.cc',
335             'host/host_user_interface.h',
336             'host/in_memory_host_config.cc',
337             'host/in_memory_host_config.h',
338             'host/ipc_audio_capturer.cc',
339             'host/ipc_audio_capturer.h',
340             'host/ipc_constants.cc',
341             'host/ipc_constants.h',
342             'host/ipc_desktop_environment.cc',
343             'host/ipc_desktop_environment.h',
344             'host/ipc_event_executor.cc',
345             'host/ipc_event_executor.h',
346             'host/ipc_video_frame_capturer.cc',
347             'host/ipc_video_frame_capturer.h',
348             'host/it2me_host_user_interface.cc',
349             'host/it2me_host_user_interface.h',
350             'host/json_host_config.cc',
351             'host/json_host_config.h',
352             'host/linux/audio_pipe_reader.cc',
353             'host/linux/audio_pipe_reader.h',
354             'host/linux/x11_util.cc',
355             'host/linux/x11_util.h',
356             'host/linux/x_server_clipboard.cc',
357             'host/linux/x_server_clipboard.h',
358             'host/local_input_monitor.h',
359             'host/local_input_monitor_linux.cc',
360             'host/local_input_monitor_mac.mm',
361             'host/local_input_monitor_thread_linux.cc',
362             'host/local_input_monitor_thread_linux.h',
363             'host/local_input_monitor_win.cc',
364             'host/log_to_server.cc',
365             'host/log_to_server.h',
366             'host/mouse_clamping_filter.cc',
367             'host/mouse_clamping_filter.h',
368             'host/mouse_move_observer.h',
369             'host/network_settings.h',
370             'host/pam_authorization_factory_posix.cc',
371             'host/pam_authorization_factory_posix.h',
372             'host/pin_hash.cc',
373             'host/pin_hash.h',
374             'host/policy_hack/policy_watcher.h',
375             'host/policy_hack/policy_watcher.cc',
376             'host/policy_hack/policy_watcher_linux.cc',
377             'host/policy_hack/policy_watcher_mac.mm',
378             'host/policy_hack/policy_watcher_win.cc',
379             'host/register_support_host_request.cc',
380             'host/register_support_host_request.h',
381             'host/remote_input_filter.cc',
382             'host/remote_input_filter.h',
383             'host/resizing_host_observer.cc',
384             'host/resizing_host_observer.h',
385             'host/sas_injector.h',
386             'host/sas_injector_win.cc',
387             'host/server_log_entry.cc',
388             'host/server_log_entry.h',
389             'host/service_client.cc',
390             'host/service_client.h',
391             'host/session_manager_factory.cc',
392             'host/session_manager_factory.h',
393             'host/signaling_connector.cc',
394             'host/signaling_connector.h',
395             'host/ui_strings.cc',
396             'host/ui_strings.h',
397             'host/url_request_context.cc',
398             'host/url_request_context.h',
399             'host/usage_stats_consent.h',
400             'host/usage_stats_consent_mac.cc',
401             'host/usage_stats_consent_win.cc',
402             'host/video_scheduler.cc',
403             'host/video_scheduler.h',
404             'host/vlog_net_log.cc',
405             'host/vlog_net_log.h',
406             'host/win/launch_process_with_token.cc',
407             'host/win/launch_process_with_token.h',
408             'host/win/omaha.cc',
409             'host/win/omaha.h',
410             'host/win/security_descriptor.cc',
411             'host/win/security_descriptor.h',
412             'host/win/session_desktop_environment.cc',
413             'host/win/session_desktop_environment.h',
414             'host/win/session_event_executor.cc',
415             'host/win/session_event_executor.h',
416             'host/win/window_station_and_desktop.cc',
417             'host/win/window_station_and_desktop.h',
418           ],
419           'conditions': [
420             ['toolkit_uses_gtk==1', {
421               'dependencies': [
422                 '../build/linux/system.gyp:gtk',
423               ],
424             }, {  # else toolkit_uses_gtk!=1
425               'sources!': [
426                 '*_gtk.cc',
427               ],
428             }],
429             ['OS=="linux"', {
430               'link_settings': {
431                 'libraries': [
432                   '-lX11',
433                   '-lXext',
434                   '-lXfixes',
435                   '-lXtst',
436                   '-lXi',
437                   '-lpam',
438                 ],
439               },
440             }],
441             ['OS=="mac"', {
442               'sources': [
443                 '../third_party/GTM/AppKit/GTMCarbonEvent.h',
444                 '../third_party/GTM/AppKit/GTMCarbonEvent.m',
445                 '../third_party/GTM/DebugUtils/GTMDebugSelectorValidation.h',
446                 '../third_party/GTM/DebugUtils/GTMTypeCasting.h',
447                 '../third_party/GTM/Foundation/GTMObjectSingleton.h',
448                 '../third_party/GTM/GTMDefines.h',
449               ],
450               'include_dirs': [
451                 '../third_party/GTM',
452                 '../third_party/GTM/AppKit',
453                 '../third_party/GTM/DebugUtils',
454                 '../third_party/GTM/Foundation',
455               ],
456             }],
457             ['OS=="win"', {
458               'dependencies': [
459                 '../sandbox/sandbox.gyp:sandbox',
460               ],
461             }],
462           ],
463         },  # end of target 'remoting_host'
465         {
466           'target_name': 'remoting_me2me_host',
467           'type': 'executable',
468           'variables': { 'enable_wexit_time_destructors': 1, },
469           'dependencies': [
470             'remoting_base',
471             'remoting_breakpad',
472             'remoting_host',
473             'remoting_host_event_logger',
474             'remoting_host_logging',
475             'remoting_jingle_glue',
476             '../base/base.gyp:base',
477             '../base/base.gyp:base_i18n',
478             '../media/media.gyp:media',
479             '../net/net.gyp:net',
480           ],
481           'defines': [
482             'VERSION=<(version_full)',
483           ],
484           'sources': [
485             'host/config_file_watcher.cc',
486             'host/config_file_watcher.h',
487             'host/curtain_mode.h',
488             'host/curtaining_host_observer.h',
489             'host/curtaining_host_observer.cc',
490             'host/curtain_mode_linux.cc',
491             'host/curtain_mode_mac.cc',
492             'host/curtain_mode_win.cc',
493             'host/posix/signal_handler.cc',
494             'host/posix/signal_handler.h',
495             'host/remoting_me2me_host.cc',
496           ],
497           'conditions': [
498             ['os_posix != 1', {
499               'sources/': [
500                 ['exclude', '^host/posix/'],
501               ],
502             }],
503             ['OS=="mac"', {
504               'mac_bundle': 1,
505               'variables': {
506                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
507               },
508               'xcode_settings': {
509                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
510                 'INFOPLIST_PREPROCESS': 'YES',
511                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
512               },
513               'mac_bundle_resources': [
514                 'host/disconnect_window.xib',
515                 'host/remoting_me2me_host.icns',
516                 'host/remoting_me2me_host-Info.plist',
517               ],
518               'mac_bundle_resources!': [
519                 'host/remoting_me2me_host-Info.plist',
520               ],
521               'conditions': [
522                 ['mac_breakpad==1', {
523                   'variables': {
524                     # A real .dSYM is needed for dump_syms to operate on.
525                     'mac_real_dsym': 1,
526                   },
527                   'defines': ['MAC_BREAKPAD'],
528                   'copies': [
529                     {
530                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
531                       'files': [
532                         '<(PRODUCT_DIR)/crash_inspector',
533                         '<(PRODUCT_DIR)/crash_report_sender.app'
534                       ],
535                     },
536                   ],
537                 }],  # mac_breakpad==1
538               ],  # conditions
539             }],  # OS=mac
540             ['OS=="win"', {
541               'product_name': 'remoting_host',
542               'dependencies': [
543                 'remoting_version_resources',
544               ],
545               'sources': [
546                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/remoting_host_messages.rc',
547                 '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_me2me_version.rc',
548                 'host/host_ui.rc',
549               ],
550               'link_settings': {
551                 'libraries': [
552                   '-lcomctl32.lib',
553                 ],
554               },
555               'msvs_settings': {
556                 'VCLinkerTool': {
557                   'AdditionalOptions': [
558                     "\"/manifestdependency:type='win32' "
559                         "name='Microsoft.Windows.Common-Controls' "
560                         "version='6.0.0.0' "
561                         "processorArchitecture='*' "
562                         "publicKeyToken='6595b64144ccf1df' language='*'\"",
563                   ],
564                   'conditions': [
565                     ['buildtype == "Official" and remoting_multi_process == 0', {
566                       'AdditionalOptions': [
567                         "\"/MANIFESTUAC:level='requireAdministrator' "
568                             "uiAccess='true'\"",
569                       ],
570                     }],
571                   ],
572                   'ImportLibrary': '$(OutDir)\\lib\\remoting_host_exe.lib',
573                   'OutputFile': '$(OutDir)\\remoting_host.exe',
574                   # 2 == /SUBSYSTEM:WINDOWS
575                   'SubSystem': '2',
576                 },
577               },
578             }],
579           ],  # end of 'conditions'
580         },  # end of target 'remoting_me2me_host'
582         {
583           'target_name': 'remoting_host_keygen',
584           'type': 'executable',
585           'dependencies': [
586             'remoting_base',
587             '../base/base.gyp:base',
588             '../base/base.gyp:base_i18n',
589             '../crypto/crypto.gyp:crypto',
590           ],
591           'sources': [
592             'host/keygen_main.cc',
593           ],
594         },  # end of target 'remoting_host_keygen'
596         {
597           'target_name': 'remoting_host_setup_base',
598           'type': 'static_library',
599           'variables': { 'enable_wexit_time_destructors': 1, },
600           'dependencies': [
601             '../base/base.gyp:base',
602             '../google_apis/google_apis.gyp:google_apis',
603             'remoting_host',
604           ],
605           'sources': [
606             'host/setup/daemon_controller.h',
607             'host/setup/daemon_controller_linux.cc',
608             'host/setup/daemon_controller_mac.cc',
609             'host/setup/daemon_controller_win.cc',
610             'host/setup/daemon_installer_win.cc',
611             'host/setup/daemon_installer_win.h',
612             'host/setup/host_starter.cc',
613             'host/setup/host_starter.h',
614             'host/setup/oauth_helper.cc',
615             'host/setup/oauth_helper.h',
616             'host/setup/pin_validator.cc',
617             'host/setup/pin_validator.h',
618             'host/setup/win/auth_code_getter.cc',
619             'host/setup/win/auth_code_getter.h',
620           ],
621           'conditions': [
622             ['OS=="win"', {
623               'dependencies': [
624                 '../google_update/google_update.gyp:google_update',
625                 'remoting_elevated_controller',
626               ],
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/host_ui_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               'dependencies': [
694                 'remoting_elevated_controller',
695                 'remoting_version_resources',
696               ],
697               'include_dirs': [
698                 '<(INTERMEDIATE_DIR)',
699               ],
700               'sources': [
701                 '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_host_plugin_version.rc',
702                 'host/host_ui.rc',
703                 'host/plugin/host_plugin.def',
704               ],
705             }],
706           ],
707         },  # end of target 'remoting_host_plugin'
709         {
710           'target_name': 'remoting_desktop',
711           'type': 'executable',
712           'variables': { 'enable_wexit_time_destructors': 1, },
713           'defines': [
714             'REMOTING_MULTI_PROCESS',
715           ],
716           'dependencies': [
717             'remoting_base',
718             'remoting_breakpad',
719             'remoting_host',
720             'remoting_host_logging',
721             '../base/base.gyp:base',
722             '../ipc/ipc.gyp:ipc',
723           ],
724           'sources': [
725             'host/desktop_process.cc',
726             'host/desktop_process.h',
727             'host/desktop_process_main.cc',
728             'host/desktop_session_agent.cc',
729             'host/desktop_session_agent.h',
730             'host/desktop_session_agent_posix.cc',
731             'host/desktop_session_agent_win.cc',
732           ],
733           'conditions': [
734             ['OS=="win"', {
735               'dependencies': [
736                 'remoting_version_resources',
737               ],
738               'sources': [
739                 'host/host_ui.rc',
740                 '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_desktop_version.rc',
741               ],
742               'link_settings': {
743                 'libraries': [
744                   '-lcomctl32.lib',
745                 ],
746               },
747               'msvs_settings': {
748                 'VCLinkerTool': {
749                   'AdditionalOptions': [
750                     "\"/manifestdependency:type='win32' "
751                         "name='Microsoft.Windows.Common-Controls' "
752                         "version='6.0.0.0' "
753                         "processorArchitecture='*' "
754                         "publicKeyToken='6595b64144ccf1df' language='*'\"",
755                   ],
756                   'conditions': [
757                     ['buildtype == "Official"', {
758                       'AdditionalOptions': [
759                         "\"/MANIFESTUAC:level='requireAdministrator' "
760                             "uiAccess='true'\"",
761                       ],
762                     }],
763                   ],
764                   # 2 == /SUBSYSTEM:WINDOWS
765                   'SubSystem': '2',
766                 },
767               },
768             }],
769           ],
770         },  # end of target 'remoting_desktop'
772       ],  # end of 'targets'
773     }],  # 'enable_remoting_host==1'
775     ['OS=="linux" and chromeos==0', {
776       'targets': [
777         # Linux breakpad processing
778         {
779           'target_name': 'remoting_linux_symbols',
780           'type': 'none',
781           'conditions': [
782             ['linux_dump_symbols==1', {
783               'actions': [
784                 {
785                   'action_name': 'dump_symbols',
786                   'variables': {
787                     'plugin_file': '<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
788                   },
789                   'inputs': [
790                     '<(DEPTH)/build/linux/dump_app_syms',
791                     '<(PRODUCT_DIR)/dump_syms',
792                     '<(PRODUCT_DIR)/<(plugin_file)',
793                   ],
794                   'outputs': [
795                     '<(PRODUCT_DIR)/<(plugin_file).breakpad.<(target_arch)',
796                   ],
797                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
798                              '<(PRODUCT_DIR)/dump_syms',
799                              '<(linux_strip_binary)',
800                              '<(PRODUCT_DIR)/<(plugin_file)',
801                              '<@(_outputs)'],
802                   'message': 'Dumping breakpad symbols to <(_outputs)',
803                   'process_outputs_as_sources': 1,
804                 },
805               ],
806               'dependencies': [
807                 'remoting_host_plugin',
808                 '../breakpad/breakpad.gyp:dump_syms',
809               ],
810             }],  # 'linux_dump_symbols==1'
811           ],  # end of 'conditions'
812         },  # end of target 'linux_symbols'
813         {
814           'target_name': 'remoting_start_host',
815           'type': 'executable',
816           'dependencies': [
817             'remoting_host_setup_base',
818           ],
819           'sources': [
820             'host/setup/start_host.cc',
821           ],
822         },  # end of target 'remoting_start_host'
823       ],  # end of 'targets'
824     }],  # 'OS=="linux"'
826     ['OS=="mac"', {
827       'targets': [
828         {
829           'target_name': 'remoting_host_uninstaller',
830           'type': 'executable',
831           'mac_bundle': 1,
832           'variables': {
833             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_ID@")',
834             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_NAME@")',
835           },
836           'dependencies': [
837             '<(DEPTH)/base/base.gyp:base',
838           ],
839           'sources': [
840             'host/constants_mac.cc',
841             'host/constants_mac.h',
842             'host/installer/mac/uninstaller/remoting_uninstaller.h',
843             'host/installer/mac/uninstaller/remoting_uninstaller.mm',
844             'host/installer/mac/uninstaller/remoting_uninstaller_app.h',
845             'host/installer/mac/uninstaller/remoting_uninstaller_app.mm',
846           ],
847           'xcode_settings': {
848             'INFOPLIST_FILE': 'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
849             'INFOPLIST_PREPROCESS': 'YES',
850             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_INFO="<(copyright_info)"',
851           },
852           'mac_bundle_resources': [
853             'host/installer/mac/uninstaller/remoting_uninstaller.icns',
854             'host/installer/mac/uninstaller/remoting_uninstaller.xib',
855             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
856           ],
857           'mac_bundle_resources!': [
858             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
859           ],
860         },  # end of target 'remoting_host_uninstaller'
862         # This packages up the files needed for the remoting host installer so
863         # they can be sent off to be signed.
864         # We don't build an installer here because we don't have signed binaries.
865         {
866           'target_name': 'remoting_me2me_host_archive',
867           'type': 'none',
868           'dependencies': [
869             'remoting_host_prefpane',
870             'remoting_host_uninstaller',
871             'remoting_me2me_host',
872           ],
873           'variables': {
874             'host_name': '<!(python <(version_py_path) -f <(branding_path) -t "@HOST_PLUGIN_FILE_NAME@")',
875             'host_service_name': '<!(python <(version_py_path) -f <(branding_path) -t "@DAEMON_FILE_NAME@")',
876             'host_uninstaller_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_NAME@")',
877             'bundle_prefix': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_UNINSTALLER_BUNDLE_PREFIX@")',
878           },
879           'actions': [
880             {
881               'action_name': 'Zip installer files for signing',
882               'temp_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting-me2me-host',
883               'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
884               'variables': {
885                 'host_name_nospace': '<!(echo <(host_name) | sed "s/ //g")',
886                 'host_service_name_nospace': '<!(echo <(host_service_name) | sed "s/ //g")',
887                 'host_uninstaller_name_nospace': '<!(echo <(host_uninstaller_name) | sed "s/ //g")',
888               },
889               'generated_files': [
890                 '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane',
891                 '<(PRODUCT_DIR)/remoting_me2me_host.app',
892                 '<(PRODUCT_DIR)/remoting_host_uninstaller.app',
893               ],
894               'generated_files_dst': [
895                 'PreferencePanes/org.chromium.chromoting.prefPane',
896                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app',
897                 'Applications/<(host_uninstaller_name).app',
898               ],
899               'source_files': [
900                 '<@(remoting_host_installer_mac_files)',
901               ],
902               'defs': [
903                 'VERSION=<(version_full)',
904                 'VERSION_SHORT=<(version_short)',
905                 'VERSION_MAJOR=<(version_major)',
906                 'VERSION_MINOR=<(version_minor)',
907                 'COPYRIGHT_INFO=<(copyright_info)',
908                 'HOST_NAME=<(host_name)',
909                 'HOST_SERVICE_NAME=<(host_service_name)',
910                 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)',
911                 'HOST_PKG=<(host_name)',
912                 'HOST_SERVICE_PKG=<(host_service_name_nospace)',
913                 'HOST_UNINSTALLER_PKG=<(host_uninstaller_name_nospace)',
914                 'BUNDLE_ID_HOST=<(bundle_prefix).<(host_name_nospace)',
915                 'BUNDLE_ID_HOST_SERVICE=<(bundle_prefix).<(host_service_name_nospace)',
916                 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)',
917                 'DMG_VOLUME_NAME=<(host_name) <(version_full)',
918                 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)',
919               ],
920               'inputs': [
921                 'host/installer/build-installer-archive.py',
922                 '<@(_source_files)',
923               ],
924               'outputs': [
925                 '<(_zip_path)',
926               ],
927               'action': [
928                 'python',
929                 'host/installer/build-installer-archive.py',
930                 '<(_temp_dir)',
931                 '<(_zip_path)',
932                 '--source-file-roots',
933                 '<@(remoting_host_installer_mac_roots)',
934                 '--source-files',
935                 '<@(_source_files)',
936                 '--generated-files',
937                 '<@(_generated_files)',
938                 '--generated-files-dst',
939                 '<@(_generated_files_dst)',
940                 '--defs',
941                 '<@(_defs)',
942               ],
943             },
944           ],  # actions
945         }, # end of target 'remoting_me2me_host_archive'
947         {
948           'target_name': 'remoting_host_prefpane',
949           'type': 'loadable_module',
950           'mac_bundle': 1,
951           'product_extension': 'prefPane',
952           'defines': [
953             'JSON_USE_EXCEPTION=0',
954           ],
955           'include_dirs': [
956             '../third_party/jsoncpp/overrides/include/',
957             '../third_party/jsoncpp/source/include/',
958             '../third_party/jsoncpp/source/src/lib_json/',
959           ],
961           # These source files are included directly, instead of adding target
962           # dependencies, because the targets are not yet built for 64-bit on
963           # Mac OS X - http://crbug.com/125116.
964           #
965           # TODO(lambroslambrou): Fix this when Chrome supports building for
966           # Mac OS X 64-bit - http://crbug.com/128122.
967           'sources': [
968             '../third_party/jsoncpp/source/src/lib_json/json_reader.cpp',
969             '../third_party/jsoncpp/overrides/src/lib_json/json_value.cpp',
970             '../third_party/jsoncpp/source/src/lib_json/json_writer.cpp',
971             '../third_party/modp_b64/modp_b64.cc',
972             'host/constants_mac.cc',
973             'host/constants_mac.h',
974             'host/host_config.cc',
975             'host/mac/me2me_preference_pane.h',
976             'host/mac/me2me_preference_pane.mm',
977             'host/mac/me2me_preference_pane_confirm_pin.h',
978             'host/mac/me2me_preference_pane_confirm_pin.mm',
979             'host/mac/me2me_preference_pane_disable.h',
980             'host/mac/me2me_preference_pane_disable.mm',
981           ],
982           'link_settings': {
983             'libraries': [
984               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
985               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
986               '$(SDKROOT)/System/Library/Frameworks/PreferencePanes.framework',
987               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
988             ],
989           },
990           'variables': {
991             'bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_ID@")',
992             'bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
993             # The XML new-line entity splits the label into two lines, which
994             # is the maximum number of lines allowed by the System Preferences
995             # applet.
996             # TODO(lambroslambrou): When these strings are localized, use "\n"
997             # instead of "&#x0a;" for linebreaks.
998             'pref_pane_icon_label': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_ICON_LABEL@")',
999           },
1000           'xcode_settings': {
1001             'ARCHS': ['i386', 'x86_64'],
1002             'GCC_ENABLE_OBJC_GC': 'supported',
1003             'INFOPLIST_FILE': 'host/mac/me2me_preference_pane-Info.plist',
1004             'INFOPLIST_PREPROCESS': 'YES',
1005             '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)"',
1006           },
1007           'mac_bundle_resources': [
1008             'host/mac/me2me_preference_pane.xib',
1009             'host/mac/me2me_preference_pane_confirm_pin.xib',
1010             'host/mac/me2me_preference_pane_disable.xib',
1011             'host/mac/me2me_preference_pane-Info.plist',
1012             'resources/chromoting128.png',
1013           ],
1014           'mac_bundle_resources!': [
1015             'host/mac/me2me_preference_pane-Info.plist',
1016           ],
1017           'conditions': [
1018             ['mac_breakpad==1', {
1019               'variables': {
1020                 # A real .dSYM is needed for dump_syms to operate on.
1021                 'mac_real_dsym': 1,
1022               },
1023             }],  # 'mac_breakpad==1'
1024           ],  # conditions
1025         },  # end of target 'remoting_host_prefpane'
1026       ],  # end of 'targets'
1027       'conditions': [
1028         ['mac_breakpad==1', {
1029           'targets': [
1030             {
1031               'target_name': 'remoting_mac_symbols',
1032               'type': 'none',
1033               'dependencies': [
1034                 '../breakpad/breakpad.gyp:dump_syms',
1035                 'remoting_me2me_host',
1036               ],
1037               'actions': [
1038                 {
1039                   'action_name': 'dump_symbols',
1040                   'inputs': [
1041                     '<(DEPTH)/remoting/scripts/mac/dump_product_syms',
1042                     '<(PRODUCT_DIR)/dump_syms',
1043                     '<(PRODUCT_DIR)/remoting_me2me_host.app',
1044                   ],
1045                   'outputs': [
1046                     '<(PRODUCT_DIR)/remoting_me2me_host.app-<(version_full)-<(target_arch).breakpad',
1047                   ],
1048                   'action': [
1049                     '<@(_inputs)',
1050                     '<@(_outputs)',
1051                   ],
1052                   'message': 'Dumping breakpad symbols to <(_outputs)',
1053                 },  # end of action 'dump_symbols'
1054               ],  # end of 'actions'
1055             },  # end of target 'remoting_mac_symbols'
1056           ],  # end of 'targets'
1057         }],  # 'mac_breakpad==1'
1058       ],  # end of 'conditions'
1059     }],  # 'OS=="mac"'
1061     ['OS=="win"', {
1062       'targets': [
1063         {
1064           'target_name': 'remoting_breakpad_tester',
1065           'type': 'executable',
1066           'variables': { 'enable_wexit_time_destructors': 1, },
1067           'dependencies': [
1068             '../base/base.gyp:base',
1069             'remoting_host_logging',
1070           ],
1071           'sources': [
1072             'tools/breakpad_tester_win.cc',
1073           ],
1074         },  # end of target 'remoting_breakpad_tester'
1075         {
1076           'target_name': 'remoting_elevated_controller',
1077           'type': 'static_library',
1078           'sources': [
1079             'host/win/elevated_controller_idl.templ',
1080             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller.h',
1081             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller.idl',
1082             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller_i.c',
1083           ],
1084           # This target exports a hard dependency because dependent targets may
1085           # include elevated_controller.h, a generated header.
1086           'hard_dependency': 1,
1087           'msvs_settings': {
1088             'VCMIDLTool': {
1089               'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1090             },
1091           },
1092           'direct_dependent_settings': {
1093             'include_dirs': [
1094               '<(SHARED_INTERMEDIATE_DIR)',
1095             ],
1096           },
1097           'rules': [
1098             {
1099               'rule_name': 'generate_idl',
1100               'extension': 'templ',
1101               'outputs': [
1102                 '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller.idl',
1103               ],
1104               'action': [
1105                 'python',
1106                 '<(version_py_path)',
1107                 '-e', 'DAEMON_CONTROLLER_CLSID="<(daemon_controller_clsid)"',
1108                 '<(RULE_INPUT_PATH)',
1109                 '<@(_outputs)',
1110               ],
1111               'process_outputs_as_sources': 1,
1112               'message': 'Generating <@(_outputs)',
1113               'msvs_cygwin_shell': 1,
1114             },
1115           ],
1116         },  # end of target 'remoting_elevated_controller'
1117         {
1118           'target_name': 'remoting_configurer',
1119           'type': 'executable',
1120           'dependencies': [
1121             '../base/base.gyp:base',
1122             '../crypto/crypto.gyp:crypto',
1123             'remoting_host',
1124             'remoting_host_setup_base',
1125           ],
1126           'sources': [
1127             'host/branding.cc',
1128             'host/setup/win/host_configurer.cc',
1129             'host/setup/win/host_configurer.rc',
1130             'host/setup/win/host_configurer_window.cc',
1131             'host/setup/win/host_configurer_window.h',
1132             'host/setup/win/host_configurer_resource.h',
1133             'host/setup/win/load_string_from_resource.cc',
1134             'host/setup/win/load_string_from_resource.h',
1135             'host/setup/win/start_host_window.cc',
1136             'host/setup/win/start_host_window.h',
1137           ],
1138           'msvs_settings': {
1139             'VCLinkerTool': {
1140               'AdditionalOptions': [
1141                 "\"/manifestdependency:type='win32' "
1142                     "name='Microsoft.Windows.Common-Controls' "
1143                     "version='6.0.0.0' "
1144                     "processorArchitecture='*' "
1145                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
1146               ],
1147               # 2 == /SUBSYSTEM:WINDOWS
1148               'SubSystem': '2',
1149             },
1150           },
1151         },  # end of target 'remoting_configurer'
1152         {
1153           'target_name': 'remoting_controller',
1154           'type': 'executable',
1155           'variables': { 'enable_wexit_time_destructors': 1, },
1156           'defines' : [
1157             '_ATL_APARTMENT_THREADED',
1158             '_ATL_NO_AUTOMATIC_NAMESPACE',
1159             '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
1160             'STRICT',
1161             'DAEMON_CONTROLLER_CLSID="{<(daemon_controller_clsid)}"',
1162           ],
1163           'include_dirs': [
1164             '<(INTERMEDIATE_DIR)',
1165           ],
1166           'dependencies': [
1167             '../base/base.gyp:base',
1168             'remoting_breakpad',
1169             'remoting_elevated_controller',
1170             'remoting_host',
1171             'remoting_host_logging',
1172             'remoting_protocol',
1173             'remoting_version_resources',
1174           ],
1175           'sources': [
1176             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_controller_version.rc',
1177             'host/pin_hash.cc',
1178             'host/pin_hash.h',
1179             'host/verify_config_window_win.cc',
1180             'host/verify_config_window_win.h',
1181             'host/win/elevated_controller.cc',
1182             'host/win/elevated_controller.h',
1183             'host/win/elevated_controller.rc',
1184             'host/win/elevated_controller_module.cc',
1185             'host/win/omaha.cc',
1186             'host/win/omaha.h',
1187           ],
1188           'link_settings': {
1189             'libraries': [
1190               '-lcomctl32.lib',
1191             ],
1192           },
1193           'msvs_settings': {
1194             'VCLinkerTool': {
1195               'AdditionalOptions': [
1196                 "\"/manifestdependency:type='win32' "
1197                     "name='Microsoft.Windows.Common-Controls' "
1198                     "version='6.0.0.0' "
1199                     "processorArchitecture='*' "
1200                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
1201               ],
1202               # 2 == /SUBSYSTEM:WINDOWS
1203               'SubSystem': '2',
1204             },
1205           },
1206         },  # end of target 'remoting_controller'
1207         {
1208           'target_name': 'remoting_daemon',
1209           'type': 'executable',
1210           'variables': { 'enable_wexit_time_destructors': 1, },
1211           'dependencies': [
1212             '../base/base.gyp:base',
1213             '../base/base.gyp:base_static',
1214             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1215             '../ipc/ipc.gyp:ipc',
1216             '../net/net.gyp:net',
1217             'remoting_base',
1218             'remoting_breakpad',
1219             'remoting_host',
1220             'remoting_host_logging',
1221             'remoting_version_resources',
1222           ],
1223           'sources': [
1224             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_daemon_version.rc',
1225             'base/scoped_sc_handle_win.h',
1226             '../media/video/capture/screen/win/desktop.cc',
1227             '../media/video/capture/screen/win/desktop.h',
1228             '../media/video/capture/screen/win/scoped_thread_desktop.cc',
1229             '../media/video/capture/screen/win/scoped_thread_desktop.h',
1230             'host/chromoting_messages.cc',
1231             'host/chromoting_messages.h',
1232             'host/config_file_watcher.cc',
1233             'host/config_file_watcher.h',
1234             'host/daemon_process.cc',
1235             'host/daemon_process.h',
1236             'host/daemon_process_win.cc',
1237             'host/desktop_session.cc',
1238             'host/desktop_session.h',
1239             'host/desktop_session_win.cc',
1240             'host/desktop_session_win.h',
1241             'host/host_exit_codes.h',
1242             'host/ipc_constants.cc',
1243             'host/ipc_constants.h',
1244             'host/sas_injector.h',
1245             'host/sas_injector_win.cc',
1246             'host/win/host_service.cc',
1247             'host/win/host_service.h',
1248             'host/win/host_service.rc',
1249             'host/win/host_service_resource.h',
1250             'host/win/omaha.cc',
1251             'host/win/omaha.h',
1252             'host/win/unprivileged_process_delegate.cc',
1253             'host/win/unprivileged_process_delegate.h',
1254             'host/win/worker_process_launcher.cc',
1255             'host/win/worker_process_launcher.h',
1256             'host/win/wts_console_monitor.h',
1257             'host/win/wts_console_observer.h',
1258             'host/win/wts_console_session_process_driver.cc',
1259             'host/win/wts_console_session_process_driver.h',
1260             'host/win/wts_session_process_delegate.cc',
1261             'host/win/wts_session_process_delegate.h',
1262             'host/worker_process_ipc_delegate.h',
1263           ],
1264           'msvs_settings': {
1265             'VCLinkerTool': {
1266               'AdditionalDependencies': [
1267                 'wtsapi32.lib',
1268               ],
1269               # 2 == /SUBSYSTEM:WINDOWS
1270               'SubSystem': '2',
1271             },
1272           },
1273         },  # end of target 'remoting_daemon'
1275         # Generates the version information resources for the Windows binaries.
1276         # The .RC files are generated from the "version.rc.version" template and
1277         # placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder.
1278         # The substitution strings are taken from:
1279         #   - build/util/LASTCHANGE - the last source code revision.
1280         #   - chrome/VERSION - the major, build & patch versions.
1281         #   - remoting/VERSION - the chromoting patch version (and overrides
1282         #       for chrome/VERSION).
1283         #   - (branding_path) - UI/localizable strings.
1284         #   - xxx.ver - per-binary non-localizable strings such as the binary
1285         #     name.
1286         {
1287           'target_name': 'remoting_version_resources',
1288           'type': 'none',
1289           'inputs': [
1290             '<(branding_path)',
1291             'version.rc.version',
1292             '<(DEPTH)/build/util/LASTCHANGE',
1293             '<(remoting_version_path)',
1294             '<(chrome_version_path)',
1295           ],
1296           'direct_dependent_settings': {
1297             'include_dirs': [
1298               '<(SHARED_INTERMEDIATE_DIR)/remoting',
1299             ],
1300           },
1301           'sources': [
1302             'host/plugin/remoting_host_plugin.ver',
1303             'host/remoting_desktop.ver',
1304             'host/remoting_host_me2me.ver',
1305             'host/win/remoting_controller.ver',
1306             'host/win/remoting_daemon.ver',
1307           ],
1308           'rules': [
1309             {
1310               'rule_name': 'version',
1311               'extension': 'ver',
1312               'variables': {
1313                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
1314                 'template_input_path': 'version.rc.version',
1315               },
1316               'inputs': [
1317                 '<(branding_path)',
1318                 '<(chrome_version_path)',
1319                 '<(lastchange_path)',
1320                 '<(remoting_version_path)',
1321                 '<(template_input_path)',
1322               ],
1323               'outputs': [
1324                 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc',
1325               ],
1326               'action': [
1327                 'python',
1328                 '<(version_py_path)',
1329                 '-f', '<(RULE_INPUT_PATH)',
1330                 '-f', '<(chrome_version_path)',
1331                 # |remoting_version_path| must be after |chrome_version_path|
1332                 # because it can contain overrides for the version numbers.
1333                 '-f', '<(remoting_version_path)',
1334                 '-f', '<(branding_path)',
1335                 '-f', '<(lastchange_path)',
1336                 '<(template_input_path)',
1337                 '<@(_outputs)',
1338               ],
1339               'message': 'Generating version information in <@(_outputs)'
1340             },
1341           ],
1342         },  # end of target 'remoting_version_resources'
1343       ],  # end of 'targets'
1344     }],  # 'OS=="win"'
1346     # The host installation is generated only if WiX is available and when
1347     # building a non-component build. WiX does not provide a easy way to
1348     # include all DLLs imported by the installed binaries, so supporting
1349     # the component build becomes a burden.
1350     ['OS == "win" and component != "shared_library" and wix_exists == "True" \
1351         and sas_dll_exists == "True"', {
1352       'targets': [
1353         {
1354           'target_name': 'remoting_host_installation',
1355           'type': 'none',
1356           'dependencies': [
1357             'remoting_me2me_host_archive',
1358           ],
1359           'sources': [
1360             '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1361           ],
1362           'outputs': [
1363             '<(PRODUCT_DIR)/chromoting.msi',
1364           ],
1365           'rules': [
1366             {
1367               'rule_name': 'zip2msi',
1368               'extension': 'zip',
1369               'inputs': [
1370                 'tools/zip2msi.py',
1371               ],
1372               'outputs': [
1373                 '<(PRODUCT_DIR)/chromoting.msi',
1374               ],
1375               'msvs_cygwin_shell': 0,
1376               'action': [
1377                 'python', 'tools/zip2msi.py',
1378                 '--wix_path', '<(wix_path)',
1379                 '--intermediate_dir', '<(INTERMEDIATE_DIR)/installation',
1380                 '<(RULE_INPUT_PATH)',
1381                 '<@(_outputs)',
1382               ],
1383               'message': 'Generating <@(_outputs)',
1384             },
1385           ],
1386         },  # end of target 'remoting_host_installation'
1388         {
1389           'target_name': 'remoting_me2me_host_archive',
1390           'type': 'none',
1391           'dependencies': [
1392             'remoting_controller',
1393             'remoting_daemon',
1394             'remoting_me2me_host',
1395           ],
1396           'compiled_inputs': [
1397             '<(PRODUCT_DIR)/remoting_controller.exe',
1398             '<(PRODUCT_DIR)/remoting_daemon.exe',
1399             '<(PRODUCT_DIR)/remoting_host.exe',
1400           ],
1401           'compiled_inputs_dst': [
1402             'files/remoting_controller.exe',
1403             'files/remoting_daemon.exe',
1404             'files/remoting_host.exe',
1405           ],
1406           'conditions': [
1407             ['buildtype == "Official"', {
1408               'defs': [
1409                 'OFFICIAL_BUILD=1',
1410               ],
1411             }, {  # else buildtype != "Official"
1412               'defs': [
1413                 'OFFICIAL_BUILD=0',
1414               ],
1415             }],
1416             ['remoting_multi_process != 0', {
1417               'dependencies': [
1418                 'remoting_desktop',
1419               ],
1420               'compiled_inputs': [
1421                 '<(PRODUCT_DIR)/remoting_desktop.exe',
1422               ],
1423               'compiled_inputs_dst': [
1424                 'files/remoting_desktop.exe',
1425               ],
1426             }],
1427           ],
1428           'defs': [
1429             'BRANDING=<(branding)',
1430             'CONTROLLER_CLSID={<(daemon_controller_clsid)}',
1431             'REMOTING_MULTI_PROCESS=<(remoting_multi_process)',
1432             'VERSION=<(version_full)',
1433           ],
1434           'generated_files': [
1435             '<@(_compiled_inputs)',
1436             '<(sas_dll_path)/sas.dll',
1437             'resources/chromoting.ico',
1438           ],
1439           'generated_files_dst': [
1440             '<@(_compiled_inputs_dst)',
1441             'files/sas.dll',
1442             'files/chromoting.ico',
1443           ],
1444           'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
1445           'outputs': [
1446             '<(_zip_path)',
1447           ],
1448           'actions': [
1449             {
1450               'action_name': 'Zip installer files for signing',
1451               'temp_dir': '<(INTERMEDIATE_DIR)/installation',
1452               'source_files': [
1453                 '<@(remoting_host_installer_win_files)',
1454               ],
1455               'inputs': [
1456                 '<@(_compiled_inputs)',
1457                 '<(sas_dll_path)/sas.dll',
1458                 '<@(_source_files)',
1459                 'host/installer/build-installer-archive.py',
1460                 'resources/chromoting.ico',
1461               ],
1462               'outputs': [
1463                 '<(_zip_path)',
1464               ],
1465               'action': [
1466                 'python',
1467                 'host/installer/build-installer-archive.py',
1468                 '<(_temp_dir)',
1469                 '<(_zip_path)',
1470                 '--source-file-roots',
1471                 '<@(remoting_host_installer_win_roots)',
1472                 '--source-files',
1473                 '<@(_source_files)',
1474                 '--generated-files',
1475                 '<@(_generated_files)',
1476                 '--generated-files-dst',
1477                 '<@(_generated_files_dst)',
1478                 '--defs',
1479                 '<@(_defs)',
1480               ],
1481             },
1482           ],  # actions
1483         }, # end of target 'remoting_me2me_host_archive'
1484       ],  # end of 'targets'
1485     }],  # '<(wix_path) != ""'
1487   ],  # end of 'conditions'
1489   'targets': [
1490     {
1491       'target_name': 'remoting_breakpad',
1492       'type': 'static_library',
1493       'variables': { 'enable_wexit_time_destructors': 1, },
1494       'dependencies': [
1495         '../base/base.gyp:base',
1496       ],
1497       'sources': [
1498         'base/breakpad.h',
1499         'base/breakpad_linux.cc',
1500         'base/breakpad_mac.mm',
1501         'base/breakpad_win.cc',
1502       ],
1503       'conditions': [
1504         ['OS=="mac"', {
1505           'dependencies': [
1506             '../breakpad/breakpad.gyp:breakpad',
1507           ],
1508         }],
1509         ['OS=="win"', {
1510           'dependencies': [
1511             '../breakpad/breakpad.gyp:breakpad_handler',
1512           ],
1513         }],
1514       ],
1515     },  # end of target 'remoting_breakpad'
1517     {
1518       'target_name': 'remoting_client_plugin',
1519       'type': 'static_library',
1520       'variables': { 'enable_wexit_time_destructors': 1, },
1521       'defines': [
1522         'HAVE_STDINT_H',  # Required by on2_integer.h
1523       ],
1524       'dependencies': [
1525         'remoting_base',
1526         'remoting_client',
1527         'remoting_jingle_glue',
1528         '../media/media.gyp:media',
1529         '../net/net.gyp:net',
1530         '../ppapi/ppapi.gyp:ppapi_cpp_objects',
1531         '../skia/skia.gyp:skia',
1532       ],
1533       'sources': [
1534         'client/plugin/chromoting_instance.cc',
1535         'client/plugin/chromoting_instance.h',
1536         'client/plugin/mac_key_event_processor.cc',
1537         'client/plugin/mac_key_event_processor.h',
1538         'client/plugin/pepper_audio_player.cc',
1539         'client/plugin/pepper_audio_player.h',
1540         'client/plugin/pepper_entrypoints.cc',
1541         'client/plugin/pepper_entrypoints.h',
1542         'client/plugin/pepper_input_handler.cc',
1543         'client/plugin/pepper_input_handler.h',
1544         'client/plugin/pepper_network_manager.cc',
1545         'client/plugin/pepper_network_manager.h',
1546         'client/plugin/pepper_packet_socket_factory.cc',
1547         'client/plugin/pepper_packet_socket_factory.h',
1548         'client/plugin/pepper_plugin_thread_delegate.cc',
1549         'client/plugin/pepper_plugin_thread_delegate.h',
1550         'client/plugin/pepper_port_allocator.cc',
1551         'client/plugin/pepper_port_allocator.h',
1552         'client/plugin/pepper_view.cc',
1553         'client/plugin/pepper_view.h',
1554         'client/plugin/pepper_util.cc',
1555         'client/plugin/pepper_util.h',
1556         'client/plugin/pepper_xmpp_proxy.cc',
1557         'client/plugin/pepper_xmpp_proxy.h',
1558       ],
1559     },  # end of target 'remoting_client_plugin'
1561     {
1562       'target_name': 'remoting_host_event_logger',
1563       'type': 'static_library',
1564       'variables': { 'enable_wexit_time_destructors': 1, },
1565       'dependencies': [
1566         'remoting_base',
1567       ],
1568       'sources': [
1569         'host/host_event_logger.h',
1570         'host/host_event_logger_posix.cc',
1571         'host/host_event_logger_win.cc',
1572       ],
1573       'conditions': [
1574         ['OS=="win"', {
1575           'sources': [
1576             'host/remoting_host_messages.mc',
1577           ],
1578           'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
1579           'include_dirs': [
1580             '<(_output_dir)',
1581           ],
1582           'direct_dependent_settings': {
1583             'include_dirs': [
1584               '<(_output_dir)',
1585             ],
1586           },
1587           # Rule to run the message compiler.
1588           'rules': [
1589             {
1590               'rule_name': 'message_compiler',
1591               'extension': 'mc',
1592               'inputs': [ ],
1593               'outputs': [
1594                 '<(_output_dir)/remoting_host_messages.h',
1595                 '<(_output_dir)/remoting_host_messages.rc',
1596               ],
1597               'msvs_cygwin_shell': 0,
1598               'action': [
1599                 'mc.exe',
1600                 '-h', '<(_output_dir)',
1601                 '-r', '<(_output_dir)/.',
1602                 '<(RULE_INPUT_PATH)',
1603               ],
1604               'process_outputs_as_sources': 1,
1605               'message': 'Running message compiler on <(RULE_INPUT_PATH).',
1606             },
1607           ],
1608         }],
1609       ],  # end of 'conditions'
1610     },  # end of target 'remoting_host_event_logger'
1612     {
1613       'target_name': 'remoting_webapp',
1614       'type': 'none',
1615       'dependencies': [
1616         'remoting_resources',
1617         'remoting_host_plugin',
1618       ],
1619       'sources': [
1620         'webapp/build-webapp.py',
1621         '<(remoting_version_path)',
1622         '<(chrome_version_path)',
1623         '<@(remoting_webapp_patch_files)',
1624         '<@(remoting_webapp_files)',
1625         '<@(remoting_webapp_js_files)',
1626         '<@(remoting_webapp_apps_v2_js_files)',
1627         '<@(remoting_webapp_locale_files)',
1628       ],
1630       'conditions': [
1631         ['enable_remoting_host==1', {
1632           'variables': {
1633               'plugin_path': '<(PRODUCT_DIR)/<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
1634           },
1635         }, {
1636           'variables': {
1637               'plugin_path': '',
1638           },
1639           'dependencies!': [
1640             'remoting_host_plugin',
1641           ],
1642         }],
1643         ['remoting_use_apps_v2==1', {
1644           'variables': {
1645             'remoting_webapp_patch_files': [
1646               'webapp/appsv2.patch',
1647             ],
1648             'remoting_webapp_apps_v2_js_files': [
1649               'webapp/background.js',
1650               'webapp/identity.js',
1651             ],
1652           },
1653         }, {
1654           'variables': {
1655             'remoting_webapp_patch_files': [],
1656             'remoting_webapp_apps_v2_js_files': [],
1657           },
1658         }],
1659       ],
1661       # Can't use a 'copies' because we need to manipulate
1662       # the manifest file to get the right plugin name.
1663       # Also we need to move the plugin into the me2mom
1664       # folder, which means 2 copies, and gyp doesn't
1665       # seem to guarantee the ordering of 2 copies statements
1666       # when the actual project is generated.
1667       'actions': [
1668         {
1669           'action_name': 'Build Remoting WebApp',
1670           'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
1671           'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
1672           'inputs': [
1673             'webapp/build-webapp.py',
1674             '<(remoting_version_path)',
1675             '<(chrome_version_path)',
1676             '<@(remoting_webapp_patch_files)',
1677             '<@(remoting_webapp_files)',
1678             '<@(remoting_webapp_js_files)',
1679             '<@(remoting_webapp_apps_v2_js_files)',
1680             '<@(remoting_webapp_locale_files)',
1681           ],
1682           'conditions': [
1683             ['enable_remoting_host==1', {
1684               'inputs': [
1685                 '<(plugin_path)',
1686               ],
1687             }],
1688           ],
1689           'outputs': [
1690             '<(_output_dir)',
1691             '<(_zip_path)',
1692           ],
1693           'action': [
1694             'python', 'webapp/build-webapp.py',
1695             '<(buildtype)',
1696             '<(version_full)',
1697             '<(host_plugin_mime_type)',
1698             '<(_output_dir)',
1699             '<(_zip_path)',
1700             '<(plugin_path)',
1701             '<@(remoting_webapp_files)',
1702             '<@(remoting_webapp_js_files)',
1703             '<@(remoting_webapp_apps_v2_js_files)',
1704             '--locales',
1705             '<@(remoting_webapp_locale_files)',
1706             '--patches',
1707             '<@(remoting_webapp_patch_files)',
1708           ],
1709           'msvs_cygwin_shell': 1,
1710         },
1711       ],
1712     }, # end of target 'remoting_webapp'
1714     {
1715       'target_name': 'remoting_resources',
1716       'type': 'none',
1717       'variables': {
1718         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
1719         'grit_resource_ids': 'resources/resource_ids',
1720         'sources': [
1721           'base/resources_unittest.cc',
1722           'host/plugin/host_script_object.cc',
1723           'webapp/client_screen.js',
1724           'webapp/host_list.js',
1725           'webapp/host_table_entry.js',
1726           'webapp/host_setup_dialog.js',
1727           'webapp/main.html',
1728           'webapp/manifest.json',
1729           'webapp/remoting.js',
1730         ],
1731       },
1732       'actions': [
1733         {
1734           'action_name': 'verify_resources',
1735           'inputs': [
1736             'resources/remoting_strings.grd',
1737             'resources/common_resources.grd',
1738             'tools/verify_resources.py',
1739             '<@(sources)'
1740           ],
1741           'outputs': [
1742             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
1743           ],
1744           'action': [
1745             'python',
1746             'tools/verify_resources.py',
1747             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
1748             '-r', 'resources/remoting_strings.grd',
1749             '-r', 'resources/common_resources.grd',
1750             '<@(sources)',
1751          ],
1752         },
1753         {
1754           'action_name': 'remoting_strings',
1755           'variables': {
1756             'grit_grd_file': 'resources/remoting_strings.grd',
1757           },
1758           'includes': [ '../build/grit_action.gypi' ],
1759         },
1760         {
1761           'action_name': 'common_resources',
1762           'variables': {
1763             'grit_grd_file': 'resources/common_resources.grd',
1764           },
1765           'includes': [ '../build/grit_action.gypi' ],
1766         },
1767       ],
1768       'copies': [
1769         # Copy results to the product directory.
1770         {
1771           'destination': '<(PRODUCT_DIR)/remoting_locales',
1772           'files': [
1773             '<(grit_out_dir)/remoting/resources/ar.pak',
1774             '<(grit_out_dir)/remoting/resources/bg.pak',
1775             '<(grit_out_dir)/remoting/resources/ca.pak',
1776             '<(grit_out_dir)/remoting/resources/cs.pak',
1777             '<(grit_out_dir)/remoting/resources/da.pak',
1778             '<(grit_out_dir)/remoting/resources/de.pak',
1779             '<(grit_out_dir)/remoting/resources/el.pak',
1780             '<(grit_out_dir)/remoting/resources/en-US.pak',
1781             '<(grit_out_dir)/remoting/resources/en-GB.pak',
1782             '<(grit_out_dir)/remoting/resources/es.pak',
1783             '<(grit_out_dir)/remoting/resources/es-419.pak',
1784             '<(grit_out_dir)/remoting/resources/et.pak',
1785             '<(grit_out_dir)/remoting/resources/fi.pak',
1786             '<(grit_out_dir)/remoting/resources/fil.pak',
1787             '<(grit_out_dir)/remoting/resources/fr.pak',
1788             '<(grit_out_dir)/remoting/resources/he.pak',
1789             '<(grit_out_dir)/remoting/resources/hi.pak',
1790             '<(grit_out_dir)/remoting/resources/hr.pak',
1791             '<(grit_out_dir)/remoting/resources/hu.pak',
1792             '<(grit_out_dir)/remoting/resources/id.pak',
1793             '<(grit_out_dir)/remoting/resources/it.pak',
1794             '<(grit_out_dir)/remoting/resources/ja.pak',
1795             '<(grit_out_dir)/remoting/resources/ko.pak',
1796             '<(grit_out_dir)/remoting/resources/lt.pak',
1797             '<(grit_out_dir)/remoting/resources/lv.pak',
1798             '<(grit_out_dir)/remoting/resources/nb.pak',
1799             '<(grit_out_dir)/remoting/resources/nl.pak',
1800             '<(grit_out_dir)/remoting/resources/pl.pak',
1801             '<(grit_out_dir)/remoting/resources/pt-BR.pak',
1802             '<(grit_out_dir)/remoting/resources/pt-PT.pak',
1803             '<(grit_out_dir)/remoting/resources/ro.pak',
1804             '<(grit_out_dir)/remoting/resources/ru.pak',
1805             '<(grit_out_dir)/remoting/resources/sk.pak',
1806             '<(grit_out_dir)/remoting/resources/sl.pak',
1807             '<(grit_out_dir)/remoting/resources/sr.pak',
1808             '<(grit_out_dir)/remoting/resources/sv.pak',
1809             '<(grit_out_dir)/remoting/resources/th.pak',
1810             '<(grit_out_dir)/remoting/resources/tr.pak',
1811             '<(grit_out_dir)/remoting/resources/uk.pak',
1812             '<(grit_out_dir)/remoting/resources/vi.pak',
1813             '<(grit_out_dir)/remoting/resources/zh-CN.pak',
1814             '<(grit_out_dir)/remoting/resources/zh-TW.pak',
1815           ],
1816         },
1817         {
1818           'destination': '<(PRODUCT_DIR)',
1819           'files': [
1820             '<(grit_out_dir)/remoting/resources/chrome_remote_desktop.pak',
1821           ]
1822         },
1823       ],
1824       'includes': [ '../build/grit_target.gypi' ],
1825     },  # end of target 'remoting_resources'
1827     {
1828       'target_name': 'remoting_base',
1829       'type': 'static_library',
1830       'variables': { 'enable_wexit_time_destructors': 1, },
1831       'dependencies': [
1832         '../base/base.gyp:base',
1833         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1834         '../ui/ui.gyp:ui',
1835         '../net/net.gyp:net',
1836         '../skia/skia.gyp:skia',
1837         '../third_party/libvpx/libvpx.gyp:libvpx',
1838         '../third_party/opus/opus.gyp:opus',
1839         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
1840         '../third_party/speex/speex.gyp:libspeex',
1841         '../media/media.gyp:media',
1842         '../media/media.gyp:shared_memory_support',
1843         '../media/media.gyp:yuv_convert',
1844         'remoting_jingle_glue',
1845         'remoting_resources',
1846         'proto/chromotocol.gyp:chromotocol_proto_lib',
1847       ],
1848       'export_dependent_settings': [
1849         '../base/base.gyp:base',
1850         '../net/net.gyp:net',
1851         '../skia/skia.gyp:skia',
1852         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
1853         'proto/chromotocol.gyp:chromotocol_proto_lib',
1854       ],
1855       # This target needs a hard dependency because dependent targets
1856       # depend on chromotocol_proto_lib for headers.
1857       'hard_dependency': 1,
1858       'sources': [
1859         'base/auto_thread.cc',
1860         'base/auto_thread.h',
1861         'base/auto_thread_task_runner.cc',
1862         'base/auto_thread_task_runner.h',
1863         'base/auth_token_util.cc',
1864         'base/auth_token_util.h',
1865         'base/compound_buffer.cc',
1866         'base/compound_buffer.h',
1867         'base/constants.cc',
1868         'base/constants.h',
1869         'base/plugin_thread_task_runner.cc',
1870         'base/plugin_thread_task_runner.h',
1871         'base/rate_counter.cc',
1872         'base/rate_counter.h',
1873         'base/resources.cc',
1874         'base/resources.h',
1875         'base/running_average.cc',
1876         'base/running_average.h',
1877         'base/socket_reader.cc',
1878         'base/socket_reader.h',
1879         'base/stoppable.cc',
1880         'base/stoppable.h',
1881         'base/typed_buffer.h',
1882         'base/util.cc',
1883         'base/util.h',
1884         'codec/audio_decoder.cc',
1885         'codec/audio_decoder.h',
1886         'codec/audio_decoder_opus.cc',
1887         'codec/audio_decoder_opus.h',
1888         'codec/audio_decoder_speex.cc',
1889         'codec/audio_decoder_speex.h',
1890         'codec/audio_decoder_verbatim.cc',
1891         'codec/audio_decoder_verbatim.h',
1892         'codec/audio_encoder.h',
1893         'codec/audio_encoder_opus.cc',
1894         'codec/audio_encoder_opus.h',
1895         'codec/audio_encoder_speex.cc',
1896         'codec/audio_encoder_speex.h',
1897         'codec/audio_encoder_verbatim.cc',
1898         'codec/audio_encoder_verbatim.h',
1899         'codec/video_decoder.h',
1900         'codec/video_decoder_verbatim.cc',
1901         'codec/video_decoder_verbatim.h',
1902         'codec/video_decoder_vp8.cc',
1903         'codec/video_decoder_vp8.h',
1904         'codec/video_encoder.h',
1905         'codec/video_encoder_verbatim.cc',
1906         'codec/video_encoder_verbatim.h',
1907         'codec/video_encoder_vp8.cc',
1908         'codec/video_encoder_vp8.h',
1909       ],
1910     },  # end of target 'remoting_base'
1912     {
1913       'target_name': 'remoting_host_logging',
1914       'type': 'static_library',
1915       'variables': { 'enable_wexit_time_destructors': 1, },
1916       'dependencies': [
1917         '../base/base.gyp:base',
1918       ],
1919       'sources': [
1920         'host/branding.cc',
1921         'host/branding.h',
1922         'host/logging.h',
1923         'host/logging_posix.cc',
1924         'host/logging_win.cc',
1925       ],
1926     },  # end of target 'remoting_host_logging'
1928     {
1929       'target_name': 'remoting_client',
1930       'type': 'static_library',
1931       'variables': { 'enable_wexit_time_destructors': 1, },
1932       'dependencies': [
1933         'remoting_base',
1934         'remoting_jingle_glue',
1935         'remoting_protocol',
1936       ],
1937       'sources': [
1938         'client/audio_decode_scheduler.cc',
1939         'client/audio_decode_scheduler.h',
1940         'client/audio_player.cc',
1941         'client/audio_player.h',
1942         'client/chromoting_client.cc',
1943         'client/chromoting_client.h',
1944         'client/chromoting_stats.cc',
1945         'client/chromoting_stats.h',
1946         'client/client_config.cc',
1947         'client/client_config.h',
1948         'client/client_context.cc',
1949         'client/client_context.h',
1950         'client/client_user_interface.h',
1951         'client/frame_consumer.h',
1952         'client/frame_consumer_proxy.cc',
1953         'client/frame_consumer_proxy.h',
1954         'client/frame_producer.h',
1955         'client/key_event_mapper.cc',
1956         'client/key_event_mapper.h',
1957         'client/rectangle_update_decoder.cc',
1958         'client/rectangle_update_decoder.h',
1959       ],
1960     },  # end of target 'remoting_client'
1962     {
1963       'target_name': 'remoting_jingle_glue',
1964       'type': 'static_library',
1965       'variables': { 'enable_wexit_time_destructors': 1, },
1966       'dependencies': [
1967         '../base/base.gyp:base',
1968         '../jingle/jingle.gyp:jingle_glue',
1969         '../jingle/jingle.gyp:notifier',
1970         '../third_party/libjingle/libjingle.gyp:libjingle',
1971         '../third_party/libjingle/libjingle.gyp:libjingle_p2p',
1972       ],
1973       'export_dependent_settings': [
1974         '../third_party/libjingle/libjingle.gyp:libjingle',
1975         '../third_party/libjingle/libjingle.gyp:libjingle_p2p',
1976       ],
1977       'sources': [
1978         'jingle_glue/chromium_socket_factory.cc',
1979         'jingle_glue/chromium_socket_factory.h',
1980         'jingle_glue/iq_sender.cc',
1981         'jingle_glue/iq_sender.h',
1982         'jingle_glue/javascript_signal_strategy.cc',
1983         'jingle_glue/javascript_signal_strategy.h',
1984         'jingle_glue/jingle_info_request.cc',
1985         'jingle_glue/jingle_info_request.h',
1986         'jingle_glue/signal_strategy.h',
1987         'jingle_glue/xmpp_proxy.h',
1988         'jingle_glue/xmpp_signal_strategy.cc',
1989         'jingle_glue/xmpp_signal_strategy.h',
1990       ],
1991     },  # end of target 'remoting_jingle_glue'
1993     {
1994       'target_name': 'remoting_protocol',
1995       'type': 'static_library',
1996       'variables': { 'enable_wexit_time_destructors': 1, },
1997       'dependencies': [
1998         'remoting_base',
1999         'remoting_jingle_glue',
2000         '../crypto/crypto.gyp:crypto',
2001         '../jingle/jingle.gyp:jingle_glue',
2002         '../net/net.gyp:net',
2003       ],
2004       'export_dependent_settings': [
2005         'remoting_jingle_glue',
2006       ],
2007       'sources': [
2008         'protocol/audio_reader.cc',
2009         'protocol/audio_reader.h',
2010         'protocol/audio_stub.h',
2011         'protocol/audio_writer.cc',
2012         'protocol/audio_writer.h',
2013         'protocol/auth_util.cc',
2014         'protocol/auth_util.h',
2015         'protocol/authentication_method.cc',
2016         'protocol/authentication_method.h',
2017         'protocol/authenticator.cc',
2018         'protocol/authenticator.h',
2019         'protocol/buffered_socket_writer.cc',
2020         'protocol/buffered_socket_writer.h',
2021         'protocol/channel_authenticator.h',
2022         'protocol/channel_dispatcher_base.cc',
2023         'protocol/channel_dispatcher_base.h',
2024         'protocol/channel_multiplexer.cc',
2025         'protocol/channel_multiplexer.h',
2026         'protocol/client_control_dispatcher.cc',
2027         'protocol/client_control_dispatcher.h',
2028         'protocol/client_event_dispatcher.cc',
2029         'protocol/client_event_dispatcher.h',
2030         'protocol/client_stub.h',
2031         'protocol/clipboard_echo_filter.cc',
2032         'protocol/clipboard_echo_filter.h',
2033         'protocol/clipboard_filter.cc',
2034         'protocol/clipboard_filter.h',
2035         'protocol/clipboard_stub.h',
2036         'protocol/clipboard_thread_proxy.cc',
2037         'protocol/clipboard_thread_proxy.h',
2038         'protocol/connection_to_client.cc',
2039         'protocol/connection_to_client.h',
2040         'protocol/connection_to_host.cc',
2041         'protocol/connection_to_host.h',
2042         'protocol/content_description.cc',
2043         'protocol/content_description.h',
2044         'protocol/errors.h',
2045         'protocol/host_control_dispatcher.cc',
2046         'protocol/host_control_dispatcher.h',
2047         'protocol/host_event_dispatcher.cc',
2048         'protocol/host_event_dispatcher.h',
2049         'protocol/host_stub.h',
2050         'protocol/input_event_tracker.cc',
2051         'protocol/input_event_tracker.h',
2052         'protocol/input_filter.cc',
2053         'protocol/input_filter.h',
2054         'protocol/input_stub.h',
2055         'protocol/it2me_host_authenticator_factory.cc',
2056         'protocol/it2me_host_authenticator_factory.h',
2057         'protocol/jingle_messages.cc',
2058         'protocol/jingle_messages.h',
2059         'protocol/jingle_session.cc',
2060         'protocol/jingle_session.h',
2061         'protocol/jingle_session_manager.cc',
2062         'protocol/jingle_session_manager.h',
2063         'protocol/libjingle_transport_factory.cc',
2064         'protocol/libjingle_transport_factory.h',
2065         'protocol/me2me_host_authenticator_factory.cc',
2066         'protocol/me2me_host_authenticator_factory.h',
2067         'protocol/message_decoder.cc',
2068         'protocol/message_decoder.h',
2069         'protocol/message_reader.cc',
2070         'protocol/message_reader.h',
2071         'protocol/mouse_input_filter.cc',
2072         'protocol/mouse_input_filter.h',
2073         'protocol/name_value_map.h',
2074         'protocol/negotiating_authenticator.cc',
2075         'protocol/negotiating_authenticator.h',
2076         'protocol/protobuf_video_reader.cc',
2077         'protocol/protobuf_video_reader.h',
2078         'protocol/protobuf_video_writer.cc',
2079         'protocol/protobuf_video_writer.h',
2080         'protocol/session.h',
2081         'protocol/session_config.cc',
2082         'protocol/session_config.h',
2083         'protocol/session_manager.h',
2084         'protocol/ssl_hmac_channel_authenticator.cc',
2085         'protocol/ssl_hmac_channel_authenticator.h',
2086         'protocol/transport.cc',
2087         'protocol/transport.h',
2088         'protocol/transport_config.cc',
2089         'protocol/transport_config.h',
2090         'protocol/util.cc',
2091         'protocol/util.h',
2092         'protocol/v2_authenticator.cc',
2093         'protocol/v2_authenticator.h',
2094         'protocol/video_reader.cc',
2095         'protocol/video_reader.h',
2096         'protocol/video_stub.h',
2097         'protocol/video_writer.cc',
2098         'protocol/video_writer.h',
2099       ],
2100     },  # end of target 'remoting_protocol'
2102     # Remoting unit tests
2103     {
2104       'target_name': 'remoting_unittests',
2105       'type': 'executable',
2106       'dependencies': [
2107         'remoting_base',
2108         'remoting_resources',
2109         'remoting_breakpad',
2110         'remoting_client',
2111         'remoting_client_plugin',
2112         'remoting_host',
2113         'remoting_jingle_glue',
2114         'remoting_protocol',
2115         'remoting_host_setup_base',
2116         '../base/base.gyp:base',
2117         '../base/base.gyp:base_i18n',
2118         '../base/base.gyp:test_support_base',
2119         '../ipc/ipc.gyp:ipc',
2120         '../media/media.gyp:media',
2121         '../media/media.gyp:media_test_support',
2122         '../net/net.gyp:net_test_support',
2123         '../ppapi/ppapi.gyp:ppapi_cpp',
2124         '../testing/gmock.gyp:gmock',
2125         '../testing/gtest.gyp:gtest',
2126         '../ui/ui.gyp:ui',
2127       ],
2128       'defines': [
2129         'VERSION=<(version_full)',
2130       ],
2131       'include_dirs': [
2132         '../testing/gmock/include',
2133       ],
2134       'sources': [
2135         '../chrome/test/base/run_all_remoting_unittests.cc',
2136         'base/auth_token_util_unittest.cc',
2137         'base/auto_thread_task_runner_unittest.cc',
2138         'base/auto_thread_unittest.cc',
2139         'base/breakpad_win_unittest.cc',
2140         'base/compound_buffer_unittest.cc',
2141         'base/resources_unittest.cc',
2142         'base/typed_buffer_unittest.cc',
2143         'base/util_unittest.cc',
2144         'client/audio_player_unittest.cc',
2145         'client/key_event_mapper_unittest.cc',
2146         'client/plugin/mac_key_event_processor_unittest.cc',
2147         'codec/audio_encoder_opus_unittest.cc',
2148         'codec/codec_test.cc',
2149         'codec/codec_test.h',
2150         'codec/video_decoder_vp8_unittest.cc',
2151         'codec/video_encoder_verbatim_unittest.cc',
2152         'codec/video_encoder_vp8_unittest.cc',
2153         'host/audio_silence_detector_unittest.cc',
2154         'host/branding.cc',
2155         'host/branding.h',
2156         'host/chromoting_host_context_unittest.cc',
2157         'host/chromoting_host_unittest.cc',
2158         'host/client_session_unittest.cc',
2159         'host/config_file_watcher.cc',
2160         'host/config_file_watcher.h',
2161         'host/daemon_process.cc',
2162         'host/daemon_process.h',
2163         'host/daemon_process_unittest.cc',
2164         'host/desktop_process.cc',
2165         'host/desktop_process.h',
2166         'host/desktop_process_unittest.cc',
2167         'host/desktop_session.cc',
2168         'host/desktop_session.h',
2169         'host/desktop_session_agent.cc',
2170         'host/desktop_session_agent.h',
2171         'host/desktop_session_agent_posix.cc',
2172         'host/desktop_session_agent_win.cc',
2173         'host/heartbeat_sender_unittest.cc',
2174         'host/host_key_pair_unittest.cc',
2175         'host/host_mock_objects.cc',
2176         'host/host_mock_objects.h',
2177         'host/json_host_config_unittest.cc',
2178         'host/linux/x_server_clipboard_unittest.cc',
2179         'host/local_input_monitor_unittest.cc',
2180         'host/log_to_server_unittest.cc',
2181         'host/pin_hash_unittest.cc',
2182         'host/policy_hack/fake_policy_watcher.cc',
2183         'host/policy_hack/fake_policy_watcher.h',
2184         'host/policy_hack/mock_policy_callback.cc',
2185         'host/policy_hack/mock_policy_callback.h',
2186         'host/policy_hack/policy_watcher_unittest.cc',
2187         'host/register_support_host_request_unittest.cc',
2188         'host/remote_input_filter_unittest.cc',
2189         'host/resizing_host_observer_unittest.cc',
2190         'host/server_log_entry_unittest.cc',
2191         'host/setup/oauth_helper_unittest.cc',
2192         'host/setup/pin_validator_unittest.cc',
2193         'host/test_key_pair.h',
2194         'host/video_scheduler_unittest.cc',
2195         'host/win/worker_process_launcher.cc',
2196         'host/win/worker_process_launcher.h',
2197         'host/win/worker_process_launcher_unittest.cc',
2198         'jingle_glue/chromium_socket_factory_unittest.cc',
2199         'jingle_glue/fake_signal_strategy.cc',
2200         'jingle_glue/fake_signal_strategy.h',
2201         'jingle_glue/iq_sender_unittest.cc',
2202         'jingle_glue/mock_objects.cc',
2203         'jingle_glue/mock_objects.h',
2204         'protocol/authenticator_test_base.cc',
2205         'protocol/authenticator_test_base.h',
2206         'protocol/buffered_socket_writer_unittest.cc',
2207         'protocol/channel_multiplexer_unittest.cc',
2208         'protocol/clipboard_echo_filter_unittest.cc',
2209         'protocol/clipboard_filter_unittest.cc',
2210         'protocol/connection_tester.cc',
2211         'protocol/connection_tester.h',
2212         'protocol/connection_to_client_unittest.cc',
2213         'protocol/content_description_unittest.cc',
2214         'protocol/fake_authenticator.cc',
2215         'protocol/fake_authenticator.h',
2216         'protocol/fake_session.cc',
2217         'protocol/fake_session.h',
2218         'protocol/input_event_tracker_unittest.cc',
2219         'protocol/input_filter_unittest.cc',
2220         'protocol/jingle_messages_unittest.cc',
2221         'protocol/jingle_session_unittest.cc',
2222         'protocol/message_decoder_unittest.cc',
2223         'protocol/message_reader_unittest.cc',
2224         'protocol/mouse_input_filter_unittest.cc',
2225         'protocol/negotiating_authenticator_unittest.cc',
2226         'protocol/ppapi_module_stub.cc',
2227         'protocol/protocol_mock_objects.cc',
2228         'protocol/protocol_mock_objects.h',
2229         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
2230         'protocol/v2_authenticator_unittest.cc',
2231       ],
2232       'conditions': [
2233         [ 'OS=="win"', {
2234           'include_dirs': [
2235             '../breakpad/src',
2236           ],
2237           'link_settings': {
2238             'libraries': [
2239               '-lrpcrt4.lib',
2240             ],
2241           },
2242         }],
2243         ['OS=="mac" or (OS=="linux" and chromeos==0)', {
2244           # Javascript unittests are disabled on CrOS because they cause
2245           # valgrind and test errors.
2246           #
2247           # Javascript unittests are disabled on Windows because they add a
2248           # dependency on 'common_constants' which (only on Windows) requires
2249           # additional dependencies:
2250           #   '../content/content.gyp:content_common',
2251           #   'installer_util',
2252           # These targets are defined in .gypi files that would need to be
2253           # included here:
2254           #   '../chrome/chrome_common.gypi',
2255           #   '../chrome/chrome_installer.gypi',
2256           #   '../chrome/chrome_installer_util.gypi',
2257           # But we can't do that because ninja will complain about multiple
2258           # target definitions.
2259           # TODO(garykac): Move installer_util into a proper .gyp file so that
2260           # it can be included in multiple .gyp files.
2261           'includes': [
2262             '../chrome/js_unittest_rules.gypi',
2263           ],
2264           'dependencies': [
2265             '../chrome/common_constants.gyp:common_constants',
2266             '../v8/tools/gyp/v8.gyp:v8',
2267           ],
2268           'sources': [
2269             '../chrome/test/base/v8_unit_test.cc',
2270             '../chrome/test/base/v8_unit_test.h',
2271             'webapp/all_js_load.gtestjs',
2272             'webapp/format_iq.gtestjs',
2273             '<@(remoting_webapp_js_files)',
2274           ],
2275         }],
2276         ['enable_remoting_host == 0', {
2277           'dependencies!': [
2278             'remoting_host',
2279             'remoting_host_setup_base',
2280           ],
2281           'sources/': [
2282             ['exclude', 'codec/*'],
2283             ['exclude', 'host/*'],
2284           ]
2285         }],
2286         ['toolkit_uses_gtk == 1', {
2287           'dependencies': [
2288             # Needed for the following #include chain:
2289             #   base/run_all_unittests.cc
2290             #   ../base/test_suite.h
2291             #   gtk/gtk.h
2292             '../build/linux/system.gyp:gtk',
2293             '../build/linux/system.gyp:ssl',
2294           ],
2295           'conditions': [
2296             [ 'linux_use_tcmalloc==1', {
2297                 'dependencies': [
2298                   '../base/allocator/allocator.gyp:allocator',
2299                 ],
2300               },
2301             ],
2302           ],
2303         }],  # end of 'toolkit_uses_gtk == 1'
2304       ],  # end of 'conditions'
2305     },  # end of target 'remoting_unittests'
2306   ],  # end of targets