Update WebFrameTestProxy and WebTestProxy to mostly follow Chrome style.
[chromium-blink-merge.git] / remoting / remoting.gyp
blob0e2ffc8c7285561eebf48928edd38f09904e8ee5
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 == "arm64"', {
56         'host_plugin_extension': 'arm64.so',
57         'host_plugin_prefix': 'lib',
58       }],
59       ['os_posix == 1 and OS != "mac" and target_arch == "mipsel"', {
60         'host_plugin_extension': 'mipsel.so',
61         'host_plugin_prefix': 'lib',
62       }],
63       ['OS=="win"', {
64         'host_plugin_extension': 'dll',
65         'host_plugin_prefix': '',
67         # Each CLSID is a hash of the current version string salted with an
68         # arbitrary GUID. This ensures that the newly installed COM classes will
69         # be used during/after upgrade even if there are old instances running
70         # already.
71         # The IDs are not random to avoid rebuilding host when it's not
72         # necessary.
73         'daemon_controller_clsid':
74             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'655bd819-c08c-4b04-80c2-f160739ff6ef\'), \'<(version_full)\')")',
75         'rdp_desktop_session_clsid':
76             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'6a7699f0-ee43-43e7-aa30-a6738f9bd470\'), \'<(version_full)\')")',
77       }],
78     ],
79     'remoting_locales': [
80       'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es',
81       'es-419', 'et', 'fi', 'fil', 'fr', 'he', 'hi', 'hr', 'hu', 'id',
82       'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT',
83       'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi',
84       'zh-CN', 'zh-TW',
85     ],
86     'remoting_host_locale_files': [
87       # Build the list of .pak files generated from remoting_strings.grd.
88       '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x '
89           '<(PRODUCT_DIR) <(remoting_locales))',
90     ],
91     'remoting_webapp_locale_files': [
92       # Build the list of .json files generated from remoting_strings.grd.
93       '<!@pymod_do_main(remoting_localize --locale_output '
94           '"<(webapp_locale_dir)/@{json_suffix}/messages.json" '
95           '--print_only <(remoting_locales))',
96     ],
97   },
99   'includes': [
100     '../chrome/js_unittest_vars.gypi',
101     'remoting_android.gypi',
102     'remoting_client.gypi',
103     'remoting_host.gypi',
104     'remoting_srcs.gypi',
105     'remoting_test.gypi',
106     'remoting_version.gypi',
107     'remoting_webapp_files.gypi',
108   ],
110   'target_defaults': {
111     'defines': [
112       'BINARY_CORE=1',
113       'BINARY_DESKTOP=2',
114       'BINARY_HOST_ME2ME=3',
115       'BINARY_HOST_PLUGIN=4',
116       'BINARY_NATIVE_MESSAGING_HOST=5',
117       'BINARY_REMOTE_ASSISTANCE_HOST=6',
118     ],
119     'include_dirs': [
120       '..',  # Root of Chrome checkout
121     ],
122     'variables': {
123       'win_debug_RuntimeChecks': '0',
124     },
125     'conditions': [
126       ['OS=="mac" and mac_breakpad==1', {
127         'defines': [
128           'REMOTING_ENABLE_BREAKPAD'
129         ],
130       }],
131       ['OS=="win" and buildtype == "Official"', {
132         'defines': [
133           'REMOTING_ENABLE_BREAKPAD'
134         ],
135       }],
136       ['OS=="win" and remoting_multi_process != 0 and \
137           remoting_rdp_session != 0', {
138         'defines': [
139           'REMOTING_RDP_SESSION',
140         ],
141       }],
142       ['remoting_multi_process != 0', {
143         'defines': [
144           'REMOTING_MULTI_PROCESS',
145         ],
146       }],
147     ],
148   },
150   'targets': [
151     {
152       'target_name': 'remoting_breakpad',
153       'type': 'static_library',
154       'variables': { 'enable_wexit_time_destructors': 1, },
155       'dependencies': [
156         '../base/base.gyp:base',
157       ],
158       'sources': [
159         'base/breakpad.h',
160         'base/breakpad_linux.cc',
161         'base/breakpad_mac.mm',
162         'base/breakpad_win.cc',
163       ],
164       'conditions': [
165         ['OS=="mac"', {
166           'dependencies': [
167             '../breakpad/breakpad.gyp:breakpad',
168           ],
169         }],
170         ['OS=="win"', {
171           'dependencies': [
172             '../breakpad/breakpad.gyp:breakpad_handler',
173           ],
174         }],
175       ],
176     },  # end of target 'remoting_breakpad'
178     {
179       'target_name': 'remoting_resources',
180       'type': 'none',
181       'dependencies': [
182         'remoting_webapp_html',
183       ],
184       'variables': {
185         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
186         'grit_resource_ids': 'resources/resource_ids',
187         'sources': [
188           '<(SHARED_INTERMEDIATE_DIR)/main.html',
189           'base/resources_unittest.cc',
190           'host/continue_window_mac.mm',
191           'host/disconnect_window_mac.mm',
192           'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
193           'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
194           'host/plugin/host_plugin-InfoPlist.strings.jinja2',
195           'host/win/core.rc.jinja2',
196           'host/win/host_messages.mc.jinja2',
197           'host/win/version.rc.jinja2',
198           'resources/play_store_resources.cc',
199           'webapp/background.js',
200           'webapp/butter_bar.js',
201           'webapp/client_screen.js',
202           'webapp/error.js',
203           'webapp/host_list.js',
204           'webapp/host_setup_dialog.js',
205           'webapp/host_table_entry.js',
206           'webapp/manifest.json.jinja2',
207           'webapp/paired_client_manager.js',
208           'webapp/remoting.js',
209           'webapp/window_frame.js',
210         ],
211       },
212       'actions': [
213         {
214           'action_name': 'verify_resources',
215           'inputs': [
216             'resources/remoting_strings.grd',
217             'tools/verify_resources.py',
218             '<@(sources)'
219           ],
220           'outputs': [
221             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
222           ],
223           'action': [
224             'python',
225             'tools/verify_resources.py',
226             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
227             '-r', 'resources/remoting_strings.grd',
228             '<@(sources)',
229          ],
230         },
231         {
232           'action_name': 'remoting_strings',
233           'variables': {
234             'grit_grd_file': 'resources/remoting_strings.grd',
235           },
236           'includes': [ '../build/grit_action.gypi' ],
237         },
238         {
239           'action_name': 'copy_locales',
240           'variables': {
241             'copy_output_dir%': '<(PRODUCT_DIR)',
242           },
243           'inputs': [
244             'tools/build/remoting_copy_locales.py',
245             '<!@pymod_do_main(remoting_copy_locales -i -p <(OS) -g <(grit_out_dir) <(remoting_locales))'
246           ],
247           'outputs': [
248             '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(copy_output_dir) <(remoting_locales))'
249           ],
250           'action': [
251             'python', 'tools/build/remoting_copy_locales.py',
252             '-p', '<(OS)',
253             '-g', '<(grit_out_dir)',
254             '-x', '<(copy_output_dir)/.',
255             '<@(remoting_locales)',
256           ],
257         }
258       ],
259       'includes': [ '../build/grit_target.gypi' ],
260     },  # end of target 'remoting_resources'
262     {
263       'target_name': 'remoting_base',
264       'type': 'static_library',
265       'variables': { 'enable_wexit_time_destructors': 1, },
266       'dependencies': [
267         '../base/base.gyp:base',
268         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
269         '../media/media.gyp:media',
270         '../media/media.gyp:shared_memory_support',
271         '../net/net.gyp:net',
272         '../third_party/libvpx/libvpx.gyp:libvpx',
273         '../third_party/libyuv/libyuv.gyp:libyuv',
274         '../third_party/opus/opus.gyp:opus',
275         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
276         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
277         '../ui/base/ui_base.gyp:ui_base',
278         '../ui/gfx/gfx.gyp:gfx',
279         '../ui/gfx/gfx.gyp:gfx_geometry',
280         'proto/chromotocol.gyp:chromotocol_proto_lib',
281         'remoting_resources',
282       ],
283       'export_dependent_settings': [
284         '../base/base.gyp:base',
285         '../net/net.gyp:net',
286         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
287         'proto/chromotocol.gyp:chromotocol_proto_lib',
288       ],
289       # This target needs a hard dependency because dependent targets
290       # depend on chromotocol_proto_lib for headers.
291       'hard_dependency': 1,
292       'sources': [
293         '<@(remoting_base_sources)',
294       ],
295     },  # end of target 'remoting_base'
297     {
298       'target_name': 'remoting_protocol',
299       'type': 'static_library',
300       'variables': { 'enable_wexit_time_destructors': 1, },
301       'dependencies': [
302         '../base/base.gyp:base',
303         '../crypto/crypto.gyp:crypto',
304         '../jingle/jingle.gyp:jingle_glue',
305         '../jingle/jingle.gyp:notifier',
306         '../net/net.gyp:net',
307         '../third_party/libjingle/libjingle.gyp:libjingle',
308         'remoting_base',
309       ],
310       'export_dependent_settings': [
311         '../third_party/libjingle/libjingle.gyp:libjingle',
312       ],
313       'sources': [
314         '<@(remoting_protocol_sources)',
315       ],
316     },  # end of target 'remoting_protocol'
317   ],  # end of targets