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 # GN target: //remoting/host:remoting_start_host
305 'target_name': 'remoting_start_host',
306 'type': 'executable',
308 'remoting_host_setup_base',
311 'host/setup/host_starter.cc',
312 'host/setup/host_starter.h',
313 'host/setup/start_host.cc',
316 ['OS=="linux" and use_allocator!="none"', {
318 '../base/allocator/allocator.gyp:allocator',
322 }, # end of target 'remoting_start_host'
324 'target_name': 'remoting_infoplist_strings',
327 'remoting_resources',
330 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
331 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
332 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
333 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
334 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
337 'rule_name': 'generate_strings',
338 'extension': 'jinja2',
340 '<(remoting_localize_path)',
343 '<!@pymod_do_main(remoting_localize --locale_output '
344 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
345 '--print_only <(remoting_locales))',
348 'python', '<(remoting_localize_path)',
349 '--locale_dir', '<(webapp_locale_dir)',
350 '--template', '<(RULE_INPUT_PATH)',
352 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
353 '<@(remoting_locales)',
356 }, # end of target 'remoting_infoplist_strings'
358 # GN version: //remoting/host/it2me:common
359 'target_name': 'remoting_it2me_host_static',
360 'type': 'static_library',
361 'variables': { 'enable_wexit_time_destructors': 1, },
363 '../base/base.gyp:base_i18n',
364 '../components/components.gyp:policy',
365 '../net/net.gyp:net',
368 'remoting_infoplist_strings',
370 'remoting_resources',
373 'VERSION=<(version_full)',
376 '<@(remoting_it2me_host_static_sources)',
378 }, # end of target 'remoting_it2me_host_static'
379 ], # end of 'targets'
380 }], # 'enable_remoting_host==1'
382 ['enable_me2me_host==1', {
385 'target_name': 'remoting_me2me_host_static',
386 'type': 'static_library',
387 'variables': { 'enable_wexit_time_destructors': 1, },
389 '../base/base.gyp:base',
390 '../base/base.gyp:base_i18n',
391 '../components/components.gyp:policy',
392 '../components/components.gyp:policy_component_common',
393 '../net/net.gyp:net',
394 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
401 'VERSION=<(version_full)',
404 'host/curtain_mode.h',
405 'host/curtain_mode_linux.cc',
406 'host/curtain_mode_mac.cc',
407 'host/curtain_mode_win.cc',
408 'host/pam_authorization_factory_posix.cc',
409 'host/pam_authorization_factory_posix.h',
410 'host/posix/signal_handler.cc',
411 'host/posix/signal_handler.h',
412 'host/remoting_me2me_host.cc',
429 ], # end of 'conditions'
430 }, # end of target 'remoting_me2me_host_static'
432 }], # end of enable_me2me_host==1
434 ['OS!="win" and enable_me2me_host==1', {
437 'target_name': 'remoting_me2me_host',
438 'type': 'executable',
439 'variables': { 'enable_wexit_time_destructors': 1, },
441 '../base/base.gyp:base',
442 '../base/base.gyp:base_i18n',
443 '<(icu_gyp_path):icudata',
444 '../net/net.gyp:net',
445 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
449 'remoting_infoplist_strings',
450 'remoting_me2me_host_static',
454 'VERSION=<(version_full)',
464 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
467 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
468 'INFOPLIST_PREPROCESS': 'YES',
469 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
471 'mac_bundle_resources': [
472 '<(PRODUCT_DIR)/icudtl.dat',
473 'host/disconnect_window.xib',
474 'host/remoting_me2me_host.icns',
475 'host/remoting_me2me_host-Info.plist',
476 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
478 # Localized strings for 'Info.plist'
479 '<!@pymod_do_main(remoting_localize --locale_output '
480 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
481 '--print_only <(remoting_locales))',
483 'mac_bundle_resources!': [
484 'host/remoting_me2me_host-Info.plist',
487 ['mac_breakpad==1', {
489 # A real .dSYM is needed for dump_syms to operate on.
494 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
496 '<(PRODUCT_DIR)/crash_inspector',
497 '<(PRODUCT_DIR)/crash_report_sender.app'
502 '../breakpad/breakpad.gyp:dump_syms',
506 'postbuild_name': 'Dump Symbols',
508 'dump_product_syms_path':
509 'scripts/mac/dump_product_syms',
512 '<(dump_product_syms_path)',
515 }, # end of postbuild 'dump_symbols'
516 ], # end of 'postbuilds'
517 }], # mac_breakpad==1
520 ['OS=="linux" and use_allocator!="none"', {
522 '../base/allocator/allocator.gyp:allocator',
525 ], # end of 'conditions'
526 }, # end of target 'remoting_me2me_host'
528 'target_name': 'remoting_me2me_native_messaging_host',
529 'type': 'executable',
530 'product_name': 'native_messaging_host',
531 'variables': { 'enable_wexit_time_destructors': 1, },
533 '../base/base.gyp:base',
536 'remoting_host_setup_base',
537 'remoting_infoplist_strings',
538 'remoting_native_messaging_base',
541 'VERSION=<(version_full)',
544 'host/setup/me2me_native_messaging_host_entry_point.cc',
545 'host/setup/me2me_native_messaging_host_main.cc',
546 'host/setup/me2me_native_messaging_host_main.h',
549 ['OS=="linux" and use_allocator!="none"', {
551 '../base/allocator/allocator.gyp:allocator',
557 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
560 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
561 'INFOPLIST_PREPROCESS': 'YES',
562 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
564 'mac_bundle_resources': [
565 'host/setup/native_messaging_host-Info.plist',
566 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
568 # Localized strings for 'Info.plist'
569 '<!@pymod_do_main(remoting_localize --locale_output '
570 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
571 '--print_only <(remoting_locales))',
573 'mac_bundle_resources!': [
574 'host/setup/native_messaging_host-Info.plist',
577 ['mac_breakpad==1', {
579 # A real .dSYM is needed for dump_syms to operate on.
584 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
586 '<(PRODUCT_DIR)/crash_inspector',
587 '<(PRODUCT_DIR)/crash_report_sender.app'
592 '../breakpad/breakpad.gyp:dump_syms',
596 'postbuild_name': 'Dump Symbols',
598 'dump_product_syms_path':
599 'scripts/mac/dump_product_syms',
602 '<(dump_product_syms_path)',
605 }, # end of postbuild 'dump_symbols'
606 ], # end of 'postbuilds'
607 }], # mac_breakpad==1
611 }, # end of target 'remoting_me2me_native_messaging_host'
613 }], # end of OS!="win" and enable_me2me_host==1
615 ['OS!="win" and enable_remoting_host==1', {
620 'target_name': 'remoting_it2me_native_messaging_host',
621 'type': 'executable',
622 'product_name': 'remote_assistance_host',
623 'variables': { 'enable_wexit_time_destructors': 1, },
625 '../base/base.gyp:base',
629 'remoting_it2me_host_static',
630 'remoting_native_messaging_base',
634 'VERSION=<(version_full)',
637 'host/it2me/it2me_native_messaging_host_entry_point.cc',
638 'host/it2me/it2me_native_messaging_host_main.cc',
639 'host/it2me/it2me_native_messaging_host_main.h',
642 ['OS=="linux" and chromeos==0 and use_ozone==0', {
644 # Always use GTK on Linux, even for Aura builds.
645 '../build/linux/system.gyp:gtk',
648 ['OS=="linux" and use_allocator!="none"', {
650 '../base/allocator/allocator.gyp:allocator',
656 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
659 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
660 'INFOPLIST_PREPROCESS': 'YES',
661 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
663 'mac_bundle_resources': [
664 '<(PRODUCT_DIR)/icudtl.dat',
665 'host/disconnect_window.xib',
666 'host/it2me/remote_assistance_host-Info.plist',
667 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
669 # Localized strings for 'Info.plist'
670 '<!@pymod_do_main(remoting_localize --locale_output '
671 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
672 '--print_only <(remoting_locales))',
674 'mac_bundle_resources!': [
675 'host/it2me/remote_assistance_host-Info.plist',
678 ['mac_breakpad==1', {
680 # A real .dSYM is needed for dump_syms to operate on.
685 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
687 '<(PRODUCT_DIR)/crash_inspector',
688 '<(PRODUCT_DIR)/crash_report_sender.app'
693 '../breakpad/breakpad.gyp:dump_syms',
697 'postbuild_name': 'Dump Symbols',
699 'dump_product_syms_path':
700 'scripts/mac/dump_product_syms',
703 '<(dump_product_syms_path)',
706 }, # end of postbuild 'dump_symbols'
707 ], # end of 'postbuilds'
708 }], # mac_breakpad==1
711 ], # end of conditions
712 }, # end of target 'remoting_it2me_native_messaging_host'
717 # Dummy target for chromeos==1
718 'target_name': 'remoting_it2me_native_messaging_host',
719 'type': 'executable',
722 }], # end of chromeos==0
723 ], # end of conditions
724 }], # end of OS!="win" and enable_remoting_host==1
725 ], # end of 'conditions'