@echo off
echo off
REM - SETHALL.BAT - RAL4HALL Batch Initialiser (C) Sept 9th 1994 SWidlake
echo.
if not exist doom.wad goto err1
echo In Order to Install and View these RAL4HALL DeathMatch Recordings ...
echo.
echo    You NEED at Least 1779712 bytes - to PkUnZip the .ZIP Archives.
echo                                      (if they're not already done)
echo         Plus Another 1800972 bytes - for the largest .LMP Archive.
echo.
echo    Which is approx.= 3600000 bytes
echo                                    (so we're looking for about 4 Mb)
echo Where as you Have :
dir > $$$$.tmp
find "ytes free" < $$$$.tmp > $$$$.fre
if not exist $$$$.fre echo.
if not exist $$$$.fre echo CRITICAL Error ! Can't FIND "FIND" - MS/PC-DOS is NOT on the Path !!
if not exist $$$$.fre goto exit
type $$$$.fre
del $$$$.*
echo.
echo Press Ctrl-C to Abort or Else
pause
echo.

REM if exist $$$$.tmp del $$$$.tmp
pkunzip $$$$.tmp > $$$$.tmp
if not exist $$$$.tmp goto err0
del $$$$.tmp

dir doom.wad > $$$$.tmp
find "WAD  10401760" < $$$$.tmp > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto wad1
REM del $$$$.*
echo Errmmm ... The DOOM.WAD is Already Patched, Ready for GOHALL[2 to 9]
echo.
goto exe1

:wad1
del $$$$.*
if not exist 15regvr2.zip goto err2

dir doom.wad > $$$$.tmp
find "DOOM     WAD" < $$$$.tmp > $$$$.dir
fc doom-wad.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk >nul
if not exist $$$$.chk goto err1
echo OK ... Current DOOM.WAD is the Registered Version 1.2 - and is Good!
echo.
del $$$$.*

if not exist 15regvr2.zip goto err2
pkunzip 15regvr2.zip

copy readme.txt pook-gai.txt > nul
del readme.txt

call fix-wad.bat

dir doom.wad > $$$$.tmp
find "WAD  10401760" < $$$$.tmp > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err5
echo.
echo OK ... Present DOOM.WAD now Patched 1.5 beta compatible and is Good!
echo.
del $$$$.*

:exe1
if exist doom.exe goto exe2
if not exist slim15db.zip goto err6
pkunzip slim15db.zip

:exe2
dir doom.exe > $$$$.tmp
find "DOOM     EXE" < $$$$.tmp > $$$$.dir
fc doom-exe.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err3
echo.
echo.
echo OK ... Current DOOM.EXE is the Shareware Ver 1.5 beta - and is Good!
echo.
del $$$$.*

if exist hallsall.wad goto all1
if not exist hallsall.zip goto err7
pkunzip hallsall.zip hallsall.* /o

if not exist hallsall.wad goto errA

:all1
dir hallsall.wad > $$$$.tmp
find "HALLSALL WAD" < $$$$.tmp > $$$$.dir
fc hallsall.dir $$$$.dir > $$$$.tst
find "no diff" < $$$$.tst > $$$$.fin
copy $$$$.fin $$$$.chk > nul
if not exist $$$$.chk goto err4
echo.
echo.
echo OK ... Current HALLSALL.WAD is now PkUnZip'd & it is Tested as Good!
echo.
del $$$$.*

if exist lmpc10.exe goto okay
if not exist lmpc10.zip goto err8
pkunzip lmpc10.zip

if not exist lmpc10.exe goto errA

:okay
echo.
echo.
echo NOTE - Remember to Run "SetUp" to tell DOOM what SoundCard You Have!
echo.
echo OKAY! Hopefully everything has gone All Right, so Run GOHALL[2 to 9]
goto exit

:err0
echo.
echo CRITICAL Error ! PKUNZIP ISN'T on the Path so NONE of This Will Work
goto exit
:err1
del $$$$.*
echo.
echo Error - This Works ONLY with the Registered DOOM.WAD Version 1.2 !!!
goto exit
:err2
echo.
echo Error - The File 15REGVR2.ZIP is Missing! Did everthing UNZIP OK ???
goto exit
:err3
del $$$$.*
echo.
echo Error ! The File DOOM.EXE Doesn't "look" right ! 1.5 beta Required !
goto exit
:err4
del $$$$.*
echo.
echo Error - The File HALLSALL.WAD Doesn't "Look" right! Get RAL4HAL3 !!!
goto exit
:err5
del $$$$.*
echo.
echo CRITICAL Error !!! The Patching Process DIDN'T WORK :-(( TOO BAD !!!
goto exit
:err6
echo.
echo Error - The File SLIM15DB.ZIP is Missing! Did everthing UNZIP OK ???
goto exit
:err7
echo.
echo Error - The File HALLSALL.ZIP is Missing! Did everthing UNZIP OK ???
goto exit
:err8
echo.
echo Error - NO LMPC10.ZIP File! (It's Very Good - but Not so Important!)
goto exit
:errA
echo.
echo CRITICAL Error ! The Final UNZIP DIDN'T WORK - Out of Disk Space ?!?
goto exit

:exit
echo.
:stop

