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 platform | 10 import platform |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 335 |
336 | 336 |
337 def _GetDesiredVsToolchainHashes(): | 337 def _GetDesiredVsToolchainHashes(): |
338 """Load a list of SHA1s corresponding to the toolchains that we want installed | 338 """Load a list of SHA1s corresponding to the toolchains that we want installed |
339 to build with.""" | 339 to build with.""" |
340 env_version = GetVisualStudioVersion() | 340 env_version = GetVisualStudioVersion() |
341 if env_version == '2015': | 341 if env_version == '2015': |
342 # Update 3 final with patches with 10.0.14393.0 SDK. | 342 # Update 3 final with patches with 10.0.14393.0 SDK. |
343 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] | 343 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] |
344 if env_version == '2017': | 344 if env_version == '2017': |
345 # VS 2017 RTM with 10.0.14393.0 SDK and dbghelp.dll fixes. | 345 # VS 2017 Update 3 Preview 1 with 10.0.14393.0 SDK and patched statreg.h. |
346 return ['4e8a360587a3c8ff3fa46aa9271e982bf3e948ec'] | 346 return ['3915730f76bd9c6155aed871b944b0a25c18f15e'] |
347 raise Exception('Unsupported VS version %s' % env_version) | 347 raise Exception('Unsupported VS version %s' % env_version) |
348 | 348 |
349 | 349 |
350 def ShouldUpdateToolchain(): | 350 def ShouldUpdateToolchain(): |
351 """Check if the toolchain should be upgraded.""" | 351 """Check if the toolchain should be upgraded.""" |
352 if not os.path.exists(json_data_file): | 352 if not os.path.exists(json_data_file): |
353 return True | 353 return True |
354 with open(json_data_file, 'r') as tempf: | 354 with open(json_data_file, 'r') as tempf: |
355 toolchain_data = json.load(tempf) | 355 toolchain_data = json.load(tempf) |
356 version = toolchain_data['version'] | 356 version = toolchain_data['version'] |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 'copy_dlls': CopyDlls, | 440 'copy_dlls': CopyDlls, |
441 } | 441 } |
442 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 442 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
443 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 443 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
444 return 1 | 444 return 1 |
445 return commands[sys.argv[1]](*sys.argv[2:]) | 445 return commands[sys.argv[1]](*sys.argv[2:]) |
446 | 446 |
447 | 447 |
448 if __name__ == '__main__': | 448 if __name__ == '__main__': |
449 sys.exit(main()) | 449 sys.exit(main()) |
OLD | NEW |