| 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 24 matching lines...) Expand all Loading... |
| 35 # ........coreimpl_runtime.dart | 35 # ........coreimpl_runtime.dart |
| 36 # ........runtime/ | 36 # ........runtime/ |
| 37 # ......dart2js/ | 37 # ......dart2js/ |
| 38 # ......dartdoc/ | 38 # ......dartdoc/ |
| 39 # ......isolate/ | 39 # ......isolate/ |
| 40 # ........isolate_{frog, runtime}.dart | 40 # ........isolate_{frog, runtime}.dart |
| 41 # ........{frog, runtime}/ | 41 # ........{frog, runtime}/ |
| 42 # ......dom/ | 42 # ......dom/ |
| 43 # ........dom.dart | 43 # ........dom.dart |
| 44 # ......html/ | 44 # ......html/ |
| 45 # ........html_frog.dart | 45 # ........html_dart2js.dart |
| 46 # ........html_dartium.dart | 46 # ........html_dartium.dart |
| 47 # ......crypto/ | 47 # ......crypto/ |
| 48 # ........crypto.dart | 48 # ........crypto.dart |
| 49 # ........(implementation files) | 49 # ........(implementation files) |
| 50 # ......json/ | 50 # ......json/ |
| 51 # ........json_frog.dart | 51 # ........json_frog.dart |
| 52 #.........json.dart | 52 #.........json.dart |
| 53 # ........{frog}/ | 53 # ........{frog}/ |
| 54 # ......uri/ | 54 # ......uri/ |
| 55 # ........uri.dart | 55 # ........uri.dart |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 file.write(file_contents) | 305 file.write(file_contents) |
| 306 file.close() | 306 file.close() |
| 307 | 307 |
| 308 # | 308 # |
| 309 # Create and populate lib/html. | 309 # Create and populate lib/html. |
| 310 # | 310 # |
| 311 html_src_dir = join(HOME, 'lib', 'html') | 311 html_src_dir = join(HOME, 'lib', 'html') |
| 312 html_dest_dir = join(LIB, 'html') | 312 html_dest_dir = join(LIB, 'html') |
| 313 os.makedirs(html_dest_dir) | 313 os.makedirs(html_dest_dir) |
| 314 | 314 |
| 315 copyfile(join(html_src_dir, 'frog', 'html_frog.dart'), | 315 copyfile(join(html_src_dir, 'dart2js', 'html_dart2js.dart'), |
| 316 join(html_dest_dir, 'html_frog.dart')) | 316 join(html_dest_dir, 'html_dart2js.dart')) |
| 317 copyfile(join(html_src_dir, 'dartium', 'html_dartium.dart'), | 317 copyfile(join(html_src_dir, 'dartium', 'html_dartium.dart'), |
| 318 join(html_dest_dir, 'html_dartium.dart')) | 318 join(html_dest_dir, 'html_dartium.dart')) |
| 319 copyfile(join(html_src_dir, 'dartium', 'nativewrappers.dart'), | 319 copyfile(join(html_src_dir, 'dartium', 'nativewrappers.dart'), |
| 320 join(html_dest_dir, 'nativewrappers.dart')) | 320 join(html_dest_dir, 'nativewrappers.dart')) |
| 321 | 321 |
| 322 # | 322 # |
| 323 # Create and populate lib/dom. | 323 # Create and populate lib/dom. |
| 324 # | 324 # |
| 325 dom_src_dir = join(HOME, 'lib', 'dom') | 325 dom_src_dir = join(HOME, 'lib', 'dom') |
| 326 dom_dest_dir = join(LIB, 'dom') | 326 dom_dest_dir = join(LIB, 'dom') |
| 327 os.makedirs(dom_dest_dir) | 327 os.makedirs(dom_dest_dir) |
| 328 | 328 |
| 329 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), | 329 copyfile(join(dom_src_dir, 'dart2js', 'dom_dart2js.dart'), |
| 330 join(dom_dest_dir, 'dom_frog.dart')) | 330 join(dom_dest_dir, 'dom_dart2js.dart')) |
| 331 | 331 |
| 332 # | 332 # |
| 333 # Create and populate lib/{crypto, json, uri, utf, ...}. | 333 # Create and populate lib/{crypto, json, uri, utf, ...}. |
| 334 # | 334 # |
| 335 | 335 |
| 336 for library in ['crypto', 'json', 'unittest', 'uri', 'utf', 'i18n', 'web']: | 336 for library in ['crypto', 'json', 'unittest', 'uri', 'utf', 'i18n', 'web']: |
| 337 src_dir = join(HOME, 'lib', library) | 337 src_dir = join(HOME, 'lib', library) |
| 338 dest_dir = join(LIB, library) | 338 dest_dir = join(LIB, library) |
| 339 os.makedirs(dest_dir) | 339 os.makedirs(dest_dir) |
| 340 | 340 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 if revision is not None: | 463 if revision is not None: |
| 464 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 464 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 465 f.write(revision + '\n') | 465 f.write(revision + '\n') |
| 466 f.close() | 466 f.close() |
| 467 | 467 |
| 468 move(SDK_tmp, SDK) | 468 move(SDK_tmp, SDK) |
| 469 utils.Touch(os.path.join(SDK, 'create.stamp')) | 469 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 470 | 470 |
| 471 if __name__ == '__main__': | 471 if __name__ == '__main__': |
| 472 sys.exit(Main(sys.argv)) | 472 sys.exit(Main(sys.argv)) |
| OLD | NEW |