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

  1. ;****************************
  2.  
  3. (set #sub-dir "ccdat")        ;sub directory containing data files
  4. (set #readme-file "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. (set #program "WHDLoad")
  24. (P_chkrun)
  25.  
  26. (set #program "Patcher")
  27. (P_chkrun)
  28.  
  29.  
  30. ;****************************
  31.  
  32. (if
  33.   (exists #readme-file)
  34.   (if 
  35.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  36.     ("")
  37.     (run ("SYS:Utilities/More %s" #readme-file))
  38.   )
  39. )
  40.  
  41. (set @default-dest
  42.   (askdir
  43.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  44.     (help @askdir-help)
  45.     (default @default-dest)
  46.     (disk)
  47.   )
  48. )
  49. (set #dest (tackon @default-dest @app-name))
  50. (if
  51.   (exists #dest)
  52.   (
  53.     (set #choice
  54.       (askbool
  55.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  56.         (default 1)
  57.         (choices "Delete" "Skip")
  58.         (help @askbool-help)
  59.       )
  60.     )
  61.     (if
  62.       (= #choice 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. (copyfiles
  75.   (help @copyfiles-help)
  76.   (source ("%s.slave" @app-name))
  77.   (dest #dest)
  78. )
  79. (copyfiles
  80.   (help @copyfiles-help)
  81.   (source ("%s.inf" @app-name ))
  82.   (newname ("%s.info" @app-name ))
  83.   (dest #dest)
  84. )
  85. (if
  86.   (exists #readme-file)
  87.   (
  88.     (copyfiles
  89.       (help @copyfiles-help)
  90.       (source #readme-file)
  91.       (dest #dest)
  92.     )
  93.     (copyfiles
  94.       (help @copyfiles-help)
  95.       (source ("%s.info" #readme-file))
  96.       (dest #dest)
  97.     )
  98.   )
  99. )
  100. (if
  101.   (= #sub-dir "")
  102.   ("")
  103.   (
  104.     (set #dest (tackon #dest #sub-dir))
  105.     (makedir #dest
  106.       (help @makedir-help)
  107.     )
  108.   )
  109. )
  110. (copyfiles
  111.   (help @copyfiles-help)
  112.   (source ("OSEMUMODULE400.BIN"))
  113.   (dest #dest)
  114. )
  115.  
  116. ;----------------------------
  117.  
  118. (working "Please insert your Crazy Cars 3 disk 1 in any drive.")
  119. (
  120.   (set #AD_disk "CCIII")
  121.   (copyfiles
  122.     (help @copyfiles-help)
  123.     (source ("%s:" #AD_disk))
  124.     (dest #dest)
  125.     (pattern "~(c|s|system-configuration|.info|disk.info)")
  126.   )
  127. )
  128.  
  129. (working "Please insert your Crazy Cars 3 disk 2 in any drive.")
  130. (
  131.   (set #AD_disk "CCDAT")
  132.   (copyfiles
  133.     (help @copyfiles-help)
  134.     (source ("%s:" #AD_disk))
  135.     (dest #dest)
  136.     (pattern "~(.info|disk.info)")
  137.   )
  138. )
  139.  
  140. (run ("Assign \"ToPatch:\" \"%s\"" #dest))
  141. (run ("Patcher -p%s.param" @app-name))
  142. (run ("Assign \"ToPatch:\" Remove"))
  143.  
  144. ;----------------------------
  145.  
  146. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  147.  
  148. (exit)
  149.  
  150.