home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Games / RevengeHD / Install next >
Text File  |  1999-10-03  |  4KB  |  180 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 #slave-name "Revenge")    ;RevengeOfTheMutantCamels is too long :)
  8. (set #where-source "Please select the directory containing the original Revenge of the Mutant Camels files")
  9.  
  10. (set #install-msg
  11. (cat "Revenge of the Mutant Camels installation script.\n\n"
  12.      "You will be asked to select the directory where the\n"
  13.      "original files from the game are. A file called REV\n"
  14.      "is required for the game to work.\n\n"
  15.      "If you have not installed the game, download it from\n"
  16.      "Aminet in the game/shoot directory. The files are\n"
  17.      "RevengeCamels.lha (NTSC) or RevengeCamelsP.lha (PAL).\n"
  18.      "Either one will work with this installer.\n\n"
  19.      "Codetapper/Action in 1999!\n"
  20.      "Visit http://zap.to/action/ for more installs!"
  21. ))
  22.  
  23. ;****************************
  24.  
  25. ;----------------------------
  26. ; Checks if given program is reachable via the path
  27. ; if not abort install
  28. ; IN:  #program - to check
  29. ; OUT: -
  30.  
  31. (procedure P_chkrun
  32.   (if
  33.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  34.     ("")
  35.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  36.   )
  37. )
  38.  
  39. ;----------------------------
  40. ; Wait for inserting disk
  41. ; IN:  #AD_disk - name of disk
  42. ; OUT: -
  43.  
  44. (procedure P_disk
  45.   (askdisk
  46.     (dest #AD_disk)
  47.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  48.     (help @askdisk-help)
  49.   )
  50. )
  51.  
  52. ;****************************
  53.  
  54. (if
  55.   (exists #readme-file)
  56.   (if
  57.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  58.     ("")
  59.     (run ("SYS:Utilities/More %s" #readme-file))
  60.   )
  61. )
  62.  
  63. (set #program "WHDLoad")
  64. (P_chkrun)
  65.  
  66. (set @default-dest
  67.   (askdir
  68.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  69.     (help @askdir-help)
  70.     (default @default-dest)
  71.     (disk)
  72.   )
  73. )
  74. (set #dest (tackon @default-dest @app-name))
  75. (if
  76.   (exists #dest)
  77.   (
  78.     (set #choice
  79.       (askbool
  80.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  81.         (default 1)
  82.         (choices "Delete" "Skip")
  83.         (help @askbool-help)
  84.       )
  85.     )
  86.     (if
  87.       (= #choice 1)
  88.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  89.     )
  90.   )
  91. )
  92. (makedir #dest
  93.   (help @makedir-help)
  94.   (infos)
  95. )
  96.  
  97. ;----------------------------
  98.  
  99. (copyfiles
  100.   (help @copyfiles-help)
  101.   (source ("%s.Slave" #slave-name))
  102.   (dest #dest)
  103. )
  104. (if
  105.   (exists ("%s.newicon" #slave-name))
  106.   (set #icon
  107.     (askchoice
  108.       (prompt "\nWhich icon do you like to install ?\n")
  109.       (default 0)
  110.       (choices "Normal" "NewIcon")
  111.       (help @askchoice-help)
  112.     )
  113.   )
  114.   (set #icon 0)
  115. )
  116. (select #icon
  117.   (set #icon ("%s.inf" #slave-name))
  118.   (set #icon ("%s.newicon" #slave-name))
  119. )
  120. (copyfiles
  121.   (help @copyfiles-help)
  122.   (source #icon)
  123.   (newname ("%s.info" #slave-name))
  124.   (dest #dest)
  125. )
  126. (if
  127.   (exists #readme-file)
  128.   (copyfiles
  129.     (help @copyfiles-help)
  130.     (source #readme-file)
  131.     (dest #dest)
  132.   )
  133. )
  134. (if
  135.   (exists ("%s.info" #readme-file))
  136.   (copyfiles
  137.     (help @copyfiles-help)
  138.     (source ("%s.info" #readme-file))
  139.     (dest #dest)
  140.   )
  141. )
  142. (if
  143.   (= #sub-dir "")
  144.   ("")
  145.   (
  146.     (set #dest (tackon #dest #sub-dir))
  147.     (makedir #dest
  148.       (help @makedir-help)
  149.     )
  150.   )
  151. )
  152.  
  153. ;----------------------------
  154.  
  155. (message #install-msg)
  156.  
  157. ;----------------------------
  158.  
  159. (set #sourcedir
  160.     (askdir
  161.         (prompt #where-source)
  162.         (help @askdir-help)
  163.         (default "RAM:")
  164.     )
  165. )
  166.  
  167. (set #sourcefile (tackon #sourcedir "rev"))
  168.  
  169. (copyfiles
  170.   (help @copyfiles-help)
  171.   (source #sourcefile)
  172.   (dest #dest)
  173. )
  174.  
  175. ;----------------------------
  176.  
  177. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  178.  
  179. (exit)
  180.