(message "AMOS Multi-Envoironment Loader System V1.1\n\nBy Paul Hickman (ph@doc.ic.ac.uk)\n\n\nThis script will patch AMOS V1.36, and install the loader programs on your AMOS 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 AMOS directory.
(set #AMOS
(askdir
(prompt "Please select your AMOS disk/directory.")
(help @ask-dirhelp)
(default "AMOS:")
(newpath)
)
)
(set @default-dest #AMOS)
(complete 5)
; Now detect if the AMOS directory is infact the root directory of
;Now check that there is a valid patchable copy of AMOS V1.36 in the AMOS
;directory.
(set #amos13 (tackon #AMOS "AMOS1.3"))
(If (= (exists #AMOS13) 0)
(abort "The file AMOS1.3 appears to be missing from the AMOS directory you selected!\n\nPlease try again with the correct directory.")
)
(If (<> (getsize #AMOS13) 93392)
(abort (cat "The length of the AMOS V1.36 should be 93392 bytes, but your copy is " (getlength #AMOS13) " bytes long.\n\n Please replace it with an original uncrunched copy of AMOS1.36."))
)
(complete 20)
;Now patch it. An already patched copy can safely be re-patched.
(working "Patching File AMOS1.3")
(run (cat "PatchAMOS " (tackon #AMOS "AMOS1.3")))
(complete 30)
;Now copy the program files accross
(copyfiles
(help @copyfiles-help)
(prompt "Installing AMOS Loader")
(source "GetAMOSEnv")
(noposition)
(dest #AMOS)
)
(complete 40)
(copyfiles
(help @copyfiles-help)
(prompt "Installing New AMOS Icon")
(source "AmosIcon")
(newname "Amos.info")
(noposition)
(dest #AMOS)
)
(complete 50)
; Now prepare some variables for the script file.
(set #AMOSsystem
(askdir
(prompt "Please select your AMOS_System directory.")
(help @ask-dirhelp)
(default (tackon #AMOS "AMOS_System"))
(newpath)
)
)
(complete 60)
;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 AMOS. If you would like to insert extra commands into this script just before AMOS 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 "
"AMOS1.3 is run, and only if AMOS1.3 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 AMOS programs."))
(default "")
)
)
(set #extracommands
(cat #extracommands " " #command "\n")
)
)
(complete 60)
; Next, create the script
(textfile
(prompt "Creating AMOS Loader Script")
(help "No Help Available")
(dest (tackon #AMOS "Amos"))
(append ".key prog\n.bra {\n.ket }\n")
(append "; $VER: Amos Loader 1.1 (13.3.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 AMOS loader icon.\n\n\nYou should make sure that your startup-sequence loads workbench, not AMOS directly.")