-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_vs.bat
39 lines (34 loc) · 1.4 KB
/
env_vs.bat
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
31
32
33
34
35
36
37
38
39
echo Setting environment for the Visual Studio %1
if "%1" == "8" (
rem -------- Visual Studio --------------------
rem Detect Visual Studio (either commercial or Express edition)
if "%VS80COMNTOOLS%" == "" (
echo Could not find MS Visual Studio: variable VS80COMNTOOLS is not defined!
exit 1
) else if exist "%VS80COMNTOOLS%\..\IDE\devenv.exe" (
set MSVC_EXE="%VS80COMNTOOLS%\..\IDE\devenv.exe"
) else if exist "%VS80COMNTOOLS%\..\IDE\VCExpress.exe" (
set MSVC_EXE="%VS80COMNTOOLS%\..\IDE\VCExpress.exe"
) else (
echo "Could not find MS Visual Studio in %VS80COMNTOOLS%\..\IDE"
echo Check environment variable VS80COMNTOOLS!
exit 1
)
call "%VS80COMNTOOLS%..\Tools\vsvars32.bat"
) else if "%1" == "9" (
rem -------- Visual Studio --------------------
rem Detect Visual Studio (either commercial or Express edition)
if "%VS90COMNTOOLS%" == "" (
echo Could not find MS Visual Studio: variable VS90COMNTOOLS is not defined!
exit 1
) else if exist "%VS90COMNTOOLS%\..\IDE\devenv.exe" (
set MSVC_EXE="%VS90COMNTOOLS%\..\IDE\devenv.exe"
) else if exist "%VS90COMNTOOLS%\..\IDE\VCExpress.exe" (
set MSVC_EXE="%VS90COMNTOOLS%\..\IDE\VCExpress.exe"
) else (
echo "Could not find MS Visual Studio in %VS90COMNTOOLS%\..\IDE"
echo Check environment variable VS90COMNTOOLS!
exit 1
)
call "%VS90COMNTOOLS%..\Tools\vsvars32.bat"
)