home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today (BR) Volume 3 #5 / CDRV3N5.ISO / games / kknd / install.bat < prev    next >
DOS Batch File  |  1997-03-27  |  7KB  |  196 lines

  1. @echo off
  2. rem KKnD installer script
  3. rem V1.0 - 28 Nov 96
  4.  
  5. Rem Setting things up...
  6.  
  7. cls
  8. echo KKnD Demo Install/Uninstall.
  9. echo.
  10. if not exist kknddemo.exe goto no_zip          ; Is the zip in the same dir ?
  11.  
  12.  
  13. Rem OK now parse the %1 parameter to see what's going on...
  14.  
  15. if "%1"=="" goto page_help                     ; No Option.. goto Help page
  16. if "%1"=="help" goto page_help                 ; User wants help...
  17. if "%1"=="HELP" goto page_help                 ; User wants help...
  18. if "%1"=="Help" goto page_help                 ; User wants help... case
  19.                                            rem ; sensitive probs. Grrrr...
  20.                                            rem ; Is it a uninstall ?
  21. if "%1"=="u" goto uninstall                    ; What the user should type
  22. if "%1"=="U" goto uninstall                    ; What the user could type
  23. if "%1"=="-u" goto uninstall                   ; What the user could type
  24. if "%1"=="-U" goto uninstall                   ; What the user could type
  25. if "%1"=="/u" goto uninstall                   ; What the user could type
  26. if "%1"=="/U" goto uninstall                   ; What the user could type
  27. if "%1"=="uninstall" goto uninstall            ; What the user could type
  28.                                            rem ; if they haven't read help
  29. echo Verifying path....                       
  30. if not exist %1%\nul goto no_drive             ; Non-existant drive specified
  31.                                            rem ; Doesn't handle bungled net-
  32.                                            rem ; work connections gracefully,
  33.                                            rem ; Oh well that's the breaks...
  34.  
  35.                                            rem ; This is a ugly way of doing
  36.                                            rem ; a check but it's better than
  37.                                            rem ; nothing :)
  38. echo.
  39. echo A Versao Demo do KKnD precisa aproximadamente 13 Mb de espaco
  40. echo no drive especificado (%1\).
  41. echo off
  42. dir %1\dummy.xxx                           
  43. echo.
  44. choice /c:yn Do you have enough space to continue and wish to proceed 
  45. if errorlevel 2 goto abort_exit
  46. echo.
  47. if exist %1\kknddemo\nul goto dir_exists
  48.  
  49. goto install
  50.  
  51.  
  52.  
  53. Rem Errors messages or more information please...
  54.  
  55. :no_zip
  56. echo The install program must be run from the same directory as
  57. echo the file KKNDDEMO.ZIP.
  58. goto abort_exit
  59.  
  60. :no_drive
  61. echo Not able to install to location %1\. Note: Install appends a "\"
  62. echo to your path which may cause problems. If you have, please try again
  63. echo without the trailing "\".
  64. goto abort_exit
  65.  
  66. :dir_exists
  67. echo There is already a KKnDDEMO directory in the location you have
  68. choice /c:yn specified. Overwrite
  69. if errorlevel 2 goto abort_exit
  70. goto install
  71.  
  72. :thevoice_installed
  73. echo.
  74. echo There is already a THEVOICE.CFG in c:\ which KKnD uses for the sound
  75. echo system. If you have not used a Melbourne House (or Beam Software)
  76. echo product in a while you may want to run it again in case your system
  77. echo has changed.
  78. echo.
  79. choice /c:yn Do you wish to run THEVOICE 
  80. if errorlevel 2 goto skip_voice
  81. goto run_voice
  82.  
  83. :no_voicecfg
  84. echo.
  85. echo You have exited THEVOICE without saving the settings or THEVOICE could
  86. echo not create the THEVOICE.CFG file in your c:\ location. If the .CFG
  87. echo does not exist then you will not have any sound with the KKnD Demo.
  88. echo.
  89. choice /c:yn Run THEVOICE again 
  90. if errorlevel 2 goto skip_voice
  91. goto run_voice
  92.  
  93. :page_help
  94. cls
  95. echo KKnD Demo installer.
  96. echo October 29, 1996
  97. echo.
  98. echo The installer will create the necessary directories and files to
  99. echo be able to run the KKnD Demo.
  100. echo.
  101. echo Options:
  102. echo.
  103. echo help               - Will display this page
  104. rem echo u                  - Fires up the uninstaller program
  105. echo [drive][path]      - will attempt to install to the desired location
  106. echo.
  107. echo e.g.       "install C:" will install KKnD to C:\KKNDDEMO
  108. echo            "install C:\GAMES" will install to C:\GAMES\KKNDDEMO                
  109. rem echo            "install u C:\KKNDEMO" will uninstall from C:\KKNDDEMO 
  110. echo.
  111. echo Refer to the file "README.TXT" if you encounter problems with this installer!
  112. echo.
  113. echo    If you simply cannot get install to work, you can E-Mail
  114. echo                        andrewb@beam.com.au
  115. echo.
  116. goto exit
  117.  
  118.  
  119. Rem This is where the guts of the installing is...
  120.  
  121. Rem The installing code, tah-dah !!!
  122. :install
  123.  
  124. kknddemo.exe -d -o %1\
  125.  
  126. if exist c:\thevoice.cfg goto thevoice_installed
  127. echo.
  128. echo KKnD Demo uses a file called THEVOICE.CFG to see the settings of your
  129. echo sound card. This file is stored in C:\.  Installer will now run THEVOICE.
  130. echo.
  131. pause
  132. :run_voice
  133. %1\kknddemo\thevoice -pc:\thevoice.cfg
  134. if not exist c:\thevoice.cfg goto no_voicecfg
  135. :skip_voice
  136.  
  137. echo.
  138. echo For the best performance of KKnD you need VESA support. If your video
  139. echo card does not already have it (please check your video card
  140. echo documentation) then you can use the shareware version of UNIVBE that
  141. echo is bundled with this demo.
  142. echo.
  143. choice /c:yn Run UNIVBE install
  144. if errorlevel 2 goto skip_univbe
  145.  
  146. echo Handing you over to the UNIVBE installer...  Note: It's a good idea to
  147. echo install it in the %1\KKNDDEMO directory
  148. echo.
  149. call %1\kknddemo\univbe\install
  150. echo.
  151.  
  152. if exist %1\kknddemo\uvconfig.exe goto run_kknd_uvconfig
  153. if exist c:\sdd53\uvconfig.exe goto run_sdd53_uvconfig
  154. echo Before you run KKnD for the first time you will need to run UVCONFIG.EXE
  155. echo for UNIVBE to get set up properly.  As I can't seem to find where you
  156. echo have installed UNIVBE you'll need run it once the installation is complete.
  157. echo.
  158. goto skip_univbe
  159.  
  160. :run_kknd_uvconfig
  161. call %1\kknddemo\uvconfig
  162. goto skip_univbe
  163.  
  164. :run_sdd53_uvconfig
  165. call c:\sdd53\uvconfig
  166.  
  167. :skip_univbe
  168. echo.
  169. echo If you are using UNIVBE you will need to run it before you execute
  170. echo the KKnd demo.
  171.  
  172. goto cool_exit
  173.  
  174.  
  175. Rem The uninstalling code... be vewy, vewy careful, we're deleting files...
  176.  
  177. :uninstall
  178. echo. Unfortunately we didn't have time for this. Next Version :)
  179. goto exit
  180.  
  181. Rem Time to go home..
  182.  
  183. :abort_exit
  184. echo.
  185. echo Installation aborted.
  186. goto exit
  187.  
  188. :cool_exit
  189. cd %1\kknddemo
  190. echo.
  191. echo Install session complete. You should now be ready to play KKnD !!!
  192. echo Move to the KKNDDEMO directory (if you aren't there already) and
  193. echo type "KKND". If you have problems check out README.TXT for more info.
  194.  
  195. :exit
  196.