;**
;** Install_AEMail - AEMail installation script for Installer
;**
;** Copyright (c) 1996 John F. Zacharias
;**                    All rights reserved.
;**
;** This script has been tested with Installer 43.3 which is included with
;** this archive:
;**
;**     Installer and Installer project icon
;**     (c) Copyright 1995-96 Escom AG.  All Rights Reserved.
;**     Reproduced and distributed under license from Escom AG.
;**
;**     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
;**     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
;**     OR RESPONSIBILITY IS ASSUMED.
;**
;** Use following Icon tooltypes / Command line options:
;** APPNAME=AEMail
;** MINUSER=NOVICE
;**
;**
;** Installer script modified on 09/29/96 to install with any TCP/IP stack

(set
 ;;
 ;; The source directory name
 ;;
 source-dir (if (= 1 (exists @icon))
		    (pathonly (expandpath @icon))
		    (expandpath @icon)))

(set version_3_0 39)

(set aem-vernum (getversion (tackon source-dir "AEMail")))
(set
    aem-vernew (/ aem-vernum 65536)
    aem-revnew (- aem-vernum (* aem-vernew 65536)))

(set exec-version (/ (getversion) 65536))
(set avail-mem (+ (database "total-mem")))
(set system-cpu (database "cpu"))

(set full-aem-name "AEMail Beta Version 1.10")

(set
    aem-name "AEMail"
    aem-assign (cat aem-name ":")
    aem-Termite 0
    )

(if (= 1 (exists "ENV:TermiteTCP.prefs" (noreq)))
         (set aem-Termite 1)
         (set aem-Termite 0))

(if (= 1 (exists "ENV:AEMail_Dir" (noreq)))
    (set @default-dest (getenv ("AEMail_Dir"))))

(if (= "AEMail" (fileonly @default-dest))
    (set @default-dest (pathonly @default-dest)))

(if (= 2 (exists "AMITCP:bin" (noreq)))
    (set aem-have-AMITCP 1)
    (set aem-have-AMITCP 0))

(set
 ;;
 ;; The default destinations
 ;;
    aem-change-name 0

    atcp-dir (if (= 2 (exists "AMITCP:" (noreq)))
        (expandpath "AMITCP:")
        (@default-dest))

    aem-default-dest (if (= 2 (exists "AMITCP:bin" (noreq)))
        (tackon atcp-dir "bin")
        (atcp-dir))

    aem-dft-maildir (if (= 2 (exists aem-assign (noreq)))
        (pathonly(getassign aem-name))
        (atcp-dir))

    aem-mail-name (if (= 2 (exists aem-assign (noreq)))
        (fileonly(getassign aem-name))
        (""))
  )


(if (<> "" aem-mail-name)
    (if (<> "AEMail_Mail" aem-mail-name)
        ((set
            aem-change-name
                (askbool
                    (prompt "Your AEMAIL: assignment is for:\n\n"
                            (getassign aem-name) "\n\n"
                            "This directory is not named \"AEMail_Mail\"\n\n"
                            "Do you want to change the directory's name to "
                            "\"AEMail_Mail\" and use it as your AEMAIL: directory?")
                    (help   "This install script automatically uses an AEMAIL: "
                            "assignment name of \"AEMail_Mail\".  If you reply NO "
                            "to this request your existing AEMAIL: directory "
                            "will NOT be used as your mail directory\n")
                    (default 1))))))

(if (= 1 aem-change-name)

    ((rename (tackon aem-dft-maildir aem-mail-name)
            (tackon aem-dft-maildir "AEMail_Mail")
            (prompt "Relabeling AEMAIL: directory")
            (help   "Relabeling AEMAIL: directory"))
    (rename (tackon aem-dft-maildir ("%s.info" aem-mail-name))
            (tackon aem-dft-maildir "AEMail_Mail.info")
            (prompt "Relabeling AEMAIL: directory .info")
            (help   "Relabeling AEMAIL: directory .info")))
)

(if (< exec-version version_3_0)
    (tooltype
        (dest (tackon source-dir "AEMail.guide"))
        (setdefaulttool "AmigaGuide"))
    (tooltype
        (dest (tackon source-dir "AEMail.guide"))
        (setdefaulttool "MultiView")))
(set
    @default-dest (aem-default-dest)
    aem-mail-dir (aem-dft-maildir))

