@echo off
cls
echo.
echo          This is the manual Minimum install for PERDITIONS'S GATE
echo.
echo       IMPORTANT! This installation requires 8 Meg of free space on 
echo                  the drive where you have DOOM II installed.
echo.
rem This makes sure that paramaters have been specified
if "%1"=="" goto error
if "%2"=="" goto error
if "%3"=="" goto error
goto proceed
:error
echo.
echo You must specify both the DRIVE and DIRECTORY where Doom II is installed
echo.
echo               As well as the the DRIVE LETTER of your CD-ROM drive.
echo.
echo   Example: if Doom II is installed in C:\DOOM2 and your CD is Drive D:
echo.
echo        You should run this install by typing:
echo.
echo                                               min-nstl C DOOM2 D
echo.
goto abort
:proceed
echo.
echo Checking to make sure everything was entered correctly:
echo.
echo Is Doom II installed in %1:\%2 ? 
echo.
echo Is your CD-ROM drive Drive %3: ? 
echo.
echo Press Y if you are sure this is correct.
echo Press N if it is not correct or you are not sure.
echo.
choice /c:ny
if errorlevel 2 goto OK
if errorlevel 1 goto retry
goto abort
:retry
cls
echo.
echo You must specify both the DRIVE and DIRECTORY where Doom II is installed
echo.
echo                 As well as the the DRIVE LETTER of your CD-ROM drive.
echo.
echo Example: if Doom II is installed in C:\DOOM2 and your CD is Drive D:
echo.
echo  You should run this install by typing:
echo.
echo                                         min-nstl C DOOM2 D
echo.
goto abort
:OK
rem 
%1:
rem 
cd %1:\%2
rem
rem Double-check
rem
If exist doom2.wad goto Wad
echo.
echo                                   DOOM2.wad not found!
echo.
echo                      DOOM2 must be installed to play PERDITION'S GATE
echo.
goto end
:Wad
if exist doom2.exe goto Exe
echo.
echo                                  DOOM2.wad not found!
echo.
echo                     Doom II must be installed to play PERDITION'S GATE
echo.
goto end
:Exe
rem let's go!
rem 
if exist %1:\%2\PerdGate.wad del %1:\%2\PerdGate.wad
rem 
copy %3:\pg\pg-raw-x.wad
rem 
copy %3:\pg\perdgate.min perdgate.bat
rem 
copy %3:\pg\pgdemo*.wad
rem 
copy %3:\pg\readme.com help-pg.com
rem 
copy %3:\pg\PerdGate.txt
rem 
copy %3:\pg\pg-plot.com
rem 
ren pg-raw-x.wad PerdGate.wad
rem 
rem final message
echo.
echo               Type PerdGate to play PERDITION'S GATE PAY.
echo.
:abort
:end
