@ECHO OFF
rem Launch selected sample given as first argument

if "%1" == "" (
  echo Launch selected sample as follows: 
  echo %~nx0 ^<Sample^> [-d]
  echo Use option -d to run Debug mode
  exit
)

if "%2" == "-d" (
  set CASDEB=d
  set EXEDIR=%~dp0Debug
) else (
  set EXEDIR=%~dp0Release
)

call %~dp0env.bat
start %EXEDIR%\%~n1.exe

