| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 # ......collection/ | 54 # ......collection/ |
| 55 # ......convert/ | 55 # ......convert/ |
| 56 # ......core/ | 56 # ......core/ |
| 57 # ......front_end/ | 57 # ......front_end/ |
| 58 # ......html/ | 58 # ......html/ |
| 59 # ......internal/ | 59 # ......internal/ |
| 60 # ......io/ | 60 # ......io/ |
| 61 # ......isolate/ | 61 # ......isolate/ |
| 62 # ......js/ | 62 # ......js/ |
| 63 # ......js_util/ | 63 # ......js_util/ |
| 64 # ......kernel/ |
| 64 # ......math/ | 65 # ......math/ |
| 65 # ......mirrors/ | 66 # ......mirrors/ |
| 66 # ......typed_data/ | 67 # ......typed_data/ |
| 67 # ......api_readme.md | 68 # ......api_readme.md |
| 68 # ....util/ | 69 # ....util/ |
| 69 # ......(more will come here) | 70 # ......(more will come here) |
| 70 | 71 |
| 71 | 72 |
| 72 import optparse | 73 import optparse |
| 73 import os | 74 import os |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 160 |
| 160 | 161 |
| 161 def CopySnapshots(snapshots, sdk_root): | 162 def CopySnapshots(snapshots, sdk_root): |
| 162 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', | 163 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', |
| 163 'utils_wrapper', 'pub', 'dartdoc', 'dartdevc']: | 164 'utils_wrapper', 'pub', 'dartdoc', 'dartdevc']: |
| 164 snapshot += '.dart.snapshot' | 165 snapshot += '.dart.snapshot' |
| 165 copyfile(join(snapshots, snapshot), | 166 copyfile(join(snapshots, snapshot), |
| 166 join(sdk_root, 'bin', 'snapshots', snapshot)) | 167 join(sdk_root, 'bin', 'snapshots', snapshot)) |
| 167 | 168 |
| 168 def CopyAnalyzerSources(home, lib_dir): | 169 def CopyAnalyzerSources(home, lib_dir): |
| 169 for library in ['analyzer', 'analysis_server', 'front_end']: | 170 for library in ['analyzer', 'analysis_server', 'front_end', 'kernel']: |
| 170 copytree(join(home, 'pkg', library), join(lib_dir, library), | 171 copytree(join(home, 'pkg', library), join(lib_dir, library), |
| 171 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', | 172 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', |
| 172 '.gitignore', 'packages')) | 173 '.gitignore', 'packages')) |
| 173 | 174 |
| 174 def CopyDartdocResources(home, sdk_root): | 175 def CopyDartdocResources(home, sdk_root): |
| 175 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') | 176 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') |
| 176 DARTDOC = join(RESOURCE_DIR, 'dartdoc') | 177 DARTDOC = join(RESOURCE_DIR, 'dartdoc') |
| 177 | 178 |
| 178 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), | 179 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), |
| 179 join(DARTDOC, 'templates')) | 180 join(DARTDOC, 'templates')) |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 f.close() | 352 f.close() |
| 352 | 353 |
| 353 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 354 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 354 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) | 355 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) |
| 355 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 356 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
| 356 | 357 |
| 357 move(SDK_tmp, SDK) | 358 move(SDK_tmp, SDK) |
| 358 | 359 |
| 359 if __name__ == '__main__': | 360 if __name__ == '__main__': |
| 360 sys.exit(Main()) | 361 sys.exit(Main()) |
| OLD | NEW |