; UNPacker Installation Script
; Copyright © 1993-1995 by Ralph Torchia
; $VER:UNPacker v2.0 (09.17.95)

(set @PRGVersion "2.0")

(welcome
  ("\nWelcome to the UNPacker %s installer script.\n\n" @PRGVersion)
  ("    This version of UNPacker has documentation in AmigaGuide format.\n")
  ("    Follow the installer script's instructions to install UNPacker.\n")
)

(set @default-dest "SYS:Utilities")

(set @default-dest
  (askdir
    (prompt "Where would you like UNPacker installed?")
    (help " The Utilities directory on your boot disk is a good place to put UNPacker.")
    (default @default-dest)
  )
)

(copyfiles
  (prompt "Copying UNPacker to %s" @default-dest)
  (help @copyfiles-help)
  (source "UNPacker")
  (dest @default-dest)
)

;(
;  (if
;    (askbool
;      (prompt "Would you like to edit the prefs file now?")
;      (help " The prefs file needs to be modified if the default settings are not appropirate for your use.  This can be done before the installer is started, right now, or at a later time.")
;    )
;  (run "C:Ed UNPacker.prefs" (safe))
;  (message "Make sure when editing the UNPacker.prefs file that both th ENVARC: and ENV: copies are changed.")
; )
;)

(
  (copyfiles
    (prompt "Copying UNP.prefs to ENVARC:")
    (help @copyfiles-help)
    (source "UNP.prefs")
    (dest "ENVARC:")
  )
  (copyfiles
    (prompt "Copying UNPacker.prefs to ENV:")
    (help @copyfiles-help)
    (source "UNP.prefs")
    (dest "ENV:")
  )
)

(set @icon-choice "UNPacker_Std")
(
  (set @choice
    (askchoice
      (prompt "Which icon would you like to have installed for UNPacker?")
      (choices ("MagicWB Icon")
               ("Standard Workbench Icon")
	          ("Standard Icon in 8 Colors")

      )
      (help " The MagicWB icon is a larger, 8 color icon.  The standard icon and the 8 color icon follows Commodore's color and size standard.")
    )
  )
  (if (= @choice 0) (set @icon-choice "UNPacker_Magic"))
  (if (= @choice 1) (set @icon-choice "UNPacker_Std"))
  (if (= @choice 2) (set @icon-choice "UNPacker_8col"))
)

(copyfiles
  (prompt "Copying icon for %s" @default-dest)
  (help @copyfiles-help)
  (source @icon-choice)
  (dest @default-dest)
  (newname "UNPacker.info")
)

(exit)
