Chromium Code Reviews| 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 20 matching lines...) Expand all Loading... | |
| 31 # ......core/ | 31 # ......core/ |
| 32 # ........core_runtime.dart | 32 # ........core_runtime.dart |
| 33 # ........runtime/ | 33 # ........runtime/ |
| 34 # ......coreimpl/ | 34 # ......coreimpl/ |
| 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}/ |
|
Lasse Reichstein Nielsen
2012/07/12 11:01:46
Remove reference to frog here.
Johnni Winther
2012/07/13 11:25:19
Not related to dartdoc usage. Probably still valid
| |
| 42 # ......dom/ | 42 # ......dom/ |
| 43 # ........dom.dart | 43 # ........dom.dart |
| 44 # ......html/ | 44 # ......html/ |
| 45 # ........html_frog.dart | 45 # ........html_frog.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}/ |
|
Lasse Reichstein Nielsen
2012/07/12 11:01:46
And here.
Johnni Winther
2012/07/13 11:25:19
Not related to dartdoc usage. Probably still valid
| |
| 54 # ......uri/ | 54 # ......uri/ |
| 55 # ........uri.dart | 55 # ........uri.dart |
| 56 # ......utf/ | 56 # ......utf/ |
| 57 # ......web/ | 57 # ......web/ |
| 58 # ........web.dart | 58 # ........web.dart |
| 59 # ......(more will come here) | 59 # ......(more will come here) |
| 60 # ....util/ | 60 # ....util/ |
| 61 # ......analyzer/ | 61 # ......analyzer/ |
| 62 # ........dart_analyzer.jar | 62 # ........dart_analyzer.jar |
| 63 # ........(third-party libraries for dart_analyzer) | 63 # ........(third-party libraries for dart_analyzer) |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 file.close() | 302 file.close() |
| 303 | 303 |
| 304 # | 304 # |
| 305 # Create and populate lib/html. | 305 # Create and populate lib/html. |
| 306 # | 306 # |
| 307 html_src_dir = join(HOME, 'lib', 'html') | 307 html_src_dir = join(HOME, 'lib', 'html') |
| 308 html_dest_dir = join(LIB, 'html') | 308 html_dest_dir = join(LIB, 'html') |
| 309 os.makedirs(html_dest_dir) | 309 os.makedirs(html_dest_dir) |
| 310 | 310 |
| 311 copyfile(join(html_src_dir, 'frog', 'html_frog.dart'), | 311 copyfile(join(html_src_dir, 'frog', 'html_frog.dart'), |
| 312 join(html_dest_dir, 'html_frog.dart')) | 312 join(html_dest_dir, 'html_frog.dart')) |
|
Lasse Reichstein Nielsen
2012/07/12 11:01:46
What is this frog?
Johnni Winther
2012/07/13 11:25:19
This has to do with the current html implementatio
| |
| 313 copyfile(join(html_src_dir, 'dartium', 'html_dartium.dart'), | 313 copyfile(join(html_src_dir, 'dartium', 'html_dartium.dart'), |
| 314 join(html_dest_dir, 'html_dartium.dart')) | 314 join(html_dest_dir, 'html_dartium.dart')) |
| 315 copyfile(join(html_src_dir, 'dartium', 'nativewrappers.dart'), | 315 copyfile(join(html_src_dir, 'dartium', 'nativewrappers.dart'), |
| 316 join(html_dest_dir, 'nativewrappers.dart')) | 316 join(html_dest_dir, 'nativewrappers.dart')) |
| 317 | 317 |
| 318 # | 318 # |
| 319 # Create and populate lib/dom. | 319 # Create and populate lib/dom. |
| 320 # | 320 # |
| 321 dom_src_dir = join(HOME, 'lib', 'dom') | 321 dom_src_dir = join(HOME, 'lib', 'dom') |
| 322 dom_dest_dir = join(LIB, 'dom') | 322 dom_dest_dir = join(LIB, 'dom') |
| 323 os.makedirs(dom_dest_dir) | 323 os.makedirs(dom_dest_dir) |
| 324 | 324 |
| 325 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), | 325 copyfile(join(dom_src_dir, 'frog', 'dom_frog.dart'), |
| 326 join(dom_dest_dir, 'dom_frog.dart')) | 326 join(dom_dest_dir, 'dom_frog.dart')) |
|
Lasse Reichstein Nielsen
2012/07/12 11:01:46
And this?
Johnni Winther
2012/07/13 11:25:19
The same.
| |
| 327 | 327 |
| 328 # | 328 # |
| 329 # Create and populate lib/{crypto, json, uri, utf, ...}. | 329 # Create and populate lib/{crypto, json, uri, utf, ...}. |
| 330 # | 330 # |
| 331 | 331 |
| 332 for library in ['crypto', 'json', 'unittest', 'uri', 'utf', 'i18n', 'web']: | 332 for library in ['crypto', 'json', 'unittest', 'uri', 'utf', 'i18n', 'web']: |
| 333 src_dir = join(HOME, 'lib', library) | 333 src_dir = join(HOME, 'lib', library) |
| 334 dest_dir = join(LIB, library) | 334 dest_dir = join(LIB, library) |
| 335 os.makedirs(dest_dir) | 335 os.makedirs(dest_dir) |
| 336 | 336 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 351 ("scriptDir, '../'", | 351 ("scriptDir, '../'", |
| 352 "scriptDir, '../dart2js/lib/'"), | 352 "scriptDir, '../dart2js/lib/'"), |
| 353 ]) | 353 ]) |
| 354 ReplaceInFiles([ | 354 ReplaceInFiles([ |
| 355 join(LIB, 'dartdoc', 'dartdoc.dart'), | 355 join(LIB, 'dartdoc', 'dartdoc.dart'), |
| 356 ], [ | 356 ], [ |
| 357 ("scriptDir, '../../'", | 357 ("scriptDir, '../../'", |
| 358 "scriptDir, '../dart2js/'"), | 358 "scriptDir, '../dart2js/'"), |
| 359 ]) | 359 ]) |
| 360 | 360 |
| 361 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'frog_options.dart')], [ | |
| 362 ("final config = \'dev\';", "final config = \'sdk\';") | |
| 363 ]) | |
| 364 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib.dart')], [ | |
| 365 ("../../../../corelib/src/", "../../../core/runtime/") | |
| 366 ]); | |
| 367 ReplaceInFiles([join(LIB, 'dartdoc', 'frog', 'lib', 'corelib_impl.dart')], [ | |
| 368 ("../../../../corelib/src/implementation", "../../../coreimpl/runtime/") | |
| 369 ]); | |
| 370 | |
| 371 # Create and populate lib/isolate | 361 # Create and populate lib/isolate |
| 372 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), | 362 copytree(join(HOME, 'lib', 'isolate'), join(LIB, 'isolate'), |
| 373 ignore=ignore_patterns('.svn')) | 363 ignore=ignore_patterns('.svn')) |
| 374 | 364 |
| 375 # | 365 # |
| 376 # Create and populate lib/core. | 366 # Create and populate lib/core. |
| 377 # | 367 # |
| 378 | 368 |
| 379 # First, copy corelib/* to lib/runtime | 369 # First, copy corelib/* to lib/runtime |
| 380 for filename in corelib_sources: | 370 for filename in corelib_sources: |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 475 if revision is not None: | 465 if revision is not None: |
| 476 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 466 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 477 f.write(revision + '\n') | 467 f.write(revision + '\n') |
| 478 f.close() | 468 f.close() |
| 479 | 469 |
| 480 move(SDK_tmp, SDK) | 470 move(SDK_tmp, SDK) |
| 481 utils.Touch(os.path.join(SDK, 'create.stamp')) | 471 utils.Touch(os.path.join(SDK, 'create.stamp')) |
| 482 | 472 |
| 483 if __name__ == '__main__': | 473 if __name__ == '__main__': |
| 484 sys.exit(Main(sys.argv)) | 474 sys.exit(Main(sys.argv)) |
| OLD | NEW |