;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Install Scion Genealogist Version 5
;;;
;;; $VER: Install_Scion 2.01 (3 Dec 1997)
;;;
;;; This is the installation script for Scion Genealogist version 5
;;;
;;; Copyright © 1993-1998 Robbie J Akins, Wellington, New Zealand.
;;; All Rights Reserved
;;; v2.00: Original version, first official release, by Robbie J Akins
;;;
;;; `Nederlands' language strings by Freddy Ariës
;;; `Deutsch' language strings by Freddy Ariës
;;; `Türkçe' language strings by Tayfun Alacakaptan
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(set TESTING 0) ; 1 = test mode (relatively safe, 0 = distribution mode

(if (= TESTING 1)
    (user 2))	; Force "expert" mode regardless of installer defaults. Naughty!

(set @user-level 2) ; "Expert" mode preferred

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Initialize variables
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
(set ProgramName	"Scion Genealogist")		; programme name
(set ProgramBaseName	"Scion")			; programme base name
(set VersionNum		"5.07")				; programme version number
(set LogoName		"ScionLogo")			; programme logo name

(set ArchiveName	"ScionSupport.lha")		; archive name
(set ArchiveLocn	"")				; archive location
(set ScionArchive (tackon ArchiveLocn ArchiveName))

(set ArexxArchiveName	"ScionArexx.lha")		; archive name
(set ArexxArchiveLocn	"")				; archive location
(set ArexxArchive (tackon ArexxArchiveLocn ArexxArchiveName))

(set InstallScion	0)		; 1 = install, 0 = don't install
(set InstallArexx	0)		; 1 = install, 0 = don't install
(set InstallOnlineHelp	0)		; 1 = install, 0 = don't install
(set InstallExample	0)		; 1 = install, 0 = don't install
(set InstallReadMe	0)		; 1 = install, 0 = don't install
(set InstallScionCats	0)		; 1 = install, 0 = don't install

(set InstallEnglish	0)		; 1 = install, 0 = don't install
(set InstallDutch	0)		; 1 = install, 0 = don't install
(set InstallTurkish	0)		; 1 = install, 0 = don't install
(set InstallGerman	0)		; 1 = install, 0 = don't install
(set InstallNorwegian	0)		; 1 = install, 0 = don't install
(set InstallItalian	0)		; 1 = install, 0 = don't install
(set InstallSwedish	0)		; 1 = install, 0 = don't install
(set InstallFinnish	0)		; 1 = install, 0 = don't install
(set InstallFrench	0)		; 1 = install, 0 = don't install
(set Localised		0)		; 1 = localised, 0 = only english

; Set whether wish to confirm lha extraction was okay
(set xconfirmCopy    0)			; 1 = don't confirm, 0 = confirm
(set delscionarchive 0)			; 1 = delete archive, 0 = don't
(set delarexxarchive 0)			; 1 = delete archive, 0 = don't

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; English and foreign language messages and "variables"
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; NOTE: The next three variables must appear before the rest of the strings
(set #ArexxScripts	"ARexx Scripts")
(set #OnLineHelp	"On-line Help")
(set #Example		"Example Database")
(set #CatFiles		"Language Support Files")
(set #ReadmeFiles	"Documentation Files")

(set #copyingscion	"Copying the Scion archive to RAM:...")
(set #copyingarexx	"Copying the ARexx archive to RAM:...")
(set #copy_err1		"An error occurred during the copying of %s")
(set #err_msg (cat	"\n\n"
			"Press the Proceed button to stop the installation procedure.\n"))
(set #install_msg (cat "\n\nScion Genealogist installation script.\n\n"
			"This script installs Scion Genealogist\n"
			(" Version %s on your Amiga, " VersionNum)
			"along with associated support files.\n\n"
			"Scion Genealogist © 1993-1998 Robbie Akins\n"
			"All rights reserved."))

(set #dirselect		"Please select the directory where you want to install %s.")
(set #prevselect (cat	"Please chose the location where %s is currently located "
			"so that %s can be installed in the correct location."))
(set #setDirPathHelp (cat "This part of the installation is asking you where you "
			"would like to place %s.\n\nFor current %s owners, you "
			"should select the directory that is the current location "
			"of %s. If you choose a different location, then the "
			"current (existing) module(s) will be in a different "
			"place than the newly-installed module(s).\n"))

(set #setPrevLocHelp (cat "This part of the installation is asking you where "
			"to place %s.\n\nFor current %s owners, you must "
			"select the directory that is the current location "
			"of %s. If you choose a different location, then the "
			"%s will not be installed in the correct place and "
			"hence will not be available.\n\nYou CAN install "
			"%s before installing %s, but you must select the "
			"directory where you eventually intend to install %s.\n"))
(set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))
(set #pathhelpextra (cat "\n"
			"NOTE: If you are using the Installer program's "
			"function to create a new directory (using \"Make New Drawer...\"), "
			"it is highly recommended that you DO NOT include "
			"spaces in the drawer name.  Following this advice "
			"will avoid any problems accessing the directory, "
			"especially from ARexx scripts.\n"
			"\n"
			@askdir-help))
(set #installing "Installing...")

(set #lha_error1 	"Error decompressing %s from %s into the %s directory.\n")
(set #lha_error2 (cat	"\n"
			"Be sure that the directory you have specified as the "
			"destination exists and has enough free space in it "
			"to accept new files. Also be sure that if the file to "
			"be copied already exists, that the existing file "
			"isn't protected from being overwritten or deleted."))
(set #ver_err1		("\%s version %s requires at least AmigaOS 2.04 to run." ProgramName VersionNum))
(set #installoptions (cat ("Select the parts of the %s package you want to install " ProgramName)
			"at this time."))
(set #installopthelp (cat "This part of the installation procedure lets you select the "
			"parts of the distribution you want to install at this time.\n"
			"\n"
			@askoptions-help))
(set #languageoptions (cat "Select those languages that you want to install at this time.\n\n"
			"NOTE: Not all languages are fully supported."))
(set #languageopthelp (cat "This part of the installation procedure lets you select the "
			"languages that you want to install at this time.\n\n"
			"Not all languages are fully supported, so even if you "
			"select a particular language, on-line help and/or "
			"'localization' may not actually be available at this "
			"time. If you would like to help with a translation, "
			"please contact the author.\n\n"
			@askoptions-help))
(set #makedir 		"The directory that has been specified does not exist and is about to be created.")
(set #nolocale		"\n\n\nYour computer does not have support for languages other than English, and so only the English version of the distribution will be installed.")
(set #oldscionprompt (cat "\n\nYou currently have version %ld.%s of %s installed "
                        "in the directory you have selected. Do you want to "
			"replace it with version %s?"))
(set #oldscionhelp (cat "The directory that you have selected already has a "
                        "copy of %s installed. If you wish to overwrite this "
			"existing copy with version %s, select \"Yes\". "
			"If you select \"No\", you will be asked to once again "
			"select the location where you want to install the "
			"programme. Select another destination if you do not "
			"want to overwrite your existing copy."))

;=============================================================================
; Dutch strings
;
(if (= @language "nederlands")
  (
    (set #ArexxScripts	"ARexx scripts")
    (set #OnLineHelp	"On-line help")
    (set #Example	"Voorbeeld databank")
    (set #CatFiles	"Ondersteunende taal bestanden")
    (set #ReadmeFiles	"Documentatie bestanden")

    (set #copyingscion	"Copiëer Het Scion archief naar RAM:...")
    (set #copyingarexx	"Copiëer het ARexx archief naar RAM:...")
    (set #copy_err1	"Er is een fout opgetreden bij het copiëren van %s")
    (set #err_msg (cat	"\n\n"
			"Druk op Doorgaan om de installatie af te beëindigen.\n"))
    (set #install_msg (cat "\n\nScion Genealogist installatie script.\n\n"
			"Dit script installeert Scion Genealogist\n"
			(" Versie %s op uw Amiga, " VersionNum)
			"samen met bijbehorende ondersteunende bestanden.\n\n"
			"Scion Genealogist © 1993-1998 Robbie Akins\n"
			"Alle rechten gereserveerd."))

    (set #dirselect	"Kies aub. de lade waar u %s wilt installeren.")
    (set #prevselect (cat "Kies aub. de plaats waar %s zich momenteel bevindt "
			"zodat %s op de juiste plaats geïnstalleerd kan worden."))
    (set #setDirPathHelp (cat "In dit deel van de installatie wordt u gevraagd waar u "
			"%s wilt plaatsen.\n\nAls u al een versie van %s bezit, dan "
			"kunt u de lade selecteren waarin %s zich momenteel "
			"bevindt. Als u een andere plaats kiest, dan zullen de "
			"nieuw te installeren modules op een andere plaats "
			"terecht komen dan de huidige (bestaande) modules.\n"))

    (set #setPrevLocHelp (cat "In dit deel van de installatie wordt u gevraagd waar u "
			"%s wilt plaatsen.\n\nAls u al een versie van %s bezit "
			"kunt u de lade selecteren waarin %s zich momenteel "
			"bevindt. Als u een andere plaats kiest, dan zal de "
			"%s niet op de juiste plaats geïnstalleerd worden en "
			"zal zodoende niet beschikbaar zijn.\n\nU KUNT %s "
			"installeren voor %s, maar u moet de lade kiezen "
			"waarin u %s uiteindelijk wilt installeren.\n"))
    (set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))
    (set #pathhelpextra (cat "\n"
			"OPM.: Als u het Installer programma gebruikt om "
			"een nieuwe lade aan te maken (met \"Maak nieuwe lade...\"), "
			"dan is het aan te raden om GEEN spaties in de "
			"naam van de lade te zetten.  Door dit advies te "
			"volgen voorkomt u problemen bij de toegang tot "
			"de lade, met name vanuit ARexx scripts.\n"
			"\n"
			@askdir-help))
    (set #installing "Installeren... ")

    (set #lha_error1 	"Fout bij uitpakken van %s uit %s naar de %s lade.\n")
    (set #lha_error2 (cat "\n"
			"Verzeker u ervan dat de lade die u als bestemming "
			"heeft aangegeven daadwerkelijk bestaat en dat er "
			"genoeg ruimte vrij is om de bestanden te copiëren. "
			"Verzeker u er ook van dat, als het te copiëren "
			"bestand al aanwezig is, het bestaande bestand niet "
			"beveiligd is tegen overschrijven of wissen."))
    (set #ver_err1	("\Voor %s versie %s is tenminste AmigaOS 2.04 vereist." ProgramName VersionNum))
    (set #installoptions (cat ("Kies de delen van het %s pakket die u nu " ProgramName)
			"wenst te installeren."))
    (set #installopthelp (cat "In dit deel van de installatie procedure kunt u de delen "
			"van de distributie selecteren die u op dit moment wilt installeren.\n"
			"\n"
			@askoptions-help))
    (set #languageoptions (cat "Kies de talen die u nu wenst te installeren.\n\n"
			"OPM.: Niet alle talen worden volledig ondersteund."))
    (set #languageopthelp (cat "In dit deel van de installatie procedure kunt u de talen "
			"selecteren die u op dit moment wilt installeren.\n\n"
			"Niet alle talen worden volledig ondersteund, dus zelfs als u een "
			"bepaalde taal kiest, kan het zijn dat on-line help en/of "
			"'localisatie' nog niet daadwerkelijk beschikbaar is. "
			"Als u bereid bent te helpen met de vertaling, neem dan "
			"alstublieft contact op met de auteur.\n\n"
			@askoptions-help))
    (set #makedir 	"De lade die u heeft gekozen bestaat niet en zal worden aangemaakt.")
    (set #nolocale	"\n\n\nUw computer ondersteunt het gebruik van andere talen dan Engels niet, en daarom zal alleen de Engelse versie van de distributie geïnstalleerd worden.")
    (set #oldscionprompt (cat "\n\nOp dit moment heeft u versie %ld.%s van %s geïnstalleerd "
                        "in de door u gekozen lade. Wilt u die vervangen door "
			"versie %s?"))
    (set #oldscionhelp (cat "In de lade die u heeft gekozen bevindt zich al "
                        "een versie van %s. Als u deze bestaande versie wenst "
			"te vervangen door versie %s, kies dan \"Ja\". "
			"Als u \"Nee\" kiest, zult u opnieuw gevraagd worden "
			"om de plaats te kiezen waar u het programma wenst "
			"te installeren. Kies een andere bestemming als u de "
			"bestaande versie niet wilt overschrijven."))

  )
)
;
;=============================================================================
; German strings
;
(if (= @language "deutsch")
 (
  (set #ArexxScripts	"ARexx Skripts")
  (set #OnLineHelp	"On-line Hilfe")
  (set #Example		"Beispiels Datenbanken")
  (set #CatFiles	"Sprachen-unterstützende Dateien")
  (set #ReadmeFiles	"Dokumentations Dateien")

  (set #copyingscion	"Kopiere Scion archiv ins RAM:...")
  (set #copyingarexx	"Kopiere ARexx archiv ins RAM:...")
  (set #copy_err1	"Ein Fehler ist aufgetreten beim kopieren von %s")
  (set #err_msg (cat	"\n\n"
			"Drücke den Weiter Knopf um die Installation zu beenden.\n"))
  (set #install_msg (cat "\n\nScion Genealogist Installations Skript.\n\n"
			"Dieses Skript installiert Scion Genealogist\n"
			(" Version %s auf Ihren Amiga, " VersionNum)
			"zusammen mit den dazugehörenden unterstützenden Dateien.\n\n"
			"Scion Genealogist © 1993-1998 Robbie Akins\n"
			"Alle Rechte vorbehalten."))
  (set #dirselect	"Bitte wählen Sie die Schublade wohin Sie %s installieren möchten.")
  (set #prevselect (cat	"Bitte wählen Sie den Ort an den sich %s jetzt befindet "
			"damit %s am korrekten Ort installiert werden kann."))
  (set #setDirPathHelp (cat "Dieser Teil der Installation fragt Ihnen wohin Sie %s "
			"installieren möchten.\n\nBesitzer einer älteren Version von %s "
			"sollten hier die Schublade wählen in dem sich die derzeitige "
			"Version von %s befindet. Falls Sie einen anderen Ort wählen, werden die "
			"derzeitige existierende Module an einem anderen Ort sein als "
			"die neu zu installieren Module.\n"))

  (set #setPrevLocHelp (cat "Hier werden Sie gefragt wohin die %s installiert "
			"werden soll.\n\n"
			"Besitzer einer älteren Version von %s sollten hier "
			"die Schublade wählen in der sich die derzeitige Programmversion "
			"befindet. Falls Sie einen anderen Ort wählen, wird "
			"die %s nicht verfügbar sein.\n\n"
			"Sie KÖNNEN die %s installieren bevor %s, "
			"aber dann müssen Sie die Schublade wählen in die Sie später "
			"auch %s installieren werden."))
  (set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))

  (set #pathhelpextra (cat "\n"
			"BEMERKUNG: Falls Sie die Funktion des Installer Programms "
			"benutzen um eine neue Schublade anzulegen (\"Neue Schublade anlegen...\"), "
			"wird es strengstens empfohlen KEINE Leerzeichen im "
			"Namen der Schublade einzugeben. Wenn Sie diesen Rat folgen "
			"vermeiden Sie Probleme beim zugreifen auf die Schublade, "
			"vor allem aus ARexx Skripts.\n"
			"\n"
			@askdir-help))
  (set #installing "Installiere... ")
  (set #lha_error1 	"Fehler beim Entpacken von %s aus %s in die %s Schublade.\n")
  (set #lha_error2 (cat	"\n"
			"Bitte vergewissern Sie sich davon daß die Schublade die Sie "
			"als Ziel aufgegeben haben wirklich existiert und das genügend Platz "
			"frei ist für die Dateien. Beachten Sie auch daß, wenn die "
			"zu kopieren Datei schon existiert, die schon vorhandene Datei "
			"nicht geschützt sein darf gegen schreiben oder entfernen."))
  (set #ver_err1	("\%s Version %s benötigt mindestens AmigaOS 2.04 zum Laufen." ProgramName VersionNum))
  (set #installoptions (cat ("Wählen Sie bitte die Teile des %s Pakkets die Sie jetzt " ProgramName)
			"installieren möchten."))
  (set #installopthelp (cat "In diesem Teil der Installation können Sie wählen welche "
			"Teile der Distribution Sie in diesem Moment installieren möchten.\n"
			"\n"
			@askoptions-help))
  (set #languageoptions (cat "Wählen Sie die Sprachen die Sie jetzt installieren möchten.\n\n"
			"BEMERKUNG: Nicht alle Sprachen werden voll unterstützt."))
  (set #languageopthelp (cat "In diesem Teil der Installation können Sie die Sprachen "
			"wählen die Sie in diesem Moment installieren möchten.\n\n"
			"Nicht alle Sprachen werden voll unterstützt, also sogar wenn "
			"sie eine Sprache wählen, kann es sein das On-line Hilfe und/oder "
			"'Localisation' noch nicht tatsächlich vorhanden sind. "
			"Wenn Sie helfen möchten bei einer Übersetzung, nehmen Sie "
			"bitte Kontakt auf mit dem Autor.\n\n"
			@askoptions-help))
  (set #makedir 	"Die angegebene Schublade existiert nicht und wird jetzt angelegt.")
  (set #nolocale	"\n\n\nIhr Computer unterstützt keine andere Sprachen als Englisch, deshalb wird nur die englische Version der Distribution installiert werden.")
  (set #oldscionprompt (cat "\n\nSie haben momentan Version %ld.%s von %s installiert "
                        "in der von Ihnen gewählten Schublade. Wollen Sie diese Version "
			"ersetzen durch Version %s?"))
  (set #oldscionhelp (cat "In der von Ihnen gewählte Schublade ist schon eine Version "
                        "von %s vorhanden. Falls Sie möchten daß die existierende Version "
			"überschrieben wird mit Version %s, wählen Sie \"Ja\". "
			"Wenn Sie \"Nein\" wählen, werden Sie wieder gefragt "
			"werden die Ziel-Schublade zu wählen wohin Sie das Programm "
			"installieren möchten. Wählen Sie ein anderes Ziel wenn Sie "
			"nicht möchten das die vorhandene Version überschrieben wird."))
 )
)
;
;=============================================================================
; Turkish strings
;
(if (= @language "türkçe")
 (
(set #ArexxScripts	"ARexx Komutları")
(set #OnLineHelp	"Anında Yardım")
(set #Example		"Örnek Veri Tabanı")
(set #CatFiles		"Dil Destek Dosyaları")
(set #ReadmeFiles	"Dokümantasyon Dosyaları")

(set #copyingscion	"Scion arşivini RAM:'e kopyalıyorum...")
(set #copyingarexx	"ARexx arşivini RAM:'e kopyalıyorum...")
(set #copy_err1		"%s dosyasını kopyalarken bir hata oluştu")
(set #err_msg (cat	"\n\n"
			"Kurulum işlemlerini durdurmak için devam tuşuna basın.\n"))
(set #install_msg (cat "\n\nScion Soyağacı Uzmanı, kurulum komut dizisi.\n\n"
			"Bu komut dizisi Scion Soyağacı Uzmanı'nın\n"
			("%s sürümünü ve ilişkili destek " VersionNum)
			"dosyalarını Amiganıza kurar.\n\n"
			"Scion Soyağacı Uzmanı © 1993-1998 Robbie Akins\n"
			"Tüm Hakları Saklıdır."))

(set #dirselect		"Lütfen %s programını kurmak istediğiniz dizini seçin.")
(set #prevselect (cat	"Lütfen, %s programının doğru yere kurulmasını sağlamak "
			"için, %s programının şu anda bulunduğu yeri seçin."))
(set #setDirPathHelp (cat "Kurulumun bu bölümü size %s programını nereye yerleştirmek "
			"istediğinizi sormaktadır.\n\nHalen %s programı sahibiyseniz, "
			"%s programının şu anda kurulu bulunduğu konumu seçmelisiniz. "
			"Eğer farklı bir konum seçerseniz, halen elinizde mevcut bulunan "
			"bulunan modüller, yeni kurulan modüllerle farklı yerlerde"
			"kalacaklardır.\n"))
;THIS NEXT BIT IS TOO LONG AND HAS TOO MANY '%s' IN IT. FIX REQUESTED.
;(set #setPrevLocHelp (cat "Kurulumun bu bölümü size %s programını nereye yerleştirmek "
;			"istediğinizi sormaktadır.\n\nHalen %s programı sahibiyseniz, "
;			"%s programının şu anda kurulu bulunduğu konumu seçmelisiniz. "
;			"Eğer farklı bir konum seçerseniz, %s doğru yere kurulmayacak "
;			"ve bu nedenle %s kullanıma hazır olmayacaktır.\n\n"
;			"İsterseniz, %s dosyalarını, %s dosyalarını kurmadan önce "
;			"kurabilirsiniz, ancak %s dosyalarını ileride kurmaya "
;			"niyetlendiğiniz dizini seçmelisiniz.\n"))
(set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))
(set #pathhelpextra (cat "\n"
			"NOT: Eğer yeni bir dizin yaratmak için, Installer programının "
			"(\"Yeni Çekmece Yarat...\") fonksiyonunu kullanıyorsanız, "
			"dizin (çekmece) adında hiçbir boşluk bırakmamanız önemle "
			"tavsiye olunur. Bu tavsiyeye uymanız, özellikle ARexx "
			"programlarından, bu dizine ulaşırken ortaya çıkabilecek "
			"sorunları ortadan kaldıracaktır.\n"
			"\n"
			@askdir-help))
(set #installing "Installing...")

(set #lha_error1 	"%s arşiv dosyasını, %s'den %s dizinine açarken hata.\n")
(set #lha_error2 (cat	"\n"
			"Yeni dosyaların sığabilmesi için, nihai konum olarak seçtiğiniz "
			"dizinin halen mevcut ve yeterince serbest alana sahip olduğuna "
			"emin olun. Ayrıca, eğer kopyalanmak istenen dosya halen "
			"mevcutsa, mevcut dosyanın, yazılmaya veya silinmeye karşı "
			"korunmuş olmadığına da emin olun."))
(set #ver_err1		("\%s sürüm %s, çalışabilmesi için en az AmigaOS 2.04 gerektirmektedir." ProgramName VersionNum))
(set #installoptions (cat ("%s paketinin şu anda kurmak istediğiniz bölümlerini " ProgramName)
			"seçiniz."))
(set #installopthelp (cat "Kurulum işlemlerinin bu bölümü, dağıtım paketinden şu anda kurmak "
			"istediğiniz bölümleri seçmenize olanak vermektedir.\n"
			"\n"
			@askoptions-help))
(set #languageoptions (cat "Şu anda kurmak istediğiniz dilleri seçiniz.\n\n"
			"NOT: Dillerin tümü tam olarak desteklenmemektedir."))
(set #languageopthelp (cat "Kurulum işlemlerinin bu bölümü, şu anda kurmak istediğiniz "
			"dilleri seçmenize olanak vermektedir.\n\n"
			"Dillerin tümü tam olarak desteklenmemektedir, bu nedenle "
			"eğer belli bir dili seçerseniz, anında yardım ve/veya yerel dil "
			"(localization) şu anda mevcut olmayabilir. Eğer bir çeviri "
			"yaparak yardımcı olmak istiyorsanız, lütfen program yazarıyla "
			"temasa geçin.\n\n"
			@askoptions-help))
(set #makedir 		"Belirlediğiniz dizin halen mevcut olmadığından, yaratılmak üzeredir.")
(set #nolocale		"\n\n\nBilgisayarınız şu anda İngilizceden başka dilleri desteklememektedir, bu nedenle dağıtım paketinden yalnız İngilizce sürüm kurulacaktır.")
(set #oldscionprompt (cat "\n\nSeçtiğiniz dizinde halen %s programının  %ld.%s sürümü "
                        "kurulu bulunmaktadır. Bunu %s sürümüyle değiştirmek "
			"ister misiniz?"))
(set #oldscionhelp (cat "Seçtiğiniz dizinde halen %s programının bir kopyası "
                        "kurulu durumdadır. Bu mevcut kopyayı sürüm %s ile "
			"değiştirmek istiyorsanız \"Evet\" seçeneğini seçin. "
			"Eğer \"Hayır\" seçeneğini kullanırsanız, size bir kez daha "
			"Programı nereye kurmak istediğiniz sorulacaktır. Eğer mevcut "
			"kopyanızın üzerine yazılmasını istemiyorsanız, yeni bir nihai "
			"konum seçin."))
  )
)
;
;=============================================================================
; Norwegian strings
;
(if (= @language "norsk")
 (
  (set #ArexxScripts      "ARexx Skript")
  (set #OnLineHelp        "On-line Hjelp")
  (set #Example           "Eksempeldatabase")
  (set #CatFiles          "Språkstøttefiler")
  (set #ReadmeFiles       "Dokumentasjonsfiler")

  (set #copyingscion      "Kopierer Scionarkivet til RAM:...")
  (set #copyingarexx      "Kopierer Arexx-arkviet til RAM:...")
  (set #copy_err1         "En feil oppsto under kopiering av %s")
  (set #err_msg (cat      "\n\n"
                        "Trykk Fortsettknappen for å avbryte installasjonen.\n"))
  (set #install_msg (cat "\n\nScion Genealogist installasjonsskript.\n\n"
                        "Dette skriptet installerer Scion Genealogist\n"
                        (" Versjon %s på din Amiga, " VersionNum)
                        "sammen med en del støttefiler.\n\n"
                        "Scion Genealogist © 1993-1998 Robbie Akins\n"
                        "Med enerett."))                                          
  (set #dirselect         "Vennligst velg skuffen du vil installere %s.")
  (set #prevselect (cat   "Vennligst marker området hvor %s befinner seg nå, "
                        "slik at %s kan installeres på riktig lokasjon."))
  (set #setDirPathHelp (cat "Denne delen av installasjonen spør hvor du vil plassere "
                        "%s.\n\nNåværende %s eiere bør velge samme lokasjon som %s "
                        "befinner seg i allerede. Hvis du velger en annen lokasjon "
                        "vil nåværende modul(er) befinne seg på en annen lokasjon "
                        "enn de/den ny-installerte modulen(e).\n"))               
  (set #setPrevLocHelp (cat "Denne delen av installasjonen spør hvor du vil plassere "
                        "%s.\n\nNåværende eiere av %s må velge samme lokasjon "
                        "som %s befinner seg i. Hvis du velger en annen lokasjon "
                        "vil ikke %s installeres på riktig plass og vil da ikke "
                        "være tilgjengelig.\n\nDu KAN installere %s før du installerer "
                        "%s, men du må velge skuffen su til slutt vil ha %s.\n"))                       
  (set #setPrevLocHelp (#setPrevLocHelp #OnLineHelp ProgramName ProgramName #OnLineHelp #OnLineHelp ProgramName ProgramName))
  (set #pathhelpextra (cat "\n"
                        "OBS: Hvis du brukere Installer-programmet til "
                        "å lage en ny skuff (\"Lag Ny Skuff...\"), anbefales "
                        "det at du IKKE har mellomrom i skuff-navnet. Dette for å "
                        "unngå problemer ved aksessering av skuffen, spesielt "
                        "fra Arexx-skriptene.\n"
                        "\n"
                        @askdir-help))
                       
  (set #installing "Installerer...")

  (set #lha_error1        "Feil ved utpakkingen av %s fra %s til skuff %s.\n")
  (set #lha_error2 (cat   "\n"
                        "Forsikre deg om at skuffen du har spesifisert som "
                        "destinasjon eksisterer og har nok ledig plass."
                        "I tillegg, hvis filen som skal kopieres allerede eksisterer, "
                        "må du forsikre deg om at filen ikke er beskyttet mot "
                        "overskirving og sletting."))
            
  (set #ver_err1          ("\%s versjon %s krever minst AmigaOS 2.04 for å kjøre." ProgramName VersionNum))
  (set #installoptions (cat ("Velg hvilke deler av %s pakken du vil installere " ProgramName)
                        "nå."))
  (set #installopthelp (cat "Denne delen av installasjonen lar deg velge hvilke deler "
                        "av distribusjonen du vil installere nå.\n"
                        "\n"
                        @askoptions-help))
  (set #languageoptions (cat "Velg hvilke språk du vil installere nå.\n\n"
                        "NB: Ikke alle språk er fullt støttet"))
  (set #languageopthelp (cat "Denne delen av installasjonen lar deg velg hvilke "
                        "språk du vil installere nå.\n\n"
                        "Ikke alle språk er fullt støttet, så selv om du velger "
                        "et spesielt språk, er det ikke sikkert at on-line hjelp "
                        "og/eller 'lokalisering' er tilgjengelig. Vennligst kontakt "
                        "programmereren hvis du vil hjelpe med en oversettelse.\n\n"
                        @askoptions-help))
  (set #makedir           "Skuffen som er spesifisert som destinasjon eksisterer ikke og er iferd med å opprettes.")
  (set #nolocale          "\n\n\nSystemet ditt støtter ikke andre språk enn engelsk, derfor vil bare engelsk versjon installeres.")
  (set #oldscionprompt (cat "\n\nDu har allerede versjon %ld.%s av %s installert "
                        "i skuffen du har valgt. Vil du erstatte den med versjon%s?"))
  (set #oldscionhelp (cat "Skuffen du har valgt inneholder allerede en kopi av s% "
                        "installert. Hvis du vil skrive over denne kopien med "
                        "versjon %s, velg \"Ja\". Hvis du velger \"Nei\" vil du på nytt "
                        "bli spurt om område du vil installere programmet. Velg "
                        "en annen destinasjon hvis du ikke vil skrive over eksisterende kopi"))
 )
)
;
;=============================================================================
; Italian strings
;
(if (= @language "italiano")
;(
; Include the Italian versions of above strings in here.
;)
)
;
;=============================================================================
; Swedish strings
;
(if (= @language "svenska")
;(
; Include the Swedish versions of above strings in here.
;)
)
;
;=============================================================================
; Finnish strings
;
(if (= @language "suomi")
;(
; Include the Finnish versions of above strings in here.
;)
)
;
;=============================================================================
; French strings
;
(if (= @language "français")
;(
; Include the French versions of above strings in here.
;)
)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Some useful procedures
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Ask the user for a directory name.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS:
;    SDP_ModuleName    ; Name of 'module' to install
;    SDP_DefDir        ; Default directory to start with
;
;    #setDirPathHelp   ; Any help text. Note: This is set globally at the start.
;
; OUTPUTS:
;    SDP_DirPath       ; The selected directory
;
(procedure setDirPath
    (
    (set moveon    FALSE)
    (while (NOT moveon)
        (
        (set SDP_DirPath
            (askdir    (prompt    (#dirselect SDP_ModuleName))
                (help (#setDirPathHelp SDP_ModuleName ProgramBaseName SDP_ModuleName) #pathhelpextra)
                (default SDP_DefDir)
                (newpath)
            )
        )

        ; Don't try and create directory in pretend mode (gets stuck in a loop!)
        (if (<> @pretend 1)
            (
                (if (= (exists SDP_DirPath) 0)
                  (
                    (makedir SDP_DirPath
                        (prompt #makedir)
                        (help @makedir-help)
                        (confirm)
                        (infos)
                    )
                    (if (= (exists SDP_DirPath) 2)
                        (set moveon    TRUE)
                    )
                  )
                  (set moveon    TRUE)
                )
            )(set moveon TRUE))
        )
    )
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Ask user where Scion was previously installed so help can be installed correctly
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS:
;    SPL_ModuleName    ; Name of 'module' to install (#OnLineHelp)
;    SPL_DefDir        ; Default directory to start with
;
;    #setPrevLocHelp   ; Any help text. Note: This is set globally at the start.
;
; OUTPUTS:
;    SPL_DirPath       ; The selected directory
;
(procedure setPrevLoc
    (
    (set SPL_DirPath
        (askdir    (prompt    (#prevselect ProgramName SPL_ModuleName))
            (help (#setPrevLocHelp))
            (default SPL_DefDir))
        )
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Extract a file from an 'lha' archive file using 'lx'
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS:
;    xarcFileName    ; Name of archive (eg "fred.lha")
;    xsrcFileName    ; Name of file within archive (including "internal" dir structure)
;    xdestDirName    ; "Base" location to copy file to (will recreate "internal"
;                      dir structure of archive)
;    xconfirmCopy    ; 0 = confirm extraction okay, else don't confirm
;
(procedure extractLhaFile2Dir
    (
    (set lha_rc (run ("lx -qf x %s \"%s\" \"%s\"" xarcFileName xsrcFileName xdestDirName)))
    (if (<> lha_rc 0)
        (message
            (#lha_error1 xsrcFileName xarcFileName xdestDirName) #lha_error2
        )
    )
    (if (= 0 xconfirmCopy)
        (
        (if (= 0 (exists (tackon xdestDirName xsrcFileName)))
            (abort (#copy_err1 xsrcFileName) #err_msg)
        )
	)
    )
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Fix up "lha" destinations which must end with ":" or "/"
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS:
;    xdestDirName    ; "Base" location to fix up
;
(procedure fixLhaDest
(set len (strlen xdestDirName))
(if (<> (substr xdestDirName (- len 1) 1) ":")
    (set xdestDirName (cat xdestDirName "/")))
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Ask the user which parts of the package should be installed.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
(procedure setPkgOpts
    (
    (set PkgOpts
        (askoptions
            (prompt #installoptions)
            (help #installopthelp
            )
            (choices
                ; bit position 0 -- install Scion ( AND ReadMe files)
                ;
                ("%s" ProgramName)

                ; bit position 1 -- install ARexx scripts
                ;
                ("%s" #ArexxScripts)

                ; bit position 2 -- install Guides
                ;
                ("%s" #OnLineHelp)

                ; bit position 3 -- install Example database
                ;
                ("%s" #Example)

            )
        )
    )
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Ask the user which languages should be installed.
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
(procedure setLanguages
    (
    (set LanguageOpts
        (askoptions
            (prompt #languageoptions)
            (help #languageopthelp)

            (choices
                ; bit position 0 -- install English
                ;
                "English"

                ; bit position 1 -- install Dutch
                ;
                "Nederlands"

                ; bit position 2 -- install Turkish
                ;
                "Türkçe"

                ; bit position 3 -- install German
                ;
                "Deutsch"

                ; bit position 4 -- install Norwegian
                ;
                "Norsk"
;;;
;;;                ; bit position 5 -- install French
;;;                ;
;;;                "Français"
;;;
;;;                ; bit position 6 -- install Italian
;;;                ;
;;;                "Italiano"
;;;
;;;                ; bit position 7 -- install Swedish
;;;                ;
;;;                "Svenska"
;;;
;;;                ; bit position 8 -- install Finnish
;;;                ;
;;;                "Suomi"

	    )
        )
    )
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Get the version and revision number of file/device/library/OS/etc
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS: WV_Item	; Name of device/file/library/etc. "" for OS version
;
; OUTPUTS: WV_VerNum	; (long) version/revision number
;          WV_Ver	; Version number
;          WV_Rev	; Revision number
; NOTE: Both WV_Ver and WV_Rev returned as 0 if "WV_Item" does not exist
;
(procedure WhatVersion
    (
    (if (= WV_Item "")
        (set WV_VerNum (getversion))		; For OS
        (set WV_VerNum (getversion WV_Item)))	; For other "files"
    (set WV_Ver (/ WV_VerNum 65536))
    (set WV_Rev (- WV_VerNum (* WV_Ver 65536)))
    )
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Fix revision numbers because I use 'x.05' style instead of 'x.5' style
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; INPUTS:  WV_Rev	; Revision number
;
; OUTPUTS: FR_Rev	; Revision # modified to give leading '0' where needed
;
(procedure FixRevision
    (
    (if (< WV_Rev 10)
        (set FR_Rev (cat "0" WV_Rev))
	(set FR_Rev (cat WV_Rev))
    )
))

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; See if Multiview and/or AmigaGuide exist
;;;
;;; This is less than perfect! I can't get "run" to return a command result
;;; from the "which" command when run from Workbench! Okay from a shell.
;;; I wanted to use "which"command to locate viewer, but doesn't bloody work!
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; OUTPUT: ViewerType = 1 for MultiView (preferred)
;                    = 2 for AmigaGuide
;                    = 0 for neither
;
(procedure WhichGuideViewer
    (
    (if (= (exists "SYS:Utilities/MultiView" (noreq)) 1)
        (set ViewerType 1)
        (if (= (exists "SYS:Utilities/AmigaGuide" (noreq)) 1)
            (set ViewerType 2)
	(set ViewerType 0)))
    )
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                                                       ;;;
;;;                START OF ACTUAL INSTALLATION PROCESS                   ;;;
;;;                                                                       ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Make sure we are running under a 2.04 ROM (at least)
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

(set WV_Item "")	; Want OS version
(WhatVersion)
(if (< WV_Ver 37)
    (abort (cat #ver_err1 #err_msg))
    )

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Display startup message and make sure t: exists
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

(message #install_msg)

(if (= (getassign "t") "")
    (makeassign "t" RAM:)
)

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Do installation
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

; Try and determine the best place to set as destination for the installation.
; NOTE: For "novice" mode, the installer uses the value of @default-dest.

(if (= (exists "Work:" (noreq)) 2)          ; Check for WORK:
    (set @default-dest ("Work:%s" ProgramBaseName))
    (set @default-dest ("SYS:%s" ProgramBaseName))
)

; NOTE: For test purposes, over-ride default location with RAM:
(if (= TESTING 1)
    (set @default-dest ("RAM:%s" ProgramBaseName)))

(set Scion-dest @default-dest)              ; Default location to install Scion programme
(setPkgOpts)                                ; Ask for installation options

(if (= (exists "LIBS:locale.library" (noreq)) 1) ;Is there locale support?
    (
    (set Localised 1)                       ; Set "localisation" supported
    ; Only ask for languages for Scion or On-line help
    (if (OR (IN PkgOpts 0) (IN PkgOpts 2))
        (setLanguages)                      ; Ask for languages to install
        )
    )
    (message #nolocale))                    ; Give bad news about no locale

(set SDP_DefDir @default-dest)              ; Start with default location

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Set up installation options and destinations for files
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; bit position 0 -- install Scion & ReadMe files
(set Scion_Really 0)                        ; Do NOT install Scion at the moment
(if (IN PkgOpts 0)                          ; if bit position 0 (Scion option) is on
    (
    (while (<> Scion_Really 1)
        (
        (set SDP_ModuleName ProgramBaseName); First module is Scion
        (setdirpath)                        ; Returns user selected location in 'SDP_DirPath'
        (set @default-dest SDP_DirPath)     ; Reset default location (for 'completed' message)

        (set Scion-dest SDP_DirPath)        ; Location to install Scion programme
        (set InstallScion 1)                ; 1 = install Scion
    
        (set readme-dest Scion-dest)        ; Default to "base" location where Scion is
        (set InstallReadMe 1)               ; 1 = install ReadMe files

        (set WV_Item (tackon Scion-dest ProgramBaseName))
        (if (exists WV_Item (noreq))        ; Existing Scion installed?
	    (
            (WhatVersion)                   ; Get existing Scion version number
            (FixRevision)                   ; Kludge for my revision numbering!
            (set Scion_Really (askbool
	        (prompt (#oldscionprompt WV_Ver FR_Rev ProgramName VersionNum)
		(help (#oldscionhelp ProgramName VersionNum))
		(default 1))))
	    )
	    ; 'else'
	    (set Scion_Really 1)            ; Nothing there - really install
        ))
     )
    ))

; bit position 1 -- install ARexx scripts
(if (IN PkgOpts 1)                          ; if bit position 1 (ARexx scripts option) is on
    (
    (set SDP_ModuleName #ArexxScripts)      ; Next 'section' is ARexx scripts

    (if (<> (getassign "REXX") "")
        (set SDP_DefDir "REXX:")            ; Preferred default location is REXX:
        (
	(if (IN PkgOpts 0)                  ; Was Scion location chosen?
	    (set SDP_DefDir (tackon Scion-dest "Rexx")) ; 'Root' is location of Scion
	    (set SDP_DefDir "S:")           ; Last chance default
	)
    ))

    (setdirpath)                            ; Returns user selected location in 'SDP_DirPath'

    (set arexx-dest SDP_DirPath)            ; Location to install ARexx scripts
    (set InstallArexx 1)                    ; 1 = install ARexx scripts
    ))

; bit position 2 -- install Guides
(if (IN PkgOpts 2)                          ; if bit position 2 (On-line help option) is on
    (
    (set InstallOnlineHelp 1)               ; 1 = install ".guide" files
    (if (IN PkgOpts 0)                      ; Installing Scion at this time?
        (
        (set guide-dest Scion-dest)         ; Default to "base" location where Scion is
        )
	; Not installing Scion - ask where it is
	(
        (set SPL_ModuleName #OnLineHelp)
        (set SPL_DefDir scion-dest)
        (setPrevLoc)
	(set guide-dest SPL_DirPath)        ; Set guide "root" location
	(set Scion-dest SPL_DirPath)        ; Reset Scion location
	(set @default-dest SPL_DirPath)     ; Reset default location too!
	))
    ))

; bit position 3 -- install Example database
(if (IN PkgOpts 3)                          ; if bit position 3 ("Example" option) is on
    (
    (if (IN PkgOpts 0)
        (set example-dest Scion-dest)       ; Default to "base" location where Scion is
	; Not installing Scion at this time. Ask for location
	(
        (set SDP_DefDir Scion-dest)         ; Start with Scion's default location
        (set SDP_ModuleName #Example)       ; Ask for Example location
        (setdirpath)                        ; Returns user selected location in 'SDP_DirPath'
        (set example-dest SDP_DirPath)      ; Location to install Example
	))
    (set InstallExample 1)                  ; 1 = install "Example" file
    ))

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Set up "locale" options and destinations
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

(if (= Localised 1)                                 ; Is "localisation" support available?
    (

    ; Where should we install catalogs for Scion?
    (if (IN PkgOpts 0)                          ; if bit position 0 (Scion option) is on
        (set scioncat-dest Scion-dest)          ; Location to install Scion catalogs
        )

    ; Should we install locales for Scion?
    (if (IN PkgOpts 0)                              ; if bit position 0 (Scion option) is on
        (set InstallScionCats 1)                    ; 1 = install Scion catalogs
        )

    (if (IN LanguageOpts 0)                         ; if bit position 0 (English)
        (set InstallEnglish 1))
    (if (IN LanguageOpts 1)                         ; if bit position 1 (Dutch)
        (set InstallDutch 1))
    (if (IN LanguageOpts 2)                         ; if bit position 2 (Turkish)
        (set InstallTurkish 1))
    (if (IN LanguageOpts 3)                         ; if bit position 3 (German)
        (set InstallGerman 1))
    (if (IN LanguageOpts 4)                         ; if bit position 4 (Norwegian)
        (set InstallNorwegian 1))
    (if (IN LanguageOpts 5)                         ; if bit position 5 (French)
        (set InstallFrench 1))
    (if (IN LanguageOpts 6)                         ; if bit position 6 (Italian)
        (set InstallItalian 1))
    (if (IN LanguageOpts 7)                         ; if bit position 7 (Swedish)
        (set InstallSwedish 1))
    (if (IN LanguageOpts 8)                         ; if bit position 8 (Finnish)
        (set InstallFinnish 1))
    )) ;;;;; (if (= Localised 1)


; If on-line help is requested, always install default English .guide file
(if (= InstallOnlineHelp 1)
        (set InstallEnglish 1))
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Copy scion and ARexx archives to RAM: (without asking for confirmation)
;;; if archives are not already on RAM: volume
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

(if (<> (getdevice ScionArchive) "RAM") ; Are the archives already on RAM:?
    (
    (copyfiles
        (prompt "\n" #copyingscion)
        (source ScionArchive)
        (dest "RAM:"))
    (set delscionarchive 1)		; Set RAM: based file for deletion
    (set ScionArchive (tackon "RAM:" ArchiveName))
    ))

(if (= InstallArexx 1)
    (
    (if (<> (getdevice ArexxArchive) "RAM")
        (
        (copyfiles
            (prompt "\n" #copyingarexx)
            (source ArexxArchive)
            (dest "RAM:"))
        (set delarexxarchive 1)		; Set RAM: based file for deletion
	(set ArexxArchive (tackon "RAM:" ArexxArchiveName))
	))
    ))
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; De-archive the appropriate files to their intended destinations
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The following installation "flags" and locations are now set appropriately:
; - InstallScion
; - InstallArexx
; - InstallOnlineHelp
; - InstallExample
; - InstallReadMe
; - Scion-dest             ; Location to install Scion programme
; - arexx-dest             ; Location to install ARexx scripts
; - guide-dest             ; "Base" location to install guide scripts
; - example-dest           ; Location to install example database
; - readme-dest            ; Location to install readme files
;
; NOTE: "language" flags are used for BOTH ".guide" AND ".catalog" files
; NOTE: ALWAYS install English ".guide" if InstallOnlineHelp is set
; - InstallEnglish
; - InstallDutch
; - InstallTurkish
; - InstallGerman
; - InstallNorwegian
; - InstallItalian
; - InstallSwedish
; - InstallFinnish
; - InstallFrench
; Localised               ; 1 if user's system support localisation
;
; - InstallScionCats
; - scioncat-dest         ; "Base" location to install Scion catalogs
;

; Install Scion
(if (= InstallScion 1)
    (
    (copyfiles
        (prompt "\n" ProgramName)
        (source ProgramBaseName)
        (dest scion-dest)
   	(files)
	(infos))
    ; Logo as well
    (copyfiles
        (prompt "\n" LogoName)
        (source LogoName)
        (dest scion-dest)
   	(files)
	(infos))
    ))

; Install on-line help as required
(if (= InstallOnlineHelp 1)
    (
    (set xconfirmCopy 1)		; Turn off confirmation for possible omissions
    (set xsrcFileName "guides.info")	; Main drawer icon
    (set MyWorkinMsg (cat #Installing #OnLineHelp))
    (working MyWorkinMsg)
    (set xarcFileName ScionArchive)
    (set xdestDirName guide-dest)
    (fixLHADest)
    ; Don't try and de-archive files in pretend mode
    (if (<> @pretend 1)
        (
        (extractLhaFile2Dir)
        ))
    (set n 0)
    (while (set whichlanguage (select n "english" "nederlands" "türkçe" "deutsch" "norsk" "italiano" "svenska" "français" "suomi" ""))
        (
	(set dolanguage (select n InstallEnglish InstallDutch InstallTurkish InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench InstallFinnish 0))
	(set n (+ n 1))
	; Now dearchive appropriate ".guide" files and drawer icons (what a pain!)
        (if (= dolanguage 1)
	    (
	    (set xsrcFileName (cat "guides/" whichlanguage ".info"))

            ; Don't try and de-archive files in pretend mode
            (if (<> @pretend 1)
                (
                (extractLhaFile2Dir)
                ))
	    (set xsrcFileName (cat "guides/" whichlanguage "/Scion.guide#?"))
            ; Don't try and de-archive files in pretend mode
            (if (<> @pretend 1)
                (
                (extractLhaFile2Dir)
                (WhichGuideViewer) ; What guide viewer is available?
                (set scratch (cat "guides/" whichlanguage "/Scion.guide"))
                (set scratch (tackon guide-dest scratch))
                (if (= (exists scratch (noreq)) 1)
		    (
		    ; Set guide viewer tooltype
                    (if (= ViewerType 1)
		        (
			;Set to multiview
			(tooltype
			    (prompt "")
			    (help "")
			    (dest scratch)
			    (setdefaulttool "MultiView"))
			)
			(if (= ViewerType 2)
			    (
			    ;Set to AmigaGuide
			    (tooltype
			        (prompt "")
			        (help "")
			        (dest scratch)
			        (setdefaulttool "AmigaGuide"))
			    )
			    (
			    ;Neither in "SYS:Utilities" - hope that "Amigaguide" is somewhere!
			    (tooltype
			        (prompt "")
			        (help "")
			        (dest scratch)
			        (setdefaulttool "Amigaguide"))
			    ))
		    )))
                ))

            ; Now for ScionRexx.guide 
            ; Don't try and de-archive files in pretend mode
            (if (<> @pretend 1)
                (
                (extractLhaFile2Dir)
                ))
	    (set xsrcFileName (cat "guides/" whichlanguage "/ScionRexx.guide#?"))
            ; Don't try and de-archive files in pretend mode
            (if (<> @pretend 1)
                (
                (extractLhaFile2Dir)
                (WhichGuideViewer) ; What guide viewer is available?
                (set scratch (cat "guides/" whichlanguage "/ScionRexx.guide"))
                (set scratch (tackon guide-dest scratch))
                (if (= (exists scratch (noreq)) 1)
		    (
		    ; Set guide viewer tooltype
                    (if (= ViewerType 1)
		        (
			;Set to multiview
			(tooltype
			    (prompt "")
			    (help "")
			    (dest scratch)
			    (setdefaulttool "MultiView"))
			)
			(if (= ViewerType 2)
			    (
			    ;Set to AmigaGuide
			    (tooltype
			        (prompt "")
			        (help "")
			        (dest scratch)
			        (setdefaulttool "AmigaGuide"))
			    )
			    (
			    ;Neither in "SYS:Utilities" - hope that "Amigaguide" is somewhere!
			    (tooltype
			        (prompt "")
			        (help "")
			        (dest scratch)
			        (setdefaulttool "Amigaguide"))
			    ))
		    )))
                ))
	    ))
	))
    ))
(set xconfirmCopy	0)		; Turn confirmation back on

; Install foreign language catalogs as required for Scion
(if (= InstallScionCats 1)
    (
    (set xconfirmCopy 1)		; Turn off confirmation for possible omissions
    (set MyWorkinMsg (cat #Installing #CatFiles))
    (working MyWorkinMsg)
    (set xarcFileName ScionArchive)
    (set xdestDirName scioncat-dest)
    (fixLHADest)
    (set n 0)
    (while (set whichlanguage (select n "english" "nederlands" "türkçe" "deutsch" "norsk" "italiano" "svenska" "français" "suomi" ""))
        (
	(set dolanguage (select n InstallEnglish InstallDutch InstallTurkish InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench InstallFinnish 0))
	(set n (+ n 1))
	; Now dearchive appropriate ".catalog" files
        (if (= dolanguage 1)
	    (
	    (set xsrcFileName (cat "catalogs/" whichlanguage "/scion5.catalog"))
            ; Don't try and de-archive files in pretend mode
            (if (<> @pretend 1)
                (
                (extractLhaFile2Dir)
                ))
	    ))
	))
    ))
(set xconfirmCopy	0)		; Turn confirmation back on

; Install Example database
(if (= InstallExample 1)
    (
    (set CurrentFile "Example")
    (set MyWorkinMsg (cat #Installing CurrentFile))
    (working MyWorkinMsg)
    (set xarcFileName ScionArchive)
    (set xsrcFileName CurrentFile)
    (set xdestDirName example-dest)
    (fixLHADest)
    ; Don't try and de-archive files in pretend mode
    (if (<> @pretend 1)
        (
        (extractLhaFile2Dir)
        ))

    (set CurrentFile "Example.info")
    (set MyWorkinMsg (cat #Installing CurrentFile))
    (working MyWorkinMsg)
    (set xsrcFileName CurrentFile)
    ; Don't try and de-archive files in pretend mode
    (if (<> @pretend 1)
        (
        (extractLhaFile2Dir)
        ))
    ))

; Install ARexx
(if (= InstallArexx 1)
    (
    (set CurrentFile "#?")
    (set MyWorkinMsg (cat #Installing #ArexxScripts))
    (working MyWorkinMsg)
    (set xarcFileName ArexxArchive)
    (set xsrcFileName CurrentFile)
    (set xdestDirName arexx-dest)
    (fixLHADest)
    (set xconfirmCopy 1)		; Turn off confirmation for multiple files
    ; Don't try and de-archive files in pretend mode
    (if (<> @pretend 1)
        (
        (extractLhaFile2Dir)
        ))

    ))

(set xconfirmCopy	0)		; Turn confirmation back on

; Lastly any "readme" files (and icons)
(if (= InstallReadMe 1)
    (
    (set n 0)
    (while (<> (set dolanguage (select n InstallEnglish InstallDutch InstallTurkish InstallGerman InstallNorwegian InstallItalian InstallSwedish InstallFrench InstallFinnish 99)) 99)
        (
	(set readme_name (select n "ReadMe" "LeesMij" "Beni-Oku" "LiesMich" "LesMeg" "Leggimi" "LäsMig" "Lisez-moi" "LueMinut" ""))
	(set n (+ n 1))
	; Now copy appropriate readme file(s)
        (if (AND (= dolanguage 1) (= (exists readme_name (noreq)) 1))
	    (
            (copyfiles
		((optional "nofail" ))	; This doesn't seem to work properly!?
                (prompt "\n" #ReadmeFiles)
                (source readme_name)
                (dest readme-dest)
   	        (files)
	        (infos))
	    ))
	))
    ))

;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Delete files no longer required from RAM: (if they've been copied there)
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

(if (= delscionarchive 1)
    (delete ScionArchive))
(if (= delarexxarchive 1)
    (delete ArexxArchive))
(exit)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

