@echo.
@echo. Installation of HSFC.WAD
@echo.
@echo. This will take some seconds, be patient.
@echo.
@rem Check main WAD
@if not exist doom2.wad goto miss
@echo @echo. Restoration > restore.bat
@rem
@rem Check EXE Patch
@if not exist doom2.exe goto miss
@if not exist hsfc.deh goto miss
@rem
@rem Install EXE Patch
@copy doom2.exe doomhack.exe
@echo rm doomhack.exe >> restore.bat
@rem
@dehacked -reload -load hsfc.deh > hacked.log
@if not ERRORLEVEL 0 goto fail 
@rem Modify game command
@echo doomhack.exe -file hsfc.wad -warp 30 -skill 4 > hard.bat 
@echo doomhack.exe -file hsfc.wad -warp 30 -skill 3 > easy.bat 
@echo doomhack.exe -file hsfc.wad -warp 30 -skill 1 > sim.bat 
@echo Warning: for network games, rename doomhack.exe to doom2.exe
@echo but first save doom2.exe somewhere!
@echo This is true if you use SETUP, IPXSETUP or SERSETUP.
@rem
@rem Install Sprites or Flats in WAD
@if not exist hsfc.wad goto miss
@echo deusf -res hsfc.wad >> restore.bat
@echo  Completing sprites and flats, please wait...
@deusf -main .\doom2.wad -as hsfc.wad> deusf.log
@if not ERRORLEVEL 0 goto fail 
@rem
@rem
@echo Installation succeeded.
@echo type SIM to play with no monsters
@echo      EASY for some monsters.
@echo      HARD for lots of monsters
@echo type RESTORE to uninstall.
@echo Remember, don't kill any students.
@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. Are you using version 1.9 of Doom 2?
@echo. Please copy all your files in the main game directory.
@echo. And try install again. If that doesn't work, they
@echo. may be a problem with the dehacked patch. Mail
@echo. david@dashh.demon.co.uk for help.
@goto end
:end
