@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  anticheat-center-deploy startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and ANTICHEAT_CENTER_DEPLOY_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%..

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\lib\anticheat-center-0.1.0.jar;%APP_HOME%\lib\anticheat-center-common-2.8.9-SNAPSHOT.jar;%APP_HOME%\lib\anticheat-center-biz-2.8.9-SNAPSHOT.jar;%APP_HOME%\lib\anticheat-center-api-2.8.9-SNAPSHOT.jar;%APP_HOME%\lib\zkclient-0.5.jar;%APP_HOME%\lib\spring-boot-starter-web-1.2.6.RELEASE.jar;%APP_HOME%\lib\spring-boot-starter-jdbc-1.2.6.RELEASE.jar;%APP_HOME%\lib\spring-boot-starter-test-1.2.6.RELEASE.jar;%APP_HOME%\lib\commons-dbcp-1.4.jar;%APP_HOME%\lib\aspectjweaver-1.8.9.jar;%APP_HOME%\lib\disconf-client-2.6.33.jar;%APP_HOME%\lib\log4j-over-slf4j-1.7.5.jar;%APP_HOME%\lib\slf4j-api-1.7.5.jar;%APP_HOME%\lib\spring-boot-starter-logger-1.1.8-SNAPSHOT.jar;%APP_HOME%\lib\spring-boot-ext-1.1.8-SNAPSHOT.jar;%APP_HOME%\lib\commons-lang3-3.4.jar;%APP_HOME%\lib\wolf-2.0.0.jar;%APP_HOME%\lib\guava-18.0.jar;%APP_HOME%\lib\dcommons-base-0.0.11-SNAPSHOT.jar;%APP_HOME%\lib\xmemcached-1.4.3.jar;%APP_HOME%\lib\spymemcached-2.8.4.jar;%APP_HOME%\lib\spring-boot-starter-cat-1.1.8-SNAPSHOT.jar;%APP_HOME%\lib\spring-boot-starter-perftest-1.1.8-SNAPSHOT.jar;%APP_HOME%\lib\mybatis-3.3.1.jar;%APP_HOME%\lib\mybatis-spring-1.2.3.jar;%APP_HOME%\lib\mysql-connector-java-5.1.9.jar;%APP_HOME%\lib\spring-context-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-context-support-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-orm-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-beans-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-core-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-web-4.1.5.RELEASE.jar;%APP_HOME%\lib\commons-dbcp2-2.0.1.jar;%APP_HOME%\lib\commons-io-2.4.jar;%APP_HOME%\lib\commons-collections4-4.1.jar;%APP_HOME%\lib\cglib-2.2.2.jar;%APP_HOME%\lib\dubbo-2.5.4.2.dbfix.jar;%APP_HOME%\lib\elastic-job-core-1.0.6.jar;%APP_HOME%\lib\elastic-job-spring-1.0.6.jar;%APP_HOME%\lib\javassist-3.20.0-GA.jar;%APP_HOME%\lib\asm-all-3.3.1.jar;%APP_HOME%\lib\jboss-logging-3.3.0.Final.jar;%APP_HOME%\lib\validation-api-1.1.0.Final.jar;%APP_HOME%\lib\resteasy-jaxrs-3.0.7.Final.jar;%APP_HOME%\lib\resteasy-client-3.0.7.Final.jar;%APP_HOME%\lib\resteasy-jackson-provider-3.0.7.Final.jar;%APP_HOME%\lib\resteasy-netty-3.0.7.Final.jar;%APP_HOME%\lib\kafka-clients-0.9.0.1.jar;%APP_HOME%\lib\fastjson-1.2.6.jar;%APP_HOME%\lib\commons-lang-2.6.jar;%APP_HOME%\lib\commons-beanutils-1.8.3.jar;%APP_HOME%\lib\log4j-1.2.17.jar;%APP_HOME%\lib\zookeeper-3.4.8.jar;%APP_HOME%\lib\spring-boot-starter-1.2.6.RELEASE.jar;%APP_HOME%\lib\spring-boot-starter-tomcat-1.2.6.RELEASE.jar;%APP_HOME%\lib\jackson-databind-2.4.6.jar;%APP_HOME%\lib\hibernate-validator-5.1.3.Final.jar;%APP_HOME%\lib\spring-webmvc-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-jdbc-4.1.5.RELEASE.jar;%APP_HOME%\lib\tomcat-jdbc-8.0.26.jar;%APP_HOME%\lib\spring-tx-4.1.5.RELEASE.jar;%APP_HOME%\lib\junit-4.12.jar;%APP_HOME%\lib\mockito-core-1.10.19.jar;%APP_HOME%\lib\hamcrest-core-1.3.jar;%APP_HOME%\lib\hamcrest-library-1.3.jar;%APP_HOME%\lib\spring-test-4.1.5.RELEASE.jar;%APP_HOME%\lib\commons-pool-1.6.jar;%APP_HOME%\lib\disconf-core-2.6.33.jar;%APP_HOME%\lib\gson-2.3.1.jar;%APP_HOME%\lib\reflections-0.9.9-RC1.jar;%APP_HOME%\lib\aspectjtools-1.8.6.jar;%APP_HOME%\lib\activation-1.1.1.jar;%APP_HOME%\lib\antlr-3.4.jar;%APP_HOME%\lib\aopalliance-1.0.jar;%APP_HOME%\lib\bsh-2.0b1.jar;%APP_HOME%\lib\commons-cli-1.2.jar;%APP_HOME%\lib\commons-codec-1.6.jar;%APP_HOME%\lib\commons-collections-3.2.jar;%APP_HOME%\lib\commons-logging-1.1.2.jar;%APP_HOME%\lib\commons-math3-3.6.1.jar;%APP_HOME%\lib\joda-time-2.9.3.jar;%APP_HOME%\lib\json-lib-2.4-jdk15.jar;%APP_HOME%\lib\logback-core-1.0.13.jar;%APP_HOME%\lib\logback-classic-1.0.13.jar;%APP_HOME%\lib\jedis-2.8.1.jar;%APP_HOME%\lib\httpclient-4.3.6.jar;%APP_HOME%\lib\httpasyncclient-4.0.2.jar;%APP_HOME%\lib\cat-monitor-1.0.1-SNAPSHOT.jar;%APP_HOME%\lib\transmittable-thread-local-2.1.0.jar;%APP_HOME%\lib\spring-aop-4.1.5.RELEASE.jar;%APP_HOME%\lib\spring-expression-4.1.5.RELEASE.jar;%APP_HOME%\lib\commons-pool2-2.2.jar;%APP_HOME%\lib\asm-3.3.1.jar;%APP_HOME%\lib\netty-3.2.5.Final.jar;%APP_HOME%\lib\lombok-1.16.4.jar;%APP_HOME%\lib\quartz-2.2.1.jar;%APP_HOME%\lib\curator-framework-2.10.0.jar;%APP_HOME%\lib\curator-client-2.10.0.jar;%APP_HOME%\lib\curator-recipes-2.10.0.jar;%APP_HOME%\lib\curator-test-2.10.0.jar;%APP_HOME%\lib\jaxrs-api-3.0.7.Final.jar;%APP_HOME%\lib\jboss-annotations-api_1.1_spec-1.0.1.Final.jar;%APP_HOME%\lib\jcip-annotations-1.0.jar;%APP_HOME%\lib\jackson-core-asl-1.9.12.jar;%APP_HOME%\lib\jackson-mapper-asl-1.9.12.jar;%APP_HOME%\lib\jackson-jaxrs-1.9.12.jar;%APP_HOME%\lib\jackson-xc-1.9.12.jar;%APP_HOME%\lib\snappy-java-1.1.1.7.jar;%APP_HOME%\lib\lz4-1.2.0.jar;%APP_HOME%\lib\jline-0.9.94.jar;%APP_HOME%\lib\spring-boot-1.2.6.RELEASE.jar;%APP_HOME%\lib\spring-boot-autoconfigure-1.2.6.RELEASE.jar;%APP_HOME%\lib\spring-boot-starter-logging-1.2.6.RELEASE.jar;%APP_HOME%\lib\snakeyaml-1.14.jar;%APP_HOME%\lib\tomcat-embed-core-8.0.26.jar;%APP_HOME%\lib\tomcat-embed-el-8.0.26.jar;%APP_HOME%\lib\tomcat-embed-logging-juli-8.0.26.jar;%APP_HOME%\lib\tomcat-embed-websocket-8.0.26.jar;%APP_HOME%\lib\jackson-annotations-2.4.6.jar;%APP_HOME%\lib\jackson-core-2.4.6.jar;%APP_HOME%\lib\classmate-1.0.0.jar;%APP_HOME%\lib\tomcat-juli-8.0.26.jar;%APP_HOME%\lib\objenesis-2.1.jar;%APP_HOME%\lib\dom4j-1.6.1.jar;%APP_HOME%\lib\antlr-runtime-3.4.jar;%APP_HOME%\lib\ST4-4.0.4.jar;%APP_HOME%\lib\ezmorph-1.0.6.jar;%APP_HOME%\lib\httpcore-4.3.3.jar;%APP_HOME%\lib\httpcore-nio-4.3.2.jar;%APP_HOME%\lib\cat-client-1.3.6.jar;%APP_HOME%\lib\xbean-reflect-3.7.jar;%APP_HOME%\lib\plexus-container-default-1.6.jar;%APP_HOME%\lib\foundation-service-2.3.0.jar;%APP_HOME%\lib\netty-all-4.0.24.Final.jar;%APP_HOME%\lib\plexus-classworlds-2.5.1.jar;%APP_HOME%\lib\c3p0-0.9.1.2.jar;%APP_HOME%\lib\commons-math-2.2.jar;%APP_HOME%\lib\jcl-over-slf4j-1.7.12.jar;%APP_HOME%\lib\jul-to-slf4j-1.7.12.jar;%APP_HOME%\lib\xml-apis-1.0.b2.jar;%APP_HOME%\lib\stringtemplate-3.2.1.jar;%APP_HOME%\lib\antlr-2.7.7.jar;%APP_HOME%\lib\netty-3.7.0.Final.jar;%APP_HOME%\lib\plexus-utils-3.0.20.jar

@rem Execute anticheat-center-deploy
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %ANTICHEAT_CENTER_DEPLOY_OPTS%  -classpath "%CLASSPATH%" cn.com.duiba.Application %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable ANTICHEAT_CENTER_DEPLOY_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%ANTICHEAT_CENTER_DEPLOY_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
