; Installer installation script for MSGEdit v1.o
; $VER:Install 1.o (25.7.95)

(transcript "Installing MSGEdit v1.o...")


(message
  (cat "\nMSGEdit v1.o installation\n\n"
       "This script installs MSGEdit v1.o\n"
       "on your Amiga.\n\n"
       "MSGEdit © 1995, Bodo Hoffmann\n"
       "All rights reserved\n\n"
       "(reqtools.library © 1994 Nico François)\n"
       "(MUI © 1992/95 Stefan Stuntz)\n"
       "(Textfield.gadget © 1995 Mark Thomas)\n")
)

(set msgedit_dir
	(askdir
 		(prompt "Select a place for MSG·Edit. All needed files are copied there.")
			(help @askdir-help)
			(default 
				(expandpath "SYS:")
			)
	)
)

(set copypath
	(tackon msgedit_dir "MSGEdit")
)

(makedir
	(copypath)
		(prompt "creating new drawer for MSG·Edit")
				(help @makedir-help)
				(infos)
)

(set guidepath
	(tackon copypath "Guide")
)

(makedir
	(guidepath)
		(prompt "creating new drawer for MSG·Edit.guide")
				(help @makedir-help)
				(infos)
)


(set classesdir
	(askdir
 		(prompt "Select your Classes/ drawer to install the textfield.gadget")
			(help @askdir-help)
			(default 
				(expandpath "SYS:")
			)
	)
)

(set libpath "LIBS:");

(set classes
	(tackon classesdir "Gadgets/")
)

(if 
	(askbool 
		(prompt "\n\n\nYou wish to install reqtools.library v38.1266")
			(help @askbool-help)
	)
(		
		( (copyfiles
				(source "LIBS/")
					(dest libpath)
						(infos)
						(all))
		)
)
)

(copyfiles
				(source "Classes/Gadgets/")
					(dest classes)
						(infos)
						(all)
)


(copyfiles
				(source "Guides/")
					(dest guidepath)
						(infos)
						(all)
)

(copyfiles
				(source "MSGEdit")
					(dest copypath)
						(infos)
)

(message
  (cat "\nNow make shure you have the following assigns\n"
       "in your S:StartUp-Sequence\n\n"
       "   ASSIGN LIBS: SYS:CLASSES/ ADD\n"
       "ASSIGN LIBS: MUI:LIBS/ ADD\n\n"
       "Otherwise the program wont work...\n")
)

(if 
	(askbool 
		(prompt "\n\n\n\n\nShould I add this lines to your User-Startup?")
			(help @askbool-help)
	)
		(		
    	(startup "MSG·Edit" 
					(prompt 
						(cat "Adding assign Libs:Classes\n"
          	     "Assign LIBS: classesdir ADD and\n"
            	   "Assign LIBS: MUI:Libs ADD\n"
              	 "to  User-StartUp\n"
	           )
  	       )
	    (command (cat "Assign Libs: "classesdir" ADD \n"
		                "Assign Libs: MUI:Libs ADD\n"))
     	(help @startup-help)
			(set assign "LIBS "classesdir" ADD")
			(makeassign assign)
			(set assign "LIBS MUI:LIBS/ ADD")
			(makeassign assign)
    	)
		)
)


(message
	(cat "\n\nNow MSG·Edit is installed successfull\n\n"
			 "...thanx for using this fine program\n"
			 "If you want a full version refer the guidefile\n"
			 "for disclaimer and register informations\n\n")
)
