forked from middlegames/stronghold-kingdoms-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shkbot.bat
35 lines (29 loc) · 919 Bytes
/
shkbot.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@echo off
IF NOT EXIST data\village (
echo Error: data\village directory is missing
GOTO :EOF
)
IF NOT EXIST data\parish (
echo Error: data\parish directory is missing
GOTO :EOF
)
SET LOG=bot.log
GOTO :BuildClasspath
:BuildClasspath
SET CLASSPATH=%CD%\bin
FOR /R ./lib %%a in (*.jar) DO CALL :AddToPath %%a
GOTO :StartBot
:AddToPath
SET CLASSPATH=%CLASSPATH%;%1
GOTO :EOF
:Compile
echo Compiling shkbot sources...
md bin
%JAVA_HOME%\bin\javac -classpath %CLASSPATH% -d bin -source 7 -sourcepath src\main\java src\main\java\com\middlegames\shkbot\gui\BotUI.java -verbose 1>&2 2> compilation.log
echo Compiled
GOTO :StartBot
:StartBot
IF NOT EXIST bin GOTO Compile
echo Logging shkbot output to %LOG%
echo Classpath %CLASSPATH% > %LOG%
java -Xmx512m -classpath "%CLASSPATH%" -splash:"data\images\splash-screen-final.png" com.middlegames.shkbot.gui.BotUI >> %LOG%