home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 3 / MA_Cover_3.iso / amigadoom / doomattack / install < prev   
Encoding:
Text File  |  1998-01-08  |  5.0 KB  |  223 lines

  1. (set #MSG_NOHELP "No help available. Sorry ...")
  2.  
  3. ;file muß gesetzt sein
  4. (procedure P_NOICONPOS
  5.     (
  6.         (set #iconname (tackon #doomdir #file))
  7.         (if (= 1 (exists (cat #iconname ".info")))
  8.             (run ("c/noiconpos \"%s\"" #iconname)
  9.                 (prompt ("Correcting position of icon of \"%s\"" #iconname))
  10.                 (help #MSG_NOHELP)
  11.                 (confirm)
  12.             )
  13.         )
  14.     )
  15. )
  16.  
  17.  
  18.  
  19. (set #doomdir
  20.     (expandpath
  21.         (askdir
  22.             (prompt "Where is the DOOM directory (the one containing the WAD file?)")
  23.             (help #MSG_NOHELP)
  24.             (default "ram:")
  25.         )
  26.     )
  27. )
  28.  
  29.  
  30. (set #cpu 0)
  31.  
  32. (if (patmatch "FPU040" (database "fpu"))
  33.     (set #cpu 1)
  34.     (if (patmatch "(68040|68060)" (database "cpu"))
  35.         (set #cpu 1)
  36.     )
  37. )
  38.         
  39. (set #cpu
  40.     (askchoice
  41.         (prompt "Which version do you want to install?")
  42.         (choices "68030" "68040/68060 (untested)")
  43.         (default #cpu)
  44.         (help #MSG_NOHELP)
  45.     )
  46. )
  47.  
  48. (if (= #cpu 0)
  49.     (set #exe "DoomAttack")
  50.     (set #exe "DoomAttack.040")
  51. )
  52.  
  53. (copyfiles
  54.     (prompt "Copying executable")
  55.     (source #exe)
  56.     (newname "DoomAttack")
  57.     (dest #doomdir)
  58.     (help #MSG_NOHELP)
  59.     (confirm)
  60. )
  61.  
  62. (copyfiles
  63.     (prompt "Copying icon for executable")
  64.     (source (cat #exe ".info"))
  65.     (newname "DoomAttack.info")
  66.     (dest #doomdir)
  67.     (help #MSG_NOHELP)
  68.     (confirm)
  69. )
  70.  
  71. (if (<> 2 (exists (tackon #doomdir "c" (noreq))))
  72.     (
  73.         (makedir (tackon #doomdir "c")
  74.             (prompt ("Creating command directory in \"%s\"" #doomdir))
  75.             (help #MSG_NOHELP)
  76.             (confirm)
  77.         )
  78.     )
  79. )
  80.  
  81. (if (<> 2 (exists (tackon #doomdir "c2p" (noreq))))
  82.     (
  83.         (makedir (tackon #doomdir "c2p")
  84.             (prompt ("Creating directory for chunky2planar routine(s) in \"%s\"" #doomdir))
  85.             (help #MSG_NOHELP)
  86.             (confirm)
  87.         )
  88.     )
  89. )
  90.  
  91. (copyfiles
  92.     (prompt "Copying chunky2planar routine")
  93.     (source "c2p/c2p")
  94.     (dest (tackon #doomdir "c2p"))
  95.     (help #MSG_NOHELP)
  96.     (confirm)
  97. )
  98.  
  99. (copyfiles
  100.     (prompt "Copying readme file")
  101.     (source "")
  102.     (choices "DoomAttack.readme" "DoomAttack.readme.info")
  103.     (dest #doomdir)
  104.     (help #MSG_NOHELP)
  105.     (confirm)
  106. )
  107.  
  108. (set #text1 "SetPatch >NIL:\n\nmakedir ram:env\nassign ENV: ram:env\nassign ENVARC: sys:prefs/env-archive\nmakedir ram:t\nassign T: ram:t\n\n")
  109. (set #text2 "C:List >NIL: DEVS:Monitors/~(#?.info|VGAOnly) TO T:M LFORMAT \"DEVS:Monitors/%s\"\nExecute T:M\nC:Delete >NIL: T:M\n\n")
  110. (set #text3 ("setenv DOOMHOME \"%s\"\ncd \"%s\"\nstack 150000\naddbuffers \"\" 200\n\n" #doomdir #doomdir))
  111. (set #text4 "DoomAttack\n\n")
  112.  
  113. (textfile
  114.     (prompt "Creating DoomAttack_Start script")
  115.     (help #MSG_NOHELP)
  116.     (dest "T:DoomAttack_Start")
  117.     (append #text1 #text2 #text3 #text4)
  118.     (safe)
  119. )
  120.  
  121. (protect "T:DoomAttack_Start" "+s")
  122.  
  123. (copyfiles
  124.     (prompt "Copying start script to \"S:\"\n\nIt allows you to boot without startup-sequence and start DoomAttack by simply typing \"S:DoomAttack_Start\".")
  125.     (source "T:DoomAttack_Start")
  126.     (dest "S:")
  127.     (confirm)
  128.     (help #MSG_NOHELP)
  129. )
  130.  
  131. (if (= 1 (askbool
  132.             (prompt "Do you want the DOOMHOME environment variable to be set in the user-startup? If you select \"No\" then everytime you want to start DoomAttack from Workbench you first have to double-click the \"DoomAttack_ClickMe\" icon!")
  133.             (default 1)
  134.             (help #MSG_NOHELP)
  135.          )
  136.     )
  137.     (
  138.         (startup "DoomAttack"
  139.             (prompt "Changing user-startup")
  140.             (command ("setenv DOOMHOME \"%s\"" #doomdir))
  141.             (help #MSG_NOHELP)
  142.         )
  143.     )
  144.     (
  145.         (copyfiles
  146.             (prompt "Copying \"DoomAttack_ClickMe\". When double-clicked, the environment variable DOOMHOME will be set, which must be done before starting DoomAttack from Workbench.")
  147.             (source "")
  148.             (choices "DoomAttack_ClickMe" "DoomAttack_ClickMe.info")
  149.             (dest #doomdir)
  150.             (confirm)
  151.             (help #MSG_NOHELP)
  152.         )
  153.     )
  154. )
  155.  
  156. (if (= 1 (askbool
  157.             (prompt "Do you want the \"DoomAttack_BootStart\" utility to be installed? It allows you to start DoomAttack 'with no startup-sequence' by simply double-clicking the icon and resetting the computer.")
  158.             (help #MSG_NOHELP)
  159.             (default 1)
  160.         )
  161.     )
  162.     (
  163.         (copyfiles
  164.             (prompt "Copying \"DoomAttack_BootStart\"")
  165.             (source "")
  166.             (choices "DoomAttack_BootStart" "DoomAttack_BootStart.info")
  167.             (dest #doomdir)
  168.             (help #MSG_NOHELP)
  169.             (confirm)
  170.         )
  171.  
  172.         (copyfiles
  173.             (prompt "Copying small utility needed by \"DoomAttack_BootStart\"")
  174.             (source "c/KillLastChar")
  175.             (dest (tackon #doomdir "c"))
  176.             (help #MSG_NOHELP)
  177.             (confirm)
  178.         )
  179.         
  180.         (if (<> 2 (exists (tackon #doomdir "dosdrivers")))
  181.             (makedir (tackon #doomdir "dosdrivers")
  182.                 (prompt "Creating directory for DoomRAD mountlist file needed by \"DoomAttack_BootStart\"")
  183.                 (help #MSG_NOHELP)
  184.                 (confirm)
  185.             )
  186.         )
  187.         
  188.         (copyfiles
  189.             (prompt "Copying mountlist for DOOMRAD (needed by \"DoomAttack_BootStart\")")
  190.             (source "dosdrivers/DoomRAD")
  191.             (dest (tackon #doomdir "dosdrivers"))
  192.             (confirm)
  193.             (help #MSG_NOHELP)
  194.         )
  195.     )
  196. )
  197.  
  198. (if (= 1 (askbool
  199.             (prompt "Do you want the position of the icons to be corrected (unsnapshot)?")
  200.             (default 1)
  201.             (help #MSG_NOHELP)
  202.          )
  203.      )
  204.     (
  205.          (set #file "DoomAttack")
  206.          (P_NOICONPOS)
  207.          
  208.          (set #file "DoomAttack.readme")
  209.          (P_NOICONPOS)
  210.          
  211.          (set #file "DoomAttack_ClickMe")
  212.          (P_NOICONPOS)
  213.          
  214.          (set #file "DoomAttack_BootStart")
  215.          (P_NOICONPOS)
  216.          
  217.     )
  218. )
  219.  
  220. (exit "Installation done"
  221.     (quiet)
  222. )
  223.