
(set TRUE 1)
(set FALSE 0)

(set docopylibs TRUE)

(makeassign "superdisk:" "Bladeinstaller:")
 
(set m1 "You are about to use the\n\nAt KnIfE pOiNt Uk!!!!\n\n")
(set m2 "Lha unarchiver installation utility\n")
(set m3 "You have selected the install to Floppy Disk Option.\n\n")
(set m4 "You will need blank formatted disks ")
(set m5 "ready for use.\n\n\n")
(set m6 "If you do not have any disks ready, format some now and then ")
(set m7 "click on \"Proceed\"")
(set m8 "\n\n REMEMBER the Amiga is a multitasking computer ")
(set m9 "this means all you have to do is pop in a disk NOW and use ")
(set m10 "Format from the menu. ")
(message m1 m2)


(set installto
   (askchoice
      (prompt "Select the type of disk you\nwant to install to\n")
      (default 0)
      (choices "Hard Disk - when you get one!" "Floppy Disk - Slooow! hehe")
      (help @askchoice-help)
   )
)

(if (> installto 0 )
   (message m3 m4 m5 m6 m7 m8 )
)

   

(set loopy 1)

(while (= loopy 1)
   
   (set installfile
      (askfile
               (prompt "please enter disk and select file to DECRUNCH")
               (default "df0:")
               (help @askfile-help)
      )
   )

   (set installdest
      (askdir
         (prompt "Which disk should\n" (fileonly installfile) "\n be installed ? Disk shud be in df1:")
         (help @askdir-help)
         (default "ram:")
      )
   )

   (set lhacommands (cat '"'installfile'"' ' ' '"'installdest'"'))

   (message "I am going to execute the command\nsuperdisk32:c/lha x "lhacommands)

   (set @default-dest installdest)

   (run "BlAdEiNsTaLlEr:c/lha x "lhacommands)

   (set loopy
      (askbool
         (prompt "Do you wanna decrunch any more programs ?")
         (default 0)
         (help "select \"Yes\" or \"No\"")
      )
   )

)

(if (= docopylibs TRUE)
   (set libyn
         (askbool
            (prompt "Do you want to install/update any libraries? Only recommended for WB 2!")
            (default 0)
            (help "select \"Yes\" or \"No\"")
         )
   )
)


(if (= libyn 1)
   
   (copyfiles
      (prompt "Please select a file to copy")
      (help @copyfiles-help)
      (source "superdisk32:libs")
      (dest "ram:")
      (files)
      (pattern "#?.library")
      (optional "askuser")
      (confirm)
   )
)

(exit "Operation completed")


