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