; Dies ist das Install-Programm für die Meeting Pearls Volume 1
; Es ist Copyright (C) 1994 by Angela Schmidt, Neu-Ulm, Germany und darf
; AUSSCHLIESSLICH auf den Meeting Pearls verbreitet werden! Weitergehende
; Nutzung und Verbreitung, insbesondere Nutzung und Verbreitung auf
; anderen CD-ROMs, sind NICHT gestattet!
; Es ist NICHT gestattet, geänderte Versionen dieses Skripts in
; irgendeiner Art zu verbreiten!
; Für Sondergenehmigungen setzen Sie sich bitte mit
;    Angela Schmidt
;    Klosterweg 28/I501
;    D-76131 Karlsruhe
;    Germany
; in Verbindung!

(if (<= (/ (getversion) 65536) 34)
	(
		(set oldlevel @user-level)
		(user 2)
	)
)

(set langnum
	(askchoice
		(prompt "")
		(help @askchoice-help)
		(choices
			"Deutsch"
			"English"
;			"Français"
		)
		(default
			(if (patmatch @language "Deutsch")
				0
				(if (patmatch @language "English")
					1
;					(if (patmatch @language "Français")
;						2
;						0
;					)
					0
				)
			)
		)
	)
)

(if (<= (/ (getversion) 65536) 34)
	(user oldlevel)
)

(if (= langnum 0) (set langstring "Deutsch"))
(if (= langnum 1) (set langstring "English"))
(if (= langnum 2) (set langstring "Français"))

; Hier folgen die Strings, die für die deutsche Übersetzung benötigt
; werden. Bei Übersetzungen in andere Sprachen einfach den folgenden
; Block komplett kopieren und die Texte ändern. Die Steuerzeichen
; sollten unverändert bleiben! Wer irgendwo eine Zeile hinzufügen oder
; löschen möchte, muß dir Anzahl der "%s" entsprechend anpassen - für
; jede Zeile steht ein "%s".

