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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, ...}. |
201 # | 201 # |
202 | 202 |
203 os.makedirs(join(LIB, 'html')) | 203 os.makedirs(join(LIB, 'html')) |
204 | 204 |
205 for library in [join('_blink', 'dartium'), | 205 for library in [join('_blink', 'dartium'), |
206 join('_chrome', 'dart2js'), join('_chrome', 'dartium'), | 206 join('_chrome', 'dart2js'), join('_chrome', 'dartium'), |
207 join('_internal', 'compiler'), | 207 join('_internal', 'js_runtime'), |
| 208 join('_internal', 'sdk_library_metadata'), |
208 'async', 'collection', 'convert', 'core', 'developer', | 209 'async', 'collection', 'convert', 'core', 'developer', |
209 'internal', 'io', 'isolate', | 210 'internal', 'io', 'isolate', |
210 join('html', 'dart2js'), join('html', 'dartium'), | 211 join('html', 'dart2js'), join('html', 'dartium'), |
211 join('html', 'html_common'), | 212 join('html', 'html_common'), |
212 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), | 213 join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'), |
213 'js', 'math', 'mirrors', 'profiler', 'typed_data', | 214 'js', 'math', 'mirrors', 'profiler', 'typed_data', |
214 join('svg', 'dart2js'), join('svg', 'dartium'), | 215 join('svg', 'dart2js'), join('svg', 'dartium'), |
215 join('web_audio', 'dart2js'), join('web_audio', 'dartium'), | 216 join('web_audio', 'dart2js'), join('web_audio', 'dartium'), |
216 join('web_gl', 'dart2js'), join('web_gl', 'dartium'), | 217 join('web_gl', 'dart2js'), join('web_gl', 'dartium'), |
217 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]: | 218 join('web_sql', 'dart2js'), join('web_sql', 'dartium')]: |
218 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), | 219 copytree(join(HOME, 'sdk', 'lib', library), join(LIB, library), |
219 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', | 220 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', |
220 '.gitignore')) | 221 '.gitignore')) |
221 | 222 |
222 # Copy lib/_internal/libraries.dart. | |
223 copyfile(join(HOME, 'sdk', 'lib', '_internal', 'libraries.dart'), | |
224 join(LIB, '_internal', 'libraries.dart')) | |
225 | |
226 # Create and copy tools. | 223 # Create and copy tools. |
227 UTIL = join(SDK_tmp, 'util') | 224 UTIL = join(SDK_tmp, 'util') |
228 os.makedirs(UTIL) | 225 os.makedirs(UTIL) |
229 | 226 |
230 RESOURCE = join(SDK_tmp, 'lib', '_internal', 'pub', 'asset') | 227 RESOURCE = join(SDK_tmp, 'lib', '_internal', 'pub', 'asset') |
231 os.makedirs(os.path.dirname(RESOURCE)) | 228 os.makedirs(os.path.dirname(RESOURCE)) |
232 copytree(join(HOME, 'third_party', 'pkg', 'pub', 'lib', 'src', | 229 copytree(join(HOME, 'third_party', 'pkg', 'pub', 'lib', 'src', |
233 'asset'), | 230 'asset'), |
234 join(RESOURCE), | 231 join(RESOURCE), |
235 ignore=ignore_patterns('.svn')) | 232 ignore=ignore_patterns('.svn')) |
(...skipping 22 matching lines...) Expand all Loading... |
258 f.write('%s\n' % revision) | 255 f.write('%s\n' % revision) |
259 f.close() | 256 f.close() |
260 | 257 |
261 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 258 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')
) | 259 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
263 | 260 |
264 move(SDK_tmp, SDK) | 261 move(SDK_tmp, SDK) |
265 | 262 |
266 if __name__ == '__main__': | 263 if __name__ == '__main__': |
267 sys.exit(Main()) | 264 sys.exit(Main()) |
OLD | NEW |