| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 assert filename.endswith('.dart') | 219 assert filename.endswith('.dart') |
| 220 if filename == 'io.dart': | 220 if filename == 'io.dart': |
| 221 continue | 221 continue |
| 222 dest_file.write('#source("runtime/' + filename + '");\n') | 222 dest_file.write('#source("runtime/' + filename + '");\n') |
| 223 dest_file.close() | 223 dest_file.close() |
| 224 | 224 |
| 225 # | 225 # |
| 226 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. | 226 # Create and populate lib/{core, crypto, isolate, json, uri, utf, ...}. |
| 227 # | 227 # |
| 228 | 228 |
| 229 for library in ['_internal', 'html', 'core', 'coreimpl', | 229 os.makedirs(join(LIB, 'html')) |
| 230 'crypto', 'isolate', 'json', 'math', 'mirrors', | 230 for library in ['_internal', 'core', 'coreimpl', 'crypto', 'isolate', |
| 231 'scalarlist', 'uri', 'utf']: | 231 join('html', 'dart2js'), join('html', 'dartium'), 'json', |
| 232 'math', 'mirrors', 'scalarlist', 'uri', 'utf']: |
| 232 copytree(join(HOME, 'lib', library), join(LIB, library), | 233 copytree(join(HOME, 'lib', library), join(LIB, library), |
| 233 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) | 234 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh')) |
| 234 | 235 |
| 235 | 236 |
| 236 # Create and copy pkg. | 237 # Create and copy pkg. |
| 237 PKG = join(SDK_tmp, 'pkg') | 238 PKG = join(SDK_tmp, 'pkg') |
| 238 os.makedirs(PKG) | 239 os.makedirs(PKG) |
| 239 | 240 |
| 240 # | 241 # |
| 241 # Create and populate pkg/{args, intl, logging, meta, unittest} | 242 # Create and populate pkg/{args, intl, logging, meta, unittest} |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 if revision is not None: | 324 if revision is not None: |
| 324 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 325 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 325 f.write(revision + '\n') | 326 f.write(revision + '\n') |
| 326 f.close() | 327 f.close() |
| 327 | 328 |
| 328 move(SDK_tmp, SDK) | 329 move(SDK_tmp, SDK) |
| 329 utils.Touch(os.path.join(SDK, 'create.stamp')) | 330 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 330 | 331 |
| 331 if __name__ == '__main__': | 332 if __name__ == '__main__': |
| 332 sys.exit(Main(sys.argv)) | 333 sys.exit(Main(sys.argv)) |
| OLD | NEW |