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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 dest_file = basename(src_file) | 113 dest_file = basename(src_file) |
| 114 if dest_file.endswith('_sdk'): | 114 if dest_file.endswith('_sdk'): |
| 115 dest_file = dest_file.replace('_sdk', '') | 115 dest_file = dest_file.replace('_sdk', '') |
| 116 | 116 |
| 117 src = src_file + file_extension | 117 src = src_file + file_extension |
| 118 dest = join(dest_dir, dest_file + file_extension) | 118 dest = join(dest_dir, dest_file + file_extension) |
| 119 Copy(src, dest) | 119 Copy(src, dest) |
| 120 | 120 |
| 121 | 121 |
| 122 def CopyDartScripts(home, sdk_root): | 122 def CopyDartScripts(home, sdk_root): |
| 123 for executable in ['dart2js_sdk', 'dartanalyzer_sdk', 'dartfmt_sdk', 'docgen', | 123 for executable in ['dart2js_sdk', 'dartanalyzer_sdk', 'dartfmt_sdk', |
| 124 'dartdocgen', 'pub_sdk', 'dartdoc']: | 124 'pub_sdk', 'dartdoc']: |
| 125 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), | 125 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), |
| 126 os.path.join(sdk_root, 'bin')) | 126 os.path.join(sdk_root, 'bin')) |
| 127 | 127 |
| 128 | 128 |
| 129 def CopySnapshots(snapshots, sdk_root): | 129 def CopySnapshots(snapshots, sdk_root): |
| 130 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', | 130 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', |
| 131 'utils_wrapper', 'pub', 'dartdoc']: | 131 'pub', 'dartdoc']: |
|
Bill Hesse
2015/09/18 19:33:40
This is used in test_suite.dart, and perhaps other
| |
| 132 snapshot += '.dart.snapshot' | 132 snapshot += '.dart.snapshot' |
| 133 copyfile(join(snapshots, snapshot), | 133 copyfile(join(snapshots, snapshot), |
| 134 join(sdk_root, 'bin', 'snapshots', snapshot)) | 134 join(sdk_root, 'bin', 'snapshots', snapshot)) |
| 135 | 135 |
| 136 def CopyDartdocResources(home,sdk_root): | 136 def CopyDartdocResources(home,sdk_root): |
| 137 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') | 137 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') |
| 138 DARTDOC = join(RESOURCE_DIR, 'dartdoc') | 138 DARTDOC = join(RESOURCE_DIR, 'dartdoc') |
| 139 | 139 |
| 140 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), | 140 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), |
| 141 join(DARTDOC, 'templates')) | 141 join(DARTDOC, 'templates')) |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 f.write('%s\n' % revision) | 288 f.write('%s\n' % revision) |
| 289 f.close() | 289 f.close() |
| 290 | 290 |
| 291 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 291 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 292 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md') ) | 292 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md') ) |
| 293 | 293 |
| 294 move(SDK_tmp, SDK) | 294 move(SDK_tmp, SDK) |
| 295 | 295 |
| 296 if __name__ == '__main__': | 296 if __name__ == '__main__': |
| 297 sys.exit(Main()) | 297 sys.exit(Main()) |
| OLD | NEW |