| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 packages_file.write('dartdoc:.') | 164 packages_file.write('dartdoc:.') |
| 165 packages_file.close() | 165 packages_file.close() |
| 166 | 166 |
| 167 def CopyAnalysisSummaries(snapshots, lib): | 167 def CopyAnalysisSummaries(snapshots, lib): |
| 168 copyfile(join(snapshots, 'spec.sum'), | 168 copyfile(join(snapshots, 'spec.sum'), |
| 169 join(lib, '_internal', 'spec.sum')) | 169 join(lib, '_internal', 'spec.sum')) |
| 170 copyfile(join(snapshots, 'strong.sum'), | 170 copyfile(join(snapshots, 'strong.sum'), |
| 171 join(lib, '_internal', 'strong.sum')) | 171 join(lib, '_internal', 'strong.sum')) |
| 172 | 172 |
| 173 def CopyDevCompilerSdk(home, lib): | 173 def CopyDevCompilerSdk(home, lib): |
| 174 copyfile(join(home, 'pkg', 'dev_compiler', 'lib', 'sdk', 'ddc_sdk.sum'), |
| 175 join(lib, '_internal', 'ddc_sdk.sum')) |
| 174 copytree(join(home, 'pkg', 'dev_compiler', 'lib', 'js'), | 176 copytree(join(home, 'pkg', 'dev_compiler', 'lib', 'js'), |
| 175 join(lib, '_internal', 'dev_compiler')) | 177 join(lib, 'dev_compiler')) |
| 176 | 178 |
| 177 def Main(): | 179 def Main(): |
| 178 # Pull in all of the gypi files which will be munged into the sdk. | 180 # Pull in all of the gypi files which will be munged into the sdk. |
| 179 HOME = dirname(dirname(realpath(__file__))) | 181 HOME = dirname(dirname(realpath(__file__))) |
| 180 | 182 |
| 181 (options, args) = GetOptions() | 183 (options, args) = GetOptions() |
| 182 | 184 |
| 183 SDK = options.sdk_output_dir | 185 SDK = options.sdk_output_dir |
| 184 SDK_tmp = '%s.tmp' % SDK | 186 SDK_tmp = '%s.tmp' % SDK |
| 185 | 187 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 f.close() | 327 f.close() |
| 326 | 328 |
| 327 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 329 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 328 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) | 330 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) |
| 329 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 331 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
| 330 | 332 |
| 331 move(SDK_tmp, SDK) | 333 move(SDK_tmp, SDK) |
| 332 | 334 |
| 333 if __name__ == '__main__': | 335 if __name__ == '__main__': |
| 334 sys.exit(Main()) | 336 sys.exit(Main()) |
| OLD | NEW |