| 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 # ......dartanalyzer | 19 # ......dartanalyzer |
| 20 # ......pub | 20 # ......pub |
| 21 # ......snapshots/ | 21 # ......snapshots/ |
| 22 # ........utils_wrapper.dart.snapshot | 22 # ........utils_wrapper.dart.snapshot |
| 23 # ........pub.dart.snapshot | 23 # ........pub.dart.snapshot |
| 24 # ....include/ | 24 # ....include/ |
| 25 # ......dart_api.h | 25 # ......dart_api.h |
| 26 # ......dart_debugger_api.h | 26 # ......dart_debugger_api.h |
| 27 # ......dart_mirrors_api.h |
| 28 # ......dart_native_api.h |
| 27 # ....lib/ | 29 # ....lib/ |
| 28 # ......_internal/ | 30 # ......_internal/ |
| 29 # ......async/ | 31 # ......async/ |
| 30 # ......collection/ | 32 # ......collection/ |
| 31 # ......_collection_dev/ | 33 # ......_collection_dev/ |
| 32 # ......core/ | 34 # ......core/ |
| 33 # ......crypto/ | 35 # ......crypto/ |
| 34 # ......html/ | 36 # ......html/ |
| 35 # ......io/ | 37 # ......io/ |
| 36 # ......isolate/ | 38 # ......isolate/ |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 169 |
| 168 # | 170 # |
| 169 # Create and populate sdk/include. | 171 # Create and populate sdk/include. |
| 170 # | 172 # |
| 171 INCLUDE = join(SDK_tmp, 'include') | 173 INCLUDE = join(SDK_tmp, 'include') |
| 172 os.makedirs(INCLUDE) | 174 os.makedirs(INCLUDE) |
| 173 copyfile(join(HOME, 'runtime', 'include', 'dart_api.h'), | 175 copyfile(join(HOME, 'runtime', 'include', 'dart_api.h'), |
| 174 join(INCLUDE, 'dart_api.h')) | 176 join(INCLUDE, 'dart_api.h')) |
| 175 copyfile(join(HOME, 'runtime', 'include', 'dart_debugger_api.h'), | 177 copyfile(join(HOME, 'runtime', 'include', 'dart_debugger_api.h'), |
| 176 join(INCLUDE, 'dart_debugger_api.h')) | 178 join(INCLUDE, 'dart_debugger_api.h')) |
| 179 copyfile(join(HOME, 'runtime', 'include', 'dart_mirrors_api.h'), |
| 180 join(INCLUDE, 'dart_mirrors_api.h')) |
| 181 copyfile(join(HOME, 'runtime', 'include', 'dart_native_api.h'), |
| 182 join(INCLUDE, 'dart_native_api.h')) |
| 177 | 183 |
| 178 # | 184 # |
| 179 # Create and populate sdk/lib. | 185 # Create and populate sdk/lib. |
| 180 # | 186 # |
| 181 | 187 |
| 182 LIB = join(SDK_tmp, 'lib') | 188 LIB = join(SDK_tmp, 'lib') |
| 183 os.makedirs(LIB) | 189 os.makedirs(LIB) |
| 184 | 190 |
| 185 # | 191 # |
| 186 # Create and populate lib/{core, crypto, isolate, json, utf, ...}. | 192 # Create and populate lib/{core, crypto, isolate, json, utf, ...}. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 255 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 250 f.write(revision + '\n') | 256 f.write(revision + '\n') |
| 251 f.close() | 257 f.close() |
| 252 | 258 |
| 253 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 259 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 254 | 260 |
| 255 move(SDK_tmp, SDK) | 261 move(SDK_tmp, SDK) |
| 256 | 262 |
| 257 if __name__ == '__main__': | 263 if __name__ == '__main__': |
| 258 sys.exit(Main(sys.argv)) | 264 sys.exit(Main(sys.argv)) |
| OLD | NEW |