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