(if (= 2 @user-level)

    (set
    ;;
    ;; Sets up where to place AEMAIL program
    ;;
    @default-dest
        (askdir
            (prompt "Enter the drawer in which you want AEMail installed\n"
                    "If not AMITCP:bin, a drawer called AEMail will be created "
                    "if it does not already exist")
            (help   "If you are using AmiTCP, AEMail should be installed in "
                    "'AmiTCP:bin'\n\n"
                    "However, you may install it anywhere you like\n\n"
                    "If it is not 'AmiTCP:bin' a drawer called 'AEMail' "
                    "will be created.\n")
            (default aem-default-dest)
            (newpath))))

(if (= 1 aem-have-AMITCP)
    (if (<> @default-dest (expandpath "AMITCP:bin"))
        (set aem-have-AMITCP 0)))

(if (= "AEMail" (fileonly @default-dest))
    (set @default-dest (pathonly @default-dest)))

(if (= 0 aem-have-AMITCP)
    (set @default-dest (tackon @default-dest "AEMail")))

(if (= 0 (exists @default-dest (noreq)))
    ((makedir @default-dest (infos))
     (onerror (delete @default-dest
                (prompt "Deleting AEMail directory")
                (help "Deleting AEMail directory")
                (infos)))))

(if (= 1 (exists @default-dest (noreq)))
    (set @default-dest (pathonly @default-dest)))


(if (= 2 @user-level)

    (set
        aem-mail-dir
            (askdir
                (prompt "Enter the drawer in which you want your mail placed.  "
                    "A drawer called 'AEMail_Mail' will be created in this "
                    "drawer (if it does not already exist) and AEMAIL: will be "
                    "assigned to 'AEMail_Mail'")
                (help   "All of your mail and configuration files will be stored "
                    "in the 'AEMail_Mail' sub-directory of this drawer.  An assign "
                    "statement will be assigned to the 'AEMail_Mail' sub-directory to 'AEMAIL:' "
                    "and will be placed in your 'S:User-Startup' script.\n\n"
                    "The directory your specify here will be created if it does "
                    "not exist\b")
                (default aem-dft-maildir)
                (newpath))))

(set aem-mail-dir (tackon aem-mail-dir "AEMail_Mail"))

; Use ENV:PAGER program, Multiviewe, or copy "More" to RAM: for use

(set
 pager-cmd (if (exists "ENV:PAGER" (noreq)) (getenv "PAGER"))
 pager-cmd
    (if pager-cmd pager-cmd
        (if (= 1 (exists "SYS:Utilities/Multiview" (noreq)))
            ("SYS:Utilities/Multiview")
            ((copyfiles
	            (prompt "Copying " (tackon source-dir "c/More") " to RAM: for use")
	            (source (tackon source-dir "c/More"))
	            (dest   "RAM:")
	            (safe)
	            (optional "nofail"))
	            "RAM:More"))))

(copyfiles
    (prompt "Copying AEMAIL.readme to RAM:")
	(source (tackon source-dir "AEMail.readme"))
	(dest   "RAM:"))

(set
    aem-configure 0
    aem-interlace 0
    aem-options 3
    aem-username ""
    aem-password ""
    aem-realname ""
    aem-domain ""
    aem-popserver ""
    aem-smtpserver ""
    aem-editor ""
    aem-startnet ""
    aem-stopnet "")

(if (= 1 aem-Termite)
    ((set
        aem-tccp-addr (getenv "ttcp-email-address")
        aem-tccp-len (strlen aem-tccp-addr)
        aem-tccp-cnt 0)

     (while (<> aem-tccp-cnt aem-tccp-len)
            (if (= "@" (substr aem-tccp-addr aem-tccp-cnt 1))
                (set
                    aem-username
                        (substr aem-tccp-addr 0 aem-tccp-cnt)
                    aem-tccp-cnt (+ 1 aem-tccp-cnt)
                    aem-domain
                        (substr aem-tccp-addr aem-tccp-cnt))
                (set
                    aem-tccp-cnt (+ 1 aem-tccp-cnt))))))


(if (< 0 @user-level)
(if (<> 1 (exists "s:aemail.cnfg" (noreq)))
(set
    aem-configure
        (askbool
            (prompt "\nYou can configure AEMail now or you can wait until "
                    "AEMAIL is first loaded.  Do you want to configure now?\n")
            (help   "AEMAIL is configured either by Tool Types in it's icon "
                    "or by a configuration screen which is automatically "
                    "called up when you first execute AEMAIL if the Tool "
                    "Type parameters were not given.  By replying "
                    "'Yes, Configure Now' you will be setting the Tool Type "
                    "parameters\n")
            (choices "Yes, Configure Now" "No, Configure Later"))
    )
)
)

