;------------------------------------------------------------------------
; DoDIZ v3.0 installation script. Jonas Kjellin
;
; $VER: Install-DoDIZ 3.0 (26.02.97)
;------------------------------------------------------------------------
(welcome "\nWelcome to the the Installation of \nDoDIZ version 3.0!")
(complete 0)

(set #program-dest "C:")
(set #program-dest
	(askdir 
   	(prompt "Where do you like to install DoDIZ?\nThe directory should be somewere in your path!")
		(help @askdir-help) 
		(default #program-dest)
		(disk) 
	)
)
(set #install020
	(askbool 
		(prompt "\nWould you like to install DoDIZ 68020 version?")
		(help "")
	)
)
(if #install020
	(
		(copylib
			(prompt "\nCopying DoDIZ to " #program-dest)
			(help @copylib-help)
			(source "Bin/DoDIZ_020")
			(dest #program-dest)
			(newname "DoDIZ")
			(confirm)
		)
	)
	(
		(copylib
			(prompt "\nCopying DoDIZ to " #program-dest)
			(help @copylib-help)
			(source "Bin/DoDIZ")
			(dest #program-dest)
			(confirm)
		)
	)
)

(complete 30)

(set #doc-dest "HELP:")
(set #doc-dest
	(askdir 
		(prompt "Where do you like to install DoDIZ.guide?")
		(help @askdir-help) 
		(default #doc-dest)
		(disk) 
	)
)
(copyfiles
	(prompt "Copying DoDIZ.guide to " #doc-dest)
	(help @copyfiles-help)
	(source "Doc/DoDIZ.guide")
	(dest #doc-dest)
)

(copylib
	(prompt "\nCopying reqtools.library to LIBS:")
	(help @copylib-help)
	(source "Libs/reqtools.library")
	(dest "LIBS:")
	(confirm)
)

(complete 40)

(set #oldhead (exists "S:DoDIZHead.TXT" (noreq)))
(if #oldhead
	(rename "S:DoDIZHead.TXT" "S:DoDIZ.header" 
		(prompt "\nFound S:DoDIZHead.TXT from DoDIZ v2.0\n\nWould you like to rename it for DoDIZ v3.0?")
		(help "")
		(confirm)
	)
)

(set #installhead 
	(askbool 
		(prompt "\nWould you like to install one of the \nincluded \"header\" files?")
		(help "")
	)
)

(if #installhead
	(
		(set #headbits
			(askchoice
				(prompt "Which \"header\" file would you like to install?\n(Look in the \"Headers\" directory\nto see how they look like.)\n")
				(help @askchoice-help)
				(choices "Aminet1 by t0!" "Aminet2 by t0!" "Aminet3 by t0!" "Aminet4 by t0!" "DoDIZ by t0!")
				(default 0)
			)
		)
		(select #headbits
			(set #headfile "Headers/t0!_Aminet1.txt")
			(set #headfile "Headers/t0!_Aminet2.txt")
			(set #headfile "Headers/t0!_Aminet3.txt")
			(set #headfile "Headers/t0!_Aminet4.txt")
			(set #headfile "Headers/t0!_DoDIZ.txt")
		)
		(copyfiles
			(prompt "Copying " #headfile "to S:DoDIZ.header")
			(help @copyfiles-help)
			(source #headfile)
			(dest "S:")
			(newname "DoDIZ.header")
		)
	)
)

(complete 60)

(copyfiles
	(prompt "Copying DoDIZ.prefs to S:")
	(help @copyfiles-help)
	(source "Prefs/DoDIZ.prefs")
	(dest "S:")
)

(copyfiles
	(prompt "Copying DoDIZ.default to ENV:")
	(help @copyfiles-help)
	(source "Prefs/DoDIZ.default")
	(dest "ENV:")
	(newname "DoDIZ.default")
)

(copyfiles
	(prompt "Copying DoDIZ.default to ENVARC:")
	(help @copyfiles-help)
	(source "Prefs/DoDIZ.default")
	(dest "ENVARC:")
	(newname "DoDIZ.default")
)

(complete 70)

(set #installdodesc
	(askbool 
		(prompt "\nWould you like to install DoDescript?\n(Required for the default settings)")
		(help "")
	)
)

(if #installdodesc
	(
		(set #program-dest "C:")
		(set #program-dest (askdir 
      		  (prompt "Where do you like to install DoDescript?\nThe directory should be somewere in your path!")
		        (help @askdir-help) 
		        (default #program-dest)
		        (disk) ))
		(set #install020
			(askbool 
				(prompt "\nWould you like to install DoDescript 68020 version?")
				(help "")
			)
		)
		(if #install020
			(
				(copylib
					(prompt "\nCopying DoDescript to " #program-dest)
					(help @copylib-help)
					(source "Bin/DoDescript_020")
					(dest #program-dest)
					(newname "DoDescript")
					(confirm)
				)
			)
			(
				(copylib
					(prompt "\nCopying DoDescript to " #program-dest)
					(help @copylib-help)
					(source "Bin/DoDescript")
					(dest #program-dest)
					(confirm)
				)
			)
		)
		(complete 80)
		(set #doc-dest "HELP:")
		(set #doc-dest (askdir 
      		  (prompt "Where do you like to install DoDescript.guide?")
		        (help @askdir-help) 
		        (default #doc-dest)
		        (disk) ))
		(copyfiles
			(prompt "Copying DoDescript.guide to " #doc-dest)
			(help @copyfiles-help)
			(source "Doc/DoDescript.guide")
			(dest #doc-dest)
		)
	)
)

(complete 100)

;------------------------------------------------------------------------
