| 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 # |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 # Copy the Dart VM binary into sdk/bin. | 98 # Copy the Dart VM binary into sdk/bin. |
| 99 # TODO(dgrove) - deal with architectures that are not ia32. | 99 # TODO(dgrove) - deal with architectures that are not ia32. |
| 100 build_dir = os.path.dirname(argv[1]) | 100 build_dir = os.path.dirname(argv[1]) |
| 101 frogc_file_extension = '' | 101 frogc_file_extension = '' |
| 102 dart_file_extension = '' | 102 dart_file_extension = '' |
| 103 if utils.GuessOS() == 'win32': | 103 if utils.GuessOS() == 'win32': |
| 104 dart_file_extension = '.exe' | 104 dart_file_extension = '.exe' |
| 105 frogc_file_extension = '.bat' | 105 frogc_file_extension = '.bat' |
| 106 dart_src_binary = join(HOME, build_dir, 'dart' + dart_file_extension) | 106 dart_src_binary = join(HOME, build_dir, 'dart' + dart_file_extension) |
| 107 dart_dest_binary = join(BIN, 'dart' + dart_file_extension) | 107 dart_dest_binary = join(BIN, 'dart' + dart_file_extension) |
| 108 frogc_src_binary = join(HOME, 'frog', 'frogc' + frogc_file_extension) | 108 frogc_src_binary = join(HOME, 'frog', 'scripts', 'bootstrap', |
| 109 'frogc' + frogc_file_extension) |
| 109 frogc_dest_binary = join(BIN, 'frogc' + frogc_file_extension) | 110 frogc_dest_binary = join(BIN, 'frogc' + frogc_file_extension) |
| 110 copyfile(dart_src_binary, dart_dest_binary) | 111 copyfile(dart_src_binary, dart_dest_binary) |
| 111 copymode(dart_src_binary, dart_dest_binary) | 112 copymode(dart_src_binary, dart_dest_binary) |
| 112 copyfile(frogc_src_binary, frogc_dest_binary) | 113 copyfile(frogc_src_binary, frogc_dest_binary) |
| 113 copymode(frogc_src_binary, frogc_dest_binary) | 114 copymode(frogc_src_binary, frogc_dest_binary) |
| 114 | 115 |
| 115 # Create sdk/bin/frogc.dart, and hack as needed. | 116 # Create sdk/bin/frogc.dart, and hack as needed. |
| 116 frog_src_dir = join(HOME, 'frog') | 117 frog_src_dir = join(HOME, 'frog') |
| 117 | 118 |
| 118 # Convert frogc.dart's imports from import('*') -> import('frog/*'). | 119 # Convert frogc.dart's imports from import('*') -> import('frog/*'). |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 | 366 |
| 366 # Create and copy tools. | 367 # Create and copy tools. |
| 367 | 368 |
| 368 UTIL = join(SDK_tmp, 'util') | 369 UTIL = join(SDK_tmp, 'util') |
| 369 os.makedirs(UTIL) | 370 os.makedirs(UTIL) |
| 370 | 371 |
| 371 move(SDK_tmp, SDK) | 372 move(SDK_tmp, SDK) |
| 372 | 373 |
| 373 if __name__ == '__main__': | 374 if __name__ == '__main__': |
| 374 sys.exit(Main(sys.argv)) | 375 sys.exit(Main(sys.argv)) |
| OLD | NEW |