| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, 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 # ......frogc.dart | 17 # ......frogc.dart |
| 18 # ......frogsh (coming later) | 18 # ......frogsh (coming later) |
| 19 # ....lib/ | 19 # ....lib/ |
| 20 # ......_internal/ | |
| 21 # ........config/ | |
| 22 # ..........{import_any, import_vm, import_dart2js, ...}.config | |
| 23 # ......builtin/ | 20 # ......builtin/ |
| 24 # ........builtin_runtime.dart | 21 # ........builtin_runtime.dart |
| 25 # ......io/ | 22 # ......io/ |
| 26 # ........io_runtime.dart | 23 # ........io_runtime.dart |
| 27 # ........runtime/ | 24 # ........runtime/ |
| 28 # ......core/ | 25 # ......core/ |
| 29 # ........core_{frog, runtime}.dart | 26 # ........core_{frog, runtime}.dart |
| 30 # ........{frog, runtime}/ | 27 # ........{frog, runtime}/ |
| 31 # ......coreimpl/ | 28 # ......coreimpl/ |
| 32 # ........coreimpl_{frog, runtime}.dart | 29 # ........coreimpl_{frog, runtime}.dart |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 dest_file.close() | 412 dest_file.close() |
| 416 | 413 |
| 417 # Create and copy tools. | 414 # Create and copy tools. |
| 418 | 415 |
| 419 UTIL = join(SDK_tmp, 'util') | 416 UTIL = join(SDK_tmp, 'util') |
| 420 os.makedirs(UTIL) | 417 os.makedirs(UTIL) |
| 421 | 418 |
| 422 | 419 |
| 423 # Copy import maps | 420 # Copy import maps |
| 424 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ] | 421 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ] |
| 425 os.makedirs(join(LIB, '_internal', 'config')) | 422 os.makedirs(join(LIB, 'config')) |
| 426 for platform in PLATFORMS: | 423 for platform in PLATFORMS: |
| 427 import_src = join(HOME, 'lib', '_internal', 'config', | 424 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config') |
| 428 'import_' + platform + '.config') | 425 import_dst = join(LIB, 'config', 'import_' + platform + '.config') |
| 429 import_dst = join(LIB, '_internal', 'config', | |
| 430 'import_' + platform + '.config') | |
| 431 copyfile(import_src, import_dst); | 426 copyfile(import_src, import_dst); |
| 432 | 427 |
| 433 move(SDK_tmp, SDK) | 428 move(SDK_tmp, SDK) |
| 434 | 429 |
| 435 if __name__ == '__main__': | 430 if __name__ == '__main__': |
| 436 sys.exit(Main(sys.argv)) | 431 sys.exit(Main(sys.argv)) |
| OLD | NEW |