home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util2
/
masdir43.lzh
/
SDLSETUP.BAT
< prev
next >
Wrap
DOS Batch File
|
1989-06-19
|
5KB
|
131 lines
ECHO OFF
IF NOT EXIST sdl_get.EXE GOTO FILES
sdl_get B
IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
ECHO SDLSETUP.BAT copyright (c) 1987-1989 Bob Stephan. All rights reserved.
ECHO * * *
ECHO This is a BATCH program so it may be a little slow, but
ECHO you don't have to run it very often so please be patient.
ECHO * * *
sdl_get E
IF NOT ERRORLEVEL 12 GOTO ENVIRON
IF NOT EXIST SDL.COM GOTO FILES
SDL /!
IF ERRORLEVEL 144 GOTO VERSION
IF NOT ERRORLEVEL 143 GOTO VERSION
REM sdl_get F SDL.COM -- the size is automatic now,
REM IF NOT %GET% == 2278 GOTO VERSION -- so we don't need this.
ECHO This program will modify the file SDL.COM on this disk.
ECHO None of your original files will be modified in any way. In
ECHO particular, your CONFIG.SYS and AUTOEXEC.BAT will not be touched.
ECHO * * *
ECHO Checking system resources. Please wait.
IF NOT EXIST ISLABEL.EXE GOTO CKDEBUG
ISLABEL MASDIR 4∙3U >NUL
IF NOT ERRORLEVEL 1 GOTO CKDEBUG
ECHO If this is the original SDL disk you should establish a working
ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
ECHO * * *
sdl_get N "Are you ready to continue (Y,n)? "
IF ERRORLEVEL 126 GOTO QUIT
IF NOT ERRORLEVEL 89 GOTO QUIT
:CKDEBUG Test for running DEBUG
IF EXIST DEBUG.COM GOTO CKFILES
IF EXIST DEBUG.TST ERASE DEBUG.TST
ECHO R >debug.txt
ECHO Q >>debug.txt
DEBUG <debug.txt >debug.tst
IF NOT EXIST DEBUG.TST GOTO NODEBUG
IF EXIST DEBUG.T?T ERASE DEBUG.T?T
:CKFILES
FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT) DO IF NOT EXIST %%F GOTO FILES
sdl_get D
IF ERRORLEVEL 30 GOTO BEGIN
IF NOT ERRORLEVEL 20 GOTO NOT1
ECHO * * *
ECHO If you have any difficulty running SDLSETUP under DOS 2.x,
ECHO please see SDLSETUP.DOC.
ECHO R >sdlsetup.txt
ECHO * * *
:BEGIN
ECHO All checks completed, ready to proceed with SETUP.
ECHO * * *
ECHO If you do not want to continue with SDLSETUP press Esc to exit...
sdl_get C "Press C to continue, D to read the Documentation first(C,d): " CD}~
IF ERRORLEVEL 126 GOTO QUIT
IF ERRORLEVEL 125 GOTO CONTINUE
IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
IF NOT EXIST SDLSETUP.DOC GOTO MENTION
IF NOT EXIST SDL_SHOW.EXE MORE <SDLSETUP.DOC
IF EXIST SDL_SHOW.EXE SDL_SHOW SDLSETUP.DOC
ECHO Returning to SDLSETUP...
ECHO * * *
GOTO CONTINUE
:MENTION
echo SDLSETUP.DOC was not found and cannot be displayed now.
ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
Pause
:CONTINUE
REM Reset the size in GET
sdl_get F SDL.COM
SDLPARMS 143 144 %GET%
REM Normally the BATch file ends here, the rest are error messages.
GOTO QUIT
:NODEBUG
ECHO * * *
ECHO An error was encountered during the check of system resources.
ECHO If the error message was "File creation error" and/or "File not found"
ECHO it probably means the diskette is write protected.
ECHO * * *
ECHO If the message was "Bad command or file name" it means
ECHO that the system file DEBUG.COM is not available to SDLSETUP.
ECHO This program requires access to the DOS external command file
ECHO DEBUG.COM. It must be in this directory on this disk or in
ECHO one of the directories on your path, which is
PATH
ECHO Please correct the problem and run SDLSETUP again.
goto quit
:FILES
ECHO * * *
ECHO The following files must be in this current directory on this disk:
FOR %%F IN (SDL.COM SDL_GET.EXE SDLPARMS.BAT SDLTITLE.COM) DO ECHO %%F
FOR %%F IN (SDLSETUP.BAT SDLDEBUG.BAT) DO ECHO %%F
GOTO QUIT
:NOT1
ECHO * * *
ECHO SDL and SDLSETUP require DOS 2.0 or higher.
GOTO QUIT
:VERSION
ECHO
ECHO * * *
ECHO The version of SDL.COM on this disk is incompatible with this
ECHO version of SDLSETUP. Please copy compatible versions from
ECHO your original MASDIR disk and try again.
GOTO QUIT
:ENVIRON
ECHO * * *
ECHO There is insufficient DOS Environment space to run SDLSETUP.
ECHO You already have the following items set in the environment:
ECHO * * *
SET GET=
SET
ECHO * * *
ECHO SDLSETUP needs about 10 more bytes of space. You can clear
ECHO one or more of the items out of the environment by entering
ECHO commands like
ECHO SET var=
ECHO Where var is the name of one of the objects shown between the
ECHO lines of asterisks above. Each name is followed by the = sign.
ECHO When you enter the command do not put anything after the = sign,
ECHO not even a space. Just press the Enter key (cr) immediately after
ECHO the = key. Do not clear COMSPEC, PATH, or PROMPT.
ECHO After you have cleared one or more names from the environment,
ECHO run SDLSETUP again.
:QUIT
pause
if exist sdl*.txt erase sdl*.txt
if exist menu.bat menu
SET GET=
ECHO Exiting to DOS ...