r''' Windows only. Finds locations of Visual Studio command-line tools. Assumes VS2019-style paths. Members and example values:: .year: 2019 .grade: Community .version: 14.28.29910 .directory: C:\Program Files (x86)\Microsoft Visual Studio\201
| 15 | |
| 16 | |
| 17 | class WindowsVS: |
| 18 | r''' |
| 19 | Windows only. Finds locations of Visual Studio command-line tools. Assumes |
| 20 | VS2019-style paths. |
| 21 | |
| 22 | Members and example values:: |
| 23 | |
| 24 | .year: 2019 |
| 25 | .grade: Community |
| 26 | .version: 14.28.29910 |
| 27 | .directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community |
| 28 | .vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat |
| 29 | .cl: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\cl.exe |
| 30 | .link: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\Hostx64\x64\link.exe |
| 31 | .csc: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\csc.exe |
| 32 | .msbuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe |
| 33 | .devenv: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com |
| 34 | |
| 35 | `.csc` is C# compiler; will be None if not found. |
| 36 | ''' |
| 37 | def __init__( |
| 38 | self, |
| 39 | *, |
| 40 | year=None, |
| 41 | grade=None, |
| 42 | version=None, |
| 43 | cpu=None, |
| 44 | directory=None, |
| 45 | verbose=False, |
| 46 | ): |
| 47 | ''' |
| 48 | Args: |
| 49 | year: |
| 50 | None or, for example, `2019`. If None we use environment |
| 51 | variable WDEV_VS_YEAR if set. |
| 52 | grade: |
| 53 | None or, for example, one of: |
| 54 | |
| 55 | * `Community` |
| 56 | * `Professional` |
| 57 | * `Enterprise` |
| 58 | |
| 59 | If None we use environment variable WDEV_VS_GRADE if set. |
| 60 | version: |
| 61 | None or, for example: `14.28.29910`. If None we use environment |
| 62 | variable WDEV_VS_VERSION if set. |
| 63 | cpu: |
| 64 | None or a `WindowsCpu` instance. |
| 65 | directory: |
| 66 | Ignore year, grade, version and cpu and use this directory |
| 67 | directly. |
| 68 | verbose: |
| 69 | . |
| 70 | |
| 71 | ''' |
| 72 | if year is not None: |
| 73 | year = str(year) # Allow specification as a number. |
| 74 | def default(value, name): |
no outgoing calls
no test coverage detected
searching dependent graphs…