home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Game-Installer / WHD_Installers / Games_J-M / MagicBoyHD / Install next >
Text File  |  1977-12-31  |  3KB  |  154 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "data")        ;sub directory containing data files
  4. (set #readme-file "MagicBoy.readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ; Wait for inserting disk
  25. ; IN:  #AD_disk - name of disk
  26. ; OUT: -
  27.  
  28. (procedure P_disk
  29.   (askdisk
  30.     (dest #AD_disk)
  31.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  32.     (help @askdisk-help)
  33.   )
  34. )
  35.  
  36.  
  37. ;****************************
  38.  
  39. (if
  40.   (exists #readme-file)
  41.   (if 
  42.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  43.     ("")
  44.     (run ("SYS:Utilities/More %s" #readme-file))
  45.   )
  46. )
  47.  
  48. (set #program "WHDLoad")
  49. (P_chkrun)
  50.  
  51. (set #program "XFDDecrunch")
  52. (P_chkrun)
  53.  
  54. (set @default-dest
  55.   (askdir
  56.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  57.     (help @askdir-help)
  58.     (default @default-dest)
  59.     (disk)
  60.   )
  61. )
  62. (set #dest (tackon @default-dest @app-name))
  63. (if
  64.   (exists #dest)
  65.   (
  66.     (set #choice
  67.       (askbool
  68.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  69.         (default 1)
  70.         (choices "Delete" "Skip")
  71.         (help @askbool-help)
  72.       )
  73.     )
  74.     (if
  75.       (= #choice 1)
  76.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  77.     )
  78.   )
  79. )
  80. (makedir #dest
  81.   (help @makedir-help)
  82.   (infos)
  83. )
  84.  
  85. ;----------------------------
  86.  
  87. (copyfiles
  88.   (help @copyfiles-help)
  89.   (source ("%s.slave" @app-name))
  90.   (dest #dest)
  91. )
  92. (if
  93.   (exists ("%s.newicon" @app-name))
  94.   (set #icon
  95.     (askchoice
  96.       (prompt "\nWhich icon do you like to install ?\n")
  97.       (default 0)
  98.       (choices "Normal" "NewIcon")
  99.       (help @askchoice-help)
  100.     )
  101.   )
  102.   (set #icon 0)
  103. )
  104. (select #icon
  105.   (set #icon ("%s.inf" @app-name))
  106.   (set #icon ("%s.newicon" @app-name))
  107. )
  108. (copyfiles
  109.   (help @copyfiles-help)
  110.   (source #icon)
  111.   (newname ("%s.info" @app-name))
  112.   (dest #dest)
  113. )
  114. (if
  115.   (exists #readme-file)
  116.   (copyfiles
  117.     (help @copyfiles-help)
  118.     (source #readme-file)
  119.     (dest #dest)
  120.   )
  121. )
  122. (if
  123.   (exists ("%s.info" #readme-file))
  124.   (copyfiles
  125.     (help @copyfiles-help)
  126.     (source ("%s.info" #readme-file))
  127.     (dest #dest)
  128.   )
  129. )
  130. (if
  131.   (= #sub-dir "")
  132.   ("")
  133.   (
  134.     (set #dest (tackon #dest #sub-dir))
  135.     (makedir #dest
  136.       (help @makedir-help)
  137.     )
  138.   )
  139. )
  140.  
  141. ;----------------------------
  142.  
  143. (set #AD_disk " ")
  144. (P_disk)
  145.  
  146. (copyfiles
  147.   (help @copyfiles-help)
  148.   (source ("%s:" #AD_disk))
  149.   (dest #dest)
  150.   (pattern "#?.(RNC|bin)")
  151. )
  152.  
  153. (exit)
  154.