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