home *** CD-ROM | disk | FTP | other *** search
- ; $VER: NetMail_Install 1.2 (1.10.95)
- ; Copyright 1995 Riccardo Solmi.
-
-
- ; Make sure they are running 2.04 or greater
- (if (< (/ (getversion) 65536) 37)
- (abort "You must be using Kickstart 2.04 or higher to install and use NetMail.")
- )
-
- (if (exists "AmiTCP:" (noreq))
- (set netmail_dir "AmiTCP:")
- (set netmail_dir @default-dest)
- )
-
- (if (exists "ENV:NetMail/NetMailDir")
- (if (<> (getenv "NetMail/NetMailDir") (pathonly @icon))
- (set netmail_dir (getenv "NetMail/NetMailDir"))
- )
- )
-
- (set netmail_dir
- (askdir
- (prompt "Select a place for NetMail drawer")
- (help @askdir-help)
- (default netmail_dir)
- )
- )
-
- (if (= (exists (tackon netmail_dir "NetMail") (noreq)) 2)
- (
- (set netmail_dir (tackon netmail_dir "NetMail"))
- (set netmail_update 1)
- )
- (if (= (exists (tackon netmail_dir "NetMail") (noreq)) 1)
- (set netmail_update 1)
- (
- (set netmail_dir (tackon netmail_dir "NetMail"))
- (set netmail_update 0)
- (makedir netmail_dir
- (prompt "Creating NetMail application directory")
- (infos)
- )
- )
- )
- )
-
- (set @default-dest netmail_dir)
-
- (if netmail_update
- (
- (set newver (getversion "NetMail"))
- (set oldver (getversion (tackon @default-dest "NetMail")))
- (if (> newver oldver)
- (message (cat "An older version of NetMail is already installed in " @default-dest))
- (if (< newver oldver)
- (message (cat "A newer version of NetMail is already installed in " @default-dest))
- (if (askchoice
- (prompt "The latest version of NetMail is already installed")
- (help @askchoice-help)
- (choices "Install" "Remove")
- )
- (
- (message "Remove NetMail application")
- (makeassign "NetMail" @default-dest)
- (run "C:Delete NetMail:#? all")
- (makeassign "NetMail")
- (delete @default-dest (infos))
- (message "NetMail removed.")
- (exit (quiet))
- )
- )
- )
- )
- )
- (
- (copyfiles
- (prompt "Copying all files")
- (help @copyfiles-help)
- (source (pathonly @icon))
- (dest @default-dest)
- (infos)
- (all)
- )
- (delete (tackon @default-dest "Install") (infos))
- (delete (tackon @default-dest "Readme") (infos))
- (exit)
- )
- )
-
- (makedir (tackon @default-dest "Attachments"))
- (makedir (tackon @default-dest "C"))
- (makedir (tackon @default-dest "Messages"))
- (makedir (tackon @default-dest "Drivers") (infos))
- (makedir (tackon @default-dest "Macros") (infos))
- (makedir (tackon @default-dest "Signatures") (infos))
-
- (copyfiles
- (prompt "Copying all Icons")
- (help @copyfiles-help)
- (source "Icons")
- (dest (tackon @default-dest "Icons"))
- (infos)
- (all)
- )
-
- (copyfiles
- (prompt "Copying documantation")
- (help @copyfiles-help)
- (source "Help")
- (dest (tackon @default-dest "Help"))
- (infos)
- (all)
- )
-
- (foreach "Drivers" "#?"
- (copylib
- (prompt "Copying Drivers")
- (help @copylib-help)
- (source (tackon "Drivers" @each-name))
- (dest (tackon @default-dest "Drivers"))
- (infos)
- )
- )
-
- (foreach "C" "#?"
- (copylib
- (prompt "Copying support programs")
- (help @copylib-help)
- (source (tackon "C" @each-name))
- (dest (tackon @default-dest "C"))
- (infos)
- )
- )
-
- (copylib
- (prompt "Copying NetMail program")
- (help @copylib-help)
- (source "NetMail")
- (dest @default-dest)
- (infos)
- )
-
- (exit)
-