(if (= 1 aem-configure)
    ((set aem-interlace
        (askbool
            (prompt "\n\nDo you want to open AEMAIL on an interlaced screen?")
            (help   "Replying 'YES' will place the Tool Type 'INTERLACE=YES' "
                    "in your AEMAIL icon.  This will open AEMAIL on an "
                    "interlaced screen when it is executed.\n")))
    (message "\n\nWhen you signed up for your InterNet service you chose or "
         "were given a login name and password.  You will be prompted "
         "for these now, along with your real name.\n")

    (Set continue 0)

    (while
        (= continue 0)

        (set

        aem-username
            (askstring
                (prompt "\nEnter the login name you have been assigned by your "
                "InterNet Provider\n\n"
                "NOTE: Your provider may have allowed you to chose this login "
                "name.\n")
                (help "You must give your login name.  The login name consists "
                "of lowercase letters a-z and numbers.  Its recommended maximum "
                "length is 8 characters.\n\n"
                "Examples of acceptable login names are 'jzachar' and "
                "'an345'.")
                (default aem-username))

        aem-password
            (askstring
                (prompt "\n\nEnter the password you need to log into your "
                "InterNet Provider\n\n"
                "NOTE: Your provider may have assigned you your password"
                " or you were allowed to chose your own.\n")
                (help @askstring-help)
                (default aem-password))

        aem-realname
            (askstring
                (prompt "\n\nEnter your real name for "aem-username ":\n")
                (help "The real name can contain any characters except "
                "comma (','), colon (':') or bar ('|').")
                (default aem-realname))

        continue
            (askbool
                (prompt "\n\nIs the following information correct?\n\n"
                    "Login name: " aem-username "\n"
                    "Password: " aem-password "\n"
                    "Real name: " aem-realname "\n\n")
                (help "If you have made a mistake on any of the entries you "
                "can select \"No, Enter Again\" or, if eveything is all right, "
                "select \"Yes, Continue\"\n")
                (choices "Yes, Continue" "No, Enter Again"))
        )
    )

    (message "\n\nWe need to know something about your Internet provider and what "
        "the POP and SMTP Servers on your provider's machine are called.  "
        "You will be prompted for these names now.  If you have any "
        "questions as to what parameters to use, select 'help' "
        "or consult information provided by your Internet provider.")

    (Set continue 0)

    (while
        (= continue 0)

        (set

        aem-domain
            (askstring
                (prompt "\nEnter the domain name for your InterNet Provider\n\n")
                (help   "The domain name is the part of your e-mail address "
                        "that follows the '@' sign.  As an example, my email "
                        "address is\n\njzachar@calweb.com\n\nThe domain name "
                        "for my Internet provider is therefor 'calweb.com'.")
                (default aem-domain))

        aem-popserver
            (if (= "" aem-domain)
                ("")
                (if (= "" aem-popserver)
                    (cat "pop." aem-domain)
                    (aem-popserver)))

        aem-smtpserver
            (if (= "" aem-domain)
                ("")
                (if (= "" aem-smtpserver)
                    (cat "smtp." aem-domain)
                    (aem-smtpserver)))

        aem-popserver
            (askstring
                (prompt "\nEnter the name of your POP Server\n\n")
                (help   "POP stands for 'Post Office Protocol' and your "
                        "POP Server is the name assigned to the host "
                        "computer that holds your Internet mail.  Normally "
                        "this would be 'pop.' prepended to your Domain name. "
                        "Consult your Internet provider if the POP Server "
                        "is called something else and enter that name in "
                        "this string requester ")
                (default aem-popserver))

        aem-smtpserver
            (askstring
                (prompt "\nEnter the name of your SMTP Server\n")
                (help   "SMTP stands for 'Simple Mail Transfer Protocol' and "
                        "your SMTP server is the name assigned to the host "
                        "computer that receives your Internet mail.  Normally "
                        "this would be 'smtp.' prepended to your Domain name. "
                        "Consult your Internet provider if the SMTP Server "
                        "is called something else and enter that name in "
                        "this string requester ")
                (default aem-smtpserver))

        continue
            (askbool
                (prompt "Is the following information correct?\n\n"
                    "Domain name: " aem-domain "\n"
                    "POP Server Name: " aem-popserver "\n"
                    "SMTP Server Name: " aem-smtpserver "\n\n")
                (help "If you have made a mistake on any of the entries you "
                "can select \"No, Enter Again\" or, if eveything is all right, "
                "select \"Yes, Continue\"\n")
                (choices "Yes, Continue" "No, Enter Again"))
        )
    )

    (set
        aem-editor
            (askfile
                (prompt "Enter the Editor you want to use with AEMAIL.")
                (help   "AEMAIL requires an editor to prepare messages to "
                        "send.  After your select the editor from the file "
                        "requester you will be asked to enter parameter "
                        "information required by your editor.\n")
                (default "c:ed"))

        aem-editor
            (askstring
                (prompt "Add the parameters required for your editor.\n\n"
                        "You must always add '%s' to specify where your "
                        "mail file name goes.\n")
                (help   "You will need to add parmeters that may be "
                        "required by your editor.  One required parameter "
                        "required by ALL editors is '%s' to specify where "
                        "the mail file name goes.\n")
                (default (cat aem-editor " %s")))

        aem-edonwb
            (askbool
                (prompt "Does your editor have to open on the Workbench?"
                (help   "Some editors, like Commodores ED will always open "
                        "on the Workbench.  Others will open on their own "
                        "screen.  If your editor opens on the Workbench, "
                        "you must reply 'YES' to this request.\n")))

        aem-editor
            (if (= 1 aem-edonwb)
                (cat "WB;" aem-editor)
                ("%s" aem-editor))
    )
    (set aem-neednetscrpts 0)
    (if (= 2  @user-level)
        (if (= 1 aem-have-AMITCP)
            (set aem-neednetscrpts
                (askbool
                    (prompt "Is your StartNet and/or StopNet scripts other than\n\n"
                            "AmiTCP:bin/startnet\n"
                            "AmiTCP:bin/stopnet\n")
                    (help   "Only reply "YES" if your Start Net and Stop Net scripts "
                            "are not the standard AmiTCP scripts")))))

    (if (= 1 aem-neddnetscrpts)
        (set
          aem-startnet
            (askfile
                (prompt "Enter the Start Net script you want to use with AEMAIL.")
                (help   "If you are not using the standard AmiTCP startnet "
                        "script in AmiTCP:bin you will have to provide the "
                        "stript you are using.\n")
                (default (tackon(aem-default-dest "startnet"))))

          aem-stopnet
            (askfile
                (prompt "Enter the Stop Net script you want to use with AEMAIL.")
                (help   "If you are not using the standard AmiTCP stopnet "
                        "script in AmiTCP:bin you will have to provide the "
                        "stript you are using.\n")
                (default (tackon(aem-default-dest "stopnet"))))))

    (set aem-options
        (askoptions
            (prompt "Select those AEMAIL options you want AEMAIL to open with\n\n")
            (help @askoptions-help)
            (choices "Delete Mail from Server"
                 "Strip Duplicate Messages"
                 "Display Full Header"
                 "Include Header in Reply"
                 "Automatic Connection at Startup"
                 )
            (default 3))
    )))

