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,
25 'enable_remoting_host': 1,
26 'enable_me2me_host': 0,
27 'enable_it2me_host': 1,
33 ['enable_remoting_host==1', {
36 # GN version: //remoting/host
37 'target_name': 'remoting_host',
38 'type': 'static_library',
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@")',
48 '../base/base.gyp:base_i18n',
49 '../crypto/crypto.gyp:crypto',
50 '../google_apis/google_apis.gyp:google_apis',
52 '../ui/events/events.gyp:dom4_keycode_converter',
55 'HOST_BUNDLE_NAME="<(host_bundle_name)"',
56 'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
57 'VERSION=<(version_full)',
60 '<@(remoting_host_sources)',
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',
75 ['chromeos==0 and use_ozone==0', {
77 # use GTK on Linux, even for Aura builds.
78 '../build/linux/system.gyp:gtk',
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',
102 '../third_party/skia/include/utils',
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/policy_hack/policy_watcher_linux.cc',
111 'host/remoting_me2me_host.cc',
116 'host/input_injector_chromeos.cc',
117 'host/input_injector_chromeos.h',
118 'host/local_input_monitor_chromeos.cc',
119 'host/chromeos/mouse_cursor_monitor_aura.cc',
120 'host/chromeos/mouse_cursor_monitor_aura.h',
127 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
131 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
138 '_ATL_NO_EXCEPTIONS',
139 'ISOLATION_AWARE_ENABLED=1',
142 '../sandbox/sandbox.gyp:sandbox',
143 'remoting_host_messages',
147 'VCCLCompilerTool': {
148 # /MP conflicts with #import directive so we limit the number
149 # of processes to spawn to 1.
150 'AdditionalOptions': ['/MP1'],
154 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
157 '<(output_dir)/remoting_host_messages.mc',
162 'direct_dependent_settings': {
168 # Rule to run the message compiler.
169 'rule_name': 'message_compiler',
172 '<(output_dir)/<(RULE_INPUT_ROOT).h',
173 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
177 '-h', '<(output_dir)',
178 '-r', '<(output_dir)/.',
180 '<(RULE_INPUT_PATH)',
182 'process_outputs_as_sources': 1,
183 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
188 '../ash/ash.gyp:ash',
191 ['enable_webrtc==1', {
193 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
194 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
197 '<@(remoting_cast_sources)',
201 }, # end of target 'remoting_host'
204 'target_name': 'remoting_native_messaging_base',
205 'type': 'static_library',
206 'variables': { 'enable_wexit_time_destructors': 1, },
208 '../base/base.gyp:base',
211 'host/native_messaging/pipe_messaging_channel.cc',
212 'host/native_messaging/pipe_messaging_channel.h',
213 'host/native_messaging/native_messaging_pipe.cc',
214 'host/native_messaging/native_messaging_pipe.h',
215 'host/native_messaging/native_messaging_reader.cc',
216 'host/native_messaging/native_messaging_reader.h',
217 'host/native_messaging/native_messaging_writer.cc',
218 'host/native_messaging/native_messaging_writer.h',
220 }, # end of target 'remoting_native_messaging_base'
223 'target_name': 'remoting_host_setup_base',
224 'type': 'static_library',
225 'variables': { 'enable_wexit_time_destructors': 1, },
227 '../base/base.gyp:base',
228 '../google_apis/google_apis.gyp:google_apis',
232 'VERSION=<(version_full)',
235 'host/setup/daemon_controller.cc',
236 'host/setup/daemon_controller.h',
237 'host/setup/daemon_controller_delegate_linux.cc',
238 'host/setup/daemon_controller_delegate_linux.h',
239 'host/setup/daemon_controller_delegate_mac.h',
240 'host/setup/daemon_controller_delegate_mac.mm',
241 'host/setup/daemon_controller_delegate_win.cc',
242 'host/setup/daemon_controller_delegate_win.h',
243 'host/setup/daemon_installer_win.cc',
244 'host/setup/daemon_installer_win.h',
245 'host/setup/me2me_native_messaging_host.cc',
246 'host/setup/me2me_native_messaging_host.h',
247 'host/setup/oauth_client.cc',
248 'host/setup/oauth_client.h',
249 'host/setup/oauth_helper.cc',
250 'host/setup/oauth_helper.h',
251 'host/setup/pin_validator.cc',
252 'host/setup/pin_validator.h',
253 'host/setup/service_client.cc',
254 'host/setup/service_client.h',
255 'host/setup/test_util.cc',
256 'host/setup/test_util.h',
257 'host/setup/win/auth_code_getter.cc',
258 'host/setup/win/auth_code_getter.h',
263 '../google_update/google_update.gyp:google_update',
266 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
267 'msvs_disabled_warnings': [4267, ],
270 }, # end of target 'remoting_host_setup_base'
272 # Generates native messaging manifest files.
274 'target_name': 'remoting_native_messaging_manifests',
279 'me2me_host_path': 'remoting_native_messaging_host.exe',
280 'it2me_host_path': 'remote_assistance_host.exe',
285 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
286 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
287 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
289 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
291 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
294 [ 'OS != "mac" and OS != "win"', {
297 '/opt/google/chrome-remote-desktop/native-messaging-host',
299 '/opt/google/chrome-remote-desktop/remote-assistance-host',
304 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
305 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
308 'rule_name': 'generate_manifest',
309 'extension': 'jinja2',
311 '<(remoting_localize_path)',
315 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
318 'python', '<(remoting_localize_path)',
319 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
320 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
321 '--variables', '<(branding_path)',
322 '--template', '<(RULE_INPUT_PATH)',
323 '--locale_output', '<@(_outputs)',
327 }, # end of target 'remoting_native_messaging_manifests'
329 'target_name': 'remoting_start_host',
330 'type': 'executable',
332 'remoting_host_setup_base',
335 'host/setup/host_starter.cc',
336 'host/setup/host_starter.h',
337 'host/setup/start_host.cc',
340 ['OS=="linux" and use_allocator!="none"', {
342 '../base/allocator/allocator.gyp:allocator',
346 }, # end of target 'remoting_start_host'
348 'target_name': 'remoting_infoplist_strings',
351 'remoting_resources',
354 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
355 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
356 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
357 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
358 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
361 'rule_name': 'generate_strings',
362 'extension': 'jinja2',
364 '<(remoting_localize_path)',
367 '<!@pymod_do_main(remoting_localize --locale_output '
368 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
369 '--print_only <(remoting_locales))',
372 'python', '<(remoting_localize_path)',
373 '--locale_dir', '<(webapp_locale_dir)',
374 '--template', '<(RULE_INPUT_PATH)',
376 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
377 '<@(remoting_locales)',
380 }, # end of target 'remoting_infoplist_strings'
381 ], # end of 'targets'
382 }], # 'enable_remoting_host==1'
384 ['enable_me2me_host==1', {
387 'target_name': 'remoting_me2me_host_static',
388 'type': 'static_library',
389 'variables': { 'enable_wexit_time_destructors': 1, },
391 '../base/base.gyp:base',
392 '../base/base.gyp:base_i18n',
393 '../net/net.gyp:net',
394 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
401 'VERSION=<(version_full)',
404 'host/curtain_mode.h',
405 'host/curtain_mode_linux.cc',
406 'host/curtain_mode_mac.cc',
407 'host/curtain_mode_win.cc',
408 'host/posix/signal_handler.cc',
409 'host/posix/signal_handler.h',
414 ['exclude', '^host/posix/'],
417 ], # end of 'conditions'
418 }, # end of target 'remoting_me2me_host_static'
420 }], # end of enable_me2me_host==1
422 ['enable_it2me_host==1', {
425 # GN version: //remoting/host/it2me:common
426 'target_name': 'remoting_it2me_host_static',
427 'type': 'static_library',
428 'variables': { 'enable_wexit_time_destructors': 1, },
430 '../base/base.gyp:base_i18n',
431 '../net/net.gyp:net',
434 'remoting_infoplist_strings',
436 'remoting_resources',
439 'VERSION=<(version_full)',
442 '<@(remoting_it2me_host_static_sources)',
444 }, # end of target 'remoting_it2me_host_static'
446 }], # end of 'enable_it2me_host==1'
448 ['OS!="win" and enable_me2me_host==1', {
451 'target_name': 'remoting_me2me_host',
452 'type': 'executable',
453 'variables': { 'enable_wexit_time_destructors': 1, },
455 '../base/base.gyp:base',
456 '../base/base.gyp:base_i18n',
457 '<(icu_gyp_path):icudata',
458 '../net/net.gyp:net',
459 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
463 'remoting_infoplist_strings',
464 'remoting_me2me_host_static',
468 'VERSION=<(version_full)',
478 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
481 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
482 'INFOPLIST_PREPROCESS': 'YES',
483 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
485 'mac_bundle_resources': [
486 '<(PRODUCT_DIR)/icudtl.dat',
487 'host/disconnect_window.xib',
488 'host/remoting_me2me_host.icns',
489 'host/remoting_me2me_host-Info.plist',
490 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
492 # Localized strings for 'Info.plist'
493 '<!@pymod_do_main(remoting_localize --locale_output '
494 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
495 '--print_only <(remoting_locales))',
497 'mac_bundle_resources!': [
498 'host/remoting_me2me_host-Info.plist',
501 ['mac_breakpad==1', {
503 # A real .dSYM is needed for dump_syms to operate on.
508 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
510 '<(PRODUCT_DIR)/crash_inspector',
511 '<(PRODUCT_DIR)/crash_report_sender.app'
516 '../breakpad/breakpad.gyp:dump_syms',
520 'postbuild_name': 'Dump Symbols',
522 'dump_product_syms_path':
523 'scripts/mac/dump_product_syms',
526 '<(dump_product_syms_path)',
529 }, # end of postbuild 'dump_symbols'
530 ], # end of 'postbuilds'
531 }], # mac_breakpad==1
534 ['OS=="linux" and use_allocator!="none"', {
536 '../base/allocator/allocator.gyp:allocator',
539 ], # end of 'conditions'
540 }, # end of target 'remoting_me2me_host'
542 'target_name': 'remoting_me2me_native_messaging_host',
543 'type': 'executable',
544 'product_name': 'native_messaging_host',
545 'variables': { 'enable_wexit_time_destructors': 1, },
547 '../base/base.gyp:base',
550 'remoting_host_setup_base',
551 'remoting_infoplist_strings',
552 'remoting_native_messaging_base',
555 'VERSION=<(version_full)',
558 'host/setup/me2me_native_messaging_host_entry_point.cc',
559 'host/setup/me2me_native_messaging_host_main.cc',
560 'host/setup/me2me_native_messaging_host_main.h',
563 ['OS=="linux" and use_allocator!="none"', {
565 '../base/allocator/allocator.gyp:allocator',
571 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
574 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
575 'INFOPLIST_PREPROCESS': 'YES',
576 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
578 'mac_bundle_resources': [
579 'host/setup/native_messaging_host-Info.plist',
580 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
582 # Localized strings for 'Info.plist'
583 '<!@pymod_do_main(remoting_localize --locale_output '
584 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
585 '--print_only <(remoting_locales))',
587 'mac_bundle_resources!': [
588 'host/setup/native_messaging_host-Info.plist',
591 ['mac_breakpad==1', {
593 # A real .dSYM is needed for dump_syms to operate on.
598 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
600 '<(PRODUCT_DIR)/crash_inspector',
601 '<(PRODUCT_DIR)/crash_report_sender.app'
606 '../breakpad/breakpad.gyp:dump_syms',
610 'postbuild_name': 'Dump Symbols',
612 'dump_product_syms_path':
613 'scripts/mac/dump_product_syms',
616 '<(dump_product_syms_path)',
619 }, # end of postbuild 'dump_symbols'
620 ], # end of 'postbuilds'
621 }], # mac_breakpad==1
625 }, # end of target 'remoting_me2me_native_messaging_host'
627 }], # end of OS!="win" and enable_me2me_host==1
629 ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
632 'target_name': 'remoting_it2me_native_messaging_host',
633 'type': 'executable',
634 'product_name': 'remote_assistance_host',
635 'variables': { 'enable_wexit_time_destructors': 1, },
637 '../base/base.gyp:base',
641 'remoting_it2me_host_static',
642 'remoting_native_messaging_base',
646 'VERSION=<(version_full)',
649 'host/it2me/it2me_native_messaging_host_entry_point.cc',
650 'host/it2me/it2me_native_messaging_host_main.cc',
651 'host/it2me/it2me_native_messaging_host_main.h',
654 ['OS=="linux" and chromeos==0 and use_ozone==0', {
656 # Always use GTK on Linux, even for Aura builds.
657 '../build/linux/system.gyp:gtk',
660 ['OS=="linux" and use_allocator!="none"', {
662 '../base/allocator/allocator.gyp:allocator',
668 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
671 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
672 'INFOPLIST_PREPROCESS': 'YES',
673 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
675 'mac_bundle_resources': [
676 '<(PRODUCT_DIR)/icudtl.dat',
677 'host/disconnect_window.xib',
678 'host/it2me/remote_assistance_host-Info.plist',
679 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
681 # Localized strings for 'Info.plist'
682 '<!@pymod_do_main(remoting_localize --locale_output '
683 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
684 '--print_only <(remoting_locales))',
686 'mac_bundle_resources!': [
687 'host/it2me/remote_assistance_host-Info.plist',
690 ['mac_breakpad==1', {
692 # A real .dSYM is needed for dump_syms to operate on.
697 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
699 '<(PRODUCT_DIR)/crash_inspector',
700 '<(PRODUCT_DIR)/crash_report_sender.app'
705 '../breakpad/breakpad.gyp:dump_syms',
709 'postbuild_name': 'Dump Symbols',
711 'dump_product_syms_path':
712 'scripts/mac/dump_product_syms',
715 '<(dump_product_syms_path)',
718 }, # end of postbuild 'dump_symbols'
719 ], # end of 'postbuilds'
720 }], # mac_breakpad==1
724 }, # end of target 'remoting_it2me_native_messaging_host'
725 ], # end of 'targets'
726 }], # # end of OS!="win" and enable_it2me_host==1
728 ], # end of 'conditions'