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