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

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