OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 # A script which will be invoked from gyp to create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
8 # | 8 # |
9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
10 # | 10 # |
11 # The SDK will be used either from the command-line or from the editor. | 11 # The SDK will be used either from the command-line or from the editor. |
12 # Top structure is | 12 # Top structure is |
13 # | 13 # |
14 # ..dart-sdk/ | 14 # ..dart-sdk/ |
15 # ....bin/ | 15 # ....bin/ |
16 # ......dart or dart.exe (executable) | 16 # ......dart or dart.exe (executable) |
17 # ......dart.lib (import library for VM native extensions on Windows) | 17 # ......dart.lib (import library for VM native extensions on Windows) |
18 # ......dart2js | 18 # ......dart2js |
19 # ......dart_analyzer | 19 # ......dart_analyzer |
20 # ......pub | 20 # ......pub |
21 # ....include/ | 21 # ....include/ |
22 # ......dart_api.h | 22 # ......dart_api.h |
23 # ......dart_debugger_api.h | 23 # ......dart_debugger_api.h |
24 # ....lib/ | 24 # ....lib/ |
25 # ......_internal/ | 25 # ......_internal/ |
26 # ......async/ | 26 # ......async/ |
27 # ......collection/ | 27 # ......collection/ |
| 28 # ......collection_dev/ |
28 # ......core/ | 29 # ......core/ |
29 # ......crypto/ | 30 # ......crypto/ |
30 # ......html/ | 31 # ......html/ |
31 # ......io/ | 32 # ......io/ |
32 # ......isolate/ | 33 # ......isolate/ |
33 # ......json/ | 34 # ......json/ |
34 # ......math/ | 35 # ......math/ |
35 # ......mirrors/ | 36 # ......mirrors/ |
36 # ......uri/ | 37 # ......uri/ |
37 # ......utf/ | 38 # ......utf/ |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 # | 192 # |
192 | 193 |
193 LIB = join(SDK_tmp, 'lib') | 194 LIB = join(SDK_tmp, 'lib') |
194 os.makedirs(LIB) | 195 os.makedirs(LIB) |
195 | 196 |
196 # | 197 # |
197 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. | 198 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. |
198 # | 199 # |
199 | 200 |
200 os.makedirs(join(LIB, 'html')) | 201 os.makedirs(join(LIB, 'html')) |
201 for library in ['_internal', 'async', 'collection', 'core', 'crypto', 'io', | 202 for library in ['_internal', 'async', 'collection', 'collection_dev', 'core', |
202 'isolate', join('html', 'dart2js'), join('html', 'dartium'), | 203 'crypto', 'io', 'isolate', join('html', 'dart2js'), |
| 204 join('html', 'dartium'), |
203 join('html', 'html_common'), join('indexed_db', 'dart2js'), | 205 join('html', 'html_common'), join('indexed_db', 'dart2js'), |
204 join('indexed_db', 'dartium'), 'json', 'math', 'mirrors', | 206 join('indexed_db', 'dartium'), 'json', 'math', 'mirrors', |
205 'scalarlist', join('svg', 'dart2js'), join('svg', 'dartium'), | 207 'scalarlist', join('svg', 'dart2js'), join('svg', 'dartium'), |
206 'uri', 'utf', join('web_audio', 'dart2js'), | 208 'uri', 'utf', join('web_audio', 'dart2js'), |
207 join('web_audio', 'dartium')]: | 209 join('web_audio', 'dartium')]: |
208 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), | 210 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), |
209 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) | 211 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) |
210 | 212 |
211 | 213 |
212 # Create and copy pkg. | 214 # Create and copy pkg. |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 307 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
306 f.write(revision + '\n') | 308 f.write(revision + '\n') |
307 f.close() | 309 f.close() |
308 | 310 |
309 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 311 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
310 | 312 |
311 move(SDK_tmp, SDK) | 313 move(SDK_tmp, SDK) |
312 | 314 |
313 if __name__ == '__main__': | 315 if __name__ == '__main__': |
314 sys.exit(Main(sys.argv)) | 316 sys.exit(Main(sys.argv)) |
OLD | NEW |