| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import os | 6 import os |
| 7 import pipes | 7 import pipes |
| 8 import shutil | 8 import shutil |
| 9 import subprocess | 9 import subprocess |
| 10 import sys | 10 import sys |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 print '''vs_path = "%s" | 195 print '''vs_path = "%s" |
| 196 sdk_path = "%s" | 196 sdk_path = "%s" |
| 197 vs_version = "%s" | 197 vs_version = "%s" |
| 198 wdk_dir = "%s" | 198 wdk_dir = "%s" |
| 199 runtime_dirs = "%s" | 199 runtime_dirs = "%s" |
| 200 ''' % ( | 200 ''' % ( |
| 201 os.environ['GYP_MSVS_OVERRIDE_PATH'], | 201 os.environ['GYP_MSVS_OVERRIDE_PATH'], |
| 202 os.environ['WINDOWSSDKDIR'], | 202 os.environ['WINDOWSSDKDIR'], |
| 203 os.environ['GYP_MSVS_VERSION'], | 203 os.environ['GYP_MSVS_VERSION'], |
| 204 os.environ.get('WDK_DIR', ''), | 204 os.environ.get('WDK_DIR', ''), |
| 205 ';'.join(runtime_dll_dirs)) | 205 ';'.join(runtime_dll_dirs or ['None'])) |
| 206 | 206 |
| 207 | 207 |
| 208 def main(): | 208 def main(): |
| 209 if not sys.platform.startswith(('win32', 'cygwin')): | 209 if not sys.platform.startswith(('win32', 'cygwin')): |
| 210 return 0 | 210 return 0 |
| 211 commands = { | 211 commands = { |
| 212 'update': Update, | 212 'update': Update, |
| 213 'get_toolchain_dir': GetToolchainDir, | 213 'get_toolchain_dir': GetToolchainDir, |
| 214 'copy_dlls': CopyDlls, | 214 'copy_dlls': CopyDlls, |
| 215 } | 215 } |
| 216 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 216 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 217 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 217 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 218 return 1 | 218 return 1 |
| 219 return commands[sys.argv[1]](*sys.argv[2:]) | 219 return commands[sys.argv[1]](*sys.argv[2:]) |
| 220 | 220 |
| 221 | 221 |
| 222 if __name__ == '__main__': | 222 if __name__ == '__main__': |
| 223 sys.exit(main()) | 223 sys.exit(main()) |
| OLD | NEW |