(if (= 2 @user-level)
    (set aem-docs
        (askoptions
            (prompt "Select which AEMAIL documentation files you want copied\n\n")
            (help @askoptions-help)
            (choices "AEMAIL.readme"
                     "AEMAIL.doc"
                     "AEMAIL.guide"
                     )
            (default 7)))

    (set aem-docs 0))



(if (<> 0 aem-docs)
    (set
        aem-docs-dir
            (askdir
                (prompt "Which directory do you want the documentation files "
                        "copied to\n")
                (help   "You may select a different directory than your program "
                        "directory to copy the documentation files to.\n")
                (default @default-dest)))
    (set aem-docs-dir @default-dest)
)

(if (<> 2 (exists aem-mail-dir (noreq)))
    (makedir aem-mail-dir (infos)))

(copyfiles
    (prompt "Copying AEMail to " @default-dest)
	(source (tackon source-dir "AEMail"))
	(dest   @default-dest))

(copyfiles
    (prompt "Copying AEMail.info to " @default-dest)
	(source (tackon source-dir "AEMail.inf"))
	(newname "AEMail.info")
	(dest   @default-dest)
	(noposition))

(if (<> 0 aem-docs)(
    (if (BITAND aem-docs 1)
        (copyfiles
            (prompt "Copying AEMAIL.readme file to " aem-docs-dir)
	        (source (tackon source-dir "AEMAIL.readme"))
	        (dest   aem-docs-dir)
	        (infos)))

    (if (BITAND aem-docs 2)
        (copyfiles
            (prompt "Copying AEMAIL.doc file to " aem-docs-dir)
	        (source (tackon source-dir "AEMAIL.doc"))
	        (dest   aem-docs-dir)
	        (infos)))

    (if (BITAND aem-docs 4)
        (copyfiles
            (prompt "Copying AEMAIL.guide file to " aem-docs-dir)
	        (source (tackon source-dir "AEMAIL.guide"))
	        (dest   aem-docs-dir)
	        (infos)))
))

