| 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 # |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 # ......pub | 21 # ......pub |
| 22 # ......snapshots/ | 22 # ......snapshots/ |
| 23 # ........analysis_server.dart.snapshot | 23 # ........analysis_server.dart.snapshot |
| 24 # ........dart2js.dart.snapshot | 24 # ........dart2js.dart.snapshot |
| 25 # ........dartanalyzer.dart.snapshot | 25 # ........dartanalyzer.dart.snapshot |
| 26 # ........dartfmt.dart.snapshot | 26 # ........dartfmt.dart.snapshot |
| 27 # ........pub.dart.snapshot | 27 # ........pub.dart.snapshot |
| 28 # ........utils_wrapper.dart.snapshot | 28 # ........utils_wrapper.dart.snapshot |
| 29 # ....include/ | 29 # ....include/ |
| 30 # ......dart_api.h | 30 # ......dart_api.h |
| 31 # ......dart_debugger_api.h | |
| 32 # ......dart_mirrors_api.h | 31 # ......dart_mirrors_api.h |
| 33 # ......dart_native_api.h | 32 # ......dart_native_api.h |
| 33 # ......dart_tools_api.h |
| 34 # ....lib/ | 34 # ....lib/ |
| 35 # ......_internal/ | 35 # ......_internal/ |
| 36 # ......async/ | 36 # ......async/ |
| 37 # ......collection/ | 37 # ......collection/ |
| 38 # ......convert/ | 38 # ......convert/ |
| 39 # ......core/ | 39 # ......core/ |
| 40 # ......html/ | 40 # ......html/ |
| 41 # ......internal/ | 41 # ......internal/ |
| 42 # ......io/ | 42 # ......io/ |
| 43 # ......isolate/ | 43 # ......isolate/ |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 elif HOST_OS == 'macos': | 175 elif HOST_OS == 'macos': |
| 176 subprocess.call(['strip', '-x', dart_dest_binary]) | 176 subprocess.call(['strip', '-x', dart_dest_binary]) |
| 177 | 177 |
| 178 # | 178 # |
| 179 # Create and populate sdk/include. | 179 # Create and populate sdk/include. |
| 180 # | 180 # |
| 181 INCLUDE = join(SDK_tmp, 'include') | 181 INCLUDE = join(SDK_tmp, 'include') |
| 182 os.makedirs(INCLUDE) | 182 os.makedirs(INCLUDE) |
| 183 copyfile(join(HOME, 'runtime', 'include', 'dart_api.h'), | 183 copyfile(join(HOME, 'runtime', 'include', 'dart_api.h'), |
| 184 join(INCLUDE, 'dart_api.h')) | 184 join(INCLUDE, 'dart_api.h')) |
| 185 copyfile(join(HOME, 'runtime', 'include', 'dart_debugger_api.h'), | |
| 186 join(INCLUDE, 'dart_debugger_api.h')) | |
| 187 copyfile(join(HOME, 'runtime', 'include', 'dart_mirrors_api.h'), | 185 copyfile(join(HOME, 'runtime', 'include', 'dart_mirrors_api.h'), |
| 188 join(INCLUDE, 'dart_mirrors_api.h')) | 186 join(INCLUDE, 'dart_mirrors_api.h')) |
| 189 copyfile(join(HOME, 'runtime', 'include', 'dart_native_api.h'), | 187 copyfile(join(HOME, 'runtime', 'include', 'dart_native_api.h'), |
| 190 join(INCLUDE, 'dart_native_api.h')) | 188 join(INCLUDE, 'dart_native_api.h')) |
| 189 copyfile(join(HOME, 'runtime', 'include', 'dart_tools_api.h'), |
| 190 join(INCLUDE, 'dart_tools_api.h')) |
| 191 | 191 |
| 192 # | 192 # |
| 193 # Create and populate sdk/lib. | 193 # Create and populate sdk/lib. |
| 194 # | 194 # |
| 195 | 195 |
| 196 LIB = join(SDK_tmp, 'lib') | 196 LIB = join(SDK_tmp, 'lib') |
| 197 os.makedirs(LIB) | 197 os.makedirs(LIB) |
| 198 | 198 |
| 199 # | 199 # |
| 200 # Create and populate lib/{async, core, isolate, ...}. | 200 # Create and populate lib/{async, core, isolate, ...}. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 f.write('%s\n' % revision) | 258 f.write('%s\n' % revision) |
| 259 f.close() | 259 f.close() |
| 260 | 260 |
| 261 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 261 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 262 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 262 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
| 263 | 263 |
| 264 move(SDK_tmp, SDK) | 264 move(SDK_tmp, SDK) |
| 265 | 265 |
| 266 if __name__ == '__main__': | 266 if __name__ == '__main__': |
| 267 sys.exit(Main()) | 267 sys.exit(Main()) |
| OLD | NEW |