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.
7 'remoting_host_linux.gypi',
8 'remoting_host_mac.gypi',
9 'remoting_host_win.gypi',
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,
20 'enable_me2me_host': 0,
21 'enable_it2me_host': 0,
22 'enable_remoting_host': 0,
24 ['chromeos==1 and use_x11==1', {
25 'enable_me2me_host': 0,
26 'enable_it2me_host': 1,
32 ['enable_remoting_host==1', {
35 # GN version: //remoting/host
36 'target_name': 'remoting_host',
37 'type': 'static_library',
39 'enable_wexit_time_destructors': 1,
40 'host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
41 'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
47 '../base/base.gyp:base_i18n',
48 '../crypto/crypto.gyp:crypto',
49 '../google_apis/google_apis.gyp:google_apis',
51 '../ui/events/events.gyp:dom4_keycode_converter',
54 'HOST_BUNDLE_NAME="<(host_bundle_name)"',
55 'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
56 'VERSION=<(version_full)',
59 '<@(remoting_host_sources)',
64 '../build/linux/system.gyp:x11',
65 '../build/linux/system.gyp:xext',
66 '../build/linux/system.gyp:xfixes',
67 '../build/linux/system.gyp:xi',
68 '../build/linux/system.gyp:xrandr',
69 '../build/linux/system.gyp:xtst',
77 ['OS=="linux" and chromeos==0 and use_ozone==0', {
79 # Always use GTK on Linux, even for Aura builds.
80 '../build/linux/system.gyp:gtk',
86 '../components/components.gyp:policy_component_common',
87 '../content/content.gyp:content',
88 '../ppapi/ppapi_internal.gyp:ppapi_host',
89 '../skia/skia.gyp:skia',
90 '../ui/aura/aura.gyp:aura',
91 '../ui/compositor/compositor.gyp:compositor',
92 '../ui/events/events.gyp:events',
93 '../ui/views/views.gyp:views',
96 '../third_party/skia/include/utils',
99 'host/clipboard_x11.cc',
100 'host/continue_window_linux.cc',
101 'host/disconnect_window_linux.cc',
102 'host/policy_hack/policy_watcher_linux.cc',
103 'host/remoting_me2me_host.cc',
107 'host/chromeos/aura_desktop_capturer.cc',
108 'host/chromeos/aura_desktop_capturer.h',
109 'host/chromeos/message_box.cc',
110 'host/chromeos/message_box.h',
111 'host/clipboard_aura.cc',
112 'host/clipboard_aura.h',
113 'host/continue_window_chromeos.cc',
114 'host/disconnect_window_chromeos.cc',
115 'host/policy_hack/policy_watcher_chromeos.cc',
120 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
124 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
131 '_ATL_NO_EXCEPTIONS',
132 'ISOLATION_AWARE_ENABLED=1',
135 '../sandbox/sandbox.gyp:sandbox',
136 'remoting_host_messages',
140 'VCCLCompilerTool': {
141 # /MP conflicts with #import directive so we limit the number
142 # of processes to spawn to 1.
143 'AdditionalOptions': ['/MP1'],
147 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
150 '<(output_dir)/remoting_host_messages.mc',
155 'direct_dependent_settings': {
161 # Rule to run the message compiler.
162 'rule_name': 'message_compiler',
165 '<(output_dir)/<(RULE_INPUT_ROOT).h',
166 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
170 '-h', '<(output_dir)',
171 '-r', '<(output_dir)/.',
173 '<(RULE_INPUT_PATH)',
175 'process_outputs_as_sources': 1,
176 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
181 '../ash/ash.gyp:ash',
184 ['enable_webrtc==1', {
186 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
187 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
190 '<@(remoting_cast_sources)',
194 }, # end of target 'remoting_host'
197 'target_name': 'remoting_native_messaging_base',
198 'type': 'static_library',
199 'variables': { 'enable_wexit_time_destructors': 1, },
201 '../base/base.gyp:base',
204 'host/native_messaging/pipe_messaging_channel.cc',
205 'host/native_messaging/pipe_messaging_channel.h',
206 'host/native_messaging/native_messaging_pipe.cc',
207 'host/native_messaging/native_messaging_pipe.h',
208 'host/native_messaging/native_messaging_reader.cc',
209 'host/native_messaging/native_messaging_reader.h',
210 'host/native_messaging/native_messaging_writer.cc',
211 'host/native_messaging/native_messaging_writer.h',
213 }, # end of target 'remoting_native_messaging_base'
216 'target_name': 'remoting_host_setup_base',
217 'type': 'static_library',
218 'variables': { 'enable_wexit_time_destructors': 1, },
220 '../base/base.gyp:base',
221 '../google_apis/google_apis.gyp:google_apis',
225 'VERSION=<(version_full)',
228 'host/setup/daemon_controller.cc',
229 'host/setup/daemon_controller.h',
230 'host/setup/daemon_controller_delegate_linux.cc',
231 'host/setup/daemon_controller_delegate_linux.h',
232 'host/setup/daemon_controller_delegate_mac.h',
233 'host/setup/daemon_controller_delegate_mac.mm',
234 'host/setup/daemon_controller_delegate_win.cc',
235 'host/setup/daemon_controller_delegate_win.h',
236 'host/setup/daemon_installer_win.cc',
237 'host/setup/daemon_installer_win.h',
238 'host/setup/me2me_native_messaging_host.cc',
239 'host/setup/me2me_native_messaging_host.h',
240 'host/setup/oauth_client.cc',
241 'host/setup/oauth_client.h',
242 'host/setup/oauth_helper.cc',
243 'host/setup/oauth_helper.h',
244 'host/setup/pin_validator.cc',
245 'host/setup/pin_validator.h',
246 'host/setup/service_client.cc',
247 'host/setup/service_client.h',
248 'host/setup/test_util.cc',
249 'host/setup/test_util.h',
250 'host/setup/win/auth_code_getter.cc',
251 'host/setup/win/auth_code_getter.h',
256 '../google_update/google_update.gyp:google_update',
259 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
260 'msvs_disabled_warnings': [4267, ],
263 }, # end of target 'remoting_host_setup_base'
265 # Generates native messaging manifest files.
267 'target_name': 'remoting_native_messaging_manifests',
272 'me2me_host_path': 'remoting_native_messaging_host.exe',
273 'it2me_host_path': 'remote_assistance_host.exe',
278 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
279 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
280 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
282 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
284 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
287 [ 'OS != "mac" and OS != "win"', {
290 '/opt/google/chrome-remote-desktop/native-messaging-host',
292 '/opt/google/chrome-remote-desktop/remote-assistance-host',
297 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
298 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
301 'rule_name': 'generate_manifest',
302 'extension': 'jinja2',
304 '<(remoting_localize_path)',
308 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
311 'python', '<(remoting_localize_path)',
312 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
313 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
314 '--variables', '<(branding_path)',
315 '--template', '<(RULE_INPUT_PATH)',
316 '--locale_output', '<@(_outputs)',
320 }, # end of target 'remoting_native_messaging_manifests'
322 'target_name': 'remoting_start_host',
323 'type': 'executable',
325 'remoting_host_setup_base',
328 'host/setup/host_starter.cc',
329 'host/setup/host_starter.h',
330 'host/setup/start_host.cc',
333 ['OS=="linux" and use_allocator!="none"', {
335 '../base/allocator/allocator.gyp:allocator',
339 }, # end of target 'remoting_start_host'
341 'target_name': 'remoting_infoplist_strings',
344 'remoting_resources',
347 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
348 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
349 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
350 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
351 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
354 'rule_name': 'generate_strings',
355 'extension': 'jinja2',
357 '<(remoting_localize_path)',
360 '<!@pymod_do_main(remoting_localize --locale_output '
361 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
362 '--print_only <(remoting_locales))',
365 'python', '<(remoting_localize_path)',
366 '--locale_dir', '<(webapp_locale_dir)',
367 '--template', '<(RULE_INPUT_PATH)',
369 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
370 '<@(remoting_locales)',
373 }, # end of target 'remoting_infoplist_strings'
374 ], # end of 'targets'
375 }], # 'enable_remoting_host==1'
377 ['enable_me2me_host==1', {
380 'target_name': 'remoting_me2me_host_static',
381 'type': 'static_library',
382 'variables': { 'enable_wexit_time_destructors': 1, },
384 '../base/base.gyp:base',
385 '../base/base.gyp:base_i18n',
386 '../net/net.gyp:net',
387 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
394 'VERSION=<(version_full)',
397 'host/curtain_mode.h',
398 'host/curtain_mode_linux.cc',
399 'host/curtain_mode_mac.cc',
400 'host/curtain_mode_win.cc',
401 'host/posix/signal_handler.cc',
402 'host/posix/signal_handler.h',
407 ['exclude', '^host/posix/'],
410 ], # end of 'conditions'
411 }, # end of target 'remoting_me2me_host_static'
413 }], # end of enable_me2me_host==1
415 ['enable_it2me_host==1', {
418 # GN version: //remoting/host/it2me:common
419 'target_name': 'remoting_it2me_host_static',
420 'type': 'static_library',
421 'variables': { 'enable_wexit_time_destructors': 1, },
423 '../base/base.gyp:base_i18n',
424 '../net/net.gyp:net',
427 'remoting_infoplist_strings',
429 'remoting_resources',
432 'VERSION=<(version_full)',
435 '<@(remoting_it2me_host_static_sources)',
437 }, # end of target 'remoting_it2me_host_static'
439 }], # end of 'enable_it2me_host==1'
441 ['OS!="win" and enable_me2me_host==1', {
444 'target_name': 'remoting_me2me_host',
445 'type': 'executable',
446 'variables': { 'enable_wexit_time_destructors': 1, },
448 '../base/base.gyp:base',
449 '../base/base.gyp:base_i18n',
450 '<(icu_gyp_path):icudata',
451 '../net/net.gyp:net',
452 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
456 'remoting_infoplist_strings',
457 'remoting_me2me_host_static',
461 'VERSION=<(version_full)',
471 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
474 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
475 'INFOPLIST_PREPROCESS': 'YES',
476 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
478 'mac_bundle_resources': [
479 '<(PRODUCT_DIR)/icudtl.dat',
480 'host/disconnect_window.xib',
481 'host/remoting_me2me_host.icns',
482 'host/remoting_me2me_host-Info.plist',
483 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
485 # Localized strings for 'Info.plist'
486 '<!@pymod_do_main(remoting_localize --locale_output '
487 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
488 '--print_only <(remoting_locales))',
490 'mac_bundle_resources!': [
491 'host/remoting_me2me_host-Info.plist',
494 ['mac_breakpad==1', {
496 # A real .dSYM is needed for dump_syms to operate on.
501 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
503 '<(PRODUCT_DIR)/crash_inspector',
504 '<(PRODUCT_DIR)/crash_report_sender.app'
509 '../breakpad/breakpad.gyp:dump_syms',
513 'postbuild_name': 'Dump Symbols',
515 'dump_product_syms_path':
516 'scripts/mac/dump_product_syms',
519 '<(dump_product_syms_path)',
522 }, # end of postbuild 'dump_symbols'
523 ], # end of 'postbuilds'
524 }], # mac_breakpad==1
527 ['OS=="linux" and use_allocator!="none"', {
529 '../base/allocator/allocator.gyp:allocator',
532 ], # end of 'conditions'
533 }, # end of target 'remoting_me2me_host'
535 'target_name': 'remoting_me2me_native_messaging_host',
536 'type': 'executable',
537 'product_name': 'native_messaging_host',
538 'variables': { 'enable_wexit_time_destructors': 1, },
540 '../base/base.gyp:base',
543 'remoting_host_setup_base',
544 'remoting_infoplist_strings',
545 'remoting_native_messaging_base',
548 'VERSION=<(version_full)',
551 'host/setup/me2me_native_messaging_host_entry_point.cc',
552 'host/setup/me2me_native_messaging_host_main.cc',
553 'host/setup/me2me_native_messaging_host_main.h',
556 ['OS=="linux" and use_allocator!="none"', {
558 '../base/allocator/allocator.gyp:allocator',
564 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
567 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
568 'INFOPLIST_PREPROCESS': 'YES',
569 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
571 'mac_bundle_resources': [
572 'host/setup/native_messaging_host-Info.plist',
573 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
575 # Localized strings for 'Info.plist'
576 '<!@pymod_do_main(remoting_localize --locale_output '
577 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
578 '--print_only <(remoting_locales))',
580 'mac_bundle_resources!': [
581 'host/setup/native_messaging_host-Info.plist',
584 ['mac_breakpad==1', {
586 # A real .dSYM is needed for dump_syms to operate on.
591 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
593 '<(PRODUCT_DIR)/crash_inspector',
594 '<(PRODUCT_DIR)/crash_report_sender.app'
599 '../breakpad/breakpad.gyp:dump_syms',
603 'postbuild_name': 'Dump Symbols',
605 'dump_product_syms_path':
606 'scripts/mac/dump_product_syms',
609 '<(dump_product_syms_path)',
612 }, # end of postbuild 'dump_symbols'
613 ], # end of 'postbuilds'
614 }], # mac_breakpad==1
618 }, # end of target 'remoting_me2me_native_messaging_host'
620 }], # end of OS!="win" and enable_me2me_host==1
622 ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
625 'target_name': 'remoting_it2me_native_messaging_host',
626 'type': 'executable',
627 'product_name': 'remote_assistance_host',
628 'variables': { 'enable_wexit_time_destructors': 1, },
630 '../base/base.gyp:base',
634 'remoting_it2me_host_static',
635 'remoting_native_messaging_base',
639 'VERSION=<(version_full)',
642 'host/it2me/it2me_native_messaging_host_entry_point.cc',
643 'host/it2me/it2me_native_messaging_host_main.cc',
644 'host/it2me/it2me_native_messaging_host_main.h',
647 ['OS=="linux" and chromeos==0 and use_ozone==0', {
649 # Always use GTK on Linux, even for Aura builds.
650 '../build/linux/system.gyp:gtk',
653 ['OS=="linux" and use_allocator!="none"', {
655 '../base/allocator/allocator.gyp:allocator',
661 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
664 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
665 'INFOPLIST_PREPROCESS': 'YES',
666 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
668 'mac_bundle_resources': [
669 '<(PRODUCT_DIR)/icudtl.dat',
670 'host/disconnect_window.xib',
671 'host/it2me/remote_assistance_host-Info.plist',
672 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
674 # Localized strings for 'Info.plist'
675 '<!@pymod_do_main(remoting_localize --locale_output '
676 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
677 '--print_only <(remoting_locales))',
679 'mac_bundle_resources!': [
680 'host/it2me/remote_assistance_host-Info.plist',
683 ['mac_breakpad==1', {
685 # A real .dSYM is needed for dump_syms to operate on.
690 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
692 '<(PRODUCT_DIR)/crash_inspector',
693 '<(PRODUCT_DIR)/crash_report_sender.app'
698 '../breakpad/breakpad.gyp:dump_syms',
702 'postbuild_name': 'Dump Symbols',
704 'dump_product_syms_path':
705 'scripts/mac/dump_product_syms',
708 '<(dump_product_syms_path)',
711 }, # end of postbuild 'dump_symbols'
712 ], # end of 'postbuilds'
713 }], # mac_breakpad==1
717 }, # end of target 'remoting_it2me_native_messaging_host'
718 ], # end of 'targets'
719 }], # # end of OS!="win" and enable_it2me_host==1
721 ], # end of 'conditions'