home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaDemoCD2.iso / ASCII / TEXTE / STARTREK / StarTrekTheGuide1.DMS / in.adf / Trek.Install < prev    next >
Encoding:
Text File  |  1994-11-15  |  3.8 KB  |  182 lines

  1. ; Installer Script for Star Trek-The Guide v1.0
  2. ; 09/19/94  James L. Hines
  3.  
  4. ; set up an error cleanup routine
  5. (onerror
  6.     (makeassign "STsrc" (safe))
  7.     (makeassign "STdest" (safe))
  8. )
  9.  
  10. ;just started
  11. (complete 0)
  12.  
  13. ;cancel the assign in case of installation restart
  14. (makeassign "STsrc" (safe))
  15. (makeassign "STdest" (safe))
  16.  
  17. ; get the dest dir for Star Trek-The Guide (create it if it does not exist)
  18. (set st_dest
  19.     (tackon
  20.         (askdir
  21.             (prompt "Where should Star Trek-The Guide be installed? A drawer named `TrekGuide' will be created there.")
  22.             (help @askdir-help)
  23.             (default @default-dest)
  24.         )
  25.         "TrekGuide"
  26.     )
  27. )
  28. (makeassign "STdest"
  29.     (pathonly st_dest)
  30.     (safe)
  31. )
  32. (if (exists "STdest:TrekGuide")
  33.     (+ 1 1)
  34.     (makedir
  35.         "STdest:TrekGuide"
  36.         (infos)
  37.         (safe)
  38.     )
  39. )
  40.  
  41. ;We now have a valid destination, so tell Installer where ST will end up
  42. ;so the exit page will be correct.
  43. (set @default-dest st_dest)
  44.  
  45.  
  46. ;Copy the LHEX program to ram:
  47. (copyfiles
  48.     (source "STGDisk1:c/lhex")
  49.     (dest "ram:")
  50. )
  51. (copyfiles
  52.     (source "STGDisk1:Trek-Readme")
  53.     (dest "STdest:TrekGuide")
  54.     (infos)
  55. )
  56.  
  57.  
  58. ;copy program files from source to dest
  59.         (copyfiles
  60.             (source "STGDisk1:Trek-The.Guide")
  61.             (dest "STdest:TrekGuide")
  62.             (infos)
  63.         )
  64.  
  65. (complete 20)
  66.  
  67. ;copy program files from source to dest
  68.         (copyfiles
  69.             (source "STGDisk1:TrekGuide.index")
  70.             (dest "STdest:TrekGuide")
  71.             (infos)
  72.         )
  73.  
  74. (complete 23)
  75.  
  76. ;copy program files from source to dest
  77.         (copyfiles
  78.             (source "STGDisk1:TG-DS9")
  79.             (dest "STdest:TrekGuide")
  80.             (infos)
  81.         )
  82.  
  83. (complete 23)
  84.  
  85. ;copy program files from source to dest
  86.         (copyfiles
  87.             (source "STGDisk1:TG-GEN")
  88.             (dest "STdest:TrekGuide")
  89.             (infos)
  90.         )
  91.  
  92. (complete 23)
  93.  
  94. ;copy program files from source to dest
  95.         (copyfiles
  96.             (source "STGDisk1:Trek.Doc")
  97.             (dest "STdest:TrekGuide")
  98.             (infos)
  99.         )
  100.  
  101.  
  102.  
  103. (complete 25)
  104.  
  105.         (copyfiles
  106.         (source "STGDisk1:VP")
  107.             (dest "STdest:TrekGuide")
  108.         )
  109.  
  110.  
  111. (complete 30)
  112.  
  113. ;copy pic files from source to dest
  114.         (if (exists "STdest:TrekGuide/TrekPics")
  115.             (+ 1 1)
  116.             (makedir
  117.                 "STdest:TrekGuide/TrekPics"
  118.                 (infos)
  119.                 (safe)
  120.             )
  121. )
  122.  
  123. (complete 35)
  124. (working)
  125.         (run "ram:lhex >NIL: <NIL: -qfw=STdest:TrekGuide x STGDisk2:001-125.lha")
  126.  
  127. (complete 55)
  128. (working)
  129.  
  130.         (run "ram:lhex >NIL: <NIL: -qfw=STdest:TrekGuide x STGDisk3:126-185.lha")
  131.  
  132. (complete 75)
  133. (working)
  134.  
  135.         (run "ram:lhex >NIL: <NIL: -qfw=STdest:TrekGuide x STGDisk4:186-230.lha")
  136.  
  137. (complete 95)
  138. (working)
  139.  
  140.         (run "ram:lhex >NIL: <NIL: -qfw=STdest:TrekGuide x STGDisk5:231-265.lha")
  141.  
  142. (complete 99)
  143. (working)
  144.  
  145.         (run "ram:lhex >NIL: <NIL: -qfw=STdest:TrekGuide x STGDisk6:266-AGT.lha")
  146.  
  147. ;add the assign for TrekGuide: to user-startup
  148. (set stassign ("Assign TrekGuide: \"%s\"\n" st_dest))
  149. (startup
  150.         "TrekGuide"
  151.         (prompt "Star Trek-The Guide requires that an AmigaDOS assign be created. The following will be added to your s:user-startup file:\n\n"
  152.             stassign
  153.             "\nIs it okay to add this now?"
  154.             "\n\nIMPORTANT: REBOOT YOUR COMPUTER BEFORE RUNNING STAR TREK-THE GUIDE FOR THE FIRST TIME.")
  155.         (help @startup-help)
  156.         (command stassign)
  157. )
  158.  
  159. (complete 95)
  160.  
  161. ;un-snapshot the Star Trek drawer icon
  162. (tooltype
  163.     (dest st_dest)
  164.     (noposition)
  165. )
  166.  
  167. ;remove the cached LHARC program
  168. (delete "ram:lhex")
  169.  
  170. ;done with the install
  171. (complete 100)
  172.  
  173. ;cleanup
  174. (makeassign "STsrc" (safe))
  175. (makeassign "STdest" (safe))
  176.  
  177. ;display the readme file
  178. (run "run STGDisk1:c/more STGDisk1:Trek-Readme" (safe))
  179.  
  180. ;leave
  181. (exit)
  182.