home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1997 #3 / amigaacscoverdisc / games / shareware / battleduel / battleduel_install < prev    next >
Text File  |  1997-03-08  |  8KB  |  264 lines

  1. ;======================================================================
  2. ;
  3. ; BattleDuel Install Script $VER: Install 1.6 (1.3.97)
  4. ;
  5. ; Copyright © 1995-1997 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.6.80")
  25.         (set #update (cat "BattleDuel is already installed on your system. "
  26.                                 "All old files will be deleted and the new ones installed."))
  27.         (set #select_destination "Select the location where the BattleDuel directory should be created")
  28.         (set #destination_help (cat "Choose a destination partition or directory. "
  29.                                             "A directory called 'BattleDuel' will be created there."))
  30.         (set #install_to1 "\nInstall BattleDuel to \"")
  31.         (set #install_to2 "\" ?")
  32.         (set #have_fun "Have fun with BattleDuel...")
  33.         (set #which_chipset "Which Chipset do you have?")
  34.         (set #chipset_help (cat "If you own an Amiga 4000, Amiga 1200 or a graphicboard then "
  35.                                         "you must select AGA, otherwise you must select ECS!"))
  36.         (set #want_mwb_icons "Do you want to install MagicWB icons?")
  37.         (set #mwb_icons (cat "MagicWB is a set of nice icons with 8 colors.\n"
  38.                                     "MagicWB is © by Martin Huttenloher"))
  39.         (set #warning_msg (cat "This update should only be used with version 1.5.42 of BattleDuel! "
  40.                                     "If you apply it to an older version, there could be some problems "
  41.                                     "with the old landscapes. If you are a registered user, you should "
  42.                                     "contact the authors to get the right update."))
  43.         (set #assign_msg (cat "The assign BD: is no longer necessary. Please remove the line from "
  44.                                     "your user-startup."))
  45.         (set #registered_msg (cat "You are a registered user. Please contact the authors to get "
  46.                                     "the remaining new landscapes!"))
  47.     )
  48.     (
  49.         (set #hello "\nWillkommen zur BattleDuel Installation und Update\n\n\Version 1.6.80")
  50.         (set #update (cat "BattleDuel ist auf ihrem System schon installiert. "
  51.                                 "Alle alten Dateien werden gelöscht und die neuen werden installiert."))
  52.         (set #select_destination "Bitte wählen Sie aus, wo das BattleDuel-Verzeichnis erzeugt werden soll")
  53.         (set #destination_help (cat "Wählen Sie eine Partition oder ein Verzeichnis aus. "
  54.                                             "Ein Verzeichnis mit dem Namen 'BattleDuel' wird dort erzeugt."))
  55.         (set #install_to1 "\nBattleDuel nach \"")
  56.         (set #install_to2 "\" installieren?")
  57.         (set #have_fun "Viel Spaß mit BattleDuel...")
  58.         (set #which_chipset "Welchen Chipsatz haben Sie?")
  59.         (set #chipset_help (cat "Wenn Sie einen Amiga 4000, Amiga 1200 oder eine Grafikkarte "
  60.                                         "besitzen, dann müssen Sie AGA auswählen, ansonsten ECS!"))
  61.         (set #want_mwb_icons "Wollen Sie MagicWB Icons installieren?")
  62.         (set #mwb_icons (cat "MagicWB ist ein Set von Icons mit 8 Farben.\n"
  63.                                     "MagicWB ist © by Martin Huttenloher"))
  64.         (set #warning_msg (cat "Dieses Update sollte nur mit Version 1.5.42 von BattleDuel "
  65.                                     "benutzt werden! Wenn Sie es auf eine ältere Version anwenden, "
  66.                                     "gibt es evtl. Probleme mit den alten Landschaften. "
  67.                                     "Wenn Sie registrierter Benutzer sind, kontaktieren Sie die Autoren, "
  68.                                     "um ein passendes Update zu bekommen."))
  69.         (set #assign_msg (cat "Das Assign BD: wird nicht mehr benötigt! Bitte entfernen Sie es aus "
  70.                                     "der User-Startup."))
  71.         (set #registered_msg (cat "Sie sind registrierter Benutzer. Bitte kontaktieren Sie die "
  72.                                     "Autoren, um die restlichen neuen Landschaften zu bekommen!"))
  73.     )
  74. )
  75.  
  76. ;======================================================================
  77. ; variables
  78. ;======================================================================
  79.  
  80. (set inputdir    (pathonly @icon))        ; from where we were started
  81. (set bd_drawer "BattleDuel")            ; destination drawer name
  82.  
  83. ;======================================================================
  84. ; welcome
  85. ;======================================================================
  86.  
  87. (message #hello)
  88.  
  89. ;======================================================================
  90. ; ask for directory
  91. ;======================================================================
  92.  
  93. (set def (getassign "BD"))        ; default destination
  94. (if (= def "")
  95.     (
  96.         (set def "Work:")
  97.         (set bd_dest
  98.             (askdir
  99.                 (prompt #select_destination)
  100.                 (default def)
  101.                 (help #destination_help)
  102.             )
  103.         )
  104.         (set bd_dest (tackon bd_dest bd_drawer))
  105.         (message (cat #install_to1 bd_dest #install_to2))
  106.         (makedir bd_dest (infos))
  107.         (set update false)
  108.     )
  109.     (
  110.         (set assign true)
  111.         (set bd_dest def)
  112.         (set update true)
  113.     )
  114. )
  115.  
  116. (makeassign "BD" bd_dest)
  117. (set @default-dest bd_dest)
  118.  
  119. (if (= update true)
  120.     (message #update)
  121. )
  122.  
  123. ;======================================================================
  124. ; check for old version
  125. ;======================================================================
  126.  
  127. (if (= update true)
  128.     (    (set version (getversion "BD:BattleDuel"))
  129.         (set ver (/ version 65536))
  130.         (set rev (- version (* ver 65536)))
  131.         (if (and (= ver 1) (< rev 5))
  132.             ( (message #warning_msg) )
  133.         )
  134.     )
  135. )
  136. ;======================================================================
  137. ; ask for chipset
  138. ;======================================================================
  139.  
  140. (set aga
  141.     (askbool
  142.         (prompt #which_chipset)
  143.         (help #chipset_help)
  144.         (choices "ECS" "AGA/Graphicboard")
  145.         (default 1)
  146.     )
  147. )
  148.  
  149. ;======================================================================
  150. ; delete old files
  151. ;======================================================================
  152.  
  153. (if (= update true)
  154.     (
  155.         (if (= aga 1)
  156.             ( (delete "BD:Landscapes/ECS/LandscapeUR.iff") )
  157.             ( (delete "BD:Landscapes/AGA/LandscapeUR.iff") )
  158.         )
  159.     )
  160. )
  161.  
  162. ;======================================================================
  163. ; copy files
  164. ;======================================================================
  165.  
  166. (complete 0)
  167.  
  168. (makedir "BD:Gfx")
  169. (makedir "BD:Landscapes")
  170. (makedir "BD:Mods")
  171. (makedir "BD:Settings")
  172.  
  173. (complete 10)
  174. (copyfiles (source "BattleDuel") (dest "BD:"))
  175.  
  176. (complete 20)
  177. (if (= aga 1)
  178.     (    (makedir "BD:Gfx/ECS")
  179.         (copyfiles (source "Gfx/ECS") (dest "BD:Gfx/ECS") (all))
  180.     )
  181.     (    (makedir "BD:Gfx/AGA")
  182.         (copyfiles (source "Gfx/AGA") (dest "BD:Gfx/AGA") (all))
  183.     )
  184. )
  185.  
  186. (complete 30)
  187. (if (= aga 1)
  188.     (    (makedir "BD:Landscapes/ECS")
  189.         (copyfiles (source "Landscapes/ECS") (dest "BD:Landscapes/ECS") (all))
  190.     )
  191.     (    (makedir "BD:Landscapes/AGA")
  192.         (copyfiles (source "Landscapes/AGA") (dest "BD:Landscapes/AGA") (all))
  193.     )
  194. )
  195.     
  196. (complete 40)
  197. (copyfiles (source "Mods") (dest "BD:Mods") (all))
  198. (complete 50)
  199. (copyfiles (source "Settings") (dest "BD:Settings") (all))
  200. (complete 60)
  201.  
  202. ;======================================================================
  203. ; copy selected language
  204. ;======================================================================
  205.  
  206. (if (= language 0)
  207.     ( (copyfiles (source "English") (dest "BD:") (all)) )
  208.     ( (copyfiles (source "Deutsch") (dest "BD:") (all)) )
  209. )
  210. (complete 70)
  211.  
  212. ;======================================================================
  213. ; add MagicWB icons?
  214. ;======================================================================
  215.  
  216. (set mwb
  217.     (askbool
  218.         (prompt #want_mwb_icons)
  219.         (help #mwb_icons)
  220.         (choices "Yes" "No")
  221.         (default 1)
  222.     )
  223. )
  224.  
  225. (if (= mwb 1)
  226.     ( (copyfiles (source "MWB_Icons") (dest "BD:") (all)) )
  227.     ( (copyfiles (source "Icons") (dest "BD:") (all)) )
  228. )
  229. (complete 80)
  230.  
  231. ;======================================================================
  232. ; set tooltypes
  233. ;======================================================================
  234.  
  235. (if (= aga 1)
  236.     (tooltype
  237.         (dest "BD:BattleDuel")
  238.         (settooltype "DISPLAY_ID"   "0x0")
  239.         (settooltype "DISPLAY_TYPE" "ECS")
  240.     )
  241.     (tooltype
  242.         (dest "BD:BattleDuel")
  243.         (settooltype "DISPLAY_ID"   "0x0")
  244.         (settooltype "DISPLAY_TYPE" "AGA")
  245.     )
  246. )
  247. (complete 90)
  248.  
  249. (if (= assign true)
  250.     ( (message #assign_msg) )
  251. )
  252.  
  253. (if (or (exists ("BD:BattleDuel.key"))
  254.           (exists ("devs:BattleDuel.key"))
  255.           (exists ("s:BattleDuel.key")) )
  256.     ( (message #registered_msg) )
  257. )
  258.  
  259. (makeassign "BD")
  260.  
  261. (complete 100)
  262.  
  263. (exit #have_fun)
  264.