; this routine will install the listed loader/saver into the selected directory

(set @default-dest
	(askdir
		(prompt "Please select directory you have installed Art Department Professional into.")
		(help
			@askdir-help
		)
		(default "SYS:ADPro")
	)
)

(set adprodir (tackon @default-dest "ADPro"))
(if
	(= 0 (exists adprodir))
	(abort "Could not find ADPro in selected directory!")
)

(set fulladproversion (getversion (tackon @default-dest "ADPro")))
(set adpromajorversion (/ (getversion (tackon @default-dest "ADPro")) 65536))
(set adprominorversion (- fulladproversion (* adpromajorversion 65536)))

(if (< adpromajorversion 2)
	(abort "You must have ADPro V2.1.X or later.")
)

(if (< adprominorversion 1)
	(abort "You must have ADPro V2.1.X or later.")
)

(copylib
	(prompt "")
	(help "")
	(source ":LIBS/adpro.library")
	(dest "LIBS:")
)

(set loaddir (tackon @default-dest ("Loaders2" ftype)))
(set savedir (tackon @default-dest ("Savers2" ftype)))

(if
	(= 0 (exists loaddir))
	(abort "Couldn't locate the Loaders2 directory!")
)
(if
	(= 0 (exists savedir))
	(abort "Couldn't locate the Savers2 directory!")
)


(copyfiles
	(prompt "")
	(help "")
	(source ":Loaders2/CDXL")
	(dest loaddir)
)

(copyfiles
	(prompt "")
	(help "")
	(source ":Savers2/CDXL")
	(dest savedir)
)

