home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / giochi / installer_whdload / u-z / ultimav.lha / UltimaV / UltimaVInstall < prev    next >
Text File  |  1998-05-13  |  3KB  |  160 lines

  1. ;Patcher-install-script for Gore-Design-Installs
  2. ;****************************
  3.  
  4. (set #readme-file (cat @app-name ".Txt"))    ; name of readme file
  5. (set #cleanup "")                ; files to delete after install
  6.  
  7. ;****************************
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the WHDLoad package." #program))
  19.   )
  20. )
  21.  
  22. ;****************************
  23.  
  24. (set #program "WHDLoad")
  25. (P_chkrun)
  26.  
  27. (set #program "Patcher")
  28. (P_chkrun)
  29.  
  30. (if
  31.   (exists #readme-file)
  32.   (if 
  33.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  34.     ("")
  35.     (run ("SYS:Utilities/More %s" #readme-file))
  36.   )
  37. )
  38.  
  39. (if
  40.   (= @user-level 2)
  41.   (
  42.     (set #CI_drive
  43.       (askchoice
  44.     (prompt "Select source drive for diskimages")
  45.     (default 0)
  46.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  47.     (help @askchoice-help)
  48.       )
  49.     )
  50.     (if
  51.       (= #CI_drive 0)
  52.       (set #CI_drive "DF0:")
  53.     )
  54.     (if
  55.       (= #CI_drive 1)
  56.       (set #CI_drive "DF1:")
  57.     )
  58.     (if
  59.       (= #CI_drive 2)
  60.       (set #CI_drive "DF2:")
  61.     )
  62.     (if
  63.       (= #CI_drive 3)
  64.       (set #CI_drive "DF3:")
  65.     )
  66.   )
  67.   (
  68.     (set #CI_drive "DF0:")
  69.   )
  70. )
  71.  
  72. (set @default-dest
  73.   (askdir
  74.     (prompt ("Where should \"%s\" be installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
  75.     (help @askdir-help)
  76.     (default @default-dest)
  77.     (disk)
  78.   )
  79. )
  80. (set #dest (tackon @default-dest @app-name))
  81. (if
  82.   (exists #dest)
  83.   (
  84.     (set #choice
  85.       (askbool
  86.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  87.         (default 1)
  88.         (choices "Delete" "Skip")
  89.         (help @askbool-help)
  90.       )
  91.     )
  92.     (if
  93.       (= #choice 1)
  94.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  95.     )
  96.   )
  97. )
  98. (makedir #dest
  99.   (help @makedir-help)
  100. )
  101. (copyfiles
  102.   (help @copyfiles-help)
  103.   (source ("/%s.info" @app-name ))
  104.   (dest @default-dest)
  105. )
  106.  
  107. ;----------------------------
  108.  
  109. (copyfiles
  110.   (help @copyfiles-help)
  111.   (source ("%s.info" @app-name ))
  112.   (dest #dest)
  113. )
  114. (copyfiles
  115.   (help @copyfiles-help)
  116.   (source ("%s.Slave" @app-name ))
  117.   (dest #dest)
  118. )
  119. (copyfiles
  120.   (help @copyfiles-help)
  121.   (source ("%sInstall.info" @app-name ))
  122.   (dest #dest)
  123. )
  124. (copyfiles
  125.   (help @copyfiles-help)
  126.   (source ("%sInstall" @app-name ))
  127.   (dest #dest)
  128. )
  129. (copyfiles
  130.   (help @copyfiles-help)
  131.   (source ("%s.Imager" @app-name ))
  132.   (dest #dest)
  133. )
  134. (if
  135.   (exists #readme-file)
  136.   (
  137.     (copyfiles
  138.       (help @copyfiles-help)
  139.       (source #readme-file)
  140.       (dest #dest)
  141.     )
  142.     (copyfiles
  143.       (help @copyfiles-help)
  144.       (source ("%s.info" #readme-file))
  145.       (dest #dest)
  146.     )
  147.   )
  148. )
  149.  
  150. (run ("Assign \"%s:\" \"%s\"" @app-name #dest))
  151. (run ("Patcher -p%s.Imager -s%s" @app-name #CI_drive))
  152. (run ("Assign \"%s:\" Remove" @app-name))
  153.  
  154. ;----------------------------
  155.  
  156. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  157.  
  158. (exit)
  159.  
  160.