;************************************************************
;*    stormamiga.lib Installer Version 2.4ß 20. März 1997   *
;*                                                          *
;*                  B E T A V E R S I O N                   *
;*                                                          *
;*            © Copyright 1996/97 by COMPIUTECK             *
;*                written by Matthias Henze                 *
;*       english translation written by Thomas Blätte       *
;*                                                          *
;************************************************************
;
; $VER: stormamiga.lib Version 42.10ß Install Version 2.4ß (20.03.97)

(set stormamiga-Version "Version 42.10ß")
(set stormamiga-Datum "20. März 1997")
(set stormamiga-Datum_e "20. March 1997")

;====================================================================
; Initialisierungen
;====================================================================

(set @default-dest "")

(if (= @language "deutsch")
 (
	(set #welcome (cat
	"\nWillkommen bei der Installation der \n"
	"B E T A V E R S I O N\n"
	"der\n"
	"\"stormamiga.lib\"\n"
	""stormamiga-Version" vom "stormamiga-Datum"\n\n"
	"Dieses Skript installiert die \"stormamiga.lib\",\n"
	"entsprechend Ihrer Angaben, auf Ihre Festplatte.\n\n\n"
	"© Kopierrecht 1996/97 bei COMPIUTECK\n"
	"geschrieben von Matthias Henze"))
	
	(set #Sprachstandard_Auswahl (cat
	"\nWählen Sie den Sprachstandard aus, für den Sie die \"stormamiga.lib\" installieren möchten.\n"))
	
	(set #C         " ANSI C")
	(set #C++       " C++")
	
	
	(set #startup_Auswahl (cat
	"\nIn \"ANSI C\" ist es möglich die Startupcodes \"stormamiga_startups.o\" und \"stormamiga_nc_startups.o\" zu verwenden. Dadurch werden die Programme etwas kürzer.\n"
	"\nWelche(n) Startupcode(s) möchten Sie installieren?\n"))
	
	(set #FAR_C_Startupcode     " \"stormamiga_startups.o\" (Far Code)")
	(set #NEAR_C_Startupcode    " \"stormamiga_nc_startups.o\" (Near Code)")
	
	
	(set #C++_startup_Auswahl (cat
	"\nIn \"C++\" ist es möglich die Startupcodes \"stormamiga_C++_startups.o\" und \"stormamiga_nc_C++_startups.o\" zu verwenden. Dadurch werden die Programme etwas kürzer.\n"
	"\nWelche(n) Startupcode(s) möchten Sie installieren?\n"))
	
	(set #FAR_C_C++_Startupcode     " \"stormamiga_C++_startups.o\" (Far Code)")
	(set #NEAR_C_C++_Startupcode    " \"stormamiga_nc_C++_startups.o\" (Near Code)")
	
	
	(set #Versions_Auswahl (cat
	"\nWählen Sie die Bibliothek(en) aus, die Sie installieren möchten.\n"))
	
	(set #MC68EC020+                " Basisbibliothek für MC68EC020+")
	(set #MC68EC020+_&_MC68881+     " Erweiterungsbibliothek für MC68881+")
	(set #MC68040+                  " Erweiterungsbibliothek für MC68040+")
	(set #MC68060                   " Erweiterungsbibliothek für MC68060")
	
	(set #Code_Modell_Auswahl (cat
	"\nDie \"stormamiga.lib\" gibt es für das kleine und das große Code-Modell.\n"
	"\nWelche Version(en) möchten Sie installieren?\n"))
	
	(set #Code_Modell_Auswahl_881 (cat
	"\nDie \"stormamiga_881.lib\" gibt es für das kleine und das große Code-Modell.\n"
	"\nWelche Version(en) möchten Sie installieren?\n"))
	
	(set #Code_Modell_Auswahl_040 (cat
	"\nDie \"stormamiga_040.lib\" gibt es für das kleine und das große Code-Modell.\n"
	"\nWelche Version(en) möchten Sie installieren?\n"))
	
	(set #Code_Modell_Auswahl_060 (cat
	"\nDie \"stormamiga_060.lib\" gibt es für das kleine und das große Code-Modell.\n"
	"\nWelche Version(en) möchten Sie installieren?\n"))
	
	(set #FAR_C     " großes Code-Modell")
	(set #NEAR_C    " kleines Code-Modell")
	
	(set #Standardbeispiele_Auswahl (cat
	"\nUm die Vorteile der \"stormamiga.lib\" etwas zu verdeutlichen, habe ich einige Beispiele beigelegt.\n"
	"\nMöchten Sie diese Beispiele installieren.\n"))
	
	(set #ja    "ja")
	(set #nein  "nein")
	
	(set #Beispiele_Liste (cat
	"Installation der Beispiele.\n"
	"Bitte wählen Sie ein Laufwerk oder ein Verzeichnis.\n"
	"Ein Verzeichnis \"stormamiga_lib_Examples\" wird automatisch erzeugt."))
	
	(set #Spezialbeispiele_Auswahl (cat
	"\nUm die Vorteile und Anwendungsmöglichkeiten der Spezialfunktionen etwas zu verdeutlichen, habe ich einige Beispiele beigelegt.\n"
	"Wenn Sie bereits die Standardbeispiele installiert haben, wird automatisch das gleiche Zielverzeichnis benutzt. Ansonsten können Sie ein Zielverzeichnis auswählen.\n"
	"\nMöchten Sie diese Beispiele installieren.\n"))
	
	
	(set #Spezialfunktionen_Auswahl (cat
	"\nMöchten Sie die Spezialfunktionen der \"stormamiga.lib\" nutzen.\n"))
	
	
	(set #User.dic_Auswahl (cat
	"\nUm das Syntax Highlighting auch für die Spezialfunktionen der \"stormamiga.lib\" nutzen zu können, ist es notwendig ein Benutzerlexikon zu installieren.\n"
	"\nWählen Sie aus, ob und mit welchem Name das Benutzerlexikon installiert werden soll.\n"))
	
	(set #User1.dic         "User 1.dic")
	(set #User2.dic         "User 2.dic")
	(set #User3.dic         "User 3.dic")
	(set #kein_User.dic     "Kein Benutzerlexikon installieren")
	
	
	(set #Anleitungen_Auswahl (cat
	"\nWählen Sie die Sprache(n) für die AmigaGuide Dokumentation aus.\n"
	"\nDie mit \"(n/a)\" markierten Sprachen sind noch nicht verfügbar.\n"))
	
	(set #Deutsch   " Deutsch")
	(set #English   " English  (n/a)")
	(set #Italiano  " Italiano (n/a)")
	(set #Français  " Français (n/a)")
	
	(set #Anleitungen_Liste (cat
	"Installation der Anleitung(en).\n"
	"Bitte wählen Sie ein Laufwerk oder ein Verzeichnis.\n"
	"Es wird kein Verzeichnis erzeugt."))
 )
 (
	(set #welcome (cat
	"\nWelcome to the installation of the\n"
	"B E T A V E R S I O N\n"
	"of\n"
	"\"stormamiga.lib\"\n"
	""stormamiga-Version" from "stormamiga-Datum_e"\n\n"
	"This script installs the \"stormamiga.lib\"\n"
	"according to your specification to your harddisk.\n\n\n"
	"© Copyright 1996/97 by COMPIUTECK\n"
	"written by Matthias Henze"))
	
	(set #Sprachstandard_Auswahl (cat
	"\nPlease choose whether you like to install the \"stormamiga.lib\" for ANSI C or for C++.\n"))
	
	(set #C         " ANSI C")
	(set #C++       " C++")
	
	
	(set #startup_Auswahl (cat
	"\nIn \"ANSI C\" it is possible to use the startup codes \"stormamiga_startups.o\" and \"stormamiga_nc_startups.o\". This will make your programs shorter.\n"
	"\nWhich startup code(s) do you want to install?\n"))
	
	(set #FAR_C_Startupcode     " \"stormamiga_startups.o\" (Far Code)")
	(set #NEAR_C_Startupcode    " \"stormamiga_nc_startups.o\" (Near Code)")
	
	
	(set #C++_startup_Auswahl (cat
	"\nIn \"C++\" it is possible to use the startup codes \"stormamiga_C++_startups.o\" and \"stormamiga_nc_C++_startups.o\". This will make your programs shorter.\n"
	"\nWhich startup code(s) do you want to install?\n"))
	
	(set #FAR_C_C++_Startupcode     " \"stormamiga_C++_startups.o\" (Far Code)")
	(set #NEAR_C_C++_Startupcode    " \"stormamiga_nc_C++_startups.o\" (Near Code)")
	
	
	(set #Versions_Auswahl (cat
	"\nPlease choose the library(-ies) you want to install.\n"))
	
	(set #MC68EC020+                " basic library for MC68EC020+")
	(set #MC68EC020+_&_MC68881+     " expansion library for MC68881+")
	(set #MC68040+                  " expansion library for MC68040+")
	(set #MC68060                   " expansion library for MC68060")
	
	(set #Code_Modell_Auswahl (cat
	"\nThe \"stormamiga.lib\" is available for the small and large code model.\n"
	"\nWhich version(s) do you want to install?\n"))
	
	(set #Code_Modell_Auswahl_881 (cat
	"\nThe \"stormamiga_881.lib\" is available for the small and large code model.\n"
	"\nWhich version(s) do you want to install?\n"))
	
	(set #Code_Modell_Auswahl_040 (cat
	"\nThe \"stormamiga_040.lib\" is available for the small and large code model.\n"
	"\nWhich version(s) do you want to install?\n"))
	
	(set #Code_Modell_Auswahl_060 (cat
	"\nThe \"stormamiga_060.lib\" is available for the small and large code model.\n"
	"\nWhich version(s) do you want to install?\n"))
	
	(set #FAR_C     " large code model")
	(set #NEAR_C    " small code model")
	
	(set #Standardbeispiele_Auswahl (cat
	"\nI added some examples to show the advanages of the \"stormamiga.lib\".\n"
	"\nDo you want to install these examples?\n"))
	
	(set #ja    "yes")
	(set #nein  "no")
	
	(set #Beispiele_Liste (cat
	"Installation of the examples.\n"
	"Please choose a volume or directory.\n"
	"A directory \"stormamiga_lib_Examples\" will be created automatically."))
	
	(set #Spezialbeispiele_Auswahl (cat
	"\nI added some examples to show the advanages and features of the special functions.\n"
	"If you allready installed the standard examples, the same destination directory will be used. If not, you may choose a destination directory.\n"
	"\nDo you want to install these examples?\n"))
	
	
	(set #Spezialfunktionen_Auswahl (cat
	"\nDo you want to use the special functions of the \"stormamiga.lib\"?\n"))
	
	
	(set #User.dic_Auswahl (cat
	"\nTo make Syntax Highlighting also available for the special functions of the \"stormamiga.lib\", it is necessary to install a user dictonary.\n"
	"\nPlease choose the name of the user dictionary if you like to install it.\n"))
	
	(set #User1.dic         "User 1.dic")
	(set #User2.dic         "User 2.dic")
	(set #User3.dic         "User 3.dic")
	(set #kein_User.dic     "No user dictonary")
	
	
	(set #Anleitungen_Auswahl (cat
	"\nPlease choose the language(s) for the AmigaGuide documentation.\n"
	"\nThe languages which are marked by \"(n/a)\" are not available yet.\n"))
	
	(set #Deutsch   " Deutsch")
	(set #English   " English  (n/a)")
	(set #Italiano  " Italiano (n/a)")
	(set #Français  " Français (n/a)")
	
	(set #Anleitungen_Liste (cat
	"Installation of the manual(s).\n"
	"Please choose a volume or a directory.\n"
	"A new directory will not be created."))
 )
)

;=====================================================================================
; Beginn der Installation
;=====================================================================================

(message #welcome)
(welcome)


(
    (set C_C++_beides
	(askoptions
	    (prompt #Sprachstandard_Auswahl)
	    (help   @askoptions-help)
	    (choices
		#C++
		#C
	    )
	)
    )

    (if (IN C_C++_beides 0) (set C++ 1))
    (if (IN C_C++_beides 1) (set C 1))

    (if (= C++ 1)
	(
	    (set kopiere_C++_startups
		(askoptions
		    (prompt #C++_startup_Auswahl)
		    (help   @askoptions-help)
		    (choices
			#FAR_C_C++_Startupcode
			#NEAR_C_C++_Startupcode
		    )
		)
	    )

	    (if (IN kopiere_C++_startups 0) (set FAR_C_C++_Startupcode 1))
	    (if (IN kopiere_C++_startups 1) (set NEAR_C_C++_Startupcode 1))

	    (if (= FAR_C_C++_Startupcode 1)
		(copyfiles
		    (source "StormSYS/stormamiga_C++_startups.o")
		    (dest "StormC:StormSYS")
		)
	    )
	    (if (= NEAR_C_C++_Startupcode 1)
		(copyfiles
		    (source "StormSYS/stormamiga_nc_C++_startups.o")
		    (dest "StormC:StormSYS")
		)
	    )
	)
    )
    (if (= C 1)
	(
	    (set kopiere_startups
		(askoptions
		    (prompt #startup_Auswahl)
		    (help   @askoptions-help)
		    (choices
			#FAR_C_Startupcode
			#NEAR_C_Startupcode
		    )
		)
	    )

	    (if (IN kopiere_startups 0) (set FAR_C_Startupcode 1))
	    (if (IN kopiere_startups 1) (set NEAR_C_Startupcode 1))

	    (if (= FAR_C_Startupcode 1)
		(copyfiles
		    (source "StormSYS/stormamiga_startups.o")
		    (dest "StormC:StormSYS")
		)
	    )
	    (if (= NEAR_C_Startupcode 1)
		(copyfiles
		    (source "StormSYS/stormamiga_nc_startups.o")
		    (dest "StormC:StormSYS")
		)
	    )
	)
    )
)

(
   (set wähle_Libs
	(askoptions
	    (prompt #Versions_Auswahl)
	    (help   @askoptions-help)
	    (default 1)
	    (choices
		#MC68EC020+
		#MC68EC020+_&_MC68881+
		#MC68040+
		#MC68060
	    )
	)
    )


    (if (IN wähle_Libs 0) (set MC68EC020+  1))
    (if (IN wähle_Libs 1) (set MC68EC020+_&_MC68881+ 1))
    (if (IN wähle_Libs 2) (set MC68040+ 1))
    (if (IN wähle_Libs 3) (set MC68060 1))

    (if (= MC68EC020+  1)
	(
	    (set kopiere_Libs
		(askoptions
		    (prompt #Code_Modell_Auswahl)
		    (help   @askoptions-help)
		    (choices
			#FAR_C
			#NEAR_C
		    )
		)
	    )

	    (if (IN kopiere_Libs 0) (set FAR_C 1))
	    (if (IN kopiere_Libs 1) (set NEAR_C 1))


	    (if (= FAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga.lib")
		    (dest "StormC:Lib")
		)
	    )

	    (if (= NEAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_nc.lib")
		    (dest "StormC:Lib")
		)
	    )
	)
    )

    (if (= MC68EC020+_&_MC68881+ 1)
	( (set FAR_C 0) (set NEAR_C 0)
	    (set kopiere_Libs
		(askoptions
		    (prompt #Code_Modell_Auswahl_881)
		    (help   @askoptions-help)
		    (choices
			#FAR_C
			#NEAR_C
		    )
		)
	    )

	    (if (IN kopiere_Libs 0) (set FAR_C 1))
	    (if (IN kopiere_Libs 1) (set NEAR_C 1))


	    (if (= FAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_881.lib")
		    (dest "StormC:Lib")
		)
	    )

	    (if (= NEAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_nc_881.lib")
		    (dest "StormC:Lib")
		)
	    )
	)
    )

    (if (= MC68040+  1)
	( (set FAR_C 0) (set NEAR_C 0)
	    (set kopiere_Libs
		(askoptions
		    (prompt #Code_Modell_Auswahl_040)
		    (help   @askoptions-help)
		    (choices
			#FAR_C
			#NEAR_C
		    )
		)
	    )

	    (if (IN kopiere_Libs 0) (set FAR_C 1))
	    (if (IN kopiere_Libs 1) (set NEAR_C 1))


	    (if (= FAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_040.lib")
		    (dest "StormC:Lib")
		)
	    )

	    (if (= NEAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_nc_040.lib")
		    (dest "StormC:Lib")
		)
	    )
	)
    )

    (if (= MC68060  1)
	( (set FAR_C 0) (set NEAR_C 0)
	    (set kopiere_Libs
		(askoptions
		    (prompt #Code_Modell_Auswahl_060)
		    (help   @askoptions-help)
		    (choices
			#FAR_C
			#NEAR_C
		    )
		)
	    )

	    (if (IN kopiere_Libs 0) (set FAR_C 1))
	    (if (IN kopiere_Libs 1) (set NEAR_C 1))


	    (if (= FAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_060.lib")
		    (dest "StormC:Lib")
		)
	    )

	    (if (= NEAR_C 1)
		(copyfiles
		    (source "Lib/stormamiga_nc_060.lib")
		    (dest "StormC:Lib")
		)
	    )
	)
    )
)

(
    (set kopiere_Standardbeispiele
	(askchoice
	    (prompt #Standardbeispiele_Auswahl)
	    (help   @askchoice-help)
	    (default 0)
	    (choices
		#ja
		#nein
	    )
	)
    )
    (if (= kopiere_Standardbeispiele 0)
	(
	    (set Zielverzeichnis
		(askdir
		    (prompt #Beispiele_Liste)
		    (help @askdir-help)
		    (default "StormC:Examples")
		)
	    )
	    (makeassign "INST" Zielverzeichnis)
	    (copyfiles
		(source "Beispiele/Standardbeispiele")
		(dest "INST:stormamiga_lib_Examples")
		(all)
		(infos)
	    )
	)
    )
)

(
    (set Spezialfunktionen_Auswahl
	(askchoice
	    (prompt #Spezialfunktionen_Auswahl)
	    (help   @askchoice-help)
	    (default 0)
	    (choices
		#ja
		#nein

	    )
	)
    )

    (if (= Spezialfunktionen_Auswahl 0)
	(
	    (copyfiles
		(source "Include/stormamiga.h")
		(dest "StormC:Include")
	    )

	    (copyfiles
		(source "Include/stormamigainline.h")
		(dest "StormC:Include")
	    )

		(set kopiere_User.dic
		    (askchoice
			(prompt #User.dic_Auswahl)
			(help   @askchoice-help)
			(default 0)
			(choices
			    #User1.dic
			    #User2.dic
			    #User3.dic
			    #kein_User.dic
			)
		    )
		)

		(if (= kopiere_User.dic 0)
		    (copyfiles
			(source "StormSYS/Dictionary/User 1.dic")
			(dest "StormC:StormSYS/Dictionary")
		    )
		)
		(if (= kopiere_User.dic 1)
		    (copyfiles
			(source "StormSYS/Dictionary/User 2.dic")
			(dest "StormC:StormSYS/Dictionary")
		    )
		)
		(if (= kopiere_User.dic 2)
		    (copyfiles
			(source "StormSYS/Dictionary/User 3.dic")
			(dest "StormC:StormSYS/Dictionary")
		    )
		)
		(set kopiere_Spezialbeispiele
		    (askchoice
			(prompt #Spezialbeispiele_Auswahl)
			(help   @askchoice-help)
			(default 0)
			(choices
			    #ja
			    #nein
			)
		    )
		)
		(if (= kopiere_Spezialbeispiele 0)
		    (
			(if (exists "INST:stormamiga_lib_Examples" (noreq))
			    (copyfiles
				(source "Beispiele/Spezialbeispiele")
				(dest "INST:stormamiga_lib_Examples")
				(all)
				(infos)
			    )
			)
			(if (= (exists "INST:stormamiga_lib_Examples" (noreq))0)
			    (
				(set Zielverzeichnis
				    (askdir
					(prompt #Beispiele_Liste)
					(help @askdir-help)
					(default "StormC:Examples")
				    )
				)
				(makeassign "INST" Zielverzeichnis)
				(copyfiles
				    (source "Beispiele/Spezialbeispiele")
				    (dest "INST:stormamiga_lib_Examples")
				    (all)
				    (infos)
				)
			    )
			)
		    )
		)
	)
    )
)

(
    (set kopiere_Anleitungen
	(askoptions
	    (prompt #Anleitungen_Auswahl)
	    (help   @askoptions-help)
	    (default 1)
	    (choices
		#Deutsch
		#English
		#Italiano
		#Français
	    )
	)
    )


    (if (IN kopiere_Anleitungen 0)
	(set Deutsch 1)
    )
    (if (IN kopiere_Anleitungen 1)
	(set English 1)
    )
    (if (IN kopiere_Anleitungen 1)
	(set Italiano 1)
    )
    (if (IN kopiere_Anleitungen 1)
	(set Français 1)
    )

    (if (= Deutsch 1)
	(
	    (set Dokverzeichnis
		(askdir
		    (prompt #Anleitungen_Liste)
		    (help @askdir-help)
		    (default "StormC:")
		)
	    )
	    (makeassign "INSTDOK" Dokverzeichnis)
	    (copyfiles
		(source "stormamiga_lib.guide")
		(dest "INSTDOK:")
		(infos)
	    )
	)
    )

    (if (= English 1)
	(
	    (if (exists "INSTDOK:" (noreq))
		(copyfiles
		    (source "stormamiga_lib_Eng.guide")
		    (dest "INSTDOK:")
		    (infos)
		)
	    )
	    (if (= (exists "INSTDOK:" (noreq))0)
		(
		    (set Dokverzeichnis
			(askdir
			    (prompt #Anleitungen_Liste)
			    (help @askdir-help)
			    (default "StormC:")
			)
		    )
		    (makeassign "INSTDOK" Dokverzeichnis)
		    (copyfiles
			(source "stormamiga_lib_Eng.guide")
			(dest "INSTDOK:")
			(infos)
		    )
		)
	    )
	)
    )

    (if (= Italiano 1)
	(
	    (if (exists "INSTDOK:" (noreq))
		(copyfiles
		    (source "stormamiga_lib_Ital.guide")
		    (dest "INSTDOK:")
		    (infos)
		)
	    )
	    (if (= (exists "INSTDOK:" (noreq))0)
		(
		    (set Dokverzeichnis
			(askdir
			    (prompt #Anleitungen_Liste)
			    (help @askdir-help)
			    (default "StormC:")
			)
		    )
		    (makeassign "INSTDOK" Dokverzeichnis)
		    (copyfiles
			(source "stormamiga_lib_Ital.guide")
			(dest "INSTDOK:")
			(infos)
		    )
		)
	    )
	)
    )

    (if (= Français 1)
	(
	    (if (exists "INSTDOK:" (noreq))
		(copyfiles
		    (source "stormamiga_lib_Franç.guide")
		    (dest "INSTDOK:")
		    (infos)
		)
	    )
	    (if (= (exists "INSTDOK:" (noreq))0)
		(
		    (set Dokverzeichnis
			(askdir
			    (prompt #Anleitungen_Liste)
			    (help @askdir-help)
			    (default "StormC:")
			)
		    )
		    (makeassign "INSTDOK" Dokverzeichnis)
		    (copyfiles
			(source "stormamiga_lib_Franç.guide")
			(dest "INSTDOK:")
			(infos)
		    )
		)
	    )
	)
    )
)
(makeassign "INST")
(makeassign "INSTDOK")
