home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 27 / amigaformatcd27.iso / -screenplay- / hd_installers / xybots / install-game < prev    next >
Text File  |  1998-04-06  |  2KB  |  91 lines

  1. (set #CI_unit 0)
  2. (set #CI_drive ("DF%ld:" #CI_unit))
  3. (set #readme "xybots")            ; %shd.readme
  4. ;----------------------------
  5.  
  6. ;try to figure out a place where the user usually installs his games
  7. (if (exists "Games:" (noreq) )
  8.     (set @default-dest "Games:")
  9.     (if (exists "SYS:Games" (noreq) )
  10.         (set @default-dest "SYS:Games")
  11.         (if (exists "Work:Games" (noreq) )
  12.             (set @default-dest "Work:Games")
  13.             (if (exists "JEUX:" (noreq) )
  14.                (set @default-dest "JEUX:")
  15.                (set @default-dest "SYS:")
  16.             )
  17.         )
  18.     )
  19. )
  20.  
  21. (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)")
  22.  
  23. (set @default-dest
  24. (askdir
  25.     (prompt ("Where should %s installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  26.     (help @askdir-help)
  27.     (default @default-dest)
  28.     (disk)
  29. )
  30. )
  31. (set #dest (tackon @default-dest @app-name))
  32. (set #CI_unit
  33.     (askchoice
  34.         (prompt "From which disk unit do you want\nto install the game")
  35.         (help    @askoptions-help)
  36.         (choices
  37.            "DF0:"
  38.            "DF1:"
  39.            "DF2:"
  40.            "DF3:"
  41.         )
  42.     )
  43. )
  44.  
  45. (set #CI_drive ("DF%ld:" #CI_unit))
  46.  
  47.  
  48. (makedir #dest
  49.     (help @makedir-help)
  50.     (infos)
  51. )
  52.  
  53. ;----------------------------
  54.     (makedir 
  55.       (tackon #dest "data")
  56.       (help @makedir-help)
  57.     )
  58.  
  59. (copyfiles
  60.   (help @copyfiles-help)
  61.   (source ("HD.inf"))
  62.   (newname ("%sHD.info" @app-name ))
  63.   (dest #dest)
  64. )
  65.     (copyfiles
  66.       (help @copyfiles-help)
  67.       (source ("XybotsHD" ))
  68.       (dest #dest)
  69.     )
  70.  
  71. (copyfiles
  72.   (help @copyfiles-help)
  73.   (source ("%shd.readme" #readme))
  74.   (dest #dest)
  75. )
  76. (copyfiles
  77.   (help @copyfiles-help)
  78.   (source ("%shd.readme.info" #readme))
  79.   (dest #dest)
  80. )
  81.  
  82. (message ("\nInsert %s disk into drive %s !" @app-name #CI_drive))
  83.     (if
  84.         (= 0 (run ("copy df%ld:XYB.#? df%ld:2 to \"%s/data\"" #CI_unit #CI_unit #dest)))
  85.         ("")
  86.         (abort "\"\" must be in your PATH !")
  87.     )
  88.  
  89. (exit)
  90.  
  91.