@echo off

REM Copyright (c) 2002-2007 TeamDev Ltd. All rights reserved.

set ROOT_DIR=../..

set LIB_DIRECTORY=%ROOT_DIR%/lib
set BIN_DIRECTORY=%ROOT_DIR%/bin

set CORE_CLASSES=%LIB_DIRECTORY%/jniwrap-3.6.jar;%LIB_DIRECTORY%/jxcapture-1.0.jar;
set CUSTOM_CLASSES=jxcapturedemo.jar;

set SAMPLE_CLASSPATH=%CORE_CLASSES%%CUSTOM_CLASSES%
set SAMPLE_MAINCLASS=teamdev.jxcapture.samples.demo.JxCaptureDemo

set PATH=%BIN_DIRECTORY%;%PATH%

if not exist %BIN_DIRECTORY%/jniwrap.lic goto noJNIWrapperLic 
if not exist %BIN_DIRECTORY%/jxcapture.lic goto noJxCaptureLic 

echo %SAMPLE_CLASSPATH%
echo %SAMPLE_MAINCLASS%

start "" javaw.exe -Xmx256M -classpath %SAMPLE_CLASSPATH% %SAMPLE_MAINCLASS%
goto end

:noJNIWrapperLic
echo Cannot start JxCapture: no JNIWrapper license file (jniwrap.lic) found in the 'bin' directory.
echo.
pause
goto end

:noJxCaptureLic
echo Cannot start JxCapture: no JxCapture license file (jxcapture.lic) found in the 'bin' directory.
echo.
pause
goto end
:end