home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 25 / amigaformatcd25.iso / websites / amidoom / doomattack.lzx / DoomAttack / Install < prev    next >
Text File  |  2003-11-02  |  5KB  |  231 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 (= "68060" (database "cpu"))
  33.     (set #cpu 2)
  34.     (
  35.         (if (patmatch "FPU040" (database "fpu"))
  36.             (set #cpu 1)
  37.             (if (patmatch "(68040|68060)" (database "cpu"))
  38.                 (set #cpu 1)
  39.             )
  40.         )
  41.     )
  42. )
  43.         
  44. (set #cpu
  45.     (askchoice
  46.         (prompt "Which version do you want to install?")
  47.         (choices "68030" "68040 (untested)" "68060 (untested)")
  48.         (default #cpu)
  49.         (help #MSG_NOHELP)
  50.     )
  51. )
  52.  
  53. (if (= #cpu 0)
  54.     (set #exe "DoomAttack")
  55.     (if (= #cpu 1)
  56.         (set #exe "DoomAttack.040")
  57.         (set #exe "DoomAttack.060")
  58.     )
  59. )
  60.  
  61. (copyfiles
  62.     (prompt "Copying executable")
  63.     (source #exe)
  64.     (newname "DoomAttack")
  65.     (dest #doomdir)
  66.     (help #MSG_NOHELP)
  67.     (confirm)
  68. )
  69.  
  70. (copyfiles
  71.     (prompt "Copying icon for executable")
  72.     (source (cat #exe ".info"))
  73.     (newname "DoomAttack.info")
  74.     (dest #doomdir)
  75.     (help #MSG_NOHELP)
  76.     (confirm)
  77. )
  78.  
  79. (if (<> 2 (exists (tackon #doomdir "c" (noreq))))
  80.     (
  81.         (makedir (tackon #doomdir "c")
  82.             (prompt ("Creating command directory in \"%s\"" #doomdir))
  83.             (help #MSG_NOHELP)
  84.             (confirm)
  85.         )
  86.     )
  87. )
  88.  
  89. (if (<> 2 (exists (tackon #doomdir "c2p" (noreq))))
  90.     (
  91.         (makedir (tackon #doomdir "c2p")
  92.             (prompt ("Creating directory for chunky2planar routine(s) in \"%s\"" #doomdir))
  93.             (help #MSG_NOHELP)
  94.             (confirm)
  95.         )
  96.     )
  97. )
  98.  
  99. (copyfiles
  100.     (prompt "Copying chunky2planar routine")
  101.     (source "c2p/c2p")
  102.     (dest (tackon #doomdir "c2p"))
  103.     (help #MSG_NOHELP)
  104.     (confirm)
  105. )
  106.  
  107. (copyfiles
  108.     (prompt "Copying readme file")
  109.     (source "")
  110.     (choices "DoomAttack.readme" "DoomAttack.readme.info")
  111.     (dest #doomdir)
  112.     (help #MSG_NOHELP)
  113.     (confirm)
  114. )
  115.  
  116. (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")
  117. (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")
  118. (set #text3 ("setenv DOOMHOME \"%s\"\ncd \"%s\"\nstack 150000\naddbuffers \"\" 200\n\n" #doomdir #doomdir))
  119. (set #text4 "DoomAttack\n\n")
  120.  
  121. (textfile
  122.     (prompt "Creating DoomAttack_Start script")
  123.     (help #MSG_NOHELP)
  124.     (dest "T:DoomAttack_Start")
  125.     (append #text1 #text2 #text3 #text4)
  126.     (safe)
  127. )
  128.  
  129. (protect "T:DoomAttack_Start" "+s")
  130.  
  131. (copyfiles
  132.     (prompt "Copying start script to \"S:\"\n\nIt allows you to boot without startup-sequence and start DoomAttack by simply typing \"S:DoomAttack_Start\".")
  133.     (source "T:DoomAttack_Start")
  134.     (dest "S:")
  135.     (confirm)
  136.     (help #MSG_NOHELP)
  137. )
  138.  
  139. (if (= 1 (askbool
  140.             (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!")
  141.             (default 1)
  142.             (help #MSG_NOHELP)
  143.          )
  144.     )
  145.     (
  146.         (startup "DoomAttack"
  147.             (prompt "Changing user-startup")
  148.             (command ("setenv DOOMHOME \"%s\"" #doomdir))
  149.             (help #MSG_NOHELP)
  150.         )
  151.     )
  152.     (
  153.         (copyfiles
  154.             (prompt "Copying \"DoomAttack_ClickMe\". When double-clicked, the environment variable DOOMHOME will be set, which must be done before starting DoomAttack from Workbench.")
  155.             (source "")
  156.             (choices "DoomAttack_ClickMe" "DoomAttack_ClickMe.info")
  157.             (dest #doomdir)
  158.             (confirm)
  159.             (help #MSG_NOHELP)
  160.         )
  161.     )
  162. )
  163.  
  164. (if (= 1 (askbool
  165.             (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.")
  166.             (help #MSG_NOHELP)
  167.             (default 1)
  168.         )
  169.     )
  170.     (
  171.         (copyfiles
  172.             (prompt "Copying \"DoomAttack_BootStart\"")
  173.             (source "")
  174.             (choices "DoomAttack_BootStart" "DoomAttack_BootStart.info")
  175.             (dest #doomdir)
  176.             (help #MSG_NOHELP)
  177.             (confirm)
  178.         )
  179.  
  180.         (copyfiles
  181.             (prompt "Copying small utility needed by \"DoomAttack_BootStart\"")
  182.             (source "c/KillLastChar")
  183.             (dest (tackon #doomdir "c"))
  184.             (help #MSG_NOHELP)
  185.             (confirm)
  186.         )
  187.         
  188.         (if (<> 2 (exists (tackon #doomdir "dosdrivers")))
  189.             (makedir (tackon #doomdir "dosdrivers")
  190.                 (prompt "Creating directory for DoomRAD mountlist file needed by \"DoomAttack_BootStart\"")
  191.                 (help #MSG_NOHELP)
  192.                 (confirm)
  193.             )
  194.         )
  195.         
  196.         (copyfiles
  197.             (prompt "Copying mountlist for DOOMRAD (needed by \"DoomAttack_BootStart\")")
  198.             (source "dosdrivers/DoomRAD")
  199.             (dest (tackon #doomdir "dosdrivers"))
  200.             (confirm)
  201.             (help #MSG_NOHELP)
  202.         )
  203.     )
  204. )
  205.  
  206. (if (= 1 (askbool
  207.             (prompt "Do you want the position of the icons to be corrected (unsnapshot)?")
  208.             (default 1)
  209.             (help #MSG_NOHELP)
  210.          )
  211.      )
  212.     (
  213.          (set #file "DoomAttack")
  214.          (P_NOICONPOS)
  215.          
  216.          (set #file "DoomAttack.readme")
  217.          (P_NOICONPOS)
  218.          
  219.          (set #file "DoomAttack_ClickMe")
  220.          (P_NOICONPOS)
  221.          
  222.          (set #file "DoomAttack_BootStart")
  223.          (P_NOICONPOS)
  224.          
  225.     )
  226. )
  227.  
  228. (exit "Installation done"
  229.     (quiet)
  230. )
  231.