(if (= 1 aem-have-AMITCP)
    (copyfiles
        (prompt "Copying REXXC directory to C:")
	    (source "sys:rexxc")
        (all)
        (files)
        (optional nofail)
	    (dest   "sys:c")))

(tooltype
    (prompt "Setting AEMail Tool Types")
    (dest (tackon @default-dest "AEMail"))
    (if (= 1 aem-interlace)
        (settooltype "INTERLACE" "YES"))
    (if (<> "" aem-username)
        (settooltype "USERID" aem-username))
    (if (<> "" aem-password)
        (settooltype "PASSWRD" aem-password))
    (if (<> "" aem-realname)
        (settooltype "REALNAME" aem-realname))
    (if (<> "" aem-domain)
        (settooltype "DOMAIN" aem-domain))
    (if (<> "" aem-popserver)
        (settooltype "POP_SERVER" aem-popserver))
    (if (<> "" aem-smtpserver)
        (settooltype "SMTP_SERVER" aem-smtpserver))
    (if (<> "" aem-editor)
        (settooltype "EDITOR" ("\"%s\"" aem-editor)))
    (if (<> "" aem-startnet)
        (settooltype "STARTNET" aem-startnet))
    (if (<> "" aem-stopnet)
        (settooltype "STOPNET" aem-stopnet))
    (if (BITAND aem-options 1)
        (settooltype "DELETEMAIL" "YES"))
    (if (BITAND aem-options 2)
        (settooltype "STRIPDUPS" "YES"))
    (if (BITAND aem-options 4)
        (settooltype "FULLHEADER" "YES"))
    (if (BITAND aem-options 8)
        (settooltype "HDRINREPLY" "YES"))
    (if (BITAND aem-options 16)
        (settooltype "AUTOCONNECT" "YES"))
)

(procedure aemp-build_mailcap

    ((set
        aem-mimetypes
            (askoptions
                (prompt "Indicate those mime types/subtypes you want "
                        "display programs for")
                (help   "Check which types/subtypes that you will specify "
                        "a display program for.  If you specify the type/all "
                        "option you must have a program that can determine "
                        "the appropriate display subtype")
                (choices    "images/all"
                            "images/gif"
                            "images/jpeg"
                            "images/x-iff"
                            "audio/all"
                            "audio/basic"
                            "video/all"
                            "video/mpeg"))

        aem-curmailcap 0)

    (delete aem-mailcap_file)

    (while (<> 0 aem-mimetypes)
        ((if (BITAND aem-mimetypes 1)
            ((set
                aem-curmimet
                    (select aem-curmailcap "images/*"
                                           "images/gif"
                                           "images/jpeg"
                                           "images/x-iff"
                                           "audio/*"
                                           "audio/basic"
                                           "video/*"
                                           "video/mpeg")

                aem-mimefile
                    (askfile
                        (prompt "Indicate program to display " aem-curmimet)
                        (help   "Select the program in the file list that will "
                                "be used the display the file described by the "
                                "indicated mime type/subtype")
                        (default ""))

                aem-mimefile
                    (askstring
                        (prompt "Add the parameters required for the mime "
                                "display program you selected\n\n"
                                "You must always add '%s' to specify where "
                                "the file you are displaying goes.\n")
                        (help   "You will need to add parmeters that may be "
                                "required by the display program that you "
                                "specified.  One required parameter required "
                                "by ALL programs is '%s' to specify where "
                                "the file name for the file you are "
                                "displaying goes.\n")
                        (default (cat aem-mimefile " %s")))

                aem-mimeonwb
                    (askbool
                        (prompt "Does the mime display program have to open "
                                "on the Workbench?"
                        (help   "Some programs will always open on the "
                                "Workbench.  Others will open on their own "
                                "screen.  If your display program opens on "
                                "the Workbench, you must reply 'YES' to this "
                                "request.\n")))

                aem-mimefile
                    (if (= 1 aem-mimeonwb)
                        (cat "WB;" aem-mimefile)
                        ("%s" aem-mimefile)))

            (textfile
                (prompt "Creating .mailcap file")
                (help   "Creating .mailcap file")
                (dest   aem-mailcap_file)
                (include aem-mailcap_file)
                (append ("%s; \"%s\"\n" aem-curmimet aem-mimefile)))))
        (set aem-curmailcap (+ 1 aem-curmailcap))
        (set aem-mimetypes (shiftright aem-mimetypes 1))

    )))
)

