1,3 → 1,76 |
@echo off |
set editor=1 |
call "%~dp0\NWinter.bat" %* |
|
set mapster32dir=%~dp0 |
set nwdir=%~dp0 |
set nwhrpdir=%~dp0 |
|
:recheck |
if not exist mapster32.exe goto mapster32check |
:mapster32check_done |
set mapster32dir=%cd% |
if "%debug%"=="1" echo DEBUG: Mapster32 Directory: "%mapster32dir%" |
|
if exist nwinter\ set nwhrpdir=%cd% |
:nwdircheck |
cd nw_plus |
set nwdir=%cd% |
if exist nwinter\ set nwhrpdir=%cd% |
if exist nw_plus\ goto nwdircheck |
if "%debug%"=="1" echo DEBUG: NW+ Directory: "%nwdir%". |
if "%debug%"=="1" echo DEBUG: NWHRP Directory: "%nwhrpdir%". |
|
cd "%mapster32dir%" |
|
if exist duke3d_hrp.zip set hrp=-gduke3d_hrp.zip |
if exist hrp_update.zip set hrpu=-ghrp_update.zip |
|
type "%mapster32dir%\names.h" > "%mapster32dir%\NWNames.h" |
echo. >> "%mapster32dir%\NWNames.h" |
type "%nwdir%\NWNames.def" >> "%mapster32dir%\NWNames.h" |
|
set args= |
if exist "%nwdir%" set args=%args% -j"%nwdir:\=/%" |
if exist "%nwhrpdir%" set args=%args% -j"%nwhrpdir:\=/%" |
set args=%args% -namesfile NWNames.h -hnwinter.def -gnwinter.grp %hrp% %hrpu% %* |
|
set exe=mapster32 |
if "%debug%"=="1" set exe=mapster32.debug |
|
if exist %exe%.bat ( |
call %exe%.bat %args% |
) else ( |
%exe%.exe %args% |
) |
|
goto end |
|
:mapster32check |
if exist mapster32.bat goto mapster32check_done |
if exist ..\mapster32.exe ( |
cd .. |
goto recheck |
) |
if exist ..\..\mapster32.exe ( |
cd ..\.. |
goto recheck |
) |
if exist ..\..\..\mapster32.exe ( |
cd ..\..\.. |
goto recheck |
) |
if exist ..\mapster32.bat ( |
cd .. |
goto mapster32check_done |
) |
if exist ..\..\mapster32.bat ( |
cd ..\.. |
goto mapster32check_done |
) |
if exist ..\..\..\mapster32.bat ( |
cd ..\..\.. |
goto mapster32check_done |
) |
echo Warning: You don't have Mapster32 in your directory. |
goto mapster32check_done |
|
:end |