; Installation script for AlphaSpell

(transcript "Installing AlphaSpell ...")

(set destpath
    (askdir
        (prompt "Install the Dictionary where?")
        (help @askdir-help)
        (default "Work:")
    )
)

(copyfiles
    (prompt "Copying AlphaSpell's Dictionary")
    (help @copyfiles-help)
    (source "Dictionary")
    (dest destpath)
    (confirm)
)

(set response
    (askchoice
        (prompt
            "Add Dict and UDict Environment Variables for use with the "
            "XDME Excelsior Suite?"
        )
        (help @askchoice-help)
        (choices "Yes" "No")
    )
)

(if (= response 0)
    (
        (run (cat "setenv Dict " (tackon destpath "Dictionary")))
        (run (cat "setenv UDict " (tackon destpath "User_Dictionary")))
        (run "copy ENV:Dict ENVARC:")
        (run "copy ENV:UDict ENVARC:")
    )
)

(set destpath
    (askdir
        (prompt "Install AlphaSpell where?")
        (help @askdir-help)
        (default "C:")
    )
)

(copyfiles
    (prompt "Copying AlphaSpell")
    (help @copyfiles-help)
    (source "AlphaSpell")
    (dest destpath)
    (confirm)
)

(set destpath
    (askdir
        (prompt "Install AlphaSpell.guide where?")
        (help @askdir-help)
        (default "Data:Docs/")
    )
)

(copyfiles
    (prompt "Copying AlphaSpell's Documentation")
    (help @copyfiles-help)
    (source "AlphaSpell.guide")
    (dest destpath)
    (confirm)
)

(exit)



