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',
138 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
145 '_ATL_NO_EXCEPTIONS',
146 'ISOLATION_AWARE_ENABLED=1',
149 '../sandbox/sandbox.gyp:sandbox',
150 'remoting_host_messages',
154 'VCCLCompilerTool': {
155 # /MP conflicts with #import directive so we limit the number
156 # of processes to spawn to 1.
157 'AdditionalOptions': ['/MP1'],
161 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
164 '<(output_dir)/remoting_host_messages.mc',
169 'direct_dependent_settings': {
175 # Rule to run the message compiler.
176 'rule_name': 'message_compiler',
179 '<(output_dir)/<(RULE_INPUT_ROOT).h',
180 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
184 '-h', '<(output_dir)',
185 '-r', '<(output_dir)/.',
187 '<(RULE_INPUT_PATH)',
189 'process_outputs_as_sources': 1,
190 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
193 ['enable_webrtc==1', {
195 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
196 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
199 '<@(remoting_cast_sources)',
203 }, # end of target 'remoting_host'
206 'target_name': 'remoting_native_messaging_base',
207 'type': 'static_library',
208 'variables': { 'enable_wexit_time_destructors': 1, },
210 '../base/base.gyp:base',
213 'host/native_messaging/pipe_messaging_channel.cc',
214 'host/native_messaging/pipe_messaging_channel.h',
215 'host/native_messaging/native_messaging_pipe.cc',
216 'host/native_messaging/native_messaging_pipe.h',
217 'host/native_messaging/native_messaging_reader.cc',
218 'host/native_messaging/native_messaging_reader.h',
219 'host/native_messaging/native_messaging_writer.cc',
220 'host/native_messaging/native_messaging_writer.h',
222 }, # end of target 'remoting_native_messaging_base'
225 'target_name': 'remoting_host_setup_base',
226 'type': 'static_library',
227 'variables': { 'enable_wexit_time_destructors': 1, },
229 '../base/base.gyp:base',
230 '../google_apis/google_apis.gyp:google_apis',
234 'VERSION=<(version_full)',
237 'host/setup/daemon_controller.cc',
238 'host/setup/daemon_controller.h',
239 'host/setup/daemon_controller_delegate_linux.cc',
240 'host/setup/daemon_controller_delegate_linux.h',
241 'host/setup/daemon_controller_delegate_mac.h',
242 'host/setup/daemon_controller_delegate_mac.mm',
243 'host/setup/daemon_controller_delegate_win.cc',
244 'host/setup/daemon_controller_delegate_win.h',
245 'host/setup/daemon_installer_win.cc',
246 'host/setup/daemon_installer_win.h',
247 'host/setup/me2me_native_messaging_host.cc',
248 'host/setup/me2me_native_messaging_host.h',
249 'host/setup/oauth_client.cc',
250 'host/setup/oauth_client.h',
251 'host/setup/oauth_helper.cc',
252 'host/setup/oauth_helper.h',
253 'host/setup/pin_validator.cc',
254 'host/setup/pin_validator.h',
255 'host/setup/service_client.cc',
256 'host/setup/service_client.h',
257 'host/setup/test_util.cc',
258 'host/setup/test_util.h',
259 'host/setup/win/auth_code_getter.cc',
260 'host/setup/win/auth_code_getter.h',
265 '../google_update/google_update.gyp:google_update',
268 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
269 'msvs_disabled_warnings': [4267, ],
272 }, # end of target 'remoting_host_setup_base'
274 # Generates native messaging manifest files.
276 'target_name': 'remoting_native_messaging_manifests',
281 'me2me_host_path': 'remoting_native_messaging_host.exe',
282 'it2me_host_path': 'remote_assistance_host.exe',
287 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
288 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
289 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
291 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
293 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
296 [ 'OS != "mac" and OS != "win"', {
299 '/opt/google/chrome-remote-desktop/native-messaging-host',
301 '/opt/google/chrome-remote-desktop/remote-assistance-host',
306 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
307 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
310 'rule_name': 'generate_manifest',
311 'extension': 'jinja2',
313 '<(remoting_localize_path)',
317 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
320 'python', '<(remoting_localize_path)',
321 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
322 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
323 '--variables', '<(branding_path)',
324 '--template', '<(RULE_INPUT_PATH)',
325 '--locale_output', '<@(_outputs)',
329 }, # end of target 'remoting_native_messaging_manifests'
331 'target_name': 'remoting_start_host',
332 'type': 'executable',
334 'remoting_host_setup_base',
337 'host/setup/host_starter.cc',
338 'host/setup/host_starter.h',
339 'host/setup/start_host.cc',
342 ['OS=="linux" and use_allocator!="none"', {
344 '../base/allocator/allocator.gyp:allocator',
348 }, # end of target 'remoting_start_host'
350 'target_name': 'remoting_infoplist_strings',
353 'remoting_resources',
356 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
357 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
358 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
359 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
360 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
363 'rule_name': 'generate_strings',
364 'extension': 'jinja2',
366 '<(remoting_localize_path)',
369 '<!@pymod_do_main(remoting_localize --locale_output '
370 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
371 '--print_only <(remoting_locales))',
374 'python', '<(remoting_localize_path)',
375 '--locale_dir', '<(webapp_locale_dir)',
376 '--template', '<(RULE_INPUT_PATH)',
378 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
379 '<@(remoting_locales)',
382 }, # end of target 'remoting_infoplist_strings'
383 ], # end of 'targets'
384 }], # 'enable_remoting_host==1'
386 ['enable_me2me_host==1', {
389 'target_name': 'remoting_me2me_host_static',
390 'type': 'static_library',
391 'variables': { 'enable_wexit_time_destructors': 1, },
393 '../base/base.gyp:base',
394 '../base/base.gyp:base_i18n',
395 '../net/net.gyp:net',
396 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
403 'VERSION=<(version_full)',
406 'host/curtain_mode.h',
407 'host/curtain_mode_linux.cc',
408 'host/curtain_mode_mac.cc',
409 'host/curtain_mode_win.cc',
410 'host/posix/signal_handler.cc',
411 'host/posix/signal_handler.h',
416 ['exclude', '^host/posix/'],
419 ], # end of 'conditions'
420 }, # end of target 'remoting_me2me_host_static'
422 }], # end of enable_me2me_host==1
424 ['enable_it2me_host==1', {
427 # GN version: //remoting/host/it2me:common
428 'target_name': 'remoting_it2me_host_static',
429 'type': 'static_library',
430 'variables': { 'enable_wexit_time_destructors': 1, },
432 '../base/base.gyp:base_i18n',
433 '../net/net.gyp:net',
436 'remoting_infoplist_strings',
438 'remoting_resources',
441 'VERSION=<(version_full)',
444 '<@(remoting_it2me_host_static_sources)',
446 }, # end of target 'remoting_it2me_host_static'
448 }], # end of 'enable_it2me_host==1'
450 ['OS!="win" and enable_me2me_host==1', {
453 'target_name': 'remoting_me2me_host',
454 'type': 'executable',
455 'variables': { 'enable_wexit_time_destructors': 1, },
457 '../base/base.gyp:base',
458 '../base/base.gyp:base_i18n',
459 '<(icu_gyp_path):icudata',
460 '../net/net.gyp:net',
461 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
465 'remoting_infoplist_strings',
466 'remoting_me2me_host_static',
470 'VERSION=<(version_full)',
480 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
483 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
484 'INFOPLIST_PREPROCESS': 'YES',
485 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
487 'mac_bundle_resources': [
488 '<(PRODUCT_DIR)/icudtl.dat',
489 'host/disconnect_window.xib',
490 'host/remoting_me2me_host.icns',
491 'host/remoting_me2me_host-Info.plist',
492 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
494 # Localized strings for 'Info.plist'
495 '<!@pymod_do_main(remoting_localize --locale_output '
496 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
497 '--print_only <(remoting_locales))',
499 'mac_bundle_resources!': [
500 'host/remoting_me2me_host-Info.plist',
503 ['mac_breakpad==1', {
505 # A real .dSYM is needed for dump_syms to operate on.
510 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
512 '<(PRODUCT_DIR)/crash_inspector',
513 '<(PRODUCT_DIR)/crash_report_sender.app'
518 '../breakpad/breakpad.gyp:dump_syms',
522 'postbuild_name': 'Dump Symbols',
524 'dump_product_syms_path':
525 'scripts/mac/dump_product_syms',
528 '<(dump_product_syms_path)',
531 }, # end of postbuild 'dump_symbols'
532 ], # end of 'postbuilds'
533 }], # mac_breakpad==1
536 ['OS=="linux" and use_allocator!="none"', {
538 '../base/allocator/allocator.gyp:allocator',
541 ], # end of 'conditions'
542 }, # end of target 'remoting_me2me_host'
544 'target_name': 'remoting_me2me_native_messaging_host',
545 'type': 'executable',
546 'product_name': 'native_messaging_host',
547 'variables': { 'enable_wexit_time_destructors': 1, },
549 '../base/base.gyp:base',
552 'remoting_host_setup_base',
553 'remoting_infoplist_strings',
554 'remoting_native_messaging_base',
557 'VERSION=<(version_full)',
560 'host/setup/me2me_native_messaging_host_entry_point.cc',
561 'host/setup/me2me_native_messaging_host_main.cc',
562 'host/setup/me2me_native_messaging_host_main.h',
565 ['OS=="linux" and use_allocator!="none"', {
567 '../base/allocator/allocator.gyp:allocator',
573 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
576 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
577 'INFOPLIST_PREPROCESS': 'YES',
578 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
580 'mac_bundle_resources': [
581 'host/setup/native_messaging_host-Info.plist',
582 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
584 # Localized strings for 'Info.plist'
585 '<!@pymod_do_main(remoting_localize --locale_output '
586 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
587 '--print_only <(remoting_locales))',
589 'mac_bundle_resources!': [
590 'host/setup/native_messaging_host-Info.plist',
593 ['mac_breakpad==1', {
595 # A real .dSYM is needed for dump_syms to operate on.
600 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
602 '<(PRODUCT_DIR)/crash_inspector',
603 '<(PRODUCT_DIR)/crash_report_sender.app'
608 '../breakpad/breakpad.gyp:dump_syms',
612 'postbuild_name': 'Dump Symbols',
614 'dump_product_syms_path':
615 'scripts/mac/dump_product_syms',
618 '<(dump_product_syms_path)',
621 }, # end of postbuild 'dump_symbols'
622 ], # end of 'postbuilds'
623 }], # mac_breakpad==1
627 }, # end of target 'remoting_me2me_native_messaging_host'
629 }], # end of OS!="win" and enable_me2me_host==1
631 ['OS!="win" and enable_it2me_host==1 and chromeos==0', {
634 'target_name': 'remoting_it2me_native_messaging_host',
635 'type': 'executable',
636 'product_name': 'remote_assistance_host',
637 'variables': { 'enable_wexit_time_destructors': 1, },
639 '../base/base.gyp:base',
643 'remoting_it2me_host_static',
644 'remoting_native_messaging_base',
648 'VERSION=<(version_full)',
651 'host/it2me/it2me_native_messaging_host_entry_point.cc',
652 'host/it2me/it2me_native_messaging_host_main.cc',
653 'host/it2me/it2me_native_messaging_host_main.h',
656 ['OS=="linux" and chromeos==0 and use_ozone==0', {
658 # Always use GTK on Linux, even for Aura builds.
659 '../build/linux/system.gyp:gtk',
662 ['OS=="linux" and use_allocator!="none"', {
664 '../base/allocator/allocator.gyp:allocator',
670 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
673 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
674 'INFOPLIST_PREPROCESS': 'YES',
675 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
677 'mac_bundle_resources': [
678 '<(PRODUCT_DIR)/icudtl.dat',
679 'host/disconnect_window.xib',
680 'host/it2me/remote_assistance_host-Info.plist',
681 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
683 # Localized strings for 'Info.plist'
684 '<!@pymod_do_main(remoting_localize --locale_output '
685 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
686 '--print_only <(remoting_locales))',
688 'mac_bundle_resources!': [
689 'host/it2me/remote_assistance_host-Info.plist',
692 ['mac_breakpad==1', {
694 # A real .dSYM is needed for dump_syms to operate on.
699 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
701 '<(PRODUCT_DIR)/crash_inspector',
702 '<(PRODUCT_DIR)/crash_report_sender.app'
707 '../breakpad/breakpad.gyp:dump_syms',
711 'postbuild_name': 'Dump Symbols',
713 'dump_product_syms_path':
714 'scripts/mac/dump_product_syms',
717 '<(dump_product_syms_path)',
720 }, # end of postbuild 'dump_symbols'
721 ], # end of 'postbuilds'
722 }], # mac_breakpad==1
726 }, # end of target 'remoting_it2me_native_messaging_host'
727 ], # end of 'targets'
728 }], # # end of OS!="win" and enable_it2me_host==1
730 ], # end of 'conditions'