home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / giochi / installer_whdload / a-b / battletoads.lha / BattleToadsHD / Install_CD32 < prev    next >
Text File  |  1999-11-14  |  3KB  |  138 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "BattleToads.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.  
  25. (if
  26.   (exists #readme-file)
  27.   (if 
  28.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  29.     ("")
  30.     (run ("SYS:Utilities/More %s" #readme-file))
  31.   )
  32. )
  33.  
  34. (set #program "WHDLoad")
  35. (P_chkrun)
  36.  
  37. (set @default-dest
  38.   (askdir
  39.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  40.     (help @askdir-help)
  41.     (default @default-dest)
  42.     (disk)
  43.   )
  44. )
  45. (set #dest (tackon @default-dest @app-name))
  46. (if
  47.   (exists #dest)
  48.   (
  49.     (set #choice
  50.       (askbool
  51.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  52.         (default 1)
  53.         (choices "Delete" "Skip")
  54.         (help @askbool-help)
  55.       )
  56.     )
  57.     (if
  58.       (= #choice 1)
  59.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  60.     )
  61.   )
  62. )
  63. (makedir #dest
  64.   (help @makedir-help)
  65.   (infos)
  66. )
  67.  
  68. ;----------------------------
  69.  
  70. (copyfiles
  71.   (help @copyfiles-help)
  72.   (source ("%s.slave" @app-name))
  73.   (dest #dest)
  74. )
  75. (if
  76.   (exists ("%s.newicon" @app-name))
  77.   (set #icon
  78.     (askchoice
  79.       (prompt "\nWhich icon do you like to install ?\n")
  80.       (default 0)
  81.       (choices "Normal" "NewIcon")
  82.       (help @askchoice-help)
  83.     )
  84.   )
  85.   (set #icon 0)
  86. )
  87. (select #icon
  88.   (set #icon ("%s.inf" @app-name))
  89.   (set #icon ("%s.newicon" @app-name))
  90. )
  91. (copyfiles
  92.   (help @copyfiles-help)
  93.   (source #icon)
  94.   (newname ("%s.info" @app-name))
  95.   (dest #dest)
  96. )
  97. (if
  98.   (exists #readme-file)
  99.   (copyfiles
  100.     (help @copyfiles-help)
  101.     (source #readme-file)
  102.     (dest #dest)
  103.   )
  104. )
  105. (if
  106.   (exists ("%s.info" #readme-file))
  107.   (copyfiles
  108.     (help @copyfiles-help)
  109.     (source ("%s.info" #readme-file))
  110.     (dest #dest)
  111.   )
  112. )
  113.  
  114. (if
  115.   (= #sub-dir "")
  116.   ("")
  117.   (
  118.     (set #dest (tackon #dest #sub-dir))
  119.     (makedir #dest
  120.       (help @makedir-help)
  121.     )
  122.   )
  123. )
  124.  
  125. (message ("Insert Battle Toads CD now!"))
  126.  
  127. (copyfiles (source "BATTLETOADS:ToadA")
  128.            (dest #dest)
  129.        (newname "Disk.1")
  130. )
  131.  
  132. (copyfiles (source "BATTLETOADS:ToadB")
  133.            (dest #dest)
  134.        (newname "Disk.2")
  135. )
  136.  
  137. (exit)
  138.