home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / top121.zip / INSTALL.BAT next >
DOS Batch File  |  1992-09-13  |  6KB  |  191 lines

  1. echo off
  2. cls
  3. echo TOP copyright (c) 1990,91,92 TNC Technology, All Rights Reserved, GTDR
  4. echo  
  5. echo Welcome to the TOP INSTALL program!
  6. if not exist top.dat goto :e_notop
  7. set TDRV=c:
  8. if not /%TDRV%/==/c:/ goto :e_noenv
  9. set TPATH=\top
  10. if not /%TPATH%/==/\top/ goto :e_noenv
  11. if /%1/==// goto :tpath_ok
  12. set TDRV=%1
  13. if not /%TDRV%/==/%1/ goto :e_noenv
  14. if /%2/==// goto :tpath_ok
  15. set TPATH=\%2
  16. if not /%TPATH%/==/\%2/ goto :e_noenv
  17. :tpath_ok
  18. echo  
  19. echo About to install TOP to %TDRV%%TPATH% ...
  20. echo  
  21. echo If this is not OK, Press CONTROL+C to abort and restart with:
  22. echo  
  23. echo           INSTALL [drive_letter: [destination_path]]
  24. echo  
  25. echo Note:     Be sure to put a colon (:) after drive_letter.
  26. echo           Do not use a leading or trailing backslash (\) before
  27. echo           or after destination_path. Be sure to put a space between
  28. echo           drive_letter: and destination_path.
  29. echo  
  30. echo Examples: INSTALL               --- will install TOP to C:\TOP
  31. echo  
  32. echo           INSTALL D:            --- will install TOP to D:\TOP
  33. echo  
  34. echo           INSTALL D: TOOLS\TOP  --- will install TOP to D:\TOOLS\TOP
  35. echo  
  36. echo  
  37. echo Press any key to install TOP to %TDRV%%TPATH%, or CONTROL+C to abort ...
  38. pause >NUL
  39. echo  
  40. echo Installing TOP to %TDRV%%TPATH% ...
  41. echo  
  42. echo Checking COMSPEC ...
  43. if exist %comspec% goto :comspec_ok
  44. if exist c:%comspec% set comspec=c:%comspec%
  45. if not exist %comspec% goto :e_nocomspec
  46. :comspec_ok
  47. echo COMSPEC ok.
  48. if not exist %TDRV%%TPATH%\*.* md %TDRV%%TPATH%
  49. echo Checking for old TOP files ...
  50. if not exist %TDRV%%TPATH%\top_cmds.txt goto :nocmds
  51. copy %TDRV%%TPATH%\top_cmds.txt %TDRV%%TPATH%\history.sav >NUL
  52. del %TDRV%%TPATH%\top_cmds.txt >NUL
  53. :nocmds
  54. if not exist %TDRV%%TPATH%\top_log.txt goto :nolog
  55. copy %TDRV%%TPATH%\top_log.txt %TDRV%%TPATH%\cron_log.sav >NUL
  56. del %TDRV%%TPATH%\top_log.txt >NUL
  57. :nolog
  58. if not exist %TDRV%%TPATH%\top_log.old goto :nooldlog
  59. copy %TDRV%%TPATH%\top_log.old %TDRV%%TPATH%\cron_log.old >NUL
  60. del %TDRV%%TPATH%\top_log.old >NUL
  61. :nooldlog
  62. if exist %TDRV%%TPATH%\top_cron del %TDRV%%TPATH%\top_cron >NUL
  63. echo Any existing old files updated.
  64. if not exist %TDRV%%TPATH%\top.hlp goto :newinstall
  65. echo Saving old TOP.HLP to TOPHLP.OLD ...
  66. copy %TDRV%%TPATH%\top.hlp %TDRV%%TPATH%\tophlp.old >NUL
  67. if not exist %TDRV%%TPATH%\tophlp.old goto :e_nocopy
  68. echo Saved.
  69. :newinstall
  70. echo Copying TOP data files ...
  71. copy top.dat %TDRV%%TPATH%\topzip.exe >NUL
  72. if not exist %TDRV%%TPATH%\topzip.exe goto :e_nocopy
  73. echo Copied.
  74. %TDRV%
  75. cd %TPATH%
  76. echo Decompressing files ...
  77. topzip -d -o -sTOP >NUL
  78. if errorlevel 1 goto :e_nozip
  79. del topzip.exe >NUL
  80. copy %TDRV%%TPATH%\video\bounce.exe %TDRV%%TPATH%\video\life.exe >NUL
  81. if not exist %TDRV%%TPATH%\video\life.exe goto e_nocopy
  82. echo Decompressed.
  83. echo Updating TOP.INI ...
  84. echo  
  85. topset -i
  86. if errorlevel 1 goto :e_noset
  87. echo  
  88. echo TOP installation complete!
  89. echo  
  90. echo Type TOP at the command prompt to start TOP.
  91. echo  
  92. echo Up to date release information is available
  93. echo after starting TOP and typing:
  94. echo  
  95. echo           HELP !READ_ME
  96. echo  
  97. echo HELP is also available by pressing F1, or by
  98. echo pressing your left and right mouse buttons
  99. echo simultaneously and releasing them over the word
  100. echo HELP. A left click on any word in the HELP window
  101. echo accesses HELP for that topic.
  102. echo  
  103. echo It is recommended the TOP startup command be added
  104. echo as the last line of your AUTOEXEC.BAT file. To do
  105. echo this you would add the line:
  106. echo  
  107. echo           %TDRV%%TPATH%\top
  108. echo  
  109. echo as the last line of your AUTOEXEC.BAT file.
  110. goto done
  111. :e_notop
  112. echo  
  113. echo Whoops!   You have to be logged on to the floppy drive
  114. echo           for INSTALL to work!
  115. echo  
  116. echo USAGE:    INSTALL [drive_letter: [destination_path]]
  117. goto :done
  118. :e_nocopy
  119. echo  
  120. echo There was an error during the copy of TOP data files to %TDRV%%TPATH%!
  121. echo  
  122. echo Be sure there is enough room on drive %TDRV%-- about 900K bytes
  123. echo   are required!
  124. echo  
  125. echo Free up some space and try again!
  126. goto :done
  127. :e_nozip
  128. del topzip.exe >NUL
  129. echo  
  130. echo An error occurred during the decompression of your TOP files!
  131. echo  
  132. echo Be sure there is enough room on drive %TDRV%--about 900K bytes
  133. echo   are required!
  134. echo  
  135. echo Free up some space and try again!
  136. echo  
  137. echo If there is sufficient disk space, the problem may have been
  138. echo caused by a corrupt data file on your distribution disk!
  139. echo  
  140. echo Do not attempt to run TOP until the problem has been corrected!
  141. goto :done
  142. :e_nocomspec
  143. echo  
  144. echo INSTALL is unable to locate COMMAND.COM using your COMSPEC!
  145. echo  
  146. echo Please be sure your COMSPEC environment variable points to a valid
  147. echo   location for COMMAND.COM.
  148. echo  
  149. echo Example:
  150. echo           set comspec=c:\dos\command.com
  151. goto :done
  152. :e_noenv
  153. echo  
  154. echo An error occured while trying to write an environment variable!
  155. echo  
  156. echo Probably you are out of environment space (do you see the message
  157. echo   "Out of environment space"?). If so, please increase your
  158. echo   environment space before running INSTALL. Only about 6 bytes
  159. echo   are required for the default installation.
  160. echo  
  161. echo To increase your environment space, include or modify the SHELL
  162. echo   line in your config.sys file. For example:
  163. echo  
  164. echo           shell=c:\command.com /p /e:512
  165. echo                                       └─environment size
  166. echo  
  167. echo Either increase the environment size number, or try 512 if you
  168. echo   have no number. Alternatively, you can remove some of your
  169. echo   environment variables until installation is complete
  170. echo  
  171. echo Please consult your DOS manual for more details
  172. goto :done
  173. :e_noset
  174. echo  
  175. echo An error occurred during the update of your TOP.INI file!
  176. echo  
  177. echo Be sure there is enough room on drive %TDRV%--at least 800Kbytes
  178. echo   are required!
  179. echo  
  180. echo Free up some space and try again!
  181. echo  
  182. echo If there is sufficient disk space, the problem may have been
  183. echo caused by a corrupt data file on your distribution disk!
  184. echo  
  185. echo Do not attempt to run TOP until the problem has been corrected!
  186. :done
  187. set TDRV=
  188. set TPATH=
  189. echo  
  190. echo Bye!
  191.