| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 copyfile(join(snapshots, 'spec.sum'), | 190 copyfile(join(snapshots, 'spec.sum'), |
| 191 join(lib, '_internal', 'spec.sum')) | 191 join(lib, '_internal', 'spec.sum')) |
| 192 copyfile(join(snapshots, 'strong.sum'), | 192 copyfile(join(snapshots, 'strong.sum'), |
| 193 join(lib, '_internal', 'strong.sum')) | 193 join(lib, '_internal', 'strong.sum')) |
| 194 | 194 |
| 195 def CopyDevCompilerSdk(home, lib): | 195 def CopyDevCompilerSdk(home, lib): |
| 196 copyfile(join(home, 'pkg', 'dev_compiler', 'lib', 'sdk', 'ddc_sdk.sum'), | 196 copyfile(join(home, 'pkg', 'dev_compiler', 'lib', 'sdk', 'ddc_sdk.sum'), |
| 197 join(lib, '_internal', 'ddc_sdk.sum')) | 197 join(lib, '_internal', 'ddc_sdk.sum')) |
| 198 copytree(join(home, 'pkg', 'dev_compiler', 'lib', 'js'), | 198 copytree(join(home, 'pkg', 'dev_compiler', 'lib', 'js'), |
| 199 join(lib, 'dev_compiler')) | 199 join(lib, 'dev_compiler')) |
| 200 copyfile(join(home, 'third_party', 'requirejs', 'require.js'), |
| 201 join(lib, 'dev_compiler', 'amd', 'require.js')) |
| 200 | 202 |
| 201 def Main(): | 203 def Main(): |
| 202 # Pull in all of the gypi files which will be munged into the sdk. | 204 # Pull in all of the gypi files which will be munged into the sdk. |
| 203 HOME = dirname(dirname(realpath(__file__))) | 205 HOME = dirname(dirname(realpath(__file__))) |
| 204 | 206 |
| 205 (options, args) = GetOptions() | 207 (options, args) = GetOptions() |
| 206 | 208 |
| 207 SDK = options.sdk_output_dir | 209 SDK = options.sdk_output_dir |
| 208 SDK_tmp = '%s.tmp' % SDK | 210 SDK_tmp = '%s.tmp' % SDK |
| 209 | 211 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 f.close() | 354 f.close() |
| 353 | 355 |
| 354 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 356 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 355 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) | 357 Copy(join(HOME, 'LICENSE'), join(SDK_tmp, 'LICENSE')) |
| 356 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) | 358 Copy(join(HOME, 'sdk', 'api_readme.md'), join(SDK_tmp, 'lib', 'api_readme.md')
) |
| 357 | 359 |
| 358 move(SDK_tmp, SDK) | 360 move(SDK_tmp, SDK) |
| 359 | 361 |
| 360 if __name__ == '__main__': | 362 if __name__ == '__main__': |
| 361 sys.exit(Main()) | 363 sys.exit(Main()) |
| OLD | NEW |