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@")',
40 'remoting_host_credits',
43 '../base/base.gyp:base_i18n',
44 '../components/components.gyp:policy',
45 '../components/components.gyp:policy_component_common',
46 '../crypto/crypto.gyp:crypto',
47 '../google_apis/google_apis.gyp:google_apis',
49 '../ui/events/events.gyp:dom_keycode_converter',
52 'HOST_BUNDLE_NAME="<(host_bundle_name)"',
53 'PREFPANE_BUNDLE_NAME="<(prefpane_bundle_name)"',
54 'VERSION=<(version_full)',
57 '<@(remoting_host_sources)',
64 '../build/linux/system.gyp:x11',
65 '../build/linux/system.gyp:xext',
66 '../build/linux/system.gyp:xfixes',
67 '../build/linux/system.gyp:xi',
68 '../build/linux/system.gyp:xrandr',
69 '../build/linux/system.gyp:xtst',
72 ['chromeos==0 and use_ozone==0', {
74 # use GTK on Linux, even for Aura builds.
75 '../build/linux/system.gyp:gtk',
83 '../ppapi/ppapi_internal.gyp:ppapi_host',
84 '../skia/skia.gyp:skia',
85 '../ui/aura/aura.gyp:aura',
86 '../ui/compositor/compositor.gyp:compositor',
87 '../ui/events/events.gyp:events',
88 '../ui/events/platform/events_platform.gyp:events_platform',
89 '../ui/views/views.gyp:views',
92 '../third_party/skia/include/utils',
95 'host/clipboard_x11.cc',
96 'host/continue_window_linux.cc',
97 'host/disconnect_window_linux.cc',
98 'host/linux/x_server_clipboard.cc',
99 'host/linux/x_server_clipboard.h',
100 'host/local_input_monitor_x11.cc',
105 '../ash/ash.gyp:ash',
110 'host/input_injector_chromeos.cc',
111 'host/input_injector_chromeos.h',
115 '../ui/ozone/ozone.gyp:ozone',
122 '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
126 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
132 '_ATL_NO_EXCEPTIONS',
133 'ISOLATION_AWARE_ENABLED=1',
136 '../sandbox/sandbox.gyp:sandbox',
137 'remoting_host_messages',
141 'VCCLCompilerTool': {
142 # /MP conflicts with #import directive so we limit the number
143 # of processes to spawn to 1.
144 'AdditionalOptions': ['/MP1'],
148 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/host',
151 '<(output_dir)/remoting_host_messages.mc',
156 'direct_dependent_settings': {
162 # Rule to run the message compiler.
163 'rule_name': 'message_compiler',
166 '<(output_dir)/<(RULE_INPUT_ROOT).h',
167 '<(output_dir)/<(RULE_INPUT_ROOT).rc',
171 '-h', '<(output_dir)',
172 '-r', '<(output_dir)/.',
174 '<(RULE_INPUT_PATH)',
176 'process_outputs_as_sources': 1,
177 'message': 'Running message compiler on <(RULE_INPUT_PATH)',
180 ['enable_webrtc==1', {
182 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
183 '../third_party/libjingle/libjingle.gyp:libpeerconnection',
186 '<@(remoting_cast_sources)',
190 }, # end of target 'remoting_host'
193 # GN version: //remoting/host:credits
194 'target_name': 'remoting_host_credits',
198 'action_name': 'Build remoting host credits',
200 '../tools/licenses.py',
201 'host/installer/credits.tmpl',
202 'host/installer/credits_entry.tmpl',
205 '<(SHARED_INTERMEDIATE_DIR)/remoting/CREDITS.txt',
207 'hard_dependency': 1,
209 '../tools/licenses.py',
211 '<(SHARED_INTERMEDIATE_DIR)/remoting/CREDITS.txt',
212 '--file-template', 'host/installer/credits.tmpl',
213 '--entry-template', 'host/installer/credits_entry.tmpl',
220 # GN version: //remoting/host/native_messaging
221 'target_name': 'remoting_native_messaging_base',
222 'type': 'static_library',
223 'variables': { 'enable_wexit_time_destructors': 1, },
225 '../base/base.gyp:base',
228 '<@(remoting_host_native_messaging_sources)',
230 }, # end of target 'remoting_native_messaging_base'
233 # GN version: //remoting/host/setup
234 'target_name': 'remoting_host_setup_base',
235 'type': 'static_library',
236 'variables': { 'enable_wexit_time_destructors': 1, },
238 '../base/base.gyp:base',
239 '../google_apis/google_apis.gyp:google_apis',
243 'VERSION=<(version_full)',
246 '<@(remoting_host_setup_sources)',
253 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
254 'msvs_disabled_warnings': [4267, ],
257 }, # end of target 'remoting_host_setup_base'
259 # Generates native messaging manifest files.
261 'target_name': 'remoting_native_messaging_manifests',
266 'me2me_host_path': 'remoting_native_messaging_host.exe',
267 'it2me_host_path': 'remote_assistance_host.exe',
272 'me2me_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_NAME@")',
273 'native_messaging_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_NAME@")',
274 'remote_assistance_host_bundle_name': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_NAME@")',
276 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(native_messaging_host_bundle_name)/Contents/MacOS/native_messaging_host',
278 '/Library/PrivilegedHelperTools/<(me2me_host_bundle_name)/Contents/MacOS/<(remote_assistance_host_bundle_name)/Contents/MacOS/remote_assistance_host',
281 [ 'OS != "mac" and OS != "win"', {
284 '/opt/google/chrome-remote-desktop/native-messaging-host',
286 '/opt/google/chrome-remote-desktop/remote-assistance-host',
291 'host/it2me/com.google.chrome.remote_assistance.json.jinja2',
292 'host/setup/com.google.chrome.remote_desktop.json.jinja2',
295 'rule_name': 'generate_manifest',
296 'extension': 'jinja2',
298 '<(remoting_localize_path)',
302 '<(PRODUCT_DIR)/remoting/<(RULE_INPUT_ROOT)',
305 'python', '<(remoting_localize_path)',
306 '--define', 'ME2ME_HOST_PATH=<(me2me_host_path)',
307 '--define', 'IT2ME_HOST_PATH=<(it2me_host_path)',
308 '--variables', '<(branding_path)',
309 '--template', '<(RULE_INPUT_PATH)',
310 '--locale_output', '<@(_outputs)',
314 }, # end of target 'remoting_native_messaging_manifests'
316 # GN target: //remoting/host:remoting_start_host
317 'target_name': 'remoting_start_host',
318 'type': 'executable',
320 'remoting_host_setup_base',
323 'host/setup/host_starter.cc',
324 'host/setup/host_starter.h',
325 'host/setup/start_host.cc',
328 ['OS=="linux" and use_allocator!="none"', {
330 '../base/allocator/allocator.gyp:allocator',
334 }, # end of target 'remoting_start_host'
336 'target_name': 'remoting_infoplist_strings',
339 'remoting_resources',
342 'host/remoting_me2me_host-InfoPlist.strings.jinja2',
343 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
344 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
345 'host/setup/native_messaging_host-InfoPlist.strings.jinja2',
346 'host/it2me/remote_assistance_host-InfoPlist.strings.jinja2',
349 'rule_name': 'generate_strings',
350 'extension': 'jinja2',
352 '<(remoting_localize_path)',
355 '<!@pymod_do_main(remoting_localize --locale_output '
356 '"<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings" '
357 '--print_only <(remoting_locales))',
360 'python', '<(remoting_localize_path)',
361 '--locale_dir', '<(webapp_locale_dir)',
362 '--template', '<(RULE_INPUT_PATH)',
364 '<(SHARED_INTERMEDIATE_DIR)/remoting/<(RULE_INPUT_ROOT)/@{json_suffix}.lproj/InfoPlist.strings',
365 '<@(remoting_locales)',
368 }, # end of target 'remoting_infoplist_strings'
370 # GN version: //remoting/host/it2me:common
371 'target_name': 'remoting_it2me_host_static',
372 'type': 'static_library',
373 'variables': { 'enable_wexit_time_destructors': 1, },
375 '../base/base.gyp:base_i18n',
376 '../components/components.gyp:policy',
377 '../net/net.gyp:net',
380 'remoting_infoplist_strings',
382 'remoting_resources',
385 'VERSION=<(version_full)',
388 '<@(remoting_it2me_host_static_sources)',
390 }, # end of target 'remoting_it2me_host_static'
391 ], # end of 'targets'
392 }], # 'enable_remoting_host==1'
394 ['enable_me2me_host==1', {
397 'target_name': 'remoting_me2me_host_static',
398 'type': 'static_library',
399 'variables': { 'enable_wexit_time_destructors': 1, },
401 '../base/base.gyp:base',
402 '../base/base.gyp:base_i18n',
403 '../components/components.gyp:policy',
404 '../components/components.gyp:policy_component_common',
405 '../net/net.gyp:net',
406 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
413 'VERSION=<(version_full)',
416 'host/curtain_mode.h',
417 'host/curtain_mode_linux.cc',
418 'host/curtain_mode_mac.cc',
419 'host/curtain_mode_win.cc',
420 'host/pam_authorization_factory_posix.cc',
421 'host/pam_authorization_factory_posix.h',
422 'host/posix/signal_handler.cc',
423 'host/posix/signal_handler.h',
424 'host/remoting_me2me_host.cc',
441 ['OS=="mac" and buildtype=="Official"', {
443 'internal/internal_mac-inl.h'
446 'USE_REMOTING_MACOSX_INTERNAL'
449 ], # end of 'conditions'
450 }, # end of target 'remoting_me2me_host_static'
452 }], # end of enable_me2me_host==1
454 ['OS!="win" and enable_me2me_host==1', {
457 'target_name': 'remoting_me2me_host',
458 'type': 'executable',
459 'variables': { 'enable_wexit_time_destructors': 1, },
461 '../base/base.gyp:base',
462 '../base/base.gyp:base_i18n',
463 '<(icu_gyp_path):icudata',
464 '../net/net.gyp:net',
465 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
469 'remoting_infoplist_strings',
470 'remoting_me2me_host_static',
474 'VERSION=<(version_full)',
484 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_HOST_BUNDLE_ID@")',
487 'INFOPLIST_FILE': 'host/remoting_me2me_host-Info.plist',
488 'INFOPLIST_PREPROCESS': 'YES',
489 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
491 'mac_bundle_resources': [
492 '<(PRODUCT_DIR)/icudtl.dat',
493 '<(SHARED_INTERMEDIATE_DIR)/remoting/CREDITS.txt',
494 'host/disconnect_window.xib',
495 'host/remoting_me2me_host.icns',
496 'host/remoting_me2me_host-Info.plist',
497 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
499 # Localized strings for 'Info.plist'
500 '<!@pymod_do_main(remoting_localize --locale_output '
501 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remoting_me2me_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
502 '--print_only <(remoting_locales))',
504 'mac_bundle_resources!': [
505 'host/remoting_me2me_host-Info.plist',
508 ['mac_breakpad==1', {
510 # A real .dSYM is needed for dump_syms to operate on.
515 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
517 '<(PRODUCT_DIR)/crash_inspector',
518 '<(PRODUCT_DIR)/crash_report_sender.app'
523 '../breakpad/breakpad.gyp:dump_syms',
527 'postbuild_name': 'Dump Symbols',
529 'dump_product_syms_path':
530 'scripts/mac/dump_product_syms',
533 '<(dump_product_syms_path)',
536 }, # end of postbuild 'dump_symbols'
537 ], # end of 'postbuilds'
538 }], # mac_breakpad==1
541 ['OS=="linux" and use_allocator!="none"', {
543 '../base/allocator/allocator.gyp:allocator',
546 ], # end of 'conditions'
547 }, # end of target 'remoting_me2me_host'
549 'target_name': 'remoting_me2me_native_messaging_host',
550 'type': 'executable',
551 'product_name': 'native_messaging_host',
552 'variables': { 'enable_wexit_time_destructors': 1, },
554 '../base/base.gyp:base',
557 'remoting_host_setup_base',
558 'remoting_infoplist_strings',
559 'remoting_native_messaging_base',
562 'VERSION=<(version_full)',
565 'host/setup/me2me_native_messaging_host_entry_point.cc',
566 'host/setup/me2me_native_messaging_host_main.cc',
567 'host/setup/me2me_native_messaging_host_main.h',
570 ['OS=="linux" and use_allocator!="none"', {
572 '../base/allocator/allocator.gyp:allocator',
578 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_NATIVE_MESSAGING_HOST_BUNDLE_ID@")',
581 'INFOPLIST_FILE': 'host/setup/native_messaging_host-Info.plist',
582 'INFOPLIST_PREPROCESS': 'YES',
583 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
585 'mac_bundle_resources': [
586 'host/setup/native_messaging_host-Info.plist',
587 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
589 # Localized strings for 'Info.plist'
590 '<!@pymod_do_main(remoting_localize --locale_output '
591 '"<(SHARED_INTERMEDIATE_DIR)/remoting/native_messaging_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
592 '--print_only <(remoting_locales))',
594 'mac_bundle_resources!': [
595 'host/setup/native_messaging_host-Info.plist',
598 ['mac_breakpad==1', {
600 # A real .dSYM is needed for dump_syms to operate on.
605 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
607 '<(PRODUCT_DIR)/crash_inspector',
608 '<(PRODUCT_DIR)/crash_report_sender.app'
613 '../breakpad/breakpad.gyp:dump_syms',
617 'postbuild_name': 'Dump Symbols',
619 'dump_product_syms_path':
620 'scripts/mac/dump_product_syms',
623 '<(dump_product_syms_path)',
626 }, # end of postbuild 'dump_symbols'
627 ], # end of 'postbuilds'
628 }], # mac_breakpad==1
632 }, # end of target 'remoting_me2me_native_messaging_host'
634 }], # end of OS!="win" and enable_me2me_host==1
636 ['OS!="win" and enable_remoting_host==1', {
641 'target_name': 'remoting_it2me_native_messaging_host',
642 'type': 'executable',
643 'product_name': 'remote_assistance_host',
644 'variables': { 'enable_wexit_time_destructors': 1, },
646 '../base/base.gyp:base',
650 'remoting_it2me_host_static',
651 'remoting_native_messaging_base',
655 'VERSION=<(version_full)',
658 'host/it2me/it2me_native_messaging_host_entry_point.cc',
659 'host/it2me/it2me_native_messaging_host_main.cc',
660 'host/it2me/it2me_native_messaging_host_main.h',
663 ['OS=="linux" and chromeos==0 and use_ozone==0', {
665 # Always use GTK on Linux, even for Aura builds.
666 '../build/linux/system.gyp:gtk',
669 ['OS=="linux" and use_allocator!="none"', {
671 '../base/allocator/allocator.gyp:allocator',
677 'host_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_REMOTE_ASSISTANCE_HOST_BUNDLE_ID@")',
680 'INFOPLIST_FILE': 'host/it2me/remote_assistance_host-Info.plist',
681 'INFOPLIST_PREPROCESS': 'YES',
682 'INFOPLIST_PREPROCESSOR_DEFINITIONS': 'VERSION_FULL="<(version_full)" VERSION_SHORT="<(version_short)" BUNDLE_ID="<(host_bundle_id)"',
684 'mac_bundle_resources': [
685 '<(PRODUCT_DIR)/icudtl.dat',
686 'host/disconnect_window.xib',
687 'host/it2me/remote_assistance_host-Info.plist',
688 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(PRODUCT_DIR) <(remoting_locales))',
690 # Localized strings for 'Info.plist'
691 '<!@pymod_do_main(remoting_localize --locale_output '
692 '"<(SHARED_INTERMEDIATE_DIR)/remoting/remote_assistance_host-InfoPlist.strings/@{json_suffix}.lproj/InfoPlist.strings" '
693 '--print_only <(remoting_locales))',
695 'mac_bundle_resources!': [
696 'host/it2me/remote_assistance_host-Info.plist',
699 ['mac_breakpad==1', {
701 # A real .dSYM is needed for dump_syms to operate on.
706 'destination': '<(PRODUCT_DIR)/$(CONTENTS_FOLDER_PATH)/Resources',
708 '<(PRODUCT_DIR)/crash_inspector',
709 '<(PRODUCT_DIR)/crash_report_sender.app'
714 '../breakpad/breakpad.gyp:dump_syms',
718 'postbuild_name': 'Dump Symbols',
720 'dump_product_syms_path':
721 'scripts/mac/dump_product_syms',
724 '<(dump_product_syms_path)',
727 }, # end of postbuild 'dump_symbols'
728 ], # end of 'postbuilds'
729 }], # mac_breakpad==1
732 ], # end of conditions
733 }, # end of target 'remoting_it2me_native_messaging_host'
738 # Dummy target for chromeos==1
739 'target_name': 'remoting_it2me_native_messaging_host',
740 'type': 'executable',
743 }], # end of chromeos==0
744 ], # end of conditions
745 }], # end of OS!="win" and enable_remoting_host==1
746 ], # end of 'conditions'