home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 86 / af086sub.adf / UROUHACK / UROUHACK.lzx / UrouHack / Install next >
Text File  |  1996-05-07  |  5KB  |  190 lines

  1. ; Installer Script for UrouHack V1.7+
  2.  
  3. (set @options "")
  4. (set @commandline "")
  5.  
  6. (set whatchoice
  7.     (askchoice
  8.         (prompt "You can use this installation script either to install a new version or to change the preferences")
  9.         (help "Where´s the problem?")
  10.         (choices "Installing UrouHack"
  11.                  "Change preferences")
  12.         (default 0)
  13.     )
  14. )
  15. (set patchchoice
  16.     (askoptions
  17.         (prompt "What should be patched?")
  18.         (help "Where´s the problem?")
  19.         (choices "Patch frames"
  20.                  "Patch System gadgets (arrows, close etc.)")
  21.         (default 3)
  22.     )
  23. )
  24. (if (<> 0 (BITAND patchchoice 2))
  25.     (
  26.         (set instchoice
  27.             (askchoice
  28.                 (prompt "Which type of sysiimages do you want to use?")
  29.                 (help "Where´s the problem?")
  30.                 (choices "UrouHack      (my very own style)"
  31.                          "SysiHack      (the famous one 8))"
  32.                          "MWB Plain     (via Datatypes)"
  33.                          "XEN Gradient  (via Datatypes)")
  34.                 (default 3)
  35.             )
  36.         )
  37.         (if (= 0 instchoice)
  38.             (set @commandline "c:urouhack s:urouhack.config")
  39.         )
  40.         (if  (= 1 instchoice)
  41.             (set @commandline "c:urouhack s:urouhack.config SYSIHACK")
  42.         )
  43.         (if (= 2 instchoice)
  44.             (set @commandline "c:urouhack s:urouhack.config imgstyle=cleanmwb")
  45.         )
  46.         (if (= 3 instchoice)
  47.             (set @commandline "c:urouhack s:urouhack.config imgstyle=xengradient")
  48.         )
  49.     )
  50.     (set @commandline "c:urouhack s:urouhack.config NOSYSI")
  51. )
  52.  
  53. (if (<> 0 (BITAND patchchoice 1))
  54.     (
  55.         (set framechoice
  56.             (askchoice
  57.                 (prompt "Which type of frames do you want?")
  58.                 (help "Where´s the problem?")
  59.                 (choices "XEN Style       (like MUI)"
  60.                          "XWindows Style  (like Motif)")
  61.                 (default 0)
  62.             )
  63.         )
  64.         (if (= 1 framechoice) (set @options " XWIN"))
  65.     )
  66.     (set @options " NOFRAME")
  67. )
  68. (set windowchoice
  69.     (askchoice
  70.         (prompt "Which type of windowborders do you want?\n")
  71.         (help "Where´s the problem?")
  72.         (choices "Very thin"
  73.                  "Thin"
  74.                  "Thin      (normal titlesize)"
  75.                  "Normal    (HippoPlayer compatible)")
  76.         (default 1)
  77.     )
  78. )
  79. (set scrollerchoice
  80.     (askchoice
  81.         (prompt "Which scrollersizes do you want?")
  82.         (help "Where´s the problem?")
  83.         (choices "11 point  (PAL/NTSC)"
  84.                  "14 point  (DBLNTSC)"
  85.                  "15 point  (DBLPAL)"
  86.                  "18 point  (800x600)"
  87.                  "Normal")
  88.         (default 1)
  89.     )
  90. )
  91. (if (= 0 scrollerchoice)
  92.     (set @options (cat @options " SBOTTOM=11"))
  93. )
  94. (if (= 2 scrollerchoice)
  95.     (set @options (cat @options " SBOTTOM=15"))
  96. )
  97. (if (= 3 scrollerchoice)
  98.     (set @options (cat @options " SBOTTOM=18"))
  99. )
  100. (if (= 0 scrollerchoice)
  101.     (set @options (cat @options " SBOTTOM=11"))
  102. )
  103. (if (= 0 windowchoice)
  104.     (set @options (cat @options " WTOP=2 WBOTTOM=2 WLEFT=2 WRIGHT=2"))
  105. )
  106. (if (= 2 windowchoice)
  107.     (set @options (cat @options " WTOP=2"))
  108. )
  109. (if (= 3 windowchoice)
  110.     (set @options (cat @options " WTOP=2 WBOTTOM=2 WLEFT=4 WRIGHT=4"))
  111. )
  112. (set @commandline (cat @commandline @options))
  113. (if (= 0 whatchoice)
  114.     (
  115.         (if (= (exists "s:urouhack") 0)
  116.             (makedir "s:urouhack")
  117.         )
  118.         (if (= (exists "s:urouhack/cleanmwb") 0)
  119.             (if (= 2 instchoice)
  120.                 (copyfiles
  121.                     (optional nofail force)
  122.                     (prompt "Installing Images")
  123.                     (help   "Where´s the problem?")
  124.                     (source "s/urouhack/cleanmwb")
  125.                     (dest   "s:urouhack/cleanmwb")
  126.                     (all)
  127.                 )
  128.             )
  129.         )
  130.         (if (= (exists "s:urouhack/xengradient") 0)
  131.             (if (= 3 instchoice)
  132.                 (copyfiles
  133.                     (optional nofail force)
  134.                     (prompt "Installing Images")
  135.                     (help   "Where´s the problem?")
  136.                     (source "s/urouhack/xengradient")
  137.                     (dest   "s:urouhack/xengradient")
  138.                     (all)
  139.                 )
  140.             )
  141.         )
  142.         (copyfiles
  143.             (prompt "Installing UrouHack")
  144.             (help   "Where´s the problem?")
  145.             (source "urouhack")
  146.             (dest   "c:")
  147.         )
  148.         (if (= (exists "s:urouhack") 0)
  149.             (copyfiles
  150.                 (prompt "Installing default Config")
  151.                 (help   "Where´s the problem?")
  152.                 (source "urouhack.config")
  153.                 (dest   "s:")
  154.             )
  155.         )
  156.         (if (NOT (run "C:Search s:startup-sequence #?urouhack#? PATTERN QUIET"))
  157.             (
  158.                 (run ("c/ModifyStartUp \"#?urouhack#?\" \"%s\" REPLACE" @commandline))
  159.                 (exit "Urouhack was already found in the startup-sequence. The new settings are now written, and the new version was copied.")
  160.             )
  161.         )
  162.         (if (NOT (run "C:Search s:startup-sequence #?AddDataTypes#? PATTERN QUIET"))
  163.             (
  164.                 (run ("c/ModifyStartUp #?AddDataTypes#? \"%s\" AFTER" @commandline))
  165.                 (exit "Have fun with this nice piece of software. Please consult the manual for setting up the screenlistfile.")
  166.             )
  167.             (
  168.                 (if (NOT (run "C:Search s:startup-sequence #?SetPatcht#? PATTERN QUIET"))
  169.                     (
  170.                     (run ("c/ModifyStartUp \"#?SetPatch#?\" \"%s\" AFTER" @commandline))
  171.                     (run ("c/ModifyStartUp \"#?SetPatch#?\" \"Assign ENV: ENVARC:\" AFTER"))
  172.                     (exit "Could not find AddDataTypes in startup-sequence. UrouHack could not work correctly! Please consult the manual for resolving problems and setting up a screenlistfile.")
  173.                     )
  174.                 )
  175.             )
  176.         )
  177.         (exit "Please install UrouHack manually in your startup-sequence. It seems you´re not using a standard sequence.")
  178.     )
  179.     (
  180.         (if (NOT (run "C:Search s:startup-sequence #?urouhack#? PATTERN QUIET"))
  181.             (
  182.                 (run ("c/ModifyStartUp \"#?urouhack#?\" \"%s\" REPLACE" @commandline))
  183.                 (exit "Urouhack was found in the startup-sequence. The new settings are now written.")
  184.             )
  185.             (exit "Please install UrouHack first on your system. Could not find it in s:startup-sequence.")
  186.         )
  187.     )
  188. )
  189.  
  190.