| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 # Create and populate util/pub. | 252 # Create and populate util/pub. |
| 253 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'), | 253 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'), |
| 254 ignore=ignore_patterns('.svn', 'sdk')) | 254 ignore=ignore_patterns('.svn', 'sdk')) |
| 255 | 255 |
| 256 # Copy in 7zip for Windows. | 256 # Copy in 7zip for Windows. |
| 257 if HOST_OS == 'win32': | 257 if HOST_OS == 'win32': |
| 258 copytree(join(HOME, 'third_party', '7zip'), | 258 copytree(join(HOME, 'third_party', '7zip'), |
| 259 join(join(UTIL, 'pub'), '7zip'), | 259 join(join(UTIL, 'pub'), '7zip'), |
| 260 ignore=ignore_patterns('.svn')) | 260 ignore=ignore_patterns('.svn')) |
| 261 | 261 |
| 262 ReplaceInFiles([ | 262 ReplaceInFiles([ |
| 263 join(UTIL, 'pub', 'io.dart'), | 263 join(UTIL, 'pub', 'io.dart'), |
| 264 ], [ | 264 ], [ |
| 265 ("var pathTo7zip = '../../third_party/7zip/7za.exe';", | 265 ("../../third_party/7zip/7za.exe", |
| 266 "var pathTo7zip = '7zip/7za.exe';"), | 266 "7zip/7za.exe"), |
| 267 ]) | 267 ]) |
| 268 | 268 |
| 269 # Copy in cURL on all operating systems, since we need the certificates file | 269 # Copy in cURL on all operating systems, since we need the certificates file |
| 270 # even outside Windows. Leave out the EXE on non-Windows systems, though. | 270 # even outside Windows. Leave out the EXE on non-Windows systems, though. |
| 271 curl_ignore_patterns = ignore_patterns('.svn') if HOST_OS == 'win32' \ | 271 curl_ignore_patterns = ignore_patterns('.svn') if HOST_OS == 'win32' \ |
| 272 else ignore_patterns('.svn', '*.exe') | 272 else ignore_patterns('.svn', '*.exe') |
| 273 copytree(join(HOME, 'third_party', 'curl'), | 273 copytree(join(HOME, 'third_party', 'curl'), |
| 274 join(join(UTIL, 'pub'), 'curl'), | 274 join(join(UTIL, 'pub'), 'curl'), |
| 275 ignore=curl_ignore_patterns) | 275 ignore=curl_ignore_patterns) |
| 276 | 276 |
| 277 ReplaceInFiles([ | 277 ReplaceInFiles([ |
| 278 join(UTIL, 'pub', 'curl_client.dart'), | 278 join(UTIL, 'pub', 'curl_client.dart'), |
| 279 ], [ | 279 ], [ |
| 280 ("var pathToCurl = '../../third_party/curl/curl.exe';", | 280 ("../../third_party/curl/curl.exe", |
| 281 "var pathToCurl = 'curl/curl.exe';"), | 281 "curl/curl.exe"), |
| 282 ("var pathToCertificates = '../../third_party/curl/ca-certificates.crt';", | 282 ("../../third_party/curl/ca-certificates.crt", |
| 283 "var pathToCertificates = 'curl/ca-certificates.crt';"), | 283 "curl/ca-certificates.crt"), |
| 284 ]) | 284 ]) |
| 285 | 285 |
| 286 version = utils.GetVersion() | 286 version = utils.GetVersion() |
| 287 | 287 |
| 288 # Copy dart2js/dartdoc/pub. | 288 # Copy dart2js/dartdoc/pub. |
| 289 CopyDartScripts(HOME, build_dir, SDK_tmp, version) | 289 CopyDartScripts(HOME, build_dir, SDK_tmp, version) |
| 290 | 290 |
| 291 # Fix up dartdoc. | 291 # Fix up dartdoc. |
| 292 # TODO(dgrove): Remove this once issue 6619 is fixed. | 292 # TODO(dgrove): Remove this once issue 6619 is fixed. |
| 293 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', | 293 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', |
| (...skipping 13 matching lines...) Expand all Loading... |
| 307 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 307 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 308 f.write(revision + '\n') | 308 f.write(revision + '\n') |
| 309 f.close() | 309 f.close() |
| 310 | 310 |
| 311 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 311 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 312 | 312 |
| 313 move(SDK_tmp, SDK) | 313 move(SDK_tmp, SDK) |
| 314 | 314 |
| 315 if __name__ == '__main__': | 315 if __name__ == '__main__': |
| 316 sys.exit(Main(sys.argv)) | 316 sys.exit(Main(sys.argv)) |
| OLD | NEW |