| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  297   vs_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() |  297   vs_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() | 
|  298   if not vs_runtime_dll_dirs: |  298   if not vs_runtime_dll_dirs: | 
|  299     return |  299     return | 
|  300  |  300  | 
|  301   x64_runtime, x86_runtime = vs_runtime_dll_dirs |  301   x64_runtime, x86_runtime = vs_runtime_dll_dirs | 
|  302   runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime |  302   runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime | 
|  303   _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) |  303   _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) | 
|  304   if configuration == 'Debug': |  304   if configuration == 'Debug': | 
|  305     _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) |  305     _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) | 
|  306  |  306  | 
|  307   _CopyDebugger(target_dir, target_cpu) |  | 
|  308  |  | 
|  309  |  | 
|  310 def _CopyDebugger(target_dir, target_cpu): |  | 
|  311   """Copy cdb.exe into the requested directory as needed. |  | 
|  312  |  | 
|  313   target_cpu is one of 'x86' or 'x64'. |  | 
|  314  |  | 
|  315   This is used for the GN build. |  | 
|  316   """ |  | 
|  317   win_sdk_dir = SetEnvironmentAndGetSDKDir() |  | 
|  318   if not win_sdk_dir: |  | 
|  319     return |  | 
|  320  |  | 
|  321   debugger_files = ( |  | 
|  322         'cdb.exe', 'dbgeng.dll', 'dbghelp.dll', 'dbgmodel.dll', 'dbgcore.dll') |  | 
|  323  |  | 
|  324   for debug_file in debugger_files: |  | 
|  325     full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file) |  | 
|  326     target_path = os.path.join(target_dir, debug_file) |  | 
|  327     _CopyRuntimeImpl(target_path, full_path) |  | 
|  328  |  | 
|  329  |  307  | 
|  330 def _GetDesiredVsToolchainHashes(): |  308 def _GetDesiredVsToolchainHashes(): | 
|  331   """Load a list of SHA1s corresponding to the toolchains that we want installed |  309   """Load a list of SHA1s corresponding to the toolchains that we want installed | 
|  332   to build with.""" |  310   to build with.""" | 
|  333   env_version = GetVisualStudioVersion() |  311   env_version = GetVisualStudioVersion() | 
|  334   if env_version == '2015': |  312   if env_version == '2015': | 
|  335     # Update 3 final with patches with 10.0.14393.0 SDK. |  313     # Update 3 final with patches with 10.0.14393.0 SDK. | 
|  336     return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] |  314     return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] | 
|  337   if env_version == '2017': |  315   if env_version == '2017': | 
|  338     # VS 2017 RTM with 10.0.14393.0 SDK. |  316     # VS 2017 RTM with 10.0.14393.0 SDK. | 
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  433       'copy_dlls': CopyDlls, |  411       'copy_dlls': CopyDlls, | 
|  434   } |  412   } | 
|  435   if len(sys.argv) < 2 or sys.argv[1] not in commands: |  413   if len(sys.argv) < 2 or sys.argv[1] not in commands: | 
|  436     print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |  414     print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 
|  437     return 1 |  415     return 1 | 
|  438   return commands[sys.argv[1]](*sys.argv[2:]) |  416   return commands[sys.argv[1]](*sys.argv[2:]) | 
|  439  |  417  | 
|  440  |  418  | 
|  441 if __name__ == '__main__': |  419 if __name__ == '__main__': | 
|  442   sys.exit(main()) |  420   sys.exit(main()) | 
| OLD | NEW |