home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games 1996 January
/
amigagames-cdrom-1996-01.iso
/
archive
/
userbox
/
publicdomain
/
vchk718.lzx
/
Virus_Checker
/
Install_Virus_Checker
next >
Wrap
Text File
|
2015-06-19
|
12KB
|
443 lines
; $VER: Virus_Checker Install 7.18 (26.9.95)
; Script to install Virus_Checker
; Written by Simon Dick of Amigaholics Club (sidick@essex.ac.uk)
; Updated and enhanced by John Veldthuis
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Get the version and revision number of file/device/library/OS/etc
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS: Item ; Name of device/file/library/etc. "" for OS version
;
; OUTPUTS: VerN ; (long) version/revision number
; Ver ; Version number
; Rev ; Revision number
; NOTE: Both Ver and Rev returned as 0 if "WV_Item" does not exist
;
(procedure WhatVersion
(
(if (= VerN "")
(set VerNum (getversion)) ; For OS
(set VerNum (getversion VerN))) ; For other "files"
(set Ver (/ VerNum 65536))
(set Rev (- VerNum (* Ver 65536)))
)
)
;Set env var Virus_Checker_Path to installed place
(procedure setVCEnv
(
(set VCPath (expandpath @default-dest))
(set VCPathS (cat
("setenv Virus_Checker_Path \"%s\"\n" VCPath)
("copy env:Virus_Checker_Path envarc: quiet\n")
)
)
(textfile
(dest "T:VCEnvSet")
(append VCPathS)
)
(execute "T:VCEnvSet")
(delete "T:VCEnvSet")
)
)
(set @app-name "Virus_Checker")
(complete 0)
;(if (= @language "deutsch")
; (
; ; Add the german strings here for example
; (set where_vc "Please put the german strings in here first!"
; )
; )
;)
(if (= @language "english")
(
(set whatinstall (cat "Do you want a full installation of Virus Checker "
"or just a partial one?"
)
)
(set fullinstall "Full Install")
(set partialinstall "Partial Install")
(set installhelp (cat "Full install installs ALL Virus Checker files to "
"the directory chosen, while partial install just installs the "
"program files where needed"
)
)
(set where_vc (cat "Please select directory to put Virus_Checker in"
)
)
(set copyingdir "Copying Virus_Checker drawer")
(set copybblib "Copying Bootblock.library")
(set copybbfile "Copying Bootblock.brainfile")
(set copyunpacklib "Copying unpack.library")
(set copyxfdlib "Copying xfdmaster.library")
(set copyxfddecrs "Copying XFD external decrunchers, please choose which ones to install")
(set copyvcbrain "Copying VirusChecker.brain")
(set copyvcprog "Copying Virus_Checker")
(set instaloverold "Virus_Checker being installed in WBStartup over old version")
(set vcrunfrom "Where do you want to run Virus_Checker from?")
(set bestplace "The best place is from the User-Startup")
(set cantinstalloverdir "You can't install Virus Checker over an existing directory")
(set removebrain (cat "I have found version %ld.%ld of the VirusChecker.brain "
"file in L:\n"
"This is only needed if you're running Virus_Checker "
"from WBStartup.\n"
"Shall I delete it?"
)
)
(set deletebrain "Deleting L:VirusChecker.brain")
(set installguide "Do you want to install the online AmigaGuide help file?")
(set copyingguide "Copying Virus_Checker.guide")
(set whichlangs (cat "Which Virus Checker locale catalogs do you want "
"to install?")
)
(set langhelp (cat "Copying these files will allow Virus_Checker to be "
"run using different Locales under Workbench 2.1 or "
"higher. Just select the catalog files which you "
"will need to use.")
)
(set adddat "I need to add the following line to your \s:User-Startup\ file\n\n%s")
(set copycat "Copying Virus_Checker.catalog")
(set needtoreset "You will need to reset to cause VirusChecker to be run")
(set instlrexx "Do you want to install the Virus Checker ARexx scripts?")
(set copyrexx "Which ARexx scripts do you want to copy?")
)
)
(welcome)
(set VerN "")
(WhatVersion) ;Get version
(if (< Ver 37)
(abort (cat #ver_err1 #err_msg))
)
;If installed already then use that one
(if (= (exists "ENV:Virus_Checker_Path" (noreq)) 1)
(set @default-dest (getenv "Virus_Checker_Path"))
)
(set fullinstall (askbool (default 1)
(prompt whatinstall)
(help installhelp)
(choices fullinstall partialinstall)
)
)
(if fullinstall
(
(set @default-dest
(askdir (prompt where_vc)
(help @askdir-help)
(default @default-dest)
)
)
(complete 10)
; Copy Virus_Checker drawer
(copylib (prompt copyingdir)
(help @copylib-help)
(source "Virus_Checker")
(dest @default-dest)
(infos)
(optional oknodelete force)
)
(copylib (prompt copyingdir)
(help @copylib-help)
(source "VirusChecker.brain")
(dest @default-dest)
(optional oknodelete askuser)
)
(copylib (prompt copyingdir)
(help @copylib-help)
(source "Virus_Checker.guide")
(dest @default-dest)
(infos)
(optional nofail askuser)
)
(copyfiles (prompt copyingdir)
(help @copyfiles-help)
(source "NZ_VC.bsh")
(dest @default-dest)
(optional nofail askuser)
)
(copylib (prompt copyingdir)
(help @copylib-help)
(source "MakeKey")
(dest @default-dest)
(infos)
(optional nofail askuser)
)
)
; If partial install
(
(debug "")
)
)
(complete 20)
; Install libraries
(copylib (prompt copybblib)
(help @copylib-help)
(source "libs/Bootblock.library")
(dest "LIBS:")
(optional nofail askuser)
)
(complete 30)
(copylib (prompt copybbfile)
(help @copylib-help)
(source "l/Bootblock.brainfile")
(dest "L:")
(optional nofail askuser)
)
(complete 40)
(copylib (prompt copyunpacklib)
(help @copylib-help)
(source "libs/unpack.library")
(dest "LIBS:")
(optional nofail askuser)
)
(complete 50)
(copylib (prompt copyxfdlib)
(help @copylib-help)
(source "libs/xfdmaster.library")
(dest "LIBS:")
(optional nofail askuser)
)
(complete 60)
(copyfiles (prompt copyxfddecrs)
(help @copyfiles-help)
(source "libs/xfd")
(dest "LIBS:xfd")
(optional nofail askuser)
(confirm)
(all)
)
(complete 70)
; Check if brainfile is in L:
(set brainfile (exists "L:VirusChecker.brain"))
(set wherestart (exists "SYS:WBStartup/Virus_Checker"))
(if (= wherestart 0)
(set wherestart (askchoice (prompt vcrunfrom)
(help bestplace)
(default 0)
(choices "User-Startup" "WBStartup" "None")
)
)
(
(if (= wherestart 1)
(message instaloverold)
(abort cantinstalloverdir)
)
)
)
(if (= wherestart 0)
(
(if (= fullinstall 0)
(
(if (exists (tackon @default-dest "Utilities"))
(set @default-dest (tackon @default-dest "Utilities"))
(if (exists "SYS:Utilities")
(set @default-dest (expandpath "SYS:Utilities"))
)
)
(set @default-dest (askdir (prompt "")
(help @askdir-help)
(default @default-dest)
)
)
(copylib (prompt copyvcprog)
(help @copylib-help)
(source "Virus_Checker")
(dest @default-dest)
(infos)
(optional oknodelete force)
)
(copylib (prompt copyvcbrain)
(help @copylib-help)
(source "VirusChecker.brain")
(dest @default-dest)
(optional nofail askuser)
)
)
)
)
)
(if (= wherestart 1)
(
(copylib (prompt copyvcbrain)
(help @copylib-help)
(source "VirusChecker.brain")
(dest "L:")
(optional nofail askuser)
)
(copylib (prompt copyvcprog)
(set @default-dest "SYS:WBStartup")
(help @copylib-help)
(source "Virus_Checker")
(dest "SYS:WBStartup")
(optional oknodelete force)
(infos)
)
)
(
(if (= brainfile 1)
(
(set VerN "L:VirusChecker.brain")
(WhatVersion) ;Get version
(set rembrain (askbool (prompt (removebrain Ver Rev))
(help @askbool-help)
(default 1)
)
)
(if (= rembrain 1)
(delete ("L:VirusChecker.brain")
(optional force)
)
)
)
)
(if (= wherestartup 0) ; User-Startup
(
(set cmd (tackon @default-dest "Virus_Checker"))
(startup @app-name (prompt (adddat cmd))
(help @startup-help)
(command cmd)
)
)
)
)
)
(complete 80)
(if (askbool (prompt installguide)
(help @askbool-help)
(default 1)
)
(
(copylib (prompt copyingguide)
(help @copylib-help)
(source "Virus_Checker.guide")
(dest "HELP:")
; (dest (cat "HELP:" @language)) Later
(optional nofail force)
)
)
)
(complete 90)
(set localever (/ (getversion "locale.library" (resident)) 65536))
;(if (>= (/ (getversion "locale.library" (resident)) 65536) 38))
(if (>= localever 38)
(
(set locales (askoptions (prompt whichlangs)
(help langhelp)
(choices "nederlands"
"svenska"
"italiano"
"deutsch"
)
)
)
)
)
(if (IN locales 0)
(
(copylib (prompt copycat)
(help @copylib-help)
(source "catalogs/nederlands/Virus_Checker.catalog")
(dest "LOCALE:Catalogs/nederlands")
(optional nofail askuser)
)
)
)
(if (IN locales 1)
(
(copylib (prompt copycat)
(help @copylib-help)
(source "catalogs/svenska/Virus_Checker.catalog")
(dest "LOCALE:Catalogs/svenska")
(optional nofail askuser)
)
)
)
(if (IN locales 2)
(
(copylib (prompt copycat)
(help @copylib-help)
(source "catalogs/italiano/Virus_Checker.catalog")
(dest "LOCALE:Catalogs/italiano")
(optional nofail askuser)
)
)
)
(if (IN locales 3)
(
(copylib (prompt copycat)
(help @copylib-help)
(source "catalogs/deutsch/Virus_Checker.catalog")
(dest "LOCALE:Catalogs/deutsch")
(optional nofail askuser)
)
)
)
(set installrexx (askbool (prompt instlrexx)
(help @askbool-help)
(default 1)
)
)
(if installrexx
(copyfiles (prompt copyrexx)
(help @copyfiles-help)
(source "ARexx")
(dest "REXX:")
(all)
(optional nofail askuser)
(confirm)
)
)
(setVCEnv)
(complete 100)
(if (= wherestartup 2)
(exit)
(exit needtoreset)
)