| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
| 3 """Handle version information related to Visual Stuio.""" | 7 """Handle version information related to Visual Stuio.""" |
| 4 | 8 |
| 5 import os | 9 import os |
| 6 import re | 10 import re |
| 7 import subprocess | 11 import subprocess |
| 8 import sys | 12 import sys |
| 9 | 13 |
| 10 | 14 |
| 11 class VisualStudioVersion: | 15 class VisualStudioVersion: |
| 12 """Information regarding a version of Visual Studio.""" | 16 """Information regarding a version of Visual Studio.""" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 version = os.environ.get('GYP_MSVS_VERSION', '2005') | 120 version = os.environ.get('GYP_MSVS_VERSION', '2005') |
| 117 # In auto mode, detect highest version present. | 121 # In auto mode, detect highest version present. |
| 118 if version == 'auto': | 122 if version == 'auto': |
| 119 version = _DetectHighestVisualStudioVersion() | 123 version = _DetectHighestVisualStudioVersion() |
| 120 if not version: | 124 if not version: |
| 121 # Default to 2005. | 125 # Default to 2005. |
| 122 version = _CreateVersion('2005') | 126 version = _CreateVersion('2005') |
| 123 return version | 127 return version |
| 124 # Convert version string into a version object. | 128 # Convert version string into a version object. |
| 125 return _CreateVersion(version) | 129 return _CreateVersion(version) |
| OLD | NEW |