home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util2 / masdir43.lzh / SDLSETUP.BAT < prev    next >
DOS Batch File  |  1989-06-19  |  5KB  |  131 lines

  1. ECHO OFF
  2. IF NOT EXIST sdl_get.EXE GOTO FILES
  3. sdl_get B
  4. IF EXIST SDLSETUP.TXT ERASE SDLSETUP.TXT
  5. ECHO SDLSETUP.BAT copyright (c) 1987-1989 Bob Stephan. All rights reserved.
  6. ECHO * * *
  7. ECHO This is a BATCH program so it may be a little slow, but
  8. ECHO you don't have to run it very often so please be patient.
  9. ECHO * * *
  10. sdl_get E
  11. IF NOT ERRORLEVEL 12 GOTO ENVIRON
  12. IF NOT EXIST SDL.COM GOTO FILES
  13. SDL /!
  14. IF ERRORLEVEL 144 GOTO VERSION
  15. IF NOT ERRORLEVEL 143 GOTO VERSION
  16. REM sdl_get F SDL.COM -- the size is automatic now,
  17. REM IF NOT %GET% == 2278 GOTO VERSION -- so we don't need this.
  18. ECHO This program will modify the file SDL.COM on this disk.
  19. ECHO None of your original files will be modified in any way.  In
  20. ECHO particular, your CONFIG.SYS and AUTOEXEC.BAT will not be touched.
  21. ECHO * * *
  22. ECHO Checking system resources. Please wait.
  23. IF NOT EXIST ISLABEL.EXE GOTO CKDEBUG
  24. ISLABEL MASDIR 4∙3U  >NUL
  25. IF NOT ERRORLEVEL 1 GOTO CKDEBUG
  26. ECHO If this is the original SDL disk you should establish a working
  27. ECHO disk and/or directory to preserve the original (see SDLSETUP.DOC).
  28. ECHO * * *
  29. sdl_get N "Are you ready to continue (Y,n)? "
  30. IF ERRORLEVEL 126 GOTO QUIT
  31. IF NOT ERRORLEVEL 89 GOTO QUIT
  32. :CKDEBUG Test for running DEBUG
  33. IF EXIST DEBUG.COM GOTO CKFILES
  34. IF EXIST DEBUG.TST ERASE DEBUG.TST
  35. ECHO R >debug.txt
  36. ECHO Q >>debug.txt
  37. DEBUG <debug.txt >debug.tst
  38. IF NOT EXIST DEBUG.TST GOTO NODEBUG
  39. IF EXIST DEBUG.T?T ERASE DEBUG.T?T
  40. :CKFILES
  41. FOR %%F IN (SDLPARMS.BAT SDLDEBUG.BAT) DO IF NOT EXIST %%F GOTO FILES
  42. sdl_get D
  43. IF ERRORLEVEL 30 GOTO BEGIN
  44. IF NOT ERRORLEVEL 20 GOTO NOT1
  45. ECHO * * *
  46. ECHO If you have any difficulty running SDLSETUP under DOS 2.x,
  47. ECHO please see SDLSETUP.DOC.
  48. ECHO R >sdlsetup.txt
  49. ECHO * * *
  50. :BEGIN
  51. ECHO All checks completed, ready to proceed with SETUP.
  52. ECHO * * *
  53. ECHO If you do not want to continue with SDLSETUP press Esc to exit...
  54. sdl_get C "Press C to continue, D to read the Documentation first(C,d): " CD}~
  55. IF ERRORLEVEL 126 GOTO QUIT
  56. IF ERRORLEVEL 125 GOTO CONTINUE
  57. IF ERRORLEVEL 67 IF NOT ERRORLEVEL 68 GOTO CONTINUE
  58. IF NOT EXIST SDLSETUP.DOC GOTO MENTION
  59. IF NOT EXIST SDL_SHOW.EXE MORE <SDLSETUP.DOC
  60. IF EXIST SDL_SHOW.EXE SDL_SHOW SDLSETUP.DOC
  61. ECHO Returning to SDLSETUP...
  62. ECHO * * *
  63. GOTO CONTINUE
  64. :MENTION
  65. echo SDLSETUP.DOC was not found and cannot be displayed now.
  66. ECHO You may copy or print SDLSETUP.DOC from the original MASDIR disk.
  67. Pause
  68. :CONTINUE
  69. REM Reset the size in GET
  70. sdl_get F SDL.COM
  71. SDLPARMS 143 144 %GET%
  72. REM Normally the BATch file ends here, the rest are error messages.
  73. GOTO QUIT
  74. :NODEBUG
  75. ECHO * * *
  76. ECHO An error was encountered during the check of system resources.
  77. ECHO If the error message was "File creation error" and/or "File not found"
  78. ECHO it probably means the diskette is write protected.
  79. ECHO * * *
  80. ECHO If the message was "Bad command or file name" it means
  81. ECHO that the system file DEBUG.COM is not available to SDLSETUP.
  82. ECHO This program requires access to the DOS external command file
  83. ECHO DEBUG.COM.  It must be in this directory on this disk or in
  84. ECHO one of the directories on your path, which is
  85. PATH
  86. ECHO Please correct the problem and run SDLSETUP again.
  87. goto quit
  88. :FILES
  89. ECHO * * *
  90. ECHO The following files must be in this current directory on this disk:
  91. FOR %%F IN (SDL.COM SDL_GET.EXE SDLPARMS.BAT SDLTITLE.COM) DO ECHO %%F
  92. FOR %%F IN (SDLSETUP.BAT SDLDEBUG.BAT) DO ECHO %%F
  93. GOTO QUIT
  94. :NOT1
  95. ECHO * * *
  96. ECHO SDL and SDLSETUP require DOS 2.0 or higher.
  97. GOTO QUIT
  98. :VERSION
  99. ECHO 
  100. ECHO * * *
  101. ECHO The version of SDL.COM on this disk is incompatible with this
  102. ECHO version of SDLSETUP.  Please copy compatible versions from
  103. ECHO your original MASDIR disk and try again.
  104. GOTO QUIT
  105. :ENVIRON
  106. ECHO * * *
  107. ECHO There is insufficient DOS Environment space to run SDLSETUP.
  108. ECHO You already have the following items set in the environment:
  109. ECHO * * *
  110. SET GET=
  111. SET
  112. ECHO * * *
  113. ECHO SDLSETUP needs about 10 more bytes of space.  You can clear
  114. ECHO one or more of the items out of the environment by entering
  115. ECHO commands like
  116. ECHO SET var=
  117. ECHO Where var is the name of one of the objects shown between the
  118. ECHO lines of asterisks above.  Each name is followed by the = sign.
  119. ECHO When you enter the command do not put anything after the = sign,
  120. ECHO not even a space.  Just press the Enter key (cr) immediately after
  121. ECHO the = key.  Do not clear COMSPEC, PATH, or PROMPT.
  122. ECHO After you have cleared one or more names from the environment,
  123. ECHO run SDLSETUP again.
  124. :QUIT
  125. pause
  126. if exist sdl*.txt erase sdl*.txt
  127. if exist menu.bat menu
  128. SET GET=
  129. ECHO Exiting to DOS ...
  130. 
  131.