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 json | 6 import json |
7 import os | 7 import os |
8 import pipes | 8 import pipes |
9 import shutil | 9 import shutil |
10 import subprocess | 10 import subprocess |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 | 268 |
269 | 269 |
270 def _GetDesiredVsToolchainHashes(): | 270 def _GetDesiredVsToolchainHashes(): |
271 """Load a list of SHA1s corresponding to the toolchains that we want installed | 271 """Load a list of SHA1s corresponding to the toolchains that we want installed |
272 to build with.""" | 272 to build with.""" |
273 if GetVisualStudioVersion() == '2015': | 273 if GetVisualStudioVersion() == '2015': |
274 # Update 1 with Debuggers, UCRT installers and ucrtbased.dll | 274 # Update 1 with Debuggers, UCRT installers and ucrtbased.dll |
275 return ['524956ec6e64e68fead3773e3ce318537657b404'] | 275 return ['524956ec6e64e68fead3773e3ce318537657b404'] |
276 else: | 276 else: |
277 # Default to VS2013. | 277 # Default to VS2013. |
278 return ['9ff97c632ae1fee0c98bcd53e71770eb3a0d8deb'] | 278 return ['4087e065abebdca6dbd0caca2910c6718d2ec67f'] |
279 | 279 |
280 | 280 |
281 def ShouldUpdateToolchain(): | 281 def ShouldUpdateToolchain(): |
282 """Check if the toolchain should be upgraded.""" | 282 """Check if the toolchain should be upgraded.""" |
283 if not os.path.exists(json_data_file): | 283 if not os.path.exists(json_data_file): |
284 return True | 284 return True |
285 with open(json_data_file, 'r') as tempf: | 285 with open(json_data_file, 'r') as tempf: |
286 toolchain_data = json.load(tempf) | 286 toolchain_data = json.load(tempf) |
287 version = toolchain_data['version'] | 287 version = toolchain_data['version'] |
288 env_version = GetVisualStudioVersion() | 288 env_version = GetVisualStudioVersion() |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 'copy_dlls': CopyDlls, | 353 'copy_dlls': CopyDlls, |
354 } | 354 } |
355 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 355 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
356 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 356 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
357 return 1 | 357 return 1 |
358 return commands[sys.argv[1]](*sys.argv[2:]) | 358 return commands[sys.argv[1]](*sys.argv[2:]) |
359 | 359 |
360 | 360 |
361 if __name__ == '__main__': | 361 if __name__ == '__main__': |
362 sys.exit(main()) | 362 sys.exit(main()) |
OLD | NEW |