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