@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.1.jar;%LIB_DIRECTORY%/winpack-3.6.jar;%LIB_DIRECTORY%/comfyj-2.4.jar
set CUSTOM_CLASSES=%ROOT_DIR%/demo/comfyjdemo.jar;

set SAMPLE_CLASSPATH=%CORE_CLASSES%;%CUSTOM_CLASSES%
set SAMPLE_MAINCLASS=com.jniwrapper.win32.samples.demo.ComfyjDemo

set PATH=%BIN_DIRECTORY%;%PATH%

if not exist %BIN_DIRECTORY%/jniwrap.lic goto noJNIWrapperLic 
if not exist %BIN_DIRECTORY%/comfyj.lic goto noComfyJLic

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

:noJNIWrapperLic
echo Cannot start ComfyJ Demo: no JNIWrapper license file found. Make sure that the license is located in the bin subfolder.
echo.
pause
goto end

:noComfyJLic
echo Cannot start ComfyJ Demo: no ComfyJ license file found. Make sure that the license is located in the bin subfolder.
echo.
pause
goto end

:end