Subversion Repositories nw_plus

Rev

Rev 1 | Rev 16 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

@echo off

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_hrp set nwhrpdir=%cd%
:nwdircheck
cd nw_plus
set nwdir=%cd%
if exist nwinter_hrp 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

set args=-j"%nwdir%" -j"%nwhrpdir%" -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