| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', | 136 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt', |
| 137 'utils_wrapper', 'pub', 'dartdoc']: | 137 'utils_wrapper', 'pub', 'dartdoc']: |
| 138 snapshot += '.dart.snapshot' | 138 snapshot += '.dart.snapshot' |
| 139 copyfile(join(snapshots, snapshot), | 139 copyfile(join(snapshots, snapshot), |
| 140 join(sdk_root, 'bin', 'snapshots', snapshot)) | 140 join(sdk_root, 'bin', 'snapshots', snapshot)) |
| 141 | 141 |
| 142 def CopyAnalyzerSources(home, lib_dir): | 142 def CopyAnalyzerSources(home, lib_dir): |
| 143 for library in ['analyzer', 'analysis_server']: | 143 for library in ['analyzer', 'analysis_server']: |
| 144 copytree(join(home, 'pkg', library), join(lib_dir, library), | 144 copytree(join(home, 'pkg', library), join(lib_dir, library), |
| 145 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', | 145 ignore=ignore_patterns('*.svn', 'doc', '*.py', '*.gypi', '*.sh', |
| 146 '.gitignore')) | 146 '.gitignore', 'packages')) |
| 147 | 147 |
| 148 def CopyDartdocResources(home, sdk_root): | 148 def CopyDartdocResources(home, sdk_root): |
| 149 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') | 149 RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources') |
| 150 DARTDOC = join(RESOURCE_DIR, 'dartdoc') | 150 DARTDOC = join(RESOURCE_DIR, 'dartdoc') |
| 151 | 151 |
| 152 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), | 152 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'), |
| 153 join(DARTDOC, 'templates')) | 153 join(DARTDOC, 'templates')) |
| 154 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'resources'), | 154 copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'resources'), |
| 155 join(DARTDOC, 'resources')) | 155 join(DARTDOC, 'resources')) |
| 156 # write the .packages file | 156 # write the .packages file |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 f.close() | 310 f.close() |
| 311 | 311 |
| 312 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 312 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 313 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) | 313 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) |
| 314 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 314 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
| 315 | 315 |
| 316 move(SDK_tmp, SDK) | 316 move(SDK_tmp, SDK) |
| 317 | 317 |
| 318 if __name__ == '__main__': | 318 if __name__ == '__main__': |
| 319 sys.exit(Main()) | 319 sys.exit(Main()) |
| OLD | NEW |