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

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: Fix merge bug. 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') | no next file with comments »
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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy)) 292 dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy))
293 os.makedirs(dest_dir) 293 os.makedirs(dest_dir)
294 dest_file = join (ANALYZER_DEST, jarToCopy) 294 dest_file = join (ANALYZER_DEST, jarToCopy)
295 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy) 295 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy)
296 copyfile(src_file, dest_file) 296 copyfile(src_file, dest_file)
297 297
298 # Create and populate util/pub. 298 # Create and populate util/pub.
299 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'), 299 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'),
300 ignore=ignore_patterns('.svn', 'sdk')) 300 ignore=ignore_patterns('.svn', 'sdk'))
301 301
302 # Copy in 7zip for Windows.
303 if utils.GuessOS() == 'win32':
304 copytree(join(HOME, 'third_party', '7zip'),
305 join(join(UTIL, 'pub'), '7zip'))
306
307 ReplaceInFiles([
308 join(UTIL, 'pub', 'io.dart'),
309 ], [
310 ("var pathTo7zip = '../../third_party/7zip/7za.exe';",
311 "var pathTo7zip = '7zip/7za.exe';"),
312 ])
313
302 revision = utils.GetSVNRevision() 314 revision = utils.GetSVNRevision()
303 315
304 # Copy dart2js. 316 # Copy dart2js.
305 CopyDart2Js(build_dir, SDK_tmp, revision) 317 CopyDart2Js(build_dir, SDK_tmp, revision)
306 318
307 # Write the 'revision' file 319 # Write the 'revision' file
308 if revision is not None: 320 if revision is not None:
309 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 321 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
310 f.write(revision + '\n') 322 f.write(revision + '\n')
311 f.close() 323 f.close()
312 324
313 move(SDK_tmp, SDK) 325 move(SDK_tmp, SDK)
314 utils.Touch(os.path.join(SDK, 'create.stamp')) 326 utils.Touch(os.path.join(SDK, 'create.stamp'))
315 327
316 if __name__ == '__main__': 328 if __name__ == '__main__':
317 sys.exit(Main(sys.argv)) 329 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | utils/pub/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698