-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathInstallVERToMap.bat
45 lines (45 loc) · 1.77 KB
/
InstallVERToMap.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
@ECHO OFF
SET VER=%~1
SET RESULTMAKEVER=0
if not exist "%~2" (
ECHO %2 map cannot be found
exit /b 1
)
MPQEditor htsize "%~2" 128
if "%errorlevel%"=="5" SET RESULTMAKEVER=%errorlevel%
MPQEditor a "%~2" "%~dp0Scripts\%VER%\*.ai" Scripts
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
if "%~3" == "1" (
ECHO Installing Commander to map
MPQEditor a "%~2" "%~dp0Scripts\%VER%\Blizzard.j" Scripts\Blizzard.j
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
) else if "%~3" == "2" (
ECHO Installing VS Vanilla AI to map
MPQEditor a "%~2" "%~dp0Scripts\%VER%\vsai\*.ai" Scripts
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
MPQEditor a "%~2" "%~dp0Scripts\%VER%\vsai\Blizzard.j" Scripts\Blizzard.j
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
) else if "%~3" == "3" (
ECHO Installing Tag VS Tag to map
MPQEditor a "%~2" "%~dp0Scripts\%VER%\a\*.txt" Scripts
MPQEditor a "%~2" "%~dp0Scripts\%VER%\a\*.ai" Scripts
MPQEditor a "%~2" "%~dp0Scripts\%VER%\b\*.txt" Scripts
MPQEditor a "%~2" "%~dp0Scripts\%VER%\b\*.ai" Scripts
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
MPQEditor a "%~2" "%~dp0Scripts\%VER%\vsai\Blizzard.j" Scripts\Blizzard.j
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
) else (
ECHO Commander not installed
)
MPQEditor f "%~2"
if not "%errorlevel%"=="0" SET RESULTMAKEVER=%errorlevel%
if "%RESULTMAKEVER%"=="5" (
ECHO Failed to install to map %2, you may not have valid permissions or are blocked by windows UAC. Ensure map files are not in a UAC protected location
exit /b %RESULTMAKEVER%
) else (
if not "%RESULTMAKEVER%"=="0" (
ECHO Possibly failed to install to map %2, an unknown error occured %RESULTMAKEVER%
exit /b %RESULTMAKEVER%
)
ECHO Installed %VER% AMAI to Map %2
)