| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 339 |
| 340 | 340 |
| 341 def _GetDesiredVsToolchainHashes(): | 341 def _GetDesiredVsToolchainHashes(): |
| 342 """Load a list of SHA1s corresponding to the toolchains that we want installed | 342 """Load a list of SHA1s corresponding to the toolchains that we want installed |
| 343 to build with.""" | 343 to build with.""" |
| 344 env_version = GetVisualStudioVersion() | 344 env_version = GetVisualStudioVersion() |
| 345 if env_version == '2015': | 345 if env_version == '2015': |
| 346 # Update 3 final with 10.0.15063.468 SDK and no vctip.exe. | 346 # Update 3 final with 10.0.15063.468 SDK and no vctip.exe. |
| 347 return ['f53e4598951162bad6330f7a167486c7ae5db1e5'] | 347 return ['f53e4598951162bad6330f7a167486c7ae5db1e5'] |
| 348 if env_version == '2017': | 348 if env_version == '2017': |
| 349 # VS 2017 Update 3 Preview 2 with 10.0.15063.0 SDK and patched event.h. | 349 # VS 2017 Update 3 Preview 3 with 10.0.15063.468 SDK. |
| 350 return ['425bd64734a387734dfcf445b285a7c5073e4262'] | 350 return ['15d1e1d9da02f10de7b95137b314236068025fa8'] |
| 351 raise Exception('Unsupported VS version %s' % env_version) | 351 raise Exception('Unsupported VS version %s' % env_version) |
| 352 | 352 |
| 353 | 353 |
| 354 def ShouldUpdateToolchain(): | 354 def ShouldUpdateToolchain(): |
| 355 """Check if the toolchain should be upgraded.""" | 355 """Check if the toolchain should be upgraded.""" |
| 356 if not os.path.exists(json_data_file): | 356 if not os.path.exists(json_data_file): |
| 357 return True | 357 return True |
| 358 with open(json_data_file, 'r') as tempf: | 358 with open(json_data_file, 'r') as tempf: |
| 359 toolchain_data = json.load(tempf) | 359 toolchain_data = json.load(tempf) |
| 360 version = toolchain_data['version'] | 360 version = toolchain_data['version'] |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 'copy_dlls': CopyDlls, | 444 'copy_dlls': CopyDlls, |
| 445 } | 445 } |
| 446 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 446 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 447 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 447 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 448 return 1 | 448 return 1 |
| 449 return commands[sys.argv[1]](*sys.argv[2:]) | 449 return commands[sys.argv[1]](*sys.argv[2:]) |
| 450 | 450 |
| 451 | 451 |
| 452 if __name__ == '__main__': | 452 if __name__ == '__main__': |
| 453 sys.exit(main()) | 453 sys.exit(main()) |
| OLD | NEW |