(message "AMOSPro Multi-Envoironment Loader System V1.1\n\nBy Paul Hickman (ph@doc.ic.ac.uk)\n\n\nThis script will patch AMOSPro V1.12, and install the loader programs on your AMOSPro disk/directory\n\nReqtools library is required, and this will be copied to LIBS: if the version supplied here is newer than your current version")
(welcome)
;get the users AMOSPro directory.
(set #AMOSPro
(askdir
(prompt "Please select your AMOSPro_System: disk/directory.")
(help @ask-dirhelp)
(default "AMOSPro_System:")
(newpath)
)
)
(set @default-dest #AMOSPro)
(complete 5)
; Now detect if the AMOSPro directory is infact the root directory of
;Now check that there is a valid patchable copy of AMOS V1.12 in the AMOS
;directory.
(set #AMOS112 (tackon #AMOSPro "AMOSPro"))
(If (= (exists #AMOS112) 0)
(abort "The file AMOSPro appears to be missing from the AMOS directory you selected!\n\nPlease try again with the correct directory.")
)
(If (<> (getsize #AMOS112) 115972)
(abort (cat "The length of the file AMOSPro V1.12 should be 115972 bytes, but your copy is " (getlength #AMOS112) " bytes long.\n\n Please replace it with an original uncrunched copy of AMOSPro 1.12."))
)
(complete 20)
;Now patch it. An already patched copy can safely be re-patched.
;Now get the users extra commands for the script file.
(set #extracommands "")
(set #command "5")
(until (= #command "")
(set #command
(askstring
(prompt "A Script file is created by this installer to load AMOSPro. If you would like to insert extra commands into this script just before AMOSPro is run, type each one into the string gadget below, and press proceed.\n\nPress proceed with the string gadget empty when finished.")
(help (cat "Type each command into the string gadget, "
"and then press proceed.\n\nWhen you have "
"finished, press proceed with the string gadget empty.\n\n"
"The commands you enter will be executed just before "
"AMOSPro is run, and only if AMOSPro is going to be "
"executed - If you press Cancel in the file requester,"
"or an error occurs, your commands will NOT be run.\n\n"
"The most likely commands you will want to insert here "
"are to setup assigns to the directories where you keep "
"your AMOSPro programs."))
(default "")
)
)
(set #extracommands
(cat #extracommands " " #command "\n")
)
)
(complete 60)
; Next, create the script
(textfile
(prompt "Creating AMOSPro Loader Script")
(help "No Help Available")
(dest (tackon #AMOSPro "Amos"))
(append ".key prog\n.bra {\n.ket }\n")
(append "; $VER: AmosPro Loader 1.1 (18.5.94)\n;\n; By Paul Hickman (ph@doc.ic.ac.uk)\n\n\n")
; Finally, if on a floppy disk, user may wish startup sequence modified
(if (= AMOSdisk 1)
(message "I notice you are installing this to a floppy disk.\n\nTo use the AMOS Envoironment selector, you must double click on the AMOSPro loader icon.\n\n\nYou should make sure that your startup-sequence loads workbench, not AMOSPro directly.")