Welcome to mirror list, hosted at ThFree Co, Russian Federation.

findvcvarsall.bat « BuildIntegration « src - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 91c3bfe33d8533c23a083d1a80d96fab36467b98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@ECHO OFF
SETLOCAL

SET vswherePath=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
IF NOT EXIST "%vswherePath%" GOTO :ERROR

FOR /F "tokens=*" %%i IN (	'
	  "%vswherePath%" -latest -prerelease -products * ^
        -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^
        -property installationPath'
      ) DO SET vsBase=%%i

IF "%vsBase%"=="" GOTO :ERROR

CALL "%vsBase%\vc\Auxiliary\Build\vcvarsall.bat" %1% > NUL

FOR /F "delims=" %%W IN ('where link') DO (
    FOR %%A IN ("%%W") DO ECHO %%~dpA#
    GOTO :CAPTURE_LIB_PATHS
)

:CAPTURE_LIB_PATHS
ECHO %LIB%

EXIT /B 0

ENDLOCAL

:ERROR
    EXIT /B 1