0028920: Samples - fix msvc.bat for building samples without CMake
[occt.git] / samples / CSharp / msvc.bat
CommitLineData
06562706 1@echo off
aea58b16 2
4b3541c6 3Setlocal EnableDelayedExpansion
4
06562706 5rem Setup environment
4b3541c6 6call "%~dp0env.bat" %1 %2 %3
06562706 7
8rem Define path to project file
9set "PRJFILE=%~dp0\CSharp.sln"
10
06562706 11rem Launch Visual Studio - either professional (devenv) or Express, as available
12if exist "%DevEnvDir%\devenv.exe" (
48691eaa 13 start "" "%DevEnvDir%\devenv.exe" "%PRJFILE%"
06562706 14) else if exist "%DevEnvDir%\%VisualStudioExpressName%.exe" (
48691eaa 15 start "" "%DevEnvDir%\%VisualStudioExpressName%.exe" "%PRJFILE%"
aea58b16 16) else (
06562706 17 echo Error: Could not find MS Visual Studio ^(%VCVER%^)
693c4bbe 18 echo Check relevant environment variable ^(e.g. VS100COMNTOOLS for vc10^)
06562706 19)