0027176: Configuration, CMake - INSTALL_DIR is a common prefix for all other install...
[occt.git] / samples / mfc / standard / msvc.bat
CommitLineData
06562706 1@echo off
2
4b3541c6 3Setlocal EnableDelayedExpansion
4
06562706 5rem Setup environment
a44902ef 6call "%~dp0env.bat" %1 %2 %3
aea58b16 7
06562706 8rem Define path to project file
9set "PRJFILE=%~dp0All-%VCVER%.sln"
10
11set "VisualStudioExpressName=VCExpress"
12
4b3541c6 13if /I "%VCVER%" == "vc8" (
06562706 14 set "DevEnvDir=%VS80COMNTOOLS%..\IDE"
4b3541c6 15) else if /I "%VCVER%" == "vc9" (
06562706 16 set "DevEnvDir=%VS90COMNTOOLS%..\IDE"
4b3541c6 17) else if /I "%VCVER%" == "vc10" (
06562706 18 set "DevEnvDir=%VS100COMNTOOLS%..\IDE"
4b3541c6 19) else if /I "%VCVER%" == "vc11" (
06562706 20 set "DevEnvDir=%VS110COMNTOOLS%..\IDE"
21 rem Visual Studio Express starting from VS 2012 is called "for Windows Desktop"
22 rem and has a new name for executable - WDExpress
23 set "VisualStudioExpressName=WDExpress"
4b3541c6 24) else if /I "%VCVER%" == "vc12" (
06562706 25 set "DevEnvDir=%VS120COMNTOOLS%..\IDE"
26 set "VisualStudioExpressName=WDExpress"
27) else (
28 echo Error: wrong VS identifier
29 exit /B
30)
31
32rem Launch Visual Studio - either professional (devenv) or Express, as available
33if exist "%DevEnvDir%\devenv.exe" (
34 start "%DevEnvDir%\devenv.exe" "%PRJFILE%"
35) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
36 start "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
aea58b16 37) else (
06562706 38 echo Error: Could not find MS Visual Studio ^(%VCVER%^)
39 echo Check relevant environment variable ^(e.g. VS80COMNTOOLS for vc8^)
40)