; A1230 Turbo+ Install Script
; Version 1.00
; By Gary Nush ----- 03 February 1993

; Written for use with Commodore's Installer.

(set instldsk "GVP.Install:")

; ========================
; If the user has booted from this floppy, we need to find out
; where the usual SYS: partition is.  Try a few looks about the system...
; Currently looks for WB_3.x:, System3.0:, dh0:, or Workbench3.0:.  Ask
; user if we can't figure out where s/he boots from, and/or for confirmation.

(set target (getassign "wb_3.x" 'd'))             ; Device-only check.
(if (= target "")
    (set target (getassign "System3.0" 'v')))     ; VolumeName-only check.
(if (= target "")
    (set target (getassign "Workbench3.0" 'v')))  ; VolumeName-only check.
(if (= target "")
    (set target (getassign "dh0" 'd')))           ; Device-only check.
(if (= target "")
    (set target (getassign "System3.0")))         ; Logical assign check.
(if (= target "")
    (set target (getassign "dh0")))               ; Logical assign check.

; If we're at Wit's End: -- Welcome to Wit's End, population 1?
(if (= target "")
   (set target @default-dest)                     ; default destination
)

; Now, make absolutely, positively sure that we go to the right place.
(set target (askdir (prompt "Which partition do you usually boot from?\n"
                            "The required utilities should be installed there.")
                    (help @askdir-help)
                    (default target)))

; ====================
; This is where the installation occurs:
;

(copyfiles (source (tackon instldsk "GVP"))
           (dest (tackon target "Utilities/GVP"))
           (all)
           (infos)
           (confirm)
           (prompt "Shall I install the GVP support software?")
           (help "This software allows you to configure, control, "
                 "and test the A1230 Turbo+ Accelerator.\n\n"
                 @copyfiles-help))


(startup "A1230 Turbo+ FastROM"
         (prompt "To improve system performance, 512K of RAM "
                 "can be set aside to hold a copy of Kickstart.  "
                 "This will result in faster access to routines "
                 "that are normally located in ROM, but will "
                 "reduce the amount of free memory for other "
                 "programs by 512K\nDo you want to automatically "
                 "copy Kickstart into FastRAM?\n")
         (help "This will add the necessary statements to the "
               "S:User-Startup file to remap Kickstart into "
               "32-bit FastRAM every time the machine is booted.")
         (command (cat (tackon target "GVP/68030/GVPCPUCtrl FastROM"))))

(onerror (message "Sorry, but either your startup-sequence "
                  "was missing or is too heavily modified for "
                  "the installer program to understand.\n")
         (message "If you would like to give up 512K of RAM to "
                  "improve system performance, add the following "
                  "command to your s:user-startup file\n\n"
                  (tackon target "GVP/68030/GVPCPUCtrl") " FastROM"))

(set @default-dest target)
