;*******************************
;*                             *
;* Install - ARexxConvert V1.0 *
;*                             *
;*   script by Olaf Gramkow    *
;*                             *
;*   copyright © 1994 TEXMAC   *
;*                             *
;*******************************

(set KickVersion (/ (getversion) 65536))
(if (< KickVersion 36)
	(abort
	"\n\n\n\n"
	"You need at least\n"
	"Kickstart Version 2.0"
	)
)

(complete 0)

(set target
	(askdir
		(prompt
			"In which drawer shall I install ARexxConvert?\n"
			"(no own directory will be created by the script)"
		)
		(help
			"Selecting Hard Disk will install ARexxConvert V1.0 on the "
			"hard disk. You will be asked what directory or partition you "
			"would like to install it on. The default is Work:. A directory "
			"called 'TEXAdress' will be placed in the directory you choose.\n\n"
		)
		(default "Work:")
	)
)

(set @default-dest target)

(complete 10)

(set answer
        (askchoice
		(prompt
		"Choose which version you want to install\n"
		"Which speech do you want to take?"
		)		
                (choices "English" "German")
        	(help
			("Selecting Hard Disk will install TEXAdress V%s on the " versionsnummer)
			 "hard disk. You will be asked what directory or partition you "
			 "would like to install it on. The default is Work:. A directory "
			 "called 'TEXAdress' will be placed in the directory you choose.\n\n"
			("Selecting Floppy Disk will install TEXAdress V%s on " versionsnummer)
			("a set of %s floppy disks.\n" diskanzahl)
		)
                (default 0)
        )
)

(complete 20)

(if (= answer 0)
	(

		(copyfiles
			(prompt "Copying ARexxConvert (Window-Version) to %s" @default-dest)
			(help	@copyfiles-help)
			(source	"ARexxConvert:English/ARexxConvert")
			(dest	@default-dest)
			(infos)
			(confirm)
		)

		(complete 35)

		(copyfiles
			(prompt "Copying ARexxConvert-Help (file required) to %s" @default-dest)
			(help	@copyfiles-help)
			(source	"ARexxConvert:English/ARexxConvert.guide")
			(dest	@default-dest)
			(infos)
			(confirm)
		)
	)
	(

		(copyfiles
			(prompt "Copying ARexxConvert (Window-Version) to %s" @default-dest)
			(help	@copyfiles-help)
			(source	"ARexxConvert:German/ARexxConvert")
			(dest	@default-dest)
			(infos)
			(confirm)
		)

		(complete 35)

		(copyfiles
			(prompt "Copying ARexxConvert-Help (file required) to %s" @default-dest)
			(help	@copyfiles-help)
			(source	"ARexxConvert:German/ARexxConvert.guide")
			(dest	@default-dest)
			(infos)
			(confirm)
		)
	)
)

(complete 50)

(copyfiles
	(prompt "Copying ARexxConvert (CLI-Version) to C:")
	(help	@copyfiles-help)
	(source	"ARexxConvert:c/ARexxConvert")
	(dest	"C:")
	(confirm)
)

(complete 60)

(copyfiles
	(prompt "Copying AmigaGuide to SYS:Utilities")
	(help	@copyfiles-help)
	(source	"ARexxConvert:Utilities/AmigaGuide")
	(dest	"SYS:Utilities")
	(infos)
	(confirm)
)

(complete 70)

(copyfiles
	(prompt ("Copying ReadMe to %s" @default-dest))
	(help	@copyfiles-help)
	(source	"ARexxConvert:ReadMe")
	(dest	@default-dest)
	(infos)
	(confirm)
)

(complete 80)

(working "")

(set libpath "libs:")

(copylib
	(prompt ("Copying reqtools.library to %s" libpath))
	(help
	"If you already have a copy of this library in the selected destination directory, the library "
	"included on the distribution disk will be compared to the one you "
	"already have. If your current library is an old version, the newer "
	"version will be installed.\n\n"
	@copylib-help
	)
	(source	"ARexxConvert:libs/reqtools.library")
	(dest libpath)
	(confirm)
)

(complete 90)

(copylib
	(prompt ("Copying amigaguide.library to %s" libpath))
	(help
	"If you already have a copy of this library in the selected destination directory, the library "
	"included on the distribution disk will be compared to the one you "
	"already have. If your current library is an old version, the newer "
	"version will be installed.\n\n"
	@copylib-help
	)
	(source	"ARexxConvert:libs/amigaguide.library")
	(dest libpath)
	(confirm)
)

(complete 98)

(startup "ARexxConvert"
	(prompt
	"The following assign have been created."
        "Do you want the them and the path statement added to your startup?\n\n"
	("assign ARexxConvert: %s\n\n" @default-dest)
	"NOTE: The path will not be updated until you reboot."
	)
	(command ("assign ARexxConvert: %s\n" @default-dest))
	(help @startup-help)
)

(complete 100)
