0029589: Configuration - allow MFC samples to be built when OCCT is linked statically
[occt.git] / samples / mfc / standard / run.bat
CommitLineData
aea58b16 1@echo off
2
4b3541c6 3Setlocal EnableDelayedExpansion
4
f4264b5a 5if "%1" == "-h" (
6 goto err_bat
cc5ac00d 7)
8
f4264b5a 9if not ["%4"] == [""] (
10 set "SampleName=%4"
11 call "%~dp0env.bat" %1 %2 %3
12) else if not ["%1"] == [""] (
13 set "SampleName=%1"
14 call "%~dp0env.bat"
15) else (
16 goto err_bat
17)
cc5ac00d 18
f4264b5a 19if not exist "%~dp0%BIN_DIR%\%SampleName%.exe" goto err_exe
cc5ac00d 20
f4264b5a 21"%~dp0%BIN_DIR%\%SampleName%.exe"
cc5ac00d 22
aea58b16 23goto eof
cc5ac00d 24
f4264b5a 25:err_bat
26echo Launch selected sample as follows:
693c4bbe 27echo %~n0.bat [^vc10^|^vc11^|^vc12^|^vc14^] [^win32^|^win64^] [^Release^|^Debug^] [^SampleName^]
f4264b5a 28echo or
29echo %~n0.bat [^SampleName^]
30echo Run %~n0.bat -h to get this help
31exit /B
32
aea58b16 33:err_exe
f4264b5a 34echo Executable %~dp0%BIN_DIR%\%SampleName%.exe not found.
aea58b16 35echo Probably you didn't compile the application.
36exit /B
cc5ac00d 37
aea58b16 38:eof