Fix crash in SimpleGeolocationProvider.
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blob33d1e4ad1492c8908c4085144525e4c2732a33ae
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   'includes': [
7     'remoting_enable.gypi',
8   ],
10   'conditions': [
11     ['OS=="mac"', {
12       'includes': [
13         'remoting_host_mac.gypi',
14       ],
15     }],
16     ['OS=="win"', {
17       'includes': [
18         'remoting_host_win.gypi',
19       ],
20     }],
21     ['OS=="linux"', {
22       'includes': [
23         'remoting_host_linux.gypi',
24       ],
25     }],
27     ['enable_remoting_host==1', {
28       'targets': [
29         {
30           # GN version: //remoting/host
31           'target_name': 'remoting_host',
32           'type': 'static_library',
33           'variables': {
34             'enable_wexit_time_destructors': 1,
35             'host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
36             'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
37           },
38           'dependencies': [
39             'remoting_base',
40             'remoting_protocol',
41             'remoting_resources',
42             '../base/base.gyp:base_i18n',
43             '../components/components.gyp:policy',
44             '../components/components.gyp:policy_component_common',
45             '../crypto/crypto.gyp:crypto',
46             '../google_apis/google_apis.gyp:google_apis',
47             '../ipc/ipc.gyp:ipc',
48             '../ui/events/events.gyp:dom4_keycode_converter',
49           ],
50           'defines': [
51             'HOST_BUNDLE_NAME="<(host_bundle_name)"',
52             'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
53             'VERSION=<(version_full)',
54           ],
55           'sources': [
56             '<@(remoting_host_sources)',
57           ],
58           'conditions': [
59             ['OS=="linux"', {
60               'conditions': [
61                 ['use_x11==1', {
62                   'dependencies': [
63                     '../build/linux/system.gyp:x11',
64                     '../build/linux/system.gyp:xext',
65                     '../build/linux/system.gyp:xfixes',
66                     '../build/linux/system.gyp:xi',
67                     '../build/linux/system.gyp:xrandr',
68                     '../build/linux/system.gyp:xtst',
69                   ],
70                 }],
71                 ['chromeos==0 and use_ozone==0', {
72                   'dependencies': [
73                     # use GTK on Linux, even for Aura builds.
74                     '../build/linux/system.gyp:gtk',
75                   ],
76                 }]
77               ],
78             }],
79             ['chromeos==1', {
80               'dependencies' : [
81                 '../cc/cc.gyp:cc',
82                 '../ppapi/ppapi_internal.gyp:ppapi_host',
83                 '../skia/skia.gyp:skia',
84                 '../ui/aura/aura.gyp:aura',
85                 '../ui/compositor/compositor.gyp:compositor',
86                 '../ui/events/events.gyp:events',
87                 '../ui/events/platform/events_platform.gyp:events_platform',
88                 '../ui/views/views.gyp:views',
89               ],
90               'include_dirs': [
91                 '../third_party/skia/include/utils',
92               ],
93               'sources!' : [
94                 'host/clipboard_x11.cc',
95                 'host/continue_window_linux.cc',
96                 'host/disconnect_window_linux.cc',
97                 'host/linux/x_server_clipboard.cc',
98                 'host/linux/x_server_clipboard.h',
99                 'host/local_input_monitor_x11.cc',
100               ],
101               'conditions': [
102                 ['use_ash==1', {
103                   'dependencies': [
104                     '../ash/ash.gyp:ash',
105                   ],
106                 }],
107                 ['use_ozone==0', {
108                   'sources!': [
109                     'host/input_injector_chromeos.cc',
110                     'host/input_injector_chromeos.h',
111                   ],
112                 }, {  # use_ozone==1
113                   'dependencies' : [
114                     '../ui/ozone/ozone.gyp:ozone',
115                   ]
116                 }],
117               ],
118             }],
119             ['OS=="mac"', {
120               'dependencies': [
121                 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
122               ],
123               'variables': {
124                 # Include internal_mac-inl.h only if it exists.
125                 'use_remoting_macosx_internal%':
126                   '<!(python -c "import os; print 1 if os.path.exists(\'tools/internal/internal_mac-inl.h\') else 0")'
127               },
128               'conditions': [
129                 ['use_remoting_macosx_internal==1', {
130                   'sources': [
131                     'internal/internal_mac-inl.h'
132                   ],
133                   'defines': [
134                     'USE_REMOTING_MACOSX_INTERNAL'
135                   ]
136                 }]
137               ],
138               'link_settings': {
139                 'libraries': [
140                   '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
141                ],
142               },
143             }],
144             ['OS=="win"', {
145               'defines': [
146                 '_ATL_NO_EXCEPTIONS',
147                 'ISOLATION_AWARE_ENABLED=1',
148               ],
149               'dependencies': [
150                 '../sandbox/sandbox.gyp:sandbox',
151                 'remoting_host_messages',
152                 'remoting_lib_idl',
153               ],
154               'msvs_settings': {
155                 'VCCLCompilerTool': {
156                   # /MP conflicts with #import directive so we limit the number
157                   # of processes to spawn to 1.
158                   'AdditionalOptions': ['/MP1'],
159                 },
160               },
161               'variables': {
162                 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
163               },
164               'sources': [
165                 '<(output_dir)/remoting_host_messages.mc',
166               ],
167               'include_dirs': [
168                 '<(output_dir)',
169               ],
170               'direct_dependent_settings': {
171                 'include_dirs': [
172                   '<(output_dir)',
173                 ],
174               },
175               'rules': [{
176                 # Rule to run the message compiler.
177                 'rule_name': 'message_compiler',
178                 'extension': 'mc',
179                 'outputs': [
180                   '<(output_dir)/<(RULE_INPUT_ROOT).h',
181                   '<(output_dir)/<(RULE_INPUT_ROOT).rc',
182                 ],
183                 'action': [
184                   'mc.exe',
185                   '-h', '<(output_dir)',
186                   '-r', '<(output_dir)/.',
187                   '-u',
188                   '<(RULE_INPUT_PATH)',
189                 ],
190                 'process_outputs_as_sources': 1,
191                 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
192               }],
193             }],
194             ['enable_webrtc==1', {
195               'dependencies': [
196                 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
197                 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
198               ],
199               'sources': [
200                 '<@(remoting_cast_sources)',
201               ],
202             }],
203           ],
204         },  # end of target 'remoting_host'
206         {
207           'target_name': 'remoting_native_messaging_base',
208           'type': 'static_library',
209           'variables': { 'enable_wexit_time_destructors': 1, },
210           'dependencies': [
211             '../base/base.gyp:base',
212           ],
213           'sources': [
214             'host/native_messaging/native_messaging_pipe.cc',
215             'host/native_messaging/native_messaging_pipe.h',
216             'host/native_messaging/native_messaging_reader.cc',
217             'host/native_messaging/native_messaging_reader.h',
218             'host/native_messaging/native_messaging_writer.cc',
219             'host/native_messaging/native_messaging_writer.h',
220             'host/native_messaging/pipe_messaging_channel.cc',
221             'host/native_messaging/pipe_messaging_channel.h',
222           ],
223         },  # end of target 'remoting_native_messaging_base'
225         {
226           'target_name': 'remoting_host_setup_base',
227           'type': 'static_library',
228           'variables': { 'enable_wexit_time_destructors': 1, },
229           'dependencies': [
230             '../base/base.gyp:base',
231             '../google_apis/google_apis.gyp:google_apis',
232             'remoting_host',
233           ],
234           'defines': [
235             'VERSION=<(version_full)',
236           ],
237           'sources': [
238             'host/setup/daemon_controller.cc',
239             'host/setup/daemon_controller.h',
240             'host/setup/daemon_controller_delegate_linux.cc',
241             'host/setup/daemon_controller_delegate_linux.h',
242             'host/setup/daemon_controller_delegate_mac.h',
243             'host/setup/daemon_controller_delegate_mac.mm',
244             'host/setup/daemon_controller_delegate_win.cc',
245             'host/setup/daemon_controller_delegate_win.h',
246             'host/setup/me2me_native_messaging_host.cc',
247             'host/setup/me2me_native_messaging_host.h',
248             'host/setup/oauth_client.cc',
249             'host/setup/oauth_client.h',
250             'host/setup/oauth_helper.cc',
251             'host/setup/oauth_helper.h',
252             'host/setup/pin_validator.cc',
253             'host/setup/pin_validator.h',
254             'host/setup/service_client.cc',
255             'host/setup/service_client.h',
256             'host/setup/test_util.cc',
257             'host/setup/test_util.h',
258             'host/setup/win/auth_code_getter.cc',
259             'host/setup/win/auth_code_getter.h',
260           ],
261           'conditions': [
262             ['OS=="win"', {
263               'dependencies': [
264                 '../google_update/google_update.gyp:google_update',
265                 'remoting_lib_idl',
266               ],
267               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
268               'msvs_disabled_warnings': [4267, ],
269             }],
270           ],
271         },  # end of target 'remoting_host_setup_base'
273         # Generates native messaging manifest files.
274         {
275           'target_name': 'remoting_native_messaging_manifests',
276           'type': 'none',
277           'conditions': [
278             [ 'OS == "win"', {
279               'variables': {
280                 'me2me_host_path': 'remoting_native_messaging_host.exe',
281                 'it2me_host_path': 'remote_assistance_host.exe',
282               },
283             }],
284             [ 'OS == "mac"', {
285               'variables': {
286                 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
287                 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
288                 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
289                 'me2me_host_path':
290                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
291                 'it2me_host_path':
292                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
293               },
294             }],
295             [ 'OS != "mac" and OS != "win"', {
296               'variables': {
297                 'me2me_host_path':
298                     '/opt/google/chrome-remote-desktop/native-messaging-host',
299                 'it2me_host_path':
300                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
301               },
302             }],
303           ],  # conditions
304           'sources': [
305             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
306             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
307           ],
308           'rules': [{
309             'rule_name': 'generate_manifest',
310             'extension': 'jinja2',
311             'inputs': [
312               '<(remoting_localize_path)',
313               '<(branding_path)',
314             ],
315             'outputs': [
316               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
317             ],
318             'action': [
319               'python', '<(remoting_localize_path)',
320               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
321               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
322               '--variables', '<(branding_path)',
323               '--template', '<(RULE_INPUT_PATH)',
324               '--locale_output', '<@(_outputs)',
325               'en',
326             ],
327           }],
328         },  # end of target 'remoting_native_messaging_manifests'
329         {
330           'target_name': 'remoting_start_host',
331           'type': 'executable',
332           'dependencies': [
333             'remoting_host_setup_base',
334           ],
335           'sources': [
336             'host/setup/host_starter.cc',
337             'host/setup/host_starter.h',
338             'host/setup/start_host.cc',
339           ],
340           'conditions': [
341             ['OS=="linux" and use_allocator!="none"', {
342               'dependencies': [
343                 '../base/allocator/allocator.gyp:allocator',
344               ],
345             }],
346           ],
347         },  # end of target 'remoting_start_host'
348         {
349           'target_name': 'remoting_infoplist_strings',
350           'type': 'none',
351           'dependencies': [
352             'remoting_resources',
353           ],
354           'sources': [
355             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
356             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
357             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
358             'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
359             'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
360           ],
361           'rules': [{
362             'rule_name': 'generate_strings',
363             'extension': 'jinja2',
364             'inputs': [
365               '<(remoting_localize_path)',
366             ],
367             'outputs': [
368               '<!@pymod_do_main(remoting_localize --locale_output '
369                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
370                   '--print_only <(remoting_locales))',
371             ],
372             'action': [
373               'python', '<(remoting_localize_path)',
374               '--locale_dir', '<(webapp_locale_dir)',
375               '--template', '<(RULE_INPUT_PATH)',
376               '--locale_output',
377               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
378               '<@(remoting_locales)',
379             ]},
380           ],
381         },  # end of target 'remoting_infoplist_strings'
382         {
383           # GN version: //remoting/host/it2me:common
384           'target_name': 'remoting_it2me_host_static',
385           'type': 'static_library',
386           'variables': { 'enable_wexit_time_destructors': 1, },
387           'dependencies': [
388             '../base/base.gyp:base_i18n',
389             '../components/components.gyp:policy',
390             '../net/net.gyp:net',
391             'remoting_base',
392             'remoting_host',
393             'remoting_infoplist_strings',
394             'remoting_protocol',
395             'remoting_resources',
396           ],
397           'defines': [
398             'VERSION=<(version_full)',
399           ],
400           'sources': [
401             '<@(remoting_it2me_host_static_sources)',
402           ],
403         },  # end of target 'remoting_it2me_host_static'
404       ],  # end of 'targets'
405     }],  # 'enable_remoting_host==1'
407     ['enable_me2me_host==1', {
408       'targets': [
409         {
410           'target_name': 'remoting_me2me_host_static',
411           'type': 'static_library',
412           'variables': { 'enable_wexit_time_destructors': 1, },
413           'dependencies': [
414             '../base/base.gyp:base',
415             '../base/base.gyp:base_i18n',
416             '../components/components.gyp:policy',
417             '../components/components.gyp:policy_component_common',
418             '../net/net.gyp:net',
419             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
420             'remoting_base',
421             'remoting_breakpad',
422             'remoting_host',
423             'remoting_protocol',
424           ],
425           'defines': [
426             'VERSION=<(version_full)',
427           ],
428           'sources': [
429             'host/curtain_mode.h',
430             'host/curtain_mode_linux.cc',
431             'host/curtain_mode_mac.cc',
432             'host/curtain_mode_win.cc',
433             'host/pam_authorization_factory_posix.cc',
434             'host/pam_authorization_factory_posix.h',
435             'host/posix/signal_handler.cc',
436             'host/posix/signal_handler.h',
437             'host/remoting_me2me_host.cc',
438           ],
439           'conditions': [
440             ['OS=="linux"', {
441               'link_settings': {
442                 'libraries': [
443                   '-lpam',
444                 ],
445               },
446             }],
447             ['OS=="mac"', {
448               'link_settings': {
449                 'libraries': [
450                   'libpam.a',
451                ],
452               },
453             }],
454           ],  # end of 'conditions'
455         },  # end of target 'remoting_me2me_host_static'
456       ]  # end of targets
457     }],  # end of enable_me2me_host==1
459     ['OS!="win" and enable_me2me_host==1', {
460       'targets': [
461         {
462           'target_name': 'remoting_me2me_host',
463           'type': 'executable',
464           'variables': { 'enable_wexit_time_destructors': 1, },
465           'dependencies': [
466             '../base/base.gyp:base',
467             '../base/base.gyp:base_i18n',
468             '<(icu_gyp_path):icudata',
469             '../net/net.gyp:net',
470             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
471             'remoting_base',
472             'remoting_breakpad',
473             'remoting_host',
474             'remoting_infoplist_strings',
475             'remoting_me2me_host_static',
476             'remoting_protocol',
477           ],
478           'defines': [
479             'VERSION=<(version_full)',
480           ],
481           'sources': [
482             'host/host_main.cc',
483             'host/host_main.h',
484           ],
485           'conditions': [
486             ['OS=="mac"', {
487               'mac_bundle': 1,
488               'variables': {
489                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
490               },
491               'xcode_settings': {
492                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
493                 'INFOPLIST_PREPROCESS': 'YES',
494                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
495               },
496               'mac_bundle_resources': [
497                 '<(PRODUCT_DIR)/icudtl.dat',
498                 'host/disconnect_window.xib',
499                 'host/remoting_me2me_host.icns',
500                 'host/remoting_me2me_host-Info.plist',
501                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
503                 # Localized strings for 'Info.plist'
504                 '<!@pymod_do_main(remoting_localize --locale_output '
505                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
506                     '--print_only <(remoting_locales))',
507               ],
508               'mac_bundle_resources!': [
509                 'host/remoting_me2me_host-Info.plist',
510               ],
511               'conditions': [
512                 ['mac_breakpad==1', {
513                   'variables': {
514                     # A real .dSYM is needed for dump_syms to operate on.
515                     'mac_real_dsym': 1,
516                   },
517                   'copies': [
518                     {
519                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
520                       'files': [
521                         '<(PRODUCT_DIR)/crash_inspector',
522                         '<(PRODUCT_DIR)/crash_report_sender.app'
523                       ],
524                     },
525                   ],
526                   'dependencies': [
527                     '../breakpad/breakpad.gyp:dump_syms',
528                   ],
529                   'postbuilds': [
530                     {
531                       'postbuild_name': 'Dump Symbols',
532                       'variables': {
533                         'dump_product_syms_path':
534                             'scripts/mac/dump_product_syms',
535                       },
536                       'action': [
537                         '<(dump_product_syms_path)',
538                         '<(version_full)',
539                       ],
540                     },  # end of postbuild 'dump_symbols'
541                   ],  # end of 'postbuilds'
542                 }],  # mac_breakpad==1
543               ],  # conditions
544             }],  # OS=mac
545             ['OS=="linux" and use_allocator!="none"', {
546               'dependencies': [
547                 '../base/allocator/allocator.gyp:allocator',
548               ],
549             }],  # OS=linux
550           ],  # end of 'conditions'
551         },  # end of target 'remoting_me2me_host'
552         {
553           'target_name': 'remoting_me2me_native_messaging_host',
554           'type': 'executable',
555           'product_name': 'native_messaging_host',
556           'variables': { 'enable_wexit_time_destructors': 1, },
557           'dependencies': [
558             '../base/base.gyp:base',
559             'remoting_breakpad',
560             'remoting_host',
561             'remoting_host_setup_base',
562             'remoting_infoplist_strings',
563             'remoting_native_messaging_base',
564           ],
565           'defines': [
566             'VERSION=<(version_full)',
567           ],
568           'sources': [
569             'host/setup/me2me_native_messaging_host_entry_point.cc',
570             'host/setup/me2me_native_messaging_host_main.cc',
571             'host/setup/me2me_native_messaging_host_main.h',
572           ],
573           'conditions': [
574             ['OS=="linux" and use_allocator!="none"', {
575               'dependencies': [
576                 '../base/allocator/allocator.gyp:allocator',
577               ],
578             }],
579             ['OS=="mac"', {
580               'mac_bundle': 1,
581               'variables': {
582                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
583               },
584               'xcode_settings': {
585                 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
586                 'INFOPLIST_PREPROCESS': 'YES',
587                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
588               },
589               'mac_bundle_resources': [
590                 'host/setup/native_messaging_host-Info.plist',
591                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
593                 # Localized strings for 'Info.plist'
594                 '<!@pymod_do_main(remoting_localize --locale_output '
595                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
596                     '--print_only <(remoting_locales))',
597               ],
598               'mac_bundle_resources!': [
599                 'host/setup/native_messaging_host-Info.plist',
600               ],
601               'conditions': [
602                 ['mac_breakpad==1', {
603                   'variables': {
604                     # A real .dSYM is needed for dump_syms to operate on.
605                     'mac_real_dsym': 1,
606                   },
607                   'copies': [
608                     {
609                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
610                       'files': [
611                         '<(PRODUCT_DIR)/crash_inspector',
612                         '<(PRODUCT_DIR)/crash_report_sender.app'
613                       ],
614                     },
615                   ],
616                   'dependencies': [
617                     '../breakpad/breakpad.gyp:dump_syms',
618                   ],
619                   'postbuilds': [
620                     {
621                       'postbuild_name': 'Dump Symbols',
622                       'variables': {
623                         'dump_product_syms_path':
624                             'scripts/mac/dump_product_syms',
625                       },
626                       'action': [
627                         '<(dump_product_syms_path)',
628                         '<(version_full)',
629                       ],
630                     },  # end of postbuild 'dump_symbols'
631                   ],  # end of 'postbuilds'
632                 }],  # mac_breakpad==1
633               ],  # conditions
634             }],  # OS=mac
635           ],
636         },  # end of target 'remoting_me2me_native_messaging_host'
637       ], # targets
638     }], # end of OS!="win" and enable_me2me_host==1
640     ['OS!="win" and enable_remoting_host==1', {
641       'conditions': [
642         ['chromeos==0', {
643           'targets': [
644             {
645               'target_name': 'remoting_it2me_native_messaging_host',
646               'type': 'executable',
647               'product_name': 'remote_assistance_host',
648               'variables': { 'enable_wexit_time_destructors': 1, },
649               'dependencies': [
650                 '../base/base.gyp:base',
651                 'remoting_base',
652                 'remoting_breakpad',
653                 'remoting_host',
654                 'remoting_it2me_host_static',
655                 'remoting_native_messaging_base',
656                 'remoting_protocol',
657               ],
658               'defines': [
659                 'VERSION=<(version_full)',
660               ],
661               'sources': [
662                 'host/it2me/it2me_native_messaging_host_entry_point.cc',
663                 'host/it2me/it2me_native_messaging_host_main.cc',
664                 'host/it2me/it2me_native_messaging_host_main.h',
665               ],
666               'conditions': [
667                 ['OS=="linux" and chromeos==0 and use_ozone==0', {
668                   'dependencies': [
669                     # Always use GTK on Linux, even for Aura builds.
670                     '../build/linux/system.gyp:gtk',
671                   ],
672                 }],
673                 ['OS=="linux" and use_allocator!="none"', {
674                   'dependencies': [
675                     '../base/allocator/allocator.gyp:allocator',
676                   ],
677                 }],
678                 ['OS=="mac"', {
679                   'mac_bundle': 1,
680                   'variables': {
681                     'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
682                   },
683                   'xcode_settings': {
684                     'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
685                     'INFOPLIST_PREPROCESS': 'YES',
686                     'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
687                   },
688                   'mac_bundle_resources': [
689                     '<(PRODUCT_DIR)/icudtl.dat',
690                     'host/disconnect_window.xib',
691                     'host/it2me/remote_assistance_host-Info.plist',
692                     '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
694                     # Localized strings for 'Info.plist'
695                     '<!@pymod_do_main(remoting_localize --locale_output '
696                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
697                     '--print_only <(remoting_locales))',
698                   ],
699                   'mac_bundle_resources!': [
700                     'host/it2me/remote_assistance_host-Info.plist',
701                   ],
702                   'conditions': [
703                     ['mac_breakpad==1', {
704                       'variables': {
705                         # A real .dSYM is needed for dump_syms to operate on.
706                         'mac_real_dsym': 1,
707                       },
708                       'copies': [
709                         {
710                           'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
711                           'files': [
712                             '<(PRODUCT_DIR)/crash_inspector',
713                             '<(PRODUCT_DIR)/crash_report_sender.app'
714                           ],
715                         },
716                       ],
717                       'dependencies': [
718                         '../breakpad/breakpad.gyp:dump_syms',
719                       ],
720                       'postbuilds': [
721                         {
722                           'postbuild_name': 'Dump Symbols',
723                           'variables': {
724                             'dump_product_syms_path':
725                             'scripts/mac/dump_product_syms',
726                           },
727                           'action': [
728                             '<(dump_product_syms_path)',
729                             '<(version_full)',
730                           ],
731                         },  # end of postbuild 'dump_symbols'
732                       ],  # end of 'postbuilds'
733                     }],  # mac_breakpad==1
734                   ],  # conditions
735                 }],  # OS=mac
736               ],  # end of conditions
737             },  # end of target 'remoting_it2me_native_messaging_host'
738           ],  # targets
739         }, {  # chromeos==0
740           'targets': [
741             {
742               # Dummy target for chromeos==1
743               'target_name': 'remoting_it2me_native_messaging_host',
744               'type': 'executable',
745             },
746           ],  # targets
747         }],  # end of chromeos==0
748       ],  # end of conditions
749     }],  # end of OS!="win" and enable_remoting_host==1
750   ],  # end of 'conditions'