; MiserPrint V1.0 Installation
; (c) 1993 Heinz-Guenter Boettger

(set #target-prompt
(cat "\n Where do you want to copy MiserPrint? \n"))

(set #target-help
(cat "                                                   \n"
     " Select the directory, where you want to copy the  \n"
     " main program and its icon.                        \n"
     "                                                   \n"
))
(set target (askdir 
    (prompt  #target-prompt)
    (help    #target-help)
    (default "SYS:UTILITIES")
))
(set @default-dest target)

(set #replace-prompt
(cat "\n Replace my old preferences? \n"))

(set #replace-help
(cat "                                                   \n"
     " Select 'Yes' to replace my old preferences files. \n"
     "                                                   \n"
))

(copyfiles
	(prompt "Copying MiserPrint...")
	(source "")
	(dest target)
	(pattern "MiserPrint")
	(files)
	(infos)
)

(if (not (exists "envarc:MiserPrint")) 
(
   (makedir "envarc:MiserPrint")
   (copyfiles
        (prompt "Copying MiserPrint Preferences...")
        (source "envarc/MiserPrint")
        (dest   "envarc:MiserPrint")
        (all)
   )
)
; else
(
    (if (askbool 
            (prompt #replace-prompt)
            (help   #replace-help)
        )
        (copyfiles
            (prompt "Copying MiserPrint Preferences...")
            (source "envarc/MiserPrint")
            (dest   "envarc:MiserPrint")
            (all)
        )
    )
        
)
)

