home *** CD-ROM | disk | FTP | other *** search
/ CD Action 8 A / cdactioncoverdisc / kknd / install.bat < prev    next >
DOS Batch File  |  1996-10-29  |  7KB  |  199 lines

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