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/local_input_monitor_x11.cc',
111 'host/policy_hack/policy_watcher_linux.cc',
112 'host/remoting_me2me_host.cc',
117 '../ash/ash.gyp:ash',
122 'host/input_injector_chromeos.cc',
123 'host/input_injector_chromeos.h',
127 '../ui/ozone/ozone.gyp:ozone',
134 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
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")'
142 ['use_remoting_macosx_internal==1', {
144 'internal/internal_mac-inl.h'
147 'USE_REMOTING_MACOSX_INTERNAL'
153 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
160 '_ATL_NO_EXCEPTIONS',
161 'ISOLATION_AWARE_ENABLED=1',
164 '../sandbox/sandbox.gyp:sandbox',
165 'remoting_host_messages',
169 'VCCLCompilerTool': {
170 # /MP conflicts with #import directive so we limit the number
171 # of processes to spawn to 1.
172 'AdditionalOptions': ['/MP1'],
176 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
179 '<(output_dir)/remoting_host_messages.mc',
184 'direct_dependent_settings': {
190 # Rule to run the message compiler.
191 'rule_name': 'message_compiler',
194 '<(output_dir)/<(RULE_INPUT_ROOT).h',
195 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
199 '-h', '<(output_dir)',
200 '-r', '<(output_dir)/.',
202 '<(RULE_INPUT_PATH)',
204 'process_outputs_as_sources': 1,
205 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
208 ['enable_webrtc==1', {
210 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
211 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
214 '<@(remoting_cast_sources)',
218 }, # end of target 'remoting_host'
221 'target_name': 'remoting_native_messaging_base',
222 'type': 'static_library',
223 'variables': { 'enable_wexit_time_destructors': 1, },
225 '../base/base.gyp:base',
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',
237 }, # end of target 'remoting_native_messaging_base'
240 'target_name': 'remoting_host_setup_base',
241 'type': 'static_library',
242 'variables': { 'enable_wexit_time_destructors': 1, },
244 '../base/base.gyp:base',
245 '../google_apis/google_apis.gyp:google_apis',
249 'VERSION=<(version_full)',
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',
280 '../google_update/google_update.gyp:google_update',
283 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
284 'msvs_disabled_warnings': [4267, ],
287 }, # end of target 'remoting_host_setup_base'
289 # Generates native messaging manifest files.
291 'target_name': 'remoting_native_messaging_manifests',
296 'me2me_host_path': 'remoting_native_messaging_host.exe',
297 'it2me_host_path': 'remote_assistance_host.exe',
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@")',
306 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
308 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
311 [ 'OS != "mac" and OS != "win"', {
314 '/opt/google/chrome-remote-desktop/native-messaging-host',
316 '/opt/google/chrome-remote-desktop/remote-assistance-host',
321 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
322 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
325 'rule_name': 'generate_manifest',
326 'extension': 'jinja2',
328 '<(remoting_localize_path)',
332 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
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)',
344 }, # end of target 'remoting_native_messaging_manifests'
346 'target_name': 'remoting_start_host',
347 'type': 'executable',
349 'remoting_host_setup_base',
352 'host/setup/host_starter.cc',
353 'host/setup/host_starter.h',
354 'host/setup/start_host.cc',
357 ['OS=="linux" and use_allocator!="none"', {
359 '../base/allocator/allocator.gyp:allocator',
363 }, # end of target 'remoting_start_host'
365 'target_name': 'remoting_infoplist_strings',
368 'remoting_resources',
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',
378 'rule_name': 'generate_strings',
379 'extension': 'jinja2',
381 '<(remoting_localize_path)',
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))',
389 'python', '<(remoting_localize_path)',
390 '--locale_dir', '<(webapp_locale_dir)',
391 '--template', '<(RULE_INPUT_PATH)',
393 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
394 '<@(remoting_locales)',
397 }, # end of target 'remoting_infoplist_strings'
398 ], # end of 'targets'
399 }], # 'enable_remoting_host==1'
401 ['enable_me2me_host==1', {
404 'target_name': 'remoting_me2me_host_static',
405 'type': 'static_library',
406 'variables': { 'enable_wexit_time_destructors': 1, },
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',
418 'VERSION=<(version_full)',
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',
431 ['exclude', '^host/posix/'],
434 ], # end of 'conditions'
435 }, # end of target 'remoting_me2me_host_static'
437 }], # end of enable_me2me_host==1
439 ['enable_it2me_host==1', {
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, },
447 '../base/base.gyp:base_i18n',
448 '../net/net.gyp:net',
451 'remoting_infoplist_strings',
453 'remoting_resources',
456 'VERSION=<(version_full)',
459 '<@(remoting_it2me_host_static_sources)',
461 }, # end of target 'remoting_it2me_host_static'
463 }], # end of 'enable_it2me_host==1'
465 ['OS!="win" and enable_me2me_host==1', {
468 'target_name': 'remoting_me2me_host',
469 'type': 'executable',
470 'variables': { 'enable_wexit_time_destructors': 1, },
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',
480 'remoting_infoplist_strings',
481 'remoting_me2me_host_static',
485 'VERSION=<(version_full)',
495 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
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)"',
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))',
514 'mac_bundle_resources!': [
515 'host/remoting_me2me_host-Info.plist',
518 ['mac_breakpad==1', {
520 # A real .dSYM is needed for dump_syms to operate on.
525 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
527 '<(PRODUCT_DIR)/crash_inspector',
528 '<(PRODUCT_DIR)/crash_report_sender.app'
533 '../breakpad/breakpad.gyp:dump_syms',
537 'postbuild_name': 'Dump Symbols',
539 'dump_product_syms_path':
540 'scripts/mac/dump_product_syms',
543 '<(dump_product_syms_path)',
546 }, # end of postbuild 'dump_symbols'
547 ], # end of 'postbuilds'
548 }], # mac_breakpad==1
551 ['OS=="linux" and use_allocator!="none"', {
553 '../base/allocator/allocator.gyp:allocator',
556 ], # end of 'conditions'
557 }, # end of target 'remoting_me2me_host'
559 'target_name': 'remoting_me2me_native_messaging_host',
560 'type': 'executable',
561 'product_name': 'native_messaging_host',
562 'variables': { 'enable_wexit_time_destructors': 1, },
564 '../base/base.gyp:base',
567 'remoting_host_setup_base',
568 'remoting_infoplist_strings',
569 'remoting_native_messaging_base',
572 'VERSION=<(version_full)',
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',
580 ['OS=="linux" and use_allocator!="none"', {
582 '../base/allocator/allocator.gyp:allocator',
588 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
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)"',
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))',
604 'mac_bundle_resources!': [
605 'host/setup/native_messaging_host-Info.plist',
608 ['mac_breakpad==1', {
610 # A real .dSYM is needed for dump_syms to operate on.
615 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
617 '<(PRODUCT_DIR)/crash_inspector',
618 '<(PRODUCT_DIR)/crash_report_sender.app'
623 '../breakpad/breakpad.gyp:dump_syms',
627 'postbuild_name': 'Dump Symbols',
629 'dump_product_syms_path':
630 'scripts/mac/dump_product_syms',
633 '<(dump_product_syms_path)',
636 }, # end of postbuild 'dump_symbols'
637 ], # end of 'postbuilds'
638 }], # mac_breakpad==1
642 }, # end of target 'remoting_me2me_native_messaging_host'
644 }], # end of OS!="win" and enable_me2me_host==1
646 ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
649 'target_name': 'remoting_it2me_native_messaging_host',
650 'type': 'executable',
651 'product_name': 'remote_assistance_host',
652 'variables': { 'enable_wexit_time_destructors': 1, },
654 '../base/base.gyp:base',
658 'remoting_it2me_host_static',
659 'remoting_native_messaging_base',
663 'VERSION=<(version_full)',
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',
671 ['OS=="linux" and chromeos==0 and use_ozone==0', {
673 # Always use GTK on Linux, even for Aura builds.
674 '../build/linux/system.gyp:gtk',
677 ['OS=="linux" and use_allocator!="none"', {
679 '../base/allocator/allocator.gyp:allocator',
685 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
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)"',
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))',
703 'mac_bundle_resources!': [
704 'host/it2me/remote_assistance_host-Info.plist',
707 ['mac_breakpad==1', {
709 # A real .dSYM is needed for dump_syms to operate on.
714 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
716 '<(PRODUCT_DIR)/crash_inspector',
717 '<(PRODUCT_DIR)/crash_report_sender.app'
722 '../breakpad/breakpad.gyp:dump_syms',
726 'postbuild_name': 'Dump Symbols',
728 'dump_product_syms_path':
729 'scripts/mac/dump_product_syms',
732 '<(dump_product_syms_path)',
735 }, # end of postbuild 'dump_symbols'
736 ], # end of 'postbuilds'
737 }], # mac_breakpad==1
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'