Revert 264226 "Reduce dependency of TiclInvalidationService on P..."
[chromium-blink-merge.git] / remoting / remoting.gyp
blob49cf630b0b039531ead815eb7526640798c4501c
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.
6   'variables': {
7     'chromium_code': 1,
9     # Set this to run the jscompile checks after building the webapp.
10     'run_jscompile%': 0,
12     'variables': {
13       'conditions': [
14         # Enable the multi-process host on Windows by default.
15         ['OS=="win"', {
16           'remoting_multi_process%': 1,
17         }, {
18           'remoting_multi_process%': 0,
19         }],
20       ],
21     },
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',
34     'conditions': [
35       ['OS=="mac"', {
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': '',
40       }],
41       ['os_posix == 1 and OS != "mac" and target_arch == "ia32"', {
42         # linux 32 bit
43         'host_plugin_extension': 'ia32.so',
44         'host_plugin_prefix': 'lib',
45       }],
46       ['os_posix == 1 and OS != "mac" and target_arch == "x64"', {
47         # linux 64 bit
48         'host_plugin_extension': 'x64.so',
49         'host_plugin_prefix': 'lib',
50       }],
51       ['os_posix == 1 and OS != "mac" and target_arch == "arm"', {
52         'host_plugin_extension': 'arm.so',
53         'host_plugin_prefix': 'lib',
54       }],
55       ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
56         'host_plugin_extension': 'mipsel.so',
57         'host_plugin_prefix': 'lib',
58       }],
59       ['OS=="win"', {
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
66         # already.
67         # The IDs are not random to avoid rebuilding host when it's not
68         # necessary.
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)\')")',
73       }],
74     ],
75     'remoting_locales': [
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',
80       'zh-CN', 'zh-TW',
81     ],
82     'remoting_host_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))',
86     ],
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))',
92     ],
93   },
95   'includes': [
96     '../chrome/js_unittest_vars.gypi',
97     'remoting_android.gypi',
98     'remoting_client.gypi',
99     'remoting_host.gypi',
100     'remoting_srcs.gypi',
101     'remoting_test.gypi',
102     'remoting_version.gypi',
103     'remoting_webapp_files.gypi',
104   ],
106   'target_defaults': {
107     'defines': [
108       'BINARY_CORE=1',
109       'BINARY_DESKTOP=2',
110       'BINARY_HOST_ME2ME=3',
111       'BINARY_HOST_PLUGIN=4',
112       'BINARY_NATIVE_MESSAGING_HOST=5',
113       'BINARY_REMOTE_ASSISTANCE_HOST=6',
114     ],
115     'include_dirs': [
116       '..',  # Root of Chrome checkout
117     ],
118     'variables': {
119       'win_debug_RuntimeChecks': '0',
120     },
121     'conditions': [
122       ['OS=="mac" and mac_breakpad==1', {
123         'defines': [
124           'REMOTING_ENABLE_BREAKPAD'
125         ],
126       }],
127       ['OS=="win" and buildtype == "Official"', {
128         'defines': [
129           'REMOTING_ENABLE_BREAKPAD'
130         ],
131       }],
132       ['OS=="win" and remoting_multi_process != 0 and \
133           remoting_rdp_session != 0', {
134         'defines': [
135           'REMOTING_RDP_SESSION',
136         ],
137       }],
138       ['remoting_multi_process != 0', {
139         'defines': [
140           'REMOTING_MULTI_PROCESS',
141         ],
142       }],
143     ],
144   },
146   'targets': [
147     {
148       'target_name': 'remoting_breakpad',
149       'type': 'static_library',
150       'variables': { 'enable_wexit_time_destructors': 1, },
151       'dependencies': [
152         '../base/base.gyp:base',
153       ],
154       'sources': [
155         'base/breakpad.h',
156         'base/breakpad_linux.cc',
157         'base/breakpad_mac.mm',
158         'base/breakpad_win.cc',
159       ],
160       'conditions': [
161         ['OS=="mac"', {
162           'dependencies': [
163             '../breakpad/breakpad.gyp:breakpad',
164           ],
165         }],
166         ['OS=="win"', {
167           'dependencies': [
168             '../breakpad/breakpad.gyp:breakpad_handler',
169           ],
170         }],
171       ],
172     },  # end of target 'remoting_breakpad'
174     {
175       'target_name': 'remoting_resources',
176       'type': 'none',
177       'dependencies': [
178         'remoting_webapp_html',
179       ],
180       'variables': {
181         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
182         'grit_resource_ids': 'resources/resource_ids',
183         'sources': [
184           '<(SHARED_INTERMEDIATE_DIR)/main.html',
185           'base/resources_unittest.cc',
186           'host/continue_window_mac.mm',
187           'host/disconnect_window_mac.mm',
188           'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
189           'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
190           'host/plugin/host_plugin-InfoPlist.strings.jinja2',
191           'host/win/core.rc.jinja2',
192           'host/win/host_messages.mc.jinja2',
193           'host/win/version.rc.jinja2',
194           'resources/play_store_resources.cc',
195           'webapp/background.js',
196           'webapp/butter_bar.js',
197           'webapp/client_screen.js',
198           'webapp/error.js',
199           'webapp/host_list.js',
200           'webapp/host_setup_dialog.js',
201           'webapp/host_table_entry.js',
202           'webapp/manifest.json.jinja2',
203           'webapp/paired_client_manager.js',
204           'webapp/remoting.js',
205         ],
206       },
207       'actions': [
208         {
209           'action_name': 'verify_resources',
210           'inputs': [
211             'resources/remoting_strings.grd',
212             'tools/verify_resources.py',
213             '<@(sources)'
214           ],
215           'outputs': [
216             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
217           ],
218           'action': [
219             'python',
220             'tools/verify_resources.py',
221             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
222             '-r', 'resources/remoting_strings.grd',
223             '<@(sources)',
224          ],
225         },
226         {
227           'action_name': 'remoting_strings',
228           'variables': {
229             'grit_grd_file': 'resources/remoting_strings.grd',
230           },
231           'includes': [ '../build/grit_action.gypi' ],
232         },
233         {
234           'action_name': 'copy_locales',
235           'variables': {
236             'copy_output_dir%': '<(PRODUCT_DIR)',
237           },
238           'inputs': [
239             'tools/build/remoting_copy_locales.py',
240             '<!@pymod_do_main(remoting_copy_locales -i -p <(OS) -g <(grit_out_dir) <(remoting_locales))'
241           ],
242           'outputs': [
243             '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(copy_output_dir) <(remoting_locales))'
244           ],
245           'action': [
246             'python', 'tools/build/remoting_copy_locales.py',
247             '-p', '<(OS)',
248             '-g', '<(grit_out_dir)',
249             '-x', '<(copy_output_dir)/.',
250             '<@(remoting_locales)',
251           ],
252         }
253       ],
254       'includes': [ '../build/grit_target.gypi' ],
255     },  # end of target 'remoting_resources'
257     {
258       'target_name': 'remoting_base',
259       'type': 'static_library',
260       'variables': { 'enable_wexit_time_destructors': 1, },
261       'dependencies': [
262         '../base/base.gyp:base',
263         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
264         '../media/media.gyp:media',
265         '../media/media.gyp:shared_memory_support',
266         '../net/net.gyp:net',
267         '../third_party/libvpx/libvpx.gyp:libvpx',
268         '../third_party/libyuv/libyuv.gyp:libyuv',
269         '../third_party/opus/opus.gyp:opus',
270         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
271         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
272         '../ui/base/ui_base.gyp:ui_base',
273         '../ui/gfx/gfx.gyp:gfx',
274         '../ui/gfx/gfx.gyp:gfx_geometry',
275         'proto/chromotocol.gyp:chromotocol_proto_lib',
276         'remoting_resources',
277       ],
278       'export_dependent_settings': [
279         '../base/base.gyp:base',
280         '../net/net.gyp:net',
281         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
282         'proto/chromotocol.gyp:chromotocol_proto_lib',
283       ],
284       # This target needs a hard dependency because dependent targets
285       # depend on chromotocol_proto_lib for headers.
286       'hard_dependency': 1,
287       'sources': [
288         '<@(remoting_base_sources)',
289       ],
290     },  # end of target 'remoting_base'
292     {
293       'target_name': 'remoting_protocol',
294       'type': 'static_library',
295       'variables': { 'enable_wexit_time_destructors': 1, },
296       'dependencies': [
297         '../base/base.gyp:base',
298         '../crypto/crypto.gyp:crypto',
299         '../jingle/jingle.gyp:jingle_glue',
300         '../jingle/jingle.gyp:notifier',
301         '../net/net.gyp:net',
302         '../third_party/libjingle/libjingle.gyp:libjingle',
303         'remoting_base',
304       ],
305       'export_dependent_settings': [
306         '../third_party/libjingle/libjingle.gyp:libjingle',
307       ],
308       'sources': [
309         '<@(remoting_protocol_sources)',
310       ],
311     },  # end of target 'remoting_protocol'
312   ],  # end of targets