| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 join(LIB, 'dartdoc', 'client-live-nav.dart'), | 296 join(LIB, 'dartdoc', 'client-live-nav.dart'), |
| 297 join(LIB, 'dartdoc', 'client-static.dart') | 297 join(LIB, 'dartdoc', 'client-static.dart') |
| 298 ], [ | 298 ], [ |
| 299 ("#import\('../../frog", "#import('../frog") | 299 ("#import\('../../frog", "#import('../frog") |
| 300 ]) | 300 ]) |
| 301 | 301 |
| 302 # Create and populate lib/isolate | 302 # Create and populate lib/isolate |
| 303 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), | 303 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), |
| 304 ignore=ignore_patterns('.svn')) | 304 ignore=ignore_patterns('.svn')) |
| 305 | 305 |
| 306 isolate_runtime_src = join(HOME, 'runtime', 'lib', 'isolate.dart') |
| 307 isolate_runtime_dest = join(LIB, 'isolate', 'runtime', 'isolate.dart') |
| 308 copyfile(isolate_runtime_src, isolate_runtime_dest) |
| 309 |
| 306 # | 310 # |
| 307 # Create and populate lib/core. | 311 # Create and populate lib/core. |
| 308 # | 312 # |
| 309 | 313 |
| 310 # First, copy corelib/* to lib/{frog, runtime} | 314 # First, copy corelib/* to lib/{frog, runtime} |
| 311 for filename in corelib_sources: | 315 for filename in corelib_sources: |
| 312 for target_dir in ['frog', 'runtime']: | 316 for target_dir in ['frog', 'runtime']: |
| 313 copyfile(join('corelib', 'src', filename), | 317 copyfile(join('corelib', 'src', filename), |
| 314 join(corelib_dest_dir, target_dir, filename)) | 318 join(corelib_dest_dir, target_dir, filename)) |
| 315 | 319 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 for filename in coreimpl_runtime_sources: | 392 for filename in coreimpl_runtime_sources: |
| 389 if filename.endswith('.dart'): | 393 if filename.endswith('.dart'): |
| 390 dest_file.write('#source("runtime/' + filename + '");\n') | 394 dest_file.write('#source("runtime/' + filename + '");\n') |
| 391 dest_file.close() | 395 dest_file.close() |
| 392 | 396 |
| 393 # Create and copy tools. | 397 # Create and copy tools. |
| 394 | 398 |
| 395 UTIL = join(SDK_tmp, 'util') | 399 UTIL = join(SDK_tmp, 'util') |
| 396 os.makedirs(UTIL) | 400 os.makedirs(UTIL) |
| 397 | 401 |
| 402 |
| 403 # Copy import maps |
| 404 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js', 'frog' ] |
| 405 os.makedirs(join(LIB, 'config')) |
| 406 for platform in PLATFORMS: |
| 407 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config') |
| 408 import_dst = join(LIB, 'config', 'import_' + platform + '.config') |
| 409 copyfile(import_src, import_dst); |
| 410 |
| 398 move(SDK_tmp, SDK) | 411 move(SDK_tmp, SDK) |
| 399 | 412 |
| 400 if __name__ == '__main__': | 413 if __name__ == '__main__': |
| 401 sys.exit(Main(sys.argv)) | 414 sys.exit(Main(sys.argv)) |
| OLD | NEW |