; Install-SFX Start -----------------------------------------------------------------------------------------
;
; $VER: Install-SFX (17.07.1995)
;
; SoundFX 3.20 Installscript
; (C) Copyright 1993-1995 Stefan Kost. All Rights Reserved.
;
; -----------------------------------------------------------------------------------------------------------

; setze sprachenabhängige Texte -----------------------------------------------------------------------------

(IF (= @LANGUAGE "english")
(
	(SET #bad-kick			"SoundFX3.2 requires at least Kickstart 2.04 !")
	(SET #welcome-messy 	"\n\nWelcome to the installation of SoundFX3.2 !")
	(SET #choose-dest		"Please choose a destination directory !\nA drawer called SFX will be automatically generated !")
	(SET #choose-dest-help	"Here you can choose the place on your HD, were SFX should be installed")
	(SET #dest-require		"\n\nPlease be shure, that you have on your HD at least 1.0 Mb free !")
	(SET #copy-fonts		"copying Fonts ...")
	(SET #copy-libs			"copying Librarys ...")
	(SET #copy-keyfile		"copying Keyfile ...")
	(SET #copy-synths		"copying Synths ...")
	(SET #copy-eqshapes		"copying EQ-Shapes ...")
	(SET #copy-envelopes	"copying Envelopes ...")
	(SET #copy-rexxscripts	"copying ARexx-Scripts ...")
	(SET #copy-guides		"copying Guides ...")
	(SET #copy-executable	"copying Executable ...")
	(SET #copy-help			"The respective files will copied to your HD.")
	(SET #choose-lang		"Please choose your prefered language for the documentation !")
	(SET #choose-lang-help	"The documentation and OnLine-Help are existing in different languages - choose the one you understand best")
	(SET #choose-pver		"Please choose the programversion to be installed !")
	(SET #choose-pver-help	"This depends on your computerhardware (processor/mathcopro.) !")
	(SET #exit-messy		"\n\nSFX could successfuly installed.\nPlease read the guide, to learn how to work with the program.\n")
))
(IF (= @LANGUAGE "deutsch")
(
	(SET #bad-kick			"SoundFX3.2 benötigt mindestens Kickstart 2.04 !")
	(SET #welcome-messy		"\n\nWillkommen zur Installation von SoundFX3.2 !")
	(SET #choose-dest		"Bitte Zielverzeichnis aussuchen !\nEin Verzeichnis mit dem Namen SFX wird angelegt !")
	(SET #choose-dest-help	"Hier können Sie auswählen, wohin Sie das Programm installeren möchten")
	(SET #dest-require		"\n\nBitte stellen Sie sicher, daß auf der Zielpartition\n 1.0 Mb-Speicher frei ist !")
	(SET #copy-fonts		"kopiere Fonts ...")
	(SET #copy-libs			"kopiere Librarys ...")
	(SET #copy-keyfile		"kopiere Keyfile ...")
	(SET #copy-synths		"kopiere Synths ...")
	(SET #copy-eqshapes		"kopiere EQ-Shapes ...")
	(SET #copy-envelopes	"kopiere Envelopes ...")
	(SET #copy-rexxscripts	"kopiere ARexx-Scripts ...")
	(SET #copy-guides		"kopiere Guides ...")
	(SET #copy-executable	"kopiere Executable ...")
	(SET #copy-help			"Die entsprechenden Dateien werden gerade auf ihre Festplatte kopiert.")
	(SET #choose-lang		"Bitte wählen Sie Ihre bevorzugte Sprache für die Dokumentation aus !")
	(SET #choose-lang-help	"Die Dokumentation und OnLine-Hilfe existiert in mehreren Sprachen - wählen Sie die Sprache aus, die Sie am besten verstehen")
	(SET #choose-pver		"Bitte wählen Sie die zu installierende Programmversion aus !")
	(SET #choose-pver-help	"Die Version ist von Ihrer verwendeten Computerhardware (Prozessor/MatheCo.) abhängig !")
	(SET #exit-messy		"\n\nSFX konnte erfolgreich installiert werden.\nBitte lesen Sie das Guide, um zu erfahren wie das Programm bedient wird.\n")
))

; check kick version ----------------------------------------------------------------------------------------

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

; los geht`s ------------------------------------------------------------------------------------------------

(MESSAGE #welcome-messy)
(COMPLETE 0)

(SET @default-dest
	(ASKDIR
		(PROMPT #choose-dest)
		(HELP #choose-dest-help)
		(DEFAULT @default-dest)
	)
)
(MESSAGE #dest-require)

; falls nicht vorhanden, Verzeichnis anlegen ----------------------------------------------------------------
(SET @default-dest (TACKON @default-dest "SFX"))
(SET sfx-dest @default-dest)
(IF (= (EXISTS sfx-dest) 0)
	(MAKEDIR sfx-dest (INFOS))
)

; Fonts kopieren --------------------------------------------------------------------------------------------
(COMPLETE 8)
(COPYFILES
	(PROMPT #copy-fonts)
	(HELP #copy-help)
	(SOURCE "Fonts/")
	(DEST "FONTS:")
	(ALL)
)

; Libs kopieren ---------------------------------------------------------------------------------------------
(COMPLETE 12)
(COPYLIB
	(PROMPT #copy-libs)
	(HELP #copy-help)
	(SOURCE "Libs/amigaguide.library")
	(DEST "LIBS:")
)

; Keyfile kopieren ------------------------------------------------------------------------------------------
(COMPLETE 17)
(SET sfxsub-dest "DEVS:keyfiles")
(IF (= (EXISTS sfxsub-dest) 0)
	(MAKEDIR sfx-dest (INFOS))
)
(IF (= (EXISTS "Keyfiles/SFX.key") 1)
	(COPYFILES
		(PROMPT #copy-keyfile)
		(HELP #copy-help)
		(SOURCE "Keyfiles/SFX.key")
		(DEST "DEVS:keyfiles/")
	)
)

; Synths ----------------------------------------------------------------------------------------------------
(COMPLETE 20)
(SET sfxsub-dest (TACKON sfx-dest "Synths"))
(IF (= (EXISTS sfx-dest) 0)
	(MAKEDIR sfxsub-dest (INFOS))
)
(COPYFILES
	(PROMPT #copy-synths)
	(HELP #copy-help)
	(SOURCE "Synths/")
	(DEST sfxsub-dest)
	(ALL)
)

; Eqshapes --------------------------------------------------------------------------------------------------
(COMPLETE 35)
(SET sfxsub-dest (TACKON sfx-dest "Eqshps"))
(IF (= (EXISTS sfx-dest) 0)
	(MAKEDIR sfxsub-dest (INFOS))
)
(COPYFILES
	(PROMPT #copy-eqshapes)
	(HELP #copy-help)
	(SOURCE "Eqshps/")
	(DEST sfxsub-dest)
	(ALL)
)

; Envelopes -------------------------------------------------------------------------------------------------
(COMPLETE 40)
(SET sfxsub-dest (TACKON sfx-dest "Envelopes"))
(IF (= (EXISTS sfx-dest) 0)
	(MAKEDIR sfxsub-dest (INFOS))
)
(COPYFILES
	(PROMPT #copy-envelopes)
	(HELP #copy-help)
	(SOURCE "Envelopes/")
	(DEST sfxsub-dest)
	(ALL)
)

; ARexx-Scripte ---------------------------------------------------------------------------------------------
(COMPLETE 50)
(SET sfxsub-dest (TACKON sfx-dest "Rexx"))
(COPYFILES
	(PROMPT #copy-rexxscripts)
	(HELP #copy-help)
	(SOURCE "Rexx/")
	(DEST sfxsub-dest)
	(ALL)
)

; Guide -----------------------------------------------------------------------------------------------------
;
;(SET sfxsub-dest (TACKON sfx-dest "Guides"))
;(IF (= (EXISTS sfx-dest) 0)
;	(MAKEDIR sfxsub-dest (INFOS))
;)
;(SET gver
;	(ASKCHOICE
;		(PROMPT #choose-lang)
;		(HELP -choose-lang-help)
;		(CHOICES
;			"english"
;			"german"
;		)
;		(DEFAULT 0)
;	)
;)
;(COMPLETE 60)
;(IF (= gver 0)
;	(COPYFILES
;		(PROMPT #copy-guides)
;		(HELP #copy-help)
;		(SOURCE "Guides_engl/")
;		(DEST sfxsub-dest)
;		(ALL)
;		(INFOS)
;	)
;)
;(IF (= gver 1)
;	(COPYFILES
;		(PROMPT #copy-guides)
;		(HELP #copy-help)
;		(SOURCE "Guides_dt/")
;		(DEST sfxsub-dest)
;		(ALL)
;		(INFOS)
;	)
;)
;
; Versionsauswahl -------------------------------------------------------------------------------------------
(COMPLETE 80)
(SET pver
	(ASKCHOICE
		(PROMPT #choose-pver)
		(HELP -choose-pver-help)
		(CHOICES
			"68000"
			"68030-881"
		)
		(DEFAULT 0)
	)
)
(IF (= pver 0)
	(COPYFILES
		(PROMPT #copy-executable)
		(HELP #copy-help)
		(SOURCE "SFX/sfx.68000")
		(DEST sfx-dest)
		(NEWNAME "SoundFX")
	)
)
(IF (= pver 1)
	(COPYFILES
		(PROMPT #copy-executable)
		(HELP #copy-help)
		(SOURCE "SFX/sfx.68030-881")
		(DEST sfx-dest)
		(NEWNAME "SoundFX")
	)
)
(COPYFILES
	(SOURCE "SFX/SoundFX.info")
	(DEST sfx-dest)
)

; Fertig ----------------------------------------------------------------------------------------------------
(COMPLETE 99)
(MESSAGE #exit-messy)
(COMPLETE 100)

(EXIT (QUIET))
; Install-SFX Ende ------------------------------------------------------------------------------------------