(set aem-existmailcap 0)

(if (= 2 @user-level)
    (set aem-existmailcap
        (askbool
            (prompt "\nDo you want to use an existing mailcap file used by "
                    "another program?\n\nIf you want to use the default "
                    "mailcap file that comes with AEMail, reply 'NO' to this "
                    "message.")
            (help   "AEMAIL can run with a mailcap file created for another "
                    "program.  If you reply 'YES' to this message you will "
                    "be prompted for the directory containing your mailcap "
                    "file and the MAILCAP= tool type will be set up in you "
                    "AEMAIL icon"))))

(if (= 1 aem-existmailcap)
    ((set aem-mailcapdir
        (askdir
            (prompt "Enter the drawer that contains your mailcap file")
            (help   "AEMAIL can run with a mailcap file created for another "
                    "program.  Enter the directory that contains the mailcap "
                    "file that you want and the MAILCAP= tool type will be set "
                    "up in you AEMAIL icon")
            (default aem-mail-dir)
            (newpath)))
    (if (= 1 (exists (tackon aem-mailcapdir "mailcap")(noreq)))
        (tooltype
            (prompt "Setting AEMail Tool Types")
            (dest (tackon @default-dest "AEMail"))
            (settooltype "MAILCAP_DIR" aem-mailcapdir))
        (message "A mailcap file does not exist in the directory you have "
                 "specified. Continuing assuming no existing mailcap file."))))

(if (< exec-version version_3_0)
    (if (= 2 @user-level)
        ((set
            aem-createmailcap
            (askbool
                (prompt "\nYou are running under AmigaDos 2.1.  Do you want "
                    "to create your own mailcap file?\n")
                (help   "AEMAIL is configured either by Tool Types in it's icon "
                    "or by a configuration screen which is automatically "
                    "called up when you first execute AEMAIL if the Tool "
                    "Type parameters were not given.  By replying "
                    "'Yes, Configure Now' you will be setting the Tool Type "
                    "parameters\n"))
            aem-mailcap_file (tackon aem-mail-dir "mailcap"))
        (if (= 1 aem-createmailcap)
            (aemp-build_mailcap))))
    (copyfiles
        (prompt "Copying mailcap to " aem-mail-dir)
	    (source (tackon source-dir "mailcap"))
	    (dest   aem-mail-dir))
)

(textfile
    (prompt "Creating ENV:AEMail_Dir")
    (help "Creating ENV:AEMail_Dir")
    (dest "ENV:AEMail_Dir")
    (append @default-dest))

(textfile
    (prompt "Creating ENVARC:AEMail_Dir")
    (help "Creating ENVARC:AEMail_Dir")
    (dest "ENVARC:AEMail_Dir")
    (append @default-dest))


(startup
    aem-name
        (prompt "Adding AEMAIL assign to S:User-Startup")
        (help   "An ASSIGN statement for AEMAIL will now be added to the S:User-Startup")
        (command ("ASSIGN %s %s" aem-assign aem-mail-dir)))

(makeassign aem-name aem-mail-dir)

(message
    "The installation of AEMAIL is now complete.  You can execute AEMail "
    "now by double clicking on it's icon without rebooting your system."
    "  The AEMAIL: assignment has been made and also has been placed in your "
    "S:User-Startup file.  Please read the AEMail.Readme file before "
    "executing AEMail.")

(run ("run %s RAM:AEMail.Readme" pager-cmd) (safe))

(exit)

