| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 | 395 |
| 396 def NormalizePath(path): | 396 def NormalizePath(path): |
| 397 while path.endswith("\\"): | 397 while path.endswith("\\"): |
| 398 path = path[:-1] | 398 path = path[:-1] |
| 399 return path | 399 return path |
| 400 | 400 |
| 401 | 401 |
| 402 def SetEnvironmentAndGetSDKDir(): | 402 def SetEnvironmentAndGetSDKDir(): |
| 403 """Gets location information about the current sdk (must have been | 403 """Gets location information about the current sdk (must have been |
| 404 previously updated by 'update'). This is used for the GN build.""" | 404 previously updated by 'update'). This is used for the GN build.""" |
| 405 runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() | 405 SetEnvironmentAndGetRuntimeDllDirs() |
| 406 | 406 |
| 407 # If WINDOWSSDKDIR is not set, search the default SDK path and set it. | 407 # If WINDOWSSDKDIR is not set, search the default SDK path and set it. |
| 408 if not 'WINDOWSSDKDIR' in os.environ: | 408 if not 'WINDOWSSDKDIR' in os.environ: |
| 409 default_sdk_path = 'C:\\Program Files (x86)\\Windows Kits\\10' | 409 default_sdk_path = 'C:\\Program Files (x86)\\Windows Kits\\10' |
| 410 if os.path.isdir(default_sdk_path): | 410 if os.path.isdir(default_sdk_path): |
| 411 os.environ['WINDOWSSDKDIR'] = default_sdk_path | 411 os.environ['WINDOWSSDKDIR'] = default_sdk_path |
| 412 | 412 |
| 413 return NormalizePath(os.environ['WINDOWSSDKDIR']) | 413 return NormalizePath(os.environ['WINDOWSSDKDIR']) |
| 414 | 414 |
| 415 | 415 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 439 'copy_dlls': CopyDlls, | 439 'copy_dlls': CopyDlls, |
| 440 } | 440 } |
| 441 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 441 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 442 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 442 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 443 return 1 | 443 return 1 |
| 444 return commands[sys.argv[1]](*sys.argv[2:]) | 444 return commands[sys.argv[1]](*sys.argv[2:]) |
| 445 | 445 |
| 446 | 446 |
| 447 if __name__ == '__main__': | 447 if __name__ == '__main__': |
| 448 sys.exit(main()) | 448 sys.exit(main()) |
| OLD | NEW |