home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
util
/
menu
/
017
/
sdlsetup.bat
< prev
next >
Wrap
DOS Batch File
|
1991-04-18
|
7KB
|
186 lines
ECHO OFF
: SDLSETUP.BAT for PC/MS DOS Version 3.0 or later
IF NOT EXIST sdl_get.EXE GOTO FILES
sdl_get E
IF NOT ERRORLEVEL 20 GOTO ENVIRON
sdl_get B
IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
set GET=SDLSETUP
if NOT (%GET%)==(SDLSETUP) goto ENVIRON
if NOT (%1)==() SET GET=SDLCONFG
ECHO %GET%.BAT copyright (c) 1987-1991 Bob Stephan. All rights reserved.
Echo * * * This version of %GET% is for PC or MS DOS * * *
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 YE
if errorlevel 2 goto drive_ok
Echo It will run faster if you run it from a hard disk or a RAM disk (VDISK).
Echo For best results COPY %GET%:SDL*.* to a RAM drive or to a subdirectory on
Echo your hard disk. You may exit to do this now if you wish.
Echo If you use the floppy disk, it must NOT be write protected.
ECHO * * *
sdl_get N "Are you ready to continue (Y,n)? "
IF ERRORLEVEL 126 GOTO QUIT
IF NOT ERRORLEVEL 89 GOTO QUIT
:drive_ok
IF NOT EXIST SDL.COM GOTO FILES
SDL /!
SET $=54 55
IF ERRORLEVEL 54 IF NOT ERRORLEVEL 55 GOTO READY
IF ERRORLEVEL 155 GOTO VERSION
IF NOT ERRORLEVEL 154 GOTO VERSION
SET $=154 155
:READY
ECHO This program will modify the file SDL.COM on this disk.
ECHO None of your original files will be modified in any way.
ECHO Your CONFIG.SYS and AUTOEXEC.BAT will NOT be changed.
ECHO * * *
ECHO Checking system resources. Please wait.
SDL_GET LE "MASDIR 5.4"
IF NOT ERRORLEVEL 1 GOTO CKDEBUG
ECHO If this is the original %GET% 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
SDL_GET F DEBUG.TST
IF %GET% == 0 GOTO NODEBUG
IF EXIST DEBUG.T?T ERASE DEBUG.T?T >NUL
:CKFILES
FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT SDLFINIS.BAT SDLNOTOG.BAT) DO IF NOT EXIST %%F GOTO FILES
sdl_get D
IF ERRORLEVEL 30 GOTO BEGIN
IF NOT ERRORLEVEL 20 GOTO NOT1
ECHO * * *
set GET=SDLSETUP
if NOT (%1)==() SET GET=SDLCONFG
ECHO DOS Versions prior to 3.1 are not specifically supported. If you have
Echo any difficulty running %GET% under DOS 2.x, please see SDLSETUP.DOC.
ECHO R >sdlsetup.txt
ECHO * * *
:BEGIN
ECHO All checks completed, ready to proceed with SETUP.
ECHO * * *
set GET=SDLSETUP
if NOT (%1)==() SET GET=SDLCONFG
ECHO If you do not want to continue with %GET% 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
set GET=SDLSETUP
if NOT (%1)==() SET GET=SDLCONFG
ECHO Returning to %GET% ...
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
sdl_get B
ECHO * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
ECHO * * * INSTRUCTIONS * * *
ECHO * * * Please read before proceeding. * * *
ECHO * * * * * *
ECHO You may exit at any point by pressing Ctrl-C and answering Y to terminate.
ECHO * * *
ECHO You may skip to the next section at ANY PROMPT by pressing the Escape key
ECHO (Esc on most keyboards). Note that all selections are made by "pressing"
ECHO single keys. These selections are NOT "entered" by pressing the Enter
ECHO key after making the selection.
ECHO * * *
ECHO The questions are set up with the original defaults capitalized. If you
ECHO select the capitalized choices the original defaults will be restored.
ECHO If the choices are not alphabetic, the first one shown is the original
ECHO default. Either caps or lower case letters are OK for your selections.
ECHO * * *
ECHO If you do not want to change the operation of a selection, just press
ECHO the Enter key (sometimes called Return or "<CR>"). This is indicated as
ECHO choice (cr). Or press Esc to skip to the next section of questions.
ECHO * * *
PAUSE
REM Reset the size in GET
sdl_get F SDL.COM
IF (%1)==() SDLPARMS %$% %GET%
IF (%1)==(SDLCONFG) SDLNOTOG %$% %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 error message was "Command or filename not recognized" or
Echo 'Unknown command "debug"', or a similar message, it probably
Echo means that your operating system is DR DOS. Please see MASDIR54.NEW
Echo for information on using the included DR DOS setup files, or contact
Echo the author of MASDIR for a DR DOS compatible setup program.
ECHO * * *
ECHO If the message was "Bad command or file name" or similar, it means
ECHO that the MS DOS system file DEBUG.COM is not available.
ECHO This program must have 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
set GET=SDLSETUP
if NOT (%1)==() SET GET=SDLCONFG
ECHO Please correct the problem and run %GET% 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 SDLNOTOG.BAT) DO ECHO %%F
FOR %%F IN (SDLSETUP.BAT SDLFINIS.BAT SDLDEBUG.BAT) DO ECHO %%F
IF (%$%)==(54 55) ECHO SDLTITLE.COM
GOTO QUIT
:NOT1
ECHO * * *
ECHO MASDIR requires DOS 2.0 or higher (3.x preferred).
GOTO QUIT
:VERSION
ECHO * * *
set GET=SDLSETUP
if NOT (%1)==() SET GET=SDLCONFG
ECHO The version of SDL.COM on this disk is incompatible with this
ECHO version of %GET%. 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 this program.
ECHO You already have the following items set in the environment:
ECHO * * *
SET GET=
SET
ECHO * * *
ECHO This program 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 this program again.
:QUIT
pause
REM SDLDEBUG will clean up any temporary files.
sdldebug END