;
; Installation script for MooVId Professional 68K&PPC 1.3
; by László Török (torokl@alpha.dfmk.hu)
; $VER 1.3 (23.08.2000)
;

; Strings

(set @default-dest "")
(set moovid-source		"Files/MooVId")
(set mooviddocs-source		"Files/doc/MooVId-Professional.guide")
(set asynciolib-source		"Files/libs/asyncio.library")
(set reqtoolslib-source		"Files/libs/reqtools.library")
(set guifont-source		"Files/fonts/GroovyPlayerLCD.font")
(set guifont-source2		"Files/fonts/GroovyPlayerLCD/8")

(set fontdest			"FONTS:")
(set fontdest2			"FONTS:GroovyPlayerLCD")
(set fontmsg			"Installing the GUI font")

(set moovidlib-def-dest		"LIBS:")
(set moovid-def-dest		"Work:")
(set moovid-to			"Where do you want the MooVId Professional mainfile copied in?")
(set docs-to			"Where do you want the MooVId Professional AmigaGuide documentation copied in?")
(set libraries-to		"Where do you want libraries copied in?")
(set Bad-Cpu		"You need at least a Motorola M68020 CPU to run MooVId Professional")
(set path-help		(cat      "Select a path where you want to put the mainfile\n"))
(set path-help2		(cat      "Select a path where you want to put the documentation\n"))
(set wrong-kick			"You must be running Kickstart 3.0+ to run MooVId Professional.")
(set copy-msgm1			"Copying the mainfile to ")
(set copy-msgm2			"Copying the documentation to ")
(set copy-reqtools		"Copying the reqtools.library to LIBS:")
(set copy-async			"Copying the asyncio.library to LIBS:")
(set asynchelp			"MooVId Professional requires asyncio.library 39.2 or better")
(set reqtoolshelp		"MooVId Professional requires reqtools.library 38 or better")
(set fonthelp			"MooVId Professional requires GroovyPlayerLCD font for the GUI")
(set mainhelp			"This part will copy the mainfile")
(set docshelp			"This part will copy the documentation")
(set hail-msg
        (cat      "\n\n\nMooVId Professional installation script.\n"
                  "This script will install MooVId Professional on your Amiga.\n\n"
                  "MooVId Professional is\n(C) Copyright 1996-2000 László Török.\n"
                  "Distributed by Epic Marketing.\n"
                  "All Rights Reserved.\n"
                  "\n "
                  "just another fine FAITH release\n"
        )
)

; Correct OS version?

(if (< (/ (getversion) 65536) 39) (abort wrong-kick))

; 68020+ present?

(if (patmatch "68000|68010" (database "cpu")) (abort Bad-Cpu))

(message hail-msg)

(copyfiles
	(prompt fontmsg)
	(help   fonthelp)
	(source guifont-source)
	(dest   fontdest)
	(confirm)
)

(copyfiles
	(prompt fontmsg)
	(help   fonthelp)
	(source	guifont-source2)
	(dest   fontdest2)
	(confirm)
)

; Ask where to copy the libraries.

(set libs-dest
	(askdir
		(prompt  libraries-to)
		(help    path-help)
		(default moovidlib-def-dest)
	)
)

;copy the asyncio.library

(copylib
	(prompt copy-async)
	(help   asynchelp)
	(source asynciolib-source)
	(dest   libs-dest)
	(confirm)
)

;copy the reqtools.library


(copylib
	(prompt copy-reqtools)
	(help   reqtoolshelp)
	(source reqtoolslib-source)
	(dest   libs-dest)
	(confirm)
)


; Ask where to copy the mainfile.

(set moovid-dest
	(askdir
		(prompt  moovid-to)
		(help    path-help)
		(default moovid-def-dest)
	)
)

; Copy the mainfile.

(copyfiles
	(prompt (cat copy-msgm1))
	(help   mainhelp)
	(source moovid-source)
	(dest   moovid-dest)
	(confirm)
	(infos)
)

; Ask where to copy the docs.

(set mooviddocs-dest
	(askdir
		(prompt  docs-to)
		(help    path-help2)
		(default moovid-dest)
	)
)

; Copy the mainfile.

(copyfiles
	(prompt (cat copy-msgm2))
	(help   docshelp)
	(source mooviddocs-source)
	(dest   mooviddocs-dest)
	(confirm)
	(infos)
)

(delete (tackon libs-dest (cat "moovidppc.library")))
(delete (tackon libs-dest (cat "moovidppc.elf")))
