echo off
echo     ------------------------------------
echo     DeuTex for Idiots: the demonstration
echo     ------------------------------------
echo  you must put TRINITY.WAD in this directory
echo  DOOM.WAD must be in the \DOOM directory
pause
echo checking existance of TRINITY.WAD
if not exist TRINITY.WAD  goto crash
echo checking existance of DOOM.WAD
if not exist \DOOM\DOOM.WAD goto crash
echo all is OK!
echo ----------------------------------------
echo Now listing the directory of TRINITY.WAD
echo ----------------------------------------
pause

rem ***DeuTex***
deutex -doom \doom -wadir TRINITY.WAD   > dir666.txt
type dir666.txt | more
del dir666.txt

echo Now trying to extract entries of TRINITY.WAD
pause

rem ***DeuTex***
deutex -doom \DOOM -dir . -xtractwad TRINITY.WAD

echo -----------------
echo Look at the mess!
echo -----------------
pause
dir /s | more
echo -------------------
echo Here is WADINFO.TXT
echo -------------------
pause
type WADINFO.TXT | more
echo --------------------------
echo Now rebuilding TRINITY.WAD
echo --------------------------
pause

rem ***DeuTex*** 
deutex -doom \doom -dir . -makepwad wadinfo.txt trinidad.wad
echo -----------------------------------------------
echo TRINIDAD.WAD was built. successfuly? let's check!
echo -----------------------------------------------
dir
echo ----------------------------------
echo now calling DOOM with TRINIDAD.WAD
echo ----------------------------------
pause
echo copying TRINIDAD.WAD into \DOOM directory 
copy TRINIDAD.WAD \DOOM\TRINIDAD.WAD
cd \DOOM
doom -file TRINIDAD.WAD
pause
echo Are you satisfied?
echo If yes, tell me: mail montanuy@dmi.ens.fr
echo If no, tell me also!
echo And if there was a bug, sorry!


goto end
:crash
echo There was an error
:end
echo the end