aea58b16 |
1 | @echo off |
2 | |
4b3541c6 |
3 | Setlocal EnableDelayedExpansion |
4 | |
f4264b5a |
5 | if "%1" == "-h" ( |
6 | goto err_bat |
cc5ac00d |
7 | ) |
8 | |
f4264b5a |
9 | if 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 |
19 | if not exist "%~dp0%BIN_DIR%\%SampleName%.exe" goto err_exe |
cc5ac00d |
20 | |
f4264b5a |
21 | "%~dp0%BIN_DIR%\%SampleName%.exe" |
cc5ac00d |
22 | |
aea58b16 |
23 | goto eof |
cc5ac00d |
24 | |
f4264b5a |
25 | :err_bat |
26 | echo Launch selected sample as follows: |
693c4bbe |
27 | echo %~n0.bat [^vc10^|^vc11^|^vc12^|^vc14^] [^win32^|^win64^] [^Release^|^Debug^] [^SampleName^] |
f4264b5a |
28 | echo or |
29 | echo %~n0.bat [^SampleName^] |
30 | echo Run %~n0.bat -h to get this help |
31 | exit /B |
32 | |
aea58b16 |
33 | :err_exe |
f4264b5a |
34 | echo Executable %~dp0%BIN_DIR%\%SampleName%.exe not found. |
aea58b16 |
35 | echo Probably you didn't compile the application. |
36 | exit /B |
cc5ac00d |
37 | |
aea58b16 |
38 | :eof |