; AppTrashcan Installer Script

(complete 0)

(set tooltype-help
   ( "If you have FTPMount installed and running,\n"
   "you should select yes.\n\n"
   "Selecting yes sets up the AVOID tooltype to\n"
   "not attempt to empty a trashcan on the FTPMount:\n"
   "disk.\n\n"
   "Selecting yes does no harm if you don't have\n"
   "FTPMount installed." )
)

(set target
   (askdir
      (prompt "Where shall I put AppTrashcan?\n"
              "(Put it in your WBStartUp drawer\n"
              "to be run everytime you boot)" )
      (help @askdir-help)
      (default "SYS:WBStartUp")
      (newpath)
   )
)

(complete 15 )

(copyfiles
   (source "")
   (dest target)
   (choices "AppTrashcan" "AppTrashcan.info")
)

(set @default-dest target)

(complete 30)

(set guidetarget
   (askdir
      (prompt "Where do you want to have the Guide install?")
      (help @askdir-help)
      (default "SYS:")
      (newpath)
   )
)

(complete 45)

(copyfiles
   (source "")
   (dest guidetarget)
   (choices "AppTrashcan.Guide" "AppTrashcan.Guide.info")
)

(complete 60)

(set installcmds
   (askbool
      (prompt "Do you wish to install the CLI commands?\n")
      (help @askbool-help)
      (default 1)
   )
)

(complete 75)

(if installcmds
   (
      (set cmdstarget
         (askdir
            (prompt "Where do you want to have the CLI commands installed?")
            (help @askdir-help)
            (default "C:")
            (newpath)
         )
      )

      (complete 85)

      (copyfiles
         (prompt "Copy which CLI commands")
         (help @copyfiles-help)
         (source "C/")
         (dest cmdstarget)
         (choices "EmptyTrash" "Trash")
         (confirm)
      )
   )
)

(set icon (tackon target "AppTrashcan" ) )

(set ftpmountinstalled
   (askbool
      (prompt "Do you have FTPMount installed?" )
      (help @askbool-help)
      (default 0)
   )
)

(if ftpmountinstalled
   (
      (tooltype
         (dest icon)
         (settooltype "AVOID" "FTPMount:")
      )
   )
)

(complete 100)
