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

Side by Side Diff: win_toolchain/toolchain2013.py

Issue 168603004: Move toolchain update control into src, but keep download logic in depot_tools (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: reitveld Created 6 years, 10 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 | « win_toolchain/get_toolchain_if_necessary.py ('k') | win_toolchain/toolchain_vs2013.hash » ('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 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Extracts a Windows VS2013 toolchain from various downloadable pieces.""" 6 """Extracts a Windows VS2013 toolchain from various downloadable pieces."""
7 7
8 8
9 import ctypes 9 import ctypes
10 import json
10 import optparse 11 import optparse
11 import os 12 import os
12 import shutil 13 import shutil
13 import subprocess 14 import subprocess
14 import sys 15 import sys
15 import tempfile 16 import tempfile
16 import urllib2 17 import urllib2
17 18
18 19
19 BASEDIR = os.path.dirname(os.path.abspath(__file__)) 20 BASEDIR = os.path.dirname(os.path.abspath(__file__))
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 # Set the working directory to 7z subdirectory. 7-zip doesn't find its 450 # Set the working directory to 7z subdirectory. 7-zip doesn't find its
450 # codec dll very well, so this is the simplest way to make sure it runs 451 # codec dll very well, so this is the simplest way to make sure it runs
451 # correctly, as we don't otherwise care about working directory. 452 # correctly, as we don't otherwise care about working directory.
452 os.chdir(os.path.join(BASEDIR, '7z')) 453 os.chdir(os.path.join(BASEDIR, '7z'))
453 images = GetSourceImages( 454 images = GetSourceImages(
454 options.local, not options.express, options.bot_mode) 455 options.local, not options.express, options.bot_mode)
455 extracted = ExtractComponents(images) 456 extracted = ExtractComponents(images)
456 CopyToFinalLocation(extracted, target_dir) 457 CopyToFinalLocation(extracted, target_dir)
457 458
458 GenerateSetEnvCmd(target_dir, not options.express) 459 GenerateSetEnvCmd(target_dir, not options.express)
459 with open(os.path.join(target_dir, '.version'), 'w') as f: 460 data = {
460 f.write('express' if options.express else 'pro') 461 'path': target_dir,
462 'version': '2013e' if options.express else '2013',
463 'win8sdk': os.path.join(target_dir, 'win8sdk'),
464 'wdk': os.path.join(target_dir, 'wdk'),
465 'runtime_dirs': [
466 os.path.join(target_dir, 'sys64'),
467 os.path.join(target_dir, 'sys32'),
468 ],
469 }
470 with open(os.path.join(target_dir, 'data.json'), 'w') as f:
471 json.dump(data, f)
461 finally: 472 finally:
462 if options.clean: 473 if options.clean:
463 DeleteAllTempDirs() 474 DeleteAllTempDirs()
464 475
465 476
466 if __name__ == '__main__': 477 if __name__ == '__main__':
467 sys.exit(main()) 478 sys.exit(main())
OLDNEW
« no previous file with comments | « win_toolchain/get_toolchain_if_necessary.py ('k') | win_toolchain/toolchain_vs2013.hash » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698