NaCl: Update revision in DEPS, r9066 -> r9086
[chromium-blink-merge.git] / remoting / remoting.gyp
blobfddc6d16422c9bbf5d3e8ecea30024cb676cb630
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,
10     # Use consistent strings across all platforms. Note that the plugin name
11     # is brand-dependent and is defined further down.
12     # Must match host/plugin/constants.h
13     'host_plugin_mime_type': 'application/vnd.chromium.remoting-host',
14     'host_plugin_description': 'Allow another user to access your computer securely over the Internet.',
16     # The version is composed from major & minor versions specific to remoting
17     # and build & patch versions inherited from Chrome.
18     'version_py_path': '../chrome/tools/build/version.py',
19     'version_path': '../remoting/VERSION',
20     'chrome_version_path': '../chrome/VERSION',
21     'version_full':
22       '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@").'
23       '<!(python <(version_py_path) -f <(chrome_version_path) -t "@BUILD@.@PATCH@")',
24     'version_short':
25       '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@").'
26       '<!(python <(version_py_path) -f <(chrome_version_path) -t "@BUILD@")',
28     'conditions': [
29       ['OS=="mac"', {
30         'conditions': [
31           ['branding=="Chrome"', {
32             'mac_bundle_id': 'com.google.Chrome',
33             'mac_creator': 'rimZ',
34             'copyright_by': 'Google Inc.',
35           }, {  # else: branding!="Chrome"
36             'mac_bundle_id': 'org.chromium.Chromium',
37             'mac_creator': 'Cr24',
38             'copyright_by': 'The Chromium Authors.',
39           }],  # branding
40         ],  # conditions
41         'host_plugin_extension': 'plugin',
42         'host_plugin_prefix': '',
43       }],
44       ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
45         # linux 32 bit
46         'host_plugin_extension': 'ia32.so',
47         'host_plugin_prefix': 'lib',
48       }],
49       ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
50         # linux 64 bit
51         'host_plugin_extension': 'x64.so',
52         'host_plugin_prefix': 'lib',
53       }],
54       ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
55         # linux 64 bit
56         'host_plugin_extension': 'arm.so',
57         'host_plugin_prefix': 'lib',
58       }],
59       ['OS=="win"', {
60         'host_plugin_extension': 'dll',
61         'host_plugin_prefix': '',
62       }],
63       ['branding=="Chrome"', {
64         # Must match host/plugin/constants.h
65         'host_plugin_name': 'Chrome Remote Desktop Host',
66         'remoting_webapp_locale_files': [
67           'webapp/_locales.official/ar/messages.json',
68           'webapp/_locales.official/bg/messages.json',
69           'webapp/_locales.official/ca/messages.json',
70           'webapp/_locales.official/cs/messages.json',
71           'webapp/_locales.official/da/messages.json',
72           'webapp/_locales.official/de/messages.json',
73           'webapp/_locales.official/el/messages.json',
74           'webapp/_locales.official/en/messages.json',
75           'webapp/_locales.official/en_GB/messages.json',
76           'webapp/_locales.official/es/messages.json',
77           'webapp/_locales.official/es_419/messages.json',
78           'webapp/_locales.official/et/messages.json',
79           'webapp/_locales.official/fi/messages.json',
80           'webapp/_locales.official/fil/messages.json',
81           'webapp/_locales.official/fr/messages.json',
82           'webapp/_locales.official/he/messages.json',
83           'webapp/_locales.official/hi/messages.json',
84           'webapp/_locales.official/hr/messages.json',
85           'webapp/_locales.official/hu/messages.json',
86           'webapp/_locales.official/id/messages.json',
87           'webapp/_locales.official/it/messages.json',
88           'webapp/_locales.official/ja/messages.json',
89           'webapp/_locales.official/ko/messages.json',
90           'webapp/_locales.official/lt/messages.json',
91           'webapp/_locales.official/lv/messages.json',
92           'webapp/_locales.official/nb/messages.json',
93           'webapp/_locales.official/nl/messages.json',
94           'webapp/_locales.official/pl/messages.json',
95           'webapp/_locales.official/pt_BR/messages.json',
96           'webapp/_locales.official/pt_PT/messages.json',
97           'webapp/_locales.official/ro/messages.json',
98           'webapp/_locales.official/ru/messages.json',
99           'webapp/_locales.official/sk/messages.json',
100           'webapp/_locales.official/sl/messages.json',
101           'webapp/_locales.official/sr/messages.json',
102           'webapp/_locales.official/sv/messages.json',
103           'webapp/_locales.official/th/messages.json',
104           'webapp/_locales.official/tr/messages.json',
105           'webapp/_locales.official/uk/messages.json',
106           'webapp/_locales.official/vi/messages.json',
107           'webapp/_locales.official/zh_CN/messages.json',
108           'webapp/_locales.official/zh_TW/messages.json',
109         ],
110       }, {  # else: branding!="Chrome"
111         # Must match host/plugin/constants.h
112         'host_plugin_name': 'Chromoting Host',
113         'remoting_webapp_locale_files': [
114           'webapp/_locales/en/messages.json',
115         ],
116       }],
117     ],
118     'remoting_webapp_files': [
119       'resources/chromoting16.png',
120       'resources/chromoting48.png',
121       'resources/chromoting128.png',
122       'resources/disclosure_arrow_down.png',
123       'resources/disclosure_arrow_right.png',
124       'resources/host_setup_instructions.png',
125       'resources/icon_cross.png',
126       'resources/icon_host.png',
127       'resources/icon_pencil.png',
128       'resources/icon_warning.png',
129       'resources/infographic_my_computers.png',
130       'resources/infographic_remote_assistance.png',
131       'resources/tick.png',
132       'webapp/client_plugin.js',
133       'webapp/client_plugin_async.js',
134       'webapp/client_screen.js',
135       'webapp/client_session.js',
136       'webapp/clipboard.js',
137       'webapp/connection_history.css',
138       'webapp/connection_history.js',
139       'webapp/connection_stats.css',
140       'webapp/connection_stats.js',
141       'webapp/cs_oauth2_trampoline.js',
142       'webapp/event_handlers.js',
143       'webapp/format_iq.js',
144       'webapp/host_controller.js',
145       'webapp/host_list.js',
146       'webapp/host_screen.js',
147       'webapp/host_session.js',
148       'webapp/host_setup_dialog.js',
149       'webapp/host_table_entry.js',
150       'webapp/l10n.js',
151       'webapp/log_to_server.js',
152       'webapp/main.css',
153       'webapp/main.html',
154       'webapp/manifest.json',
155       'webapp/menu_button.css',
156       'webapp/menu_button.js',
157       'webapp/oauth2.js',
158       'webapp/oauth2_callback.html',
159       'webapp/plugin_settings.js',
160       'webapp/remoting.js',
161       'webapp/scale-to-fit.png',
162       'webapp/server_log_entry.js',
163       'webapp/spinner.gif',
164       'webapp/stats_accumulator.js',
165       'webapp/toolbar.css',
166       'webapp/toolbar.js',
167       'webapp/ui_mode.js',
168       'webapp/wcs.js',
169       'webapp/wcs_loader.js',
170       'webapp/xhr.js',
171     ],
172     'remoting_host_installer_mac_roots': [
173       'host/installer/mac/',
174       '<(DEPTH)/chrome/installer/mac/',
175     ],
176     'remoting_host_installer_mac_files': [
177       'host/installer/mac/do_signing.sh',
178       'host/installer/mac/ChromotingHost.packproj',
179       'host/installer/mac/ChromotingHostService.packproj',
180       'host/installer/mac/ChromotingHostUninstaller.packproj',
181       'host/installer/mac/ChromotingHost.pkgproj',
182       'host/installer/mac/ChromotingHostService.pkgproj',
183       'host/installer/mac/ChromotingHostUninstaller.pkgproj',
184       'host/installer/mac/LaunchAgents/org.chromium.chromoting.plist',
185       'host/installer/mac/PrivilegedHelperTools/org.chromium.chromoting.me2me.sh',
186       'host/installer/mac/Scripts/keystone_install.sh',
187       'host/installer/mac/Scripts/remoting_postflight.sh',
188       'host/installer/mac/Scripts/remoting_preflight.sh',
189       'host/installer/mac/Keystone/GoogleSoftwareUpdate.pkg',
190       '<(DEPTH)/chrome/installer/mac/pkg-dmg',
191     ],
192   },
194   'target_defaults': {
195     'defines': [
196     ],
197     'include_dirs': [
198       '..',  # Root of Chrome checkout
199     ],
200   },
202   'conditions': [
203     ['OS=="linux"', {
204       'targets': [
205         # Linux breakpad processing
206         {
207           'target_name': 'remoting_linux_symbols',
208           'type': 'none',
209           'conditions': [
210             ['linux_dump_symbols==1', {
211               'actions': [
212                 {
213                   'action_name': 'dump_symbols',
214                   'variables': {
215                     'plugin_file': '<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
216                   },
217                   'inputs': [
218                     '<(DEPTH)/build/linux/dump_app_syms',
219                     '<(PRODUCT_DIR)/dump_syms',
220                     '<(PRODUCT_DIR)/<(plugin_file)',
221                   ],
222                   'outputs': [
223                     '<(PRODUCT_DIR)/<(plugin_file).breakpad.<(target_arch)',
224                   ],
225                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
226                              '<(PRODUCT_DIR)/dump_syms',
227                              '<(linux_strip_binary)',
228                              '<(PRODUCT_DIR)/<(plugin_file)',
229                              '<@(_outputs)'],
230                   'message': 'Dumping breakpad symbols to <(_outputs)',
231                   'process_outputs_as_sources': 1,
232                 },
233               ],
234               'dependencies': [
235                 'remoting_host_plugin',
236                 '../breakpad/breakpad.gyp:dump_syms',
237               ],
238             }],  # 'linux_dump_symbols==1'
239           ],  # end of 'conditions'
240         },  # end of target 'linux_symbols'
241       ],  # end of 'targets'
242     }],  # 'OS=="linux"'
244     ['OS=="mac"', {
245       'targets': [
246         {
247           'target_name': 'remoting_host_uninstaller',
248           'type': 'executable',
249           'mac_bundle': 1,
250           'conditions': [
251             ['branding == "Chrome"', {
252               'variables': {
253                 'bundle_id': 'com.google.chromeremotedesktop.host_uninstaller',
254                 'bundle_name': 'Chrome Remote Desktop Host Uninstaller',
255               },
256             }, { # else branding!="Chrome"
257               'variables': {
258                 'bundle_id': 'org.chromium.remoting.host_uninstaller',
259                 'bundle_name': 'Chromoting Host Uninstaller',
260               },
261             }],
262           ],
263           'dependencies': [
264             '<(DEPTH)/base/base.gyp:base',
265           ],
266           'sources': [
267             'host/installer/mac/uninstaller/remoting_uninstaller.h',
268             'host/installer/mac/uninstaller/remoting_uninstaller.mm',
269           ],
270           'xcode_settings': {
271             'INFOPLIST_FILE': 'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
272             'INFOPLIST_PREPROCESS': 'YES',
273             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_BY="<(copyright_by)"',
274           },
275           'mac_bundle_resources': [
276             'host/installer/mac/uninstaller/remoting_uninstaller.icns',
277             'host/installer/mac/uninstaller/remoting_uninstaller.xib',
278             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
279           ],
280           'mac_bundle_resources!': [
281             'host/installer/mac/uninstaller/remoting_uninstaller-Info.plist',
282           ],
283         },  # end of target 'remoting_host_uninstaller'
285         # This packages up the files needed for the remoting host installer so
286         # they can be sent off to be signed.
287         # We don't build an installer here because we don't have signed binaries.
288         {
289           'target_name': 'remoting_me2me_host_archive',
290           'type': 'none',
291           'dependencies': [
292             'remoting_host_prefpane',
293             'remoting_host_uninstaller',
294             'remoting_me2me_host',
295           ],
296           'sources': [
297             'host/installer/build-installer-archive.py',
298             '<@(remoting_host_installer_mac_files)',
299           ],
300           'conditions': [
301             ['branding == "Chrome"', {
302               'variables': {
303                 'host_name': 'Chrome Remote Desktop Host',
304                 'host_service_name': 'Chrome Remote Desktop Host Service',
305                 'host_uninstaller_name': 'Chrome Remote Desktop Host Uninstaller',
306                 'bundle_prefix': 'com.google.pkg',
307               },
308             }, { # else branding!="Chrome"
309               'variables': {
310                 'host_name': 'Chromoting Host',
311                 'host_service_name': 'Chromoting Host Service',
312                 'host_uninstaller_name': 'Chromoting Host Uninstaller',
313                 'bundle_prefix': 'org.chromium.pkg',
314               },
315             }],
316           ],  # conditions
317           'actions': [
318             {
319               'action_name': 'Zip installer files for signing',
320               'temp_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting-me2me-host',
321               'zip_path': '<(PRODUCT_DIR)/remoting-me2me-host-<(OS).zip',
322               'variables': {
323                 'host_name_nospace': '<!(echo <(host_name) | sed "s/ //g")',
324                 'host_service_name_nospace': '<!(echo <(host_service_name) | sed "s/ //g")',
325                 'host_uninstaller_name_nospace': '<!(echo <(host_uninstaller_name) | sed "s/ //g")',
326               },
327               'generated_files': [
328                 '<(PRODUCT_DIR)/remoting_host_prefpane.prefPane',
329                 '<(PRODUCT_DIR)/remoting_me2me_host.app',
330                 '<(PRODUCT_DIR)/remoting_host_uninstaller.app',
331               ],
332               'generated_files_dst': [
333                 'PreferencePanes/org.chromium.chromoting.prefPane',
334                 'PrivilegedHelperTools/org.chromium.chromoting.me2me_host.app',
335                 'Applications/<(host_uninstaller_name).app',
336               ],
337               'source_files': [
338                 '<@(remoting_host_installer_mac_files)',
339               ],
340               'defs': [
341                 'VERSION=<(version_full)',
342                 'VERSION_SHORT=<(version_short)',
343                 'VERSION_MAJOR=<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@")',
344                 'VERSION_MINOR=<!(python <(version_py_path) -f <(version_path) -t "@MINOR@")',
345                 'COPYRIGHT_BY=<(copyright_by)',
346                 'HOST_NAME=<(host_name)',
347                 'HOST_SERVICE_NAME=<(host_service_name)',
348                 'HOST_UNINSTALLER_NAME=<(host_uninstaller_name)',
349                 'HOST_PKG=<(host_name)',
350                 'HOST_SERVICE_PKG=<(host_service_name_nospace)',
351                 'HOST_UNINSTALLER_PKG=<(host_uninstaller_name_nospace)',
352                 'BUNDLE_ID_HOST=<(bundle_prefix).<(host_name_nospace)',
353                 'BUNDLE_ID_HOST_SERVICE=<(bundle_prefix).<(host_service_name_nospace)',
354                 'BUNDLE_ID_HOST_UNINSTALLER=<(bundle_prefix).<(host_uninstaller_name_nospace)',
355                 'DMG_VOLUME_NAME=<(host_name) <(version_full)',
356                 'DMG_FILE_NAME=<!(echo <(host_name) | sed "s/ //g")-<(version_full)',
357               ],
358               'inputs': [
359                 'host/installer/build-installer-archive.py',
360                 '<@(_source_files)',
361               ],
362               'outputs': [
363                 '<(_zip_path)',
364               ],
365               'action': [
366                 'python',
367                 'host/installer/build-installer-archive.py',
368                 '<(_temp_dir)',
369                 '<(_zip_path)',
370                 '--source-file-roots',
371                 '<@(remoting_host_installer_mac_roots)',
372                 '--source-files',
373                 '<@(_source_files)',
374                 '--generated-files',
375                 '<@(_generated_files)',
376                 '--generated-files-dst',
377                 '<@(_generated_files_dst)',
378                 '--defs',
379                 '<@(_defs)',
380               ],
381             },
382           ],  # actions
383         }, # end of target 'remoting_me2me_host_archive'
385         {
386           'target_name': 'remoting_host_prefpane',
387           'type': 'loadable_module',
388           'mac_bundle': 1,
389           'product_extension': 'prefPane',
390           'defines': [
391             'JSON_USE_EXCEPTION=0',
392           ],
393           'include_dirs': [
394             '../third_party/jsoncpp/overrides/include/',
395             '../third_party/jsoncpp/source/include/',
396             '../third_party/jsoncpp/source/src/lib_json/',
397           ],
399           # These source files are included directly, instead of adding target
400           # dependencies, because the targets are not yet built for 64-bit on
401           # Mac OS X - http://crbug.com/125116.
402           #
403           # TODO(lambroslambrou): Fix this when Chrome supports building for
404           # Mac OS X 64-bit - http://crbug.com/128122.
405           'sources': [
406             '../third_party/jsoncpp/source/src/lib_json/json_reader.cpp',
407             '../third_party/jsoncpp/overrides/src/lib_json/json_value.cpp',
408             '../third_party/jsoncpp/source/src/lib_json/json_writer.cpp',
409             '../third_party/modp_b64/modp_b64.cc',
410             'host/constants_mac.cc',
411             'host/constants_mac.h',
412             'host/host_config.cc',
413             'host/me2me_preference_pane.h',
414             'host/me2me_preference_pane.mm',
415             'host/me2me_preference_pane_confirm_pin.h',
416             'host/me2me_preference_pane_confirm_pin.mm',
417             'host/me2me_preference_pane_disable.h',
418             'host/me2me_preference_pane_disable.mm',
419           ],
420           'link_settings': {
421             'libraries': [
422               '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
423               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
424               '$(SDKROOT)/System/Library/Frameworks/PreferencePanes.framework',
425               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
426             ],
427           },
428           'xcode_settings': {
429             'ARCHS': ['i386', 'x86_64'],
430             'GCC_ENABLE_OBJC_GC': 'supported',
431             'INFOPLIST_FILE': 'host/me2me_preference_pane-Info.plist',
432             'INFOPLIST_PREPROCESS': 'YES',
433             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_NAME="<(bundle_name)" BUNDLE_ID="<(bundle_id)" COPYRIGHT_BY="<(copyright_by)" PREF_PANE_ICON_LABEL="<(pref_pane_icon_label)"',
434           },
435           'mac_bundle_resources': [
436             'host/me2me_preference_pane.xib',
437             'host/me2me_preference_pane_confirm_pin.xib',
438             'host/me2me_preference_pane_disable.xib',
439             'host/me2me_preference_pane-Info.plist',
440             'resources/chromoting128.png',
441           ],
442           'mac_bundle_resources!': [
443             'host/me2me_preference_pane-Info.plist',
444           ],
445           'conditions': [
446             ['mac_breakpad==1', {
447               'variables': {
448                 # A real .dSYM is needed for dump_syms to operate on.
449                 'mac_real_dsym': 1,
450               },
451             }],
452             ['branding == "Chrome"', {
453               'variables': {
454                 'bundle_id': 'com.google.chromeremotedesktop.preferences',
455                 'bundle_name': 'Chrome Remote Desktop Host Preferences',
457                 # The XML new-line entity splits the label into two lines,
458                 # which is the maximum number of lines allowed by the System
459                 # Preferences applet.
460                 # TODO(lambroslambrou): When these strings are localized, use
461                 # "\n" instead.
462                 'pref_pane_icon_label': 'Chrome Remote&#x0a;Desktop Host',
463               },
464             }, { # else branding!="Chrome"
465               'variables': {
466                 'bundle_id': 'org.chromium.remoting.preferences',
467                 'bundle_name': 'Chromoting Host Preferences',
468                 'pref_pane_icon_label': 'Chromoting&#x0a;Host',
469               },
470             }],
471           ],  # conditions
472         },  # end of target 'remoting_host_prefpane'
473       ],  # end of 'targets'
474     }],  # 'OS=="mac"'
476     ['OS=="win"', {
477       'targets': [
478         {
479           'target_name': 'remoting_elevated_controller',
480           'type': 'static_library',
481           'sources': [
482             'host/elevated_controller.idl',
483             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller.h',
484             '<(SHARED_INTERMEDIATE_DIR)/remoting/host/elevated_controller_i.c',
485           ],
486           # This target exports a hard dependency because dependent targets may
487           # include elevated_controller.h, a generated header.
488           'hard_dependency': 1,
489           'msvs_settings': {
490             'VCMIDLTool': {
491               'OutputDirectory': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
492             },
493           },
494           'direct_dependent_settings': {
495             'include_dirs': [
496               '<(SHARED_INTERMEDIATE_DIR)',
497             ],
498           },
499         },  # end of target 'remoting_elevated_controller'
500         {
501           'target_name': 'remoting_host_controller',
502           'type': 'executable',
503           'variables': { 'enable_wexit_time_destructors': 1, },
504           'defines' : [
505             '_ATL_APARTMENT_THREADED',
506             '_ATL_NO_AUTOMATIC_NAMESPACE',
507             '_ATL_CSTRING_EXPLICIT_CONSTRUCTORS',
508             'STRICT',
509           ],
510           'include_dirs': [
511             '<(INTERMEDIATE_DIR)',
512           ],
513           'dependencies': [
514             '../base/base.gyp:base',
515             'remoting_breakpad',
516             'remoting_elevated_controller',
517             'remoting_protocol',
518             'remoting_version_resources',
519           ],
520           'sources': [
521             'host/branding.cc',
522             'host/branding.h',
523             'host/elevated_controller.rc',
524             'host/elevated_controller_module_win.cc',
525             'host/elevated_controller_win.cc',
526             'host/elevated_controller_win.h',
527             'host/pin_hash.cc',
528             'host/pin_hash.h',
529             'host/usage_stats_consent.h',
530             'host/usage_stats_consent_win.cc',
531             'host/verify_config_window_win.cc',
532             'host/verify_config_window_win.h',
533             '<(SHARED_INTERMEDIATE_DIR)/remoting/elevated_controller_version.rc'
534           ],
535           'link_settings': {
536             'libraries': [
537               '-lcomctl32.lib',
538             ],
539           },
540           'msvs_settings': {
541             'VCLinkerTool': {
542               'AdditionalOptions': [
543                 "\"/manifestdependency:type='win32' "
544                     "name='Microsoft.Windows.Common-Controls' "
545                     "version='6.0.0.0' "
546                     "processorArchitecture='*' "
547                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
548               ],
549               # 2 == /SUBSYSTEM:WINDOWS
550               'SubSystem': '2',
551             },
552           },
553         },  # end of target 'remoting_host_controller'
554         {
555           'target_name': 'remoting_service',
556           'type': 'executable',
557           'variables': { 'enable_wexit_time_destructors': 1, },
558           'dependencies': [
559             '../base/base.gyp:base',
560             '../base/base.gyp:base_static',
561             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
562             '../ipc/ipc.gyp:ipc',
563             'remoting_breakpad',
564             'remoting_version_resources',
565           ],
566           'sources': [
567             'base/scoped_sc_handle_win.h',
568             'host/branding.cc',
569             'host/branding.h',
570             'host/chromoting_messages.cc',
571             'host/chromoting_messages.h',
572             'host/constants.h',
573             'host/constants_win.cc',
574             'host/host_service.rc',
575             'host/host_service_resource.h',
576             'host/host_service_win.cc',
577             'host/host_service_win.h',
578             'host/launch_process_in_session_win.cc',
579             'host/launch_process_in_session_win.h',
580             'host/sas_injector.h',
581             'host/sas_injector_win.cc',
582             'host/usage_stats_consent.h',
583             'host/usage_stats_consent_win.cc',
584             'host/wts_console_monitor_win.h',
585             'host/wts_console_observer_win.h',
586             'host/wts_session_process_launcher_win.cc',
587             'host/wts_session_process_launcher_win.h',
588             '<(SHARED_INTERMEDIATE_DIR)/remoting/host_service_version.rc'
589           ],
590           'msvs_settings': {
591             'VCLinkerTool': {
592               'AdditionalDependencies': [
593                 'wtsapi32.lib',
594               ],
595             },
596           },
597         },  # end of target 'remoting_service'
599         # Generates the version information resources for the Windows binaries.
600         # The .RC files are generated from the "version.rc.version" template and
601         # placed in the "<(SHARED_INTERMEDIATE_DIR)/remoting" folder.
602         # The substitution strings are taken from:
603         #   - build/util/LASTCHANGE - the last source code revision.
604         #   - chrome/VERSION - the build & patch versions.
605         #   - remoting/VERSION - the major & minor versions.
606         #   - xxx_branding - UI/localizable strings.
607         #   - xxx.ver - per-binary non-localizable strings such as the binary
608         #     name.
609         {
610           'target_name': 'remoting_version_resources',
611           'type': 'none',
612           'inputs': [
613             'chromium_branding',
614             'google_chrome_branding',
615             'version.rc.version',
616             '<(DEPTH)/build/util/LASTCHANGE',
617             '<(version_path)',
618             '<(chrome_version_path)',
619           ],
620           'direct_dependent_settings': {
621             'include_dirs': [
622               '<(SHARED_INTERMEDIATE_DIR)/remoting',
623             ],
624           },
625           'sources': [
626             'host/elevated_controller.ver',
627             'host/host_service.ver',
628             'host/plugin/host_plugin.ver',
629             'host/remoting_me2me_host.ver',
630           ],
631           'rules': [
632             {
633               'rule_name': 'version',
634               'extension': 'ver',
635               'variables': {
636                 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE',
637                 'template_input_path': 'version.rc.version',
638               },
639               'conditions': [
640                 ['branding == "Chrome"', {
641                   'variables': {
642                      'branding_path': 'google_chrome_branding',
643                   },
644                 }, { # else branding!="Chrome"
645                   'variables': {
646                      'branding_path': 'chromium_branding',
647                   },
648                 }],
649               ],
650               'inputs': [
651                 '<(template_input_path)',
652                 '<(version_path)',
653                 '<(chrome_version_path)',
654                 '<(branding_path)',
655                 '<(lastchange_path)',
656               ],
657               'outputs': [
658                 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)_version.rc',
659               ],
660               'action': [
661                 'python',
662                 '<(version_py_path)',
663                 '-f', '<(RULE_INPUT_PATH)',
664                 '-f', '<(chrome_version_path)',
665                 '-f', '<(version_path)',
666                 '-f', '<(branding_path)',
667                 '-f', '<(lastchange_path)',
668                 '<(template_input_path)',
669                 '<@(_outputs)',
670               ],
671               'message': 'Generating version information in <@(_outputs)'
672             },
673           ],
674         },  # end of target 'remoting_version_resources'
675       ],  # end of 'targets'
676     }],  # 'OS=="win"'
678     # The host installation is generated only if WiX is available and when
679     # building a non-component build. WiX does not provide a easy way to
680     # include all DLLs imported by the installed binaries, so supporting
681     # the component build becomes a burden.
682     ['OS == "win" and component != "shared_library" and wix_exists == "True" \
683         and sas_dll_exists == "True"', {
684       'targets': [
685         {
686           'target_name': 'remoting_host_installation',
687           'type': 'none',
688           'dependencies': [
689             'remoting_host_controller',
690             'remoting_service',
691             'remoting_me2me_host',
692           ],
693           'sources': [
694             'host/installer/chromoting.wxs',
695           ],
696           'outputs': [
697             '<(PRODUCT_DIR)/chromoting.msi',
698           ],
699           'wix_defines' : [
700             '-dBranding=<(branding)',
701           ],
702           'conditions': [
703             ['buildtype == "Official"', {
704               'wix_defines': [
705                 '-dOfficialBuild=1',
706               ],
707             }],
708           ],
709           'rules': [
710             {
711               'rule_name': 'candle_and_light',
712               'extension': 'wxs',
713               'inputs': [
714                 '<(PRODUCT_DIR)/remoting_host_controller.exe',
715                 '<(PRODUCT_DIR)/remoting_me2me_host.exe',
716                 '<(PRODUCT_DIR)/remoting_service.exe',
717                 '<(sas_dll_path)/sas.dll',
718                 'resources/chromoting.ico',
719                 'candle_and_light.py',
720               ],
721               'outputs': [
722                 '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).msi',
723               ],
724               'msvs_cygwin_shell': 0,
725               'action': [
726                 'python', 'candle_and_light.py',
727                 '--wix_path', '<(wix_path)',
728                 '--version', '<(version_full)',
729                 '--product_dir', '<(PRODUCT_DIR).',
730                 '--intermediate_dir', '<(INTERMEDIATE_DIR).',
731                 '--sas_dll_path', '<(sas_dll_path)',
732                 '--input', '<(RULE_INPUT_PATH)',
733                 '--output', '<@(_outputs)',
734                 '<@(_wix_defines)',
735               ],
736               'message': 'Generating <@(_outputs)',
737             },
738           ],
739         },  # end of target 'remoting_host_installation'
741         # The 'remoting_host_installation_unittest' target is used to make sure
742         # that the code signing job (running outside of Chromium tree) will be
743         # able to unpack and re-assemble the installation successfully.
744         #
745         # *** If this target fails to compile the code signing job will fail
746         # too, breaking the official build. ***
747         #
748         # N.B. The command lines passed to the WiX tools here should be in sync
749         # with the code signing script.
750         {
751           'target_name': 'remoting_host_installation_unittest',
752           'type': 'none',
753           'dependencies': [
754             'remoting_host_installation',
755           ],
756           'sources': [
757             '<(PRODUCT_DIR)/chromoting.msi',
758           ],
759           'outputs': [
760             '<(INTERMEDIATE_DIR)/chromoting-test.msi',
761           ],
762           'rules': [
763             {
764               'rule_name': 'dark_and_candle_and_light',
765               'extension': 'msi',
766               'inputs': [
767                 'dark_and_candle_and_light.py',
768               ],
769               'outputs': [
770                 '<(INTERMEDIATE_DIR)/chromoting-test.msi',
771               ],
772               'msvs_cygwin_shell': 0,
773               'action': [
774                 'python',
775                 'dark_and_candle_and_light.py',
776                 '--wix_path', '<(wix_path)',
777                 '--input', '<(RULE_INPUT_PATH)',
778                 '--intermediate_dir', '<(INTERMEDIATE_DIR).',
779                 '--output', '<@(_outputs)',
780               ],
781               'message': 'Unpacking and repacking to <@(_outputs)',
782             },
783           ],
784         },  # end of target 'remoting_host_installation_unittest'
785       ],  # end of 'targets'
786     }],  # '<(wix_path) != ""'
788   ],  # end of 'conditions'
790   'targets': [
791     {
792       'target_name': 'remoting_breakpad',
793       'type': 'static_library',
794       'variables': { 'enable_wexit_time_destructors': 1, },
795       'dependencies': [
796         '../base/base.gyp:base',
797       ],
798       'sources': [
799         'base/breakpad.h',
800         'base/breakpad_linux.cc',
801         'base/breakpad_mac.mm',
802         'base/breakpad_win.cc',
803         'host/constants.h',
804         'host/constants_win.cc',
805       ],
806       'conditions': [
807         ['OS=="win"', {
808           'dependencies': [
809             '../breakpad/breakpad.gyp:breakpad_handler',
810           ],
811         }],
812       ],
813     },  # end of target 'remoting_breakpad'
815     {
816       'target_name': 'remoting_client_plugin',
817       'type': 'static_library',
818       'variables': { 'enable_wexit_time_destructors': 1, },
819       'defines': [
820         'HAVE_STDINT_H',  # Required by on2_integer.h
821       ],
822       'dependencies': [
823         'remoting_base',
824         'remoting_client',
825         'remoting_jingle_glue',
826         '../media/media.gyp:media',
827         '../net/net.gyp:net',
828         '../ppapi/ppapi.gyp:ppapi_cpp_objects',
829         '../skia/skia.gyp:skia',
830       ],
831       'sources': [
832         'client/plugin/chromoting_instance.cc',
833         'client/plugin/chromoting_instance.h',
834         'client/plugin/mac_key_event_processor.cc',
835         'client/plugin/mac_key_event_processor.h',
836         'client/plugin/pepper_audio_player.cc',
837         'client/plugin/pepper_audio_player.h',
838         'client/plugin/pepper_entrypoints.cc',
839         'client/plugin/pepper_entrypoints.h',
840         'client/plugin/pepper_input_handler.cc',
841         'client/plugin/pepper_input_handler.h',
842         'client/plugin/pepper_network_manager.cc',
843         'client/plugin/pepper_network_manager.h',
844         'client/plugin/pepper_packet_socket_factory.cc',
845         'client/plugin/pepper_packet_socket_factory.h',
846         'client/plugin/pepper_plugin_thread_delegate.cc',
847         'client/plugin/pepper_plugin_thread_delegate.h',
848         'client/plugin/pepper_port_allocator.cc',
849         'client/plugin/pepper_port_allocator.h',
850         'client/plugin/pepper_view.cc',
851         'client/plugin/pepper_view.h',
852         'client/plugin/pepper_util.cc',
853         'client/plugin/pepper_util.h',
854         'client/plugin/pepper_xmpp_proxy.cc',
855         'client/plugin/pepper_xmpp_proxy.h',
856       ],
857     },  # end of target 'remoting_client_plugin'
859     {
860       'target_name': 'remoting_host_plugin',
861       'type': 'loadable_module',
862       'variables': { 'enable_wexit_time_destructors': 1, },
863       'product_extension': '<(host_plugin_extension)',
864       'product_prefix': '<(host_plugin_prefix)',
865       'dependencies': [
866         'remoting_base',
867         'remoting_host',
868         'remoting_jingle_glue',
869         '../net/net.gyp:net',
870         '../third_party/npapi/npapi.gyp:npapi',
871       ],
872       'sources': [
873         'base/dispatch_win.h',
874         'host/branding.cc',
875         'host/branding.h',
876         'host/host_ui_resource.h',
877         'host/plugin/daemon_controller.h',
878         'host/plugin/daemon_controller_linux.cc',
879         'host/plugin/daemon_controller_mac.cc',
880         'host/plugin/daemon_controller_win.cc',
881         'host/plugin/daemon_installer_win.cc',
882         'host/plugin/daemon_installer_win.h',
883         'host/plugin/host_log_handler.cc',
884         'host/plugin/host_log_handler.h',
885         'host/plugin/host_plugin.cc',
886         'host/plugin/host_plugin_utils.cc',
887         'host/plugin/host_plugin_utils.h',
888         'host/plugin/host_script_object.cc',
889         'host/plugin/host_script_object.h',
890       ],
891       'conditions': [
892         ['OS=="mac"', {
893           'mac_bundle': 1,
894           'xcode_settings': {
895             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
896             'INFOPLIST_FILE': 'host/plugin/host_plugin-Info.plist',
897             'INFOPLIST_PREPROCESS': 'YES',
898             # TODO(maruel): Use INFOPLIST_PREFIX_HEADER to remove the need to
899             # duplicate string once
900             # http://code.google.com/p/gyp/issues/detail?id=243 is fixed.
901             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'HOST_PLUGIN_MIME_TYPE="<(host_plugin_mime_type)" HOST_PLUGIN_NAME="<(host_plugin_name)" HOST_PLUGIN_DESCRIPTION="<(host_plugin_description)"',
902           },
903           # TODO(mark): Come up with a fancier way to do this.  It should
904           # only be necessary to list host_plugin-Info.plist once, not the
905           # three times it is listed here.
906           'mac_bundle_resources': [
907             'host/disconnect_window.xib',
908             'host/plugin/host_plugin-Info.plist',
909             'resources/chromoting16.png',
910             'resources/chromoting48.png',
911             'resources/chromoting128.png',
912           ],
913           'mac_bundle_resources!': [
914             'host/plugin/host_plugin-Info.plist',
915           ],
916           'conditions': [
917             ['mac_breakpad==1', {
918               'variables': {
919                 # A real .dSYM is needed for dump_syms to operate on.
920                 'mac_real_dsym': 1,
921               },
922             }],
923           ],  # conditions
924         }],  # OS=="mac"
925         [ 'OS=="win"', {
926           'dependencies': [
927             '../google_update/google_update.gyp:google_update',
928             '../ipc/ipc.gyp:ipc',
929             'remoting_elevated_controller',
930             'remoting_version_resources',
931           ],
932           'include_dirs': [
933             '<(INTERMEDIATE_DIR)',
934           ],
935           'sources': [
936             'host/host_ui.rc',
937             'host/plugin/host_plugin.def',
938             '<(SHARED_INTERMEDIATE_DIR)/remoting/host_plugin_version.rc'
939           ],
940         }],
941       ],
942     },  # end of target 'remoting_host_plugin'
944     {
945       'target_name': 'remoting_webapp',
946       'type': 'none',
947       'dependencies': [
948         'remoting_host_plugin',
949       ],
950       'sources': [
951         'webapp/build-webapp.py',
952         'webapp/verify-webapp.py',
953         '<(version_path)',
954         '<(chrome_version_path)',
955         '<@(remoting_webapp_files)',
956         '<@(remoting_webapp_locale_files)',
957       ],
958       # Can't use a 'copies' because we need to manipulate
959       # the manifest file to get the right plugin name.
960       # Also we need to move the plugin into the me2mom
961       # folder, which means 2 copies, and gyp doesn't
962       # seem to guarantee the ordering of 2 copies statements
963       # when the actual project is generated.
964       'actions': [
965         {
966           'action_name': 'Verify Remoting WebApp i18n',
967           'inputs': [
968             'host/plugin/host_script_object.cc',
969             'webapp/_locales/en/messages.json',
970             'webapp/client_screen.js',
971             'webapp/host_controller.js',
972             'webapp/host_table_entry.js',
973             'webapp/host_setup_dialog.js',
974             'webapp/main.html',
975             'webapp/manifest.json',
976             'webapp/remoting.js',
977             'webapp/verify-webapp.py',
978           ],
979           'outputs': [
980             '<(PRODUCT_DIR)/remoting/webapp_verified.stamp',
981           ],
982           'action': [
983             'python',
984             'webapp/verify-webapp.py',
985             '<(PRODUCT_DIR)/remoting/webapp_verified.stamp',
986             'webapp/_locales/en/messages.json',
987             'webapp/client_screen.js',
988             'webapp/host_controller.js',
989             'webapp/host_table_entry.js',
990             'webapp/host_setup_dialog.js',
991             'webapp/main.html',
992             'webapp/manifest.json',
993             'webapp/remoting.js',
994             'host/plugin/host_script_object.cc',
995          ],
996         },
997         {
998           'action_name': 'Build Remoting WebApp',
999           'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
1000           'plugin_path': '<(PRODUCT_DIR)/<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
1001           'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
1002           'inputs': [
1003             'webapp/build-webapp.py',
1004             '<(_plugin_path)',
1005             '<(version_path)',
1006             '<(chrome_version_path)',
1007             '<@(remoting_webapp_files)',
1008             '<@(remoting_webapp_locale_files)',
1009           ],
1010           'outputs': [
1011             '<(_output_dir)',
1012             '<(_zip_path)',
1013           ],
1014           'action': [
1015             'python', 'webapp/build-webapp.py',
1016             '<(buildtype)',
1017             '<(version_full)',
1018             '<(host_plugin_mime_type)',
1019             '<(_output_dir)',
1020             '<(_zip_path)',
1021             '<(_plugin_path)',
1022             '<@(remoting_webapp_files)',
1023             '--locales',
1024             '<@(remoting_webapp_locale_files)',
1025           ],
1026         },
1027       ],
1028     }, # end of target 'remoting_webapp'
1030     {
1031       'target_name': 'remoting_base',
1032       'type': 'static_library',
1033       'variables': { 'enable_wexit_time_destructors': 1, },
1034       'dependencies': [
1035         '../base/base.gyp:base',
1036         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
1037         '../ui/ui.gyp:ui',
1038         '../net/net.gyp:net',
1039         '../skia/skia.gyp:skia',
1040         '../third_party/libvpx/libvpx.gyp:libvpx',
1041         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
1042         '../third_party/zlib/zlib.gyp:zlib',
1043         '../media/media.gyp:yuv_convert',
1044         'remoting_jingle_glue',
1045         'proto/chromotocol.gyp:chromotocol_proto_lib',
1046       ],
1047       'export_dependent_settings': [
1048         '../base/base.gyp:base',
1049         '../net/net.gyp:net',
1050         '../skia/skia.gyp:skia',
1051         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
1052         'proto/chromotocol.gyp:chromotocol_proto_lib',
1053       ],
1054       # This target needs a hard dependency because dependent targets
1055       # depend on chromotocol_proto_lib for headers.
1056       'hard_dependency': 1,
1057       'sources': [
1058         'base/auth_token_util.cc',
1059         'base/auth_token_util.h',
1060         'base/capture_data.cc',
1061         'base/capture_data.h',
1062         'base/compound_buffer.cc',
1063         'base/compound_buffer.h',
1064         'base/compressor.h',
1065         'base/compressor_verbatim.cc',
1066         'base/compressor_verbatim.h',
1067         'base/compressor_zlib.cc',
1068         'base/compressor_zlib.h',
1069         'base/constants.cc',
1070         'base/constants.h',
1071         'base/decoder.h',
1072         'base/decoder_vp8.cc',
1073         'base/decoder_vp8.h',
1074         'base/decoder_row_based.cc',
1075         'base/decoder_row_based.h',
1076         'base/decompressor.h',
1077         'base/decompressor_verbatim.cc',
1078         'base/decompressor_verbatim.h',
1079         'base/decompressor_zlib.cc',
1080         'base/decompressor_zlib.h',
1081         'base/encoder.h',
1082         'base/encoder_vp8.cc',
1083         'base/encoder_vp8.h',
1084         'base/encoder_row_based.cc',
1085         'base/encoder_row_based.h',
1086         'base/plugin_message_loop_proxy.cc',
1087         'base/plugin_message_loop_proxy.h',
1088         'base/rate_counter.cc',
1089         'base/rate_counter.h',
1090         'base/running_average.cc',
1091         'base/running_average.h',
1092         'base/util.cc',
1093         'base/util.h',
1094       ],
1095     },  # end of target 'remoting_base'
1097     {
1098       'target_name': 'remoting_host',
1099       'type': 'static_library',
1100       'variables': { 'enable_wexit_time_destructors': 1, },
1101       'dependencies': [
1102         'remoting_base',
1103         'remoting_jingle_glue',
1104         'remoting_protocol',
1105         'differ_block',
1106         '../crypto/crypto.gyp:crypto',
1107       ],
1108       'sources': [
1109         'host/capturer.h',
1110         'host/capturer_helper.cc',
1111         'host/capturer_helper.h',
1112         'host/capturer_fake.cc',
1113         'host/capturer_fake.h',
1114         'host/capturer_linux.cc',
1115         'host/capturer_mac.mm',
1116         'host/capturer_win.cc',
1117         'host/capture_scheduler.cc',
1118         'host/capture_scheduler.h',
1119         'host/chromoting_host.cc',
1120         'host/chromoting_host.h',
1121         'host/chromoting_host_context.cc',
1122         'host/chromoting_host_context.h',
1123         'host/client_session.cc',
1124         'host/client_session.h',
1125         'host/clipboard.h',
1126         'host/clipboard_linux.cc',
1127         'host/clipboard_mac.mm',
1128         'host/clipboard_win.cc',
1129         'host/constants.h',
1130         'host/constants_mac.cc',
1131         'host/constants_mac.h',
1132         'host/constants_win.cc',
1133         'host/continue_window.h',
1134         'host/continue_window_gtk.cc',
1135         'host/continue_window_mac.mm',
1136         'host/continue_window_win.cc',
1137         'host/curtain.h',
1138         'host/curtain_linux.cc',
1139         'host/curtain_mac.cc',
1140         'host/curtain_win.cc',
1141         'host/desktop_environment.cc',
1142         'host/desktop_environment.h',
1143         'host/desktop_win.cc',
1144         'host/desktop_win.h',
1145         'host/differ.cc',
1146         'host/differ.h',
1147         'host/disconnect_window.h',
1148         'host/disconnect_window_gtk.cc',
1149         'host/disconnect_window_mac.h',
1150         'host/disconnect_window_mac.mm',
1151         'host/disconnect_window_win.cc',
1152         'host/event_executor.h',
1153         'host/event_executor_linux.cc',
1154         'host/event_executor_mac.cc',
1155         'host/event_executor_win.cc',
1156         'host/heartbeat_sender.cc',
1157         'host/heartbeat_sender.h',
1158         'host/gaia_oauth_client.cc',
1159         'host/gaia_oauth_client.h',
1160         'host/host_config.cc',
1161         'host/host_config.h',
1162         'host/host_key_pair.cc',
1163         'host/host_key_pair.h',
1164         'host/host_port_allocator.cc',
1165         'host/host_port_allocator.h',
1166         'host/host_secret.cc',
1167         'host/host_secret.h',
1168         'host/host_status_observer.h',
1169         'host/host_user_interface.cc',
1170         'host/host_user_interface.h',
1171         'host/in_memory_host_config.cc',
1172         'host/in_memory_host_config.h',
1173         'host/it2me_host_user_interface.cc',
1174         'host/it2me_host_user_interface.h',
1175         'host/json_host_config.cc',
1176         'host/json_host_config.h',
1177         'host/local_input_monitor.h',
1178         'host/local_input_monitor_linux.cc',
1179         'host/local_input_monitor_mac.mm',
1180         'host/local_input_monitor_thread_linux.cc',
1181         'host/local_input_monitor_thread_linux.h',
1182         'host/local_input_monitor_thread_win.cc',
1183         'host/local_input_monitor_thread_win.h',
1184         'host/local_input_monitor_win.cc',
1185         'host/log_to_server.cc',
1186         'host/log_to_server.h',
1187         'host/mouse_move_observer.h',
1188         'host/network_settings.h',
1189         'host/pin_hash.cc',
1190         'host/pin_hash.h',
1191         'host/policy_hack/nat_policy.h',
1192         'host/policy_hack/nat_policy.cc',
1193         'host/policy_hack/nat_policy_linux.cc',
1194         'host/policy_hack/nat_policy_mac.mm',
1195         'host/policy_hack/nat_policy_win.cc',
1196         'host/register_support_host_request.cc',
1197         'host/register_support_host_request.h',
1198         'host/remote_input_filter.cc',
1199         'host/remote_input_filter.h',
1200         'host/screen_recorder.cc',
1201         'host/screen_recorder.h',
1202         'host/server_log_entry.cc',
1203         'host/server_log_entry.h',
1204         'host/session_event_executor_win.cc',
1205         'host/session_event_executor_win.h',
1206         'host/session_manager_factory.cc',
1207         'host/session_manager_factory.h',
1208         'host/signaling_connector.cc',
1209         'host/signaling_connector.h',
1210         'host/scoped_thread_desktop_win.cc',
1211         'host/scoped_thread_desktop_win.h',
1212         'host/ui_strings.cc',
1213         'host/ui_strings.h',
1214         'host/url_request_context.cc',
1215         'host/url_request_context.h',
1216         'host/user_authenticator.h',
1217         'host/user_authenticator_linux.cc',
1218         'host/user_authenticator_mac.cc',
1219         'host/user_authenticator_win.cc',
1220         'host/vlog_net_log.cc',
1221         'host/vlog_net_log.h',
1222         'host/x_server_pixel_buffer.cc',
1223         'host/x_server_pixel_buffer.h',
1224       ],
1225       'conditions': [
1226         ['OS=="linux"', {
1227           'link_settings': {
1228             'libraries': [
1229               '-lX11',
1230               '-lXdamage',
1231               '-lXfixes',
1232               '-lXtst',
1233               '-lpam',
1234               '-lXext'
1235             ],
1236           },
1237         }],
1238         ['toolkit_uses_gtk==1', {
1239           'dependencies': [
1240             '../build/linux/system.gyp:gtk',
1241           ],
1242         }, {  # else toolkit_uses_gtk!=1
1243           'sources!': [
1244             '*_gtk.cc',
1245           ],
1246         }],
1247         ['OS!="linux"', {
1248           'sources!': [
1249             'host/x_server_pixel_buffer.cc',
1250             'host/x_server_pixel_buffer.h',
1251           ],
1252         }],
1253         ['OS=="mac"', {
1254           'sources': [
1255             '../third_party/GTM/AppKit/GTMCarbonEvent.h',
1256             '../third_party/GTM/AppKit/GTMCarbonEvent.m',
1257             '../third_party/GTM/DebugUtils/GTMDebugSelectorValidation.h',
1258             '../third_party/GTM/DebugUtils/GTMTypeCasting.h',
1259             '../third_party/GTM/Foundation/GTMObjectSingleton.h',
1260             '../third_party/GTM/GTMDefines.h',
1261           ],
1262           'include_dirs': [
1263             '../third_party/GTM',
1264             '../third_party/GTM/AppKit',
1265             '../third_party/GTM/DebugUtils',
1266             '../third_party/GTM/Foundation',
1267           ],
1268           'link_settings': {
1269             'libraries': [
1270               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
1271             ],
1272           },
1273         }],
1274         ['OS=="win"', {
1275           'sources': [
1276             'host/chromoting_messages.cc',
1277             'host/chromoting_messages.h',
1278           ],
1279         }],
1280       ],
1281     },  # end of target 'remoting_host'
1283     {
1284       'target_name': 'remoting_client',
1285       'type': 'static_library',
1286       'variables': { 'enable_wexit_time_destructors': 1, },
1287       'dependencies': [
1288         'remoting_base',
1289         'remoting_jingle_glue',
1290         'remoting_protocol',
1291       ],
1292       'sources': [
1293         'client/audio_player.h',
1294         'client/chromoting_client.cc',
1295         'client/chromoting_client.h',
1296         'client/chromoting_stats.cc',
1297         'client/chromoting_stats.h',
1298         'client/chromoting_view.h',
1299         'client/client_config.cc',
1300         'client/client_config.h',
1301         'client/client_context.cc',
1302         'client/client_context.h',
1303         'client/frame_consumer.h',
1304         'client/frame_consumer_proxy.cc',
1305         'client/frame_consumer_proxy.h',
1306         'client/frame_producer.h',
1307         'client/key_event_mapper.cc',
1308         'client/key_event_mapper.h',
1309         'client/rectangle_update_decoder.cc',
1310         'client/rectangle_update_decoder.h',
1311       ],
1312     },  # end of target 'remoting_client'
1314     {
1315       'target_name': 'remoting_simple_host',
1316       'type': 'executable',
1317       'variables': { 'enable_wexit_time_destructors': 1, },
1318       'dependencies': [
1319         'remoting_base',
1320         'remoting_host',
1321         'remoting_jingle_glue',
1322         '../base/base.gyp:base',
1323         '../base/base.gyp:base_i18n',
1324         '../media/media.gyp:media',
1325         '../net/net.gyp:net',
1326       ],
1327       'sources': [
1328         'host/simple_host_process.cc',
1329       ],
1330       'conditions': [
1331         ['OS=="win"', {
1332           'dependencies': [
1333             '../ipc/ipc.gyp:ipc'
1334           ],
1335         }],
1336       ],
1337     },  # end of target 'remoting_simple_host'
1339     {
1340       'target_name': 'remoting_me2me_host',
1341       'type': 'executable',
1342       'variables': { 'enable_wexit_time_destructors': 1, },
1343       'dependencies': [
1344         'remoting_base',
1345         'remoting_breakpad',
1346         'remoting_host',
1347         'remoting_jingle_glue',
1348         '../base/base.gyp:base',
1349         '../base/base.gyp:base_i18n',
1350         '../media/media.gyp:media',
1351         '../net/net.gyp:net',
1352       ],
1353       'sources': [
1354         'host/branding.cc',
1355         'host/branding.h',
1356         'host/host_event_logger.h',
1357         'host/sighup_listener_mac.cc',
1358         'host/sighup_listener_mac.h',
1359         'host/remoting_me2me_host.cc',
1360         'host/usage_stats_consent.h',
1361         'host/usage_stats_consent_win.cc',
1362       ],
1363       'conditions': [
1364         ['os_posix==1', {
1365           'sources': [
1366             'host/host_event_logger_posix.cc',
1367           ],
1368         }],
1369         ['OS=="mac"', {
1370           'mac_bundle': 1,
1371           'conditions': [
1372             ['branding == "Chrome"', {
1373               'variables': {
1374                  'host_bundle_id': 'com.google.chrome_remote_desktop.remoting_me2me_host',
1375               },
1376             }, { # else branding!="Chrome"
1377               'variables': {
1378                 'host_bundle_id': 'org.chromium.chromoting.remoting_me2me_host',
1379               },
1380             }],
1381           ],
1382           'xcode_settings': {
1383             'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
1384             'INFOPLIST_PREPROCESS': 'YES',
1385             'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)" COPYRIGHT_BY="<(copyright_by)"',
1386           },
1387           'mac_bundle_resources': [
1388             'host/disconnect_window.xib',
1389             'host/remoting_me2me_host.icns',
1390             'host/remoting_me2me_host-Info.plist',
1391           ],
1392           'mac_bundle_resources!': [
1393             'host/remoting_me2me_host-Info.plist',
1394           ],
1395         }],
1396         ['OS=="win"', {
1397           'dependencies': [
1398             '../ipc/ipc.gyp:ipc',
1399             'remoting_version_resources',
1400           ],
1401           'sources': [
1402             'host/host_event_logger_win.cc',
1403             'host/host_ui.rc',
1404             'host/remoting_host_messages.mc',
1405             '<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host_version.rc'
1406           ],
1407           'include_dirs': [
1408             '<(INTERMEDIATE_DIR)',
1409           ],
1410           # Rule to run the message compiler.
1411           'rules': [
1412             {
1413               'rule_name': 'message_compiler',
1414               'extension': 'mc',
1415               'inputs': [ ],
1416               'outputs': [
1417                 '<(INTERMEDIATE_DIR)/remoting_host_messages.h',
1418                 '<(INTERMEDIATE_DIR)/remoting_host_messages.rc',
1419               ],
1420               'msvs_cygwin_shell': 0,
1421               'msvs_quote_cmd': 0,
1422               'action': [
1423                 'mc.exe -h <(INTERMEDIATE_DIR) -r <(INTERMEDIATE_DIR) <(RULE_INPUT_PATH)',
1424               ],
1425               'process_outputs_as_sources': 1,
1426               'message': 'Running message compiler on <(RULE_INPUT_PATH).',
1427             },
1428           ],
1429           'link_settings': {
1430             'libraries': [
1431               '-lcomctl32.lib',
1432             ],
1433           },
1434           'msvs_settings': {
1435             'VCLinkerTool': {
1436               'AdditionalOptions': [
1437                 "\"/manifestdependency:type='win32' "
1438                     "name='Microsoft.Windows.Common-Controls' "
1439                     "version='6.0.0.0' "
1440                     "processorArchitecture='*' "
1441                     "publicKeyToken='6595b64144ccf1df' language='*'\"",
1442               ],
1443               # 2 == /SUBSYSTEM:WINDOWS
1444               'SubSystem': '2',
1445             },
1446           },
1447         }],
1448       ],  # end of 'conditions'
1449     },  # end of target 'remoting_me2me_host'
1451     {
1452       'target_name': 'remoting_host_keygen',
1453       'type': 'executable',
1454       'dependencies': [
1455         'remoting_base',
1456         '../base/base.gyp:base',
1457         '../base/base.gyp:base_i18n',
1458         '../crypto/crypto.gyp:crypto',
1459       ],
1460       'sources': [
1461         'host/keygen_main.cc',
1462       ],
1463     },  # end of target 'remoting_host_keygen'
1465     {
1466       'target_name': 'remoting_jingle_glue',
1467       'type': 'static_library',
1468       'variables': { 'enable_wexit_time_destructors': 1, },
1469       'dependencies': [
1470         '../base/base.gyp:base',
1471         '../jingle/jingle.gyp:jingle_glue',
1472         '../jingle/jingle.gyp:notifier',
1473         '../third_party/libjingle/libjingle.gyp:libjingle',
1474         '../third_party/libjingle/libjingle.gyp:libjingle_p2p',
1475       ],
1476       'export_dependent_settings': [
1477         '../third_party/libjingle/libjingle.gyp:libjingle',
1478         '../third_party/libjingle/libjingle.gyp:libjingle_p2p',
1479       ],
1480       'sources': [
1481         'jingle_glue/iq_sender.cc',
1482         'jingle_glue/iq_sender.h',
1483         'jingle_glue/javascript_signal_strategy.cc',
1484         'jingle_glue/javascript_signal_strategy.h',
1485         'jingle_glue/jingle_info_request.cc',
1486         'jingle_glue/jingle_info_request.h',
1487         'jingle_glue/jingle_thread.cc',
1488         'jingle_glue/jingle_thread.h',
1489         'jingle_glue/signal_strategy.h',
1490         'jingle_glue/ssl_adapter.h',
1491         'jingle_glue/ssl_adapter.cc',
1492         'jingle_glue/ssl_socket_adapter.cc',
1493         'jingle_glue/ssl_socket_adapter.h',
1494         'jingle_glue/xmpp_proxy.h',
1495         'jingle_glue/xmpp_signal_strategy.cc',
1496         'jingle_glue/xmpp_signal_strategy.h',
1497         'jingle_glue/xmpp_socket_adapter.cc',
1498         'jingle_glue/xmpp_socket_adapter.h',
1499       ],
1500     },  # end of target 'remoting_jingle_glue'
1502     {
1503       'target_name': 'remoting_protocol',
1504       'type': 'static_library',
1505       'variables': { 'enable_wexit_time_destructors': 1, },
1506       'dependencies': [
1507         'remoting_base',
1508         'remoting_jingle_glue',
1509         '../crypto/crypto.gyp:crypto',
1510         '../jingle/jingle.gyp:jingle_glue',
1511         '../net/net.gyp:net',
1512       ],
1513       'export_dependent_settings': [
1514         'remoting_jingle_glue',
1515       ],
1516       'sources': [
1517         'protocol/audio_reader.cc',
1518         'protocol/audio_reader.h',
1519         'protocol/audio_stub.h',
1520         'protocol/audio_writer.cc',
1521         'protocol/audio_writer.h',
1522         'protocol/auth_util.cc',
1523         'protocol/auth_util.h',
1524         'protocol/authentication_method.cc',
1525         'protocol/authentication_method.h',
1526         'protocol/authenticator.cc',
1527         'protocol/authenticator.h',
1528         'protocol/buffered_socket_writer.cc',
1529         'protocol/buffered_socket_writer.h',
1530         'protocol/channel_authenticator.h',
1531         'protocol/channel_dispatcher_base.cc',
1532         'protocol/channel_dispatcher_base.h',
1533         'protocol/client_control_dispatcher.cc',
1534         'protocol/client_control_dispatcher.h',
1535         'protocol/client_event_dispatcher.cc',
1536         'protocol/client_event_dispatcher.h',
1537         'protocol/client_stub.h',
1538         'protocol/clipboard_echo_filter.cc',
1539         'protocol/clipboard_echo_filter.h',
1540         'protocol/clipboard_filter.h',
1541         'protocol/clipboard_filter.cc',
1542         'protocol/clipboard_thread_proxy.cc',
1543         'protocol/clipboard_thread_proxy.h',
1544         'protocol/clipboard_stub.h',
1545         'protocol/connection_to_client.cc',
1546         'protocol/connection_to_client.h',
1547         'protocol/connection_to_host.cc',
1548         'protocol/connection_to_host.h',
1549         'protocol/content_description.cc',
1550         'protocol/content_description.h',
1551         'protocol/errors.h',
1552         'protocol/host_control_dispatcher.cc',
1553         'protocol/host_control_dispatcher.h',
1554         'protocol/host_event_dispatcher.cc',
1555         'protocol/host_event_dispatcher.h',
1556         'protocol/host_event_stub.h',
1557         'protocol/host_stub.h',
1558         'protocol/input_event_tracker.cc',
1559         'protocol/input_event_tracker.h',
1560         'protocol/input_filter.cc',
1561         'protocol/input_filter.h',
1562         'protocol/input_stub.h',
1563         'protocol/it2me_host_authenticator_factory.cc',
1564         'protocol/it2me_host_authenticator_factory.h',
1565         'protocol/jingle_messages.cc',
1566         'protocol/jingle_messages.h',
1567         'protocol/jingle_session.cc',
1568         'protocol/jingle_session.h',
1569         'protocol/jingle_session_manager.cc',
1570         'protocol/jingle_session_manager.h',
1571         'protocol/libjingle_transport_factory.cc',
1572         'protocol/libjingle_transport_factory.h',
1573         'protocol/me2me_host_authenticator_factory.cc',
1574         'protocol/me2me_host_authenticator_factory.h',
1575         'protocol/message_decoder.cc',
1576         'protocol/message_decoder.h',
1577         'protocol/message_reader.cc',
1578         'protocol/message_reader.h',
1579         'protocol/mouse_input_filter.cc',
1580         'protocol/mouse_input_filter.h',
1581         'protocol/negotiating_authenticator.cc',
1582         'protocol/negotiating_authenticator.h',
1583         'protocol/protobuf_video_reader.cc',
1584         'protocol/protobuf_video_reader.h',
1585         'protocol/protobuf_video_writer.cc',
1586         'protocol/protobuf_video_writer.h',
1587         'protocol/session.h',
1588         'protocol/session_config.cc',
1589         'protocol/session_config.h',
1590         'protocol/session_manager.h',
1591         'protocol/socket_reader_base.cc',
1592         'protocol/socket_reader_base.h',
1593         'protocol/ssl_hmac_channel_authenticator.cc',
1594         'protocol/ssl_hmac_channel_authenticator.h',
1595         'protocol/transport.cc',
1596         'protocol/transport.h',
1597         'protocol/transport_config.cc',
1598         'protocol/transport_config.h',
1599         'protocol/util.cc',
1600         'protocol/util.h',
1601         'protocol/v1_authenticator.cc',
1602         'protocol/v1_authenticator.h',
1603         'protocol/v2_authenticator.cc',
1604         'protocol/v2_authenticator.h',
1605         'protocol/video_reader.cc',
1606         'protocol/video_reader.h',
1607         'protocol/video_stub.h',
1608         'protocol/video_writer.cc',
1609         'protocol/video_writer.h',
1610       ],
1611     },  # end of target 'remoting_protocol'
1613     {
1614       'target_name': 'differ_block',
1615       'type': 'static_library',
1616       'variables': { 'enable_wexit_time_destructors': 1, },
1617       'conditions': [
1618         [ 'target_arch == "ia32" or target_arch == "x64"', {
1619           'dependencies': [
1620             'differ_block_sse2',
1621           ],
1622         }],
1623       ],
1624       'sources': [
1625         'host/differ_block.cc',
1626         'host/differ_block.h',
1627       ],
1628     }, # end of target differ_block
1630     {
1631       'target_name': 'differ_block_sse2',
1632       'type': 'static_library',
1633       'conditions': [
1634         [ 'os_posix == 1 and OS != "mac"', {
1635           'cflags': [
1636             '-msse2',
1637           ],
1638         }],
1639       ],
1640       'sources': [
1641         'host/differ_block_sse2.cc',
1642       ],
1643     }, # end of target differ_block_sse2
1645     # Remoting unit tests
1646     {
1647       'target_name': 'remoting_unittests',
1648       'type': 'executable',
1649       'dependencies': [
1650         'remoting_base',
1651         'remoting_breakpad',
1652         'remoting_client',
1653         'remoting_client_plugin',
1654         'remoting_host',
1655         'remoting_jingle_glue',
1656         'remoting_protocol',
1657         '../base/base.gyp:base',
1658         '../base/base.gyp:base_i18n',
1659         '../base/base.gyp:test_support_base',
1660         '../media/media.gyp:media',
1661         '../net/net.gyp:net_test_support',
1662         '../ppapi/ppapi.gyp:ppapi_cpp',
1663         '../testing/gmock.gyp:gmock',
1664         '../testing/gtest.gyp:gtest',
1665         '../ui/ui.gyp:ui',
1666       ],
1667       'include_dirs': [
1668         '../testing/gmock/include',
1669       ],
1670       'sources': [
1671         'base/auth_token_util_unittest.cc',
1672         'base/base_mock_objects.cc',
1673         'base/base_mock_objects.h',
1674         'base/breakpad_win_unittest.cc',
1675         'base/codec_test.cc',
1676         'base/codec_test.h',
1677         'base/compound_buffer_unittest.cc',
1678         'base/compressor_zlib_unittest.cc',
1679         'base/decoder_vp8_unittest.cc',
1680         'base/decompressor_zlib_unittest.cc',
1681         'base/encode_decode_unittest.cc',
1682         'base/encoder_vp8_unittest.cc',
1683         'base/encoder_row_based_unittest.cc',
1684         'base/util_unittest.cc',
1685         'client/key_event_mapper_unittest.cc',
1686         'client/plugin/mac_key_event_processor_unittest.cc',
1687         'host/capturer_helper_unittest.cc',
1688         'host/capturer_linux_unittest.cc',
1689         'host/capturer_mac_unittest.cc',
1690         'host/capturer_win_unittest.cc',
1691         'host/chromoting_host_context_unittest.cc',
1692         'host/chromoting_host_unittest.cc',
1693         'host/client_session_unittest.cc',
1694         'host/differ_block_unittest.cc',
1695         'host/differ_unittest.cc',
1696         'host/heartbeat_sender_unittest.cc',
1697         'host/host_key_pair_unittest.cc',
1698         'host/host_mock_objects.cc',
1699         'host/host_mock_objects.h',
1700         'host/json_host_config_unittest.cc',
1701         'host/log_to_server_unittest.cc',
1702         'host/pin_hash_unittest.cc',
1703         'host/register_support_host_request_unittest.cc',
1704         'host/remote_input_filter_unittest.cc',
1705         'host/screen_recorder_unittest.cc',
1706         'host/server_log_entry_unittest.cc',
1707         'host/test_key_pair.h',
1708         'jingle_glue/fake_signal_strategy.cc',
1709         'jingle_glue/fake_signal_strategy.h',
1710         'jingle_glue/iq_sender_unittest.cc',
1711         'jingle_glue/jingle_thread_unittest.cc',
1712         'jingle_glue/mock_objects.cc',
1713         'jingle_glue/mock_objects.h',
1714         'protocol/authenticator_test_base.cc',
1715         'protocol/authenticator_test_base.h',
1716         'protocol/clipboard_echo_filter_unittest.cc',
1717         'protocol/connection_tester.cc',
1718         'protocol/connection_tester.h',
1719         'protocol/connection_to_client_unittest.cc',
1720         'protocol/fake_authenticator.cc',
1721         'protocol/fake_authenticator.h',
1722         'protocol/fake_session.cc',
1723         'protocol/fake_session.h',
1724         'protocol/jingle_messages_unittest.cc',
1725         'protocol/jingle_session_unittest.cc',
1726         'protocol/input_event_tracker_unittest.cc',
1727         'protocol/message_decoder_unittest.cc',
1728         'protocol/message_reader_unittest.cc',
1729         'protocol/mouse_input_filter_unittest.cc',
1730         'protocol/negotiating_authenticator_unittest.cc',
1731         'protocol/protocol_mock_objects.cc',
1732         'protocol/protocol_mock_objects.h',
1733         'protocol/ppapi_module_stub.cc',
1734         'protocol/ssl_hmac_channel_authenticator_unittest.cc',
1735         'protocol/v1_authenticator_unittest.cc',
1736         'protocol/v2_authenticator_unittest.cc',
1737         'run_all_unittests.cc',
1738       ],
1739       'conditions': [
1740         [ 'OS=="win"', {
1741           'include_dirs': [
1742             '../breakpad/src',
1743           ],
1744           'dependencies': [
1745             '../ipc/ipc.gyp:ipc'
1746           ],
1747           'link_settings': {
1748             'libraries': [
1749               '-lrpcrt4.lib',
1750             ],
1751           },
1752         }],
1753         ['chromeos != 0', {
1754           'dependencies!': [
1755             'remoting_host',
1756           ],
1757           'sources/': [
1758             ['exclude', 'host/*'],
1759           ]
1760         }],
1761         ['toolkit_uses_gtk == 1', {
1762           'dependencies': [
1763             # Needed for the following #include chain:
1764             #   base/run_all_unittests.cc
1765             #   ../base/test_suite.h
1766             #   gtk/gtk.h
1767             '../build/linux/system.gyp:gtk',
1768             '../build/linux/system.gyp:ssl',
1769           ],
1770           'conditions': [
1771             [ 'linux_use_tcmalloc==1', {
1772                 'dependencies': [
1773                   '../base/allocator/allocator.gyp:allocator',
1774                 ],
1775               },
1776             ],
1777           ],
1778         }],
1779       ],  # end of 'conditions'
1780     },  # end of target 'remoting_unittests'
1781   ],  # end of targets