home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 3 / CDASC03.ISO / demos / elfish / install.prg < prev    next >
Encoding:
Text File  |  1993-04-01  |  6.0 KB  |  276 lines

  1. ; =====================================
  2. ; ===   ELFISH INSTALLING PROGRAM   ===
  3. ; =====================================
  4. @prod = "ELFISH"         ; name of the product
  5. @path = "C:\ELFISH"      ; starting destination subdirectory
  6. @source = "DATA"         ; source subdirectory
  7. @prefix = "XX"           ; DLL-prefix
  8. ; =====================================
  9. #HEADER ELFISH INSTALL PROGRAMM
  10. #AIUTO  << ELFISH >>
  11. #VERSION (C) AnimaTek *** 1993
  12. ; =====================================
  13. :START
  14. @PACKMODE = 1         ; starting packing bitmode:
  15.                       ; xx1 - regular VGA
  16.                       ; x1x - HI-resolution SVGA
  17.                       ; 1xx - sound-card support
  18.  
  19. #GOSUB HARDWARE_TEST  ; test mouse , i386, i387, VGA, and RAM > 3700K.
  20.                       ; Changes @PACKMODE
  21. ; =====================================
  22.  
  23. ; ===== Greating and Ask for User name
  24. :ENTRY_OWNER
  25. #TEXT 0 3 53
  26.  
  27. ~Hi !
  28. ~Welcome to the ELFISH
  29. ~demo installation program!
  30.  
  31. ~Press any key to INSTALL or Esc to EXIT
  32.  
  33. #
  34. #KEYHIT
  35. #TEXTOFF
  36. #IF @reply = 27 #ABORT
  37.  
  38. ; =====================================
  39. ; ===     Installation Process      ===
  40. ; =====================================
  41. @message = Unpacking regular VGA version....
  42. ; ==== Take the distination Subdirectory
  43. #PROMPT ELFISH DESTINATION DIRECTORY
  44. #AIUTO @message
  45. #BEEP
  46.  
  47. ; === Get destination path
  48. #GETLINE @path 0 3 0 [ SET ELFISH PATH ]
  49.  
  50. ~Now, please specify the 
  51. ~destination drive and subdirectory
  52. ~where El-Fish Demo
  53. ~will be installed.
  54.  
  55. ~Press 'Enter' to start.
  56. ~Press 'Escape' to quit installation.
  57.  
  58. ~----------------
  59.  
  60. #
  61. #if @reply=27 #ABORT
  62.  
  63. #CHECKDIR @path
  64. ; Returns -1 - incorr subdir name
  65. ; 0 - O.K.
  66. ; 1 - subdir is just exist
  67.  
  68. #IF @reply = 0 GOTO RUN_INSTALLATION
  69.  
  70. #PROMPT "DST > "@path
  71. #AIUTO KEYS:  - select; 'Enter'-confirm
  72.  
  73. #TEXT 0 3 53
  74.  
  75. ~This subdirectory already exists:
  76.  
  77. #
  78. #MENU 0 -1 0 [ WHAT TO DO ? ]
  79.  CHOOSE ANOTHER SUB-DIRECTORY
  80.  O V E R W R I T E
  81.  ABORT INSTALLATION
  82. #
  83. #TEXTOFF
  84. #IF @reply = 3 #ABORT
  85. #IF @reply = 1 GOTO TAKE_DESTINAT
  86. #IF @reply = 2 GOTO RUN_INSTALLATION
  87. #GOTO ASKFOREXIST
  88.  
  89. ; ======== INSTALLATION EXECUTING
  90. :RUN_INSTALLATION
  91. #PROMPT "INSTALLING EL-FISH DEMO"
  92. #AIUTO KEYS: Press 'Esc' to quit
  93.  
  94. #MKDIR ; make path directory
  95.  
  96. #UNPACK 1500000 ELFISH.PKD
  97. #IF @reply = 27 #ABORT
  98.  
  99. ; =====================================
  100. ; == Final Post-installational Dialogue
  101. ; =====================================
  102. #GOSUB  MAKE_AUTOEXEC
  103. #GOSUB  MAKE_CONFIGSYS
  104.  
  105. ; ==== End of Work
  106. :FINISH
  107. #CHDIR                ; change final directory
  108. #SETUP "ELFISH.INS"   ; write the ELFISH.INS user name
  109.  
  110. #BEEP
  111.  
  112. #IF @errors = 0 GOTO Final
  113. #DELETE "INSTALL.ERR"
  114. #TOFILE "INSTALL.ERR"
  115.  
  116.             Installation of the ELFISH DEMO is FINISHED!
  117.        
  118.  
  119.         Read READ.ME file before running the ELFISH DEMO
  120.  
  121. #
  122.  
  123. #PROMPT "WARNING!"@errors"DEMO MAY NOT RUN PROPERLY"
  124. #FILELIST 67 20 "INSTALL.ERR"
  125. #GOSUB SEE_READ_ME_FILE
  126. #EXIT
  127. ;-------------------------
  128.  
  129. ; ==== Final Message
  130. :Final
  131. #PROMPT "F I N I S H"
  132. #TEXT ^ 0 3 67
  133.  
  134. ~Installation of the ELFISH DEMO is complete.
  135. ~For the El-Fish to work correctly on your machine,
  136. ~your AUTOEXEC.BAT and CONFIG.SYS files
  137. ~may need to be altered.
  138. ~See the examples of these files in the ELFISH root subdirectory
  139. ~and compare them with that in your computer's root directory.
  140. ~Note PATH in AUTOEXEC.BAT
  141. ~and FILES & BUFFERS values in CONFIG.SYS
  142. ~After changes have been completed, restart your computer.
  143.  
  144. ~Enjoy ELFISH !
  145.  
  146. #
  147.  
  148. #GOSUB SEE_READ_ME_FILE
  149.  
  150. ; #RESTART  ; reboot system
  151. :quit
  152. #EXIT
  153.  
  154. ; =====================================
  155. ; ===      S U B R O U T I N E S    ===
  156. ; =====================================
  157. ;┌─────────────────────────────────────────────────────┐
  158. ;│                Hardware Testing On Entry            │
  159. ;└─────────────────────────────────────────────────────┘
  160. :HARDWARE_TEST
  161. ; === check mouse driver
  162. #if @mouse > 0 GOTO MSOK
  163. #text ^ 0 0 0
  164.  
  165. ~
  166. ~
  167. ~
  168.  
  169. #
  170. #ABORT
  171. :MSOK
  172.  
  173. ; === check cpu80386-card presence
  174. #if @is386 > 0 GOTO CPUOK
  175. #text ^ 0 0 0
  176.  
  177. ~ATTENTION !!!
  178.  
  179. ~ELFISH REQUIRES i386 processor or higher
  180.  
  181. #
  182. #ABORT
  183. :CPUOK
  184.  
  185. ; === check VGA-card presence
  186. #if @isvga > 0 GOTO VGAOK
  187. #text ^ 0 0 0
  188.  
  189. ~ATTENTION !!!
  190. ~NO VGA CARD
  191. ~IN YOUR SYSTEM
  192.  
  193. #
  194. #ABORT
  195. :VGAOK
  196.  
  197. ; === check minimal RAM-size
  198. #if @ramsize > 3600 GOTO RAMOK
  199. #text ^ 0 0 0
  200.  
  201. ~ATTENTION !!!
  202. ~NOT ENOUGH RAM
  203. ~IN YOUR CPU TO RUN DEMO
  204.  
  205. #
  206. #ABORT
  207. :RAMOK
  208.  
  209. ; === Check math-coprocessor presence
  210. #if @is87 > 0 GOTO OKi87
  211. #text ^ 0 0 0
  212.  
  213. ~ATTENTION !!!
  214. ~NO NUMERIC COPROCESSOR
  215. ~IN YOUR SYSTEM
  216.  
  217. #
  218. ; @PACKMODE -= 2
  219. @PACKMODE += 1
  220. :OKi87
  221.  
  222. #RETURN ;HARDWARE_TEST
  223.  
  224. ;┌─────────────────────────────────────────────────────┐
  225. ;│       Correction of the AUTOEXEC.BAT - file         │
  226. ;└─────────────────────────────────────────────────────┘
  227. :MAKE_AUTOEXEC
  228. ; Specification of the suspicial keywords
  229. #KEYWORDS  "ATTENTION! These keyword(s) in your AUTOEXEC.BAT may cause a conflict with El-Fish"
  230.   EMM386
  231.   386MAX
  232. #
  233. #AUTOEXEC  ; correct an AUTOEXEC.BAT file
  234. #IF @reply = 0 #RETURN
  235. @errors = @errors + 1;
  236. #TOFILE  "INSTALL.ERR"
  237.   ATTENTION!
  238.        YOUR AUTOEXEC.BAT HAS BEEN CHANGED!
  239.   The old AUTOEXEC is saved as AUTOEXEC.OLD
  240. #
  241. #IF @reply = 0 #RETURN
  242. #TOFILE  "INSTALL.ERR"
  243.     Your PATH line is too long !
  244.        Please enter a new path.
  245. #
  246. #RETURN ;
  247.  
  248. ;┌─────────────────────────────────────────────────────┐
  249. ;│         Correction of the CONFIG.SYS - file         │
  250. ;└─────────────────────────────────────────────────────┘
  251. :MAKE_CONFIGSYS
  252. ; Specification of the suspicial keywords
  253. #KEYWORDS  "ATTENTION! These keyword(s) in your CONFIG.SYS may cause a conflict with the Demo"
  254.   EMM386
  255.   386MAX
  256. #
  257. #CONFIGSYS 20 32
  258.  
  259. #RETURN ;
  260.  
  261. ;┌─────────────────────────────────────────────────────┐
  262. ;│                   Read.ME file observing            │
  263. ;└─────────────────────────────────────────────────────┘
  264. :SEE_READ_ME_FILE
  265.  
  266.  
  267. #FILELIST 67 20 "READ.ME"
  268.  
  269. #RETURN ;
  270.  
  271. ; =====================================
  272. ; ===   END of ELFISH INSTALLATION  ===
  273. ; =====================================
  274. #END
  275. 
  276.