0028920: Samples - fix msvc.bat for building samples without CMake
[occt.git] / adm / templates / msvc.bat
CommitLineData
910970ab 1@echo off
2
3rem Setup environment
4call "%~dp0env.bat" %1 %2 %3
5
6rem Define path to project file
7set "PRJFILE=%~dp0\adm\msvc\%VCVER%\OCCT.sln"
8if not exist "%PRJFILE%" set "PRJFILE=%~dp0\adm\msvc\%VCVER%\Products.sln"
9if not "%4" == "" (
10 set "PRJFILE=%4"
11)
12
910970ab 13rem Launch Visual Studio - either professional (devenv) or Express, as available
14if exist "%DevEnvDir%\devenv.exe" (
15 start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%"
16) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
17 start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
18) else (
19 echo Error: Could not find MS Visual Studio ^(%VCVER%^)
d6cda17a 20 echo For VS 2010-2015, check relevant environment variable ^(e.g. VS100COMNTOOLS^)
910970ab 21)