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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 | 329 |
330 def _GetDesiredVsToolchainHashes(): | 330 def _GetDesiredVsToolchainHashes(): |
331 """Load a list of SHA1s corresponding to the toolchains that we want installed | 331 """Load a list of SHA1s corresponding to the toolchains that we want installed |
332 to build with.""" | 332 to build with.""" |
333 env_version = GetVisualStudioVersion() | 333 env_version = GetVisualStudioVersion() |
334 if env_version == '2015': | 334 if env_version == '2015': |
335 # Update 3 final with patches with 10.0.14393.0 SDK. | 335 # Update 3 final with patches with 10.0.14393.0 SDK. |
336 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] | 336 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] |
337 if env_version == '2017': | 337 if env_version == '2017': |
338 # VS 2017 RTM with 10.0.14393.0 SDK. | 338 # VS 2017 RTM with 10.0.14393.0 SDK and dbghelp.dll fixes. |
339 return ['716b3fda0f857c3dc24d795d1a4d74e1e740face'] | 339 return ['4e8a360587a3c8ff3fa46aa9271e982bf3e948ec'] |
340 raise Exception('Unsupported VS version %s' % env_version) | 340 raise Exception('Unsupported VS version %s' % env_version) |
341 | 341 |
342 | 342 |
343 def ShouldUpdateToolchain(): | 343 def ShouldUpdateToolchain(): |
344 """Check if the toolchain should be upgraded.""" | 344 """Check if the toolchain should be upgraded.""" |
345 if not os.path.exists(json_data_file): | 345 if not os.path.exists(json_data_file): |
346 return True | 346 return True |
347 with open(json_data_file, 'r') as tempf: | 347 with open(json_data_file, 'r') as tempf: |
348 toolchain_data = json.load(tempf) | 348 toolchain_data = json.load(tempf) |
349 version = toolchain_data['version'] | 349 version = toolchain_data['version'] |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 'copy_dlls': CopyDlls, | 433 'copy_dlls': CopyDlls, |
434 } | 434 } |
435 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 435 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
436 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 436 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
437 return 1 | 437 return 1 |
438 return commands[sys.argv[1]](*sys.argv[2:]) | 438 return commands[sys.argv[1]](*sys.argv[2:]) |
439 | 439 |
440 | 440 |
441 if __name__ == '__main__': | 441 if __name__ == '__main__': |
442 sys.exit(main()) | 442 sys.exit(main()) |
OLD | NEW |