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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 256 join(join(UTIL, 'pub'), '7zip'), | 256 join(join(UTIL, 'pub'), '7zip'), |
| 257 ignore=ignore_patterns('.svn')) | 257 ignore=ignore_patterns('.svn')) |
| 258 | 258 |
| 259 ReplaceInFiles([ | 259 ReplaceInFiles([ |
| 260 join(UTIL, 'pub', 'io.dart'), | 260 join(UTIL, 'pub', 'io.dart'), |
| 261 ], [ | 261 ], [ |
| 262 ("var pathTo7zip = '../../third_party/7zip/7za.exe';", | 262 ("var pathTo7zip = '../../third_party/7zip/7za.exe';", |
| 263 "var pathTo7zip = '7zip/7za.exe';"), | 263 "var pathTo7zip = '7zip/7za.exe';"), |
| 264 ]) | 264 ]) |
| 265 | 265 |
| 266 # Copy in cURL on all operating systems, since we need the certificates file | |
| 267 # even outside Windows. | |
| 268 copytree(join(HOME, 'third_party', 'curl'), | |
| 269 join(join(UTIL, 'pub'), 'curl'), | |
| 270 ignore=ignore_patterns('.svn')) | |
|
Bob Nystrom
2012/11/19 21:50:30
How about just copying the needed files on non-Win
nweiz
2012/11/19 23:00:37
Done.
| |
| 271 | |
| 272 ReplaceInFiles([ | |
| 273 join(UTIL, 'pub', 'curl_client.dart'), | |
| 274 ], [ | |
| 275 ("var pathToCurl = '../../third_party/curl/curl.exe';", | |
| 276 "var pathToCurl = 'curl/curl.exe';"), | |
| 277 ("var pathToCertificates = '../../third_party/curl/ca-certificates.crt';", | |
| 278 "var pathToCertificates = 'curl/ca-certificates.crt';"), | |
| 279 ]) | |
| 280 | |
| 266 version = utils.GetVersion() | 281 version = utils.GetVersion() |
| 267 | 282 |
| 268 # Copy dart2js/dartdoc/pub. | 283 # Copy dart2js/dartdoc/pub. |
| 269 CopyDartScripts(HOME, build_dir, SDK_tmp, version) | 284 CopyDartScripts(HOME, build_dir, SDK_tmp, version) |
| 270 | 285 |
| 271 # Fix up dartdoc. | 286 # Fix up dartdoc. |
| 272 # TODO(dgrove): Remove this once issue 6619 is fixed. | 287 # TODO(dgrove): Remove this once issue 6619 is fixed. |
| 273 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', | 288 ReplaceInFiles([join(SDK_tmp, 'lib', '_internal', 'dartdoc', |
| 274 'bin', 'dartdoc.dart')], | 289 'bin', 'dartdoc.dart')], |
| 275 [("../../../../../pkg/args/lib/args.dart", | 290 [("../../../../../pkg/args/lib/args.dart", |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 287 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 302 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
| 288 f.write(revision + '\n') | 303 f.write(revision + '\n') |
| 289 f.close() | 304 f.close() |
| 290 | 305 |
| 291 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 306 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
| 292 | 307 |
| 293 move(SDK_tmp, SDK) | 308 move(SDK_tmp, SDK) |
| 294 | 309 |
| 295 if __name__ == '__main__': | 310 if __name__ == '__main__': |
| 296 sys.exit(Main(sys.argv)) | 311 sys.exit(Main(sys.argv)) |
| OLD | NEW |