home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 6
/
AACD06.ISO
/
AACD
/
Online
/
NewsRogUpd
/
Update_1.8
< prev
next >
Wrap
Text File
|
1999-10-14
|
16KB
|
459 lines
;;----------------------------------------------------------------------------
;;
;; Update-1.8 - NewsRog 1.x -> 1.8 update script
;;
;; Copyright © 1998 ShadowWorks Software, All Right reserved.
;;
;; Use following Icon tooltypes / Command line options:
;; APPNAME=NewsRog
;; MINUSER=AVERAGE
;;----------------------------------------------------------------------------
;;-- declare procedures ------------------------------------------------------
(procedure P_NRExists testdir
(and (exists (tackon testdir "NewsRog"))
(exists (tackon testdir "MUI/S5697_NNews.mcc"))
(exists (tackon testdir "MUI/S5697_AppBase.mcc"))
(exists (tackon testdir "MUI/S5697_NPost.mcc"))))
(procedure P_Abort abtmsg
(transcript abtmsg)
(abort abtmsg))
;;-- initialization ----------------------------------------------------------
(complete 0)
(set locale 0)
(set @default-dest "RAM:")
(set @app-name "NewsRog")
;;------------------------------ english messages ----------------------------
(if (not (= @language "english"))
(P_Abort #halted))
(if (= @language "english")
(
(set #welcome (cat "Welcome to the " @app-name " 1.x->1.8 Update "
"process."))
(set #bad-MUI (cat "You need at least MUI 3.8 to use " @app-name))
(set #bad-OS (cat "You need at least OS 3.0 to use " @app-name
"2.0."))
(set #bad-NewsRog (cat "You must have " @app-name " 1.0-1.4b installed "
"to use this update script."))
(set #dir-choice (cat "Select the directory where " @app-name
" is currently installed."))
(set #copy (cat "Copying " @app-name "..."))
(set #copy-edit (cat "Copying TextEditor class..."))
(set #reinst-prompt (cat "The " @app-name " directory was last "
"installed in %s. Do you wish to update "
"NewsRog in this location?"))
(set #shutdown-prompt (cat "If NewsRog is running, it must be stopped "
"before this update. Continue?"))
(set #badarch (cat "Bad archive. File paths and empty directories "
"must be preserved when unarchiving: "))
(set #nopd (cat "This script only updates the commercial "
"version of NewsRog."))
(set #halted (cat "Installation halted."))
(set #badabpatch (cat "A shared library patch could not be "
"installed. Make sure that a valid "
"commercial version of NewsRog has been "
"properly installed before applying this "
"patch."))
(set #badabcksum (cat "The file S5697_AppBase.mcc has an improper "
"checksum. Please contact ShadowWorks "
"Software technical support for assistance "
"after verifying that you have correctly "
"installed the commercial version of "
"NewsRog from it's original archive using "
"the supplied installer script."))
))
;=============================================================================
; Installation procedure
;=============================================================================
; -- check for existance of MUI: ---------------------------------------------
(welcome #welcome)
(if (< (exists "MUI:") 2)
(P_Abort #bad-MUI))
(if (< (getversion "exec.library" (resident)) 2555904)
(P_Abort #bad-OS))
(if (not (askbool (prompt #shutdown-prompt)
(help @askbool-help)
(default 1)))
(P_Abort #halted))
; -- check for proper archive ------------------------------------------------
(set scriptdir (pathonly @icon))
(set #n 0)
(while (set thisfile (select #n
"MUI/S5697_NPost.mcc"
"MUI/S5697_NPostList.mcc"
"MUI/S5697_NTCPList.mcc"
"MUI/S5697_NTCP.mcc"
"MUI/S5697_NServerList.mcc"
"MUI/S5697_NServer.mcc"
"MUI/S5697_NNews.mcc"
"MUI/S5697_NArticleMgr.mcc"
"MUI/S5697_NGroup.mcc"
"MUI/S5697_NGroupList.mcc"
"MUI/S5697_NArticleView.mcc"
"MUI/S5697_NArticle.mcc"
"MUI/S5697_NDF_TextStyles.mcc"
"MUI/S5697_NDF_ScrollHdrs.mcc"
"MUI/S5697_NDF_Rewrap.mcc"
"MUI/S5697_NDF_HideSig.mcc"
"MUI/S5697_NDF_HideHeader.mcc"
"MUI/S5697_NDF_EmpHeader.mcc"
"MUI/S5697_NDF_HLPatt.mcc"
"MUI/S5697_NDF_MIME.mcc"
"MUI/S5697_NDF_EMail.mcc"
"MUI/S5697_NDF_URL.mcc"
"MUI/S5697_NDF_UUDecode.mcc"
"MUI/S5697_NDF_Substitute.mcc"
"MUI/S5697_NDF_CharMap.mcc"
"MUI/S5697_NSF_New.mcc"
"MUI/S5697_FileActs.mcc"
"MUI/S5697_DTImg.mcc"
"MUI/S5697_CText.mcc"
"MUI/S5697_AttrVal4.mcc"
"MUI/S5697_NHdrList.mcc"
"MUI/S5697_VarList.mcc"
"MUI/S5697_ListCol.mcc"
"MUI/S5697_ListSearch.mcc"
"MUI/S5697_NSFList.mcc"
"MUI/S5697_Classlist.mcc"
"MUI/S5697_NSF_AgeRange.mcc"
"MUI/S5697_NSF_SizeRange.mcc"
"MUI/S5697_NSF_HeaderMatch.mcc"
"MUI/S5697_NSF_MatchThread.mcc"
"MUI/S5697_NSF_MatchThreadBase.mcc"
"MUI/S5697_NSF_InGroup.mcc"
"MUI/S5697_NDF_TrimSpace.mcc"
"MUI/S5697_NDF_ROT13.mcc"
"MUI/S5697_NDF_HLQuotes.mcc"
"MUI/S5697_NAF_Decode.mcc"
"MUI/S5697_Support.library"
"Distrib/S5697_AppBase.1.0.pch"
"Distrib/S5697_AppBase.1.2.pch"
"Distrib/S5697_AppBase.1.4.pch"
"Distrib/S5697_AppBase.1.5.pch"
"Docs/English/NR-Reference.html"
"Docs/English/NR-Tutorial.html"
"Docs/English/NR-Req.html"
"Docs/English/NR-FAQ.html"
"Docs/English/NR-Credits.html"
"Docs/English/NR-History.html"
"Docs/English/Reference/NR-Ref-CmdLine.html"
"Docs/English/Reference/NR-Ref-MIME.html"
"Docs/English/Reference/NR-Ref-Spoilers.html"
"Docs/English/Reference/NR-Ref-PostRate.html"
"Docs/English/Reference/NR-Ref-Kbd.html"
"Docs/English/Reference/NR-Ref-ARexx.html"
"Docs/English/Reference/NR-Ref-HideSig.html"
"Docs/English/Reference/NR-Ref-HLPatt.html"
"Docs/English/Reference/NR-Ref-HLQuotes.html"
"Docs/English/Reference/NR-Ref-HideHeader.html"
"Docs/English/Reference/NR-Ref-EmpHeader.html"
"Docs/English/Reference/NR-Ref-SaveTxt.html"
"Docs/English/Reference/NR-Ref-Decode.html"
"Docs/English/Reference/NR-Ref-ActFlt.html"
"Docs/English/Reference/NR-Ref-DspFlt.html"
"Docs/English/Reference/NR-Ref-SelFlt.html"
"Docs/English/Reference/NR-Ref-Vars.html"
"Docs/English/Reference/NR-Ref-UUDecode.html"
"Docs/English/Reference/NR-Ref-TextStyles.html"
"Docs/English/Reference/NR-Ref-AgeRange.html"
"Docs/English/Reference/NR-Ref-MatchThreadBase.html"
"Docs/English/Reference/NR-Ref-LineRange.html"
"Docs/English/Reference/NR-Ref-ScrollHdrs.html"
"Docs/English/Reference/NR-Ref-Substitute.html"
"Docs/English/Reference/NR-Ref-ROT13.html"
"Docs/English/Reference/NR-Ref-Rewrap.html"
"Docs/English/Reference/NR-Ref-EMail.html"
"Docs/English/Reference/NR-Ref-URL.html"
"Docs/English/Reference/NR-Ref-CharMap.html"
"Docs/English/Tutorials/NR-Tut-InitConfig.html"
"Docs/English/Tutorials/NR-Tut-DspFlt.html"
"Docs/English/Tutorials/NR-Tut-MM.html"
"Docs/English/Tutorials/NR-Tut-Reading.html"
"Docs/English/Tutorials/NR-Tut-News.html"
"Docs/English/Tutorials/NR-Tut-Com.html"
"Docs/English/Tutorials/NR-Tut-Group.html"
"Docs/English/Tutorials/NR-Tut-Posts.html"
"Docs/English/Tutorials/NR-Tut-Config.html"
"Docs/English/Tutorials/NR-Tut-Servers.html"
"Docs/English/Tutorials/NR-Tut-FAQMgr.html"
"Docs/English/Tutorials/NR-Tut-SelFlt.html"
"Docs/English/Tutorials/NR-Tut-Groups.html"
"Docs/English/Tutorials/NR-Tut-Web.html"
"Docs/English/Graphics/Window-SGList.GIF"
"Docs/English/Graphics/Window-GRead.GIF"
"Docs/English/Graphics/NR-Tut-Groups-WinNew.GIF"
"Docs/English/Graphics/Window-PostQueue.GIF"
"Docs/English/Graphics/Window-PostQueueS.GIF"
"Docs/English/Graphics/NR-Tut-SelFlt-GlobInfo.GIF"
"Docs/English/Graphics/NR-Tut-SelFlt-FltTabs.GIF"
"Docs/English/Graphics/NR-Tut-DspFlt-FltTabs.GIF"
"Docs/English/Graphics/NR-Tut-Posts-PopEdit.GIF"
"Docs/English/Graphics/NR-Tut-Web-MSel.GIF"
"Docs/English/Graphics/NR-Tut-DspFlt-GlobInfo.GIF"
"Docs/English/Graphics/NR-Tut-Group-Stats.GIF"
"Docs/English/Graphics/NR-Tut-Groups-Opts.GIF"
"Docs/English/Graphics/NR-Tut-Com-Icons.GIF"
"Docs/English/Graphics/NR-Ref-HideHeader-UI.GIF"
"Docs/English/Graphics/NR-Ref-EmpHeader-UI.GIF"
"Docs/English/Graphics/NR-Ref-EmpHeader-Ex2.GIF"
"Docs/English/Graphics/NR-Ref-Rewrap-UI.GIF"
"Docs/English/Graphics/NR-Ref-Rewrap-UI1.GIF"
"Docs/English/Graphics/NR-Ref-Rewrap-Ex3.GIF"
"Docs/English/Graphics/NR-Ref-Rewrap-Ex4.GIF"
"Docs/English/Graphics/NR-Ref-CharMap-UI.GIF"
"Docs/English/Graphics/NR-Ref-UUDecode-UI.GIF"
"Docs/English/Graphics/NR-Ref-AgeRange-UI.GIF"
"Docs/English/Graphics/NR-Ref-ScrollHdrs-UI.GIF"
"Docs/English/Graphics/NR-Ref-ScrollHdrs-Ex1.GIF"
"Docs/English/Graphics/NR-Ref-ScrollHdrs-Ex2.GIF"
"Docs/English/Graphics/NR-Ref-PostRate-UI.GIF"
"Docs/English/Graphics/NR-Ref-Spoilers-UI.GIF"
"Docs/English/Graphics/NR-Ref-Spoilers-Ex1.GIF"
"Docs/English/Graphics/NR-Ref-Spoilers-Ex2.GIF"
"Docs/English/Graphics/NR-Ref-SizeRange-UI.GIF"
"Docs/English/Graphics/NR-Ref-New-UI.GIF"
"Docs/English/Graphics/NR-Ref-EMail-UI.GIF"
"Docs/English/Graphics/NR-Ref-URL-UI.GIF"
"Docs/English/Graphics/NR-Ref-HLPatt-UI.GIF"
"Docs/English/Graphics/NR-Ref-HLPatt-Ex.GIF"
"Docs/English/Graphics/NR-Ref-Substitute-UI.GIF"
"Docs/English/Graphics/NR-Ref-SubjMatch-UI.GIF"
"Docs/English/Graphics/NR-Ref-Substitute-Ex1.GIF"
"Docs/English/Graphics/NR-Ref-Substitute-Ex2.GIF"
"Docs/English/Graphics/NR-Tut-HLight.GIF"
"Docs/English/Graphics/NR-Tut-Groups-Opts.GIF"
"Docs/English/Graphics/NR-Tut-Groups-BatchDL.GIF"
"Docs/English/Graphics/NR-Tut-Groups-BatchProg.GIF"
"Docs/English/Graphics/Button-FAQ.GIF"
"Docs/English/Graphics/Button-Remove.GIF"
"Docs/English/Graphics/Button-HLight.GIF"
"Docs/English/Graphics/Button-eb_Bold.GIF"
"Docs/English/Graphics/Button-eb_Copy.GIF"
"Docs/English/Graphics/Button-eb_Cut.GIF"
"Docs/English/Graphics/Button-eb_Insert.GIF"
"Docs/English/Graphics/Button-eb_Italic.GIF"
"Docs/English/Graphics/Button-eb_Paste.GIF"
"Docs/English/Graphics/Button-eb_Save.GIF"
"Docs/English/Graphics/Button-eb_Uline.GIF"
"Docs/English/Graphics/Button-eb_Undo.GIF"
"Docs/English/Graphics/Button-eb_EditMode.GIF"
"Docs/English/Graphics/Button-eb_EditModeVR.GIF"
"Docs/English/Graphics/Window-PostEdit.GIF"
"Docs/English/Graphics/Window-Grp-Remove.GIF"
"Docs/English/Graphics/Window-Grp-FFTB.GIF"
"Docs/English/Graphics/Window-Groups.GIF"
"Docs/English/Graphics/Window-Grp-ALSrch.GIF"
"Docs/English/Graphics/Window-Servers.GIF"
"Docs/English/Graphics/Window-FAQMgr.GIF"
"Docs/English/Graphics/Window-Cfg-FetchPr.GIF"
"Docs/English/Graphics/Window-Cfg-Hdrs.GIF"
"Docs/English/Graphics/Window-Cfg-Proj.GIF"
"Docs/English/Graphics/Window-Cfg-News.GIF"
"Docs/English/Graphics/Window-Cfg-ListCol.GIF"
"Docs/English/Graphics/Window-Cfg-Misc.GIF"
"Docs/English/Graphics/Window-Cfg-Win.GIF"
"Docs/English/Graphics/Window-Cfg-Post.GIF"
"Docs/English/Graphics/Window-Cfg-User.GIF"
"Docs/English/Graphics/Window-Cfg-SelFlt.GIF"
"Docs/English/Graphics/Window-Cfg-Vars.GIF"
"Docs/English/Graphics/NR-Tut-Group-Cfg-1.GIF"
"Docs/English/Graphics/NR-Tut-Group-Cfg-2.GIF"
"Docs/English/Graphics/NR-Tut-Group-Cfg-3.GIF"
"Docs/English/Graphics/Toolbar-B3.jpg"
"Objects/MMAction.Search-Deja"
"Objects/MMAction.Search-Google"
"Objects/MMAction.Search-Yahoo"
"TextEditor.mcc"
"TextEditor.mcp"
"Images/Filter/Bird.jpg"
"Images/Filter/Cached.jpg"
"Images/Filter/Earth.jpg"
"Images/Filter/MonitorEye.jpg"
"Images/Filter/New.jpg"
"Images/Filter/ROT13.jpg"
"Images/Filter/Speed.jpg"
"Images/IFF.Remove"
"Images/IFF.HLight"
"Images/IFF.FAQ"
"Images/IFF.eb_Bold"
"Images/IFF.eb_Copy"
"Images/IFF.eb_Cut"
"Images/IFF.eb_Insert"
"Images/IFF.eb_Italic"
"Images/IFF.eb_Paste"
"Images/IFF.eb_Save"
"Images/IFF.eb_Uline"
"Images/IFF.eb_Undo"
"Images/IFF.eb_Redo"
"Images/IFF.eb_Copy_G"
"Images/IFF.eb_Cut_G"
"Images/IFF.eb_Undo_G"
"Images/IFF.eb_Redo_G"
"Images/NRLogo.L.TC"
"Images/NRLogo.L.R8"
"Images/NRLogo.S.TC"
"Images/NRLogo.S.R8"
"Images/NRLogo.S.R4"
""))
((set #n (+ #n 1))
(if (not (exists (tackon scriptdir thisfile)))
(P_Abort (cat #badarch thisfile)))))
; -- select our install dir --------------------------------------------------
(set LastDir "")
(set NR-Dir "")
(if (exists "ENV:NewsRog/NR-Dir")
((set LastDir (getenv "NewsRog/NR-Dir"))
(if (not (exists (tackon LastDir "NewsRog/NewsRog")))
(set LastDir ""))))
(complete 10)
(if LastDir
(if (askbool (prompt (#reinst-prompt LastDir))
(help @askbool-help)
(default 1))
(set NR-Dir (tackon LastDir "NewsRog"))))
(if (= NR-Dir "")
(set NR-Dir
(askdir (prompt #dir-choice)
(help "")
(default "SYS:Utilities")
(newpath))))
(set @default-dest NR-Dir)
(if (not (P_NRExists NR-Dir))
(set NR-Dir (tackon NR-Dir @app-name)))
; -- check for NewsRog installation ------------------------------------------
(if (not (P_NRExists NR-Dir))
(P_Abort #bad-NewsRog))
(set @default-dest NR-Dir)
(if (or (not (exists (tackon NR-Dir "NewsRog.key"))))
(P_Abort #nopd))
(complete 20)
(set @default-dest NR-Dir)
; -- flush libs from memory --------------------------------------------------
(run (tackon NR-Dir "C/FlushLibs"))
; -- patch the old versions of AppBase.mcc -----------------------------------
(set absum (getsum (tackon NR-Dir "MUI/S5697_AppBase.mcc")))
(set abpatch "")
(if (= absum 1002760635) (set abpatch "Distrib/S5697_AppBase.1.0.pch"))
(if (= absum -1629425022) (set abpatch "Distrib/S5697_AppBase.1.2.pch"))
(if (= absum -216674447) (set abpatch "Distrib/S5697_AppBase.1.4.pch"))
(if (= absum -216543375) (set abpatch "Distrib/S5697_AppBase.1.5.pch"))
(if (not (= abpatch ""))
((if (<> (run (cat "C/spatch " "-ot:NR1.8TMP \"-p"
(tackon scriptdir abpatch)
"\" " (tackon NR-Dir "MUI/S5697_AppBase.mcc")))
0)
(P_Abort #badabpatch))
(copyfiles (prompt #copy) (help @copyfiles-help)
(source "t:NR1.8TMP")
(dest (tackon NR-Dir "MUI")) (newname "S5697_AppBase.mcc"))
(delete "t:NR1.8TMP")))
(if (not (= (getsum (tackon NR-Dir "MUI/S5697_AppBase.mcc")) -1896684850))
(P_Abort #badabcksum))
; -- copy the new files ------------------------------------------------------
(copyfiles
(prompt #copy) (help @copyfiles-help)
(infos)
(source scriptdir) (dest NR-Dir)
(choices "NewsRog" "MUI" "Readme_1.8.txt" "RegInfo" "Filters" "Docs" "Objects"))
(copyfiles
(prompt #copy) (help @copyfiles-help)
(infos)
(source scriptdir) (dest NR-Dir) (optional "nofail")
(choices "Images"))
(copylib
(prompt #copy-edit)
(help @copylib-help)
(source "TextEditor.mcc")
(dest "MUI:libs/mui"))
(copylib
(prompt #copy-edit)
(help @copylib-help)
(source "TextEditor.mcp")
(dest "MUI:libs/mui"))
(if (exists (tackon NR-Dir "MUI/TextEditor.mcc"))
(delete (tackon NR-Dir "MUI/TextEditor.mcc")))
; -- create missing ServerGroups directory -----------------------------------
(makedir (tackon NR-Dir "ServerGroups"))
; -- create filters directory ------------------------------------------------
(makedir (tackon NR-Dir "Filters"))
; -- move MUI environment ----------------------------------------------------
(if (exists "ENV:MUI/NEWSROG.1.prefs")
(rename "ENV:MUI/NEWSROG.1.prefs" "ENV:MUI/NEWSROG.prefs"))
(if (exists "ENVARC:MUI/NEWSROG.1.prefs")
(rename "ENVARC:MUI/NEWSROG.1.prefs" "ENVARC:MUI/NEWSROG.prefs"))
(complete 80)
(run (cat "run sys:utilities/multiview " (tackon NR-Dir "Readme_1.8.txt")))
; -- cleanup -----------------------------------------------------------------
(complete 100)
(exit)