home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install-Secal 1.0 (5.4.96)
- ; This is the installation script for Secal version 1.0
- ; Copyright (c) 1996 TDS Development. All Rights Reserved.
-
-
-
- ;--- GLOBAL CONSTANTS ------------------
-
- (set requiredspace 2000000)
-
- (set hlp_instmethod (cat
- "Secal can be installed to a hard disk (recommended), or to floppy disks. "
- "Please choose one of these."
- ))
- (set hlp_destdir (cat
- "Secal stores its files in its own drawer. Please specify the location of "
- "this drawer. (Approx. 2 Mbyte of space is required)"
- ))
- (set hlp_prepopts (cat
- "Secal needs an assignment and the extending of the search path. The required "
- "instructions can be placed into the User-Startup file, or a script can be "
- "created in the Secal drawer, which can be activated with the Prepare icon."
- ))
-
- (set hlp_startup
- "You have selected to modify the User-Startup file, this will happen now."
- )
-
- (set hlp_askdisk "Please insert the correct disk to any drive.")
-
- (set msg_work_prg "Extracting program files...")
- (set msg_work_inclib "Extracting include and lib files...")
- (set msg_work_silly "Extracting example project...")
- (set msg_work_xmp "Extracting rest of the examples...")
-
- (set msg_err_prg "Error while extracting.")
- (set msg_err_inclib "Error while extracting.")
- (set msg_err_silly "Error while extracting.")
- (set msg_err_xmp "Error while extracting.")
- (set msg_err_prep "Error while extracting.")
-
- (set msg_ok_harddisk "Please reboot before starting Secal.")
- (set msg_ok_floppy (cat
- "Installation complete!\n" "Secal can be found on your disks.\n\n"
- "TIP: If you use Secal on floppy disks, you can greatly reduce the number of "
- "disk swaps by changing the Secal preferences. Remove anything unnecessary "
- "from the list of directories, in which Secal looks for included files."
- ))
-
-
-
- ;--- METHOD SELECTION ------------------
-
- (procedure main (
- (complete 0)
-
- (set method
- (askchoice
- (prompt "Select installation method")
- (choices
- "Install to hard disk"
- "Install to 3 DD floppy disks"
- "Install to 2 HD floppy disks"
- )
- (default 0)
- (help hlp_instmethod)
- )
- )
-
- (if (= method 0) (
- (harddisk)
- )(
- (if (= method 1) (setdd) (sethd))
- (floppydisks)
- ))
- ))
-
-
-
- ;--- HARDDISK INSTALLATION -------------
-
- (procedure harddisk (
- (set destdir (askdir
- (prompt "Please indicate where you want the Secal drawer to be located.")
- (default @default-dest)
- (help hlp_destdir)
- ))
-
- (set destspace (getdiskspace destdir))
- (message
- "\nSecal is about to be installed into \"" destdir "\".\n\n"
- "About " requiredspace " bytes of free space is required.\n\n"
- "Specified location has " destspace " bytes of free space.\n\n"
- (if (< destspace requiredspace) (cat
- "\nWarning! Specified location does not appear to have enough space, "
- "Secal may not fit!"
- ))
- )
-
- (makedir "RAM:_SecalInstT")
-
- (askinstdisk1)
- (copyfiles (source "SecalInstall1:LHEX") (dest "RAM:_SecalInstT"))
-
- (set destdir (tackon destdir "Secal"))
- (makedir destdir (infos))
- (complete 10)
-
- (askinstdisk1)
- (working msg_work_prg)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s\" x SecalInstall1:prg.lha" destdir))
- (if (> (run cmd) 1) (abort msg_err_prg))
- (complete 30)
-
- (askinstdisk1)
- (working msg_work_inclib)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s\" x SecalInstall1:inclib.lha" destdir))
- (if (> (run cmd) 1) (abort msg_err_inclib))
- (complete 50)
-
- (askinstdisk1)
- (working msg_work_silly)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s\" x SecalInstall1:silly.lha" destdir))
- (if (> (run cmd) 1) (abort msg_err_silly))
- (complete 70)
-
- (askinstdisk2)
- (working msg_work_xmp)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s\" x SecalInstall2:xmp.lha" destdir))
- (if (> (run cmd) 1) (abort msg_err_xmp))
- (complete 90)
-
- (set prepopts
- (askoptions
- (prompt "Secal needs an assignment and the extending of the search path. Select desired operation.")
- (choices
- "Modify your User-Startup file"
- "Create Prepare script in Secal drawer"
- )
- (default %01)
- (help hlp_prepopts)
- )
- )
-
- (if (bitand prepopts %10) (
- (askinstdisk2)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s\" x SecalInstall2:prep.lha" destdir))
- (if (> (run cmd) 1) (abort msg_err_prep))
- ))
- (complete 95)
-
- (if (bitand prepopts %01) (
- (startup "Secal"
- (prompt "\nAbout to modify the User-Startup file.")
- (command
- ("Assign SECAL: \"%s\"\n" destdir)
- "Path SECAL:C Add\n"
- )
- (help hlp_startup)
- )
- ))
- (complete 100)
-
- (delete "RAM:_SecalInstT/LHEX")
- (delete "RAM:_SecalInstT")
-
- (set @default-dest destdir)
- (exit msg_ok_harddisk)
- ))
-
-
-
- ;--- DD FLOPPY (PREPARATION) -----------
-
- (procedure setdd (
- (message
- "\nYou will need 3 empty DD diskettes. Please format them to the following names:\n\n"
- "SecalStart\n" "Secal\n" "SecalExamples"
- )
- (set dest_inclib "Secal")
- (set dest_prg "SecalStart")
- (set dest_silly "SecalStart")
- (set dest_xmp "SecalExamples")
- ))
-
-
-
- ;--- HD FLOPPY (PREPARATION) -----------
-
- (procedure sethd (
- (message
- "\nYou will need 2 empty HD diskettes. Please format them to the following names:\n\n"
- "Secal\n" "SecalProjects"
- )
- (set dest_inclib "Secal")
- (set dest_prg "Secal")
- (set dest_silly "SecalProjects")
- (set dest_xmp "SecalProjects")
- ))
-
-
-
- ;--- FLOPPY INSTALL (DD/HD) ------------
-
- (procedure floppydisks (
- (makedir "RAM:_SecalInstT")
-
- (askinstdisk1)
- (copyfiles (source "SecalInstall1:LHEX") (dest "RAM:_SecalInstT"))
-
- (askinstdisk1)
- (copyfiles (source "SecalInstall1:prg.lha") (dest "RAM:_SecalInstT"))
-
- (set destdisk dest_prg)
- (askdestdisk)
- (working msg_work_prg)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s:\" x RAM:_SecalInstT/prg.lha" destdisk))
- (if (> (run cmd) 1) (abort msg_err_prg))
- (complete 25)
- (delete "RAM:_SecalInstT/prg.lha")
-
- (rename ("%s:C/Secal" destdisk) ("%s:Secal" destdisk))
- (complete 26)
- (rename ("%s:C/SclC" destdisk) ("%s:SclC" destdisk))
- (complete 27)
-
-
- (askinstdisk1)
- (copyfiles (source "SecalInstall1:silly.lha") (dest "RAM:_SecalInstT"))
-
- (set destdisk dest_silly)
- (askdestdisk)
- (working msg_work_silly)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s:\" x RAM:_SecalInstT/silly.lha" destdisk))
- (if (> (run cmd) 1) (abort msg_err_silly))
- (complete 50)
- (delete "RAM:_SecalInstT/silly.lha")
-
-
- (askinstdisk1)
- (copyfiles (source "SecalInstall1:inclib.lha") (dest "RAM:_SecalInstT"))
-
- (set destdisk dest_inclib)
- (askdestdisk)
- (working msg_work_inclib)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s:\" x RAM:_SecalInstT/inclib.lha" destdisk))
- (if (> (run cmd) 1) (msg_err_inclib))
- (complete 75)
- (delete "RAM:_SecalInstT/inclib.lha")
-
-
- (askinstdisk2)
- (copyfiles (source "SecalInstall2:xmp.lha") (dest "RAM:_SecalInstT"))
-
- (set destdisk dest_xmp)
- (askdestdisk)
- (working msg_work_xmp)
- (set cmd ("RAM:_SecalInstT/LHEX \"-qfw=%s:\" x RAM:_SecalInstT/xmp.lha" destdisk))
- (if (> (run cmd) 1) (abort msg_err_xmp))
- (complete 100)
- (delete "RAM:_SecalInstT/xmp.lha")
-
- (delete "RAM:_SecalInstT/LHEX")
- (delete "RAM:_SecalInstT")
-
- (message msg_ok_floppy)
- (exit (quiet))
- ))
-
-
-
- (procedure askinstdisk1 (
- (askdisk
- (dest "SecalInstall1")
- (prompt "\nPlease insert Secal install disk 1 (\"SecalInstall1\").")
- (help hlp_askdisk)
- )
- ))
-
-
-
- (procedure askinstdisk2 (
- (askdisk
- (dest "SecalInstall2")
- (prompt "\nPlease insert Secal install disk 2 (\"SecalInstall2\").")
- (help hlp_askdisk)
- )
- ))
-
-
-
- (procedure askdestdisk (
- (askdisk
- (dest destdisk)
- (prompt ("\nPlease insert the formatted destination disk named \"%s\"." destdisk))
- (help hlp_askdisk)
- )
- ))
-
-
-
- ;--- MAIN PROGRAM ----------------------
-
- (main)
-
-