| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 previously updated by 'update'). This is used for the GN build.""" | 165 previously updated by 'update'). This is used for the GN build.""" |
| 166 SetEnvironmentAndGetRuntimeDllDirs() | 166 SetEnvironmentAndGetRuntimeDllDirs() |
| 167 print '''vs_path = "%s" | 167 print '''vs_path = "%s" |
| 168 sdk_path = "%s" | 168 sdk_path = "%s" |
| 169 vs_version = "%s" | 169 vs_version = "%s" |
| 170 wdk_dir = "%s" | 170 wdk_dir = "%s" |
| 171 ''' % ( | 171 ''' % ( |
| 172 os.environ['GYP_MSVS_OVERRIDE_PATH'], | 172 os.environ['GYP_MSVS_OVERRIDE_PATH'], |
| 173 os.environ['WINDOWSSDKDIR'], | 173 os.environ['WINDOWSSDKDIR'], |
| 174 os.environ['GYP_MSVS_VERSION'], | 174 os.environ['GYP_MSVS_VERSION'], |
| 175 os.environ['WDK_DIR']) | 175 os.environ.get('WDK_DIR', '')) |
| 176 | 176 |
| 177 | 177 |
| 178 def main(): | 178 def main(): |
| 179 if not sys.platform.startswith(('win32', 'cygwin')): | 179 if not sys.platform.startswith(('win32', 'cygwin')): |
| 180 return 0 | 180 return 0 |
| 181 commands = { | 181 commands = { |
| 182 'update': Update, | 182 'update': Update, |
| 183 'get_toolchain_dir': GetToolchainDir, | 183 'get_toolchain_dir': GetToolchainDir, |
| 184 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls | 184 # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls |
| 185 # CopyVsRuntimeDlls via import, currently). | 185 # CopyVsRuntimeDlls via import, currently). |
| 186 } | 186 } |
| 187 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 187 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 188 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 188 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 189 return 1 | 189 return 1 |
| 190 return commands[sys.argv[1]]() | 190 return commands[sys.argv[1]]() |
| 191 | 191 |
| 192 | 192 |
| 193 if __name__ == '__main__': | 193 if __name__ == '__main__': |
| 194 sys.exit(main()) | 194 sys.exit(main()) |
| OLD | NEW |