home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / on-line / httx / install-awebhttxplugin < prev   
Encoding:
Text File  |  1999-11-01  |  4.5 KB  |  176 lines

  1. ; $VER: Install HTTX for aweb 3.3 (1.11.99)
  2. ; 17 Oct 1999 WHMP - 1 Nov 1999 Gabriele Favrin
  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.x 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.x 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.   (files)
  97.   (pattern "#?")
  98.   (prompt #installing "HTTX")
  99. )
  100.  
  101. (copyfiles
  102.   (source "httx/extras/aweb")
  103.   (dest "AWeb3:Plugins/HTTX")
  104.   (files)
  105.   (pattern "#?")
  106.   (prompt #installing "HTTX")
  107. )
  108.  
  109. (protect "AWeb3:Plugins/HTTX/httxplugin.awebrx" "+s")
  110. (protect "AWeb3:Plugins/HTTX/httxplugincfg.awebrx" "+s")
  111. (protect "AWeb3:Plugins/HTTX/httxpluginprt.awebrx" "+s")
  112. (protect "AWeb3:Plugins/HTTX/httxpluginCP.awebrx" "+s")
  113.  
  114. (delete "AWeb3:Plugins/httx/#?.prefs" )
  115. (delete "AWeb3:Plugins/httx/HTTXPlugin.config" )
  116. (if(not(bitand 2 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.eng.html")  )
  117. (if(not(bitand 1 httxdoc) )    (delete "AWeb3:Plugins/HTTX/HTTX.doc.ita.html")  )
  118.  
  119. ; Adjust the AWeb.prefs file to use HTTX
  120.  
  121.  
  122. (addpref "gui"
  123.   (cat
  124.        "UBUT HTTXRun AWebPath:Plugins/HTTX/HTTXPlugincp.awebrx*N"
  125.        "PUPF 3Save as textRUN AWebPath:Plugins/HTTX/HTTXPlugin.awebrx TARGET %i*N"
  126.        "PUPF 3Print as textRUN AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx TARGET %i*N"
  127.        "AREX 1;AWebPath:Plugins/HTTX/HTTXPlugin.awebrx;Save As Text (HTTX)*N"
  128.        "AREX 2;AWebPath:Plugins/HTTX/HTTXPluginPrt.awebrx;Print As Text (HTTX)*N"
  129.        "AREX 3;AWebPath:Plugins/HTTX/HTTXPluginCfg.awebrx;HTTX Configuration*N"
  130.        "AREX 4;AWebPath:Plugins/HTTX/HTTXPlugincp.awebrx;HTTX Control Panel"
  131.   )
  132. )
  133. (copylib
  134.   (source "httx/extras/awnpipe/awnpipe-handler")
  135.   (dest "l:")
  136.   (prompt #installing "AWNPipe handler")
  137. )
  138.  
  139.   (copyfiles
  140.     (dest "Devs:dosdrivers")
  141.     (source "httx/extras/awnpipe/awnpipe")
  142.     (prompt #installing "AWNPipe dosdriver")
  143.     (infos)
  144.   )
  145.   (run "C:Assign AWNPipe: dismount")
  146.   (run "C:Mount AWNPipe:")
  147.  
  148.  
  149.  
  150. (if (= @user-level 2)
  151.   ( bumprev "env:aweb3"
  152.     (cat "Your previous ACTIVE AWeb 3.x configuration"
  153.     " is in this directory.")
  154.   ) ;backup any active prefs
  155. )
  156.  
  157. (delete "env:aweb3/#?" (all))
  158.  
  159.  
  160. (copyfiles
  161.   (source "ENVARC:AWeb3")
  162.   (dest "ENV:AWeb3")
  163.   (all)
  164. )
  165.  
  166.  
  167. (complete 100)
  168. (set @default-dest "AWeb3:plugins")
  169.  
  170.  
  171. (exit  "\n\n" @app-name
  172.   " is now installed.\n\n"
  173.   "If this is an update instalation be sure to check your GUI and/or ARexx menu"
  174. " settings for duplicate entries.")
  175.  
  176.