home *** CD-ROM | disk | FTP | other *** search
/ Science Adventure 2 with Isaac Asimov / SCIENCEV2.IMG / sci2 / install.scr < prev    next >
Text File  |  1994-03-15  |  5KB  |  237 lines

  1. rem Set default language
  2. set LANG eng
  3. set _text inst%LANG%.txl
  4. err_handler %_text%\errhand.txt
  5. rem ----------------- select language/quit --------------------
  6. :pick_language
  7. textbox 1 1 80 24 blue
  8. color back cyan
  9. getOpt -help
  10. if %_err% = 0
  11.     type %_text%\insthlp.txt 3 2 77 15 -border -nocenter
  12.     waitkey
  13.     goto exit_unsaved
  14. endif
  15. rem only one language, so don't show menu
  16. rem type %_text%\install.txt 2 2 77 6  -border
  17. rem textbox 1 9 80 13 blue
  18. menu %_text%\startup.mnu 15 11 50 7 %_text%\startup.tit %_text%\updown.leg -default 0 -lookupOnly
  19. set LANG %_1%
  20. set yes %_2%
  21. set no %_3%
  22. set shortTitle %_4%
  23. set title "%_5%"
  24. switch %_1%
  25. case quit:
  26.         goto exit_unsaved
  27. case escape:
  28.         goto exit_unsaved
  29. case default:
  30. endswitch
  31. set _text inst%LANG%.txl
  32. type %_text%\install.txt 3 2 76 6  -border
  33. color text yellow
  34. echo 5 6 70 1 -center "%title%"
  35. color text white
  36. rem --------- If on slow cpu, switch to alternate product --------
  37. set _needCpu 486
  38. getCpuType
  39. set _gotCpu %_1%
  40. set _version 1
  41. if %_gotCpu% < %_needCpu%
  42.     set _version 0
  43. endif
  44. color back blue
  45. type %_text%\cpuid.txt 11 19 60 5 
  46. color back cyan
  47. menu %_text%\cpuid.mnu 17 11 48 6 %_text%\cpuid.tit %_text%\updown.leg -default %_version%
  48. switch %_1%
  49. case slow:
  50.     set _links ka386.lnk
  51. case fast:
  52.     set _links ka.lnk
  53. case escape:
  54.     goto exit_unsaved
  55. endswitch
  56. textbox 1 9 80 16 blue
  57. rem -------------- Text vs. Graphics Install ---------
  58. rem Don't switch into graphics if -T is given
  59. getOpt -T
  60. switch %_err%
  61. case 0:
  62.     rem -T given, no graphics
  63.     textbox 1 1 80 25 blue
  64.     color back cyan
  65.     type %_text%\install.txt 3 2 76 6  -border 
  66.     rem color back blue
  67.     set _options "-T"
  68. case 1:
  69.     rem -T not given, use graphics
  70.     graphics 
  71.     if %_err% > 0
  72.         beep
  73.         type %_text%\novga.txt 2 2 77 10 -border
  74.         waitkey
  75.         textbox 1 1 80 25 blue
  76.     endif
  77. endswitch
  78. getOpt -N:
  79. switch %_err%
  80. case 0:
  81.     rem -N given, add it to options
  82.     set _next %_1%
  83. case 1:
  84.     rem -N not given
  85.     set _next 9999
  86. endswitch
  87. pict install.img 1 3
  88. rem ---------  Ask user Where to install it ------------
  89. promptdir  C:\%shortTitle% 13 17 58 8 %_text%\whichdrv.tit %_text%\whichdrv.txt -center
  90. textbox 1 17 80 9 blue
  91. if %_1% eq escape
  92.     goto exit_unsaved
  93. endif
  94. setdestdir %_1%
  95. rem textbox 1 9 80 16 blue
  96. getVga
  97. if %_err% = 1
  98.     type %_text%\novga.txt 2 13 77 10 -border
  99.     waitkey
  100.     textbox 1 12 80 13 blue
  101. endif
  102. set _needDisk 8.73
  103. set _needCDisk 17.46
  104. getdiskfree
  105. set _gotDisk %_1%
  106. detect_compressedDisk
  107. set _compressed %_1%
  108. switch %_compressed%
  109. case 0:
  110.     if %_gotDisk% < %_needDisk%
  111.     beep
  112.         type %_text%\diskfree.txt 17 17 50 8 -border
  113.     waitkey_noesc
  114.     goto exit_unsaved
  115.     endif
  116. case 1:    
  117.     if %_gotDisk% < %_needCDisk%
  118.     beep
  119.         type %_text%\diskfre2.txt 17 17 50 8 -border
  120.     waitkey_noesc
  121.     goto exit_unsaved
  122.     endif
  123. endswitch
  124. set needMem 520 
  125. getmemfree
  126. set _gotMem %_1%
  127. if %_gotMem% < %needMem%
  128.     type %_text%\memfree.txt 17 19 50 6 -border
  129.     waitkey
  130.     textbox 1 17 80 8 blue
  131. endif
  132. mkdirdest
  133. if %_err% != 0
  134.     beep
  135.     type %_text%\noaccess.txt 17 19 50 6 -border
  136.     waitkey_noesc
  137.     goto exit_unsaved
  138. endif
  139. ifcanwrite can_write
  140.     type %_text%\noaccess.txt 17 19 50 6 -border
  141.     waitkey_noesc
  142.     goto exit_unsaved
  143. :can_write
  144. rem following is for ereg demo
  145. random 100
  146. if %_1% > 11
  147.     goto modem_done
  148. endif
  149. detect_modem
  150. set _no_modem %_err%
  151. if %_no_modem% = 0
  152.     rem enable ereg by creating dummy file
  153.     copy ereg.on
  154.     goto modem_done
  155. endif
  156. if %_no_modem% != 0
  157.     :modem_question
  158.     beep 2
  159.     type %_text%\modem.txt 17 17 50 8 %_text%\modem.tit %_text%\yesno.leg
  160.     waitkey_noesc
  161.     switch %_1%
  162.     case %yes%:
  163.         copy ereg.on 
  164.     case default:
  165.         goto modem_question
  166.     case %no%:
  167.     endswitch
  168.     textbox 1 15 80 10 blue
  169. endif
  170. :modem_done
  171. unset _no_modem
  172. type %_text%\copying.txt 17 19 50 6 -border
  173. copy %_text%
  174. set _text %hdroot%\%_text%
  175. saveconfig
  176. copy nofiles.txt
  177. copy readme.bat
  178. copy readme.doc
  179. copy %shortTitle%.ico %shortTitle%.ico
  180. copy %shortTitle%.pif %shortTitle%.pif
  181. rem Copy files needed for sound test
  182. copy ka.ad
  183. copy knowledg.voc
  184. copy sbtest.com
  185. copy kalogo.adl
  186. copy kalogo.rld
  187. copy install.exe setup.exe
  188. copy setup.scr
  189. rem copy iinstall.pal
  190. rem copy iinstall.fnt
  191. copy kawin.txt
  192. copy kawin.exe
  193. rem Copy files needed for real product
  194. copy ka.bml
  195. copy ka.com
  196. copy ka.db
  197. copy ka.inl
  198. copy ka.lch
  199. copy %_links% ka.lnk
  200. copy ka.ndx
  201. copy ka.not
  202. copy ka.skp
  203. copy ka.str
  204. copy ka.txt
  205. copy kav.pgm
  206. copy mouse.com
  207. copy moustest.exe
  208. copy small.fnt
  209. copy standard.fnt
  210. copy tiny.fnt
  211. copy vgacapt.exe
  212. copy whichvga.com
  213. copy zrun45.exe
  214. type %_text%\copying2.txt 17 19 50 6 -border
  215. copy args %hdroot% -dir -expand
  216. copy cache %hdroot% -dir
  217. copy drzoom.cml
  218. copy ka1.ndx
  219. copy ka1.txt
  220. copy vrsd.386
  221. rem Make batch file so shell install can loop.
  222. getDriveLetter %CDroot%
  223. set CDdrive %_1%
  224. getDriveLetter %HDroot%
  225. set HDdrive %_1%
  226. rem The sub-install.bat uses _next to pass along the next menu item.
  227. copy %_text%\install.bat install.bat -expand
  228. rem Done copying.
  229. :install_done
  230. type %_text%\finish.txt 17 19 50 6 -border
  231. beep
  232. waitkey
  233. chain .\setup
  234. :exit_unsaved
  235. textbox 1 1 80 25 black
  236. quit
  237.