(if (patmatch langstring "Deutsch")
	(
		(set warning_old_os
			(
				"%s%s%s"
				"Bitte bringen Sie Ihr Betriebssystem auf den neuesten Stand, denn ansonsten haben Sie mit Problemen zu rechnen! "
				"Diese CD läuft zwar prinzipiell auch unter Kickstart 1.2/1.3, aber mit dem Anzeigen von Bildern und einigen anderen Dingen werden Sie Ihre "
				"Probleme haben. Wählen Sie bitte die Hilfe-Seite für nähere Infos!"
			)
		)
		(set warning_old_os_help_1
			(
				"%s%s%s"
				"Leider, leider haben wir kein Bildanzeigeprogramm gefunden, das unter Kickstart 1.2/1.3 läuft und das alle wichtigen Bild-Formate (ILBM, GIF, JPEG) anzeigen kann. "
				"Das wird Ihnen das Anschauen unserer wirklich sehenswerten Bilder bedauerlicherweise nicht sehr komfortabel machen. "
				"Zunächst sollten Sie in jedem Fall im \"Expert-\" oder \"Intermediate-Mode\" dieses Install-Skripts das von Ihnen bevorzugte Bildanzeigeprogramm "
			)
		)
		(set warning_old_os_help_2
			(
				"%s%s%s%s"
				"auswählen. Sie müssen aber selber sicherstellen, daß dieses Programm das jeweilige Bildformat anzeigen kann!!! "
				"Für die Fraktale brauchen Sie zum Beispiel ein Programm, das GIF-Bilder anzeigen kann "
				"und für die Meeting-Bilder eines, welches JPEGs anzeigt. In der Regel erkennen Sie JPEG-Bilder "
				"an der Endung \".jpg\" und GIF-Bilder an der Endung \".gif\"."
			)
		)
		(set no_std_textreader
			("%s%s%s%s%s"
				"Hoppla!\n\n"
				"Auf diesem System existiert \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More"))
				"\" nicht!\n\n"
				"Unter diesen Umständen muß ich mich leider verabschieden!"
			)
		)
		(set no_std_pictureviewer
			("%s%s%s%s%s"
				"Hoppla!\n\n"
				"Auf diesem System existiert \""
				(expandpath ":C/VT")
				"\" nicht!\n\n"
				"Unter diesen Umständen muß ich mich leider verabschieden!"
			)
		)
		(set intro_msg
			("%s%s"
				"Dies ist das Installier-Skript für die Meeting Pearls CD!\n\n"
				"Wenn Sie dieses Skript das erste Mal starten, wählen Sie bitte JETZT die Hilfe-Seite!\n\n"
			)
		)
		(set intro_help_1
			("%s%s%s%s%s%s%s%s%s"
				"Im Laufe der Installation werden Sie zwischen verschiedenen Text- und "
				"Bildanzeigeprogrammen wählen können. Wenn ein derartiges Anzeigeprogramm "
				"eingeklammert dargestellt wird, so konnte es auf Ihrem System nicht gefunden "
				"werden und Sie sollten es deshalb nicht anwählen. Falls Sie es trotzdem "
				"wählen, wird das voreingestellte Anzeigeprogramm benutzt, also entweder \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/MuchMore"))
				"\" oder \""
				(expandpath ":C/VT")
				"\".\n\n"
			)
		)
		(set intro_help_2
			("%s%s%s%s"
				"Diese Installation legt dann ein paar Assigns an, damit Sie Ihr "
				"Lieblings-Textanzeigeprogramm sowie Ihr Lieblings-Bildanzeigeprogramm "
				"benutzen können! Auf Wunsch werden diese Assigns auch in Ihre User-Startup "
				"aufgenommen.\n\n"
			)
		)
		(set intro_help_3
			("%s%s%s%s%s"
				"Des weiteren können Sie mit diesem Installier-Programm Verzeichnisse, "
				"die auf dieser CD enthalten sind, auf einen anderen Datenträger kopieren "
				"und dabei gleichzeitig automatisch die DefaultTools der enthaltenen Dateien"
				(if (>= (/ (getversion) 65536) 37)
					", sowie die Protectionflags und Kommentare, die durch das ISO-Filesystem leider verlorengegangen sind, "
					" "
				)
				"wieder anpassen lassen!\n\n"
			)
		)
		(set intro_help_4
			("%s%s%s%s%s%s"
				"Wenn Sie Verzeichnisse auf Ihre Festplatte kopieren möchten, so wird "
				"DRINGEND empfohlen, Anzeigeprogramme auszuwählen, die auf Ihrer "
				"Festplatte liegen! Wenn Sie diesen Tip nicht beherzigen, werden Sie - "
				"wann immer Sie eine installierte \"Readme-Datei\" anklicken - die "
				(expandpath ":")
				" CD einlegen müssen.\n\n"
			)
		)
		(set intro_help_5
			("%s%s"
				"Falls Sie jedoch vorerst noch nichts auf Ihre Festplatte kopieren "
				"möchten, können Sie guten Gewissens die voreingestellten Programme wählen."
			)
		)
		(set others_msg
			"Andere..."
		)
		(set choose_textreader_msg
			("%s%s%s"
				"Bitte wählen Sie das Textanzeigeprogramm, das Sie bevorzugen!\n\nEingeklammerte Textanzeigeprogramme sind auf Ihrem System nicht vorhanden und werden durch \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/MuchMore"))
				"\" ersetzt!"
			)
		)
		(set pick_textreader_per_filereq
			"Ok, bitte wählen Sie ihr bevorzugtes Textanzeigeprogramm!"
		)
		(set choose_picviewer_msg
			("%s%s%s%s%s%s"
				"Bitte wählen Sie das Bildanzeigeprogramm, das Sie bevorzugen! "
				"Eingeklammerte Bildanzeigeprogramme sind auf Ihrem System nicht vorhanden und werden durch \""
				"MP_Vol1:C/VT"
				"\" ersetzt! \"MP_Vol1:\" ist übrigens nur eine kürzere Schreibweise für \""
				(expandpath ":")
				"\"."
			)
		)
		(set pick_picviewer_per_filereq
			"Ok, bitte wählen Sie ihr bevorzugtes Bildanzeigeprogramm!"
		)
		(set wanna_copy_dirs_to_hd
			("%s%s%s%s%s"
				"Wollen Sie nun gleich noch ein paar Verzeichnisse auf Ihre Festplatte kopieren? "
				"Das Interessante daran ist, daß dieses Skript dann automatisch die DefaultTools auf "
				"die von Ihnen eingestellten Anzeigeprogramme ändert! Sinnigerweise sollten Sie dann "
				"aber keine Anzeigeprogramme eingestellt haben, die auf der CD liegen..."
				(if (>= (/ (getversion) 65536) 37)
					" Außerdem werden sämtliche Protectionflags und Kommentare, die durch das ISO-Dateisystem leider verlorengegangen sind, im Zielverzeichnis wieder restauriert."
					""
				)
			)
		)
		(set wanna_copy_yes_or_no
			"Klicken Sie auf \"Ja\", wenn Sie Programme auf Ihre Festplatte kopieren wollen, andernfalls auf \"Nein\"."
		)
		(set ja_antwort
			"Ja"
		)
		(set nein_antwort
			"Nein"
		)
		(set hoppla_reader_on_cd
			("%s%s%s%s"
				"Hoppla! Das von Ihnen gewählte Text-Anzeigeprogramm liegt auf der CD! "
				"Beachten Sie, daß Sie die CD dann in Zukunft immer einlegen müssen, "
				"wenn Sie Texte lesen wollen, die in der Schublade liegen, die Sie kopieren wollen! "
				"Optional können Sie die Installation natürlich jetzt auch abbrechen."
			)
		)
		(set hoppla_viewer_on_cd
			("%s%s%s%s"
				"Hoppla! Das von Ihnen gewählte Bild-Anzeigeprogramm liegt auf der CD! "
				"Beachten Sie, daß Sie die CD dann in Zukunft immer einlegen müssen, "
				"wenn Sie Bilder anschauen wollen, die in der Schublade liegen, die Sie kopieren wollen! "
				"Optional können Sie die Installation natürlich jetzt auch abbrechen."
			)
		)
		(set choose_dir_to_copy_from
			"Bitte wählen Sie das Verzeichnis, das Sie von CD auf ihre Festplatte kopieren möchten!"
		)
		(set choose_dir_to_copy_to
			"Bitte wählen Sie ein Verzeichnis auf Ihrer Festplatte, in das Sie das von der CD gewählte Verzeichnis kopieren möchten!"
		)
		(set ready_to_copy
			"Sind Sie bereit, das Verzeichnis \"%s\" ins Verzeichnis \"%s\" zu kopieren?"
		)
		(set ready_to_copy_help
			"Es wird im Verzeichnis \"%s\" dann ein neues Verzeichnis mit dem Namen \"%s\" eingerichtet!"
		)
		(set ready_to_copy_1
			"Sind Sie bereit, das Verzeichnis \""
		)
		(set ready_to_copy_2
			"\" ins Verzeichnis \""
		)
		(set ready_to_copy_3
			"\" zu kopieren?"
		)
		(set replacing_defaulttools
			"Es werden einige Defaulttools - falls vorhanden - angepaßt!"
		)
		(set restoring_flags
			"Es werden die originalen Protectionflags und Kommentare, die auf der CD verlorengegangen sind, wieder hergestellt!"
		)
		(set copy_more_dirs
			"Möchten Sie noch mehr Verzeichnisse kopieren?"
		)
		(set copy_more_dirs_help
			"Wenn Sie noch mehr Verzeichnisse kopieren möchten, dann wählen Sie nun \"Ja\", ansonsten \"Nein\""
		)
		(set save_display_programs
			"Sollen die Anzeigeprogramme dauerhaft eingestellt werden, so daß sie auch einen Reset überleben?"
		)
		(set save_display_programs_help
			("%s%s%s"
				"Wenn Sie nun \"Ja\" wählen, werden die Anzeigeprogramme in Form von Assigns in Ihre "
				"S:user-startup eingetragen. Falls die von Ihnen gewählten Programme auf der CD liegen, "
				"rate ich davon ab!"
			)
		)
		(set add_assigns_to_userstartup
			("%s%s%s%s"
				"Die Assigns werden nun an Ihre Datei \"S:user-startup\" angehängt, damit Sie in "
				"Zukunft bei Benutzung dieser CD den Installer nicht jedes Mal neu rufen müssen! "
				"Wenn Sie dies nicht wünschen, ist dies die letzte Möglichkeit, diesen Punkt durch "
				"Betätigung des richtigen Gadgets zu überspringen."
			)
		)
		(set add_assigns_to_userstartup_help
			("%s%s"
				"Folgende Assigns werden hinzugefügt: "
				(if (>= (/ (getversion) 65536) 37)
					("Assign MP_READER: %s DEFER\nAssign MP_VIEWER: %s DEFER" mp_reader mp_viewer)
					("Assign MP_READER: %s\nAssign MP_VIEWER: %s" mp_reader mp_viewer)
				)
			)
		)
		(set wanna_copy_to_envarc
			("%s%s%s"
				"Wollen Sie einige Umgebungsvariablen nach ENVARC: kopieren? "
				"Dieses Install-Skript macht Gebrauch von diesen Variablen, falls "
				"sie existieren und läuft dann deutlich komfortabler."
			)
		)
		(set wanna_copy_to_envarc_help
			("%s%s%s%s%s"
				"Wenn Sie die Umgebungsvariablen nicht kopieren, wird dieses "
				"Install-Skript nach einem Reset Ihre bereits getroffenen "
				"Entscheidungen nicht mehr kennen und daher nicht mehr voreinstellen "
				"können. Andrerseits verlängert das Kopieren die Bootzeit ein "
				"klitzekleinwenig..."
			)
		)
		(set activate_more_assigns
			("%s%s%s%s"
				"Sollen noch ein paar weitere Assigns hinzugefügt werden, damit einige "
				"auf der CD installierte Programme direkt startbar werden? (Diese Assigns "
				"werden nicht in S:user-startup eingefügt - nach dem Booten merken Sie also "
				"nicht mehr davon!)"
			)
		)
		(set activate_more_assigns_help
			("%s%s"
				"Ich empfehle Ihnen \"Ja\" - es kann nichts kaputtgehen und spätestens "
				"nach einem Reset ist alles wieder beim Alten!"
			)
		)
	)
)
(if (patmatch langstring "English")
	; thanx to Martin Kopp for translation!
	; some later additions from Angela Schmidt
	(
		(set warning_old_os
			(
				"%s%s%s"
				"Please update the operating system, because otherwise there will be some problems using this CD. "
				"In principle this CD is still usable under Kickstart 1.2/1.3, BUT you will find it difficult to view all pictures and several other things will not work either. "
				"For further information you should select the help-page now!"
			)
		)
		(set warning_old_os_help_1
			(
				"%s%s%s"
				"We are sorry about that, but we could not find an Kickstart 1.2/1.3 picture viewing program that is capable of showing all the major picture formats (ILBM, GIF, JPEG). "
				"Therefore you will unfortunately have to resort to a severly less comfortable way of viewing the pictures that are really worth seeing. "
				"We propose that you use the \"Expert mode\" or \"Intermediate mode\" of this installer script to choose your preferred picture viewing program. "
			)
		)
		(set warning_old_os_help_2
			(
				"%s%s%s%s"
				"You have to make sure that this program can show the respective picture format!!! "
				"To view the fractals you have for example to choose a program that can show you GIF pictures and "
				"for the meeting pictures one that can display JPEG files. Generally you can recognize JPEG pictures "
				"by the ending \".jpg\" and GIF pictures by the ending \".gif\"."
			)
		)
		(set no_std_textreader
			("%s%s%s%s%s"
				"Oh No!!!\n\n"
				"There is no \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More"))
				"\" on this system!\n\n"
				"I'm sorry! But this is not tolerable. I'm leaving!"
			)
		)
		(set no_std_pictureviewer
			("%s%s%s%s%s"
				"Oh No!!!\n\n"
				"There is no \""
				(expandpath ":C/VT")
				"\" on this system!\n\n"
				"I'm sorry! But this is not tolerable. I'm leaving!"
			)
		)
		(set intro_msg
			("%s%s"
				"This is the Installer script for the Meeting Pearls CD!\n\n"
				"If you start this script for the first time, please choose the Help-page NOW!\n\n"
			)
		)
		(set intro_help_1
			("%s%s%s%s%s%s%s%s%s"
				"During the process of installation you will be able to choose among "
				"several text and picture viewing programs. If one of these programs "
				"is shown in braces, it could not be located on your system and you "
				"should therefore not select it. If you insist on selecting it, one "
				"of the following defaults will be used instead \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/MuchMore"))
				"\" or \""
				(expandpath ":C/VT")
				"\".\n\n"
			)
		)
		(set intro_help_2
			("%s%s%s%s"
				"This installation will then establish some Assigns, that allow you "
				"to use your preferred text viewing program and picture viewing program. "
				"If you want it so, these Assigns can be incorporated into your user-"
				"startup script.\n\n"
			)
		)
		(set intro_help_3
			("%s%s%s%s%s"
				"As an additional feature of this install script you can copy drawers "
				"that are part of this CD onto another storage medium (disk, hard disk etc.) "
				"and have the default tools of the files in question "
				(if (>= (/ (getversion) 65536) 37)
					"and their protection flags and comments, which have been lost through the ISO-Filesystem, "
					""
				)
				"automagically changed!\n\n"
			)
		)
		(set intro_help_4
			("%s%s%s%s%s%s"
				"If you want to copy drawers to your hard disk you are URGENTLY advised "
				"to choose viewer programs that are located on your hard disk!!! "
				"If you do not adhere to this rule you must be prepared - every time "
				"you select an installed \"Readme-file\" - to insert the "
				(expandpath ":")
				"-CD into your CD-ROM drive.\n\n"
			)
		)
		(set intro_help_5
			("%s%s"
				"If you do not plan to copy anything to your hard disk at the moment you "
				"may safely select the default programs."
			)
		)
		(set others_msg
			"Other..."
		)
		(set choose_textreader_msg
			("%s%s%s"
				"Please select the preferred text viewing program!\n\nText viewers that are enclosed in braces are not available on your system and will be substituted by the \""
				(if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/MuchMore"))
				"\" program!"
			)
		)
		(set pick_textreader_per_filereq
			"Ok, please select the text viewing program you prefer!"
		)
		(set choose_picviewer_msg
			("%s%s%s%s%s%s"
				"Please select the preferred picture viewing program! "
				"Picture viewers that are enclosed in braces are not available on your system and will be substituted by the \""
				"MP_Vol1:C/VT"
				"\" program! \"MP_Vol1:\" is by the way only an abbreviation for \""
				(expandpath ":")
				"\"."
			)
		)
		(set pick_picviewer_per_filereq
			"Ok, please select the picture viewing program you prefer!"
		)
		(set wanna_copy_dirs_to_hd
			("%s%s%s%s%s"
				"Do you want to copy some drawers to your hard disk right now? The interesting "
				"fact about this possibility is that this script - in contrast to any other method "
				"of copying - will automatically alter all the default tools to use your preselected "
				"viewer programs. It is advisable not to choose viewers that reside on the CD..."
				(if (>= (/ (getversion) 65536) 37)
					" Furthermore all protectionflags and comments, which have been lost through the ISO-Filesystem, will be restored in the destination directory."
					""
				)
			)
		)
		(set wanna_copy_yes_or_no
			"Select  \"Yes\", if you want to copy programs to your hard disk, otherwise select \"No\"."
		)
		(set ja_antwort
			"Yes"
		)
		(set nein_antwort
			"No"
		)
		(set hoppla_reader_on_cd
			("%s%s%s%s"
				"Oops! You selected a text viewing program that is located on the CD! "
				"Please note that you will have to insert this CD in the future every time "
				"you want to read a text that is in the drawer which you want to copy now! "
				"Optional you can abort the installation process now."
			)
		)
		(set hoppla_viewer_on_cd
			("%s%s%s%s"
				"Oops! You selected a picture viewing program that is located on the CD! "
				"Please note that you will have to insert this CD in the future every time "
				"you want to view a picture that is in the drawer which you want to copy now! "
				"Optional you can abort the installation process now."
			)
		)
		(set choose_dir_to_copy_from
			"Please select a drawer that you want to copy from the CD onto your hard disk!"
		)
		(set choose_dir_to_copy_to
			"Please select a drawer of your hard disk that you want to copy the selected drawer of the CD to!"
		)
		(set ready_to_copy
			"Are you ready to copy the drawer \"%s\" into the drawer \"%s\" on your hard disk?"
		)
		(set ready_to_copy_help
			"In the drawer \"%s\" will be created a new \"%s\" named drawer!"
		)
		(set ready_to_copy_1
			"Are you ready to copy the drawer \""
		)
		(set ready_to_copy_2
			"\" into the drawer \""
		)
		(set ready_to_copy_3
			"\" now?"
		)
		(set replacing_defaulttools
			"Some defaulttools - if available - are adjusted just now!"
		)
		(set restoring_flags
			"The original protectionflags and comments, that were lost on the CD, are restored at this very moment!"
		)
		(set copy_more_dirs
			"Copy some more drawers?"
		)
		(set copy_more_dirs_help
			"If you want to copy more drawers then select \"Yes\" now, otherwise \"No\""
		)
		(set save_display_programs
			"Do you want the viewer programs to be installed permanent, so they will even survive a reset?"
		)
		(set save_display_programs_help
			("%s%s%s"
				"Selecting \"Yes\" now will install the viewer programs in the form of Assigns "
				"into your S:user-startup file. If the programs you selected are located on this CD "
				"I do not recommend this procedure to you!"
			)
		)
		(set add_assigns_to_userstartup
			("%s%s%s%s"
				"The Assigns will be added to the end of the file \"S:user-startup\" so "
				"you don't have to start the Installer over and over again every time you "
				"want to use this CD in the future. If you do not want this to happen, then "
				"this is the last chance to skip this process by selecting the right gadget."
			)
		)
		(set add_assigns_to_userstartup_help
			("%s%s"
				"The following Assigns will be added: "
				(if (>= (/ (getversion) 65536) 37)
					("Assign MP_READER: %s DEFER\nAssign MP_VIEWER: %s DEFER" mp_reader mp_viewer)
					("Assign MP_READER: %s\nAssign MP_VIEWER: %s" mp_reader mp_viewer)
				)
			)
		)
		(set wanna_copy_to_envarc
			("%s%s%s"
				"Do you want to copy some enviroment variables to the ENVARC: drawer? "
				"This install script makes use of these variables and will work "
				"more comfortably when they exist."
			)
		)
		(set wanna_copy_to_envarc_help
			("%s%s%s%s%s"
				"If you choose not to copy the enviroment variables then this install "
				"script will not remember your previous decisions after the next "
				"reset and will therefore not be able to declare these decisions as "
				"defaults. On the other hand the copying will slow down the startup "
				"process a teeny-weeny bit..."
			)
		)
		(set activate_more_assigns
			("%s%s%s%s"
				"Shall some additional Assigns be activated, to make some of the programs "
				"on this CD ready for instant startup? (These Assigns will not be installed "
				"in the s:user-startup file - so after the next reset everything will be back "
				"as normal!)"
			)
		)
		(set activate_more_assigns_help
			("%s%s"
				"I suppose the selection of \"Yes\" - nothing will be broken in your system and "
				"everything returns to its original state after the next reset!"
			)
		)
	)
)
;(if (patmatch langstring "Français")
;	(abort "Français n'est pas encore traduiré, je regrette!")
;)

