forked from jzy-chitong56/AMAI-CN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakeOptVER.bat
43 lines (43 loc) · 1.57 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
@ECHO OFF
SET VER=%~1
SET MAKEALL=%~2
SET RESULTOPTVER=0
ECHO Making AMAI Optimizing %VER%
where perl
if "%errorlevel%"=="1" SET RESULTOPTVER=1
if "%RESULTOPTVER%"=="1" (
ECHO Compilation AMAI Optimization %VER% error
ECHO Please install Perl as a requirement to compile AMAI. Download : https://strawberryperl.com/
exit /b %RESULTOPTVER%
)
perl Optimize.pl %VER%\common.j Scripts\%VER%\common.ai -l %VER%\Races.txt Scripts\%VER%\$2
perl Optimize.pl -b Scripts\Blizzard_%VER%.j
ECHO _____________________________
pjass %VER%\common.j Scripts\%VER%\common.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\elf.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\human.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\orc.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\undead.ai
if "%errorlevel%"=="1" SET RESULTOPTVER=1
ECHO _____________________________
pjass %VER%\common.j Scripts\Blizzard_%VER%.j
if "%errorlevel%"=="1" SET RESULTOPTVER=1
copy /b/v/y "Scripts\Blizzard_%VER%.j" "Scripts\Blizzard.j"
ECHO copy \Scripts\Blizzard.j
if "%RESULTOPTVER%"=="1" (
ECHO Compilation AMAI Optimization %VER% error
if %MAKEALL% == 1 (
SET RESULTMAKEVER=0
)
exit /b %RESULTOPTVER%
) else (
ECHO Compilation AMAI Optimization %VER% finished
)