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.
9 # Set this to run the jscompile checks after building the webapp.
14 # Enable the multi-process host on Windows by default.
16 'remoting_multi_process%': 1,
18 'remoting_multi_process%': 0,
23 'remoting_multi_process%': '<(remoting_multi_process)',
24 'remoting_rdp_session%': 1,
26 'remoting_localize_path': 'tools/build/remoting_localize.py',
28 'branding_path': '../remoting/branding_<(branding)',
30 'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
32 'host_plugin_mime_type': 'application/vnd.chromium.remoting-host',
36 'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
37 'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
38 'host_plugin_extension': 'plugin',
39 'host_plugin_prefix': '',
41 ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
43 'host_plugin_extension': 'ia32.so',
44 'host_plugin_prefix': 'lib',
46 ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
48 'host_plugin_extension': 'x64.so',
49 'host_plugin_prefix': 'lib',
51 ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
52 'host_plugin_extension': 'arm.so',
53 'host_plugin_prefix': 'lib',
55 ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
56 'host_plugin_extension': 'mipsel.so',
57 'host_plugin_prefix': 'lib',
60 'host_plugin_extension': 'dll',
61 'host_plugin_prefix': '',
63 # Each CLSID is a hash of the current version string salted with an
64 # arbitrary GUID. This ensures that the newly installed COM classes will
65 # be used during/after upgrade even if there are old instances running
67 # The IDs are not random to avoid rebuilding host when it's not
69 'daemon_controller_clsid':
70 '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'655bd819-c08c-4b04-80c2-f160739ff6ef\'), \'<(version_full)\')")',
71 'rdp_desktop_session_clsid':
72 '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'6a7699f0-ee43-43e7-aa30-a6738f9bd470\'), \'<(version_full)\')")',
76 'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es',
77 'es-419', 'et', 'fi', 'fil', 'fr', 'he', 'hi', 'hr', 'hu', 'id',
78 'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT',
79 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi',
82 'remoting_locale_files': [
83 # Build the list of .pak files generated from remoting_strings.grd.
84 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x '
85 '<(PRODUCT_DIR) <(remoting_locales))',
87 'remoting_webapp_locale_files': [
88 # Build the list of .json files generated from remoting_strings.grd.
89 '<!@pymod_do_main(remoting_localize --locale_output '
90 '"<(webapp_locale_dir)/@{json_suffix}/messages.json" '
91 '--print_only <(remoting_locales))',
96 '../chrome/js_unittest_vars.gypi',
97 'remoting_android.gypi',
98 'remoting_client.gypi',
100 'remoting_srcs.gypi',
101 'remoting_test.gypi',
102 'remoting_version.gypi',
103 'remoting_webapp_files.gypi',
110 'BINARY_HOST_ME2ME=3',
111 'BINARY_HOST_PLUGIN=4',
112 'BINARY_NATIVE_MESSAGING_HOST=5',
113 'BINARY_REMOTE_ASSISTANCE_HOST=6',
116 '..', # Root of Chrome checkout
119 'win_debug_RuntimeChecks': '0',
122 ['OS=="mac" and mac_breakpad==1', {
124 'REMOTING_ENABLE_BREAKPAD'
127 ['OS=="win" and buildtype == "Official"', {
129 'REMOTING_ENABLE_BREAKPAD'
132 ['OS=="win" and remoting_multi_process != 0 and \
133 remoting_rdp_session != 0', {
135 'REMOTING_RDP_SESSION',
138 ['remoting_multi_process != 0', {
140 'REMOTING_MULTI_PROCESS',
148 'target_name': 'remoting_breakpad',
149 'type': 'static_library',
150 'variables': { 'enable_wexit_time_destructors': 1, },
152 '../base/base.gyp:base',
156 'base/breakpad_linux.cc',
157 'base/breakpad_mac.mm',
158 'base/breakpad_win.cc',
163 '../breakpad/breakpad.gyp:breakpad',
168 '../breakpad/breakpad.gyp:breakpad_handler',
172 }, # end of target 'remoting_breakpad'
174 # TODO(garykac): This target should be moved into remoting_client.gypi.
175 # It can't currently because of an issue with GYP where initialized
176 # path variables in gypi includes cause a GYP failure.
177 # See crrev.com/15968005 and crrev.com/15972007 for context.
179 'target_name': 'remoting_webapp',
182 'remoting_webapp_patch_files': [
183 'webapp/appsv2.patch',
185 'remoting_webapp_apps_v2_js_files': [
186 'webapp/background.js',
188 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
189 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
190 'generated_html_files': [
191 '<(SHARED_INTERMEDIATE_DIR)/main.html',
192 '<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
196 'remoting_resources',
197 'remoting_host_plugin',
198 'remoting_webapp_html',
201 '<@(remoting_webapp_locale_files)',
204 ['enable_remoting_host==1', {
206 '<@(remoting_locale_files)',
209 'plugin_path': '<(PRODUCT_DIR)/<(host_plugin_prefix)remoting_host_plugin.<(host_plugin_extension)',
216 'remoting_host_plugin',
219 ['run_jscompile != 0', {
221 'success_stamp': '<(PRODUCT_DIR)/remoting_webapp_jscompile.stamp',
225 'action_name': 'Verify remoting webapp',
227 '<@(remoting_webapp_all_js_files)',
228 '<@(remoting_webapp_js_proto_files)',
234 'python', 'tools/jscompile.py',
235 '<@(remoting_webapp_all_js_files)',
236 '<@(remoting_webapp_js_proto_files)',
246 'action_name': 'Build Remoting WebApp',
248 'webapp/build-webapp.py',
249 '<(chrome_version_path)',
250 '<(remoting_version_path)',
251 '<@(generated_html_files)',
252 '<@(remoting_webapp_files)',
256 ['enable_remoting_host==1', {
267 'python', 'webapp/build-webapp.py',
270 '<(host_plugin_mime_type)',
274 '<@(generated_html_files)',
275 '<@(remoting_webapp_files)',
281 'target_conditions': [
282 # We cannot currently build the appsv2 version of WebApp on Windows as
283 # there isn't a version of the "patch" tool available on windows. We
284 # should remove this condition when we remove the reliance on patch.
286 # We define this in a 'target_conditions' section because 'plugin_path'
287 # is defined in a 'conditions' section so its value is not available
288 # when gyp processes the 'actions' in a 'conditions" section.
292 'action_name': 'Build Remoting WebApp V2',
293 'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.v2',
294 'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2.zip',
296 'webapp/build-webapp.py',
297 '<(chrome_version_path)',
298 '<(remoting_version_path)',
299 '<@(remoting_webapp_apps_v2_js_files)',
300 '<@(remoting_webapp_files)',
301 '<@(remoting_webapp_locale_files)',
302 '<@(remoting_webapp_patch_files)',
305 ['enable_remoting_host==1', {
316 'python', 'webapp/build-webapp.py',
319 '<(host_plugin_mime_type)',
323 '<@(remoting_webapp_apps_v2_js_files)',
324 '<@(remoting_webapp_files)',
326 '<@(remoting_webapp_locale_files)',
328 '<@(remoting_webapp_patch_files)',
334 }, # end of target 'remoting_webapp'
337 'target_name': 'remoting_webapp_html',
341 'action_name': 'Build Remoting Webapp main.html',
343 'webapp/build-html.py',
344 '<(remoting_webapp_template_main)',
345 '<@(remoting_webapp_template_files)',
348 '<(SHARED_INTERMEDIATE_DIR)/main.html',
351 'python', 'webapp/build-html.py',
352 '<(SHARED_INTERMEDIATE_DIR)/main.html',
353 '<(remoting_webapp_template_main)',
355 '<@(remoting_webapp_template_files)',
357 '<@(remoting_webapp_main_html_js_files)',
361 'action_name': 'Build Remoting Webapp wcs_sandbox.html',
363 'webapp/build-html.py',
364 '<(remoting_webapp_template_wcs_sandbox)',
367 '<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
370 'python', 'webapp/build-html.py',
371 '<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
372 '<(remoting_webapp_template_wcs_sandbox)',
374 '<@(remoting_webapp_wcs_sandbox_html_js_files)',
378 }, # end of target 'remoting_webapp_html'
381 'target_name': 'remoting_resources',
384 'remoting_webapp_html',
387 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
388 'grit_resource_ids': 'resources/resource_ids',
390 '<(SHARED_INTERMEDIATE_DIR)/main.html',
391 'base/resources_unittest.cc',
392 'host/continue_window_mac.mm',
393 'host/disconnect_window_mac.mm',
394 'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
395 'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
396 'host/plugin/host_plugin-InfoPlist.strings.jinja2',
397 'host/win/core.rc.jinja2',
398 'host/win/host_messages.mc.jinja2',
399 'host/win/version.rc.jinja2',
400 'webapp/background.js',
401 'webapp/butter_bar.js',
402 'webapp/client_screen.js',
404 'webapp/host_list.js',
405 'webapp/host_setup_dialog.js',
406 'webapp/host_table_entry.js',
407 'webapp/manifest.json',
408 'webapp/paired_client_manager.js',
409 'webapp/remoting.js',
414 'action_name': 'verify_resources',
416 'resources/remoting_strings.grd',
417 'tools/verify_resources.py',
421 '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
425 'tools/verify_resources.py',
426 '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
427 '-r', 'resources/remoting_strings.grd',
432 'action_name': 'remoting_strings',
434 'grit_grd_file': 'resources/remoting_strings.grd',
436 'includes': [ '../build/grit_action.gypi' ],
439 'action_name': 'copy_locales',
441 'copy_output_dir%': '<(PRODUCT_DIR)',
444 'tools/build/remoting_copy_locales.py',
445 '<!@pymod_do_main(remoting_copy_locales -i -p <(OS) -g <(grit_out_dir) <(remoting_locales))'
448 '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(copy_output_dir) <(remoting_locales))'
451 'python', 'tools/build/remoting_copy_locales.py',
453 '-g', '<(grit_out_dir)',
454 '-x', '<(copy_output_dir)/.',
455 '<@(remoting_locales)',
459 'includes': [ '../build/grit_target.gypi' ],
460 }, # end of target 'remoting_resources'
463 'target_name': 'remoting_base',
464 'type': 'static_library',
465 'variables': { 'enable_wexit_time_destructors': 1, },
467 '../base/base.gyp:base',
468 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
469 '../ui/gfx/gfx.gyp:gfx',
470 '../ui/gfx/gfx.gyp:gfx_geometry',
472 '../net/net.gyp:net',
473 '../third_party/libvpx/libvpx.gyp:libvpx',
474 '../third_party/libyuv/libyuv.gyp:libyuv',
475 '../third_party/opus/opus.gyp:opus',
476 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
477 '../media/media.gyp:media',
478 '../media/media.gyp:shared_memory_support',
479 'remoting_resources',
480 'proto/chromotocol.gyp:chromotocol_proto_lib',
481 '../third_party/webrtc/modules/modules.gyp:desktop_capture',
483 'export_dependent_settings': [
484 '../base/base.gyp:base',
485 '../net/net.gyp:net',
486 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
487 'proto/chromotocol.gyp:chromotocol_proto_lib',
489 # This target needs a hard dependency because dependent targets
490 # depend on chromotocol_proto_lib for headers.
491 'hard_dependency': 1,
493 '<@(remoting_base_sources)',
495 }, # end of target 'remoting_base'
498 'target_name': 'remoting_protocol',
499 'type': 'static_library',
500 'variables': { 'enable_wexit_time_destructors': 1, },
502 '../base/base.gyp:base',
503 '../crypto/crypto.gyp:crypto',
504 '../jingle/jingle.gyp:jingle_glue',
505 '../jingle/jingle.gyp:notifier',
506 '../net/net.gyp:net',
507 '../third_party/libjingle/libjingle.gyp:libjingle',
510 'export_dependent_settings': [
511 '../third_party/libjingle/libjingle.gyp:libjingle',
514 '<@(remoting_protocol_sources)',
516 }, # end of target 'remoting_protocol'