
(if (exists "Vertex:" (noreq))
	(
		(set toto (expandpath "Vertex:") )
	)
	( 	(set tot 
			(askdir
				(prompt 	"Where should the Vertex directory be created?\n")
				(help @askdir-help)
				(default "WORK:")
			)
		)
		(makedir 
			(tackon tot "Vertex") 
			(infos)
		)
		(set toto (tackon tot "Vertex") )
		(makeassign "Vertex" toto (safe) )
	)
)

(copyfiles
	(prompt ("Copying program \"Vertex\" to %s" toto) )
	(help @copyfiles-help)
	(source "Vertex2.0_demo:Vertex")
	(dest "vertex:")
	(pattern "Vertex#?")
	(infos)
	(files)
)

(copyfiles
	(prompt ("Copying file \"Quick_Manual.doc\" to %s" toto) )
	(help @copyfiles-help)
	(source "Vertex2.0_demo:")
	(dest "vertex:")
	(pattern "Quick#?")
	(infos)
	(files)
)

(set processor	(database "cpu") )

(if (or (= processor "68040") (= processor "68020") (= processor "68030"))
	(if 
	(askbool
		(prompt "\n"
			"Do you have a math co-processor installed?\n"
			"Answering \'Yes\' will copy the file\n"
			"V3D.Library to your LIBS: directory\n"
			"\n"
			"(NOTE: Not all machines have math-coprocessors)\n")
		(help "\n"
			"Vertex needs to know if you have a math co-processor\n"
			"installed in your system.  Answering \'Yes\' will\n"
			"install a V3d.library, which will boost performace\n"
			"since it uses the math co-processor.  If you do not\n"
			"have a math co-processor, then answer \'No\'\n" )
		(choices "Yes" "No")
		(default 0)
	)
	(copyfiles
		(prompt ("Copying program \"Vertex\" to %s" toto) )
		(help @copyfiles-help)
		(source "Vertex2.0_demo:Libs")
		(dest "Libs:")
		(all)
		(files)
	)
	)
)



(set choice
	(askoptions
		(prompt "What elements would you like installed?")
		(help @askoptions-help)
		(choices 
		   " Arexx macros" " Math equations" " Fractal tree parameters"
		   " Sample import files" " Sample objects" )
		(default 31)
	)
)

(if 	(bitand choice 1)
		(	(makedir "Vertex:Rexxy"
				(prompt "Creating \"Vertex:Rexxy\" directory.")
				(help @makedir-help)
				(infos))
			(copyfiles
				(prompt ("Copying Arexx scripts to Verrex:Rexxy") )
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Rexxy")
				(dest "Vertex:Rexxy")
				(all)
				(files))
			(copyfiles
				(Prompt "copying icon .info files")
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Rexxy.info")
				(dest "Vertex:")
			)
		)
)

(if 	(bitand choice 2)
		(	(makedir "Vertex:Equations"
				(prompt "Creating \"Vertex:Equations\" directory.")
				(help @makedir-help)
				(infos))
			(copyfiles
				(prompt ("Copying  files to Vertex:Equations") )
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Equations")
				(dest "Vertex:Equations")
				(all)
				(files))
			(copyfiles
				(Prompt "copying icon .info files")
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Equations.info")
				(dest "Vertex:")
			)
		)
)

(if (bitand choice 4)
		(	(makedir "Vertex:Trees"
				(prompt "Creating \"Vertex:Trees\" directory.")
				(help @makedir-help)
				(infos))
			(copyfiles
				(prompt ("Copying Tree files to Verrex:Trees") )
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Trees")
				(dest "Vertex:Trees")
				(all)
				(files))
			(copyfiles
				(Prompt "copying icon .info files")
				(help @copyfiles-help)
				(source "Vertex2.0_Demo:Vertex/Trees.info")
				(dest "Vertex:")
			)
		)
)

(if (bitand choice 8)
		(	(makedir "Vertex:Import"
				(prompt "Creating \"Vertex:Import\" directory.")
				(help @makedir-help)
				(infos))
			(copyfiles
				(prompt ("Copying Tree files to Verrex:Import") )
				(help @copyfiles-help)
				(source "Vertex2.0_demo:Vertex/Import")
				(dest "Vertex:Import")
				(all)
				(files))
			(copyfiles
				(Prompt "copying icon .info files")
				(help @copyfiles-help)
				(source "Vertex2.0_demo:Vertex/Import.info")
				(dest "Vertex:")
			)
		)
)

(if (bitand choice 16)
		(	(makedir "Vertex:Objects"
				(prompt "Creating \"Vertex:Objects\" directory.")
				(help @makedir-help)
				(infos))
			(copyfiles
				(prompt ("Copying Tree files to Vertex:Objects") )
				(help @copyfiles-help)
				(source "Vertex2.0_demo:Vertex/Objects")
				(dest "Vertex:Objects")
				(all)
				(files))
			(copyfiles
				(Prompt "copying icon .info files")
				(help @copyfiles-help)
				(source "Vertex2.0_demo:Vertex/Objects.info")
				(dest "Vertex:")
			)
		)
)

(makedir "FONTS:menu")
(copyfiles
	(prompt "Copying Menu font to your FONTS: directory" )
	(source "Vertex2.0_Demo:Fonts")
	(dest "FONTS:")
	(all)
	(files)
)
(copyfiles
	(prompt "Copying Menu13 font to the FONTS:menu directory" )
	(source "Vertex2.0_Demo:Fonts/Menu")
	(dest "FONTS:")
	(all)
	(files)
)

(copyfiles
	(prompt "Installing the default configuration files")
		(source "Vertex2.0_Demo:S")
		(dest "S:")
		(all)
		(files)
)

(startup
	"Vertex2.0"
	(command ("Assign Vertex: %s" toto) )
	(prompt	"\n"
				"To properly install Vertex2.0, a few lines will\n"
				"need to be added to your S:user-startup file\n"
				"Do you wish to proceed?")
	(help		"This will add an assignment to your s:user-startup\n"
				"file so Vertex can always locate the Vertex: device.\n")

)


(set @default-dest toto)
