home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 January / WHAT_PC_JAN_96.ISO / discover / install.scr < prev    next >
Encoding:
Text File  |  1994-09-01  |  4.9 KB  |  216 lines

  1. rem Set default language
  2. set LANG eng
  3. set _text inst%LANG%.txl
  4. err_handler %_text%\errhand.txt
  5. getOpt -N:
  6. switch %_err%
  7. case 0:
  8.         rem -N given, add it to options
  9.         set _next %_1%
  10. case 1:
  11.         rem -N not given
  12.         set _next 9999
  13. endswitch
  14. getOpt -help
  15. if %_err% = 0
  16.         textbox 1 1 80 25 blue
  17.         type %_text%\insthlp.txt 3 2 77 15 -border -nocenter
  18.         waitkey
  19.         goto exit_unsaved
  20. endif
  21. rem ----------------- select language/quit --------------------
  22. :pick_language
  23. textbox 1 1 80 24 blue
  24. color back cyan
  25. rem only one language, so don't show menu
  26. rem type %_text%\install.txt 2 2 77 6  -border
  27. rem textbox 1 9 80 13 blue
  28. menu %_text%\startup.mnu 15 11 50 7 %_text%\startup.tit %_text%\updown.leg -default 0 -lookupOnly
  29. set LANG %_1%
  30. set yes %_2%
  31. set no %_3%
  32. set shortTitle %_4%
  33. set title "%_5%"
  34. switch %_1%
  35. case quit:
  36.                 goto exit_unsaved
  37. case escape:
  38.                 goto exit_unsaved
  39. case default:
  40. endswitch
  41. set _text inst%LANG%.txl
  42. type %_text%\install.txt 3 2 76 6  -border
  43. color text yellow
  44. echo 5 6 70 1 -center "%title%"
  45. color text white
  46. rem --------- If on slow cpu, switch to alternate product --------
  47. set _needCpu 486
  48. getCpuType
  49. set _gotCpu %_1%
  50. set _version 1
  51. if %_gotCpu% < %_needCpu%
  52.         set _version 0
  53. endif
  54. color back blue
  55. type %_text%\cpuid.txt 18 19 45 6
  56. color back cyan
  57. menu %_text%\cpuid.mnu 17 11 48 5 %_text%\cpuid.tit %_text%\enter.leg -default 0
  58. switch %_1%
  59. case slow:
  60.         set _links ka386.lnk
  61. case fast:
  62.         set _links ka.lnk
  63. case escape:
  64.         goto exit_unsaved
  65. endswitch
  66. textbox 1 9 80 16 blue
  67. rem -------------- Text vs. Graphics Install ---------
  68. rem Don't switch into graphics if -T is given
  69. getOpt -T
  70. switch %_err%
  71. case 0:
  72.         rem -T given, no graphics
  73.         textbox 1 1 80 25 blue
  74.         color back cyan
  75.         type %_text%\install.txt 3 2 76 6  -border 
  76.         color text yellow
  77.         echo 5 6 70 1 -center "%title%"
  78.         color text white
  79.         set _options "-T"
  80. case 1:
  81.         rem -T not given, use graphics
  82.         graphics 
  83.         if %_err% > 0
  84.                 beep
  85.                 type %_text%\novga.txt 5 17 72 8 -border
  86.                 waitkey
  87.         endif
  88. endswitch
  89. pict install.img 18 1
  90. rem ---------  Ask user Where to install it ------------
  91. promptdir  C:\%shortTitle% 13 17 58 8 %_text%\whichdrv.tit %_text%\whichdrv.txt -center
  92. textbox 1 17 80 9 blue
  93. if %_1% eq escape
  94.     goto exit_unsaved
  95. endif
  96. setdestdir %_1%
  97. getDriveLetter %CDroot%
  98. set CDdrive %_1%
  99. getDriveLetter %HDroot%
  100. set HDdrive %_1%
  101. getVga
  102. if %_err% = 1
  103.     type %_text%\novga.txt 2 13 77 10 -border
  104.     waitkey
  105.     textbox 1 12 80 13 blue
  106. endif
  107. set _needDisk 1.49
  108. rem Two different error messages; one for compressed full disks.
  109. set _diskWarning diskfree.txt
  110. set shadowCD On
  111. detect_compressedDisk
  112. if %_1% = 1
  113.         set shadowCD Off
  114.         set _diskWarning dskcfree.txt
  115.         add _needDisk %_needDisk%
  116. endif
  117. getdiskfree
  118. set _gotDisk %_1%
  119. if %_gotDisk% < %_needDisk%
  120.     type %_text%\%_diskWarning% 17 19 50 6 -border
  121.     waitkey_noesc
  122.     goto exit_unsaved
  123. endif
  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. exist install2.img
  145. if %_1% = 1
  146.         textbox 1 1 80 19 blue
  147.         pict install2.img 19 2
  148. endif
  149. type %_text%\copying.txt 17 19 50 6 -border
  150. copy %_text%
  151. set _text %hdroot%\%_text%
  152. saveconfig
  153. mkdir misdisc
  154. copy %shortTitle%.ico 
  155. copy %shortTitle%.pif 
  156. copy %_links% ka.lnk
  157. copy misdisc\fixed.pal
  158. copy misdisc\zrun.exe zrun.exe
  159. copy misdisc\cursor1.cur
  160. copy misdisc\bum.arc
  161. copy misdisc\clk.arc
  162. copy misdisc\cmd.arc
  163. copy misdisc\txt.arc
  164. copy misdisc\zsc.arc
  165. copy callss.exe
  166. copy ssvol.exe
  167. copy doc doc -dir
  168. copy doceng.txl doceng.txl
  169. copy install.exe readme.exe
  170. copy install.exe setup.exe
  171. copy readme.dat readme.bat -expand
  172. copy ka.ad
  173. copy ka.bml
  174. copy ka.com
  175. copy ka.db
  176. copy ka.inl
  177. copy ka.lch
  178. copy ka.ndx
  179. copy ka.not
  180. copy ka.skp
  181. copy ka.str
  182. copy ka.txt
  183. copy kalogo.adl
  184. copy kalogo.rld
  185. copy kav.pgm
  186. copy kawin.exe
  187. copy kawin.txt
  188. copy knowledg.voc
  189. copy more.com
  190. copy mouse.com
  191. copy moustest.exe
  192. copy nofiles.txt
  193. copy readme.ico
  194. copy readme.pif
  195. copy readme.scr
  196. copy sbtest.com
  197. copy setup.ico
  198. copy setup.scr
  199. copy small.fnt
  200. copy standard.fnt
  201. copy tiny.fnt
  202. copy vgacapt.exe
  203. copy whichvga.com
  204. rem type %_text%\copying2.txt 17 19 50 6 -border
  205. rem Make batch file so shell install can loop.
  206. copy %_text%\install.bat install.bat -expand
  207. rem Done copying.
  208. :install_done
  209. type %_text%\finish.txt 17 19 50 6 -border
  210. beep
  211. waitkey
  212. chain .\setup
  213. :exit_unsaved
  214. textbox 1 1 80 25 black
  215. quit
  216.