home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 29 / amigaformatcd29.iso / -screenplay- / otherstuff / deu / install_deu < prev    next >
Text File  |  1998-05-29  |  10KB  |  323 lines

  1. ; $VER: Installer script 1.0 for DEU (13.04.98) © Sitsofe Wheeler
  2.  
  3. (set #deu-docs
  4.      (cat "\nWhere would you like to install the DEU documentation?"))
  5.  
  6. (set #deu-demo "\nInstall demo wads?")
  7.  
  8. (set #deu-nodemo
  9.      (cat "\nDue to space constraints, the demo wads and tutorial are in a"
  10.           " seperate archive. This archive is available from"
  11.           " <http://www.aber.ac.uk/~img4>."))
  12.  
  13. (set #deu-demo-help
  14.      (cat "\nDEU comes with some demomstration wads which you can look at"
  15.           " to help you understand how particular things are built. These"
  16.           " wads total about 600K in size."))
  17.  
  18. (set #deu-dir
  19.      (cat "Where do you wish to install DEU? "
  20.           "The directory 'DEU' will be created if it is not there. If a"
  21.           " copy of DEU is found it will be updated."))
  22.  
  23. (set #deu-fpu "Which version of DEU do you wish to install?")
  24.  
  25. (set #deu-fpu-help
  26.      (cat "\nIf your computer has an FPU (Floating Point Unit) then"
  27.           " installing the FPU version should yeild a slight speed increase."
  28.           " If you are not sure whether your computer has an FPU then install"
  29.           " the 68000 version."))
  30.  
  31. (set #deu-ini-update
  32.      (cat "\nDo you want to replace the existing DEU.ini?"))
  33.  
  34. (set #deu-nofpu
  35.      (cat "\nThe FPU version of DEU was not found in the archive. The 68000"
  36.           " version will be installed instead."))
  37.  
  38. (set #deu-tutor"\nInstall tutorial?")
  39.  
  40. (set #deu-tutor-help
  41.      (cat "\nThe tutorial is a sort of step-by-step instruction booklet to"
  42.           " creating a level from scratch. There is a documentation file along"
  43.           " with wads which the documentation refers to. It also contains"
  44.           " useful information on texture alignment."))
  45.  
  46. (set #deu-update
  47.      (cat "\nA copy of DEU has been found. Would you like to update it?"))
  48.  
  49. (set #deu-noupdate "\nDEU was not updated.")
  50.  
  51. (set #deu-wad
  52.      (cat "\nPlease select a main wad."))
  53.  
  54. (set #deu-wad-help
  55.      (cat "\nA main wad is a wad Doom uses to load all the original"
  56.           " textures etc. It can be recognised by checking if the first few"
  57.           " characters of the file are 'IWAD' (without the quotes).\n\n"
  58.           "The following are the most common main wads:\n"
  59.           " doom1.wad\n"
  60.           " doom.wad\n"
  61.           " doom2.wad\n"
  62.           " doomu.wad\n\n"
  63.           "It is worth noting that if you are using the shareware nain wad"
  64.           " (doom1.wad) you will be unable to save any wads you make with"
  65.           " DEU."))
  66.  
  67. (set #deu-nowad1
  68.      (cat "\nSorry, DEU will not work without a main wad.\n\nInstallation"
  69.           " Aborted."))
  70.  
  71. (set #deu-wad-warning2
  72.      (cat "\nYou will not be able to save your wads because you are using"
  73.           " the shareware wad. If you would like to save your wads BUY Doom."))
  74.  
  75. (set #deu-screen
  76.      (cat "\nPlease select a screenmode."))
  77.  
  78. (set #deu-screen-help
  79.      (cat "\nIf you are not sure which screenmode you want to use take a look"
  80.           " screenmode prefs. If the screenmode you would like to use is not"
  81.           " available, alter the deu.ini when the installation is finished."
  82.           " The selectable screen sizes are all 640x480."))
  83.  
  84. (set #deu-finished
  85.      (cat "\nInstallation successful.\n\n"
  86.           "The latest version of DEU can be found at"
  87.           " http://www.aber.ac.uk/~img4"
  88.           "\n\nHave a nice Doom!"))
  89.  
  90. (set #config1
  91.      (cat "#\n"
  92.         "#  Default DEU config file\n#\n"
  93.         "# Everything has been commented out, so this file does nothing.\n"
  94.         "# But you can customize it to suit your needs.\n\n"
  95.         "# Name of the main wad file.\n"))
  96.  
  97. (set #config2
  98.      (cat "# Name of the patch wads you want to load.\n"
  99.         "#file = raphael.wad\n"
  100.         "#file = brendon.wad\n\n"
  101.         "# Set this if you want debugging on by default.\n"
  102.         "#debug = true\n\n"
  103.         "# Set this if you want to swap the mouse buttons by default.\n"
  104.         "#swapbuttons = true\n\n"
  105.         "# Use this to control the the noises.\n"
  106.         "#quiet = true\n"
  107.         "#quieter = true\n\n"
  108.         "# Set this if you think you are a brain.\n"
  109.         "#expert = true\n\n"
  110.         "# Change the Screen mode (Amiga). Must be either decimal or 8 character hex.\n"))
  111.  
  112. (set #config3
  113.      (cat "screenwidth = 640\n"
  114.         "screenheight = 480\n\n"
  115.         "# Set this if you have an old mouse driver and you don't see the cursor.\n"
  116.         "#fakecursor = true\n\n"
  117.         "# Use this to hide the info bar (displayed by default).\n"
  118.         "#infobar = false\n\n"
  119.         "# Set this if you don't want to unselect all previously selected objects when\n"
  120.         "# you use the selection box (Shift-MouseButton1, Shift-M).\n"
  121.         "#addselbox = true\n\n"
  122.         "# Uncomment this if you don't like to have the object 0 selected when you\n"
  123.         "# switch from one editing mode to another.\n"
  124.         "#select0 = false\n\n"
  125.         "# If you are an expert in Binary Space Partitioning algorithms and you want\n"
  126.         "# to tweak the Nodes builder, then you can use the following parameter.\n"
  127.         "#splitfactor = 8\n\n"
  128.         "# Default textures and preferences.  You may want to change those values...\n"
  129.         "#walltexture = BROWNHUG\n"
  130.         "#uppertexture = REDWALL1\n"
  131.         "#lowertexture = COMPBLUE\n"
  132.         "#ceiltexture = F_SKY1\n"
  133.         "#floortexture = FLAT20\n"
  134.         "#ceilheight = 256\n"
  135.         "#floorheight = 0\n\n"
  136.         "# This has something to do with the funny message displayed when DEU starts...\n"
  137.         "#reminder1 = false\n"))
  138.  
  139. (set doom-def-dir (getenv "DOOMHOME"))
  140.  
  141. (complete 0)
  142.  
  143. (set deu-wad
  144.         (askfile
  145.                 (default (tackon doom-def-dir "doom.wad"))
  146.                 (prompt  #deu-wad)
  147.                 (help    #deu-wad-help)
  148.         )
  149. )
  150.  
  151. (if (<> (exists deu-wad) 1)
  152.         (abort #deu-nowad1)
  153. )
  154.  
  155. ;**************************************************
  156. ;Warn user if they do not have a registered wad...
  157. ;**************************************************
  158. (if (< (getsize deu-wad) 5000000)
  159.         (message #deu-wad-warning2)
  160. )
  161.  
  162.  
  163. (set dest_dir
  164.         (askdir
  165.                 (default doom-def-dir)
  166.                 (prompt  #deu-dir)
  167.                 (help    @askdir-help)
  168.         )
  169. )
  170.  
  171. ;**********************************************
  172. ;Ask user whether they wish to install FPU DEU
  173. ;**********************************************
  174. (set deu-ver
  175.         (askchoice
  176.                 (choices "68000" "68000+FPU")
  177.                 (default 0)
  178.                 (prompt  #deu-fpu)
  179.                 (help    #deu-fpu-help)
  180.         )
  181. )
  182.  
  183. (if (= (exists ("DEU_FPU")) 0)
  184.     (if (= deu-ver 1)
  185.          (
  186.          (message (#deu-nofpu))
  187.          (set deu-ver 0)
  188.          )
  189.     )
  190. )
  191.  
  192. ;**************************************
  193. ;Check if deu directory already exists
  194. ;**************************************
  195. (set deu-update 2)
  196. (if (exists (tackon dest_dir "DEU"))
  197.         (set deu-update 
  198.                (askbool (prompt #deu-update)
  199.                         (help #deu-update)
  200.                )
  201.         )
  202.         (makedir (tackon dest_dir "DEU"))
  203. )
  204.  
  205. (if (= 0 deu-update)
  206.         (exit #deu-noupdate (quiet))
  207. )
  208.  
  209. (if (<> 1 (exists(tackon dest_dir "DEU")))
  210.     (set dest_dir (tackon dest_dir "DEU"))
  211. )
  212.  
  213. (copyfiles  (source "/deu")
  214.             (dest dest_dir)
  215.             (pattern "(deu.guide|deu.txt|readme.1st|wad_auth.txt)")
  216.             (files)
  217.             (infos)
  218. )
  219.  
  220. (complete 25)
  221.  
  222. (select deu-ver
  223.         (copyfiles      (source "DEU")
  224.                         (dest dest_dir)
  225.         )
  226.         (copyfiles      (source "DEU_FPU")
  227.                         (newname "DEU")
  228.                         (dest dest_dir)
  229.         )
  230. )
  231.  
  232. (copyfiles  (source "DEU_go") (dest dest_dir))
  233. (copyfiles  (source "deumwb.info") (newname "DEU_go.info") (dest dest_dir))
  234.  
  235. (complete 50)
  236.  
  237. ;***************************************************************
  238. ;Check to see whether the archive contains demo and tutor files
  239. ;***************************************************************
  240. (if (exists("demo"))
  241. (
  242. (set deu-demo
  243.         (askbool
  244.         (prompt   #deu-demo)
  245.         (help     #deu-demo-help)
  246.         )
  247. )
  248.  
  249. (if deu-demo
  250.         (copyfiles  (source "demo")
  251.                     (dest (tackon dest_dir "demo"))
  252.                     (all)
  253.         )
  254. )
  255.  
  256. (complete 70)
  257.  
  258. (set deu-tutor
  259.         (askbool
  260.         (prompt   #deu-tutor)
  261.         (help     #deu-tutor-help)
  262.         )
  263. )
  264.  
  265. (if deu-tutor
  266.         (copyfiles  (source "tutor")
  267.                     (dest (tackon dest_dir "tutor"))
  268.                     (all)
  269.         )
  270. )
  271. )
  272. (message #deu-nodemo)
  273. )
  274.  
  275. (complete 80)
  276.  
  277. ;*********************************************************
  278. ;Does the user which to replace an existing deu.ini file?
  279. ;*********************************************************
  280. (set deu-new-ini 1)
  281. (if (= 1 deu-update)
  282.         (set deu-new-ini
  283.         (askbool (prompt #deu-ini-update)
  284.                  (help   #deu-ini-update)
  285.         ))
  286. )
  287. (if (= 0 deu-new-ini)
  288.         (
  289.         (complete 100)
  290.         (exit #deu-finished (quiet))
  291.         )
  292. )
  293.  
  294. (set deu-screen
  295.         (askchoice
  296.                 (choices "PAL:High Res Laced" "NTSC:High Res Laced" "Cybervision64")
  297.                 (default 0)
  298.                 (prompt  #deu-screen)
  299.                 (help    #deu-screen-help)
  300.         )
  301. )
  302.  
  303. (set #configA (cat "main = "deu-wad"\n\n"))
  304.  
  305. (select deu-screen
  306.         (set #configB (cat "# PAL: High Res Laced\nscreenmode = 0x00029004\n\n"))
  307.         (set #configB (cat "# NTSC: High Res Laced\nscreenmode = 0x00019004\n\n"))
  308.         (set #configB (cat "# Cybervision64\nscreenmode = 0x40120001\n\n"))
  309. )
  310.  
  311. ;******************
  312. ;Make deu.ini file
  313. ;******************
  314. (textfile
  315.         (prompt  #deu-screen)
  316.         (dest    (tackon dest_dir "deu.ini"))
  317.         (append  #config1 #configA #config2 #configB #config3)
  318. )
  319.  
  320. (complete 100)
  321.  
  322. (exit #deu-finished (quiet))
  323.