(set #welcome
(cat "Welcome to the the Installation of the GBAPII++ driver package!"
))

(welcome #welcome)

(complete 0)
(message "To install this package, you MUST install a copy of Picasso96 first. You can find it on the aminet.\n\nDuring installation pick the PiccoloSD64 card for the correct chip driver.\n\nPlease notice that Picasso96 is shareware and you must register it!")

(complete 5)
(set #filesfound "")

(if (exists "LIBS:Picasso96/CirrusGD5434.chip" (noreq))
	(set #filesfound (cat #filesfound "CirrusGD5434.chip found"));then
	(exit "LIBS:Picasso96/CirrusGD5434.chip not found. Please check your Picasso96 installation!");else
); if
(complete 10)

(if (exists "LIBS:Picasso96/rtg.library" (noreq))
	(set #filesfound (cat #filesfound "\n" "rtg.library found"));then
	(exit "LIBS:Picasso96/rtg.library not found. Please check your Picasso96 installation!");else
); if
(complete 20)

(if (exists "LIBS:Picasso96/emulation.library" (noreq))
	(set #filesfound (cat #filesfound "\n" "emulation.library found"));then
	(exit "LIBS:Picasso96/emulation.library not found. Please check your Picasso96 installation!");else
); if
(complete 30)

(if (exists "LIBS:Picasso96/fastlayers.library" (noreq))
	(set #filesfound (cat #filesfound "\n" "fastlayers.library found"));then
	(exit "LIBS:Picasso96/fastlayers.library not found. Please check your Picasso96 installation!");else
); if
(complete 40)

(if (exists "LIBS:Picasso96API.library" (noreq))
	(set #filesfound (cat #filesfound "\n" "Picasso96API.library found"));then
	(exit "LIBS:Picasso96API.library not found. Please check your Picasso96 installation!");else
); if
(complete 50)

(set #filesfound (cat #filesfound "\n\nIt seems you have installed Picasso96 properly."))

(message #filesfound)
(complete 60)

(copyfiles
	(source "LIBS/Picasso96/")
	(dest "LIBS:Picasso96/")
	(pattern "GBAPII++.card")
	(files)
)
(complete 70)
(copyfiles
	(source "Devs/Monitors/")
	(dest "DEVS:Monitors/")
	(pattern "GBAPII++#?")
	(files)
)
(complete 80)
(copyfiles
	(source "Devs/")
	(dest "DEVS:")
	(pattern "Picasso96Settings")
	(files)		
)
(complete 90)

(message "Done! Enjoy GBAPII++ in the screen mode selection.")
(complete 100)
(exit)
