home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 14 / CD_ASCQ_14_0694.iso / maj / 4379 / movies2.fil < prev    next >
Text File  |  1994-04-18  |  7KB  |  345 lines

  1. ' Note:  This file is called PART2.FIL and is compressed with
  2. '        MOVIES.BAT to save disk space.  It is distributed with
  3. '        THE FINISHING TOUCH as an example of how ImagiSOFT, Inc. uses
  4. '        THE FINISHING TOUCH to distribute its products.  Feel free to
  5. '        use this script as a learning tool for writing your own scripts!
  6.  
  7.  
  8. ' MOVIES TO GO!
  9. ' Part 2 of Script File (Compressed for security / save disk space)
  10.  
  11. DELETE ~1~2\PART2.FIL 0 0 0
  12. PROMPT ON
  13.  
  14. ' display opening menu
  15. :OPENING
  16.  
  17. WINOPEN 0 11 31
  18. "        INSTALLATION OPTIONS MENU"
  19. ""
  20. "1.  Install as Microsoft Windows Application"
  21. "2.  Install as DOS Application"
  22. "3.  QUIT"
  23. ""
  24. "SELECT ONE OF THE ABOVE:    "
  25.  
  26. WINUPDATE +10 +1 30
  27. "INSTALLATION OPTIONS MENU"
  28. INPUT A 1 +28 +7 15
  29. WINCLOSE
  30.  
  31. CALL TEMP_FILE
  32.  
  33. EXIST ~3\1.TMP
  34. JUMP.YES WINDOWS_APP
  35.  
  36. EXIST ~3\2.TMP
  37. JUMP.YES DOS_APP
  38.  
  39. EXIST ~3\3.TMP
  40. JUMP.YES EXIT
  41.  
  42. BEEP
  43. CALL TMP_DEL
  44. JUMP OPENING
  45.  
  46. ' ------------------------
  47. '   install as a dos app
  48. ' ------------------------
  49. :DOS_APP
  50.  
  51. ' have user set the drive
  52. CALL ESC
  53. DRIVE C 0 12 31 15 32 14 79
  54. WINCLOSE
  55.  
  56. ' have user set the path
  57. CALL ESC
  58. PATH \MOVIES 0 12 31 15 32 14 79
  59. WINCLOSE
  60.  
  61. CALL EMPTY_DIR
  62. CALL UNPACK
  63.  
  64. ' create movies batch file
  65. PROMPT OFF
  66. DELETE ~1\MOVIES.BAT 0 0 0
  67. PROMPT ON
  68. FILE ~1\MOVIES.BAT
  69. "~1"
  70. "cd ~2"
  71. "MOVIES"
  72. "cd \"
  73.  
  74. WINOPEN 0 11 31
  75. "MOVIES TO GO! has been successfully installed."
  76. ""
  77. "     To run it, enter the command"
  78. "     from the root directory of drive ~1."
  79. ""
  80. ""
  81. ""
  82. ""
  83. "Press the [Enter] key to continue."
  84. WINUPDATE +36 +3 30
  85. "MOVIES"
  86. WINUPDATE +7 +6 27
  87. "THANK YOU FOR CHOOSING OUR SOFTWARE!"
  88. WAIT +36 +9
  89. WINCLOSE
  90.  
  91. :RUN
  92. WINOPEN 0 11 30
  93. "Would you like to run MOVIES TO GO! right now   Y or N?"
  94. ASK +57 +1
  95. JUMP.NO EXIT
  96. RUN ~1\MOVIES.BAT
  97.  
  98. ' --------------------------
  99. '   install as windows app
  100. ' --------------------------
  101. :WINDOWS_APP
  102.  
  103. ' these commands set drive and path variables
  104. DRIVE C
  105. PATH \WINDOWS
  106.  
  107. :TEST_WIN
  108. EXIST ~1~2\WIN.COM
  109. JUMP.YES WIN_INSTALL
  110.  
  111. EXIST ~3\1.TMP
  112. JUMP.YES SKIP_BEEP
  113. BEEP
  114. RD ~1~2
  115. WINOPEN 0 11 79
  116. "Microsoft Windows is NOT found in the"
  117. "~1~2 directory.  Please try again."
  118. ""
  119. "Press ENTER to continue."
  120. WAIT +26 +4
  121. WINCLOSE
  122.  
  123. ' windows is in a directory other than C:\WINDOWS
  124. :SKIP_BEEP
  125. CALL TMP_DEL
  126. WINOPEN 0 11 31
  127. "To install MOVIES TO GO! to Microsoft Windows,"
  128. "we need to know which hard drive Windows is installed on."
  129. ""
  130. "             Most people have Windows on this hard drive."
  131. "             Press ENTER if this is correct, or change to"
  132. "             the correct drive letter."
  133. "             (Press ESC to quit.)"
  134. SHADOW OFF
  135. PROMPT OFF
  136. DRIVE C +2 +3 17 14 32 14 79
  137. WINCLOSE
  138.  
  139. PROMPT ON
  140. SHADOW ON
  141. WINOPEN 0 11 31
  142. "We also need to know the name of the directory where Microsoft"
  143. "Windows is installed.  Most people have Windows installed in"
  144. "                              this directory.  Press ENTER"
  145. "                              if this is OK, or input the name"
  146. "                              of the directory where Windows"
  147. "                              is installed."
  148. "                              (Press ESC to quit.)"
  149. PROMPT OFF
  150. SHADOW OFF
  151. PATH \WINDOWS +1 +3 17 14 32 14 79
  152. WINCLOSE
  153. PROMPT ON
  154. SHADOW ON
  155. PROMPT OFF
  156. JUMP TEST_WIN
  157.  
  158. ' you know the windows directory, now install it
  159. :WIN_INSTALL
  160. CALL TMP_DEL
  161. PROMPT OFF
  162. RD C:\WINDOWS
  163. PROMPT ON
  164.  
  165. FILE ~1~2\PROGMAN.INI
  166. "Group504=~1\MOVIES\MOVIES.GRP"
  167.  
  168. PATH \MOVIES
  169. MD ~1~2
  170.  
  171. CALL EMPTY_DIR
  172.  
  173. WINOPEN 0 20 79
  174. "MOVIES TO GO! is being installed to the ~1~2 directory . . ."
  175.  
  176. CALL UNPACK
  177.  
  178. UNPACK WINDOWS.PAK 0 12 31 32 15 79 ' windows pif, ico, and grp files
  179. JUMP.FAIL INSTALL_FAILURE
  180.  
  181. WINCLOSE
  182.  
  183. ' --------------------------------
  184. '  successful install to windows
  185. ' --------------------------------
  186. WINOPEN 0 11 31
  187. "MOVIES TO GO! has been successfully installed in your"
  188. "Windows environment.  However, the changes won't take"
  189. "effect until you exit Windows, then run Windows again."
  190. ""
  191. ""
  192. ""
  193. "Press ENTER to return to Windows."
  194. WINUPDATE +5 +5 27
  195. "THANK YOU FOR CHOOSING OUR SOFTWARE!"
  196. WAIT +35 +7
  197. WINCLOSE
  198. END
  199.  
  200. ' ------------------
  201. '   error messages
  202. ' ------------------
  203. :INSTALL_FAILURE
  204. WINOPEN 0 11 79
  205. "MOVIES TO GO! INSTALLATION FAILED BEFORE IT FINISHED!!"
  206. ""
  207. "Possible reasons:"
  208. "   -- The floppy disk was damaged during shipping."
  209. "   -- Your disk drive is out of alignment."
  210. "   -- The floppy disk was removed prior to completion."
  211. ""
  212. "Press [Enter] to remove incomplete program files."
  213. WAIT +51 +8
  214. DELETE ~1~2\*.* 0 0 0
  215. RD ~1~2
  216. DELETE ~1\MOVIES.BAT 0 0 0
  217. WINCLOSE
  218. WINOPEN 0 11 31
  219. "Partially Installed Files are Now Deleted."
  220. ""
  221. "      Press [Enter] to Quit."
  222. WAIT +30 +3
  223. JUMP EXIT
  224.  
  225. ' -----------
  226. ' subroutines
  227. ' -----------
  228. :EMPTY_DIR
  229. EXIST ~1~2\*.*
  230. JUMP.NO SKIP_SURE
  231.  
  232. EXIST ~1~2\1*.FIL
  233. JUMP.YES SKIP_SURE
  234.  
  235. WINOPEN 0 11 79
  236. "The directory ~1~2 already exists and contains files!"
  237. ""
  238. "   Installing MOVIES TO GO! in this directory will"
  239. "                DELETE ALL THE FILES"
  240. "       in this directory prior to installing."
  241. ""
  242. ""
  243. WINUPDATE +2 +7 78
  244. "Are you SURE you want to install it here   Y or N?"
  245. ASK +52 +7
  246. WINCLOSE
  247. JUMP.YES SKIP_SURE
  248. JUMP DOS_APP
  249.  
  250. :SKIP_SURE
  251. PROMPT OFF
  252. COPY ~1~2\NOTE.FIL ~1\NOTE.FIL 0 0 0
  253. DELETE ~1~2\*.* 0 0 0
  254. PROMPT ON
  255. CALL TMP_DEL
  256. RETURN
  257.  
  258. '   delete temporary file (don't inform user)
  259. :TMP_DEL
  260. PROMPT OFF
  261. DELETE ~3\~A.TMP 0 0 0
  262. PROMPT ON
  263. RETURN
  264.  
  265. ' unpack data files
  266. :UNPACK
  267. SET.FILES 16
  268. UNPACK DATA.PAK 0 12 31 32 15 79
  269. JUMP.FAIL INSTALL_FAILURE
  270.  
  271. UNPACK TEXT.PAK 0 12 31 32 15 79
  272. JUMP.FAIL INSTALL_FAILURE
  273.  
  274. VIDEO VGA
  275. JUMP.NO NO_VGA
  276.  
  277. :GRAPHICS_INSTALL
  278. EXIST ~0\GRAPHICS.PAK
  279. JUMP.YES HD_DISK
  280.  
  281. WINOPEN 0 11 31
  282. BEEP
  283. "Please Insert Disk Number 2 in Drive ~0."
  284. ""
  285. "Press the [Enter] key to continue."
  286. WAIT +36 +3
  287. WINCLOSE
  288. JUMP GRAPHICS_INSTALL
  289.  
  290. :HD_DISK
  291. CPU 386
  292. JUMP.YES 386
  293.  
  294. WINOPEN 0 11 31
  295. "The GRAPHICS VERSION May Be Slow on Your Computer."
  296. ""
  297. ""
  298. ""
  299. "(If you decide that the graphics version is too slow, simply"
  300. " install the software again, and answer  N  to this question.)"
  301. WINUPDATE +2 +3 30
  302. "Do You Want To Install it Anyway   Y or N?"
  303. ASK +44 +3
  304. WINCLOSE
  305. JUMP.NO NO_VGA
  306.  
  307. :386
  308. FREE 1200
  309. JUMP.NO NO_VGA
  310.  
  311. COPY ~1\NOTE.FIL ~1~2\NOTE.FIL 0 0 0
  312. DELETE ~1\NOTE.FIL 0 0 0
  313.  
  314. UNPACK GRAPHICS.PAK 0 12 31 32 15 79
  315. JUMP.FAIL INSTALL_FAILURE
  316.  
  317. FREE 1000
  318. JUMP.NO DONE_PACK
  319. UNPACK ICON.PAK 0 12 31 32 15 79
  320. JUMP.FAIL INSTALL_FAILURE
  321. JUMP DONE_PACK
  322.  
  323. :NO_VGA
  324. PROMPT OFF
  325. COPY ~1~2\TEXT.EXE ~1~2\MOVIES.EXE 0 0 0
  326. DELETE ~1~2\TEXT.EXE 0 0 0
  327. PROMPT ON
  328. :DONE_PACK
  329. RETURN
  330.  
  331. ' create a temporary file in the default directory with a unique name based on the number input by the user
  332. :TEMP_FILE
  333. FILE ~3\~A.TMP
  334. "Delete this temporary file."
  335. RETURN
  336.  
  337. :ESC
  338. WINOPEN 0 20 31
  339. "(Press ESC to Quit) "
  340. RETURN
  341.  
  342. :EXIT
  343. CALL TMP_DEL
  344. END
  345.