home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 5 / CD_Magazyn_EXEC_nr_5.iso / Gry / Îatki / WHDIGamesU-Z.lzh / Uridium2.lha / U2Install / Install_Uridium-II < prev    next >
Text File  |  1997-08-31  |  4KB  |  195 lines

  1. ;
  2. ;$VER: Uridium-II HD Installer script v1.05 (c) 1997 John Girvin
  3. ;
  4.  
  5. ;---------------------------------------------------------------------------
  6. ;
  7. ; Make a disk image
  8. ;
  9.  
  10. (procedure S_MakeDisk #UDISKNUM
  11. (
  12.     (set #UDATFILE (tackon #UDESTDIR (cat "Disk." #UDISKNUM)))
  13.  
  14.     (message
  15.         (cat
  16.             "\n\n\nPlease insert Uridium-II Disk "
  17.             #UDISKNUM 
  18.             " in drive DF0:\n\n"
  19.             "*** WARNING ***\n"
  20.             "Multitasking will be disabled while the disk image"
  21.             " is being created. After inserting the disk, please"
  22.             " ensure that all disk and network activity has finished"
  23.             " before clicking 'Proceed'.\n\n"
  24.             "Click 'Proceed' when ready."
  25.         )
  26.     )
  27.  
  28.     (working
  29.         (cat "Creating image of disk " #UDISKNUM " in '" #UDATFILE "'\n\n"
  30.              "*** Multitasking is disabled. DON`T PANIC! ***"
  31.         )
  32.     )
  33.  
  34.     (set #URCODE (run (cat "U2MakeDat " #UDATFILE)))
  35.  
  36.     (if (>= #URCODE 100)
  37.         (abort
  38.             (cat
  39.                 "Could not create image of disk "
  40.                 #UDISKNUM
  41.                 " !\n\nError: " #URCODE
  42.             )
  43.         )
  44.     )
  45. ))
  46.  
  47. ;---------------------------------------------------------------------------
  48. ;
  49. ; Do the install
  50. ;
  51. ; - get dir to install in
  52. ; - create drawer
  53. ; - copy the drawer icon
  54. ; - create the disk images
  55. ;
  56.  
  57. (procedure S_Install
  58. (
  59.     ;
  60.     ; Get directory to install U2 in
  61.     ;
  62.     (set #UROOTDIR
  63.         (askdir
  64.             (prompt "Where would you like Uridium-II installed?\n"
  65.                     "(a new drawer called 'Uridium-II' will be created here)"
  66.             )
  67.             (help @askdir-help)
  68.             (default #UROOTDIR)
  69.         )
  70.     )
  71.  
  72.     (set #UDESTDIR (tackon #UROOTDIR "Uridium-II/"))
  73.     (set @default-dest #UDESTDIR)
  74.  
  75.     ;
  76.     ; Create the installation directory
  77.     ;
  78.     (makedir #UDESTDIR
  79.         (prompt "I will now create the directory '" #UDESTDIR "'")
  80.         (help @makedir-help)
  81.         (infos)
  82.         (confirm)
  83.     )
  84.  
  85.     ;
  86.     ; Copy disk drawer icon
  87.     ;
  88.     (copyfiles
  89.         (prompt "Copying HD drawer icon")
  90.         (help @copyfiles-help)
  91.         (source "Uridium-II.inf")
  92.         (newname "Uridium-II.info")
  93.         (dest #UROOTDIR)
  94.         (nogauge)
  95.         (optional fail force)
  96.     )
  97.  
  98.     ;
  99.     ; Install disk 1
  100.     ;
  101.     (S_MakeDisk 1)
  102.  
  103.     ;
  104.     ; Determine name of slave patch file
  105.     ;
  106.     (if (database "chiprev" "AA")
  107.         (set #USLAVENAME (cat #URCODE "2.gpch"))
  108.         (set #USLAVENAME (cat #URCODE "1.gpch"))
  109.     )
  110.  
  111.     ;
  112.     ; Create slave from base file and patch
  113.     ;
  114.     (working "Creating slave program")
  115.     (set #URCODE
  116.         (run
  117.             (cat "GPatch U2Slave.base "
  118.                      #USLAVENAME " "
  119.                     (tackon #UDESTDIR "Uridium-II_HD")
  120.             )
  121.         )
  122.     )
  123.  
  124.     (if (<> #URCODE 0)
  125.             (abort
  126.                 (cat "Slave generation failed error " #URCODE)
  127.             )
  128.     )
  129.  
  130.     ;
  131.     ; Install disk 2
  132.     ;
  133.     (S_MakeDisk 2)
  134. ))
  135.  
  136.  
  137. ;---------------------------------------------------------------------------
  138.  
  139. (welcome "Welcome to the Uridium-II Hard Drive Installer")
  140. (set @app-name (cat "Uridium-II_HD"))
  141. (set #UROOTDIR "DH0:")
  142. (set #UDESTDIR "")
  143.  
  144. (if    (<> @user-level 2)
  145.     (abort "You must select 'Expert' user level")
  146. )
  147.  
  148. (message "\n\nWelcome to the Uridium-II Hard Drive Installer\n"
  149.          "(c) 1997 John Girvin\n\n"
  150.          "Please read the documentation thoroughly before"
  151.          " attempting to use this installer!\n\n"
  152.          "This is version 1.05\n\n"
  153.          "Click 'Proceed' to begin."
  154. )
  155.  
  156. (S_Install)
  157.  
  158. ;
  159. ; Delete config file if it exists
  160. ; Only used in v1.04 and earlier
  161. ;
  162. (set #UDATFILE (tackon #UDESTDIR "u2config.bin"))
  163.  
  164. (if (exists #UDATFILE (noreq))
  165.     (delete    #UDATFILE
  166.         (optional force)
  167.     )
  168. )
  169.  
  170. ;
  171. ; Copy WHDload
  172. ;
  173. (copyfiles
  174.     (prompt "Copying WHDLoad program")
  175.     (help @copyfiles-help)
  176.     (source "WHDLoad")
  177.     (dest #UDESTDIR)
  178.     (nogauge)
  179.     (noposition)
  180.     (optional fail force)
  181. )
  182.  
  183. ;
  184. ; Copy slave icon
  185. ;
  186. (copyfiles
  187.     (prompt "Copying slave program icon")
  188.     (help @copyfiles-help)
  189.     (source "Uridium-II_HD.inf")
  190.     (newname "Uridium-II_HD.info")
  191.     (dest #UDESTDIR)
  192.     (nogauge)
  193.     (optional fail force)
  194. )
  195.