home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 29 / amigaformatcd29.iso / -screenplay- / hd_installers / tangram / install next >
Text File  |  1998-06-01  |  5KB  |  198 lines

  1. ;------------------------------------------------------------
  2. ; General installscript for DOS-GAMES with patcher, by Harry
  3. ; Adapted from a script by Bert Jahn
  4. ;------------------------------------------------------------
  5. ;****************************
  6.  
  7. (set #readme-file "README")        ;name of readme file
  8. (set #CI_drive "TANGRAM:")        ;default source drive
  9. (set #cleanup "")            ;files to delete after install
  10.  
  11. ;****************************
  12.  
  13.  
  14.  
  15. (if
  16.   (exists #readme-file)
  17.   (if 
  18.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  19.     ("")
  20.     (run ("SYS:Utilities/More %s" #readme-file))
  21.   )
  22. )
  23. (set #instmode
  24.   (askchoice
  25.     (prompt "Please select installation-mode")
  26.     (default 0)
  27.     (choices "Install your original (or backup) on harddisk" "Patch a backup of your original" "Install an already patched backup to harddisk")
  28.     (help @askchoice-help "\n\n Installing your original on harddisk will copy your disk to hd, then patch it.\nPatching a backup of your original requires a backup (who had ever thought this?).\nWith install an already patched backup to hd you may install a former with that script patched backup to hd.")
  29.   )
  30. )
  31. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  32. (if
  33.   (= #instmode 1)
  34.   (
  35.     (message "Please insert now a BACKUP copy of your original in any drive.")
  36.     (set @default-dest "Backup-Disk")
  37.     (run ("patcher -pparam%s" @app-name))
  38.   )
  39. )
  40. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  41. (if
  42.   (= #instmode 0)
  43.   (
  44.     (set @default-dest
  45.       (askdir
  46.         (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  47.         (help @askdir-help)
  48.         (default @default-dest)
  49.         (disk)
  50.       )
  51.     )
  52.  
  53.     (set #dest (tackon @default-dest @app-name))
  54.  
  55. ;if anything similar exist delete it
  56.     (if
  57.       (exists #dest)
  58.       (if
  59.     (= (askbool
  60.       (prompt "Destinationdrawer already exists, delete it?")
  61.       (help @askbool-help)
  62.         ) 1)
  63.         (run ("Delete \"%s\" \"%s.info\" all" #dest #dest))
  64.       )
  65.     )
  66.  
  67.     (makedir #dest
  68.       (help @makedir-help)
  69.       (infos)
  70.     )
  71.  
  72. ;----------------------------
  73.  
  74.     (working "Please insert now your writeprotected original or backup.")
  75.  
  76.     (copyfiles
  77.       (help @copyfiles-help)
  78.       (source ("%s" #CI_drive))
  79.       (dest #dest)
  80.       (all)
  81.     )
  82.     (copyfiles
  83.       (help @copyfiles-help)
  84.       (source ("%s.inf" @app-name ))
  85.       (newname ("%s.info" @app-name ))
  86.       (dest #dest)
  87.     )
  88.     (if
  89.       (exists #readme-file)
  90.       (copyfiles
  91.     (help @copyfiles-help)
  92.     (source #readme-file)
  93.     (dest #dest)
  94.       )
  95.     )
  96.     (copyfiles
  97.       (help @copyfiles-help)
  98.       (source ("%s_st" @app-name ))
  99.       (newname ("%s" @app-name ))
  100.       (dest #dest)
  101.     )
  102.  
  103. ;----------------------------
  104.  
  105.     (message "Please remove your original disk from the drive.")
  106.     (if
  107.       (= (exists #CI_drive (noreq)) 2)
  108.       (abort "Quittet due not removed disk.")
  109.     )
  110.     (run ("c:assign \"%s\" \"%s\"" #CI_drive #dest))
  111.  
  112.     (run ("patcher -pparam%s" @app-name))
  113.  
  114.     (run ("c:assign \"%s\" remove" #CI_drive))
  115.  
  116.     (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete all temporary files
  117.  
  118.     (if
  119.       (exists #readme-file)
  120.       (if 
  121.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  122.     ("")
  123.     (run ("SYS:Utilities/More %s" #readme-file))
  124.       )
  125.     )
  126.   )
  127. )
  128. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  129. (if
  130.   (= #instmode 2)
  131.   (
  132.     (set @default-dest
  133.       (askdir
  134.         (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  135.         (help @askdir-help)
  136.         (default @default-dest)
  137.         (disk)
  138.       )
  139.     )
  140.  
  141.     (set #dest (tackon @default-dest @app-name))
  142.  
  143. ;if anything similar exist delete it
  144.     (if
  145.       (exists #dest)
  146.       (if
  147.     (= (askbool
  148.       (prompt "Destinationdrawer already exists, delete it?")
  149.       (help @askbool-help)
  150.         ) 1)
  151.         (run ("Delete \"%s\" \"%s.info\" all" #dest #dest))
  152.       )
  153.     )
  154.  
  155.     (makedir #dest
  156.       (help @makedir-help)
  157.       (infos)
  158.     )
  159.  
  160. ;----------------------------
  161.  
  162.     (working "Please insert now your already modified backup disk.")
  163.     (copyfiles
  164.       (help @copyfiles-help)
  165.       (source ("%s" #CI_drive))
  166.       (dest #dest)
  167.       (all)
  168.     )
  169.     (copyfiles
  170.       (help @copyfiles-help)
  171.       (source ("%s.inf" @app-name ))
  172.       (newname ("%s.info" @app-name ))
  173.       (dest #dest)
  174.     )
  175.     (if
  176.       (exists #readme-file)
  177.       (copyfiles
  178.     (help @copyfiles-help)
  179.     (source #readme-file)
  180.     (dest #dest)
  181.       )
  182.     )
  183.     (copyfiles
  184.       (help @copyfiles-help)
  185.       (source ("%s_st" @app-name ))
  186.       (newname ("%s" @app-name ))
  187.       (dest #dest)
  188.     )
  189.  
  190. ;----------------------------
  191.  
  192.     (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete all temporary files
  193.  
  194.   )
  195. )
  196.  
  197. (exit)
  198.