home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / giochi / installer_whdload / a-b / bssjaneseymour.lha / BSSJaneSeymourHD / Install < prev    next >
Text File  |  1999-07-04  |  3KB  |  154 lines

  1. (set #readme-file "BSSJaneSeymour.readme") ;name of readme file
  2. (set #last-disk 2)          ;amount of disks
  3. (set #disk-size 901120)     ;size of each disk
  4.  
  5. (procedure P_chkrun
  6.   (if
  7.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  8.     ("")
  9.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  10.   )
  11. )
  12.  
  13. (procedure P_image
  14.   (message ("\nInsert \"%s\" into drive %s !\n\n(make sure it's the right disk because it will not checked)" #CI_diskname #CI_drive))
  15.   (if
  16.     (= 0 
  17.       (run ("cd \"%s\"\nDIC %s FD=%ld LD=%ld SIZE=%ld >CON:///1000//CLOSE" #dest #CI_drive #CI_diskno #CI_diskno #disk-size))
  18.     )
  19.     ("")
  20.     (abort "\"DIC\" has failed to create a diskimage")
  21.   )
  22. )
  23.  
  24. (if
  25.   (exists #readme-file)
  26.   (if
  27.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  28.     ("")
  29.     (run ("SYS:Utilities/More %s" #readme-file))
  30.   )
  31. )
  32.  
  33. (set #program "WHDLoad")
  34. (P_chkrun)
  35.  
  36. (set #program "DIC")
  37. (P_chkrun)
  38.  
  39. (if
  40.   (= @user-level 2)
  41.   (
  42.     (set #CI_drive
  43.       (askchoice
  44.     (prompt "Select source drive for diskimages")
  45.     (default 0)
  46.     (choices "DF0:" "DF1:" "RAD:" "Enter Device")
  47.     (help @askchoice-help)
  48.       )
  49.     )
  50.     (select #CI_drive
  51.       (set #CI_drive "DF0:")
  52.       (set #CI_drive "DF1:")
  53.       (set #CI_drive "RAD:")
  54.       (set #CI_drive
  55.         (askstring
  56.           (prompt "Select source drive for diskimages")
  57.           (default "DF0:")
  58.           (help @askstring-help)
  59.         )
  60.       )
  61.     )
  62.   )
  63.   (set #CI_drive "DF0:")
  64. )
  65.  
  66. (set @default-dest
  67.   (askdir
  68.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  69.     (help @askdir-help)
  70.     (default @default-dest)
  71.     (disk)
  72.   )
  73. )
  74. (set #dest (tackon @default-dest @app-name))
  75. (if
  76.   (exists #dest)
  77.   (
  78.     (set #choice
  79.       (askbool
  80.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  81.         (default 1)
  82.         (choices "Delete" "Skip")
  83.         (help @askbool-help)
  84.       )
  85.     )
  86.     (if
  87.       (= #choice 1)
  88.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  89.     )
  90.   )
  91. )
  92. (makedir #dest
  93.   (help @makedir-help)
  94.   (infos)
  95. )
  96.  
  97. (copyfiles
  98.   (help @copyfiles-help)
  99.   (source ("%s.slave" @app-name))
  100.   (dest #dest)
  101. )
  102. (if
  103.   (exists ("%s.newicon" @app-name))
  104.   (set #icon
  105.     (askchoice
  106.       (prompt "\nWhich icon do you like to install ?\n")
  107.       (default 0)
  108.       (choices "Normal" "NewIcon")
  109.       (help @askchoice-help)
  110.     )
  111.   )
  112.   (set #icon 0)
  113. )
  114. (select #icon
  115.   (set #icon ("%s.inf" @app-name))
  116.   (set #icon ("%s.newicon" @app-name))
  117. )
  118. (copyfiles
  119.   (help @copyfiles-help)
  120.   (source #icon)
  121.   (newname ("%s.info" @app-name))
  122.   (dest #dest)
  123. )
  124. (if
  125.   (exists #readme-file)
  126.   (copyfiles
  127.     (help @copyfiles-help)
  128.     (source #readme-file)
  129.     (dest #dest)
  130.     (infos)
  131.   )
  132. )
  133. (if
  134.   (exists ("%s.info" #readme-file))
  135.   (copyfiles
  136.     (help @copyfiles-help)
  137.     (source ("%s.info" #readme-file))
  138.     (dest #dest)
  139.   )
  140. )
  141.  
  142. (set #CI_diskno 1)
  143. (while
  144.   (<= #CI_diskno #last-disk)
  145.   (
  146.     (set #CI_diskname ("%s Disk %ld" @app-name #CI_diskno))
  147.     (P_image)
  148.     (run ("FileNote Disk.%ld %s Quiet" #CI_diskno @app-name))
  149.     (set #CI_diskno (+ #CI_diskno 1))
  150.   )
  151. )
  152.  
  153. (exit)
  154.