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