home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Games / LlamatronHD / Install < prev    next >
Text File  |  1999-10-08  |  4KB  |  204 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "README")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. (set #highs-file "highs")    ;name of high-score file
  8. (set #where-source "Please select the directory containing the original Llamatron files")
  9.  
  10. (set #install-msg
  11. (cat "\nLlamatron Installation\n\n"
  12.      "You will be asked to select the directory where the\n"
  13.      "original files from the game are. A file called\n"
  14.      "Tron1Meg or Tron512 is required for this installer.\n\n"
  15.      "If you have not installed the game, download it from\n"
  16.      "Aminet in the game/shoot directory. The file is\n"
  17.      "named Llamatron.lha.\n\n"
  18.      "Codetapper/Action in 1999!\n"
  19.      "Visit http://zap.to/action/ for more installs!"
  20. ))
  21.  
  22. ;****************************
  23.  
  24. ;----------------------------
  25. ; Checks if given program is reachable via the path
  26. ; if not abort install
  27. ; IN:  #program - to check
  28. ; OUT: -
  29.  
  30. (procedure P_chkrun
  31.   (if
  32.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  33.     ("")
  34.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  35.   )
  36. )
  37.  
  38. ;----------------------------
  39. ; Wait for inserting disk
  40. ; IN:  #AD_disk - name of disk
  41. ; OUT: -
  42.  
  43. (procedure P_disk
  44.   (askdisk
  45.     (dest #AD_disk)
  46.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  47.     (help @askdisk-help)
  48.   )
  49. )
  50.  
  51. ;****************************
  52.  
  53. (if
  54.   (exists #readme-file)
  55.   (if
  56.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  57.     ("")
  58.     (run ("SYS:Utilities/More %s" #readme-file))
  59.   )
  60. )
  61.  
  62. (set #program "WHDLoad")
  63. (P_chkrun)
  64.  
  65. (set @default-dest
  66.   (askdir
  67.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  68.     (help @askdir-help)
  69.     (default @default-dest)
  70.     (disk)
  71.   )
  72. )
  73. (set #dest (tackon @default-dest @app-name))
  74. (if
  75.   (exists #dest)
  76.   (
  77.     (set #choice
  78.       (askbool
  79.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  80.         (default 1)
  81.         (choices "Delete" "Skip")
  82.         (help @askbool-help)
  83.       )
  84.     )
  85.     (if
  86.       (= #choice 1)
  87.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  88.     )
  89.   )
  90. )
  91. (makedir #dest
  92.   (help @makedir-help)
  93.   (infos)
  94. )
  95.  
  96. ;----------------------------
  97.  
  98. (copyfiles
  99.   (help @copyfiles-help)
  100.   (source ("%s.Slave" @app-name))
  101.   (dest #dest)
  102. )
  103. (if
  104.   (exists ("%s.newicon" @app-name))
  105.   (set #icon
  106.     (askchoice
  107.       (prompt "\nWhich icon do you like to install ?\n")
  108.       (default 0)
  109.       (choices "Normal" "NewIcon")
  110.       (help @askchoice-help)
  111.     )
  112.   )
  113.   (set #icon 0)
  114. )
  115. (select #icon
  116.   (set #icon ("%s.inf" @app-name))
  117.   (set #icon ("%s.newicon" @app-name))
  118. )
  119. (copyfiles
  120.   (help @copyfiles-help)
  121.   (source #icon)
  122.   (newname ("%s.info" @app-name))
  123.   (dest #dest)
  124. )
  125. (if
  126.   (exists #readme-file)
  127.   (copyfiles
  128.     (help @copyfiles-help)
  129.     (source #readme-file)
  130.     (dest #dest)
  131.   )
  132. )
  133. (if
  134.   (exists #highs-file)
  135.   (copyfiles
  136.     (help @copyfiles-help)
  137.     (source #highs-file)
  138.     (dest #dest)
  139.   )
  140. )
  141. (if
  142.   (exists ("%s.info" #readme-file))
  143.   (copyfiles
  144.     (help @copyfiles-help)
  145.     (source ("%s.info" #readme-file))
  146.     (dest #dest)
  147.   )
  148. )
  149. (if
  150.   (= #sub-dir "")
  151.   ("")
  152.   (
  153.     (set #dest (tackon #dest #sub-dir))
  154.     (makedir #dest
  155.       (help @makedir-help)
  156.     )
  157.   )
  158. )
  159.  
  160. ;----------------------------
  161.  
  162. (message #install-msg)
  163.  
  164. ;----------------------------
  165.  
  166. (set #sourcedir
  167.     (askdir
  168.         (prompt #where-source)
  169.         (help @askdir-help)
  170.         (default "RAM:")
  171.     )
  172. )
  173.  
  174. ;----------------------------
  175.  
  176. (set #version
  177.   (askchoice
  178.     (prompt "\nWhich version would you like to install?\n")
  179.     (default 0)
  180.     (choices "1Mb version (recommended)" "512k version")
  181.     (help @askchoice-help)
  182.   )
  183. )
  184. (select #version
  185.   (set #version "Tron1Meg")
  186.   (set #version "Tron512")
  187. )
  188.  
  189. ;----------------------------
  190.  
  191. (set #sourcefile (tackon #sourcedir #version))
  192.  
  193. (copyfiles
  194.   (help @copyfiles-help)
  195.   (source #sourcefile)
  196.   (dest #dest)
  197. )
  198.  
  199. ;----------------------------
  200.  
  201. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  202.  
  203. (exit)
  204.