home *** CD-ROM | disk | FTP | other *** search
/ Speed / Speed.iso / speed / setup.scr < prev    next >
Encoding:
Text File  |  1993-11-13  |  8.1 KB  |  332 lines

  1. rem we are already in the destination directory, 
  2. rem and ka.cnf points to the drive and directory we were installed from
  3. indestdir
  4. rem Make drive letter variables for the benefit of batch files launched by kav
  5. getDriveLetter %HDroot%
  6. set HDdrive %_1%
  7. getDriveLetter %CDroot%
  8. set CDdrive %_1%
  9. rem set default values for a few things
  10. set AutoMovie on
  11. set mouseSensitivity 50
  12. set ExtraMemory Automatic
  13. set musicVolume 70
  14. set Printing Detect
  15. set PrinterPort LPT1
  16. set digitizedSound on
  17. set music on
  18. rem Specify where all the text files used in setup live.
  19. set _text insteng
  20. set _yes y
  21. set _no n
  22. err_handler %_text%\errhand.txt
  23. copy product.bat speed.bat -expand
  24. copy kagroup.inf kagroup.inf -expand
  25. rem
  26. textbox 1 1 80 25 blue
  27. color back cyan
  28. type %_text%\setup.txt 2 2 77 6 -center -border
  29. rem ----------------- select card --------------------
  30. :card
  31. textbox 1 9 80 13 blue
  32. menu %_text%\sound.mnu 20 11 40 12 %_text%\sound.tit %_text%\updown.leg
  33. set soundDriver %_1%
  34. set musicDriver %_2%
  35. set musicType "%_3%"
  36. set soundDevice "%_4%"
  37. set _soundDevice2 "%_5%"
  38. if "%soundDevice%" eq -
  39.     set soundDevice "%_soundDevice2%"
  40. endif
  41. unset _dma
  42. unset _irq
  43. unset _ioPort
  44. textbox 1 9 80 16 blue
  45. switch %_1%
  46. case escape:
  47.     goto exit_unsaved
  48. case sbdig.drv:
  49.     detect_soundBlaster
  50.     setSoundPort
  51.     setMusicPort
  52. case sbpdig.drv:
  53.     detect_soundBlaster
  54.     setSoundPort
  55.     setMusicPort
  56. case pasdig.drv:
  57.     rem proaudio spectrum 16
  58.     rem detect dma and sound blaster io/port settings from config.sys
  59.     detect_spectrum
  60.     set _sb_dma %_2%
  61.     rem if using 16 bit dma, punt and drop back to soundblaster emulation
  62.     if %_dma% > 4
  63.         set soundDriver sbdig.drv
  64.         rem Use value detect_spectrum read from config.sys for dma only
  65.         detect_soundblaster
  66.         set _dma %_sb_dma%
  67.         setSoundPort
  68.     endif
  69. case default:
  70.     rem Explicit defaults
  71.     setSoundPort
  72.     setMusicPort
  73. endswitch
  74. rem
  75. if "%soundDevice%" eq none
  76.     set digitizedSound off
  77.     set music off
  78. endif
  79. type %_text%\settings.txt 1 25 80 1
  80. rem ----------------- copy driver files ------------------
  81. if %soundDriver% ne none
  82.     copy drivers\%soundDriver% sound.drv
  83. endif
  84. if %soundDriver% eq none
  85.     rm sound.drv
  86. endif
  87. if %musicDriver% ne none
  88.     copy drivers\%musicDriver% music.drv
  89. endif
  90. if %musicDriver% eq none
  91.     rm music.drv
  92. endif
  93. rem
  94. rem ----------------- auto music & sound -----------------
  95. rem getenv's argument is case sensitive; usually always uppercase,
  96. rem but windir is lowercase.  That way you can't set it from commandline!
  97. getenv windir
  98. if "%_1%" ne "" 
  99.     rem by golly they're in windows;
  100.     rem don't use the PC Speaker because the driver isn't installed yet
  101.     switch %soundDevice%
  102.     case PCspeaker:
  103.         beep
  104.         goto loop
  105.     case default:
  106.     endswitch
  107.     switch %musicType%
  108.     case pcspkr.drv:
  109.         beep
  110.         goto loop
  111.     case default:
  112.     endswitch
  113. endif
  114. if %digitizedSound% ne off
  115.     color back blue
  116.     color text yellow blink
  117.     type %_text%\psound.txt 20 21 40 1 -center
  118.     color text white
  119.     type %_text%\playing.txt 5 22 70 3 -center
  120.     sound knowledg.voc
  121. endif
  122. if %musicType% ne none
  123.     color back blue
  124.     color text yellow blink
  125.     type %_text%\pmusic.txt 20 21 40 1 -center
  126.     color text white
  127.     type %_text%\playing.txt 5 22 70 3 -center
  128.     music kalogo.%musicType%
  129. endif
  130. :loop
  131. rem ----------------- select function --------------------
  132. color back white
  133. color text black
  134. textbox 1 25 80 1
  135. type %_text%\settings.txt 1 25 80 1
  136. color back cyan
  137. color text white
  138. textbox 1 9 80 16 blue
  139. menu %_text%\main.mnu 20 11 40 9 %_text%\main.tit %_text%\updown.leg
  140. switch %_1%
  141. case exit:
  142.     goto exit
  143. case escape:
  144.     goto card
  145. case card:
  146.     goto card
  147. case music:
  148.     if %musicType% ne none
  149.         color back blue
  150.         color text yellow blink
  151.         type %_text%\pmusic.txt 20 21 40 1 -center
  152.         color text white
  153.         type %_text%\playing.txt 5 22 70 3 -center
  154.         music kalogo.%musicType%
  155.     endif
  156. case sound:
  157.     if %soundDriver% ne none
  158.         color back blue
  159.         color text yellow blink
  160.         type %_text%\psound.txt 20 21 40 1 -center
  161.         color text white
  162.         type %_text%\playing.txt 5 22 70 3 -center
  163.         sound knowledg.voc
  164.     endif
  165. case settings:
  166.     goto settings
  167. endswitch
  168. goto loop
  169. rem
  170. rem ----------------- select i/o adr --------------------
  171. :settings
  172. textbox 1 9 80 16 blue
  173. menu %_text%\io.mnu 20 11 40 12 %_text%\io.tit %_text%\updown.leg
  174. textbox 1 9 80 16 blue
  175. if %_1% eq escape
  176.     goto loop
  177. endif
  178. set _ioPort %_1%
  179. color back white
  180. color text black
  181. textbox 1 25 80 1
  182. type %_text%\settings.txt 1 25 80 1
  183. color back cyan
  184. color text white
  185. rem
  186. rem ----------------- select IRQ --------------------
  187. textbox 1 9 80 16 blue
  188. menu %_text%\irq.mnu 20 11 40 12 %_text%\irq.tit %_text%\updown.leg
  189. textbox 1 9 80 16 blue
  190. if %_1% eq escape
  191.     goto loop
  192. endif
  193. set _irq %_1%
  194. color back white
  195. color text black
  196. textbox 1 25 80 1
  197. type %_text%\settings.txt 1 25 80 1
  198. color back cyan
  199. color text white
  200. rem
  201. rem ----------------- select DMA --------------------
  202. textbox 1 9 80 16 blue
  203. menu %_text%\dma.mnu 20 11 40 10 %_text%\dma.tit %_text%\updown.leg
  204. textbox 1 9 80 16 blue
  205. if %_1% eq escape
  206.     goto loop
  207. endif
  208. set _dma %_1%
  209. rem ----- select done ----
  210. rem copy temporary settings (_ioport, etc.) into real settings (SoundDevParams, etc).
  211. setSoundPort
  212. setMusicPort
  213. goto loop
  214. rem
  215. :exit
  216. rem ---------- set up sound files ---------
  217. saveconfig
  218. rem this section will change for each product!
  219. rem copy the music archive for each zoomscape and kav.
  220. if %musicType% ne none
  221.     textbox 1 9 80 17 blue
  222.     color back blue
  223.     type %_text%\copying3.txt 1 15 80 1 -center
  224.     color back cyan
  225.     copy ka.%musicType% ka.mus
  226. endif
  227. rem ---------- select how much to install -----------
  228. :cache
  229. textbox 1 9 80 17 blue
  230. type %_text%\cache.txt 6 18 68 6 -center -border
  231. menu %_text%\cache.mnu 20 10 40 6 %_text%\cache.tit %_text%\updown.leg
  232. textbox 1 9 80 17 blue
  233. set _choice %_1%
  234. set _needDisk %_2%
  235. if %_choice% eq escape
  236.     goto cache
  237. endif
  238. getdiskfree
  239. set _gotDisk %_1%
  240. if %_gotDisk% < %_needDisk%
  241.     type %_text%\diskfre2.txt  9 11 62 9 -border
  242.     waitkey
  243.     goto cache
  244. endif
  245. color back blue
  246. switch %_choice%
  247. case escape:
  248. case 1:
  249.     type %_text%\copying3.txt 1 15 80 1 -center
  250.     rm rd.iml sp.snl
  251.     copy reading\rd1.run rd.run -expand
  252.     copy amazing\sp1.run sp.run -expand
  253. case 2:
  254.     type %_text%\copying3.txt 1 15 80 1 -center
  255.     copy reading\rd.iml rd.iml
  256.     copy amazing\sp.snl sp.snl
  257.     copy reading\rd2.run rd.run -expand
  258.     copy amazing\sp2.run sp.run -expand
  259. endswitch
  260. color back cyan
  261. rem ---------- check and modify config.sys ------------
  262. detect_files
  263. set _nfiles %_1%
  264. rem detect_files actually opens files, so it may disagree with config.sys
  265. rem always use files=20, but check for 17 open files
  266. set _needfiles 17
  267. set _setfiles 20
  268. if %_nfiles% < %_needfiles% 
  269. :addfiles
  270.     textbox 1 9 80 17 blue
  271.     type %_text%\files.txt 10 11 63 10 %_text%\files.tit %_text%\yesno.leg
  272.     beep
  273.     waitkey_noesc
  274.     switch %_1%
  275.     case %_yes%:
  276.         set_files %_setfiles%
  277.     case %_no%:
  278.         rem do nothing
  279.     case escape:
  280.         rem do nothing
  281.     case default:
  282.         goto addfiles
  283.     endswitch
  284.     textbox 1 9 80 17 blue
  285. endif
  286. rem ---------- check windows, set up icons, dma, and realsound driver ---------
  287. detect_windows_dir
  288. set _windir %_1%
  289. if %_windir% eq "none"
  290.     goto no_windows
  291. endif
  292. :do_windows
  293.     textbox 1 9 80 17 blue
  294.     type %_text%\windows.txt 10 11 63 9 %_text%\windows.tit %_text%\yesno.leg
  295.     beep
  296.     waitkey_noesc
  297.     switch %_1%
  298.     case %_yes%:
  299.         rem copy files needed by windows code
  300.         copy kagroup.exe %_windir%\kagroup.exe
  301.         copy kagroup.inf %_windir%\kagroup.inf -expand
  302.         rem when setting up windows, only load device driver if needed
  303.         rem perhaps this should be part of menu file rather than special
  304.         rem case code.
  305.         if "%soundDevice%" eq "PCSpeaker"
  306.             copy drivers\vrsd.386 vrsd.386
  307.             setup_windows %_windir% %HDRoot%\vrsd.386
  308.         endif
  309.         if "%soundDevice%" ne "PCSpeaker"
  310.             rem rm vrsd.386
  311.             setup_windows %_windir% 
  312.         endif
  313.     case %_no%:
  314.         rem do nothing
  315.     case escape:
  316.         rem do nothing
  317.     case default:
  318.         goto do_windows
  319.     endswitch
  320. :no_windows
  321. color back black
  322. color text white
  323. textbox 1 1 80 25 black
  324. type %_text%\done.txt 1 1 80 25
  325. rem waitkey
  326. goto final_exit
  327. :exit_unsaved
  328. textbox 1 1 80 25 black
  329. :final_exit
  330. ___ENDSCRIPT___
  331.  
  332.