home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Magazine / AWeb / HTTX / Install-HTTX < prev    next >
Text File  |  1999-10-17  |  4KB  |  166 lines

  1. ; $VER: Install httx for aweb 1.2 17.10.99
  2. ; 17 Oct 1999 WHMP
  3. ; Description: Installer script for AWeb-II 3.x extras
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14.  
  15. ; offer to back up a file or drawer
  16. (procedure bumprev #bumpfile #bumptxt
  17.   (if (exists #bumpfile)
  18.     (
  19.       (set bump 1)
  20.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  21.       (if
  22.         (askbool
  23.           (default 1)
  24.           (prompt (cat "\n\n\nBackup " #bumpfile " as "
  25.               #bumpfile "_old" bump " ?\n\n\n "
  26.           #bumptxt ) )
  27.           (help
  28.             (cat "\n\n\n\"" #bumpfile "\" is about to be over written.\n"
  29.               "\nYou are being given the chance to back it up."
  30.               " If you are unsure select yes... just in case ;-D ."
  31.             )
  32.           )
  33.         )
  34.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  35.         ( (set bdest (cat #bumpfile "_old" bump))
  36.           (copyfiles
  37.             (source #bumpfile)
  38.             (dest bdest)
  39.             (all)
  40.           )
  41.         )
  42.       )
  43.     )
  44.   )
  45. )
  46.  
  47. ;add a line to a settings file
  48.  
  49. (procedure addpref #preffile #preftext
  50.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  51.     (
  52.       (if (= @each-type 2)
  53.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  54.       )
  55.     )
  56.   )
  57.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  58. )
  59.  
  60. (set #no-aweb-ii
  61.   (cat "You must have completed the AWeb-II 3.1 installation before "
  62.     "you can install the %s plug-in. No AWeb3: assign has been found."
  63.   )
  64. )
  65. (if (not (exists "AWeb3:" (noreq)))
  66.   (abort (#no-aweb-ii "Utilities"))
  67. )
  68.  
  69. (set @default-dest "AWeb3:")
  70. (bumprev "envarc:aweb3"
  71.   (cat "Your previously SAVED AWeb 3.1 configuration"
  72.   " is in this directory.")
  73. ) ; backup any previous AWeb3 prefs
  74.  
  75. (makedir "AWeb3:Plugins/HTTX" (infos))
  76. (set httxdoc
  77.   (askoptions
  78.     (prompt
  79.       "\n\nQuale documentazione di HTTX installo?"
  80.       "\n Install which HTTX documentation ?"
  81.     )
  82.     (help #httx-doc-help)
  83.             (choices "documentazione italiana"
  84.               "English documentation"
  85.             )
  86.     (default 2)
  87.   )
  88. )
  89.  
  90.  
  91.  
  92.  
  93. (copyfiles
  94.   (source "httx")
  95.   (dest "AWeb3:Plugins/HTTX")
  96.   (all)
  97.   (prompt #installing "HTTX")
  98. )
  99. (protect "AWeb3:Plugins/HTTX/httxplugin.awebrx" "+s")
  100. (protect "AWeb3:Plugins/HTTX/httxplugincfg.awebrx" "+s")
  101. (protect "AWeb3:Plugins/HTTX/httxpluginprt.awebrx" "+s")
  102. (protect "AWeb3:Plugins/HTTX/httxpluginCP.awebrx" "+s")
  103.  
  104. (delete "AWeb3:Plugins/httx/#?.prefs" )
  105. (delete "AWeb3:Plugins/httx/HTTXPlugin.config" )
  106. (if(not(bitand 2 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.eng.html")  )
  107. (if(not(bitand 1 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.ita.html")  )
  108.  
  109. ; Adjust the AWeb.prefs file to use HTTX
  110.  
  111.  
  112. (addpref "gui"
  113.   (cat
  114.             "UBUT HTTXRun AWebPath:Plugins/HTTX/HTTXPlugincp.awebrx*N"
  115.             "PUPF 3Save as textRUN AWebPath:Plugins/HTTX/HTTXPlugin.awebrx TARGET %i*N"
  116.             "PUPF 3Print as textRUN AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx TARGET %i*N"
  117.             "AREX 1;AWebPath:Plugins/HTTX/HTTXPlugin.awebrx;Save As Text (HTTX)*N"
  118.             "AREX 2;AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx;Print As Text (HTTX)*N"
  119.             "AREX 3;AWebPath:Plugins/HTTX/HTTXPluginCfg.awebrx;HTTX Configuration*N"
  120.             "AREX 4;AWebPath:Plugins/HTTX/HTTXPlugincp.awebrx;HTTX Control Panel"
  121.   )
  122. )
  123. (copylib
  124.   (source "awnpipe-handler")
  125.   (dest "l:")
  126.   (prompt #installing "AWNPipe-handler")
  127. )
  128.  
  129.   (copyfiles
  130.     (dest "Devs:dosdrivers")
  131.     (source "awnpipe")
  132.     (prompt #installing "AWebNews Pipe:")
  133.     (infos)
  134.   )
  135.             (run "C:assign AWNPipe: dismount")
  136.             (run "C:mount AWNPipe:")
  137.  
  138.  
  139.  
  140. (if (= @user-level 2)
  141.   ( bumprev "env:aweb3"
  142.     (cat "Your previous ACTIVE AWeb 3.1 configuration"
  143.     " is in this directory.")
  144.   ) ;backup any active prefs
  145. )
  146.  
  147. (delete "env:aweb3/#?" (all))
  148.  
  149.  
  150. (copyfiles
  151.   (source "ENVARC:AWeb3")
  152.   (dest "ENV:AWeb3")
  153.   (all)
  154. )
  155.  
  156.  
  157. (complete 100)
  158. (set @default-dest "AWeb3:plugins")
  159.  
  160.  
  161. (exit  "\n\n" @app-name
  162.   " is now installed.\n\n"
  163.   "If this is an update instalation be sure to check your GUI and/or ARexx menu"
  164. " settings for duplicate entries.")
  165.  
  166.