;Standard Installer script
;Written by Marco Biondi
;@1995/96 Light Shock software s.n.c

(set destinazione @default-dest)

(set destinazione
	(askdir 
		(prompt ("Wählen Sie das Zielverzeichns für %s:" @app-name))
		(help @askdir-help)
		(default destinazione)
	)
)

(if (NOT (exists destinazione (quiet))) 
	(abort "Den angegebenen Pfad gibt es nicht!")
)

(set spaziorichiesto 3520)

(set disponibile (/ (getdiskspace destinazione) 1024) )

(if (< disponibile spaziorichiesto)
	(set domanda "ACHTUNG: NICHT GENUG PLATZ VORHANDEN!.\nTROTZDEM FORTFAHREN?"
	)
	(set domanda ""
	)	
)

(message 
	("Die Installation von %s benötigt ca. %ld KB freien Diskspeicher.\n\n"
		@app-name
		spaziorichiesto
	)
	("Im angewählten Pfad (%s) sind %ld KBytes verfügbar.\n\n"
		destinazione
		disponibile
	)
	domanda
)

(copyfiles
	(prompt "Schreibe Daten...")
	(help @copyfiles-help)
	(source "FSpirit-INSTALL:FsDiskID")
	(dest "T:")
)

(copyfiles
	(help @copyfiles-help)
	(source "FSpirit-INSTALL:Disk2Bin")
	(dest "T:")
)

(copyfiles
	(help @copyfiles-help)
	(source "FSpirit-INSTALL:Spirit")
	(dest "T:")
)

(copyfiles
	(help @copyfiles-help)
	(source "FSpirit-INSTALL:Spirit.in")
	(dest "T:")
)

(complete 1)

(working "Legen Sie bitte Disk 1 in DF0:")

(until
	(= "1\n"
		(
			(run "T:FsDiskID >env:Number")
			(set risultato (getenv "Number"))
		)
	)
)

(message "Installiere Disk 1")

(run ("T:Disk2Bin %s" (tackon destinazione "Spirit1.bin")))

(complete 25)

(working "Legen Sie bitte Disk 2 in DF0:")

(until
	(= "2\n"
		(
			(run "T:FsDiskID >env:Number")
			(set risultato (getenv "Number"))
		)
	)
)

(message "Installiere Disk 2")

(run ("T:Disk2Bin %s" (tackon destinazione "Spirit2.bin")))

(complete 49)

(working "Legen Sie bitte Disk 3 in DF0:")

(until
	(= "3\n"
		(
			(run "T:FsDiskID >env:Number")
			(set risultato (getenv "Number"))
		)
	)
)

(message "Installiere Disk 3")

(run ("T:Disk2Bin %s" (tackon destinazione "Spirit3.bin")))

(complete 75)

(working "Legen Sie bitte Disk 4 in DF0:")

(until
	(= "4\n"
		(
			(run "T:FsDiskID >env:Number")
			(set risultato (getenv "Number"))
		)
	)
)

(message "Installiere Disk 4")

(run ("T:Disk2Bin %s" (tackon destinazione "Spirit4.bin")))

(complete 99)

(copyfiles
	(prompt "Schreibe Daten...")
	(help @copyfiles-help)
	(source "T:Spirit")
	(dest destinazione)
)

(copyfiles
	(prompt "Schreibe Daten...")
	(help @copyfiles-help)
	(source "T:Spirit.in")
	(dest destinazione)
	(newname "Spirit.info")
)

(complete 100)

(exit "Um das Spiel zu starten, führen Sie einen Doppelklick auf das Icon aus.\n\n"
	"ACHTUNG: Sie können das Spiel nur durch ein RESET verlassen\n\n"
	"Viel Spaß.\n\n" "@1995/96 NEO Software GmbH - Light Shock software s.n.c."
)

