forked from TeleGD/tgd-grave-et
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
55 lines (45 loc) · 860 Bytes
/
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
@echo off
setlocal
if "%1"=="" (
echo Autostart
GOTO autostart
) else (
echo Parsing
GOTO loop
)
:autostart
if not exist "bin" (
echo Build
mkdir "bin"
javac -d bin -cp src;res;lib\common\*;lib\x86\* src\Main.java
)
goto RUN
:loop
if x%1 equ x goto done
goto checkParam
:paramError
echo %1 n'est pas une option valide
echo Usage: make.bat [build^|run^|clean...]
goto next
:next
shift /1
goto loop
:checkParam
if "%1" equ "build" goto BUILD
if "%1" equ "clean" goto CLEAN
if "%1" equ "run" goto RUN
goto paramError
:BUILD
echo Build
if not exist "bin" mkdir "bin"
javac -d bin -cp src;res;lib\common\*;lib\x86\* src\Main.java
GOTO next
:CLEAN
echo Clean
rmdir /Q /S bin
GOTO next
:RUN
echo Run
java -Djava.library.path=sys\x86 -cp bin;res;lib\common\*;lib\x86\* Main
GOTO next
:done