home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Exec 1 / CD_Magazyn_EXEC_nr_1.iso / Gry / BattleDuel.lzx / BattleDuel / BattleDuel_Install < prev    next >
Text File  |  1999-09-08  |  8KB  |  272 lines

  1. ;======================================================================
  2. ;
  3. ; BattleDuel Install Script $VER: Install 1.7 (9.9.99)
  4. ;
  5. ; Copyright © 1995-1999 Jochen Terstiege
  6. ;
  7. ;======================================================================
  8. ;
  9. ;======================================================================
  10. ; language strings
  11. ;======================================================================
  12.  
  13. (set language
  14.     (askchoice
  15.         (prompt ("Please select a language:\nBitte wählen Sie eine Sprache aus:"))
  16.         (help @askchoice-help)
  17.         (choices "English"
  18.                     "Deutsch")
  19.     )
  20. )
  21.  
  22. (if (= language 0)
  23.     (
  24.         (set #hello "\nWelcome to the BattleDuel Installation and Update\n\n\Version 1.7.105")
  25.         (set #update (cat "BattleDuel is already installed on your system. "
  26.                                 "Some old files will be deleted and the new ones installed."))
  27.         (set #select_destination "Please create or select a directory where the BattleDuel files should be copied to!")
  28.         (set #destination_help "Choose a destination directory or create one yourself.")
  29.         (set #install_to1 "\nInstall BattleDuel to \"")
  30.         (set #install_to2 "\" ?")
  31.         (set #have_fun "Have fun with BattleDuel...")
  32.         (set #which_chipset "Which chipset do you have?")
  33.         (set #which_icons "Which icons do you want to install?")
  34.         (set #warning_msg (cat "This update should only be used with version 1.5.42 or higher "
  35.                                     "of BattleDuel! If you apply it to an older version, there could "
  36.                                     "be some problems with the old landscapes. If you are a registered "
  37.                                     "user, you should contact the authors to get the right update."))
  38.         (set #assign_msg (cat "The assign BD: is no longer necessary. Please remove the line from "
  39.                                 "your user-startup."))
  40.         (set #registered_msg (cat "You are a registered user. If you use the version for graphicboards, "
  41.                                     "please contact the authors to get the remaining new landscapes!"))
  42.     )
  43. )
  44. (if (= language 1)
  45.     (
  46.         (set #hello "\nWillkommen zur BattleDuel Installation und Update\n\n\Version 1.7.105")
  47.         (set #update (cat "BattleDuel ist auf ihrem System schon installiert. "
  48.                                 "Einige alte Dateien werden gelöscht und die neuen Dateien werden installiert."))
  49.         (set #select_destination "Bitte erstellen Sie ein Verzeichnis oder wählen Sie aus, wo die BattleDuel-Dateien installiert werden sollen!")
  50.         (set #destination_help "Wählen Sie ein Verzeichnis aus oder erstellen Sie selber eins.")
  51.         (set #install_to1 "\nBattleDuel nach \"")
  52.         (set #install_to2 "\" installieren?")
  53.         (set #have_fun "Viel Spaß mit BattleDuel...")
  54.         (set #which_chipset "Welchen Chipsatz haben Sie?")
  55.         (set #which_icons "Welche Icons wollen Sie installieren?")
  56.         (set #warning_msg (cat "Dieses Update sollte nur mit Version 1.5.42 oder neuer von "
  57.                                     "BattleDuel benutzt werden! Wenn Sie es auf eine ältere Version "
  58.                                     "anwenden, gibt es evtl. Probleme mit den alten Landschaften. "
  59.                                     "Wenn Sie registrierter Benutzer sind, kontaktieren Sie die Autoren, "
  60.                                     "um ein passendes Update zu bekommen."))
  61.         (set #assign_msg (cat "Das Assign BD: wird nicht mehr benötigt! Bitte entfernen Sie es aus "
  62.                                     "der User-Startup."))
  63.         (set #registered_msg (cat "Sie sind registrierter Benutzer. Wenn Sie die Version für Grafikkarten "
  64.                                     "benutzen, kontaktieren Sie bitte die Autoren, um die restlichen neuen "
  65.                                     "Landschaften zu bekommen!"))
  66.     )
  67. )
  68.  
  69. ;======================================================================
  70. ; variables
  71. ;======================================================================
  72.  
  73. (set inputdir    (pathonly @icon))        ; from where we were started
  74.  
  75. ;======================================================================
  76. ; welcome
  77. ;======================================================================
  78.  
  79. (message #hello)
  80.  
  81. ;======================================================================
  82. ; ask for directory
  83. ;======================================================================
  84.  
  85. (set def (getassign "BD"))        ; default destination
  86. (if (= def "")
  87.     (
  88.         (set def "Work:")
  89.         (set bd_dest
  90.             (askdir
  91.                 (prompt #select_destination)
  92.                 (default def)
  93.                 (help #destination_help)
  94.             )
  95.         )
  96.         (message (cat #install_to1 bd_dest #install_to2))
  97.         (if (exists (tackon bd_dest "BattleDuel"))
  98.             (set update true)
  99.         )
  100.     )
  101.     (
  102.         (set assign true)
  103.         (set bd_dest def)
  104.         (set update true)
  105.     )
  106. )
  107.  
  108. (makeassign "BD" bd_dest)
  109. (set @default-dest bd_dest)
  110.  
  111. (if (= update true)
  112.     (message #update)
  113. )
  114.  
  115. ;======================================================================
  116. ; check for old version
  117. ;======================================================================
  118.  
  119. (if (= update true)
  120.     (    (set version (getversion "BD:BattleDuel"))
  121.         (set ver (/ version 65536))
  122.         (set rev (- version (* ver 65536)))
  123.         (if (and (= ver 1) (< rev 5))
  124.             ( (message #warning_msg) )
  125.         )
  126.     )
  127. )
  128. ;======================================================================
  129. ; ask for chipset
  130. ;======================================================================
  131.  
  132. (set chipset
  133.     (askchoice
  134.         (prompt #which_chipset)
  135.         (help @askchoice-help)
  136.         (choices "ECS" "AGA" "Graphicboard")
  137.         (default 0)
  138.     )
  139. )
  140.  
  141. ;======================================================================
  142. ; delete old files
  143. ;======================================================================
  144.  
  145. (if (= update true)
  146.     (
  147.         (delete "BD:Landscapes/ECS/LandscapeUR.iff")
  148.         (delete "BD:Landscapes/AGA/LandscapeUR.iff")
  149.         (delete "BD:Mods/mod.BattleDuel")
  150.     )
  151. )
  152.  
  153. ;======================================================================
  154. ; copy files
  155. ;======================================================================
  156.  
  157. (complete 0)
  158.  
  159. (if (not (exists "BD:Gfx"))
  160.     (makedir "BD:Gfx")
  161. )
  162. (if (not (exists "BD:Landscapes"))
  163.     (makedir "BD:Landscapes")
  164. )
  165. (if (not (exists "BD:Mods"))
  166.     (makedir "BD:Mods")
  167. )
  168. (if (not (exists "BD:Settings"))
  169.     (makedir "BD:Settings")
  170. )
  171. (if (not (exists "BD:Catalogs"))
  172.     (makedir "BD:Catalogs")
  173. )
  174.  
  175. (complete 10)
  176. (copyfiles (source "BattleDuel") (dest "BD:"))
  177.  
  178. (complete 20)
  179. (if (= chipset 0)
  180.     (copyfiles (source "Gfx/ECS") (dest "BD:Gfx/ECS") (all))
  181. )
  182. (if (= chipset 1)
  183.     (copyfiles (source "Gfx/AGA") (dest "BD:Gfx/AGA") (all))
  184. )
  185. (if (= chipset 2)
  186.     (copyfiles (source "Gfx/GFXBOARD") (dest "BD:Gfx/GFXBOARD") (all))
  187. )
  188.  
  189. (complete 30)
  190. (if (= chipset 0)
  191.     (copyfiles (source "Landscapes/ECS") (dest "BD:Landscapes/ECS") (all))
  192. )
  193. (if (= chipset 1)
  194.     (copyfiles (source "Landscapes/AGA") (dest "BD:Landscapes/AGA") (all))
  195. )
  196. (if (= chipset 2)
  197.     (copyfiles (source "Landscapes/GFXBOARD") (dest "BD:Landscapes/GFXBOARD") (all))
  198. )
  199.  
  200. (complete 40)
  201. (copyfiles (source "Mods") (dest "BD:Mods") (all))
  202. (complete 50)
  203. (copyfiles (source "Settings") (dest "BD:Settings") (all))
  204. (complete 60)
  205. (copyfiles (source "Catalogs") (dest "BD:Catalogs") (all))
  206.  
  207. ;======================================================================
  208. ; copy selected language
  209. ;======================================================================
  210.  
  211. (if (= language 0)
  212.     ( (copyfiles (source "English") (dest "BD:") (all)) )
  213. )
  214. (if (= language 1)
  215.     ( (copyfiles (source "Deutsch") (dest "BD:") (all)) )
  216. )
  217. (complete 70)
  218.  
  219. ;======================================================================
  220. ; which icons?
  221. ;======================================================================
  222.  
  223. (set icons
  224.     (askchoice
  225.         (prompt #which_icons)
  226.         (help @askchoice-help)
  227.         (choices "Normal" "MagicWB" "GlowIcons")
  228.         (default 0)
  229.     )
  230. )
  231.  
  232. (if (= icons 0)
  233.     (copyfiles (source "Icons") (dest "BD:") (all))
  234. )
  235. (if (= icons 1)
  236.     (copyfiles (source "MWB_Icons") (dest "BD:") (all))
  237. )
  238. (if (= icons 2)
  239.     (
  240.         (copyfiles (source "Glow_Icons") (dest "BD:") (all))
  241.         (delete (cat bd_dest ".info"))
  242.         (rename "BD:BattleDuel_Drawer.info" (cat bd_dest ".info"))
  243.     )
  244. )
  245. (complete 80)
  246.  
  247. ;======================================================================
  248. ; set tooltypes
  249. ;======================================================================
  250.  
  251. (tooltype
  252.     (dest "BD:BattleDuel")
  253.     (settooltype "DISPLAY_ID" "0x0")
  254. )
  255. (complete 90)
  256.  
  257. (if (= assign true)
  258.     ( (message #assign_msg) )
  259. )
  260.  
  261. (if (or (exists ("BD:BattleDuel.key"))
  262.           (exists ("devs:BattleDuel.key"))
  263.           (exists ("s:BattleDuel.key")) )
  264.     ( (message #registered_msg) )
  265. )
  266.  
  267. (makeassign "BD")
  268.  
  269. (complete 100)
  270.  
  271. (exit #have_fun)
  272.