;
; $PROJECT: HyperText-Datatype-System
;
; $VER: Install 40.8 (31.03.97)
;
; by
;
; Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
;
; (C) Copyright 1996,1997
; All Rights Reserved !
;
; $HISTORY:
;
; 31.03.97 : 040.008 : added picdtpatch update section
; 01.03.97 : 040.007 : added finish translation
; 05.01.97 : 040.006 : added export stuff
; 22.09.96 : 040.005 : added prop3d warning
; 15.08.96 : 040.004 : added helpfile
; 08.06.96 : 040.003 : works now with pre V43 installer
; 25.02.96 : 040.002 : added catalog support
; 07.02.96 : 040.001 : initial
;

(set #project       "HyperText-Datatype-System")

(set #loc-english  (cat "english"))
(set #loc-german   (cat "deutsch"))
(set #loc-danish   (cat "dansk"))
(set #loc-frensh   (cat "français"))
(set #loc-greek    (cat "greek"))
(set #loc-italiano (cat "italiano"))
(set #loc-norsk    (cat "norsk"))
(set #loc-suomi    (cat "suomi"))
(set #loc-swedish  (cat "svenska"))
(set #loc-spanish  (cat "español"))
(set #loc-polski   (cat "polski"))
(set #loc-czech    (cat "czech"))

(set #datatypes-list (cat
     "hypertext.datatype, "
     "hyperguide.datatype, "
     "html.datatype, "
     "directory.datatype, "
     "man.datatype, "
     "htdsascii.datatype, "
     "productinfo.datatype "
))

;
; V43 installer only
;
(procedure p_version name
	(/ (getversion name) 65536)
)

(procedure p_revision name
	(set #p_ver (getversion name))
	(- #p_ver (* (/ #p_ver 65536) 65536))
)

(set #cpu (database "cpu"))
(if (OR (= #cpu "68000") (= #cpu "68010")) (set #procsuffix "000"))
(if (= #cpu "68020")                       (set #procsuffix "020"))
(if (= #cpu "68030")                       (set #procsuffix "030"))
(if (OR (= #cpu "68040") (= #cpu "68060")) (set #procsuffix "040"))

;
; german texts
;

(set #lang-default 0)

(if (= @language "deutsch")
    (
	(set #lang-default 2)
	(set #chs-txt-install "Installieren")
	(set #chs-txt-remove  "Entfernen")

	(set #txt-english "Englisch")
	(set #txt-german  "Deutsch")

	(set #welcome-message (cat
	     "Willkommen zum HyperText-Datatype-System (HTDS)!\n"
	     "Wichtig :\n"
	     "Zur Zeit sind folgende Programme nicht mit HTDS kompatible."
	     "Das heißt, daß entweder HTDS oder das aufgeführte Programm "
	     "bei gleichzeitigem Betrieb abstürzen. Wenn Sie HTDS benutzen "
	     "wollen, müssen Sie alle folgenden Programme deaktivieren!\n"
	     "Prop3d GadTools Patch"))

	(set #txt-classdir-prompt "Wo liegen die System Klassen ?")

	(set #txt-installing "Installiere")

	(set #txt-install-processor-dt-prompt (cat
	     "Es existieren Datentyp Versionen für untenstehenden Prozessor. "
	     "Sollen diese verwendet werde ?\n\n"))
	(set #txt-cpu-versions (cat
	     "Das " @app-name " umfaßt, zur Zeit folgende Datatypes :\n\n"
	     #datatypes-list
	     "\nBemerkung:\n"
	     "Diese Datatypen sind für den Prozessor MC68000 kompiliert. "
	     "Falls Sie einen höheren Prozessor besitzen, können Sie sich das "
	     "Archive HTDS_xxx.lha besorgen. Wobei xxx für die Abkürzung "
	     "des Prozessors steht (030 für MC68030).\n\nSie können jetzt die "
	     "Installation hier abbrechen und das entsprechende Archive an "
	     "gleicher Stelle entpacken. Dieses Installtionsskript benutzt dann "
	     "die Datentypen entsprechend Ihres Prozessors."
	))

	(set #txt-dest-dir-prompt (cat
	     "Wohin soll " @app-name " installiert werden ?\n"
	     "(Es wird ein Verzeichnis HTDS angelegt)"
	     )
	)
	(set #txt-dest-dir-help (cat
	     "Wählen Sie hier ein Verzeichnis, indem alle Dateien abgelegt "
	     "werden, die nicht an ein entsprechenden Platz im System "
	     "gehören. Also hier werden keine #?.datatype oder #?.catalog "
	     "Dateien abgelegt, sondern nur Dokumentationsdateien und/oder "
	     "Includes&AutoDocs\n"
	     )
	)

	(set #txt-copy-descriptors-prompt "Kopiere Datatype Descriptoren")

	(set #txt-procedure-prompt
	    (cat
		"Bitte wählen Sie die entsprechende Aktion:"
	    )
	)
	(set #txt-procedure-help
	    (cat
		"Hier können Sie wählen, ob Sie " @app-name " installieren "
		"oder eine alte Version entfernen möchten.\n\n"
	    )
	)

	(set #txt-install          "Welche Dateien sollen zusätzlich installiert werden ?")

	(set #txt-copy-picdtpatch-prompt "Kopiere picdtpatch nach C: ?")
	(set #txt-picdtpatch-prompt "Installieren von PicDTPatch ?\nFür nähere Information siehe Hilfe !")
	(set #txt-picdtpatch-help
	     (cat "PicDTPatch wird benötigt, wenn Sie das HyperText-DataType-System "
		  "mit Bilder verwenden wollen und nicht den V43 picture.datatype "
		  "installiert haben (V43 arbeitet mit dem hypertext.datatype zusammen, "
		  "Danke Ralph). Dieses Programm fügt dem alten picture.datatype die "
		  "Methode DTM_DRAW hinzu, die benutzt wird, um ein Objekt aus dem "
		  "hypertext.datatype zu zeichnen.\n"
		  "ACHTUNG:\nWenn Sie Bilder als Hintergrund für die Workbench benutzen, "
		  "dann sollte PicDTPatch for IPrefs gestartet werden !\n\n"
	     )
	)

	(set #chs-txt-docs             "Dokumentation (HyperGuide)")
	(set #chs-txt-locale-sources   "Lokalisations Dateien (#?.ct,#?.cd)")
	(set #chs-txt-examples         "Beispiel Doks")
	(set #chs-txt-arexx            "ARexx Skripts")
	(set #chs-txt-developer-stuff  "Entwickler Dateien (Includes,AutoDocs)")
	(set #chs-txt-export-classes   "Export Klassen")
	(set #chs-txt-htdsascii-dt     "HTDS ASCII Datentyp")

	(set #txt-copy-descriptors-prompt   "Kopiere Datentyp Deskripitoren")
	(set #txt-copy-catalog-prompt       "Kopiere Katalog")
	(set #txt-copy-helpfile-prompt      "Kopiere HyperGuide Hilfe Datei")
	(set #txt-copy-docs-prompt          "Kopiere Dokumentation")
	(set #txt-copy-examples-prompt      "Kopiere Beispiel Dateien")
	(set #txt-copy-pics-prompt          "Kopiere Bilder")
	(set #txt-copy-loc-sources-prompt   "Kopiere Lokalisations Quelldateien")
	(set #txt-copy-prog-files-prompt    "Kopiere Programmier Dateien")
	(set #txt-copy-arexx-prompt         "Kopiere ARexx Skripts")
	(set #txt-copy-shell-man-prompt     "Kopiere man Skript")

	(set #txt-install-ag-desc-prompt    (cat
	     "Soll das HTDS auch für bestehende AmigaGuide Dateien verwendet werden ?\n\n"
	     "Dabei muß beachtet werden, das Programme, die die amigaguide.library benutzen, "
	     "nicht mehr korrekt die Dokumente/Hilfe anzeigen können. Das bedeutet auch, "
	     "das alle Programme die Menu oder Gadget Hilfe unterstützen, dann nicht mehr "
	     "richtig die Hilfe anzeigen können.\n\n"
	     "Daher empfiehlt sich diesen Teil nur dann zu installieren, wenn die oben "
	     "genannten Probleme bei ihnen nicht zutreffen.\n\n"
	     "Es wird später eine amigaguide.library geben, die diese Mängel beseitigt.\n"
	     ))

	(set #txt-install-ag-desc-help      (cat
	     "Wenn sie für alle bestehenden AmigaGuide Dateien auch das HTDS verwenden wollen, "
	     "muß der entsprechende Datentyp Deskriptor verändert werden (Devs:DataTypes/AmigaGuide). "
	     "Dieser wird dann nach Sys:Storage/DataTypes kopiert."))

	(set #txt-install-ag-link-prompt    (cat
	     "Sie haben ausgewählt, den neuen hyperguide.datatype für alle ihre vorhandenen "
	     "AmigaGuide Dateien zu benutzen. In dieser Konfiguration arbeiten einige Programme "
	     "nicht korrekt. Unter anderem auch das AmigaGuide Programm in Sys:Utilities."
	     "Soll nun das AmigaGuide Programm durch ein Hard Link auf MultiView ersetzt werden ?"
	))
	(set #txt-install-ag-link-help "")


	(set #txt-install-shell-man-prompt  "Soll ein shell man Front-End in S: installiert werden ?")

	(set #txt-language-prompt "Welche Sprachkataloge sollen installiert werden ?")
	(set #txt-language-help   (cat ""))

	(set #txt-copy-include-files-prompt "Kopiere include Dateien")

	(set #txt-end (cat
	     "Nun sollten sie ihr System neu starten. Sie können das HTDS auch ohne Neustart "
	     "benutzen. Aber es könnte nicht ganz korrekt arbeiten, da AddDataTypes teilweise "
	     "fehlerhaft ist."))
    )
)

;
; french texts by Francis Labrie <fb691875@er.uqam.ca>
;

(if (= @language "français")
    (
	(set #lang-default 3)

	(set #chs-txt-install "Installer")
	(set #chs-txt-remove  "Enlever")

	(set #txt-english "Anglais")
	(set #txt-german  "Allemand")
	(set #txt-french  "Français")

	(set #welcome-message (cat
	     "Bienvenue au système HyperText-Datatype (HTDS) !\n"
	     "Note :\n"
	     "Présentement, les logiciels suivants ne fonctionnent "
	     "probablement pas avec HTDS.  Cela signifie qu'HTDS ou "
	     "ces programmes plantent l'ordinateur.  Aussi, si vous "
	     "souhaitez utiliser HTDS, il est préférable de désactiver "
	     "ces programmes :\n"
	     "Prop3d GadTools Patch"))

	(set #txt-installing "Installation")

	(set #txt-install-processor-dt-prompt (cat
	     "Il existe des versions de datatype spécifiques aux processeurs suivants. "
	     "Souhaitez-vous utiliser ces versions ?\n\n"))
	(set #txt-cpu-versions (cat
	     "Présentement, " @app-name " est constitué des datatypes suivants :\n\n"
	     #datatypes-list
	     "\nNote :\n"
	     "Ces bibliothèques de datatypes ont été compilées pour "
	     "le processeur MC68000.  Si vous avez un processeur MC68xxx "
	     "plus puissant, veuillez récupérer l'archive appelée "
	     "« HTDS_xxx.lha », où le xxx correspond au suffixe de votre "
	     "processeur."
	))

	(set #txt-dest-dir-prompt (cat
	     "Où souhaitez-vous installer " @app-name " ?\n"
	     "(Un tiroir étiqueté « HTDS » y sera alors créé.)"
	     )
	)
	(set #txt-dest-dir-help (cat
	     "   Sélectionnez un répertoire dans lequel tous les fichiers seront "
	     "copiés.  Ce répertoire n'a pas de à être installé à un endroit "
	     "spécifique dans le système.  Les fichiers installés sont en fait "
	     "des macros, de la documentation et des exemples et non pas les "
	     "fichiers datatypes ou catalogues."
	     )
	)

	(set #txt-copy-descriptors-prompt "Copie des descripteurs")


	(set #txt-procedure-prompt
	    (cat
		"Sélectionnez la procédure appropriée :"
	    )
	)

	(set #txt-procedure-help
	    (cat
		"   Vous pouvez sélectionner la procédure « Installer » "
		"pour installer tous les fichiers nécessaires à " @app-name ".\n"
		"   Ou encore vous pouvez sélectionner « Enlever » afin "
		"d'enlever tous les fichiers " @app-name " déjà installés sur "
		"votre système.\n\n"
	    )
	)

	(set #txt-install "Sélectionnez les fichiers à installer :")

	(set #txt-copy-picdtpatch-prompt "copier « PicDTPatch » dans « C: » ?")
	(set #txt-picdtpatch-prompt "Installation de PicDTPatch ?\nPour plus de détails consulter l'aide !")
	(set #txt-picdtpatch-help (cat
	     "   « PicDTPatch » est nécessaire si vous désirez utiliser des images dans "
	     "les objets HyperTexts et si vous n'utilisez pas la version 43 de "
	     "« picture.datatype » (merci Ralph).  Ce programme ajoute une méthode à "
	     "la bibliothèque « picture.datatype » permettant de générer une image à "
	     "ume position spécifique (DTM_DRAW).\n"
	     "   Attention : si vous utilisez des images en arrière-plan de votre "
	     "Workbench, vous devrez alors démarrez « PicDTPatch » avant « IPrefs » !\n\n"
	     )
	)

	(set #chs-txt-docs             "Documentation (HyperGuide)")
	(set #chs-txt-locale-sources   "Fichiers locaux (#?.ct, #?.cd)")
	(set #chs-txt-examples         "Exemples de documents")
	(set #chs-txt-arexx            "Scripts ARexx")
	(set #chs-txt-developer-stuff  "Fichier pour programmeurs (includes, AutoDocs)")
	(set #chs-txt-export-classes   "Classes d'exportation")
	(set #chs-txt-htdsascii-dt     "Datatype ASCII HTDS")

	(set #txt-copy-descriptors-prompt   "Copie des descripteurs de datatype")
	(set #txt-copy-catalog-prompt       "Copie des catalogues")
	(set #txt-copy-helpfile-prompt      "Copie du fichier d'aide hyperguide")
	(set #txt-copy-docs-prompt          "Copie des fichiers de documentation")
	(set #txt-copy-examples-prompt      "Copie des fichiers d'exemples")
	(set #txt-copy-pics-prompt          "Copie des images")
	(set #txt-copy-prog-files-prompt    "Copie des fichiers pour programmeur")
	(set #txt-copy-loc-sources-prompt   "Copie des fichiers sources de localisation")
	(set #txt-copy-arexx-prompt         "Copie des scripts ARexx")
	(set #txt-copy-shell-man-prompt     "Copie du script « man »")

	(set #txt-install-ag-desc-prompt    (
	     "Est-ce qu'HTDS doit être utilisé pour les documents AmigaGuide existants ?\n\n"
	     "Note :\n"
	     "Ceci peut occasionner des problèmes avec certains programmes utilisant la "
	     "bibliothèque « amigaguide.library ».  La raison est que cette bibliothèque ne "
	     "peut afficher les « documents/helptexts » correctement.  Ceci inclus aussi les "
	     "programmes qui supporte l'aide pour les menus et les cellules.\n\n"
	     "Par conséquent, il est seulement recommendé d'installer cette section si les "
	     "problèmes mentionnés ci-haut ne se posent pas pour votre système.\n\n"
	     "Plus tard, il y aura une bibliothèque « amigaguide.library » en remplacement, "
	     "qui évitera ce genre de problèmes.\n"
	))
	(set #txt-install-ag-desc-help      (cat
	     "   Si vous souhaitez utiliser HTDS pour afficher vos fichiers AmigaGuides, "
	     "il est nécessaire de changer le descripteur de ce datatype (DEVS:DataTypes/AmigaGuide).  "
	     "L'ancien sera alors copié dans le tiroir « Sys:Storage/DataTypes »."))

	(set #txt-install-ag-link-prompt    (cat
	     "Vous avez choisi d'utiliser le nouveau hyperguide.datatype pour afficher "
	     "tous vos documents AmigaGuides.  Donc il y aura inévitablement quelques programmes "
	     "qui ne fonctionneront pas avec cette configuration.  Le logiciel AmigaGuide "
	     "également de manière incorrect.\n"
	     "Dois-je remplacer le programme AmigaGuide du tiroir « Sys:Utilities » "
	     "par un lien physique au logiciel Multiview ?"
	))
	(set #txt-install-ag-link-help "")

	(set #txt-language-prompt "Lequel catalogue doit-il être installer ?")
	(set #txt-language-help   (cat ""))

	(set #txt-install-shell-man-prompt  "Installer la commande Man pour le Shell dans le tiroir « S: » ?")

	(set #txt-copy-include-files-prompt "Copie des fichiers « includes »")

	(set #txt-end (cat
	     "Vous devez maintenant redémarrer votre système.  Vous pouvez également essayer HTDS sans "
	     "redémarrage, mais en raison d'un déficience dans la commande AddDataTypes, il est possible "
	     "que cela ne fonctionne pas correctement avant le prochain redémarrage."))
    )
)

;
; Finnish texts translated by Mika Lundell <c71829@uwasa.fi> / ATO
;

(if (= @language "suomi")
    (
	(set #lang-default 8)

	(set #chs-txt-install "Asenna")
	(set #chs-txt-remove  "Poista")

	(set #txt-english "Englanti")
	(set #txt-german  "Saksa")
	(set #txt-french  "Ranska")

	(set #welcome-message (cat
	     "Tervetuloa asentamaan HyperText-Datatype-järjestelmää (HTDS)!\n"
	     "Huomio:\n"
	     "Tällä hetkellä seuraavat ohjelmat eivät todennäköisesti toimi HTDS:n "
	     "kanssa. Tämä tarkoittaa, että joko HTDS tai listattu ohjelma "
	     "kaataa koneen. Jos haluat käyttää HTDS:ää, poista seuraavat "
	     "ohjelmat käytöstä:\n"
	     "Prop3D GadTools-paikka"))

	(set #txt-classdir-prompt "Missä järjestelmän luokkatiedostot sijaitsevat?")

	(set #txt-installing "Asennan")

	(set #txt-install-processor-dt-prompt (cat
	     "Seuraaville prosessoreille on omat versionsa tietotyypeistä. "
	     "Haluatko käyttää näitä versioita?\n\n"))
	(set #txt-cpu-versions (cat
	     "Tällä hetkellä " @app-name " koostuu seuraavista "
	     "tietotyypeistä:\n\n"
	     #datatypes-list
	     "\n\nHuomio:\n"
	     "Nämä tietotyypit on käännetty "
	     "MC68000-prosessorille. Jos sinulla on tehokkaampi MC68xxx, voit hankkia "
	     "erillisen arkiston nimeltä HTDS_xxx.lha, jossa xxx on prosessorin "
	     "lyhenne (030 on MC68030).\n\nVoit keskeyttää asennuksen nyt ja purkaa "
	     "erillisen arkiston samaan paikkaan kuin perusarkiston. Asennusohjelma "
	     "käyttää sen jälkeen oman prosessorityyppisi tietotyyppejä."
	))

	(set #txt-dest-dir-prompt (cat
	     "Mihin haluat asentaa ohjelmiston " @app-name "?\n"
	     "(Hakemisto nimeltä HTDS luodaan valitsemaasi paikkaan)"
	     )
	)
	(set #txt-dest-dir-help (cat
	     "Valitse tässä hakemisto, johon sijoitetaan kaikki tiedostot, "
	     "joille ei ole muuta asianmukaista paikkaa järjestelmässä. Näitä "
	     "tiedostoja ovat käyttöohjeet, esimerkit, makrotiedostot ja muut "
	     "#?.datatype- ja #?.catalog-tiedostoista poikkeavat tiedostot.\n\n"
	     )
	)

	(set #txt-copy-descriptors-prompt "Kopioidaan kuvaustiedostot")


	(set #txt-procedure-prompt
	    (cat
		"Valitse haluamasi toimenpide:"
	    )
	)

	(set #txt-procedure-help
	    (cat
		"Voit valita Asenna-toimenpiteen asentaaksesi kaikki tarpeelliset "
		"tiedostot ohjelmistoa " @app-name " varten.\n"
		"Valitsemalla Poista-toimenpiteen, voit poistaa järjestelmästäsi kaikki "
		"aikaisemmin asennetut, ohjelmistoon " @app-name " kuuluvat tiedostot.\n\n"
	    )
	)

	(set #txt-install          "Valitse asennettavat tiedostot:")

	(set #txt-copy-picdtpatch-prompt "Kopioidaanko picdtpatch hakemistoon C: ?")
	(set #txt-picdtpatch-prompt "Asennetaanko PicDTPatch?\nKatso ohjeesta tarkempia tietoja!")
	(set #txt-picdtpatch-help (cat
	     "PicDTPatch tarvitaan, jos haluat käyttää kuvia HyperText-objekteissa, "
	     "mutta sinulla ei ole versiota V43 tiedostosta picture.datatype "
	     "(V43 toimii hypertext.datatypen kanssa, kiitos Ralph). "
	     "Tämä ohjelma lisää vanhaan picture.datatype-tietotyyppiin uuden metodin, "
	     "jolla voi piirtää kuvan määriteltyyn paikkaan (DTM_DRAW).\n"
	     "Huomio: Jos käytät kuvia WB:n taustana, PicDTPatch tulisi käynnistää "
	     "ennen IPrefs-ohjelmaa!!\n\n"
	     )
	)

	(set #chs-txt-docs             "Käyttöohjeet (HyperGuide)")
	(set #chs-txt-locale-sources   "Paikallisteet (#?.ct,#?.cd)")
	(set #chs-txt-examples         "Esimerkkidokumentit")
	(set #chs-txt-arexx            "ARexx-komentotiedostot")
	(set #chs-txt-developer-stuff  "Ohjelmankehittäjän tiedostot (includet,AutoDocit)")
	(set #chs-txt-export-classes   "Export-luokat")
	(set #chs-txt-htdsascii-dt     "HTDS ASCII-tietotyyppi")

	(set #txt-copy-descriptors-prompt   "Kopioidaan tietotyyppien kuvaukset")
	(set #txt-copy-catalog-prompt       "Kopioidaan sanastot")
	(set #txt-copy-helpfile-prompt      "Kopioidaan HyperGuiden aputiedostot")
	(set #txt-copy-docs-prompt          "Kopioidaan käyttöohjeet")
	(set #txt-copy-examples-prompt      "Kopioidaan esimerkkitiedostot")
	(set #txt-copy-pics-prompt          "Kopioidaan kuvat")
	(set #txt-copy-prog-files-prompt    "Kopioidaan ohjelmankehittäjän tiedostot")
	(set #txt-copy-loc-sources-prompt   "Kopioidaan sanastojen lähdetiedostot")
	(set #txt-copy-arexx-prompt         "Kopioidaan ARexx-komentotiedostot")
	(set #txt-copy-shell-man-prompt     "Kopioidaan man-komentotiedosto")

	(set #txt-install-ag-desc-prompt    (
	     "Tulisiko HTDS:ää käyttää olemassa oleville AmigaGuide-tiedostoille?\n\n"
	     "Huomio: Tämä saattaa aiheuttaa ongelmia niiden ohjelmien kanssa, jotka "
	     "käyttävät kirjastoa amigaguide.library, koska kirjasto ei osaa näyttää "
	     "dokumentteja/aputekstejä oikein. Tämä koskee myös ohjelmia, jotka "
	     "tukevat valikkojen ja painikkeiden aputoimintoa.\n\n"
	     "Tämän vuoksi tämän osan asennusta suositellaan vain siinä tapauksessa, "
	     "että tällaiset ongelmat eivät häiritse järjestelmääsi.\n\n"
	     "Myöhemmin amigaguide.library voidaan korvata toisella, joka ei aiheuta ongelmia.\n"
	))
	(set #txt-install-ag-desc-help      (cat
	     "Jos haluat käyttää HTDS:ää olemassa oleville AmigaGuide-tiedostoillesi, "
	     "tietotyypin kuvausta (Devs:DataTypes/AmigaGuide) joudutaan muuttamaan. "
	     "Vanha tiedosto kopioidaan hakemistoon Sys:Storage/DataTypes."))

	(set #txt-install-ag-link-prompt    (cat
	     "Olet päättänyt käyttää uutta hyperguide.datatype-tietotyyppiä kaikille "
	     "AmigaGuide-tiedostoillesi. Jotkut ohjelmat eivät toimi tällä asetuksella. "
	     "Myöskään AmigaGuide-ohjelma ei toimi oikein.\n"
	     "Korvataanko hakemiston Sys:Utilities AmigaGuide-ohjelma "
	     "kestoviittauksella ohjelmaan MultiView?"
	))
	(set #txt-install-ag-link-help "")

	(set #txt-language-prompt "Mitkä sanastot haluat asentaa?")
	(set #txt-language-help   (cat ""))

	(set #txt-install-shell-man-prompt  "Asennetaanko Shell-komentotiedosto man-komennoksi hakemistoon S: ?")

	(set #txt-copy-include-files-prompt "Kopioidaan include-tiedostot")

	(set #txt-end (cat
	     "Nyt sinun tulisi käynnistää järjestelmäsi uudelleen. Voit kokeilla HTDS:ää "
	     "myös ilman uudelleenkäynnistystä, mutta AddDataTypes-komennossa olevan "
	     "ohjelmavirheen vuoksi HTDS ei välttämättä toimi oikein ennen "
	     "kuin olet käynnistänyt järjestelmäsi uudelleen."))
    )
)

;
; english texts (default)
;

(if (OR (= @language "english") (= #lang-default 0))
    (
	(set #lang-default 1)

	(set #chs-txt-install "Install")
	(set #chs-txt-remove  "Remove")

	(set #txt-english "English")
	(set #txt-german  "German")

	(set #welcome-message (cat
	     "Welcome to the HyperText-Datatype-System (HTDS)!\n"
	     "Note :\n"
	     "Currently the following programs don't work probably with "
	     "HTDS. That means, that HTDS or the listed program crashes "
	     "the machine. If you want to use HTDS, please deactivate the "
	     "following programs :\n"
	     "Prop3d GadTools Patch"))

	(set #txt-installing "Installing")

	(set #txt-install-processor-dt-prompt (cat
	     "There exists datatype versions for the following processor type. "
	     "Do you want to use these versions ?\n\n"))
	(set #txt-cpu-versions (cat
	     "Currently the " @app-name " consists out of the following "
	     "datatypes:\n\n"
	     #datatypes-list
	     "\nNote:\n"
	     "These datatypes libraries are compiled for "
	     "MC68000 processor. If you have a higher MC68xxx, look out "
	     "for archive called HTDS_xxx.lha, where xxx stands for the "
	     "processor abbrevation.\n\nNow you can cancel this installation "
	     "and extract the appropriate archive at the same place of the base "
	     "archive. This installation script uses then the datatypes for your "
	     "processor."
	))

	(set #txt-dest-dir-prompt (cat
	     "Where do you want to install the " @app-name " ?\n"
	     "(A drawer called HTDS will be created there)"
	     )
	)
	(set #txt-dest-dir-help (cat
	     "Please select here a drawer, in which all files are copied, "
	     "which have no appropriate place in the system. This are "
	     "documentations, examples and macro files and not #?.datatype "
	     "or #?.catalog files."
	     )
	)

	(set #txt-copy-descriptors-prompt "Copying the Descriptors")


	(set #txt-procedure-prompt
	    (cat
		"Please select the appropriate procedure:"
	    )
	)

	(set #txt-procedure-help
	    (cat
		"You can here select the Install procedure to install "
		"all nessecary files for the " @app-name ".\n"
		"Or select Remove to remove all previously installed "
		"files of the " @app-name " from your system.\n\n"
	    )
	)

	(set #txt-install          "Select the files to install :")

	(set #txt-copy-picdtpatch-prompt "copy picdtpatch to C: ?")
	(set #txt-picdtpatch-prompt "Installation of PicDTPatch ?\nFor detailed information see help !")
	(set #txt-picdtpatch-help (cat
	     "PicDTPatch is needed, if you want to use pictures within HyperText "
	     "objects and if you don't use V43 of the picture.datatype (Thanks Ralph)."
	     "This program adds a method to the picture.datatype to render a picture "
	     "at a specified position (DTM_DRAW).\n"
	     "Attention: If you use some pictures as WB backgounds, it should be "
	     "nesseccary to run PicDTPatch before IPrefs !!\n\n"
	     )
	)

	(set #chs-txt-docs             "Documentation (HyperGuide)")
	(set #chs-txt-locale-sources   "Locale files (#?.ct,#?.cd)")
	(set #chs-txt-examples         "Example Docs")
	(set #chs-txt-arexx            "ARexx scripts")
	(set #chs-txt-developer-stuff  "Programmer Files (includes,AutoDocs)")
	(set #chs-txt-export-classes   "Export classes")
	(set #chs-txt-htdsascii-dt     "HTDS ASCII datatype")

	(set #txt-copy-descriptors-prompt   "Copy DataType descripitors")
	(set #txt-copy-catalog-prompt       "Copy catalog")
	(set #txt-copy-helpfile-prompt      "Copy HyperGuide help file")
	(set #txt-copy-docs-prompt          "Copy documentation files")
	(set #txt-copy-examples-prompt      "Copy example files")
	(set #txt-copy-pics-prompt          "Copy pictures")
	(set #txt-copy-prog-files-prompt    "Copy programmer files")
	(set #txt-copy-loc-sources-prompt   "Copy locale sourcefiles")
	(set #txt-copy-arexx-prompt         "Copy ARexx scripts")
	(set #txt-copy-shell-man-prompt     "Copy man script")

	(set #txt-install-ag-desc-prompt    (
	     "Should the HTDS be used for existing AmigaGuide files ?\n\n"
	     "Note: This may cause problems with programs, which uses the amigaguide.library. "
	     "Because the library can't display the documents/helptexts correctly. This also "
	     "includes programs, which supports menu and gadget help.\n\n"
	     "Therefore it is only recommended to install this part, if the above mentioned "
	     "problems do not fit in your system.\n\n"
	     "Later there will be a amigaguide.library replacement, which avoid these problems.\n"
	))
	(set #txt-install-ag-desc-help      (cat
	     "If you want to use the HTDS for your existing AmigaGuide files, "
	     "it is necessary to change the datatype descriptor (Devs:DataTypes/AmigaGuide). "
	     "The old one will be copied to Sys:Storage/DataTypes."))

	(set #txt-install-ag-link-prompt    (cat
	     "You have choosen to use the new hyperguide.datatype for all of your "
	     "AmigaGuide files. So some programs don't work with this configuration. "
	     "Also AmigaGuide program doesn't work correctly.\n"
	     "Should I replace the AmigaGuide program in Sys:Utilities "
	     "to a hard link to MultiView ?"
	))
	(set #txt-install-ag-link-help "")

	(set #txt-language-prompt "Which locale catalog should be installed ?")
	(set #txt-language-help   (cat ""))

	(set #txt-install-shell-man-prompt  "Install a shell man front-end to S: ?")

	(set #txt-copy-include-files-prompt "Copy include files")

	(set #txt-end (cat
	     "Now you should reboot your system. You can also try the HTDS without a boot, "
	     "but due to a bug in AddDataTypes it may not work correctly until you have "
	     "rebooted."))
    )
)


(set #mode 0)

; Currently no UnInstall
;(set #mode
;     (askchoice
;         (prompt #txt-procedure-prompt)
;         (help (cat #txt-procedure-help @askchoice-help))
;         (choices #chs-txt-install #chs-txt-remove)
;     )
;)


(if #mode
	(set #pmode #txt-remove)
	(set #pmode #txt-install)
)

(welcome #welcome-message)

; get classes dir
(set #classdir
	(askdir
		(prompt #txt-classdir-prompt)
		(help @askdir-help)
		(default "SYS:Classes")
	)
)

; now do install or remove
(if #mode
    ; Remove
    (
	; Show what we are doing
	(working "Removing " @app-name)

	; Remove the non-standard pieces

	; Don't want to use the confusing "Installation Complete" message
	; when what we really did was remove things...
	(message "The \"" @app-name "\" components "
		 "that you specified have been successfully removed")
	(exit (quiet))
    )

    ; Install
    (
	(set #dtsuffix "")
	(if (= (exists (cat "classes/datatypes/hypertext.datatype." #procsuffix)) 1)
	    (
		(if (askbool (prompt (cat #txt-install-processor-dt-prompt ": " #cpu)) (help @askbool-help))
		    (set #dtsuffix (cat "." #procsuffix))
		)
	    )
	    ; else
	    (
		(message #txt-cpu-versions)
	    )
	)

	(complete 0)

	(set #dest-dir
	     (askdir
		    (prompt #txt-dest-dir-prompt)
		    (help #txt-dest-dir-help @askdir-help)
		    (default "Work:")
	     )
	)

	(set #languages
	     (askoptions
		 (prompt #txt-language-prompt)
		 (choices #loc-english #loc-german #loc-frensh #loc-danish #loc-greek #loc-italiano #loc-norsk #loc-suomi #loc-swedish #loc-spanish #loc-polski #loc-czech "")
		 (help #txt-language-help @askoptions-help)
		 (default #lang-default)
	     )
	)

	(if (= @user-level 0)
	    (set #instflags 3)
	    (set #instflags 63)
	)

	(if (= (exists "developer" (noreq)) 2)
	    (set #chs-developer-stuff #chs-txt-developer-stuff)
	    (set #chs-developer-stuff "")
	)

	(set #instflags
	     (askoptions
		    (prompt #txt-install)
		    (choices #chs-txt-docs #chs-txt-examples #chs-txt-locale-sources #chs-txt-arexx #chs-txt-export-classes #chs-txt-htdsascii-dt #chs-developer-stuff)
		    (default #instflags)
		    (help #txt-install-help @askoptions-help)
	     )
	)

	(set #inst-docs           (in #instflags 0))
	(set #inst-examples       (in #instflags 1))
	(set #inst-locale-sources (in #instflags 2))
	(set #inst-arexx          (in #instflags 3))
	(set #inst-export         (in #instflags 4))
	(set #inst-htdsascii      (in #instflags 5))
	(set #inst-developer      (in #instflags 6))


	(set #install-ag-desc
	     (askbool
		  (prompt #txt-install-ag-desc-prompt)
		  (help (cat #txt-install-ag-desc-help @askbool-help))
	     )
	)

	(if #install-ag-desc
	    (set #install-ag-link
		 (askbool
		     (prompt #txt-install-ag-link-prompt)
		     (help (cat #txt-install-ag-link-help @askbool-help))
		 )
	    )
	)

	(set #install-man
	     (askbool
		  (prompt #txt-install-shell-man-prompt)
		  (help (cat #txt-install-shell-man-help @askbool-help))
	     )
	)

	(working #installing @app-name)

	(complete 20)

	(set #dest-parent-dir #dest-dir)
	(set #dest-dir (tackon #dest-dir "HTDS"))
	(if (= (exists #dest-dir) 0)
	    (
		(makedir #dest-dir (infos))
		(copyfiles
		    (help @copyfiles-help)
		    (source "/HTDS.info")
		    (dest #dest-parent-dir)
		)
	    )
	)
	(set @default-dest #dest-dir)

	(set #macro-dir (tackon #dest-dir "macros"))
	(set #arexx-dir (tackon #dest-dir "ARexx"))

	;
	; only need to install the picdtpatch if orig. picture.datatype is found
	;
	(if (< @installer-version 43)
	    (set #inst-picdtpatch 1)
	    (set #inst-picdtpatch (< (p_version (tackon #classdir "DataTypes/picture.datatype")) 43))
	)
	(set #inst-picdtpatch 1)

	(if #inst-picdtpatch
	    (
		(set #install-picdt 0)
		(if (= (exists "C:PicDTPatch") 0)
		    (
			(set #install-picdt 1)
		    )
		    ; else
		    (
			(set #ver (getversion "C:PicDTPatch"))
			(set #rev (- #ver (* (/ #ver 65536) 65536)))
			(if (< #rev 2)
			    (
				(copyfiles
				    (prompt #txt-copy-picdtpatch-prompt)
				    (help @copyfiles-help)
				    (source "c/picdtpatch")
				    (dest "C:")
				)
			    )
			)
		    )
		)
		(if (= #install-picdt 1)
		(
		    (startup @app-name
			     (command "run <>NIL: c:picdtpatch")
			     (prompt #txt-picdtpatch-prompt)
			     (help #txt-picdtpatch-help @startup-help)
		    )
		    (copyfiles
			(prompt #txt-copy-picdtpatch-prompt)
			(help #txt-@copyfiles-help)
			(source "c/picdtpatch")
			(dest "C:")
			(confirm)
		    )
		))
	    )
	)

	; Install the descriptors
	(if (= (exists "devs/datatypes" (noreq)) 2)
	    (copyfiles
		(prompt #txt-copy-descriptors-prompt)
		(help @copyfiles-help)
		(source "devs/datatypes")
		(dest "DEVS:DataTypes")
		(pattern "#?")
		(infos)
	    )
	)

	(if #install-ag-desc
	    (
		(if (= (exists "Devs:DataTypes/AmigaGuide" (noreq)) 1)
		    (if (= (exists "Sys:Storage/DataTypes/AmigaGuide" (noreq)) 0)
			(copyfiles
			    (prompt #txt-copy-descriptors-prompt)
			    (help (cat #txt-copy-descriptors-help @copyfiles-help))
			    (source "Devs:DataTypes")
			    (dest "Sys:Storage/DataTypes")
			    (pattern "AmigaGuide#?")
			    (infos)
			)
		    )
		)
		(if #install-ag-link
		    (if (= (exists "Sys:Utilities/AmigaGuide.Old" (noreq)) 0)
			(if (= (exists "Sys:Utilities/AmigaGuide") 1)
			    (
				(rename "Sys:Utilities/AmigaGuide" "Sys:Utilities/AmigaGuide.Old")
				(run    "C:MakeLink From Sys:Utilities/AmigaGuide To Sys:Utilities/MultiView Hard Force")
			    )
			)
		    )
		)
		(copyfiles
		    (prompt #txt-copy-descriptors-prompt)
		    (help (cat #txt-copy-descriptors-help @copyfiles-help))
		    (source "devs")
		    (dest "DEVS:DataTypes")
		    (pattern "AmigaGuide#?")
		    (infos)
		)
	    )
	)

	(complete 30)

	(set #htdsasciidt "")
	(if #inst-htdsascii
	    (
		(set #htdsasciidt "htdsascii")
		(copyfiles
		    (prompt #txt-copy-descriptors-prompt)
		    (help (cat #txt-copy-descriptors-help @copyfiles-help))
		    (source "devs")
		    (dest "DEVS:DataTypes")
		    (pattern "ASCII#?")
		    (infos)
		)
	    )
	)

	; Install the datatypes
	(set i 0)
	(while (set #datatype (select i "hypertext" "hyperguide" "html" "directory" "man" "productinfo" #htdsasciidt ""))
	     (copyfiles
		 (prompt (cat "Copying " #datatype ".datatype"))
		 (help @copyfileslib-help)
		 (source (tackon "classes/datatypes" (cat #datatype ".datatype" #dtsuffix)))
		 (dest (tackon #classdir "DataTypes"))
		 (newname (cat #datatype ".datatype"))
	     )
	     (set i (+ i 1))
	)

	(if #inst-export
	    (
		(if (= (exists (tackon #classdir "HyperText/Export")) 0)
		    (makedir (tackon #classdir "HyperText/Export")))
		(set i 0)
		(while (set #export (select i "html" ""))
		     (copyfiles
			 (prompt (cat "Copying " #export ".export"))
			 (help @copyfiles-help)
			 (source (cat "classes/hypertext/export/" #export ".export"))
			 (dest (tackon #classdir "HyperText/Export"))
			 (newname (cat #export ".export"))
		     )
		     (set i (+ i 1))
		)
	    )
	)

	(complete 40)

	(if (= (exists "macros" (noreq)) 2)
	    (
		; backup old default file
		(if (= (exists (tackon #dest-dir "Default.hgm")) 0)
		    (rename (tackon #dest-dir "Default.hgm") (tackon #dest-dir "Default.hgm.old"))
		)
		(copyfiles
		    (prompt #txt-copy-macros-prompt)
		    (source "")
		    (dest #dest-dir)
		    (pattern "macros#?")
		    (infos)
		)
		(if (= (exists "ENVARC:DataTypes/hyperguide.prefs" (noreq)) 0)
		    (
			(textfile
			    (dest "ENVARC:DataTypes/hyperguide.prefs")
			    (append (cat "MACRODIR " #macro-dir "\n"))
			)
			(textfile
			    (dest "ENV:DataTypes/hyperguide.prefs")
			    (append (cat "MACRODIR " #macro-dir "\n"))
			)
		    )
		)
	    )
	)

	(if (= (exists (tackon #classdir "DataTypes/html.datatype")) 1)
	    (if (= (exists ("EnvArc:DataTypes/html.prefs")) 0)
		(
		    (copyfiles (prompt #txt-copy-html-prefs)
			       (source "env/datatypes/html.prefs")
			       (dest "ENVARC:DataTypes")
		    )
		    (copyfiles (prompt #txt-copy-html-prefs)
			       (source "env/datatypes/html.prefs")
			       (dest "ENV:DataTypes")
		    )
		)
	    )
	)

	(complete 50)

	(if (= (exists "locale" (noreq)) 2)
	    (
		(set l 0)

		(while (set #lang (select l #loc-english #loc-german #loc-frensh #loc-danish #loc-greek #loc-italiano #loc-norsk #loc-suomi #loc-swedish #loc-spanish ""))
		     (if (in #languages l)
			 (
			     (set c 0)
			     (while (set #catalog (select c "hypertextdt" "directorydt" ""))
				 (if (= (exists (cat "locale/catalogs/" #lang "/" #catalog ".catalog")) 1)
				     (copyfiles
					 (prompt (cat #txt-copy-catalog-prompt ": " #lang))
					 (source (cat "locale/catalogs/" #lang "/" #catalog ".catalog"))
					 (dest   (cat "Locale:catalogs/" #lang))
				     )
				 )
				 (set c (+ c 1))
			     )
			     (if (= (exists (cat "locale/help/" #lang "/HTDS_Help.hguide")) 1)
				 (copyfiles
				     (prompt (cat #txt-copy-helpfile-prompt ": " #lang))
				     (source (cat "locale/help/" #lang "/HTDS_Help.hguide"))
				     (dest   (cat "Help:" #lang))
				 )
			     )

			     ; only install global TOC, if it doesn't exists
			     (if (= (exists (cat "Help:" #lang "/HTDS_TOC.hguide") (noreq)) 0)
				 (if (= (exists (cat "locale/help/" #lang "/HTDS_TOC.hguide")) 1)
				     (
					 (copyfiles
					     (prompt (cat #txt-copy-tocfile-prompt ": " #lang))
					     (source (cat "locale/help/" #lang "/HTDS_TOC.hguide"))
					     (dest   (cat "Help:" #lang))
					 )
					 (rexx (cat "ARexx/AddTOCEntry.rexx HyperText-DataType-System " (tackon (tackon #dest-dir "docs") "HTDS.hguide")))
				     )
				 )
			     )
			 )
		     )
		     (set l (+ l 1))
		)
	    )
	)

	(complete 60)

	; install forms
	(copyfiles
		(prompt #txt-copy-forms-prompt)
		(help @copyfiles-help)
		(source "")
		(dest #dest-dir)
		(pattern "forms#?")
		(infos)
	)
	(copyfiles
		(prompt #txt-copy-getconf-prompt)
		(help @copyfiles-help)
		(source "c/getconf")
		(dest (tackon #dest-dir "forms"))
		(infos)
	)

	(if #inst-docs
	    (
		(copyfiles
			(prompt #txt-copy-docs-prompt)
			(help @copyfiles-help)
			(source "")
			(dest #dest-dir)
			(pattern "docs#?")
			(infos)
		)
	    )
	)

	(if #inst-examples
	    (
		(copyfiles
			(prompt #txt-copy-examples-prompt)
			(help @copyfiles-help)
			(source "")
			(dest #dest-dir)
			(pattern "examples#?")
			(infos)
		)
	    )
	)

	(if (or #inst-docs #inst-examples)
	    (
		(copyfiles
			(prompt #txt-copy-pics-prompt)
			(help @copyfiles-help)
			(source "")
			(dest #dest-dir)
			(pattern "pics#?")
			(infos)
		)
	    )
	)

	(complete 70)

	(if #inst-arexx
	    (
		(copyfiles
			(prompt #txt-copy-arexx-prompt)
			(help @copyfiles-help)
			(source "")
			(dest #dest-dir)
			(pattern "ARexx#?")
			(infos)
		)
	    )
	)

	; install developer files
	(if #inst-developer
	    (
		(copyfiles
			(prompt #txt-copy-prog-files-prompt)
			(help @copyfiles-help)
			(source "developer")
			(dest (tackon #dest-dir "developer"))
			(pattern "#?")
			(infos)
		)
		(copyfiles
			(source "developer.info")
			(dest #dest-dir)
		)
		(tooltype (dest (tackon #dest-dir "developer.info")) (noposition))
	    )
	)

	(complete 80)

	(if #inst-locale-sources
	    (
		(copyfiles
			(prompt #txt-copy-loc-sources-prompt)
			(help @copyfiles-help)
			(source "locale")
			(dest (tackon #dest-dir "locale"))
			(pattern "(#?.c?|translations)")
			(infos)
		)
		(copyfiles
			(source "locale.info")
			(dest #dest-dir)
		)
	    )
	)

	(if #install-man
	    (
		(copyfiles
			(prompt #txt-copy-man-shell-prompt)
			(help @copyfiles-help)
			(source "s")
			(dest "s:")
			(pattern "man#?")
			(infos)
		)
	    )
	)

	(complete 90)

	(if (exists (cat "locale/ReadMe/" @language))
	    (copyfiles
		(source (cat "locale/ReadMe/" @language))
		(newname "ReadMe")
		(dest #dest-dir)
	    )
	    (copyfiles
		(source "ReadMe.txt")
		(newname "ReadMe")
		(dest #dest-dir)
	    )
	)
	(copyfiles
	    (source "ReadMe.info")
	    (dest #dest-dir)
	)
	(tooltype (dest (tackon #dest-dir "ReadMe")) (setdefaulttool "MultiView") (noposition))

	; Tell the system about the new descriptors
	(run "C:AddDataTypes Refresh")
	(execute "ReadMe")

	(complete 100)
	(exit #txt-end)
    )
)

