; PC-Task v3.0 Install Script (1.0)
; 29/11/94	Copyright 1994 Quasar Distribution
; Translated by:

(set @default-dest "SYS:")

; English language

(set #pctask-location
(cat "Select location to put PC-Task 3 directory:"
))

(set #copying-files
(cat "Copying files..."
))

(set #help-askbool
(cat "Please select Yes to install the file(s) "
	 "or select No so they are not installed. "
))

(set #data-set
(cat "Which programs do you wish to install?"
))


(set #whichone-help
(cat "You are able to choose which PC-Task program "
	 "to install.  The difference is that the Turbo "
     "version of PC-Task uses 4 times as much memory "
     "and the program is over twice the size, but the "
	 "advantage is you get faster emulation. " 
))

(set #notknown-set
(cat "CPU not known.  Please chose program to install."
))

(set #install-asl
(cat "You have Kickstart 2.0+\nasl.library can be used\n"
     "This allows you to select your screen modes from "
	 "a list of available modes on your machine. "
))

(set #install-hardfiledevice
(cat "Do you wish to install the hardfile.device?\n"
	 "This is needed if you wish to access a PC drive "
	 "(which you have created for PC-Task) from AmigaDOS "
))

(set #copy-hardfile
(cat "Copying hardfile.device"
))

(set #install-msdosutils
(cat "Do you wish to install the MSDOSUtils directory?\n"
	 "This directory contains some useful utilities "
	 "which will come in handy when using PC-Task. "
))

(set #install-tdpatch
(cat "Do you wish to install the TDPatch1213 program?\n"
	 "This is necessary if you are running Kickstart 1.3 "
	 "or Kickstart 1.2.  It patches the disk drive so "
	 "PC-Task will work correctly.  TDPatch1213 should be "
	 "run before you start PC-Task. "
))

(set #install-leaveslowfast
(cat "Do you wish to install the LeaveSlowFast program?\n"
	 "This program is useful to get more memory when you "
	 "have a machine with 512K Chip memory and 512K Fast "
	 "RAM.  Use this so PC-Task can allocate more memory "
	 "for its emulation. "
))

(set #copy-msdosutils
(cat "Copying MSDOSUtils directory"
))

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

