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_enable.gypi',
13 'remoting_host_mac.gypi',
18 'remoting_host_win.gypi',
23 'remoting_host_linux.gypi',
27 ['enable_remoting_host==1', {
30 # GN version: //remoting/host
31 'target_name': 'remoting_host',
32 'type': 'static_library',
34 'enable_wexit_time_destructors': 1,
35 'host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
36 'prefpane_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_PREFPANE_BUNDLE_NAME@")',
42 '../base/base.gyp:base_i18n',
43 '../components/components.gyp:policy',
44 '../components/components.gyp:policy_component_common',
45 '../crypto/crypto.gyp:crypto',
46 '../google_apis/google_apis.gyp:google_apis',
48 '../ui/events/events.gyp:dom4_keycode_converter',
51 'HOST_BUNDLE_NAME="<(host_bundle_name)"',
52 'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
53 'VERSION=<(version_full)',
56 '<@(remoting_host_sources)',
63 '../build/linux/system.gyp:x11',
64 '../build/linux/system.gyp:xext',
65 '../build/linux/system.gyp:xfixes',
66 '../build/linux/system.gyp:xi',
67 '../build/linux/system.gyp:xrandr',
68 '../build/linux/system.gyp:xtst',
71 ['chromeos==0 and use_ozone==0', {
73 # use GTK on Linux, even for Aura builds.
74 '../build/linux/system.gyp:gtk',
82 '../ppapi/ppapi_internal.gyp:ppapi_host',
83 '../skia/skia.gyp:skia',
84 '../ui/aura/aura.gyp:aura',
85 '../ui/compositor/compositor.gyp:compositor',
86 '../ui/events/events.gyp:events',
87 '../ui/events/platform/events_platform.gyp:events_platform',
88 '../ui/views/views.gyp:views',
91 '../third_party/skia/include/utils',
94 'host/clipboard_x11.cc',
95 'host/continue_window_linux.cc',
96 'host/disconnect_window_linux.cc',
97 'host/linux/x_server_clipboard.cc',
98 'host/linux/x_server_clipboard.h',
99 'host/local_input_monitor_x11.cc',
104 '../ash/ash.gyp:ash',
109 'host/input_injector_chromeos.cc',
110 'host/input_injector_chromeos.h',
114 '../ui/ozone/ozone.gyp:ozone',
121 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
124 # Include internal_mac-inl.h only if it exists.
125 'use_remoting_macosx_internal%':
126 '<!(python -c "import os; print 1 if os.path.exists(\'tools/internal/internal_mac-inl.h\') else 0")'
129 ['use_remoting_macosx_internal==1', {
131 'internal/internal_mac-inl.h'
134 'USE_REMOTING_MACOSX_INTERNAL'
140 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
146 '_ATL_NO_EXCEPTIONS',
147 'ISOLATION_AWARE_ENABLED=1',
150 '../sandbox/sandbox.gyp:sandbox',
151 'remoting_host_messages',
155 'VCCLCompilerTool': {
156 # /MP conflicts with #import directive so we limit the number
157 # of processes to spawn to 1.
158 'AdditionalOptions': ['/MP1'],
162 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
165 '<(output_dir)/remoting_host_messages.mc',
170 'direct_dependent_settings': {
176 # Rule to run the message compiler.
177 'rule_name': 'message_compiler',
180 '<(output_dir)/<(RULE_INPUT_ROOT).h',
181 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
185 '-h', '<(output_dir)',
186 '-r', '<(output_dir)/.',
188 '<(RULE_INPUT_PATH)',
190 'process_outputs_as_sources': 1,
191 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
194 ['enable_webrtc==1', {
196 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
197 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
200 '<@(remoting_cast_sources)',
204 }, # end of target 'remoting_host'
207 # GN version: //remoting/host/native_messaging
208 'target_name': 'remoting_native_messaging_base',
209 'type': 'static_library',
210 'variables': { 'enable_wexit_time_destructors': 1, },
212 '../base/base.gyp:base',
215 '<@(remoting_host_native_messaging_sources)',
217 }, # end of target 'remoting_native_messaging_base'
220 # GN version: //remoting/host/setup
221 'target_name': 'remoting_host_setup_base',
222 'type': 'static_library',
223 'variables': { 'enable_wexit_time_destructors': 1, },
225 '../base/base.gyp:base',
226 '../google_apis/google_apis.gyp:google_apis',
230 'VERSION=<(version_full)',
233 '<@(remoting_host_setup_sources)',
238 '../google_update/google_update.gyp:google_update',
241 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
242 'msvs_disabled_warnings': [4267, ],
245 }, # end of target 'remoting_host_setup_base'
247 # Generates native messaging manifest files.
249 'target_name': 'remoting_native_messaging_manifests',
254 'me2me_host_path': 'remoting_native_messaging_host.exe',
255 'it2me_host_path': 'remote_assistance_host.exe',
260 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
261 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
262 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
264 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
266 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
269 [ 'OS != "mac" and OS != "win"', {
272 '/opt/google/chrome-remote-desktop/native-messaging-host',
274 '/opt/google/chrome-remote-desktop/remote-assistance-host',
279 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
280 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
283 'rule_name': 'generate_manifest',
284 'extension': 'jinja2',
286 '<(remoting_localize_path)',
290 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
293 'python', '<(remoting_localize_path)',
294 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
295 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
296 '--variables', '<(branding_path)',
297 '--template', '<(RULE_INPUT_PATH)',
298 '--locale_output', '<@(_outputs)',
302 }, # end of target 'remoting_native_messaging_manifests'
304 'target_name': 'remoting_start_host',
305 'type': 'executable',
307 'remoting_host_setup_base',
310 'host/setup/host_starter.cc',
311 'host/setup/host_starter.h',
312 'host/setup/start_host.cc',
315 ['OS=="linux" and use_allocator!="none"', {
317 '../base/allocator/allocator.gyp:allocator',
321 }, # end of target 'remoting_start_host'
323 'target_name': 'remoting_infoplist_strings',
326 'remoting_resources',
329 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
330 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
331 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
332 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
333 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
336 'rule_name': 'generate_strings',
337 'extension': 'jinja2',
339 '<(remoting_localize_path)',
342 '<!@pymod_do_main(remoting_localize --locale_output '
343 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
344 '--print_only <(remoting_locales))',
347 'python', '<(remoting_localize_path)',
348 '--locale_dir', '<(webapp_locale_dir)',
349 '--template', '<(RULE_INPUT_PATH)',
351 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
352 '<@(remoting_locales)',
355 }, # end of target 'remoting_infoplist_strings'
357 # GN version: //remoting/host/it2me:common
358 'target_name': 'remoting_it2me_host_static',
359 'type': 'static_library',
360 'variables': { 'enable_wexit_time_destructors': 1, },
362 '../base/base.gyp:base_i18n',
363 '../components/components.gyp:policy',
364 '../net/net.gyp:net',
367 'remoting_infoplist_strings',
369 'remoting_resources',
372 'VERSION=<(version_full)',
375 '<@(remoting_it2me_host_static_sources)',
377 }, # end of target 'remoting_it2me_host_static'
378 ], # end of 'targets'
379 }], # 'enable_remoting_host==1'
381 ['enable_me2me_host==1', {
384 'target_name': 'remoting_me2me_host_static',
385 'type': 'static_library',
386 'variables': { 'enable_wexit_time_destructors': 1, },
388 '../base/base.gyp:base',
389 '../base/base.gyp:base_i18n',
390 '../components/components.gyp:policy',
391 '../components/components.gyp:policy_component_common',
392 '../net/net.gyp:net',
393 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
400 'VERSION=<(version_full)',
403 'host/curtain_mode.h',
404 'host/curtain_mode_linux.cc',
405 'host/curtain_mode_mac.cc',
406 'host/curtain_mode_win.cc',
407 'host/pam_authorization_factory_posix.cc',
408 'host/pam_authorization_factory_posix.h',
409 'host/posix/signal_handler.cc',
410 'host/posix/signal_handler.h',
411 'host/remoting_me2me_host.cc',
428 ], # end of 'conditions'
429 }, # end of target 'remoting_me2me_host_static'
431 }], # end of enable_me2me_host==1
433 ['OS!="win" and enable_me2me_host==1', {
436 'target_name': 'remoting_me2me_host',
437 'type': 'executable',
438 'variables': { 'enable_wexit_time_destructors': 1, },
440 '../base/base.gyp:base',
441 '../base/base.gyp:base_i18n',
442 '<(icu_gyp_path):icudata',
443 '../net/net.gyp:net',
444 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
448 'remoting_infoplist_strings',
449 'remoting_me2me_host_static',
453 'VERSION=<(version_full)',
463 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
466 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
467 'INFOPLIST_PREPROCESS': 'YES',
468 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
470 'mac_bundle_resources': [
471 '<(PRODUCT_DIR)/icudtl.dat',
472 'host/disconnect_window.xib',
473 'host/remoting_me2me_host.icns',
474 'host/remoting_me2me_host-Info.plist',
475 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
477 # Localized strings for 'Info.plist'
478 '<!@pymod_do_main(remoting_localize --locale_output '
479 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
480 '--print_only <(remoting_locales))',
482 'mac_bundle_resources!': [
483 'host/remoting_me2me_host-Info.plist',
486 ['mac_breakpad==1', {
488 # A real .dSYM is needed for dump_syms to operate on.
493 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
495 '<(PRODUCT_DIR)/crash_inspector',
496 '<(PRODUCT_DIR)/crash_report_sender.app'
501 '../breakpad/breakpad.gyp:dump_syms',
505 'postbuild_name': 'Dump Symbols',
507 'dump_product_syms_path':
508 'scripts/mac/dump_product_syms',
511 '<(dump_product_syms_path)',
514 }, # end of postbuild 'dump_symbols'
515 ], # end of 'postbuilds'
516 }], # mac_breakpad==1
519 ['OS=="linux" and use_allocator!="none"', {
521 '../base/allocator/allocator.gyp:allocator',
524 ], # end of 'conditions'
525 }, # end of target 'remoting_me2me_host'
527 'target_name': 'remoting_me2me_native_messaging_host',
528 'type': 'executable',
529 'product_name': 'native_messaging_host',
530 'variables': { 'enable_wexit_time_destructors': 1, },
532 '../base/base.gyp:base',
535 'remoting_host_setup_base',
536 'remoting_infoplist_strings',
537 'remoting_native_messaging_base',
540 'VERSION=<(version_full)',
543 'host/setup/me2me_native_messaging_host_entry_point.cc',
544 'host/setup/me2me_native_messaging_host_main.cc',
545 'host/setup/me2me_native_messaging_host_main.h',
548 ['OS=="linux" and use_allocator!="none"', {
550 '../base/allocator/allocator.gyp:allocator',
556 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
559 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
560 'INFOPLIST_PREPROCESS': 'YES',
561 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
563 'mac_bundle_resources': [
564 'host/setup/native_messaging_host-Info.plist',
565 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
567 # Localized strings for 'Info.plist'
568 '<!@pymod_do_main(remoting_localize --locale_output '
569 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
570 '--print_only <(remoting_locales))',
572 'mac_bundle_resources!': [
573 'host/setup/native_messaging_host-Info.plist',
576 ['mac_breakpad==1', {
578 # A real .dSYM is needed for dump_syms to operate on.
583 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
585 '<(PRODUCT_DIR)/crash_inspector',
586 '<(PRODUCT_DIR)/crash_report_sender.app'
591 '../breakpad/breakpad.gyp:dump_syms',
595 'postbuild_name': 'Dump Symbols',
597 'dump_product_syms_path':
598 'scripts/mac/dump_product_syms',
601 '<(dump_product_syms_path)',
604 }, # end of postbuild 'dump_symbols'
605 ], # end of 'postbuilds'
606 }], # mac_breakpad==1
610 }, # end of target 'remoting_me2me_native_messaging_host'
612 }], # end of OS!="win" and enable_me2me_host==1
614 ['OS!="win" and enable_remoting_host==1', {
619 'target_name': 'remoting_it2me_native_messaging_host',
620 'type': 'executable',
621 'product_name': 'remote_assistance_host',
622 'variables': { 'enable_wexit_time_destructors': 1, },
624 '../base/base.gyp:base',
628 'remoting_it2me_host_static',
629 'remoting_native_messaging_base',
633 'VERSION=<(version_full)',
636 'host/it2me/it2me_native_messaging_host_entry_point.cc',
637 'host/it2me/it2me_native_messaging_host_main.cc',
638 'host/it2me/it2me_native_messaging_host_main.h',
641 ['OS=="linux" and chromeos==0 and use_ozone==0', {
643 # Always use GTK on Linux, even for Aura builds.
644 '../build/linux/system.gyp:gtk',
647 ['OS=="linux" and use_allocator!="none"', {
649 '../base/allocator/allocator.gyp:allocator',
655 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
658 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
659 'INFOPLIST_PREPROCESS': 'YES',
660 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
662 'mac_bundle_resources': [
663 '<(PRODUCT_DIR)/icudtl.dat',
664 'host/disconnect_window.xib',
665 'host/it2me/remote_assistance_host-Info.plist',
666 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
668 # Localized strings for 'Info.plist'
669 '<!@pymod_do_main(remoting_localize --locale_output '
670 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
671 '--print_only <(remoting_locales))',
673 'mac_bundle_resources!': [
674 'host/it2me/remote_assistance_host-Info.plist',
677 ['mac_breakpad==1', {
679 # A real .dSYM is needed for dump_syms to operate on.
684 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
686 '<(PRODUCT_DIR)/crash_inspector',
687 '<(PRODUCT_DIR)/crash_report_sender.app'
692 '../breakpad/breakpad.gyp:dump_syms',
696 'postbuild_name': 'Dump Symbols',
698 'dump_product_syms_path':
699 'scripts/mac/dump_product_syms',
702 '<(dump_product_syms_path)',
705 }, # end of postbuild 'dump_symbols'
706 ], # end of 'postbuilds'
707 }], # mac_breakpad==1
710 ], # end of conditions
711 }, # end of target 'remoting_it2me_native_messaging_host'
716 # Dummy target for chromeos==1
717 'target_name': 'remoting_it2me_native_messaging_host',
718 'type': 'executable',
721 }], # end of chromeos==0
722 ], # end of conditions
723 }], # end of OS!="win" and enable_remoting_host==1
724 ], # end of 'conditions'