
(complete 0)

(set locale 0)
(set app-name "HNet V1.0ß")

; English strings

(if (= @language "english")
(

(set #select-dir (cat "Select the directory where the HNet Directory will be created."))
(set #copy (cat "Copying HNet"))
(set #files (cat "Select Servers/Clients to install."))
(set #copyhelp (cat "NChat - Network Chat program.\nStopNet - Needed to exit HNet.\nStrSnd - Send String. This program will display the string you enter on the other computer."))
(set #libcopy (cat "Copying gtlayout.library to LIBS:"))
(set #startup (cat "Some commands will be added to your \"s:user-startup\" file."))

))

(if (= @language "svenska")
(

(set #select-dir (cat "Välj en sökväg där katalogen HNet ska skapas."))
(set #copy (cat "Kopierar HNet"))
(set #files (cat "Välj Servers/Clients att installera.."))
(set #copyhelp (cat "NChat - Network Chat program.\nStopNet - Nödvändingt för att avsluta HNet.\nStrSnd - Send String. Visar den textsträng du skriver in, på den andra datorn i nätverket."))
(set #libcopy (cat "Kopierar gtlayout.library till LIBS:"))
(set #startup (cat "Några kommandon kommer nu att läggas till i filen  \"s:user-startup\"."))

))


; Installation

(if (< (/ (getversion) 65536) 37)
(
    (abort #bad-kick)
))

(set hntd "Ram:")

(set hntd
	(askdir
		(prompt #select-dir)
		(help "")
		(default "Sys:")
		(newpath hntd)
	)
)

; Copy files

(complete 10)

(set @default-dest hntd)
(set hntp hntd)
(set hntd (tackon hntd "HNet"))
(set bin (tackon hntd "bin"))
(set util (tackon hntd "util"))

(set fileopt
	(askoptions
		(prompt #files)
		(choices "NChat" "StopNet" "StrSnd")
		(default %111)
		(help #copyhelp)
	)
)

(if (in fileopt 0)
	(copyfiles
		(prompt #copy)
		(source "bin/nchat")
		(help @copy-files-help)
		(optional "askuser")
		(dest hntd)
	)
)

(complete 20)

(copyfiles
	(prompt #copy)
	(source "bin/exec")
	(help @copy-files-help)
	(dest bin)
)

(complete 30)

(copyfiles
	(prompt #copy)
	(source "bin/main")
	(help @copy-files-help)
	(dest bin)
)

(complete 40)

(copyfiles
	(prompt #copy)
	(source "bin/startnet")
	(help @copy-files-help)
	(dest hntd)
)

(complete 50)

(if (in fileopt 1)
	(copyfiles
		(prompt #copy)
		(source "bin/stopnet")
		(help @copy-files-help)
		(dest hntd)
	)
)

(complete 60)

(if (in fileopt 2)
	(copyfiles
		(prompt #copy)
		(source "bin/strsnd")
		(help @copy-files-help)
		(dest util)
	)
)

(complete 70)

(copyfiles
	(prompt #copy)
	(source "bin/echos")
	(help @copy-files-help)
	(dest util)
)

(complete 75)

(copylib
	(source	"Libs/gtlayout.library")
	(dest "LIBS:")
	(prompt "\n" #libcopy)
	(help @copylib-help)
	(confirm)
)

(complete 85)

(copyfiles
	(source "bin/bin.info")
	(help @copy-files-help)
	(dest hntd)
	(newname "Util.info")
)

(copyfiles
	(source "bin/bin.info")
	(help @copy-files-help)
	(dest hntp)
	(newname "HNet.info")
)

;(copyfiles
;	(source "bin/tool.info")
;	(help @copy-files-help)
;	(dest hntp)
;	(newname "HNet.info")
;)

(complete 90)

(startup "HNet"
	(prompt #startup)
	(help @startup-help)
	(command "Assign >NIL: HNT: \"" hntd "\"\n")
	(command "Path >NIL: HNT:Util HNT:Bin ADD\n")
	(command "Execute >NIL: HNT:StartNet\n")
)

(complete 99)

(exit)

