@echo.
@echo. Installation of PHANTASM.WAD
@echo.
@echo. This may take a minute while your Phantasm level is
@echo. being installed.  Be patient.  And remember.  
@echo. The Tall Man will be waiting for you!
@echo.
@rem Check main WAD
@if not exist doom2.wad goto miss
@echo @echo. Restoration > restore.bat
@echo doom2.exe -file phantasm.wad > phantasm.bat 
@rem
@rem Install Sprites or Flats in WAD
@if not exist phantasm.wad goto miss
@echo deusf -res phantasm.wad >> restore.bat
@echo  Completing sprites and flats, please wait...BOYYYYYY!
@deusf -main .\doom2.wad -as phantasm.wad> deusf.log
@if not ERRORLEVEL 0 goto fail 
@rem
@rem
@echo Installation succeeded.
@echo type PHANTASM to play the modified game.
@echo type RESTORE to uninstall.
@goto end
:fail
@echo. Installation failed: A tool didn't work.
@echo. See hack.log or deusf.log for details.
@goto end
:miss
@echo. Installation impossible: some files are missing.
@echo. Did you have deusf.exe and dehacked.exe ?
@echo. Please copy all your files in the main game directory.
@echo. And try install again.
@goto end
:end
