| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 import glob | 6 import glob |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import pipes | 9 import pipes |
| 10 import shutil | 10 import shutil |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) | 274 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) |
| 275 | 275 |
| 276 | 276 |
| 277 def _GetDesiredVsToolchainHashes(): | 277 def _GetDesiredVsToolchainHashes(): |
| 278 """Load a list of SHA1s corresponding to the toolchains that we want installed | 278 """Load a list of SHA1s corresponding to the toolchains that we want installed |
| 279 to build with.""" | 279 to build with.""" |
| 280 if GetVisualStudioVersion() == '2015': | 280 if GetVisualStudioVersion() == '2015': |
| 281 # Update 2. | 281 # Update 2. |
| 282 return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97'] | 282 return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97'] |
| 283 else: | 283 else: |
| 284 return ['4087e065abebdca6dbd0caca2910c6718d2ec67f'] | 284 return ['03a4e939cd325d6bc5216af41b92d02dda1366a6'] |
| 285 | 285 |
| 286 | 286 |
| 287 def ShouldUpdateToolchain(): | 287 def ShouldUpdateToolchain(): |
| 288 """Check if the toolchain should be upgraded.""" | 288 """Check if the toolchain should be upgraded.""" |
| 289 if not os.path.exists(json_data_file): | 289 if not os.path.exists(json_data_file): |
| 290 return True | 290 return True |
| 291 with open(json_data_file, 'r') as tempf: | 291 with open(json_data_file, 'r') as tempf: |
| 292 toolchain_data = json.load(tempf) | 292 toolchain_data = json.load(tempf) |
| 293 version = toolchain_data['version'] | 293 version = toolchain_data['version'] |
| 294 env_version = GetVisualStudioVersion() | 294 env_version = GetVisualStudioVersion() |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 'copy_dlls': CopyDlls, | 368 'copy_dlls': CopyDlls, |
| 369 } | 369 } |
| 370 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 370 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 371 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 371 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 372 return 1 | 372 return 1 |
| 373 return commands[sys.argv[1]](*sys.argv[2:]) | 373 return commands[sys.argv[1]](*sys.argv[2:]) |
| 374 | 374 |
| 375 | 375 |
| 376 if __name__ == '__main__': | 376 if __name__ == '__main__': |
| 377 sys.exit(main()) | 377 sys.exit(main()) |
| OLD | NEW |