forked from jzy-chitong56/AMAI-CN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ForwardsCompat.bat
93 lines (73 loc) · 4.79 KB
/
ForwardsCompat.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
82
83
84
85
86
87
88
89
90
91
92
93
SET VER=%~1
SET RESULTFWCOMPAT=0
ECHO Applying forwards compatability %VER% scripts
perl -i -pe"s/GetBJMaxPlayers/GetBJMaxPlayersAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/GetBJMaxPlayers/GetBJMaxPlayersAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/BlzGroupAddGroupFast/BlzGroupAddGroupFastAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/BlzGroupAddGroupFast/BlzGroupAddGroupFastAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/BlzGroupRemoveGroupFast/BlzGroupRemoveGroupFastAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/BlzGroupRemoveGroupFast/BlzGroupRemoveGroupFastAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/BlzGroupGetSize/BlzGroupGetSizeAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/BlzGroupGetSize/BlzGroupGetSizeAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_MAROON/PLAYER_COLOR_MAROONAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_MAROON/PLAYER_COLOR_MAROONAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_NAVY/PLAYER_COLOR_NAVYAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_NAVY/PLAYER_COLOR_NAVYAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_TURQUOISE/PLAYER_COLOR_TURQUOISEAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_TURQUOISE/PLAYER_COLOR_TURQUOISEAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_VIOLET/PLAYER_COLOR_VIOLETAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_VIOLET/PLAYER_COLOR_VIOLETAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_WHEAT/PLAYER_COLOR_WHEATAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_WHEAT/PLAYER_COLOR_WHEATAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_PEACH/PLAYER_COLOR_PEACHAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_PEACH/PLAYER_COLOR_PEACHAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_MINT/PLAYER_COLOR_MINTAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_MINT/PLAYER_COLOR_MINTAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_LAVENDER/PLAYER_COLOR_LAVENDERAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_LAVENDER/PLAYER_COLOR_LAVENDERAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_COAL/PLAYER_COLOR_COALAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_COAL/PLAYER_COLOR_COALAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_SNOW/PLAYER_COLOR_SNOWAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_SNOW/PLAYER_COLOR_SNOWAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_SNOW/PLAYER_COLOR_SNOWAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_SNOW/PLAYER_COLOR_SNOWAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_EMERALD/PLAYER_COLOR_EMERALDAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_EMERALD/PLAYER_COLOR_EMERALDAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_COLOR_PEANUT/PLAYER_COLOR_PEANUTAMAI/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_COLOR_PEANUT/PLAYER_COLOR_PEANUTAMAI/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_NEUTRAL_PASSIVE/PLAYER_AMAI_NEUTRAL_PASSIVE/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_NEUTRAL_PASSIVE/PLAYER_AMAI_NEUTRAL_PASSIVE/g" Scripts/Blizzard_%VER%.j
perl -i -pe"s/PLAYER_NEUTRAL_AGGRESSIVE/PLAYER_AMAI_NEUTRAL_AGGRESSIVE/g" Scripts/%VER%/common.ai
perl -i -pe"s/PLAYER_NEUTRAL_AGGRESSIVE/PLAYER_AMAI_NEUTRAL_AGGRESSIVE/g" Scripts/Blizzard_%VER%.j
copy /b/v/y "Scripts\Blizzard_%VER%.j" "Scripts\Blizzard.j"
ECHO copy \Scripts\Blizzard.j
pjass %VER%\common.j Scripts\%VER%\common.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\%VER%\common.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\elf.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\elf.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\human.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\human.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\orc.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\orc.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
pjass %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\undead.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\%VER%\common.ai Scripts\%VER%\undead.ai
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
pjass %VER%\common.j Scripts\Blizzard_%VER%.j
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
jassparser %VER%\common.j Scripts\Blizzard_%VER%.j
if "%errorlevel%"=="1" SET RESULTFWCOMPAT=1
if "%RESULTFWCOMPAT%"=="1" (
ECHO Apply forwards compatability %VER% scripts error
exit /b %RESULTFWCOMPAT%
) else (
ECHO Apply forwards compatability %VER% scripts finish
)