@echo off
cls
echo X-MAS NIGHTMARE installation file
echo ÿ

if not exist floor.gif goto ERROR1
if not exist xmas.pat goto ERROR2
if not exist dg.exe goto ERROR3
if not exist dh.exe goto ERROR4
if not exist DOOM.WAD goto ERROR5
if not exist DOOM.EXE goto ERROR5

dg floor0_2 -e floor0_2.gif
dg floor0_2 -s floor.gif 
dh -save backup.pat
dh -load xmas.pat
cls

echo Patch file has succesfully been installed!
echo ÿ
echo Do NOT remove the following files:
echo DG.EXE , DH.EXE , BACKUP.PAT , FLOOR0_2.GIF
echo These files will be needed when UN-installing X-MAS NIGHTMARE!
echo ÿ
echo At the DOS-prompt, type PLAYXMAS and press enter to run X-MAS NIGHTMARE
pause
goto END

:ERROR1
echo The file FLOOR.GIF can NOT be found in this directory!
echo Make sure you have installed all the X-MAS nightmare files into
echo your DOOM directory.
echo X-MAS NIGHTMARE has NOT been installed!
echo ÿ
goto END

:ERROR2
echo The file XMAS.PAT can NOT be found in this directory!
echo Make sure you have installed all the X-MAS nightmare files into
echo your DOOM directory.
echo X-MAS NIGHTMARE has NOT been installed!
echo ÿ
goto END

:ERROR3
echo The file DG.EXE can NOT be found in this directory!
echo (DG.EXE = DMGRAPH, if you have not got DG.EXE but DO have your
echo own copy of DMGRAPH.EXE then modify this batch file by altering DG.EXE
echo into <your copy of DMGRAPH> , make sure you change the error-checking
echo at the beginning of this batch-file as well (or delete it))
echo X-MAS NIGHTMARE has NOT been installed!
echo ÿ
goto END

:ERROR4
echo The file DH.EXE can NOT be found in this directory!
echo (DH.EXE = DEHACKED, if you have not got DH.EXE but DO have your
echi own copy of DEHACKED.EXE then modify this batch file by altering DH.EXE
echo into <your copy of DEHACKED> , make sure you change the error-checking 
echo at the beginning of this batch-file as well (or delete it))
echo X-MAS NIGHTMARE has NOT been installed!
echo ÿ
goto END

:ERROR5
echo The DOOM.EXE and DOOM.WAD files can NOT be found in THIS directory
echo Make sure you have installed X-MAS NIGHTMARE into your DOOM-DIRECTORY
echo X-MAS NIGHTMARE has NOT been installed!
echo ÿ

:END
