Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Side by Side Diff: tools/create_sdk.py

Issue 10937019: First pass at getting git and tar.gz working on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't enable all of the Windows tests yet. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | utils/pub/io.dart » ('j') | utils/pub/io.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 dest_file = join (ANALYZER_DEST, jarToCopy) 468 dest_file = join (ANALYZER_DEST, jarToCopy)
469 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy) 469 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy)
470 copyfile(src_file, dest_file) 470 copyfile(src_file, dest_file)
471 471
472 # Create and populate util/pub. 472 # Create and populate util/pub.
473 pub_src_dir = join(HOME, 'utils', 'pub') 473 pub_src_dir = join(HOME, 'utils', 'pub')
474 pub_dst_dir = join(UTIL, 'pub') 474 pub_dst_dir = join(UTIL, 'pub')
475 copytree(pub_src_dir, pub_dst_dir, 475 copytree(pub_src_dir, pub_dst_dir,
476 ignore=ignore_patterns('.svn', 'sdk')) 476 ignore=ignore_patterns('.svn', 'sdk'))
477 477
478 # Copy in 7zip for Windows.
479 if utils.GuessOS() == 'win32':
480 copytree(join(HOME, 'third_party', '7zip'),
481 join(pub_dst_dir, '7zip'))
482
483 ReplaceInFiles([
484 join(UTIL, 'pub', 'io.dart'),
485 ], [
486 ("var pathTo7zip = '../../third_party/7zip/7za.exe';",
487 "var pathTo7zip = '7zip/7za.exe';"),
488 ])
489
478 # Copy import maps. 490 # Copy import maps.
479 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js' ] 491 PLATFORMS = ['any', 'vm', 'dartium', 'dart2js' ]
480 os.makedirs(join(LIB, 'config')) 492 os.makedirs(join(LIB, 'config'))
481 for platform in PLATFORMS: 493 for platform in PLATFORMS:
482 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config') 494 import_src = join(HOME, 'lib', 'config', 'import_' + platform + '.config')
483 import_dst = join(LIB, 'config', 'import_' + platform + '.config') 495 import_dst = join(LIB, 'config', 'import_' + platform + '.config')
484 copyfile(import_src, import_dst); 496 copyfile(import_src, import_dst);
485 497
486 # Copy dart2js. 498 # Copy dart2js.
487 CopyDart2Js(build_dir, SDK_tmp) 499 CopyDart2Js(build_dir, SDK_tmp)
488 500
489 # Write the 'revision' file 501 # Write the 'revision' file
490 revision = utils.GetSVNRevision() 502 revision = utils.GetSVNRevision()
491 if revision is not None: 503 if revision is not None:
492 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 504 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
493 f.write(revision + '\n') 505 f.write(revision + '\n')
494 f.close() 506 f.close()
495 507
496 move(SDK_tmp, SDK) 508 move(SDK_tmp, SDK)
497 utils.Touch(os.path.join(SDK, 'create.stamp')) 509 utils.Touch(os.path.join(SDK, 'create.stamp'))
498 510
499 if __name__ == '__main__': 511 if __name__ == '__main__':
500 sys.exit(Main(sys.argv)) 512 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | utils/pub/io.dart » ('j') | utils/pub/io.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698