| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 ("../../../../corelib/src/", "../../../core/runtime/") | 352 ("../../../../corelib/src/", "../../../core/runtime/") |
| 353 ]); | 353 ]); |
| 354 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib_impl.dart')], [ | 354 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib_impl.dart')], [ |
| 355 ("../../../../corelib/src/implementation", "../../../coreimpl/runtime/") | 355 ("../../../../corelib/src/implementation", "../../../coreimpl/runtime/") |
| 356 ]); | 356 ]); |
| 357 | 357 |
| 358 # Create and populate lib/isolate | 358 # Create and populate lib/isolate |
| 359 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), | 359 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), |
| 360 ignore=ignore_patterns('.svn')) | 360 ignore=ignore_patterns('.svn')) |
| 361 | 361 |
| 362 isolate_runtime_dir = join(LIB, 'isolate', 'runtime') | |
| 363 # path seems to exist when run locally, but not on builder | |
| 364 if not exists(isolate_runtime_dir): | |
| 365 os.makedirs(isolate_runtime_dir) | |
| 366 | |
| 367 isolate_runtime_src = join(HOME, 'runtime', 'lib', 'isolate.dart') | |
| 368 isolate_runtime_dest = join(LIB, 'isolate', 'runtime', 'isolate.dart') | |
| 369 copyfile(isolate_runtime_src, isolate_runtime_dest) | |
| 370 | |
| 371 # | 362 # |
| 372 # Create and populate lib/core. | 363 # Create and populate lib/core. |
| 373 # | 364 # |
| 374 | 365 |
| 375 # First, copy corelib/* to lib/runtime | 366 # First, copy corelib/* to lib/runtime |
| 376 for filename in corelib_sources: | 367 for filename in corelib_sources: |
| 377 for target_dir in ['runtime']: | 368 for target_dir in ['runtime']: |
| 378 copyfile(join('corelib', 'src', filename), | 369 copyfile(join('corelib', 'src', filename), |
| 379 join(corelib_dest_dir, target_dir, filename)) | 370 join(corelib_dest_dir, target_dir, filename)) |
| 380 | 371 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 if revision is not None: | 462 if revision is not None: |
| 472 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 463 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 473 f.write(revision + '\n') | 464 f.write(revision + '\n') |
| 474 f.close() | 465 f.close() |
| 475 | 466 |
| 476 move(SDK_tmp, SDK) | 467 move(SDK_tmp, SDK) |
| 477 utils.Touch(os.path.join(SDK, 'create.stamp')) | 468 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 478 | 469 |
| 479 if __name__ == '__main__': | 470 if __name__ == '__main__': |
| 480 sys.exit(Main(sys.argv)) | 471 sys.exit(Main(sys.argv)) |
| OLD | NEW |