home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / FINISH21.ZIP / INSTALL.FIL < prev    next >
Encoding:
Text File  |  1992-06-15  |  9.7 KB  |  302 lines

  1. ' Sample Install Script for
  2. ' The Finishing Touch
  3. ' Professional Software Installer
  4. ' Copyright 1992, ImagiSOFT, Inc.
  5. ' June 15, 1992
  6.  
  7. ' NOTE:  This script file takes a long time to load (and requires more
  8. '        disk space because it has lots of comments.  The script files
  9. '        you create should well commented, but be sure to remove most
  10. '        of the comments on the final distribution copy so it will
  11. '        be as small as possible.  There is a 400 line maximum for any
  12. '        one script file.  However, this limitation can be overcome with
  13. '        the SCRIPT command.
  14.  
  15. '        Note:  This script file doesn't use all the possible commands.
  16. '               See the documentation for the commands to check hardware,
  17. '               perform conditional jumps, view ASCII files, run or shell
  18. '               to DOS programs, change AUTOEXEC.BAT and CONFIG.SYS,
  19. '               invoke other script files, and more!
  20.  
  21.  
  22. ' display cyan colored background (see color chart in docs)
  23.  
  24. BACKGROUND 63
  25.  
  26.  
  27. ' French, German, and Spanish are also supported.  English is the default
  28. ' so this command is used as an example only.
  29.  
  30. LANGUAGE ENGLISH
  31.  
  32.  
  33. ' turn off "exploding" or telescoping windows for first window
  34. ' this will make the window instantly appear
  35.  
  36. TELESCOPE OFF
  37.  
  38.  
  39. ' display the heading in a window
  40. '   located at 18 characters across
  41. '               2 rows down  with a
  42. '   magenta background and high intensity white letters  (see color chart)
  43.  
  44. '                                               the screen
  45. WINOPEN 18 2 95
  46.  
  47. "            ImagiSOFT, Inc."
  48. "Where Imagination Brings Software to Life"
  49. ""
  50. "           THE FINISHING TOUCH"
  51. "     Sample Installation Script File"
  52. "          (Loads a Free Utility)"
  53.  
  54. ' WINOPEN 0 2 95                              ' use this command instead
  55. '                                               to make sure the window is
  56. '                                               centered horizontally on
  57.  
  58. ' turn on telescoping windows for the rest of the messages
  59.  
  60. TELESCOPE ON
  61.  
  62.  
  63. ' display all messages from this point on in a "shadowed" window
  64. ' the default is "OFF".  This feature can be turned on and off as many
  65. ' times as you want
  66.  
  67. SHADOW ON
  68.  
  69.  
  70. ' Tell INSTALL the minimum amount of required disk space
  71.  
  72. SPACE 7                          ' This sample is tiny, only 7K required.
  73.  
  74.  
  75. '  Prompt for the drive to install to:
  76.  
  77. DRIVE C 28 12 31 15 32 14 79
  78. '         C = drive C, the pre-stuffed drive letter
  79. '        28 = locate window at  28 characters across
  80. '        12 =              and  12  rows down
  81. '        31 = blue background and high intensity white foreground
  82. '        15 = input on a black background w/ high intensity white letters
  83. '        32 = error message located at 32 characters across
  84. '        14 =                      and 14 rows down
  85. '        79 = any error message will appear in a red window with
  86. '             high intensity white letters
  87.  
  88. ' After  the user selects a drive and presses [Enter], the first  thing
  89. ' the  DRIVE command does is make sure the drive exists.  Next it  will
  90. ' check  for the required disk space.  If the drive does not exist,  or
  91. ' there is not enough space, an error message appears, and the user  is
  92. ' required to pick a different drive, or quit.
  93.  
  94.  
  95. ' Prompt with default path \SAMPLE
  96.  
  97. ' INSTALL.EXE  will work the same way whether the user enters SAMPLE,
  98. ' \SAMPLE\, or \SAMPLE.  Mutiple directories such as \SAMPLE\UTIL\FREE
  99. ' are also supported.
  100.  
  101. PATH \SAMPLE 0 12 31 15 32 14 79
  102.  
  103. ' the numbers above represent window locations and colors.  See the
  104. ' documentation for more details
  105.  
  106.  
  107. '  Unpack the files from the floppy drive.
  108.  
  109. UNPACK SAMPLE.PAK 0 12 31 32 14 79
  110.  
  111. ' SAMPLE.PAK was compressed using the enclosed PACKER utility.  This
  112. ' utility will compress files 50% or more depending on the file type.
  113. ' you should get compression results close to that of PKZIP.
  114.  
  115. ' the numbers above represent window locations and colors.  See the
  116. ' documentation for more details
  117.  
  118.  
  119. ' just for fun, open the disk drive right in the middle of the installation
  120. ' and see what happens.  This is only one of four "jump" commands supported.
  121. ' see the documentation for JUMP, JUMP.NO, and JUMP.YES commands.
  122.  
  123. JUMP.FAIL INSTALL_FAILURE
  124.  
  125.  
  126. ' Inform user that software installation is now complete
  127.  
  128. WINOPEN 0 12 31
  129.  
  130. "A FREE utility is now installed on your computer."
  131. "To see what it is, use the following command:"
  132. "   CD~2 from drive ~1"
  133. "Our way of saying  THANKS  for taking the time to"
  134. "review the THE FINISHING TOUCH Software Installer."
  135. ""
  136. "Press the [Enter] key to continue."
  137.  
  138.  
  139. ' Wait for the user to press the [Enter] key so they can
  140. ' read the above window.
  141.  
  142. ' The plus signs denote that you want the cursor located relative to
  143. ' the upper left hand corner of the window (position 0, 0) 7 rows down
  144. ' and 36 characters across.
  145.  
  146. WAIT +36 +7
  147.  
  148. WINCLOSE                         ' close the above window
  149.  
  150. ' ------------------------------------------------------
  151. ' Ask user if they would like to view the utility's docs
  152. ' ------------------------------------------------------
  153. WINOPEN 0 12 31
  154. "Would you like to see the new utility's documentation?"
  155. "                       (Y or N)"
  156.  
  157. ASK +33 +2                    ' one method of providing a "conditional" jump
  158.                               ' note relative cursor positioning
  159.  
  160. WINCLOSE                      ' close the above window
  161.  
  162. JUMP.NO VIEW_INSTALL.TXT      ' skip the view command if the user
  163.                               ' hits the "N" key from the above
  164.                               ' ASK statement.
  165.  
  166. VIEW ~1~2\STAMP.TXT 79 31     ' as you can see, The Finishing Touch
  167.                               ' has a built-in file viewer
  168.  
  169. ' -----------------------------------------------------
  170. ' Ask user if they would like to view the documentation
  171. ' -----------------------------------------------------
  172. :VIEW_INSTALL.TXT
  173. WINOPEN 0 12 31
  174. "Would you like to SEE the documentation for THE FINISHING TOUCH?"
  175. "                             (Y or N)"
  176.  
  177. ASK +39 +2                     ' one method of providing a "conditional" jump
  178.                                ' again, relative cursors are easier
  179.  
  180. WINCLOSE                       ' close the above window
  181.  
  182. JUMP.NO PRINT_INSTALL.TXT      ' again, skip the view command if the user
  183.                                ' hits the "N" key from the above ASK statement.
  184.  
  185. WINOPEN 0 0 31                ' large file takes a while from floppy ...
  186. "Loading 67 Pages ..."
  187. VIEW ~0\INSTALL.TXT 79 31
  188. WINCLOSE                      ' close the above window
  189.  
  190. ' -------------------------------------------------------
  191. ' Ask user if they would like to print the documentation
  192. ' -------------------------------------------------------
  193. :PRINT_INSTALL.TXT
  194. WINOPEN 0 12 31
  195. "Would you like to PRINT the documentation for THE FINISHING TOUCH?"
  196. "                             (Y or N)"
  197.  
  198. ASK 44 14                     ' one method of providing a "conditional" jump
  199.                               ' cursor is fixed this time
  200.  
  201. WINCLOSE                      ' close the above window
  202. JUMP.NO EXIT
  203.  
  204. WINOPEN 0 0 31                ' printing large file takes a while ...
  205. "Printing 67 Pages ..."
  206. PRINT ~0\INSTALL.TXT
  207. WINCLOSE                      ' close the above window
  208. JUMP.FAIL PRINTER_ERROR       ' jump on fatal error
  209. JUMP EXIT                     ' print successful, skip next
  210.  
  211. :PRINTER_ERROR                ' label for error condition
  212. WINOPEN 0 12 31                ' open the following window
  213. "Your printer is not responding.  Possible problems:"
  214. "   -- Printer is not turned on"
  215. "   -- Printer is out of paper"
  216. "   -- Printer is not attached to LPT1 (parallel port 1)"
  217. ""
  218. "Do you want to try to print again  (Y or N)?"
  219. ASK 57 18                     ' prompt for Y or N key
  220. WINCLOSE                      ' close this window
  221. JUMP.YES PRINT_INSTALL.TXT    ' y key pressed, print
  222.  
  223.  
  224. ' ----------------------
  225. ' display closing window
  226. ' ----------------------
  227. :EXIT
  228.  
  229. WINCLOSE                      ' close the ImagiSOFT window
  230.  
  231. WINOPEN 0 0 31
  232. "Thank you for running the installation demonstration for the"
  233. ""
  234. "                   THE FINISHING TOUCH"
  235. "          The Professional Installation Program"
  236. ""
  237. "You have a fully working shareware evaluation copy.  We hope"
  238. "that you will find THE FINISHING TOUCH is the most powerful,"
  239. "smallest, easiest to use, software installer with the best"
  240. "file compression available anywhere.  ENJOY!"
  241. ""
  242. "Press the [Enter] key to continue."
  243. WAIT +36 +11
  244.  
  245. ' ------------------------
  246. ' exit the system normally
  247. ' ------------------------
  248.  
  249. END
  250.  
  251.  
  252. ' ----------------------
  253. ' Installation Failure.
  254. ' It is a good idea to
  255. ' add a similar routine
  256. ' to the bottom of all
  257. ' script files.
  258. ' ----------------------
  259.  
  260. :INSTALL_FAILURE
  261.  
  262. ' labels begin with a colon and can be up to 32 characters long.
  263.  
  264. WINOPEN 0 12 79
  265.  
  266. ' the easiest way to center a message on the screen is to make
  267. ' either the x or y coordinates "0".
  268. ' 79 is a red window with emphasized white letters (good for error messages)
  269.  
  270. "THE INSTALLATION PROGRAM FAILED PRIOR TO COMPLETION"
  271. ""
  272. "Possible reasons:"
  273. "   -- The floppy disk was removed prior to completion."
  274. "   -- The floppy disk was damaged during shipping."
  275. "   -- Your disk drive is out of alignment."
  276. ""
  277. "Press [Enter] to remove incomplete program files."
  278.  
  279. WAIT 62 20
  280.  
  281.  
  282. ' delete all partial files using internal variables
  283. '   ~1 = the drive the user installed to (C: was the default)
  284. '   ~2 = the path the user installed to (\SAMPLE was the default)
  285.  
  286. DELETE ~1~2\*.* 0 0 31
  287.  
  288. ' now remove the directory
  289.  
  290. RD ~1~2
  291.  
  292. WINCLOSE
  293.  
  294.  
  295. WINOPEN 0 12 31
  296.  
  297. "Partially Installed Files are Now Deleted."
  298. ""
  299. "      Press [Enter] to Quit."
  300.  
  301. WAIT 47 15
  302.