; A/NES CGFX Install-script v2.0
; Written by Lennart Johannesson & Morgan Johansson

(complete 0)

;Install A/NES
(set #Processor
(askchoice
	(prompt "Select version of A/NES CGFX to install:")
	(help	"If you're lucky enough to have a MC68060 processor\n"
		"select the MC68060 option.")
	(choices "MC68020/030/040""MC68060")
)
)


;Creates a directory
    (set dest_dir
      (tackon (askdir
                (prompt "Where do you want to install A/NES CGFX?\n"
                        "A drawer called ANESCGFX will be created.")
                (help @askdir-help) (default "Work:") (disk) ) "ANESCGFX" )
    )

    (set @default-dest dest_dir)
    (makedir dest_dir)
(complete 10)


;Copy the correct files.
(working "Copying files, please wait...")


(if (= #Processor 0)
	(copyfiles (source "ANESCGFX.020") (dest (dest_dir)) (newname "ANESCGFX") (infos) (nogauge))
)

(if (= #Processor 1)
	(copyfiles (source "ANESCGFX.060") (dest (dest_dir)) (newname "ANESCGFX") (infos) (nogauge))
)
(complete 30)

	(copyfiles (source "data/ANES_squarewave.chn") ("S:") (infos) (nogauge))
	(copyfiles (source "data/ANES_trianglewave.chn") ("S:") (infos) (nogauge))
	(copyfiles (source "ANESCGFX.guide") (dest (dest_dir)) (infos) (nogauge))
	(copyfiles (source "libs/ANESutility.library") (dest "LIBS:") (infos) (nogauge))
	(copyfiles (source "/ANESCGFX.info") (dest (tackon dest_dir "/")) (nogauge))
	(copyfiles (source "fonts/") (dest "FONTS:") (help @copyfiles-help) (all) (nogauge))

(complete 100)

;end of installation process

(exit	"A/NES CGFX has now been installed!\n"
	"Remember that this software is giftware "
	"which means that if you like it you should "
	"consider donating a gift to the authors "
	"(for more information, read the included documentation)\n"
	"Thanks for supporting us!"
)
