home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -screenplay- / hd_installers / xmascapers / install-game < prev    next >
Text File  |  1998-04-23  |  2KB  |  89 lines

  1. (set #CI_unit 0)
  2. (set #CI_drive ("DF%ld:" #CI_unit))
  3. (set #readme "xmas")            ; %shd.readme
  4. (set #diskname "xmascaper")        ; %s.d
  5. (set #rob "SKIPROB")                    ; values  "SKIPROB" or ""
  6. ;----------------------------
  7.  
  8. ;try to figure out a place where the user usually installs his games
  9. (if (exists "Games:" (noreq) )
  10.     (set @default-dest "Games:")
  11.     (if (exists "SYS:Games" (noreq) )
  12.         (set @default-dest "SYS:Games")
  13.         (if (exists "Work:Games" (noreq) )
  14.             (set @default-dest "Work:Games")
  15.             (if (exists "JEUX:" (noreq) )
  16.                (set @default-dest "JEUX:")
  17.                (set @default-dest "SYS:")
  18.             )
  19.         )
  20.     )
  21. )
  22.  
  23. (message "\n\n\nThis loader needs the JST program (NOT INCLUDED)\n to be copied in your path\n\n(if you don't have it already)\n\nJST is available from aminet (game/patch)")
  24.  
  25. (set @default-dest
  26. (askdir
  27.     (prompt ("Where should %s installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  28.     (help @askdir-help)
  29.     (default @default-dest)
  30.     (disk)
  31. )
  32. )
  33. (set #dest (tackon @default-dest @app-name))
  34. (set #CI_unit
  35.     (askchoice
  36.         (prompt "From which disk unit do you want\nto install the game")
  37.         (help    @askoptions-help)
  38.         (choices
  39.            "DF0:"
  40.            "DF1:"
  41.            "DF2:"
  42.            "DF3:"
  43.         )
  44.     )
  45. )
  46.  
  47. (set #CI_drive ("DF%ld:" #CI_unit))
  48.  
  49.  
  50. (makedir #dest
  51.     (help @makedir-help)
  52.     (infos)
  53. )
  54.  
  55. ;----------------------------
  56.  
  57. (copyfiles
  58.   (help @copyfiles-help)
  59.   (source ("HD.inf"))
  60.   (newname ("%sHD.info" @app-name ))
  61.   (dest #dest)
  62. )
  63. (copyfiles
  64.   (help @copyfiles-help)
  65.   (source ("%sHD" @app-name ))
  66.   (dest #dest)
  67. )
  68. (copyfiles
  69.   (help @copyfiles-help)
  70.   (source ("%shd.readme" #readme))
  71.   (dest #dest)
  72. )
  73. (copyfiles
  74.   (help @copyfiles-help)
  75.   (source ("%shd.readme.info" #readme))
  76.   (dest #dest)
  77. )
  78.  
  79. (message ("\nInsert %s disk into drive %s !" @app-name #CI_drive))
  80.     (if
  81.         (= 0 (run ("disk2file %ld \"%s/%s.d1\" %s >con:0/0/450/200//CLOSE/WAIT" #CI_unit #dest #diskname #rob)))
  82.         ("")
  83.         (abort "\"disk2file\" must be in your PATH !")
  84.     )
  85.  
  86.  
  87. (exit)
  88.  
  89.