; PhonePak VFX/GVPPatch Installation Script
; $VER: GVPPatch Install 2.0 (18 May 1993)
;

; Written for use with Commodore's Installer.

(set phonepak "PhonePak_2.0:")

; ====================
; Make sure the user really wants to install this patch...
;

(message "This installation should only be performed if you are experiencing "
         "data dropout when recording audio or receiving faxes with your "
         "PhonePak, and you are using a GVP DMA hard disk controller (such "
         "as a Series-II hard card, a Combo accelerator, or a G-Force "
         "accelerator).\n\n"
         "If you are not experiencing any data dropout, or are not "
         "using one of the above mentioned hard disk controllers, it "
         "is not necessary to install this patch.\n\n")

(if (askbool (prompt "Do you understand, and wish to proceed with the "
                     "installation of the GVPPatch program?")
             (help "Please read the GVPPatch.Readme file supplied for more "
                   "information.")
             (choices "Yes" "No"))
    (
      (copyfiles (source (tackon phonepak "GVPPatch"))
                 (dest "C:"))
                 
; Set up the default dest so the user isn't confused.
      (set @default-dest "C:")
      
; Ready an error message if we can't perform the modification
      (onerror (message "Sorry, but either your startup-sequence was missing, "
                        "or it is too non-standard for the Installer program to "
                        "understand. You will have to make this modification "
                        "by hand.\n\n"
                        "To have the GVPPatch program run at startup, add the "
                        "following line to your S:User-Startup or "
                        "Startup-Sequence:\n\n"
                        "Run >NIL: GVPPatch -sPhonePak.device")
               (exit))
               
;Try to modify the startup
      (startup "PhonePak VFX/GVPPatch"
               (prompt "Is it OK to modify your startup to run the GVPPatch "
                       "program when you boot?")
               (help "For this program to be useful, it should be run in your "
                     "User-Startup or Startup-Sequence.\n\n"
                     @startup-help)
               (command ("Run >NIL: GVPPatch -sPhonePak.device")))
    )
    (
      (message "Aborting installation of the GVPPatch program.")
      (exit (quiet))
    )
)
