-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
executable file
·72 lines (59 loc) · 1.14 KB
/
make.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@echo off
SET dependencies=good
where java >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Java not found
SET dependencies=bad
) ELSE (
echo Found Java
)
where javac >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Java compiler not found
SET dependencies=bad
) ELSE (
echo Found Java compiler
)
where jar >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Jar maker not found
SET dependencies=bad
) ELSE (
echo Found jar maker
)
IF %dependencies% == bad (
ECHO Dependancies failed
ECHO You may need to check your PATH
EXIT /B
)
IF EXIST build RD /S /Q build
IF EXIST Lemmini.jar DEL Lemmini.jar
IF EXIST build (
ECHO Failed to delete build directory
EXIT /B
)
IF EXIST Lemmini.jar (
ECHO Failed to delete existing jar file
EXIT /B
)
MKDIR build
IF NOT EXIST build (
ECHO Failed to create build directory
EXIT /B
)
ECHO Running Java Compiler...
javac -d ./build Lemmini.java
if %ERRORLEVEL% NEQ 0 (
ECHO failed
EXIT /B
)
echo done
ECHO Making Jar File...
jar cfe Lemmini.jar Lemmini -C build . -C . background.gif crc.ini disclaimer.htm extract.ini lemmini.png LemminiIcon.png patch
if %ERRORLEVEL% NEQ 0 (
ECHO failed
EXIT /B
)
echo done
echo Completed!
pause