-
Notifications
You must be signed in to change notification settings - Fork 34
/
MakeOptVER.bat
81 lines (81 loc) · 3.76 KB
/
MakeOptVER.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
73
74
75
76
77
78
79
80
81
@ECHO OFF
SET VER=%~1
SET SILENT=%~2
SET RESULTOPTVER=0
ECHO Optimizing %VER% Scripts
mkdir Scripts\OPT%VER%
mkdir Scripts\OPT%VER%\vsai
COPY Scripts\%VER%\common.ai Scripts\OPT%VER%\common.ai
COPY Scripts\%VER%\human.ai Scripts\OPT%VER%\human.ai
COPY Scripts\%VER%\orc.ai Scripts\OPT%VER%\orc.ai
COPY Scripts\%VER%\undead.ai Scripts\OPT%VER%\undead.ai
COPY Scripts\%VER%\elf.ai Scripts\OPT%VER%\elf.ai
COPY Scripts\%VER%\vsai\human2.ai Scripts\OPT%VER%\vsai\human2.ai
COPY Scripts\%VER%\vsai\orc2.ai Scripts\OPT%VER%\vsai\orc2.ai
COPY Scripts\%VER%\vsai\undead2.ai Scripts\OPT%VER%\vsai\undead2.ai
COPY Scripts\%VER%\vsai\elf2.ai Scripts\OPT%VER%\vsai\elf2.ai
COPY Scripts\%VER%\Blizzard.j Scripts\OPT%VER%\Blizzard.j
COPY Scripts\%VER%\vsai\Blizzard.j Scripts\OPT%VER%\vsai\Blizzard.j
perl Optimize.pl %VER%\common.j Scripts\OPT%VER%\common.ai -l %VER%\Races.txt Scripts\OPT%VER%\$2 Scripts\OPT%VER%\vsai\$3
perl Optimize.pl -b Scripts\OPT%VER%\vsai\Blizzard.j
perl Optimize.pl -b Scripts\OPT%VER%\Blizzard.j
ECHO Optimizing finished
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\elf.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\elf.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\human.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\human.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\orc.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\orc.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\undead.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\undead.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\elf2.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\elf2.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\human2.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\human2.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\orc2.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\orc2.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\undead2.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
jassparser %VER%\common.j Scripts\OPT%VER%\common.ai Scripts\OPT%VER%\vsai\undead2.ai
if "%errorlevel%"=="1" SET RESULTMAKEVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\OPT%VER%\vsai\Blizzard.j
if "%errorlevel%"=="1" SET RESULTOPTVER=1
pjass %VER%\common.j Scripts\OPT%VER%\Blizzard.j
if "%errorlevel%"=="1" SET RESULTOPTVER=1
if "%RESULTOPTVER%"=="1" (
ECHO Optimization %VER% error
if "%SILENT%" neq "1" (
pause
ECHO Exiting
exit /b %RESULTOPTVER%
)
) else (
ECHO Optimization %VER% successful
)