| 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 # ......collection/ | 26 # ......collection/ |
| 27 # ......core/ | 27 # ......core/ |
| 28 # ......coreimpl/ | |
| 29 # ......crypto/ | 28 # ......crypto/ |
| 30 # ......html/ | 29 # ......html/ |
| 31 # ......io/ | 30 # ......io/ |
| 32 # ......isolate/ | 31 # ......isolate/ |
| 33 # ......json/ | 32 # ......json/ |
| 34 # ......math/ | 33 # ......math/ |
| 35 # ......mirrors/ | 34 # ......mirrors/ |
| 36 # ......uri/ | 35 # ......uri/ |
| 37 # ......utf/ | 36 # ......utf/ |
| 38 # ......scalarlist/ | 37 # ......scalarlist/ |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 # | 197 # |
| 199 | 198 |
| 200 LIB = join(SDK_tmp, 'lib') | 199 LIB = join(SDK_tmp, 'lib') |
| 201 os.makedirs(LIB) | 200 os.makedirs(LIB) |
| 202 | 201 |
| 203 # | 202 # |
| 204 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. | 203 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. |
| 205 # | 204 # |
| 206 | 205 |
| 207 os.makedirs(join(LIB, 'html')) | 206 os.makedirs(join(LIB, 'html')) |
| 208 for library in ['_internal', 'collection', 'core', 'coreimpl', 'crypto', 'io', | 207 for library in ['_internal', 'collection', 'core', 'crypto', 'io', 'isolate', |
| 209 'isolate', join('html', 'dart2js'), join('html', 'dartium'), | 208 join('html', 'dart2js'), join('html', 'dartium'), 'json', |
| 210 'json', 'math', 'mirrors', 'scalarlist', 'uri', 'utf']: | 209 'math', 'mirrors', 'scalarlist', 'uri', 'utf']: |
| 211 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), | 210 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), |
| 212 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) | 211 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) |
| 213 | 212 |
| 214 | 213 |
| 215 # Create and copy pkg. | 214 # Create and copy pkg. |
| 216 PKG = join(SDK_tmp, 'pkg') | 215 PKG = join(SDK_tmp, 'pkg') |
| 217 os.makedirs(PKG) | 216 os.makedirs(PKG) |
| 218 | 217 |
| 219 # | 218 # |
| 220 # Create and populate pkg/{args, intl, logging, meta, unittest} | 219 # Create and populate pkg/{args, intl, logging, meta, unittest} |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 302 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 304 f.write(revision + '\n') | 303 f.write(revision + '\n') |
| 305 f.close() | 304 f.close() |
| 306 | 305 |
| 307 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 306 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 308 | 307 |
| 309 move(SDK_tmp, SDK) | 308 move(SDK_tmp, SDK) |
| 310 | 309 |
| 311 if __name__ == '__main__': | 310 if __name__ == '__main__': |
| 312 sys.exit(Main(sys.argv)) | 311 sys.exit(Main(sys.argv)) |
| OLD | NEW |