(if (<> 1 (exists (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More"))))
	(abort no_std_textreader)
)

(if (<> 1 (exists (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT"))))
	(abort no_std_pictureviewer)
)

(if (<= (/ (getversion) 65536) 34)
	(if (= 0 @user-level)
		(
			(user 1)
			(message
				warning_old_os
				(help warning_old_os_help_1 warning_old_os_help_2)
			)
			(user 0)
		)
		(message
			warning_old_os
			(help warning_old_os_help_1 warning_old_os_help_2)
		)
	)
)

(if (AND (= 1 (exists "ENV:")) (<> 1 (exists "ENV:MeetingPearls")))
	(makedir "ENV:MeetingPearls")
)

(message
	intro_msg
	(help intro_help_1 intro_help_2 intro_help_3 intro_help_4 intro_help_5)
)

(if (exists "ENV:MeetingPearls/MP1_READER_CHOICE")
	(
		(set envvar (getenv "MeetingPearls/MP1_READER_CHOICE"))
		(set envvar (+ envvar 0))
	)
	(set envvar 100)
)
(if (AND (>= envvar 0) (<= envvar 7))
	(set reader_default (+ envvar 0))
	(set reader_default (if (>= (/ (getversion) 65536) 39) 1 (if (>= (/ (getversion) 65536) 37) 0 2)))
)

(set readchoice
	(askchoice
		(prompt choose_textreader_msg)
		(help @askchoice-help)
		(choices
			(if (= 1 (exists (expandpath ":C/MuchMore")))	"MP_Vol1:C/MuchMore"		"(MP_Vol1:C/MuchMore)")
			(if (= 1 (exists "SYS:Utilities/MultiView"))	"SYS:Utilities/MultiView"	"(SYS:Utilities/MultiView)")
			(if (= 1 (exists "SYS:Utilities/More"))		"SYS:Utilities/More"		"(SYS:Utilities/More)")
			(if (= 1 (exists "C:MuchMore"))			"C:MuchMore"			"(C:MuchMore)")
			(if (= 1 (exists "C:Ed"))			"C:Ed"				"(C:Ed)")
			(if (= 1 (exists "C:TTX"))			"C:TTX"				"(C:TTX)")
			(if (= 1 (exists "C:less"))			"C:less"			"(C:less)")
			others_msg
		)
		(default reader_default)
	)
)

(run ("SetEnv MeetingPearls/MP1_READER_CHOICE %ld" (+ readchoice 0)))

(if (= readchoice 0)
	(set mp_reader
		(if (= 1 (exists (expandpath ":C/MuchMore"))) (expandpath ":C/MuchMore") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 1)
	(set mp_reader
		(if (= 1 (exists "SYS:Utilities/MultiView")) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 2)
	(set mp_reader
		(if (= 1 (exists "SYS:Utilities/More")) "SYS:Utilities/More" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 3)
	(set mp_reader
		(if (= 1 (exists "C:MuchMore")) "C:MuchMore" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 4)
	(set mp_reader
		(if (= 1 (exists "C:Ed")) "C:Ed" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 5)
	(set mp_reader
		(if (= 1 (exists "C:TTX")) "C:TTX" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 6)
	(set mp_reader
		(if (= 1 (exists "C:less")) "C:less" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
	)
)

(if (= readchoice 7)
	(
		(if (exists "ENV:MeetingPearls/MP1_READER_PRG")
			(set readerprg_default (getenv "MeetingPearls/MP1_READER_PRG"))
			(set readerprg_default (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 37) (expandpath ":C/MuchMore") "SYS:Utilities/More")))
		)

		(set mp_reader
			(askfile
				(prompt pick_textreader_per_filereq)
				(help @askfile-help)
				(default readerprg_default)
			)
		)
		(run ("SetEnv MeetingPearls/MP1_READER_PRG \"%s\"" mp_reader))
	)
)

(run ("Assign MP_READER: \"%s\"" mp_reader))

(if (exists "ENV:MeetingPearls/MP1_VIEWER_CHOICE")
	(
		(set envvar (getenv "MeetingPearls/MP1_VIEWER_CHOICE"))
		(set envvar (+ envvar 0))
	)
	(set envvar 100)
)
(if (AND (>= envvar 0) (<= envvar 10))
	(set viewer_default (+ envvar 0))
	(set viewer_default 0)
)

(set viewchoice
	(askchoice
		(prompt choose_picviewer_msg)
		(help @askchoice-help)
		(choices
			(if (= 1 (exists (expandpath ":C/VT")))		"MP_Vol1:C/VT"			"(MP_Vol1:C/VT)")
			(if (= 1 (exists "SYS:Utilities/MultiView"))	"SYS:Utilities/MultiView"	"(SYS:Utilities/MultiView)")
			(if (= 1 (exists (expandpath ":C/VT_FC24")))	"MP_Vol1:C/VT_FC24"		"(MP_Vol1:C/VT_FC24)")
			(if (= 1 (exists (expandpath ":C/VT_IV24")))	"MP_Vol1:C/VT_IV24"		"(MP_Vol1:C/VT_IV24)")
			(if (= 1 (exists (expandpath ":C/VT_Opal")))	"MP_Vol1:C/VT_Opal"		"(MP_Vol1:C/VT_Opal)")
			(if (= 1 (exists (expandpath ":C/VT_Retina")))	"MP_Vol1:C/VT_Retina"		"(MP_Vol1:C/VT_Retina)")
			(if (= 1 (exists (expandpath ":C/VT_Picasso")))	"MP_Vol1:C/VT_Picasso"		"(MP_Vol1:C/VT_Picasso)")
			(if (= 1 (exists "C:Mostra"))			"C:Mostra"			"(C:Mostra)")
			(if (= 1 (exists "C:Show"))			"C:Show"			"(C:Show)")
			(if (= 1 (exists "C:View"))			"C:View"			"(C:View)")
			(if (= 1 (exists "C:PPShow"))			"C:PPShow"			"(C:PPShow)")
			others_msg
		)
		(default viewer_default)
	)
)

(run ("SetEnv MeetingPearls/MP1_VIEWER_CHOICE %ld" (+ viewchoice 0)))

(if (= viewchoice 0)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT"))) (expandpath ":C/VT") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 1)
	(set mp_viewer
		(if (= 1 (exists "SYS:Utilities/MultiView")) "SYS:Utilities/MultiView" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 2)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT_FC24"))) (expandpath ":C/VT_FC24") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 3)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT_IV24"))) (expandpath ":C/VT_IV24") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 4)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT_Opal"))) (expandpath ":C/VT_Opal") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 5)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT_Retina"))) (expandpath ":C/VT_Retina") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 6)
	(set mp_viewer
		(if (= 1 (exists (expandpath ":C/VT_Picasso"))) (expandpath ":C/VT_Picasso") (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 7)
	(set mp_viewer
		(if (= 1 (exists "C:Mosta")) "C:Mostra" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 8)
	(set mp_viewer
		(if (= 1 (exists "C:Show")) "C:Show" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 9)
	(set mp_viewer
		(if (= 1 (exists "C:View")) "C:View" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 10)
	(set mp_viewer
		(if (= 1 (exists "C:PPShow")) "C:PPShow" (if (>= (/ (getversion) 65536) 39) "SYS:Utilities/MultiView" (expandpath ":C/VT")))
	)
)

(if (= viewchoice 11)
	(
		(if (exists "ENV:MeetingPearls/MP1_VIEWER_PRG")
			(set viewerprg_default (getenv "MeetingPearls/MP1_VIEWER_PRG"))
			(set viewerprg_default (expandpath ":C/VT"))
		)
		(set mp_viewer
			(askfile
				(prompt pick_picviewer_per_filereq)
				(help @askfile-help)
				(default viewerprg_default)
			)
		)
		(run ("SetEnv MeetingPearls/MP1_VIEWER_PRG \"%s\"" mp_viewer))
	)
)

(run ("Assign MP_VIEWER: \"%s\"" mp_viewer))

(set copysomedirs
	(askbool
		(prompt wanna_copy_dirs_to_hd)
		(help wanna_copy_yes_or_no)
		(choices ja_antwort nein_antwort)
		(default 0)
	)
)

(if (= copysomedirs 1)
	(
		(if (patmatch (getdevice mp_reader) (getdevice (expandpath ":")))
			(message hoppla_reader_on_cd)
		)
		(if (patmatch (getdevice mp_viewer) (getdevice (expandpath ":")))
			(message hoppla_viewer_on_cd)
		)

		(set fromdir (expandpath ":"))
		(set todir @default-dest)
		(set moredirs 1)
		(until (= moredirs 0)
			(set fromdir
				(askdir
					(prompt choose_dir_to_copy_from)
					(help @askdir-help)
					(default fromdir)
				)
			)
			(set todir
				(askdir
					(prompt choose_dir_to_copy_to)
					(help @askdir-help)
					(default todir)
				)
			)
			(set imsure
				(askbool
					(prompt (ready_to_copy (expandpath fromdir) (expandpath todir)))
					(help (ready_to_copy_help (expandpath todir) (fileonly fromdir)))
					(choices ja_antwort nein_antwort)
					(default 1)
				)
			)
			(if (= imsure 1)
				(
					(set @default-dest todir)
					(set newdir (tackon todir (fileonly fromdir)))
					(makedir newdir)
					(if (exists (cat fromdir ".info"))
						(
							(run ("copy \"%s\" TO \"%s\"" (cat fromdir ".info") (cat newdir ".info")))
							(tooltype
								(dest newdir)
								(noposition)
							)
						)
					)
					(copyfiles
						(prompt ready_to_copy_1 fromdir ready_to_copy_2 todir ready_to_copy_3)
						(source fromdir)
						(dest newdir)
						(all)
						(infos)
						(delopts fail)
						(optional nofail force)
					)
					(working replacing_defaulttools)
					(run ("\"%s\" replace_mp \"%s\" recursive \"%s\" \"%s\"" (expandpath ":C/icontools") newdir mp_reader mp_viewer))
					(if (>= (/ (getversion) 65536) 37)	; Unter 1.3 kamen Requester wie 'please insert volume "CD1 in any drive' :-(
						(
							(working restoring_flags)
							(set oldexecutedir @execute-dir)
							(set @execute-dir newdir)
							(execute
								("\"%s%s%s%s\" \"%s%s%s\""
									(getdevice fromdir)
									":SetAttributesDir/"
									(substr (expandpath fromdir) (strlen (expandpath (cat (getdevice (fromdir)) ":"))))
									"/SetAttributes"
									(getdevice fromdir)
									":SetAttributesDir/"
									(substr (expandpath fromdir) (strlen (expandpath (cat (getdevice (fromdir)) ":"))))
								)
							)
							(set @execute-dir oldexecutedir)
						)
					)
				)
			)
			(set moredirs
				(askbool
					(prompt copy_more_dirs)
					(help copy_more_dirs_help)
					(choices ja_antwort nein_antwort)
					(default 0)
				)
			)
		)
	)
	(set @default-dest "")
)

(if (>= (/ (getversion) 65536) 37)	; Was will ich unter 1.3 mit einer User-Startup? :-(
	(set adduserstartup
		(askbool
			(prompt save_display_programs)
			(help save_display_programs_help)
			(choices ja_antwort nein_antwort)
			(default 0)
		)
	)

	(if (= 1 adduserstartup)
		(startup
			"Meeting Pearls Volume 1"
			(prompt add_assigns_to_userstartup)
			(help add_assigns_to_userstartup_help)
			(command
				(if (>= (/ (getversion) 65536) 37)	; Diese Abfrage kann irgendwann mal raus, da das hier eh nur bei >=2.04 aufgerufen wird
					("Assign MP_READER: %s DEFER\nAssign MP_VIEWER: %s DEFER" mp_reader mp_viewer)
					("Assign MP_READER: %s\nAssign MP_VIEWER: %s" mp_reader mp_viewer)
				)
			)
		)
	)
)

(if (AND (exists "ENV:" (noreq)) (exists "ENVARC:" (noreq)))
	(set copyenvarc
		(askbool
			(prompt wanna_copy_to_envarc)
			(help wanna_copy_to_envarc_help)
			(choices ja_antwort nein_antwort)
			(default 0)
		)
	)

	(if (= 1 copyenvarc)
		(copyfiles
			(source "ENV:MeetingPearls")
			(dest "ENVARC:MeetingPearls")
			(all)
			(delopts fail)
			(optional nofail force)
		)
	)
)

(set startscript
	(askbool
		(prompt activate_more_assigns)
		(help activate_more_assigns_help)
		(choices ja_antwort nein_antwort)
		(default 1)
	)
)

(if (= 1 startscript)
	(execute ":S/Meeting-Startup")
)
