SMUnlimited / AMAI

Advanced Melee Artificial Intelligence Mod For Warcraft 3
Other
210 stars 34 forks source link

(devtool) Modify script installation tool, no need to enter version and console, but select #401

Open jzy-chitong56 opened 1 month ago

jzy-chitong56 commented 1 month ago

But I don't know how to do PL yet

The BAT have a problem with this batch installation. But BAT no need to rely on Perl

@echo off  
chcp 65001  
SET VER=REFORGED
SET COMMAND=1
SET LANG=0

:menu  
cls  
echo.  
echo Please select a version--请选择魔兽3版本:
echo 1. REFORGED(1.33+)(default)
echo 2. TFT(1.24e~1.32.10)
echo 3. ROC(1.24e~1.31)

echo.  
set /p choice=Input(1-3):   

if "%choice%"=="1" (  
    set VER=REFORGED
)
if "%choice%"=="2" (  
    set VER=TFT
)
if "%choice%"=="3" (  
    set VER=ROC
)

goto comMenu   

:comMenu  
cls  
echo.  
echo Installation Commander-控制台选项:  
echo 1. Normal Commander(default)
echo 2. VS AI  Commander
echo 3. Not Install Commander
echo.  
set /p choice=Input(1-3):   

if "%choice%"=="1" (  
  SET COMMAND=0 
)  

if "%choice%"=="2" (  
  SET COMMAND=1 
)  

if "%choice%"=="3" (  
  SET COMMAND=2
)  

goto langMenu 

:langMenu  
cls  
echo.  
echo Choose language-选择语言:  
echo 1. language1(default)
echo 2. language2
echo 3. language3
echo.  
set /p choice=Input(0-N):   

if "%choice%"=="0" (  
  SET LANG=1
)
if "%choice%"=="1" (  
  SET LANG=2
)  
if "%choice%"=="2" (  
  SET LANG=0
)  

goto inputPath 

:inputPath  
cls  
echo.  
set /p searchPath=请输入地图文件夹路径:

setlocal enabledelayedexpansion
for %%F in ("%searchPath%\*.w3x" "%searchPath%\*.w3m") do (
  call InstallVERToMap !VER! "!%%~fF!" "!COMMAND!"
)
endlocal
pause
goto inputPath