| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 for file_part in ('p', 'r'): | 97 for file_part in ('p', 'r'): |
| 98 dll = dll_pattern % file_part | 98 dll = dll_pattern % file_part |
| 99 target = os.path.join(target_dir, dll) | 99 target = os.path.join(target_dir, dll) |
| 100 source = os.path.join(source_dir, dll) | 100 source = os.path.join(source_dir, dll) |
| 101 _CopyRuntimeImpl(target, source) | 101 _CopyRuntimeImpl(target, source) |
| 102 | 102 |
| 103 | 103 |
| 104 def _CopyRuntime2015(target_dir, source_dir, dll_pattern): | 104 def _CopyRuntime2015(target_dir, source_dir, dll_pattern): |
| 105 """Copy both the msvcp and vccorlib runtime DLLs, only if the target doesn't | 105 """Copy both the msvcp and vccorlib runtime DLLs, only if the target doesn't |
| 106 exist, but the target directory does exist.""" | 106 exist, but the target directory does exist.""" |
| 107 for file_part in ('msvcp', 'vccorlib'): | 107 for file_part in ('msvcp', 'vccorlib', 'vcruntime'): |
| 108 dll = dll_pattern % file_part | 108 dll = dll_pattern % file_part |
| 109 target = os.path.join(target_dir, dll) | 109 target = os.path.join(target_dir, dll) |
| 110 source = os.path.join(source_dir, dll) | 110 source = os.path.join(source_dir, dll) |
| 111 _CopyRuntimeImpl(target, source) | 111 _CopyRuntimeImpl(target, source) |
| 112 | 112 |
| 113 | 113 |
| 114 def _CopyRuntime(target_dir, source_dir, target_cpu, debug): | 114 def _CopyRuntime(target_dir, source_dir, target_cpu, debug): |
| 115 """Copy the VS runtime DLLs, only if the target doesn't exist, but the target | 115 """Copy the VS runtime DLLs, only if the target doesn't exist, but the target |
| 116 directory does exist. Handles VS 2013 and VS 2015.""" | 116 directory does exist. Handles VS 2013 and VS 2015.""" |
| 117 suffix = "d.dll" if debug else ".dll" | 117 suffix = "d.dll" if debug else ".dll" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 'copy_dlls': CopyDlls, | 263 'copy_dlls': CopyDlls, |
| 264 } | 264 } |
| 265 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 265 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 266 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 266 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 267 return 1 | 267 return 1 |
| 268 return commands[sys.argv[1]](*sys.argv[2:]) | 268 return commands[sys.argv[1]](*sys.argv[2:]) |
| 269 | 269 |
| 270 | 270 |
| 271 if __name__ == '__main__': | 271 if __name__ == '__main__': |
| 272 sys.exit(main()) | 272 sys.exit(main()) |
| OLD | NEW |