(set dest2	(askdir	(prompt #pctask-location)
			(default @default-dest)
			(help @askdir-help)
			)
)

(set dest1 (tackon dest2 "PC-Task"))
(makedir dest1 (infos))

; copy the PC-Task program
(set machine (database "cpu"))

(if (OR (= machine "68000") (= machine "68010"))
	(
		(set types_to_install
			(askoptions
				(prompt #data-set)
				(help #whichone-help)
				(choices "PC-Task68000_10"
					 "PC-TaskTurbo68000_10"
				)
			)
		)

		(if (IN types_to_install 0)
			(
				(copyfiles
					(prompt #copying-files)
					(source "PCTASK_30:")
					(dest dest1)
					(choices "PC-Task68000_10")
					(infos)
					(help @copyfiles-help)
				)
				(tooltype
					(help @tooltype-help)
					(dest (tackon dest1 "PC-Task68000_10"))
					(noposition)
					(swapcolors)
				) 
			)
		)
	
		(if (IN types_to_install 1)
			(
				(copyfiles
					(prompt #copying-files)
					(source "PCTASK_30:")
					(dest dest1)
					(choices "PC-TaskTurbo68000_10")
					(infos)
					(help @copyfiles-help)
				)
				(tooltype
					(help @tooltype-help)
					(dest (tackon dest1 "PC-TaskTurbo68000_10"))
					(noposition)
					(swapcolors)
				) 
			)
		)
	)

	(
		(if (OR (= machine "68020") (= machine "68030") (= machine "68040"))
			(

				(set types_to_install
					(askoptions
						(prompt #data-set)
						(help #whichone-help)
						(choices "PC-Task68020_60"
							 "PC-TaskTurbo68020_60"
						)
					)
				)

				(if (IN types_to_install 0)
					(
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK_30:")
							(dest dest1)
							(choices "PC-Task68020_60")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-Task68020_60"))
							(noposition)
							(swapcolors)
						) 
					)
				)

				(if (IN types_to_install 1)
					(
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK_30:")
							(dest dest1)
							(choices "PC-TaskTurbo68020_60")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-TaskTurbo68020_60"))
							(noposition)
							(swapcolors)
						) 
					)
				)
	
			)


			(
				(set types_to_install
					(askoptions
						(prompt #notknown-set)
						(help #whichone-help)
						(choices "PC-Task68000_10"
							 "PC-TaskTurbo68000_10"
							 "PC-Task68020_60"
							 "PC-TaskTurbo68020_60"
						)
					)
				)

				(if (IN types_to_install 0)
					(
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK_30:")
							(dest dest1)
							(choices "PC-Task68000_10")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-Task68000_10"))
							(noposition)
							(swapcolors)
						) 
					)
				)
			
				(if (IN types_to_install 1)
					(
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK_30:")
							(dest dest1)
							(choices "PC-TaskTurbo68000_10")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-TaskTurbo68000_10"))
							(noposition)
							(swapcolors)
						) 
					)
				)

				(if (IN types_to_install 2)
					(
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK_30:")
							(dest dest1)
							(choices "PC-Task68020_60")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-Task68020_60"))
							(noposition)
							(swapcolors)
						) 
					)
				)
			
				(if (IN types_to_install 3)
					(				
						(copyfiles
							(prompt #copying-files)
							(source "PCTASK30:")
							(dest dest1)
							(choices "PC-TaskTurbo68020_60")
							(infos)
							(help @copyfiles-help)
						)
						(tooltype
							(help @tooltype-help)
							(dest (tackon dest1 "PC-TaskTurbo68020_60"))
							(noposition)
							(swapcolors)
						) 
					)
				)
			)
		)
	)
)


(copyfiles
	(source "PCTASK_30:")
	(dest dest1)
	(choices "README_FIRST!")
	(infos)
	(help @copyfiles-help)
)

(tooltype
	(help @tooltype-help)
	(dest (tackon dest1 "README_FIRST!"))
	(noposition)
) 
		
(set vernum (getversion))
(set ver (/ vernum 65536))

(if (AND (>= ver 37) (<= ver 38))
	(
		(copylib
			(prompt #install-asl)
			(source "PCTASK_30:libs/asl.library")
			(dest "libs:")
			(optional nofail askuser force)
			(confirm)
			(help @copylib-help)
		)
	)
)


(if (<= ver 34)
	(
		(set hardy
			(askbool
				(prompt #install-tdpatch)
				(help #help-askbool)
			)
		)

		(if (= hardy 1)
			(
				(copyfiles
					(prompt #copying-files)
					(source "PCTASK_30:")
					(dest dest1)
					(choices "TDPatch1213"
						     "TDPatch1213.doc")
					(infos)
					(help @copyfiles-help)
				)
				(tooltype
					(help @tooltype-help)
					(dest (tackon dest1 "TDPatch1213"))
					(noposition)
				) 
				(tooltype
					(help @tooltype-help)
					(dest (tackon dest1 "TDPatch1213.doc"))
					(noposition)
				) 
			)
		)
	)
)

(set hardy 	(askbool
			(prompt #install-leaveslowfast)
			(help #help-askbool)
		)
)

(if (= hardy 1)
	(
		(copyfiles
			(prompt #copy-hardfile)
			(source "PCTASK_30:")
			(dest dest1)
			(choices "LeaveSlowFast"
					 "LeaveSlowFast.doc")
			(infos)
			(help @copyfiles-help)
		)
		(tooltype
			(help @tooltype-help)
			(dest (tackon dest1 "LeaveSlowFast"))
			(noposition)
		) 
		(tooltype
			(help @tooltype-help)
			(dest (tackon dest1 "LeaveSlowFast.doc"))
			(noposition)
		) 
	)
)



(set hardy 	(askbool
			(prompt #install-hardfiledevice)
			(help #help-askbool)
		)
)

(if (= hardy 1)
	(copylib
		(prompt #copy-hardfile)
		(source "PCTASK_30:devs/hardfile.device")
		(dest "devs:")
		(optional nofail askuser force)
		(confirm)
		(help @copyfiles-help)
	)
)


(set hardy 	(askbool
			(prompt #install-msdosutils)
			(help #help-askbool)
		)
)

(if (= hardy 1)
	(
		(set dest2 (tackon dest1 "MSDOSUtils"))
		(copyfiles
			(infos)
			(prompt #copy-msdosutils)
			(source "PCTASK_30:MSDOSUtils")
			(dest dest2)
			(all)
			(help @copyfiles-help)
		)
		(tooltype
			(help @tooltype-help)
			(dest dest2)
			(noposition)
		) 
	)
)

(set @default-dest dest1)
