@ECHO OFF
REM ################################################################################
REM #
REM #    JSA 1.0.2 : JavaScript Analyzer
REM #      - Wiget Validator 
REM #
REM #    Software Center, SQE Lab : kwangwon.sun@samsung.com, inho0212.lim@samsung.com
REM #
REM ################################################################################
goto :main

:setExecPath
	rem set the java exec path to be used
	if not exist "%JDK_PATH%" (
		set javaExec=java
	) else (
		set javaExec=%JDK_PATH%\bin\java
	)

	goto :eof


:main
set TIZEN_INSTALL_PATH=%1
set JDK_PATH=%TIZEN_INSTALL_PATH%\jdk
set JSA_HOME="%TIZEN_INSTALL_PATH%/tools/web-widget-validator"
call :setExecPath
:end
REM # Root path of JSA tools
REM # "C:\JSA_RuleChecker"

REM #java -Xss32m -Xmx512m -cp %JSA_HOME%/jsa-engine-1.1.jar;%JSA_HOME%/lib/*;. kr.ac.kaist.jsaf.Shell ss-analysis %1 %2 %3 %4 %5 %6 %7 %8 %9 -nostop -tizen -wcv -jsa-plugin -context-5-callsite -context-loop -locclone -forin-unroll 1

"%javaExec%" -Xss32m -Xmx512m -cp %JSA_HOME%/jsa-wcv-engine-1.1.jar;%JSA_HOME%/lib/*;. kr.ac.kaist.jsaf.Shell ss-wcv-analysis -dir %2 -nostop -tizen -wcv -jsa-plugin

