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',
87 '../ppapi/ppapi_internal.gyp:ppapi_host',
88 '../skia/skia.gyp:skia',
89 '../ui/aura/aura.gyp:aura',
90 '../ui/compositor/compositor.gyp:compositor',
91 '../ui/events/events.gyp:events',
92 '../ui/events/platform/events_platform.gyp:events_platform',
93 '../ui/views/views.gyp:views',
96 '../third_party/skia/include/utils',
99 'host/clipboard_x11.cc',
100 'host/continue_window_linux.cc',
101 'host/disconnect_window_linux.cc',
102 'host/linux/x_server_clipboard.cc',
103 'host/linux/x_server_clipboard.h',
104 'host/local_input_monitor_x11.cc',
105 'host/remoting_me2me_host.cc',
110 '../ash/ash.gyp:ash',
115 'host/input_injector_chromeos.cc',
116 'host/input_injector_chromeos.h',
120 '../ui/ozone/ozone.gyp:ozone',
127 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
130 # Include internal_mac-inl.h only if it exists.
131 'use_remoting_macosx_internal%':
132 '<!(python -c "import os; print 1 if os.path.exists(\'tools/internal/internal_mac-inl.h\') else 0")'
135 ['use_remoting_macosx_internal==1', {
137 'internal/internal_mac-inl.h'
140 'USE_REMOTING_MACOSX_INTERNAL'
146 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
153 '_ATL_NO_EXCEPTIONS',
154 'ISOLATION_AWARE_ENABLED=1',
157 '../sandbox/sandbox.gyp:sandbox',
158 'remoting_host_messages',
162 'VCCLCompilerTool': {
163 # /MP conflicts with #import directive so we limit the number
164 # of processes to spawn to 1.
165 'AdditionalOptions': ['/MP1'],
169 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
172 '<(output_dir)/remoting_host_messages.mc',
177 'direct_dependent_settings': {
183 # Rule to run the message compiler.
184 'rule_name': 'message_compiler',
187 '<(output_dir)/<(RULE_INPUT_ROOT).h',
188 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
192 '-h', '<(output_dir)',
193 '-r', '<(output_dir)/.',
195 '<(RULE_INPUT_PATH)',
197 'process_outputs_as_sources': 1,
198 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
201 ['enable_webrtc==1', {
203 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
204 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
207 '<@(remoting_cast_sources)',
211 }, # end of target 'remoting_host'
214 'target_name': 'remoting_native_messaging_base',
215 'type': 'static_library',
216 'variables': { 'enable_wexit_time_destructors': 1, },
218 '../base/base.gyp:base',
221 'host/native_messaging/native_messaging_pipe.cc',
222 'host/native_messaging/native_messaging_pipe.h',
223 'host/native_messaging/native_messaging_reader.cc',
224 'host/native_messaging/native_messaging_reader.h',
225 'host/native_messaging/native_messaging_writer.cc',
226 'host/native_messaging/native_messaging_writer.h',
227 'host/native_messaging/pipe_messaging_channel.cc',
228 'host/native_messaging/pipe_messaging_channel.h',
230 }, # end of target 'remoting_native_messaging_base'
233 'target_name': 'remoting_host_setup_base',
234 'type': 'static_library',
235 'variables': { 'enable_wexit_time_destructors': 1, },
237 '../base/base.gyp:base',
238 '../google_apis/google_apis.gyp:google_apis',
242 'VERSION=<(version_full)',
245 'host/setup/daemon_controller.cc',
246 'host/setup/daemon_controller.h',
247 'host/setup/daemon_controller_delegate_linux.cc',
248 'host/setup/daemon_controller_delegate_linux.h',
249 'host/setup/daemon_controller_delegate_mac.h',
250 'host/setup/daemon_controller_delegate_mac.mm',
251 'host/setup/daemon_controller_delegate_win.cc',
252 'host/setup/daemon_controller_delegate_win.h',
253 'host/setup/me2me_native_messaging_host.cc',
254 'host/setup/me2me_native_messaging_host.h',
255 'host/setup/oauth_client.cc',
256 'host/setup/oauth_client.h',
257 'host/setup/oauth_helper.cc',
258 'host/setup/oauth_helper.h',
259 'host/setup/pin_validator.cc',
260 'host/setup/pin_validator.h',
261 'host/setup/service_client.cc',
262 'host/setup/service_client.h',
263 'host/setup/test_util.cc',
264 'host/setup/test_util.h',
265 'host/setup/win/auth_code_getter.cc',
266 'host/setup/win/auth_code_getter.h',
271 '../google_update/google_update.gyp:google_update',
274 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
275 'msvs_disabled_warnings': [4267, ],
278 }, # end of target 'remoting_host_setup_base'
280 # Generates native messaging manifest files.
282 'target_name': 'remoting_native_messaging_manifests',
287 'me2me_host_path': 'remoting_native_messaging_host.exe',
288 'it2me_host_path': 'remote_assistance_host.exe',
293 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
294 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
295 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
297 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
299 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
302 [ 'OS != "mac" and OS != "win"', {
305 '/opt/google/chrome-remote-desktop/native-messaging-host',
307 '/opt/google/chrome-remote-desktop/remote-assistance-host',
312 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
313 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
316 'rule_name': 'generate_manifest',
317 'extension': 'jinja2',
319 '<(remoting_localize_path)',
323 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
326 'python', '<(remoting_localize_path)',
327 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
328 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
329 '--variables', '<(branding_path)',
330 '--template', '<(RULE_INPUT_PATH)',
331 '--locale_output', '<@(_outputs)',
335 }, # end of target 'remoting_native_messaging_manifests'
337 'target_name': 'remoting_start_host',
338 'type': 'executable',
340 'remoting_host_setup_base',
343 'host/setup/host_starter.cc',
344 'host/setup/host_starter.h',
345 'host/setup/start_host.cc',
348 ['OS=="linux" and use_allocator!="none"', {
350 '../base/allocator/allocator.gyp:allocator',
354 }, # end of target 'remoting_start_host'
356 'target_name': 'remoting_infoplist_strings',
359 'remoting_resources',
362 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
363 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
364 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
365 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
366 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
369 'rule_name': 'generate_strings',
370 'extension': 'jinja2',
372 '<(remoting_localize_path)',
375 '<!@pymod_do_main(remoting_localize --locale_output '
376 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
377 '--print_only <(remoting_locales))',
380 'python', '<(remoting_localize_path)',
381 '--locale_dir', '<(webapp_locale_dir)',
382 '--template', '<(RULE_INPUT_PATH)',
384 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
385 '<@(remoting_locales)',
388 }, # end of target 'remoting_infoplist_strings'
390 # GN version: //remoting/host/it2me:common
391 'target_name': 'remoting_it2me_host_static',
392 'type': 'static_library',
393 'variables': { 'enable_wexit_time_destructors': 1, },
395 '../base/base.gyp:base_i18n',
396 '../components/components.gyp:policy',
397 '../net/net.gyp:net',
400 'remoting_infoplist_strings',
402 'remoting_resources',
405 'VERSION=<(version_full)',
408 '<@(remoting_it2me_host_static_sources)',
410 }, # end of target 'remoting_it2me_host_static'
411 ], # end of 'targets'
412 }], # 'enable_remoting_host==1'
414 ['enable_me2me_host==1', {
417 'target_name': 'remoting_me2me_host_static',
418 'type': 'static_library',
419 'variables': { 'enable_wexit_time_destructors': 1, },
421 '../base/base.gyp:base',
422 '../base/base.gyp:base_i18n',
423 '../net/net.gyp:net',
424 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
431 'VERSION=<(version_full)',
434 'host/curtain_mode.h',
435 'host/curtain_mode_linux.cc',
436 'host/curtain_mode_mac.cc',
437 'host/curtain_mode_win.cc',
438 'host/posix/signal_handler.cc',
439 'host/posix/signal_handler.h',
444 ['exclude', '^host/posix/'],
447 ], # end of 'conditions'
448 }, # end of target 'remoting_me2me_host_static'
450 }], # end of enable_me2me_host==1
452 ['OS!="win" and enable_me2me_host==1', {
455 'target_name': 'remoting_me2me_host',
456 'type': 'executable',
457 'variables': { 'enable_wexit_time_destructors': 1, },
459 '../base/base.gyp:base',
460 '../base/base.gyp:base_i18n',
461 '<(icu_gyp_path):icudata',
462 '../net/net.gyp:net',
463 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
467 'remoting_infoplist_strings',
468 'remoting_me2me_host_static',
472 'VERSION=<(version_full)',
482 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
485 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
486 'INFOPLIST_PREPROCESS': 'YES',
487 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
489 'mac_bundle_resources': [
490 '<(PRODUCT_DIR)/icudtl.dat',
491 'host/disconnect_window.xib',
492 'host/remoting_me2me_host.icns',
493 'host/remoting_me2me_host-Info.plist',
494 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
496 # Localized strings for 'Info.plist'
497 '<!@pymod_do_main(remoting_localize --locale_output '
498 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
499 '--print_only <(remoting_locales))',
501 'mac_bundle_resources!': [
502 'host/remoting_me2me_host-Info.plist',
505 ['mac_breakpad==1', {
507 # A real .dSYM is needed for dump_syms to operate on.
512 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
514 '<(PRODUCT_DIR)/crash_inspector',
515 '<(PRODUCT_DIR)/crash_report_sender.app'
520 '../breakpad/breakpad.gyp:dump_syms',
524 'postbuild_name': 'Dump Symbols',
526 'dump_product_syms_path':
527 'scripts/mac/dump_product_syms',
530 '<(dump_product_syms_path)',
533 }, # end of postbuild 'dump_symbols'
534 ], # end of 'postbuilds'
535 }], # mac_breakpad==1
538 ['OS=="linux" and use_allocator!="none"', {
540 '../base/allocator/allocator.gyp:allocator',
543 ], # end of 'conditions'
544 }, # end of target 'remoting_me2me_host'
546 'target_name': 'remoting_me2me_native_messaging_host',
547 'type': 'executable',
548 'product_name': 'native_messaging_host',
549 'variables': { 'enable_wexit_time_destructors': 1, },
551 '../base/base.gyp:base',
554 'remoting_host_setup_base',
555 'remoting_infoplist_strings',
556 'remoting_native_messaging_base',
559 'VERSION=<(version_full)',
562 'host/setup/me2me_native_messaging_host_entry_point.cc',
563 'host/setup/me2me_native_messaging_host_main.cc',
564 'host/setup/me2me_native_messaging_host_main.h',
567 ['OS=="linux" and use_allocator!="none"', {
569 '../base/allocator/allocator.gyp:allocator',
575 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
578 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
579 'INFOPLIST_PREPROCESS': 'YES',
580 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
582 'mac_bundle_resources': [
583 'host/setup/native_messaging_host-Info.plist',
584 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
586 # Localized strings for 'Info.plist'
587 '<!@pymod_do_main(remoting_localize --locale_output '
588 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
589 '--print_only <(remoting_locales))',
591 'mac_bundle_resources!': [
592 'host/setup/native_messaging_host-Info.plist',
595 ['mac_breakpad==1', {
597 # A real .dSYM is needed for dump_syms to operate on.
602 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
604 '<(PRODUCT_DIR)/crash_inspector',
605 '<(PRODUCT_DIR)/crash_report_sender.app'
610 '../breakpad/breakpad.gyp:dump_syms',
614 'postbuild_name': 'Dump Symbols',
616 'dump_product_syms_path':
617 'scripts/mac/dump_product_syms',
620 '<(dump_product_syms_path)',
623 }, # end of postbuild 'dump_symbols'
624 ], # end of 'postbuilds'
625 }], # mac_breakpad==1
629 }, # end of target 'remoting_me2me_native_messaging_host'
631 }], # end of OS!="win" and enable_me2me_host==1
633 ['OS!="win" and enable_remoting_host==1', {
638 'target_name': 'remoting_it2me_native_messaging_host',
639 'type': 'executable',
640 'product_name': 'remote_assistance_host',
641 'variables': { 'enable_wexit_time_destructors': 1, },
643 '../base/base.gyp:base',
647 'remoting_it2me_host_static',
648 'remoting_native_messaging_base',
652 'VERSION=<(version_full)',
655 'host/it2me/it2me_native_messaging_host_entry_point.cc',
656 'host/it2me/it2me_native_messaging_host_main.cc',
657 'host/it2me/it2me_native_messaging_host_main.h',
660 ['OS=="linux" and chromeos==0 and use_ozone==0', {
662 # Always use GTK on Linux, even for Aura builds.
663 '../build/linux/system.gyp:gtk',
666 ['OS=="linux" and use_allocator!="none"', {
668 '../base/allocator/allocator.gyp:allocator',
674 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
677 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
678 'INFOPLIST_PREPROCESS': 'YES',
679 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
681 'mac_bundle_resources': [
682 '<(PRODUCT_DIR)/icudtl.dat',
683 'host/disconnect_window.xib',
684 'host/it2me/remote_assistance_host-Info.plist',
685 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
687 # Localized strings for 'Info.plist'
688 '<!@pymod_do_main(remoting_localize --locale_output '
689 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
690 '--print_only <(remoting_locales))',
692 'mac_bundle_resources!': [
693 'host/it2me/remote_assistance_host-Info.plist',
696 ['mac_breakpad==1', {
698 # A real .dSYM is needed for dump_syms to operate on.
703 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
705 '<(PRODUCT_DIR)/crash_inspector',
706 '<(PRODUCT_DIR)/crash_report_sender.app'
711 '../breakpad/breakpad.gyp:dump_syms',
715 'postbuild_name': 'Dump Symbols',
717 'dump_product_syms_path':
718 'scripts/mac/dump_product_syms',
721 '<(dump_product_syms_path)',
724 }, # end of postbuild 'dump_symbols'
725 ], # end of 'postbuilds'
726 }], # mac_breakpad==1
729 ], # end of conditions
730 }, # end of target 'remoting_it2me_native_messaging_host'
735 # Dummy target for chromeos==1
736 'target_name': 'remoting_it2me_native_messaging_host',
737 'type': 'executable',
740 }], # end of chromeos==0
741 ], # end of conditions
742 }], # end of OS!="win" and enable_remoting_host==1
743 ], # end of 'conditions'