;; Ultraconv and Ultracat Installation utility
;; (c) 1996 by Felix Schwarz
(set @default-dest "")
(set @pretend 0)
(set @user-level 2)

(complete 0)
(message "\n\n\nUltraconv 1.6 + UCat 1.05\n"
       "© 1996 by Felix Schwarz\n\n\n"
       "Welcome to the UConv and UCat installation\n"
       "utility. This script will install Ultraconv\n"
       "and Ultracat on your HD.\n"
)
(set #turboversion
   (askchoice
       (prompt "Which JPEG-loader/saver shall I install ?")
       (help @askbool-help)
       (choices "68000 + 68020" "68020 + 68881 / 68882")
       (default 0)
   )
)
(set #installdir
    (askdir
        (prompt "Choose directory to install UConv..\n"
                "(A directory called Ultraconv will be created)")
        (help @askdir-help)
        (default "Sys:")
    )
)

(complete 50)

(copyfiles
    (source "/")
    (dest #installdir)
    (pattern "Ultraconv#?")
)
(complete 80)
(set #turbocomp
   (cat #installdir "/Ultraconv/Commands/cjpeg.020881")
)
(set #turbodecomp
   (cat #installdir "/Ultraconv/Commands/djpeg.020881")
)
(set #oldcomp
   (cat #installdir "/Ultraconv/Commands/cjpeg.020")
)
(set #olddecomp
   (cat #installdir "/Ultraconv/Commands/djpeg.020")
)
(if (= #turboversion 1)
 (
  (delete #oldcomp)
  (delete #olddecomp)
  (rename #turbocomp #oldcomp)
  (rename #turbodecomp #olddecomp)
 )
)

(complete 98)
(set #delfile
   (cat #installdir "/Ultraconv/Install")
)

(set #delfile2
   (cat #installdir "/Ultraconv/Install.info")
)

(delete #delfile)
(delete #delfile2)
(complete 99)
(message "Ultraconv+UCat are now installed on \n"
         "your HD at " #installdir "\n"
         "You can use it immediately without\n"
         "rebooting.\n\n"
         "Have fun with it!"
)
(complete 100)

 
 
    
