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 'target_name': 'remoting_native_messaging_base',
208 'type': 'static_library',
209 'variables': { 'enable_wexit_time_destructors': 1, },
211 '../base/base.gyp:base',
214 'host/native_messaging/native_messaging_pipe.cc',
215 'host/native_messaging/native_messaging_pipe.h',
216 'host/native_messaging/native_messaging_reader.cc',
217 'host/native_messaging/native_messaging_reader.h',
218 'host/native_messaging/native_messaging_writer.cc',
219 'host/native_messaging/native_messaging_writer.h',
220 'host/native_messaging/pipe_messaging_channel.cc',
221 'host/native_messaging/pipe_messaging_channel.h',
223 }, # end of target 'remoting_native_messaging_base'
226 'target_name': 'remoting_host_setup_base',
227 'type': 'static_library',
228 'variables': { 'enable_wexit_time_destructors': 1, },
230 '../base/base.gyp:base',
231 '../google_apis/google_apis.gyp:google_apis',
235 'VERSION=<(version_full)',
238 'host/setup/daemon_controller.cc',
239 'host/setup/daemon_controller.h',
240 'host/setup/daemon_controller_delegate_linux.cc',
241 'host/setup/daemon_controller_delegate_linux.h',
242 'host/setup/daemon_controller_delegate_mac.h',
243 'host/setup/daemon_controller_delegate_mac.mm',
244 'host/setup/daemon_controller_delegate_win.cc',
245 'host/setup/daemon_controller_delegate_win.h',
246 'host/setup/me2me_native_messaging_host.cc',
247 'host/setup/me2me_native_messaging_host.h',
248 'host/setup/oauth_client.cc',
249 'host/setup/oauth_client.h',
250 'host/setup/oauth_helper.cc',
251 'host/setup/oauth_helper.h',
252 'host/setup/pin_validator.cc',
253 'host/setup/pin_validator.h',
254 'host/setup/service_client.cc',
255 'host/setup/service_client.h',
256 'host/setup/test_util.cc',
257 'host/setup/test_util.h',
258 'host/setup/win/auth_code_getter.cc',
259 'host/setup/win/auth_code_getter.h',
264 '../google_update/google_update.gyp:google_update',
267 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
268 'msvs_disabled_warnings': [4267, ],
271 }, # end of target 'remoting_host_setup_base'
273 # Generates native messaging manifest files.
275 'target_name': 'remoting_native_messaging_manifests',
280 'me2me_host_path': 'remoting_native_messaging_host.exe',
281 'it2me_host_path': 'remote_assistance_host.exe',
286 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
287 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
288 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
290 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
292 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
295 [ 'OS != "mac" and OS != "win"', {
298 '/opt/google/chrome-remote-desktop/native-messaging-host',
300 '/opt/google/chrome-remote-desktop/remote-assistance-host',
305 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
306 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
309 'rule_name': 'generate_manifest',
310 'extension': 'jinja2',
312 '<(remoting_localize_path)',
316 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
319 'python', '<(remoting_localize_path)',
320 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
321 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
322 '--variables', '<(branding_path)',
323 '--template', '<(RULE_INPUT_PATH)',
324 '--locale_output', '<@(_outputs)',
328 }, # end of target 'remoting_native_messaging_manifests'
330 'target_name': 'remoting_start_host',
331 'type': 'executable',
333 'remoting_host_setup_base',
336 'host/setup/host_starter.cc',
337 'host/setup/host_starter.h',
338 'host/setup/start_host.cc',
341 ['OS=="linux" and use_allocator!="none"', {
343 '../base/allocator/allocator.gyp:allocator',
347 }, # end of target 'remoting_start_host'
349 'target_name': 'remoting_infoplist_strings',
352 'remoting_resources',
355 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
356 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
357 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
358 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
359 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
362 'rule_name': 'generate_strings',
363 'extension': 'jinja2',
365 '<(remoting_localize_path)',
368 '<!@pymod_do_main(remoting_localize --locale_output '
369 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
370 '--print_only <(remoting_locales))',
373 'python', '<(remoting_localize_path)',
374 '--locale_dir', '<(webapp_locale_dir)',
375 '--template', '<(RULE_INPUT_PATH)',
377 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
378 '<@(remoting_locales)',
381 }, # end of target 'remoting_infoplist_strings'
383 # GN version: //remoting/host/it2me:common
384 'target_name': 'remoting_it2me_host_static',
385 'type': 'static_library',
386 'variables': { 'enable_wexit_time_destructors': 1, },
388 '../base/base.gyp:base_i18n',
389 '../components/components.gyp:policy',
390 '../net/net.gyp:net',
393 'remoting_infoplist_strings',
395 'remoting_resources',
398 'VERSION=<(version_full)',
401 '<@(remoting_it2me_host_static_sources)',
403 }, # end of target 'remoting_it2me_host_static'
404 ], # end of 'targets'
405 }], # 'enable_remoting_host==1'
407 ['enable_me2me_host==1', {
410 'target_name': 'remoting_me2me_host_static',
411 'type': 'static_library',
412 'variables': { 'enable_wexit_time_destructors': 1, },
414 '../base/base.gyp:base',
415 '../base/base.gyp:base_i18n',
416 '../components/components.gyp:policy',
417 '../components/components.gyp:policy_component_common',
418 '../net/net.gyp:net',
419 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
426 'VERSION=<(version_full)',
429 'host/curtain_mode.h',
430 'host/curtain_mode_linux.cc',
431 'host/curtain_mode_mac.cc',
432 'host/curtain_mode_win.cc',
433 'host/pam_authorization_factory_posix.cc',
434 'host/pam_authorization_factory_posix.h',
435 'host/posix/signal_handler.cc',
436 'host/posix/signal_handler.h',
437 'host/remoting_me2me_host.cc',
454 ], # end of 'conditions'
455 }, # end of target 'remoting_me2me_host_static'
457 }], # end of enable_me2me_host==1
459 ['OS!="win" and enable_me2me_host==1', {
462 'target_name': 'remoting_me2me_host',
463 'type': 'executable',
464 'variables': { 'enable_wexit_time_destructors': 1, },
466 '../base/base.gyp:base',
467 '../base/base.gyp:base_i18n',
468 '<(icu_gyp_path):icudata',
469 '../net/net.gyp:net',
470 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
474 'remoting_infoplist_strings',
475 'remoting_me2me_host_static',
479 'VERSION=<(version_full)',
489 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
492 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
493 'INFOPLIST_PREPROCESS': 'YES',
494 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
496 'mac_bundle_resources': [
497 '<(PRODUCT_DIR)/icudtl.dat',
498 'host/disconnect_window.xib',
499 'host/remoting_me2me_host.icns',
500 'host/remoting_me2me_host-Info.plist',
501 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
503 # Localized strings for 'Info.plist'
504 '<!@pymod_do_main(remoting_localize --locale_output '
505 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
506 '--print_only <(remoting_locales))',
508 'mac_bundle_resources!': [
509 'host/remoting_me2me_host-Info.plist',
512 ['mac_breakpad==1', {
514 # A real .dSYM is needed for dump_syms to operate on.
519 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
521 '<(PRODUCT_DIR)/crash_inspector',
522 '<(PRODUCT_DIR)/crash_report_sender.app'
527 '../breakpad/breakpad.gyp:dump_syms',
531 'postbuild_name': 'Dump Symbols',
533 'dump_product_syms_path':
534 'scripts/mac/dump_product_syms',
537 '<(dump_product_syms_path)',
540 }, # end of postbuild 'dump_symbols'
541 ], # end of 'postbuilds'
542 }], # mac_breakpad==1
545 ['OS=="linux" and use_allocator!="none"', {
547 '../base/allocator/allocator.gyp:allocator',
550 ], # end of 'conditions'
551 }, # end of target 'remoting_me2me_host'
553 'target_name': 'remoting_me2me_native_messaging_host',
554 'type': 'executable',
555 'product_name': 'native_messaging_host',
556 'variables': { 'enable_wexit_time_destructors': 1, },
558 '../base/base.gyp:base',
561 'remoting_host_setup_base',
562 'remoting_infoplist_strings',
563 'remoting_native_messaging_base',
566 'VERSION=<(version_full)',
569 'host/setup/me2me_native_messaging_host_entry_point.cc',
570 'host/setup/me2me_native_messaging_host_main.cc',
571 'host/setup/me2me_native_messaging_host_main.h',
574 ['OS=="linux" and use_allocator!="none"', {
576 '../base/allocator/allocator.gyp:allocator',
582 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
585 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
586 'INFOPLIST_PREPROCESS': 'YES',
587 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
589 'mac_bundle_resources': [
590 'host/setup/native_messaging_host-Info.plist',
591 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
593 # Localized strings for 'Info.plist'
594 '<!@pymod_do_main(remoting_localize --locale_output '
595 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
596 '--print_only <(remoting_locales))',
598 'mac_bundle_resources!': [
599 'host/setup/native_messaging_host-Info.plist',
602 ['mac_breakpad==1', {
604 # A real .dSYM is needed for dump_syms to operate on.
609 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
611 '<(PRODUCT_DIR)/crash_inspector',
612 '<(PRODUCT_DIR)/crash_report_sender.app'
617 '../breakpad/breakpad.gyp:dump_syms',
621 'postbuild_name': 'Dump Symbols',
623 'dump_product_syms_path':
624 'scripts/mac/dump_product_syms',
627 '<(dump_product_syms_path)',
630 }, # end of postbuild 'dump_symbols'
631 ], # end of 'postbuilds'
632 }], # mac_breakpad==1
636 }, # end of target 'remoting_me2me_native_messaging_host'
638 }], # end of OS!="win" and enable_me2me_host==1
640 ['OS!="win" and enable_remoting_host==1', {
645 'target_name': 'remoting_it2me_native_messaging_host',
646 'type': 'executable',
647 'product_name': 'remote_assistance_host',
648 'variables': { 'enable_wexit_time_destructors': 1, },
650 '../base/base.gyp:base',
654 'remoting_it2me_host_static',
655 'remoting_native_messaging_base',
659 'VERSION=<(version_full)',
662 'host/it2me/it2me_native_messaging_host_entry_point.cc',
663 'host/it2me/it2me_native_messaging_host_main.cc',
664 'host/it2me/it2me_native_messaging_host_main.h',
667 ['OS=="linux" and chromeos==0 and use_ozone==0', {
669 # Always use GTK on Linux, even for Aura builds.
670 '../build/linux/system.gyp:gtk',
673 ['OS=="linux" and use_allocator!="none"', {
675 '../base/allocator/allocator.gyp:allocator',
681 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
684 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
685 'INFOPLIST_PREPROCESS': 'YES',
686 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
688 'mac_bundle_resources': [
689 '<(PRODUCT_DIR)/icudtl.dat',
690 'host/disconnect_window.xib',
691 'host/it2me/remote_assistance_host-Info.plist',
692 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
694 # Localized strings for 'Info.plist'
695 '<!@pymod_do_main(remoting_localize --locale_output '
696 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
697 '--print_only <(remoting_locales))',
699 'mac_bundle_resources!': [
700 'host/it2me/remote_assistance_host-Info.plist',
703 ['mac_breakpad==1', {
705 # A real .dSYM is needed for dump_syms to operate on.
710 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
712 '<(PRODUCT_DIR)/crash_inspector',
713 '<(PRODUCT_DIR)/crash_report_sender.app'
718 '../breakpad/breakpad.gyp:dump_syms',
722 'postbuild_name': 'Dump Symbols',
724 'dump_product_syms_path':
725 'scripts/mac/dump_product_syms',
728 '<(dump_product_syms_path)',
731 }, # end of postbuild 'dump_symbols'
732 ], # end of 'postbuilds'
733 }], # mac_breakpad==1
736 ], # end of conditions
737 }, # end of target 'remoting_it2me_native_messaging_host'
742 # Dummy target for chromeos==1
743 'target_name': 'remoting_it2me_native_messaging_host',
744 'type': 'executable',
747 }], # end of chromeos==0
748 ], # end of conditions
749 }], # end of OS!="win" and enable_remoting_host==1
750 ], # end of 'conditions'