Disable PDF tests that are failing after combining PDF plugin into chrome.
[chromium-blink-merge.git] / remoting / remoting_host.gypi
blob59175fe786020e80a220f8945e908d391b788dbd
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             '../components/components.gyp:policy',
50             '../components/components.gyp:policy_component_common',
51             '../crypto/crypto.gyp:crypto',
52             '../google_apis/google_apis.gyp:google_apis',
53             '../ipc/ipc.gyp:ipc',
54             '../ui/events/events.gyp:dom4_keycode_converter',
55           ],
56           'defines': [
57             'HOST_BUNDLE_NAME="<(host_bundle_name)"',
58             'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
59             'VERSION=<(version_full)',
60           ],
61           'sources': [
62             '<@(remoting_host_sources)',
63           ],
64           'conditions': [
65             ['OS=="linux"', {
66               'conditions': [
67                 ['use_x11==1', {
68                   'dependencies': [
69                     '../build/linux/system.gyp:x11',
70                     '../build/linux/system.gyp:xext',
71                     '../build/linux/system.gyp:xfixes',
72                     '../build/linux/system.gyp:xi',
73                     '../build/linux/system.gyp:xrandr',
74                     '../build/linux/system.gyp:xtst',
75                   ],
76                 }],
77                 ['chromeos==0 and use_ozone==0', {
78                   'dependencies': [
79                     # use GTK on Linux, even for Aura builds.
80                     '../build/linux/system.gyp:gtk',
81                   ],
82                 }]
83               ],
84               'link_settings': {
85                 'libraries': [
86                   '-lpam',
87                 ],
88               },
89             }],
90             ['chromeos==1', {
91               'dependencies' : [
92                 '../cc/cc.gyp:cc',
93                 '../content/content.gyp:content',
94                 '../ppapi/ppapi_internal.gyp:ppapi_host',
95                 '../skia/skia.gyp:skia',
96                 '../ui/aura/aura.gyp:aura',
97                 '../ui/compositor/compositor.gyp:compositor',
98                 '../ui/events/events.gyp:events',
99                 '../ui/events/platform/events_platform.gyp:events_platform',
100                 '../ui/views/views.gyp:views',
101               ],
102               'include_dirs': [
103                 '../third_party/skia/include/utils',
104               ],
105               'sources!' : [
106                 'host/clipboard_x11.cc',
107                 'host/continue_window_linux.cc',
108                 'host/disconnect_window_linux.cc',
109                 'host/linux/x_server_clipboard.cc',
110                 'host/linux/x_server_clipboard.h',
111                 'host/local_input_monitor_x11.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/me2me_native_messaging_host.cc',
261             'host/setup/me2me_native_messaging_host.h',
262             'host/setup/oauth_client.cc',
263             'host/setup/oauth_client.h',
264             'host/setup/oauth_helper.cc',
265             'host/setup/oauth_helper.h',
266             'host/setup/pin_validator.cc',
267             'host/setup/pin_validator.h',
268             'host/setup/service_client.cc',
269             'host/setup/service_client.h',
270             'host/setup/test_util.cc',
271             'host/setup/test_util.h',
272             'host/setup/win/auth_code_getter.cc',
273             'host/setup/win/auth_code_getter.h',
274           ],
275           'conditions': [
276             ['OS=="win"', {
277               'dependencies': [
278                 '../google_update/google_update.gyp:google_update',
279                 'remoting_lib_idl',
280               ],
281               # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
282               'msvs_disabled_warnings': [4267, ],
283             }],
284           ],
285         },  # end of target 'remoting_host_setup_base'
287         # Generates native messaging manifest files.
288         {
289           'target_name': 'remoting_native_messaging_manifests',
290           'type': 'none',
291           'conditions': [
292             [ 'OS == "win"', {
293               'variables': {
294                 'me2me_host_path': 'remoting_native_messaging_host.exe',
295                 'it2me_host_path': 'remote_assistance_host.exe',
296               },
297             }],
298             [ 'OS == "mac"', {
299               'variables': {
300                 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
301                 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
302                 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
303                 'me2me_host_path':
304                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
305                 'it2me_host_path':
306                     '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
307               },
308             }],
309             [ 'OS != "mac" and OS != "win"', {
310               'variables': {
311                 'me2me_host_path':
312                     '/opt/google/chrome-remote-desktop/native-messaging-host',
313                 'it2me_host_path':
314                     '/opt/google/chrome-remote-desktop/remote-assistance-host',
315               },
316             }],
317           ],  # conditions
318           'sources': [
319             'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
320             'host/setup/com.google.chrome.remote_desktop.json.jinja2',
321           ],
322           'rules': [{
323             'rule_name': 'generate_manifest',
324             'extension': 'jinja2',
325             'inputs': [
326               '<(remoting_localize_path)',
327               '<(branding_path)',
328             ],
329             'outputs': [
330               '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
331             ],
332             'action': [
333               'python', '<(remoting_localize_path)',
334               '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
335               '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
336               '--variables', '<(branding_path)',
337               '--template', '<(RULE_INPUT_PATH)',
338               '--locale_output', '<@(_outputs)',
339               'en',
340             ],
341           }],
342         },  # end of target 'remoting_native_messaging_manifests'
343         {
344           'target_name': 'remoting_start_host',
345           'type': 'executable',
346           'dependencies': [
347             'remoting_host_setup_base',
348           ],
349           'sources': [
350             'host/setup/host_starter.cc',
351             'host/setup/host_starter.h',
352             'host/setup/start_host.cc',
353           ],
354           'conditions': [
355             ['OS=="linux" and use_allocator!="none"', {
356               'dependencies': [
357                 '../base/allocator/allocator.gyp:allocator',
358               ],
359             }],
360           ],
361         },  # end of target 'remoting_start_host'
362         {
363           'target_name': 'remoting_infoplist_strings',
364           'type': 'none',
365           'dependencies': [
366             'remoting_resources',
367           ],
368           'sources': [
369             'host/remoting_me2me_host-InfoPlist.strings.jinja2',
370             'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
371             'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
372             'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
373             'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
374           ],
375           'rules': [{
376             'rule_name': 'generate_strings',
377             'extension': 'jinja2',
378             'inputs': [
379               '<(remoting_localize_path)',
380             ],
381             'outputs': [
382               '<!@pymod_do_main(remoting_localize --locale_output '
383                   '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
384                   '--print_only <(remoting_locales))',
385             ],
386             'action': [
387               'python', '<(remoting_localize_path)',
388               '--locale_dir', '<(webapp_locale_dir)',
389               '--template', '<(RULE_INPUT_PATH)',
390               '--locale_output',
391               '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
392               '<@(remoting_locales)',
393             ]},
394           ],
395         },  # end of target 'remoting_infoplist_strings'
396       ],  # end of 'targets'
397     }],  # 'enable_remoting_host==1'
399     ['enable_me2me_host==1', {
400       'targets': [
401         {
402           'target_name': 'remoting_me2me_host_static',
403           'type': 'static_library',
404           'variables': { 'enable_wexit_time_destructors': 1, },
405           'dependencies': [
406             '../base/base.gyp:base',
407             '../base/base.gyp:base_i18n',
408             '../net/net.gyp:net',
409             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
410             'remoting_base',
411             'remoting_breakpad',
412             'remoting_host',
413             'remoting_protocol',
414           ],
415           'defines': [
416             'VERSION=<(version_full)',
417           ],
418           'sources': [
419             'host/curtain_mode.h',
420             'host/curtain_mode_linux.cc',
421             'host/curtain_mode_mac.cc',
422             'host/curtain_mode_win.cc',
423             'host/posix/signal_handler.cc',
424             'host/posix/signal_handler.h',
425           ],
426           'conditions': [
427             ['os_posix != 1', {
428               'sources/': [
429                 ['exclude', '^host/posix/'],
430               ],
431             }],
432           ],  # end of 'conditions'
433         },  # end of target 'remoting_me2me_host_static'
434       ] # end of targets
435     }], # end of enable_me2me_host==1
437     ['enable_it2me_host==1', {
438       'targets': [
439         {
440           # GN version: //remoting/host/it2me:common
441           'target_name': 'remoting_it2me_host_static',
442           'type': 'static_library',
443           'variables': { 'enable_wexit_time_destructors': 1, },
444           'dependencies': [
445             '../base/base.gyp:base_i18n',
446             '../components/components.gyp:policy',
447             '../net/net.gyp:net',
448             'remoting_base',
449             'remoting_host',
450             'remoting_infoplist_strings',
451             'remoting_protocol',
452             'remoting_resources',
453           ],
454           'defines': [
455             'VERSION=<(version_full)',
456           ],
457           'sources': [
458             '<@(remoting_it2me_host_static_sources)',
459           ],
460         },  # end of target 'remoting_it2me_host_static'
461       ] # end of targets
462     }], # end of 'enable_it2me_host==1'
464     ['OS!="win" and enable_me2me_host==1', {
465       'targets': [
466         {
467           'target_name': 'remoting_me2me_host',
468           'type': 'executable',
469           'variables': { 'enable_wexit_time_destructors': 1, },
470           'dependencies': [
471             '../base/base.gyp:base',
472             '../base/base.gyp:base_i18n',
473             '<(icu_gyp_path):icudata',
474             '../net/net.gyp:net',
475             '../third_party/webrtc/modules/modules.gyp:desktop_capture',
476             'remoting_base',
477             'remoting_breakpad',
478             'remoting_host',
479             'remoting_infoplist_strings',
480             'remoting_me2me_host_static',
481             'remoting_protocol',
482           ],
483           'defines': [
484             'VERSION=<(version_full)',
485           ],
486           'sources': [
487             'host/host_main.cc',
488             'host/host_main.h',
489           ],
490           'conditions': [
491             ['OS=="mac"', {
492               'mac_bundle': 1,
493               'variables': {
494                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
495               },
496               'xcode_settings': {
497                 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
498                 'INFOPLIST_PREPROCESS': 'YES',
499                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
500               },
501               'mac_bundle_resources': [
502                 '<(PRODUCT_DIR)/icudtl.dat',
503                 'host/disconnect_window.xib',
504                 'host/remoting_me2me_host.icns',
505                 'host/remoting_me2me_host-Info.plist',
506                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
508                 # Localized strings for 'Info.plist'
509                 '<!@pymod_do_main(remoting_localize --locale_output '
510                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
511                     '--print_only <(remoting_locales))',
512               ],
513               'mac_bundle_resources!': [
514                 'host/remoting_me2me_host-Info.plist',
515               ],
516               'conditions': [
517                 ['mac_breakpad==1', {
518                   'variables': {
519                     # A real .dSYM is needed for dump_syms to operate on.
520                     'mac_real_dsym': 1,
521                   },
522                   'copies': [
523                     {
524                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
525                       'files': [
526                         '<(PRODUCT_DIR)/crash_inspector',
527                         '<(PRODUCT_DIR)/crash_report_sender.app'
528                       ],
529                     },
530                   ],
531                   'dependencies': [
532                     '../breakpad/breakpad.gyp:dump_syms',
533                   ],
534                   'postbuilds': [
535                     {
536                       'postbuild_name': 'Dump Symbols',
537                       'variables': {
538                         'dump_product_syms_path':
539                             'scripts/mac/dump_product_syms',
540                       },
541                       'action': [
542                         '<(dump_product_syms_path)',
543                         '<(version_full)',
544                       ],
545                     },  # end of postbuild 'dump_symbols'
546                   ],  # end of 'postbuilds'
547                 }],  # mac_breakpad==1
548               ],  # conditions
549             }],  # OS=mac
550             ['OS=="linux" and use_allocator!="none"', {
551               'dependencies': [
552                 '../base/allocator/allocator.gyp:allocator',
553               ],
554             }],  # OS=linux
555           ],  # end of 'conditions'
556         },  # end of target 'remoting_me2me_host'
557         {
558           'target_name': 'remoting_me2me_native_messaging_host',
559           'type': 'executable',
560           'product_name': 'native_messaging_host',
561           'variables': { 'enable_wexit_time_destructors': 1, },
562           'dependencies': [
563             '../base/base.gyp:base',
564             'remoting_breakpad',
565             'remoting_host',
566             'remoting_host_setup_base',
567             'remoting_infoplist_strings',
568             'remoting_native_messaging_base',
569           ],
570           'defines': [
571             'VERSION=<(version_full)',
572           ],
573           'sources': [
574             'host/setup/me2me_native_messaging_host_entry_point.cc',
575             'host/setup/me2me_native_messaging_host_main.cc',
576             'host/setup/me2me_native_messaging_host_main.h',
577           ],
578           'conditions': [
579             ['OS=="linux" and use_allocator!="none"', {
580               'dependencies': [
581                 '../base/allocator/allocator.gyp:allocator',
582               ],
583             }],
584             ['OS=="mac"', {
585               'mac_bundle': 1,
586               'variables': {
587                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
588               },
589               'xcode_settings': {
590                 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
591                 'INFOPLIST_PREPROCESS': 'YES',
592                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
593               },
594               'mac_bundle_resources': [
595                 'host/setup/native_messaging_host-Info.plist',
596                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
598                 # Localized strings for 'Info.plist'
599                 '<!@pymod_do_main(remoting_localize --locale_output '
600                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
601                     '--print_only <(remoting_locales))',
602               ],
603               'mac_bundle_resources!': [
604                 'host/setup/native_messaging_host-Info.plist',
605               ],
606               'conditions': [
607                 ['mac_breakpad==1', {
608                   'variables': {
609                     # A real .dSYM is needed for dump_syms to operate on.
610                     'mac_real_dsym': 1,
611                   },
612                   'copies': [
613                     {
614                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
615                       'files': [
616                         '<(PRODUCT_DIR)/crash_inspector',
617                         '<(PRODUCT_DIR)/crash_report_sender.app'
618                       ],
619                     },
620                   ],
621                   'dependencies': [
622                     '../breakpad/breakpad.gyp:dump_syms',
623                   ],
624                   'postbuilds': [
625                     {
626                       'postbuild_name': 'Dump Symbols',
627                       'variables': {
628                         'dump_product_syms_path':
629                             'scripts/mac/dump_product_syms',
630                       },
631                       'action': [
632                         '<(dump_product_syms_path)',
633                         '<(version_full)',
634                       ],
635                     },  # end of postbuild 'dump_symbols'
636                   ],  # end of 'postbuilds'
637                 }],  # mac_breakpad==1
638               ],  # conditions
639             }],  # OS=mac
640           ],
641         },  # end of target 'remoting_me2me_native_messaging_host'
642       ], # targets
643     }], # end of OS!="win" and enable_me2me_host==1
645     ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
646       'targets': [
647         {
648           'target_name': 'remoting_it2me_native_messaging_host',
649           'type': 'executable',
650           'product_name': 'remote_assistance_host',
651           'variables': { 'enable_wexit_time_destructors': 1, },
652           'dependencies': [
653             '../base/base.gyp:base',
654             'remoting_base',
655             'remoting_breakpad',
656             'remoting_host',
657             'remoting_it2me_host_static',
658             'remoting_native_messaging_base',
659             'remoting_protocol',
660           ],
661           'defines': [
662             'VERSION=<(version_full)',
663           ],
664           'sources': [
665             'host/it2me/it2me_native_messaging_host_entry_point.cc',
666             'host/it2me/it2me_native_messaging_host_main.cc',
667             'host/it2me/it2me_native_messaging_host_main.h',
668           ],
669           'conditions': [
670             ['OS=="linux" and chromeos==0 and use_ozone==0', {
671               'dependencies': [
672                 # Always use GTK on Linux, even for Aura builds.
673                 '../build/linux/system.gyp:gtk',
674               ],
675             }],
676             ['OS=="linux" and use_allocator!="none"', {
677               'dependencies': [
678                 '../base/allocator/allocator.gyp:allocator',
679               ],
680             }],
681             ['OS=="mac"', {
682               'mac_bundle': 1,
683               'variables': {
684                  'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
685               },
686               'xcode_settings': {
687                 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
688                 'INFOPLIST_PREPROCESS': 'YES',
689                 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
690               },
691               'mac_bundle_resources': [
692                 '<(PRODUCT_DIR)/icudtl.dat',
693                 'host/disconnect_window.xib',
694                 'host/it2me/remote_assistance_host-Info.plist',
695                 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
697                 # Localized strings for 'Info.plist'
698                 '<!@pymod_do_main(remoting_localize --locale_output '
699                     '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
700                     '--print_only <(remoting_locales))',
701               ],
702               'mac_bundle_resources!': [
703                 'host/it2me/remote_assistance_host-Info.plist',
704               ],
705               'conditions': [
706                 ['mac_breakpad==1', {
707                   'variables': {
708                     # A real .dSYM is needed for dump_syms to operate on.
709                     'mac_real_dsym': 1,
710                   },
711                   'copies': [
712                     {
713                       'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
714                       'files': [
715                         '<(PRODUCT_DIR)/crash_inspector',
716                         '<(PRODUCT_DIR)/crash_report_sender.app'
717                       ],
718                     },
719                   ],
720                   'dependencies': [
721                     '../breakpad/breakpad.gyp:dump_syms',
722                   ],
723                   'postbuilds': [
724                     {
725                       'postbuild_name': 'Dump Symbols',
726                       'variables': {
727                         'dump_product_syms_path':
728                             'scripts/mac/dump_product_syms',
729                       },
730                       'action': [
731                         '<(dump_product_syms_path)',
732                         '<(version_full)',
733                       ],
734                     },  # end of postbuild 'dump_symbols'
735                   ],  # end of 'postbuilds'
736                 }],  # mac_breakpad==1
737               ],  # conditions
738             }],  # OS=mac
739           ],
740         },  # end of target 'remoting_it2me_native_messaging_host'
741       ],  # end of 'targets'
742     }],  # # end of OS!="win" and enable_it2me_host==1
744   ],  # end of 'conditions'