home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Game-Installer / WHD_Installers / Games_G-I / Ilyad / Install < prev    next >
Text File  |  1977-12-31  |  3KB  |  141 lines

  1. ;****************************
  2.  
  3. (set #readme-file "README")    ;name of readme file
  4. (set #cleanup "")        ;files to delete after install
  5. (set #last-file "Disk.1")    ;last file the imager should create
  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.   (= @user-level 2)
  32.   (
  33.     (set #CI_drive
  34.       (askchoice
  35.     (prompt "Select source drive for diskimages")
  36.     (default 0)
  37.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  38.     (help @askchoice-help)
  39.       )
  40.     )
  41.     (if
  42.       (= #CI_drive 0)
  43.       (set #CI_drive "DF0:")
  44.     )
  45.     (if
  46.       (= #CI_drive 1)
  47.       (set #CI_drive "DF1:")
  48.     )
  49.     (if
  50.       (= #CI_drive 2)
  51.       (set #CI_drive "DF2:")
  52.     )
  53.     (if
  54.       (= #CI_drive 3)
  55.       (set #CI_drive "DF3:")
  56.     )
  57.   )
  58.   (
  59.     (set #CI_drive "DF0:")
  60.   )
  61. )
  62.  
  63. (set @default-dest
  64.   (askdir
  65.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  66.     (help @askdir-help)
  67.     (default @default-dest)
  68.     (disk)
  69.   )
  70. )
  71. (set #dest (tackon @default-dest @app-name))
  72. (if
  73.   (exists #dest)
  74.   (
  75.     (set #choice
  76.       (askbool
  77.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  78.         (default 1)
  79.         (choices "Delete" "Skip")
  80.         (help @askbool-help)
  81.       )
  82.     )
  83.     (if
  84.       (= #choice 1)
  85.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  86.     )
  87.   )
  88. )
  89. (makedir #dest
  90.   (help @makedir-help)
  91.   (infos)
  92. )
  93.  
  94. ;----------------------------
  95.  
  96. (copyfiles
  97.   (help @copyfiles-help)
  98.   (source ("%s.inf" @app-name ))
  99.   (newname ("%s.info" @app-name ))
  100.   (dest #dest)
  101. )
  102. (copyfiles
  103.   (help @copyfiles-help)
  104.   (source ("%s.slave" @app-name ))
  105.   (dest #dest)
  106. )
  107. (if
  108.   (exists #readme-file)
  109.   (copyfiles
  110.     (help @copyfiles-help)
  111.     (source #readme-file)
  112.     (dest #dest)
  113.   )
  114. )
  115.  
  116. (run ("Assign \"%s:\" \"%s\"" @app-name #dest))
  117. (run ("Patcher -p%s.imager -s%s" @app-name #CI_drive))
  118. (run ("Assign \"%s:\" Remove" @app-name))
  119.  
  120. (if
  121.   (exists (tackon #dest #last-file))
  122.   ("")
  123.   (abort "Diskimaging not successful !\nThe Patcher could'nt create all needed files !")
  124. )
  125.  
  126. ;----------------------------
  127.  
  128. (run ("Delete %s ALL QUIET FORCE" #cleanup))    ;delete temporary files
  129.  
  130. (if
  131.   (exists #readme-file)
  132.   (if 
  133.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  134.     ("")
  135.     (run ("SYS:Utilities/More %s" #readme-file))
  136.   )
  137. )
  138.  
  139. (exit)
  140.  
  141.