OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
3 # | |
4 # Use of this source code is governed by a BSD-style license | |
5 # that can be found in the LICENSE file in the root of the source | |
6 # tree. An additional intellectual property rights grant can be found | |
7 # in the file PATENTS. All contributing project authors may | |
8 # be found in the AUTHORS file in the root of the source tree. | |
9 | |
10 """This script sets up AppRTC and its dependencies. | |
11 | |
12 Requires that depot_tools is installed and in the PATH. | |
13 | |
14 It will put the result under <output_dir>/collider. | |
15 """ | |
16 | |
17 import os | |
18 import sys | |
19 | |
20 import utils | |
21 | |
22 | |
23 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | |
24 | |
25 def main(argv): | |
26 if len(argv) == 1: | |
27 return 'Usage %s <output_dir>' % argv[0] | |
28 | |
29 output_dir = argv[1] | |
30 apprtc_appengine_mercurial_path = os.path.join( | |
31 SCRIPT_DIR, 'download_apprtc_appengine_and_mercurial.py') | |
32 utils.RunSubprocessWithRetry([apprtc_appengine_mercurial_path, | |
33 output_dir]) | |
34 | |
35 download_golang_path = os.path.join(SCRIPT_DIR, 'download_golang.py') | |
36 utils.RunSubprocessWithRetry([download_golang_path, output_dir]) | |
37 | |
38 # TODO(mbonadei): we probably don't need this anymore. | |
39 # In that case, delete it. | |
40 # copy_apprtc_path = os.path.join(script_path, 'copy_apprtc.py') | |
kjellander_webrtc
2017/05/08 13:28:43
You're probably right. Let's delete it now then.
mbonadei
2017/05/08 15:31:20
Done.
| |
41 # utils.RunSubprocessWithRetry([copy_apprtc_path]) | |
42 | |
43 build_mercurial_path = os.path.join(SCRIPT_DIR, 'build_mercurial_local.py') | |
44 hg_dir = os.path.join(output_dir, 'mercurial') | |
45 utils.RunSubprocessWithRetry([build_mercurial_path, hg_dir]) | |
46 | |
47 build_apprtc_collider_path = os.path.join(SCRIPT_DIR, | |
48 'build_apprtc_collider.py') | |
49 apprtc_src_dir = os.path.join(output_dir, 'apprtc', 'src') | |
50 go_dir = os.path.join(output_dir, 'go') | |
51 collider_dir = os.path.join(output_dir, 'collider') | |
52 utils.RunSubprocessWithRetry([build_apprtc_collider_path, apprtc_src_dir, | |
53 go_dir, hg_dir, collider_dir]) | |
54 | |
55 | |
56 if __name__ == '__main__': | |
57 sys.exit(main(sys.argv)) | |
OLD | NEW |