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 '../components/components.gyp:policy',
50 '../components/components.gyp:policy_component_common',
51 '../crypto/crypto.gyp:crypto',
52 '../google_apis/google_apis.gyp:google_apis',
54 '../ui/events/events.gyp:dom4_keycode_converter',
57 'HOST_BUNDLE_NAME="<(host_bundle_name)"',
58 'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
59 'VERSION=<(version_full)',
62 '<@(remoting_host_sources)',
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',
77 ['chromeos==0 and use_ozone==0', {
79 # use GTK on Linux, even for Aura builds.
80 '../build/linux/system.gyp:gtk',
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',
103 '../third_party/skia/include/utils',
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',
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/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',
278 '../google_update/google_update.gyp:google_update',
281 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
282 'msvs_disabled_warnings': [4267, ],
285 }, # end of target 'remoting_host_setup_base'
287 # Generates native messaging manifest files.
289 'target_name': 'remoting_native_messaging_manifests',
294 'me2me_host_path': 'remoting_native_messaging_host.exe',
295 'it2me_host_path': 'remote_assistance_host.exe',
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@")',
304 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
306 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
309 [ 'OS != "mac" and OS != "win"', {
312 '/opt/google/chrome-remote-desktop/native-messaging-host',
314 '/opt/google/chrome-remote-desktop/remote-assistance-host',
319 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
320 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
323 'rule_name': 'generate_manifest',
324 'extension': 'jinja2',
326 '<(remoting_localize_path)',
330 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
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)',
342 }, # end of target 'remoting_native_messaging_manifests'
344 'target_name': 'remoting_start_host',
345 'type': 'executable',
347 'remoting_host_setup_base',
350 'host/setup/host_starter.cc',
351 'host/setup/host_starter.h',
352 'host/setup/start_host.cc',
355 ['OS=="linux" and use_allocator!="none"', {
357 '../base/allocator/allocator.gyp:allocator',
361 }, # end of target 'remoting_start_host'
363 'target_name': 'remoting_infoplist_strings',
366 'remoting_resources',
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',
376 'rule_name': 'generate_strings',
377 'extension': 'jinja2',
379 '<(remoting_localize_path)',
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))',
387 'python', '<(remoting_localize_path)',
388 '--locale_dir', '<(webapp_locale_dir)',
389 '--template', '<(RULE_INPUT_PATH)',
391 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
392 '<@(remoting_locales)',
395 }, # end of target 'remoting_infoplist_strings'
396 ], # end of 'targets'
397 }], # 'enable_remoting_host==1'
399 ['enable_me2me_host==1', {
402 'target_name': 'remoting_me2me_host_static',
403 'type': 'static_library',
404 'variables': { 'enable_wexit_time_destructors': 1, },
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',
416 'VERSION=<(version_full)',
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',
429 ['exclude', '^host/posix/'],
432 ], # end of 'conditions'
433 }, # end of target 'remoting_me2me_host_static'
435 }], # end of enable_me2me_host==1
437 ['enable_it2me_host==1', {
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, },
445 '../base/base.gyp:base_i18n',
446 '../components/components.gyp:policy',
447 '../net/net.gyp:net',
450 'remoting_infoplist_strings',
452 'remoting_resources',
455 'VERSION=<(version_full)',
458 '<@(remoting_it2me_host_static_sources)',
460 }, # end of target 'remoting_it2me_host_static'
462 }], # end of 'enable_it2me_host==1'
464 ['OS!="win" and enable_me2me_host==1', {
467 'target_name': 'remoting_me2me_host',
468 'type': 'executable',
469 'variables': { 'enable_wexit_time_destructors': 1, },
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',
479 'remoting_infoplist_strings',
480 'remoting_me2me_host_static',
484 'VERSION=<(version_full)',
494 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
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)"',
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))',
513 'mac_bundle_resources!': [
514 'host/remoting_me2me_host-Info.plist',
517 ['mac_breakpad==1', {
519 # A real .dSYM is needed for dump_syms to operate on.
524 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
526 '<(PRODUCT_DIR)/crash_inspector',
527 '<(PRODUCT_DIR)/crash_report_sender.app'
532 '../breakpad/breakpad.gyp:dump_syms',
536 'postbuild_name': 'Dump Symbols',
538 'dump_product_syms_path':
539 'scripts/mac/dump_product_syms',
542 '<(dump_product_syms_path)',
545 }, # end of postbuild 'dump_symbols'
546 ], # end of 'postbuilds'
547 }], # mac_breakpad==1
550 ['OS=="linux" and use_allocator!="none"', {
552 '../base/allocator/allocator.gyp:allocator',
555 ], # end of 'conditions'
556 }, # end of target 'remoting_me2me_host'
558 'target_name': 'remoting_me2me_native_messaging_host',
559 'type': 'executable',
560 'product_name': 'native_messaging_host',
561 'variables': { 'enable_wexit_time_destructors': 1, },
563 '../base/base.gyp:base',
566 'remoting_host_setup_base',
567 'remoting_infoplist_strings',
568 'remoting_native_messaging_base',
571 'VERSION=<(version_full)',
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',
579 ['OS=="linux" and use_allocator!="none"', {
581 '../base/allocator/allocator.gyp:allocator',
587 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
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)"',
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))',
603 'mac_bundle_resources!': [
604 'host/setup/native_messaging_host-Info.plist',
607 ['mac_breakpad==1', {
609 # A real .dSYM is needed for dump_syms to operate on.
614 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
616 '<(PRODUCT_DIR)/crash_inspector',
617 '<(PRODUCT_DIR)/crash_report_sender.app'
622 '../breakpad/breakpad.gyp:dump_syms',
626 'postbuild_name': 'Dump Symbols',
628 'dump_product_syms_path':
629 'scripts/mac/dump_product_syms',
632 '<(dump_product_syms_path)',
635 }, # end of postbuild 'dump_symbols'
636 ], # end of 'postbuilds'
637 }], # mac_breakpad==1
641 }, # end of target 'remoting_me2me_native_messaging_host'
643 }], # end of OS!="win" and enable_me2me_host==1
645 ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
648 'target_name': 'remoting_it2me_native_messaging_host',
649 'type': 'executable',
650 'product_name': 'remote_assistance_host',
651 'variables': { 'enable_wexit_time_destructors': 1, },
653 '../base/base.gyp:base',
657 'remoting_it2me_host_static',
658 'remoting_native_messaging_base',
662 'VERSION=<(version_full)',
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',
670 ['OS=="linux" and chromeos==0 and use_ozone==0', {
672 # Always use GTK on Linux, even for Aura builds.
673 '../build/linux/system.gyp:gtk',
676 ['OS=="linux" and use_allocator!="none"', {
678 '../base/allocator/allocator.gyp:allocator',
684 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
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)"',
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))',
702 'mac_bundle_resources!': [
703 'host/it2me/remote_assistance_host-Info.plist',
706 ['mac_breakpad==1', {
708 # A real .dSYM is needed for dump_syms to operate on.
713 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
715 '<(PRODUCT_DIR)/crash_inspector',
716 '<(PRODUCT_DIR)/crash_report_sender.app'
721 '../breakpad/breakpad.gyp:dump_syms',
725 'postbuild_name': 'Dump Symbols',
727 'dump_product_syms_path':
728 'scripts/mac/dump_product_syms',
731 '<(dump_product_syms_path)',
734 }, # end of postbuild 'dump_symbols'
735 ], # end of 'postbuilds'
736 }], # mac_breakpad==1
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'