; AmiATLAS Switzerland + Austria installation script
; created for Installer V43.3, 22.7.97, by Andreas Regul
; (c)'97 SOFTWARE DEVELOPMENT

; ------------------------------------------------------------------------------
; Predefined variables

(set #appname  "AmiATLAS")
(set #pathname (cat #appname "_CH_A"))
(set #assname  (cat #appname "_CH_A:"))
(set #CDname   (cat #appname "_CH_A_CD:"))

(set #min_stacksize 20000)
(set #min_drivespace 16000000)

(set #OSversion (/ (getversion) 65536))
(set #OS2 (AND (>= #OSversion 36) (<= #OSversion 38)))
(set #OS2_1 (= #OSversion 38))
(set #OS3 (>= #OSversion 39))
(set #OS3_1 (>= #OSversion 40))
(set #chipset (database "chiprev"))
(set #external_viewer (OR (= #OS2 1) (<> #chipset "AA")))
(set #picture_viewer (cat #assname "Tools/ViewTek"))
(set #HTML_invocation "IBrowse:IBrowse URL=file://localhost/%s")

(set #ENV_viewer     "ENV:AmiATLAS/PictureViewer")
(set #ENV_path       "ENV:AmiATLAS")
(set #ENV_IBrowse    "ENV:I_know_IBrowse_is_beta")
(set #ENVARC_viewer  "ENVARC:AmiATLAS/PictureViewer")
(set #ENVARC_path    "ENVARC:AmiATLAS")
(set #ENVARC_IBrowse "ENVARC:I_know_IBrowse_is_beta")

(set #germany_path     (cat #assname "germany/Germany"))
(set #switzerland_path (cat #assname "switzerland/Swiss"))
(set #austria_path     (cat #assname "austria/Austria"))
(set #D_CH_A_path      (cat #assname "D_CH_A/D_CH_A"))

; ------------------------------------------------------------------------------
; english strings

(if (= @language "english")
(
   (set #fullname (cat #appname " Switzerland + Austria"))

   (set @special-msg (cat "Please repeat installation.\n"))

   (set @error-msg (cat #fullname " installation has not been completed.\n"
                        "Please repeat installation."))

   (set #introduction (cat "\n"

       #fullname "\n"
       "\n"
       "©'96,97 SOFTWARE DEVELOPMENT, Andreas Regul\n"
       "\n"
       #fullname " is not freely distributable. Please read the licence agreement in the documentation file.\n"
   ))

   (set #error (cat

       "Some error has ocurred. Please inform the author.\n"
       "\n"
       "The following information is required: error code (see above), last error message, the percentage done (see window title) and your log file. If available: a SnoopDos report. Thanks !\n"
   ))

   (set #assign_found (cat "\n"
       #fullname " installation detected...\n"
   ))

   (set #assign_found_help "")

   (set #prpt_ask_remove (cat "\nAre you sure to remove " #fullname))
   (set #prpt_ask_remove_help "")

   (set #new    "Install new")
   (set #update (cat "Update existing " #appname " CH / A"))
   (set #remove (cat "Remove " #appname " CH / A from your system"))

   (set #remove_AmiATLAS (cat "Remove " #appname " CH / A assign ?\n"))
   (set #must_remove "")
   (set #removed     "; (removed)")

   (set #please_wait "\nOne moment, please...")

   (set #where_to_install (cat "Where do you want " #fullname " to be installed ?"))

   (set #where_help "")

   (set #err_wrong_version (cat "\n"
       "Wrong installer version\n"
       "\n"
       "You are using an obsolete 'Installer' program on your Amiga. The install script needs version 43.3 or better.\n"
       "\n"
       "Please check your configuration.\n"
   ))

   (set #err_wrong_OS (cat "\n"
       "Obsolete operation system\n"
       "\n"
       "Your Amiga runs an obsolete OS version (Kickstart 1.2 or 1.3). " #fullname " needs at least Kickstart and Workbench 2.0.\n"
       "\n"
       "Sorry...\n"
   ))

   (set #err_no_default_target (cat "\n"
       "No standard hard drive detected\n"
       "\n"
       "There is no standard hard drive device accessible on you system.\n"
       "\n"
       "Please use installation modes AVERAGE or EXPERT to specify the hard drive yourself.\n"
   ))

   (set #bad_ram_path (cat "\n"
       "Warning...\n"
       "\n"
       "Cannot install to RAM disk.\n"
   ))

   (set #err_drive_space (cat "\n"
       "Not enough memory\n"
       "\n"
       "This installation requires at least 8 MByte of free disk space. Please make this space available and start installation again.\n"
   ))

   (set #creating_dirs (cat "\n Creating directories for " #fullname "\n"))

   (set #copy_prog_files "Copying program files")
   (set #copy_config     "Creating custom configuration")
   (set #test_guide      "Testing AmigaGuide and MultiView versions")

   (set #screen_mode "Choose screen mode...")
   (set #screen_mode_help "")

   (set #pal_screen "PAL noninterlaced screen")
   (set #workbench  "Workbench screen")

   (set #prpt_map_default "Please choose a default map...")
   (set #prpt_map_default_help "")

   (set #prpt_ask_viewer "\nDo you want to use an own picture viewer ?")
   (set #prpt_ask_viewer_help "")

   (set #prpt_viewer_choice "Choose picture viewer to use...")
   (set #prpt_viewer_choice_help "")

   (set #prpt_ask_install_guide (cat "\n"
        "There is enough disk space left to install the full City Guide. A complete installation will need 200 MByte on your hard drive. Without installation of the City Guide you have to insert the " #appname " CD-ROM to see pictures.\n"
        "\n"
        "Do you want to install to full package ?"
   ))
   (set #prpt_ask_install_guide_help "")

   (set #prpt_ask_HTML "\nDo you want to use tourist guides in HTML format ?")
   (set #prpt_ask_HTML_help "")

   (set #prpt_ask_reuse_HTML_1 "\nOn your system the HTML browser '")
   (set #prpt_ask_reuse_HTML_2 "' has been found.\n\nDo you want " #appname " to use this one to display its tourist guide ?")
   (set #prpt_ask_reuse_HTML_help "")

   (set #prpt_installing_city_guide "Installing Tourist Guide. Please be patient...")

   (set #switzerland "Switzerland (1.800 towns)")
   (set #austria "Austria (2.000 towns)")
   (set #germany "Germany (4.200 towns)")
   (set #D_CH_A "Switzerland + Austria + Germany (7.800 towns)")

   (set #memory_size (cat "How much memory (chip + fast) do you want " #appname " to use as maximum ?"))
   (set #memory_size_help "")

   (set #small_mem "Up to 4 MByte RAM")
   (set #large_mem "5 MByte RAM to 7 MByte RAM")
   (set #huge_mem "8 MByte RAM or more")

   (set #ask_overwrite_actual (cat "\nAn actual " #fullname " version is already installed. Do you want to repeat installation anyway ?"))

   (set #yes "Yes")
   (set #no  "No")

   (set #copying_mapCH     "Copying map of Switzerland")
   (set #copying_mapA      "Copying map of Austria")
   (set #copying_mapD      "Copying map of Germany")
   (set #copying_mapD_CH_A "Copying map D / CH / A")

   (set #msg_no_AG (cat "\n"
       "Warning...\n"
       "\n"
       "No AmigaGuide library has been found.\n"
       "\n"
       "Please note that the documentation, parks, hotels and the city guide will not be available.\n"
   ))

   (set #msg_obsolete_AG_1 (cat "\n"
       "Warning...\n"
       "\n"
       "An obsolete AmigaGuide library ("
   ))

   (set #msg_obsolete_AG_2 (cat ") has been found on your system.\n"
       "\n"
       "Please replace it with an actual version. Using the old library may cause problems when displaying documentation, parks, hotels or the city guide."
   ))

   (set #msg_no_ILBM_datatype (cat "\n"
       "Warning...\n"
       "\n"
       "The ILBM datatype cannot be found on your system partition.\n"
       "\n"
       "Please install this datatype to drawers 'DEVS:datatypes' and 'SYS:classes/datatypes' before starting " #fullname "."
   ))

   (set #msg_no_JPEG_datatype (cat "\n"
       "Warning...\n"
       "\n"
       "No JPEG datatype has been found on your system. Please note that pictures from hotel information cannot be displayed without this datatype.\n"
       "\n"
       "You should add the appropriate files to 'DEVS:datatypes' and 'SYS:classes/datatypes'.\n"
   ))

   (set #msg_obsolete_MUI (cat "\n"
       "Warning...\n"
       "\n"
       "You need MUI 3.5 or better to run IBrowse.\n"
       "\n"
       "Please install an actual MUI version and start this installation again.\n"
   ))

   (set #make_assign (cat "\n"
       "Assign for " #fullname "\n"
       "\n"
       "An assign command has to be added to file 'user-startup'. Please go on to do this automatically.\n"
       "\n"
       "In case you skip this part the new command line will not be added. In this case please add the following commands to file 'user-startup' yourself:\n"
       "\n"
       "Stack 20000\n"
       "Assign " #assname " \""
   ))

   (set #make_assign_help "")

   (set #install_complete_1 (cat "\n"
       "\n"
       "Installation has been completed successfully. Default map is "
   ))
   (set #install_complete_2 (cat ""
       ".\n"
       "You can find " #fullname " in directory:\n"
       "\n"
   ))

   (set #lowmem_message (cat "\n"

      "Important note\n"
      "\n"
      #fullname " is not able to run under the actual main memory situation.\n"
      "\n"
      "Please try to free memory before starting the program.\n"
   ))

   (set #lowchip_message (cat "\n"

      "Important note\n"
      "\n"
      "In all probability your Amiga only uses 512 KByte of chip memory. In this case sea cannot be displayed.\n"
   ))

   (set #msg_registration_form (cat "Registration...\n"
       "\n"
       "Please take a minute to fill out the registration form. You will find it inside the CD ROM booklet. Please note that technical support for AmiATLAS requires your registration.\n"
       "\n"
       "Our cookie for you registrants: We will raffle 100 AmiATLAS maps ! So, maybe one day there will be a little unexpected letter for you...\n"
       "\n"
       "Thanks for your help\n"
   ))

   (set #ask_registrate (cat "\n"
       "That was absolutely fast...\n"
       "\n"
       "Did you really fill out the registration form, now ?\n"
   ))

   (set #msg_not_registrated (cat "\nOkay, you now immediately want to try out this new travel guide.\n"
       "\n"
       "Please registrate later, but register. Think about the advantages in registrating.\n"
   ))
))

; ------------------------------------------------------------------------------
; german strings

(if (= @language "deutsch")
(
   (set #fullname (cat #appname " Schweiz + Österreich"))

   (set @abort-button "Installation abbrechen")

   (set @special-msg (cat "Bitte wiederholen Sie die Installation.\n"))

   (set @error-msg (cat #fullname" wurde nicht komplett installiert.\n"
                        "Bitte wiederholen Sie die Installation, um eine lauffähige Version auf Ihrer Festplatte zu erhalten."))

   (set #introduction (cat "\n"

       #fullname "\n"
       "\n"
       "Ein Routenplaner für die Schweiz, Österreich und Deutschland\n"
       "\n"
       "©'96,97 Software Development, Andreas Regul\n"
       "\n"
       "Kein Bestandteil dieses Pakets darf frei weitergegeben werden. Bitte lesen Sie die Lizenzvereinbarungen und das Nutzungsrecht in der Dokumentation.\n"
   ))

   (set #error (cat

       "Ein Fehler ist aufgetreten. Bitte informieren Sie den Autor.\n"
       "\n"
       "Die folgenden Informationen werden benötigt: Fehler-Code (s.o.), Fehler-Text, abgearbeiteter Prozentsatz (s. Fenstertitel) und die Protokoll-Datei. Falls vorhanden: ein SnoopDos-Report. Danke !\n"
   ))

   (set #assign_found (cat "\n" #fullname " Installation entdeckt...\n"))

   (set #assign_found_help (cat "\n"

       "Wählen Sie 'Update', um die neue " #fullname " Version über Ihre bisherige Kopie zu installieren; in diesem Fall wird das Skript auf einige Fragen verzichten und sich dafür an der bisherigen Installation orientieren.\n"
       "\n"
       "Mit 'Deinstallation' kann eine schon vorhandene " #fullname "-Version entfernt werden. Einige Dateien werden dabei allerdings nicht gelöscht (u.a. Libraries, da sie meist noch von anderen Programmen benötigt werden).\n"
       "\n"
       "Von Ihren bisherigen Karten und Voreinstellungen werden Sicherheitskopien angelegt.\n"
   ))

   (set #new    "Neu installieren")
   (set #update "Update (über bisherige Version installieren)")
   (set #remove (cat #appname " CH / A entfernen"))

   (set #prpt_ask_remove (cat "\nSoll " #fullname " wirklich entfernt werden ?"))
   (set #prpt_ask_remove_help (cat "\n"
       "Hilfe zur Deinstallation\n"
       "\n"
       "Diese Funktion löscht den kompletten Routenplaner und Städteführer " #fullname " von Ihrem Laufwerk. Bitte beachten Sie, daß auch selbst veränderte Karten nach der Deinstallation unrettbar verloren sind, wenn Sie zuvor keine Sicherungskopien gemacht haben.\n"
   ))

   (set #remove_AmiATLAS  (cat "\nSollen die " #fullname " Einträge aus der Datei 'S:user-startup' entfernt werden ?\n"))
   (set #must_remove (cat "\n"
       "Sie sollten die Referenz entfernen lassen !\n"
   ))
   (set #removed "; (entfernt)")

   (set #please_wait "\nEinen Moment bitte...")

   (set #where_to_install (cat ""
       "Wo soll " #fullname " installiert werden ?\n"
       "Ein eigenes Verzeichnis wird erzeugt."
   ))

   (set #where_help (cat "\n"

       "Wählen Sie ein beliebiges Verzeichnis. Hauptverzeichnisse wie Work: oder DH0: sollten bevorzugt werden. In dem angegebenen Pfad wird ein Ordner '" #apppath "' samt Icon erzeugt.\n"
       "\n"
       "Sie sollten ein Verzeichnis wählen, dem ein Icon zugeordnet ist, um " #fullname " über die Workbench wiederfinden zu können (etwa Work).\n"
       "\n"
       "Das " #apppath "-Verzeichnis wird neben dem Routenplaner diverse Zusatzdateien aufnehmen: U.a. wird dort die Anleitung als ©AmigaGuide-Text abgelegt.\n"
   ))

   (set #err_wrong_version (cat "\n"
       "Ungeeignete Installer-Version\n"
       "\n"
       "Sie verwenden eine alte Version von 'Installer' auf Ihrem Amiga. Die Installationsprozedur benötigt Installer 43.3 oder höher.\n"
       "\n"
       "Bitte prüfen Sie Ihre Konfiguration.\n"
   ))

   (set #err_wrong_OS (cat "\n"
       "Veraltete Betriebssystemversion\n"
       "\n"
       "Sie verwenden eine veraltete Betriebssystemversion (Kickstart 1.2 oder 1.3) auf Ihrem Amiga. " #fullname " benötigt mindestens Kickstart und Workbench 2.0.\n"
       "\n"
       "Sorry...\n"
   ))

   (set #err_no_default_target (cat "\n"
       "Festplatte nicht gefunden\n"
       "\n"
       "Es konnte keine Festplatte über einen Standard-Laufwerksnamen gefunden werden.\n"
       "\n"
       "Bitte starten Sie die Installation neu und wählen Sie als Installationsmodus entweder 'Geübter Benutzer' oder 'Experte', um das Laufwerk selber vorgeben zu können.\n"
   ))

   (set #bad_ram_path (cat "\n"
       "Warnung...\n"
       "\n"
       "Eine Installation auf die RAM-Disk ist nicht möglich !\n"
   ))

   (set #err_drive_space (cat "\n"
       "Zu wenig Speicher\n"
       "\n"
       "Diese Installation benötigt mindestens 8 MByte freien Platz auf dem Zieldatenträger. Bitte machen Sie diesen Platz verfügbar und starten die Installation danach erneut.\n"
   ))

   (set #creating_dirs (cat "\nErzeuge Verzeichnisse für " #fullname "\n"))

   (set #copy_prog_files (cat ""

       "Kopiere Programmdateien\n"
       "\n"
       "Außer dem Hauptprogramm werden die komplette Online-Dokumentation, einige Beispielrouten sowie diverse Konfigurationsdateien erstellt.\n"
       "\n"
       "Eine sehr ausführliche Anleitung zu allen Funktionen von " #fullname " befindet sich im Hypertext-Dokument 'Main.guide' im Verzeichnis 'help', das auch vom Programm selber über das Hilfsmenü erreichbar ist.\n"
       "\n"
       "Bitte warten Sie einen Moment...\n"
   ))

   (set #copy_config "Erstelle benutzerdefinierte Konfiguration")
   (set #test_guide  "Prüfe AmigaGuide- und MultiView-Versionen")

   (set #screen_mode (cat "\n"
        "Bitte wählen Sie den gewünschten Bildschirmmodus für die Kartendarstellung von " #fullname "...\n"))
   (set #screen_mode_help (cat "\n"
       "Hilfe zur Wahl des Bildschirmmodus'\n"
       "\n"
       "Als Bildschirmmodus sollten Sie wenn möglich zunächst den PAL-Modus wählen, da " #fullname " nur hier sofort 32 (bzw. 16 bei ECS Chipsatz) Farben verwendet.\n"
       "\n"
       "Die hier getroffene Auswahl kann später in den Voreinstellungen geändert werden.\n"
   ))

   (set #pal_screen "PAL-Noninterlace")
   (set #workbench "Workbench")

   (set #prpt_map_default (cat "\n"
       "Welche der Karten soll beim Aufruf von " #fullname " standardmäßig geöffnet werden ?\n"
   ))
   (set #prpt_map_default_help (cat "\n"
       "Hilfe zur Standardkarte\n"
       "\n"
       "An dieser Stelle können Sie vorgeben, welche Karte beim Programmaufruf von " #appname " geladen werden soll.\n"
       "\n"
       "Alle anderen installierten Karten können über die Funktion 'Karte->laden' geöffnet werden."
   ))

   (set #prpt_ask_viewer "\nWollen Sie einen speziellen Bildanzeiger zur Darstellung von Fotos und sonstigen Abbildungen verwenden ?")
   (set #prpt_ask_viewer_help (cat "\n"
       "Hilfe zum Bildanzeiger\n"
       "\n"
       #appname " verwendet zur Darstellung von Bildern entweder MultiView (ab Workbench 3.0) oder einen beiliegenden Bildbetrachter (bis Workbench 2.1).\n"
       "\n"
       "Sie können an dieser Stelle selber den von Ihnen bevorzugten Bildanzeiger auswählen. Falls Sie sich nicht sicher sind, ob ein bestimmter Bildanzeiger geeignet ist, belassen Sie hier die Standardeinstellung bei. In den Voreinstellungen von " #appname " können Sie nachträglich den Bildanzeiger jederzeit ändern."
   ))

   (set #prpt_viewer_choice "Welcher Bildanzeiger soll verwendet werden ?")
   (set #prpt_viewer_choice_help (cat "\n"
       "Hilfe zur Wahl des Bildanzeigers\n"
       "\n"
       "Zur Darstellung von Bildern in " #appname " können statt des standardmäßig eingestellten Bildbetrachters beliebige Bildanzeigeprogramme verwendet werden.\n"
       "\n"
       "Wählen Sie an dieser Stelle Ihren bevorzugten Bildbetrachter aus."
   ))

   (set #prpt_ask_HTML (cat "\n"
       "Soll zur Darstellung des " #appname "-Reiseführers einen HTML-Browser verwendet werden ?\n"
       "\n"
       "Sie erhalten mit einem solchen Browser eine bessere Darstellung als bei AmigaGuide. Texte und Bilder werden gemischt angezeigt und es existieren kleine Voransichtsbilder der Fotos.\n"
       "\n"
       "Hinweis: Eine Grafikkarte mit einer Farbtiefe von 16 Bit (32768 Farben) ist unbedingt zu empfehlen, bei nur 256 Farben entstehen Farbverfälschungen in den Fotos."
   ))
   (set #prpt_ask_HTML_help (cat "\n"
       "Hilfe zum HTML-Browser\n"
       "\n"
       #appname " kann zur Darstellung des Reiseführers einen HTML-Browser verwenden, der eine bessere Wiedergabe als MultiView ermöglicht.\n"
       "\n"
       "Wenn Sie diese Frage bejahen, wird entweder ein vorhandener HTML-Browser genutzt oder eine Demoversion von IBrowse installiert und alle Voreinstellungen für " #appname " entsprechend angepaßt."
   ))

   (set #prpt_ask_reuse_HTML_1 "\nAuf Ihrem System wurde der HTML-Browser '")
   (set #prpt_ask_reuse_HTML_2 "' gefunden.\n\nSoll dieser zur Darstellung des Reiseführers genutzt werden ?")
   (set #prpt_ask_reuse_HTML_help "")

   (set #prpt_ask_install_guide (cat "\n"
        "Komplettinstallation\n"
        "\n"
        "Der Zieldatenträger besitzt genug freie Kapazität für eine Komplettinstallation des " #appname "-Pakets. Es benötigt inkl. des zusätzlichen Städteführers ca. 200 MByte.\n"
        "\n"
        "Falls Sie keine Komplettinstallation wünschen, wird beim Aufruf des Städteführers die " #appname " CD-ROM verlangt, um die Abbildungen direkt von CD nachzuladen.\n"
        "\n"
        "Soll der Städteführer komplett installiert werden ?\n"
        "(Eine Kaffeepause ist währenddessen anzuraten :-)"
   ))
   (set #prpt_ask_install_guide_help "")

   (set #prpt_installing_city_guide "Installiere Städteführer. Bitte haben Sie Geduld, dies kann einige Zeit erfordern (< 30 min)...")

   (set #switzerland "Schweiz (1.800 Orte)")
   (set #austria "Österreich (2.000 Orte)")
   (set #germany "Deutschland (4.200 Orte)")
   (set #D_CH_A "Schweiz + Österreich + Deutschland (7.800 Orte)")

   (set #memory_size (cat "\n"
       "Wieviel Hauptspeicher hat Ihr Amiga ?\n"
       "(Chip-Memory und Fast-Memory addiert)\n"
   ))
   (set #memory_size_help (cat "\n"
       "Hilfe zur Hauptspeichergröße\n"
       "\n"
       "Wenn Sie 'Bis 3 MByte' wählen, werden einfachere Geografiedaten installiert, die nur die Informationen für die Hauptkarte enthalten, nicht jedoch für ganz Europa.\n"
       "\n"
       "Bei Auswahl von '4 bis 6 MByte RAM' wird auch die Deutschland-Spezial-Karte installiert, allerdings ebenfalls nur mit vereinfachter Geografie. Nur bei '6 MByte RAM und mehr' wird eine komplette Installation aller Daten vorgenommen.\n"
       "\n"
       "WARNUNG: Wählen Sie keine Alternative, wenn in Wirklichkeit weniger Speicher verfügbar ist. " #fullname " würde dann Fehler verursachen.\n"
   ))
   (set #small_mem "Bis 4 MByte RAM")
   (set #large_mem "5 bis 7 MByte RAM")
   (set #huge_mem "8 MByte RAM oder mehr")

   (set #ask_overwrite_actual (cat "\n"
       "Aktuelle Version gefunden\n"
       "\n"
       "Es ist bereits eine aktuelle Version von " #fullname " installiert.\n"
       "\n"
       "\n"
       "Installation dennoch erneut durchführen ?"
   ))

   (set #yes "Ja")
   (set #no  "Nein")

   (set #copying_mapD (cat ""
       "Kopiere Karte Deutschland\n"
       "\n"
       "Die Deutschland-Karte umfaßt ca. 4.200 Ortschaften und 7.400 Straßenabschnitte. Außer diesen Daten für die Routenberechnung werden Geografiedateien zur Darstellung von Küsten, Inseln, Flüssen und Meeresflächen installiert.\n"
       "\n"
       "Ergänzt werden diese Informationen durch Reiseinfos, Autokennzeichen, Freizeitparks, Hotels sowie ein AVON-Verzeichnis mit den Vorwahlen von Deutschland.\n"
       "\n"
       "Bitte haben Sie etwas Geduld...\n"
   ))

   (set #copying_mapCH (cat ""
       "Kopiere Karte Schweiz\n"
       "\n"
       "Die Schweiz-Karte umfaßt ca. 1.800 Ortschaften und 2.300 Straßenabschnitte. Außer diesen Daten für die Routenberechnung werden Geografiedateien zur Darstellung von Küsten, Inseln, Flüssen und Meeresflächen installiert.\n"
       "\n"
       "Ergänzt werden diese Informationen durch Reiseinfos, Autokennzeichen und Hotels.\n"
       "\n"
       "Einen Moment bitte...\n"
   ))

   (set #copying_mapA (cat ""
       "Kopiere Karte Österreich\n"
       "\n"
       "Die Österreich-Karte umfaßt ca. 2.000 Ortschaften und 2.500 Straßenabschnitte. Außer diesen Daten für die Routenberechnung werden Geografiedateien zur Darstellung von Küsten, Inseln, Flüssen und Meeresflächen installiert.\n"
       "\n"
       "Es dauert nun noch etwas...\n"
   ))

   (set #copying_mapD_CH_A (cat ""
       "Kopiere Karte D / CH / A\n"
       "\n"
       "Diese zusammengefaßte Karte von Deutschland, der Schweiz und Österreich besitzt 8.000 Orte und 12.200 Straßenabschnitte.\n"
       "\n"
       "Diese Karte braucht ihre Zeit...\n"
   ))

   (set #msg_no_AG (cat "\n"
       "Warnung...\n"
       "\n"
       "Es wurde keine AmigaGuide-Library gefunden.\n"
       "\n"
       "Bitte beachten Sie, daß ohne diese Bibliothek die Dokumentation, Parks, Hotels und der Städteführer nicht angezeigt werden.\n"
   ))

   (set #msg_obsolete_AG_1 (cat "\n"
       "Warnung...\n"
       "\n"
       "Eine veraltete AmigaGuide-Bibliothek ("
   ))

   (set #msg_obsolete_AG_2 (cat ") wurde auf Ihrem System gefunden.\n"
       "\n"
       "Bitte ersetzen Sie diese durch eine aktuelle Version. Bei Verwendung der alten Bibliothek kann es zu Problemen bei der Anzeige der Dokumentation, den Parks, Hotels oder dem Städteführer kommen."
   ))

   (set #msg_no_ILBM_datatype (cat "\n"
       "Warnung...\n"
       "\n"
       "Der ILBM-Datentyp befindet sich nicht auf der Systempartition.\n"
       "\n"
       "Bitte installieren Sie diesen Datentyp in den Verzeichnissen 'DEVS:datatypes' und 'SYS:classes/datatypes', bevor Sie " #fullname " starten. Andernfalls können Probleme bei der Darstellung von Abbildungen auftreten."
   ))

   (set #msg_no_JPEG_datatype (cat "\n"
       "Warnung...\n"
       "\n"
       "Der JPEG-Datentyp befindet sich nicht auf der Systempartition. Wenn Sie einen HTML-Browser zur Darstellung der Abbildungen im Hotelführer verwenden möchten, ist dieser Datentyp erforderlich.\n"
       "\n"
       "Bitte installieren Sie ihn in den Verzeichnissen 'DEVS:datatypes' und 'SYS:classes/datatypes', wenn Sie auf die Abbildungen zugreifen wollen. Textuelle Informationen werden auch ohne den Datentyp ausgegeben.\n"
   ))

   (set #msg_obsolete_MUI (cat "\n"
       "Warnung...\n"
       "\n"
       "Sie benötigen MUI 3.5 oder höher, um IBrowse zu verwenden.\n"
       "\n"
       "Bitte installieren Sie zunächst eine aktuelle Version von MUI und wiederholen Sie danach diese Installation.\n"
       "\n"
       "Alternativ können Sie auch auf die Darstellung von HTML-Dokumenten verzichten und den Reiseführer als AmigaGuide-Dokument verwenden."
   ))

   (set #make_assign (cat "\n"
       "Assign für " #fullname "\n"
       "\n"
       "Es wird ein Assign in der Datei 'user-startup' benötigt. Führen Sie diese Aktion aus, um die Ergänzung automatisch durchführen zu lassen.\n"
       "\n"
       "Wenn Sie stattdessen diesen Abschnitt überspringen, wird der entsprechende Befehl nicht eingefügt. Ergänzen Sie in diesem Fall selber die Datei 'S:user-startup' durch folgende Befehle:\n"
       "\n"
       "Stack 20000\n"
       "Assign " #assname " \""
   ))

   (set #make_assign_help (cat "\n"
       "Hilfe zu Assign\n"
       "\n"
       #fullname " wird über das logische Laufwerk \"" #assname "\" angesprochen und benötigt deshalb einen Verweis auf das entsprechende Festplattenverzeichnis. Dieser Verweis wird beim Amiga in der Datei 'user-startup' durch einen Assign-Befehl hergestellt.\n"
       "Die Installation kann den benötigten Befehl selbständig einfügen."
   ))

   (set #install_complete_1 (cat "\n"
       "Installation abgeschlossen\n"
       "\n"
       #appname " wurde lauffähig auf dem Zieldatenträger installiert. Als Vorgabe wurde die Karte "
   ))
   (set #install_complete_2 (cat ""
       " eingerichtet.\n"
       "\n"
       #fullname " befindet sich nun im Verzeichnis: \n"
       "\n"
   ))

   (set #lowmem_message (cat "\n"
       "Hinweis\n"
       "\n"
       "Unter den aktuellen Speicherbedingungen kann " #fullname " nicht gestartet werden.\n"
       "\n"
       "Sorgen Sie vor dem Aufruf des Programms für mehr verfügbaren Hauptspeicher.\n"
   ))

   (set #lowchip_message (cat "\n"
       "Wichtiger Hinweis\n"
       "\n"
       "Sehr wahrscheinlich verfügt Ihr Amiga nur über 512 KByte Chip-Memory. In diesem Fall können Gewässer nicht in jedem Bildschirmmodus dargestellt werden !\n"
   ))

   (set #msg_registration_form (cat "Registrierung...\n"
       "\n"
       "Bitte nehmen Sie sich nun eine Minute Zeit, um die Registrierkarte auszufüllen. Sie finden diese im Booklet der CD-ROM. Wir können Ihnen nur dann Support leisten, wenn uns Ihre Registrierung vorliegt, bitte haben Sie Verständnis dafür.\n"
       "\n"
       "Als kleinen Ansporn für Sie haben wir uns etwas besonderes ausgedacht: Unter allen registrierten Anwendern werden 100 AmiATLAS Zusatzkarten verlost ! Vielleicht liegt eines Tages unerwartet Post in Ihrem Briefkasten...\n"
       "\n"
       "Vielen Dank für Ihre Unterstützung\n"
   ))

   (set #ask_registrate (cat "\n"
       "Das ging aber schnell...\n"
       "\n"
       "Haben Sie die Registrierkarte wirklich schon ausgefüllt ?\n"
   ))

   (set #msg_not_registrated (cat "\n"
       "Ertappt...   :-)\n"
       "\n"
       "Verständlich, Sie wollen den Reiseführer sofort ausprobieren und sich nicht mit Nebensächlichkeiten aufhalten.\n"
       "\n"
       "Bitte holen Sie die Registrierung jedoch zu einem späteren Zeitpunkt nach. Bedenken Sie, welche Vorteile sich daraus für Sie ergeben.\n"
       "\n"
       "Vielen Dank"
   ))
))

; --------------------------------------------------------------------------

(complete 0)

(message #introduction (all))

(welcome)

(set @default-dest "")

; Handle DOS errors
(onerror (
    (if (> @ioerr 0) 
        (message (cat "\n ERROR CODE: " @ioerr "\n\n" #error) (all))
    )
))

(set #installmode 0)

; We can't handle this script without Installer 43.3 or better
(if (< @installer-version 2818051)
    (
       (message #err_wrong_version (all))
       (exit (quiet))
    )
)

; Application already installed ?
(if (exists #assname (noreq))
    (
       (set #installmode (askchoice
           (prompt #assign_found)
           (help   #assign_found_help)
           (default 1)
           (choices
               (cat "[2p" #new)
               #update
               #remove
           )
       ))
    )
)

; Remove application ?
(if (= #installmode 2) (
    (if (exists #assname (noreq))
        (if (askbool
               (prompt #prpt_ask_remove)
               (help   #prpt_ask_remove_help)
               (default 0)
               (choices #yes #no)
            )
            (
               (delete (cat #assname "#?")
                  (all)
                  (optional force askuser)
               )

               (complete 75)

               (delete (expandpath #assname)
                  (optional force askuser)
               )

               (complete 80)

               (set #atlaspath (expandpath #assname))

               (run (cat "assign >NIL: " #assname " remove"))
               (run (cat "assign >NIL: " #CDname " remove"))
               (run (cat "assign >NIL: IBrowse: remove"))

               (complete 85)

               (if (exists #ENV_viewer (noreq))
                   (
                      (delete #ENV_viewer
                         (optional force askuser)
                      )
                      (delete #ENV_path
                         (optional force askuser)
                      )
                   )
               )

               (complete 90)

               (if (exists #ENVARC_viewer (noreq))
                   (
                      (delete #ENVARC_viewer
                         (optional force askuser)
                      )
                      (delete #ENVARC_path
                         (optional force askuser)
                      )
                   )
               )

               (complete 95)

               (delete #atlaspath
                  (optional force askuser)
                  (infos)
               )

               (complete 98)

               ((startup (cat #appname "_CH_A")
                   (prompt  #remove_AmiATLAS)
                   (help    #must_remove)
                   (command #removed)
               ))

               (complete 100)
           )
        )
    )

    (exit (quiet))
))

(complete 1)

; Check if we are running under OS2.0 at least
(if (< #OSversion 36)
      (
            (message #err_wrong_OS (all))
            (exit (quiet))
      )
)

(complete 2)

; Perform update only ?
(if (= #installmode 1)
    (
       ; actual version already installed ?
       (if (exists (cat #assname #appname) (noreq))
           (if (>= (getversion (cat #assname #appname)) 196620)
               (if (NOT (askbool
                      (prompt #ask_overwrite_actual)
                      (help "")
                      (choices #yes #no)
                      (default 0)
                   ))
                   (exit (quiet))
               )
           )
       )

       (set #target #assname)
       (set @default-dest #assname)
    )

; Complete installation
    (
       ; Search for default target device
       (if (exists "Work:" (noreq))
           (set #defaulttarget "Work:")
           (if (exists "DH1:" (noreq))
               (set #defaulttarget "DH1:")
               (if (exists "DH0:" (noreq))
                   (set #defaulttarget "DH0:")
                   (if (exists "HD0:" (noreq))
                       (set #defaulttarget "HD0:")
                       (
                          (if (<> @user-level 2)
                              (set #defaulttarget "SYS:")
                              (
                                 (message #err_no_default_target (all))
                                 (exit (quiet))
                              )
                          )
                       )
                   )
               )
           )
       )

       (set #target (askdir

          (prompt #where_to_install)
          (help   #where_help)
          (newpath)
          (disk)
          (default #defaulttarget)
       ))

       (set @default-dest (tackon #target #pathname))
    )
)

(complete 3)

; No installation to RAM disk
(if (= "RAM" (getdevice #target))
    (
        (message #bad_ram_path (all))
        (exit (quiet))
    )
)

(complete 4)

; Check for disk size available
(set #targetsize (getdiskspace #target))

(if (< #targetsize #min_drivespace) (
    (if (<> (getdevice #target) "RAM")
        (
           (message #err_drive_space (all))
           (exit (quiet))
        )
    )
))

(complete 5)

; Set up directory names
(set configdir      (tackon @default-dest "config"))
(set helpdir        (tackon @default-dest "help"))
(set IBrowsedir     (tackon @default-dest "IBrowse_demo"))

(set Dmapdir        (tackon @default-dest "germany"))
(set CHmapdir       (tackon @default-dest "switzerland"))
(set Amapdir        (tackon @default-dest "austria"))
(set D_CH_Amapdir   (tackon @default-dest "D_CH_A"))

(set Dinfodir       (tackon Dmapdir "information"))
(set CHinfodir      (tackon CHmapdir "information"))
(set Ainfodir       (tackon Amapdir "information"))
(set D_CH_Ainfodir  (tackon D_CH_Amapdir "information"))

(set Dparkdir       (tackon Dmapdir "parks"))
(set CHparkdir      (tackon CHmapdir "parks"))
(set Aparkdir       (tackon Amapdir "parks"))
(set D_CH_Aparkdir  (tackon D_CH_Amapdir "parks"))

(set Dhoteldir      (tackon Dmapdir "hotels"))
(set CHhoteldir     (tackon CHmapdir "hotels"))
(set Ahoteldir      (tackon Amapdir "hotels"))
(set D_CH_Ahoteldir (tackon D_CH_Amapdir "hotels"))

(set ENVdir         (tackon "ENV:" #appname))
(set ENVARCdir      (tackon "ENVARC:" #appname))

; Create directories
(working #creating_dirs)

(if (NOT (exists @default-dest))
    (makedir @default-dest
       (infos)
    )
)

(set #atlaspath (expandpath @default-dest))

(copyfiles
   (prompt "")
   (help "")
   (source "/icons/def_AtlasDrawer.info")
   (dest (cat #atlaspath "//"))
   (newname "AmiATLAS_CH_A.info")
   (nogauge)
   (optional force askuser nofail)
)

(if (NOT (exists ENVdir))
    (makedir ENVdir)
)

(if (NOT (exists ENVARCdir))
    (makedir ENVARCdir)
)

(complete 6)

; Ask for available memory
(set #mem_size (+ (database "total-mem") 0))

(if (< #mem_size (+ "3000000" 0))
    (set #mem_default 0)
    (if (< #mem_size (+ "6000000" 0))
        (set #mem_default 1)
        (set #mem_default 2)
    )
)

(set #memchoice (askchoice
    (prompt #memory_size)
    (help   #memory_size_help)
    (default #mem_default)
    (choices
        (cat "[2p" #small_mem)
        #large_mem
        #huge_mem
    )
))

(complete 8)

; Use workbench screen in low memory environment
(if (= #memchoice 0)
    (set #screenmode 1)

; Ask if user wants to use own screen
    (set #screenmode (askchoice
        (prompt #screen_mode)
        (help   #screen_mode_help)
        (default 1)
        (choices
            (cat "[2p" #pal_screen)
            #workbench
        )
    ))
)

(complete 10)

; Ask for default map
(set #default_map
     (askchoice
        (prompt #prpt_map_default)
        (help   #prpt_map_default_help)
        (choices
           (cat "[2p" #switzerland)
           #austria
           #germany
           #D_CH_A
        )
        (default 3)
     )
)

(complete 12)

; Check, if there is any known HTML-Browser on the system
(set #HTML_browser_found 0)

; Voyager installed ?
(if (exists "Work:Voyager/V" (noreq))
    (
       (set #HTML_browser_found 1)
       (set #HTML_browser_name "Voyager")
       (set #HTML_invocation "Work:Voyager/V URL=file://localhost/%s")
    )
)

; AWeb installed ?
(if (exists "AWeb:AWeb" (noreq))
    (
       (set #HTML_browser_found 1)
       (set #HTML_browser_name "AWeb")
       (set #HTML_invocation "AWeb:AWeb URL=file://localhost/%s")
    )
)

; IBrowse installed ?
(if (exists "IBrowse:IBrowse" (noreq))
    (if (exists "LIBS:muimaster.library" (noreq))
        (
           (set #HTML_browser_found 1)
           (set #HTML_browser_name "IBrowse")
           (set #HTML_invocation "IBrowse:IBrowse URL=file://localhost/%s")
        )
    )
)

; Check MUI version
(if (exists "LIBS:muimaster.library" (noreq))
    (
       (set #MUI_version (getversion "LIBS:muimaster.library"))
       (set #MUI_release (/ #MUI_version 65536))
       (set #MUI_revision (- #MUI_version (* #MUI_release 65536)))
       (set #MUI_string (cat #MUI_release "." #MUI_revision))
    )
    (
       (set #MUI_version 0)
       (set #MUI_release 0)
       (set #MUI_revision 0)
       (set #MUI_string "")
    )
)

(complete 13)

; Ask if user wants to use HTML browser
(set #use_HTML 0)
(if (= #OS3 1)
    (if (askbool
           (prompt #prpt_ask_HTML)
           (help   #prpt_ask_reuse_HTML_help)
           (default 0)
           (choices #yes #no)
        )
        (
           (set #use_HTML 1)
           (if (= #HTML_browser_found 1)
               (if (askbool
                      (prompt #prpt_ask_reuse_HTML_1 #HTML_browser_name #prpt_ask_reuse_HTML_2)
                      (help   #prpt_ask_reuse_HTML_help)
                      (default 0)
                      (choices #yes #no)
                   )
                   (if (= #HTML_browser_name "IBrowse")
                       ; MUI release < 3.5 ?
                       (if (< #MUI_release 16)
                          (
                             (message #msg_obsolete_MUI)
                             (exit (quiet))
                          )
                       )
                   )
               )
           )
        )
    )
)

(complete 14)

; Ask if user wants to set his/her own picture viewer
(set #own_viewer 0)
(if (= #use_HTML 0)
    (if (= @user-level 2)
        (if (askbool
               (prompt #prpt_ask_viewer)
               (help   #prpt_ask_viewer_help)
               (default 0)
               (choices #yes #no)
            )
            (set #own_viewer 1)
        )
    )
)

; Ask for external picture viewer
(if (= #own_viewer 1)
    (set #picture_viewer
         (askfile
            (prompt #prpt_viewer_choice)
            (help   #prpt_viewer_choice_help)
            (default "SYS:")
         )
    )
)

(complete 15)

; Check AmigaGuide version
(working #test_guide)

(set #obsolete_AG 0)
(if (exists "LIBS:amigaguide.library" (noreq))
    (
       (set #AG_version (getversion "LIBS:amigaguide.library"))
       (set #AG_release (/ #AG_version 65536))
       (set #AG_revision (- #AG_version (* #AG_release 65536)))
       (set #AG_string (cat #AG_release "." #AG_revision))

       (if (= #OS3_1 1)
           (if (< #AG_release 40)
               (set #obsolete_AG 1)
           )
           (if (= #OS3 1)
               (if (< #AG_release 39)
                   (set #obsolete_AG 1)
               )
               (if (= #OS2_1 1)
                   (if (< #AG_release 38)
                       (set #obsolete_AG 1)
                   )
                   (if (= #OS2 1)
                       (if (< #AG_release 37)
                           (set #obsolete_AG 1)
                       )
                   )
               )
           )
       )

       (if (= #obsolete_AG 1)
           (message (cat #msg_obsolete_AG_1 #AG_string #msg_obsolete_AG_2) (all))
       )
    )
    (message #msg_no_AG (all))
)

(complete 16)

; Remove file protection to avoid AmiCDFS 2.30 error
(working #please_wait)
(run (cat "/c/Protect >NIL: \"" @default-dest "\" +rwed all"))

(complete 18)

; Install program files
(working #copy_prog_files)

(copyfiles
   (prompt "")
   (help "")
   (source "/")
   (dest @default-dest)
   (nogauge)
   (optional force askuser nofail)
   (infos)
   (choices "c"
            "catalogs"
            "config"
            "Demos"
            "Help"
            "icons"
            "Routen"
            "Tools"
            "Bestellung"
            "Order"
            "AmiATLAS"
            "AmiATLAS.countries")
)

(if (= @language "english")
    (rename (tackon @default-dest "Bestellung.info") (tackon @default-dest "Order.info"))
)

(complete 24)

; Remove file protection to avoid AmiCDFS 2.30 error
(working #please_wait)
(run (cat "/c/Protect >NIL: \"" @default-dest "\" +rwed all"))

(complete 25)

; Install IBrowse demo
(set #add_IBrowse_assign 0)
(if (AND (= #OS3 1) (= #HTML_browser_found 0))
    (
       (if (NOT (exists IBrowsedir))
           (makedir IBrowsedir)
       )

       (copyfiles
          (prompt "")
          (help "")
          (source "/IBrowse_demo/")
          (dest IBrowsedir)
          (nogauge)
          (optional force askuser nofail)
          (all)
       )

       (textfile
          (prompt "")
          (help   "")
          (dest #ENVARC_IBrowse)
          (append "1")
       )

       (textfile
          (prompt "")
          (help   "")
          (dest #ENV_IBrowse)
          (append "1")
       )

       ; Remove file protection to avoid AmiCDFS 2.30 error
       (working #please_wait)
       (run (cat "/c/Protect >NIL: \"" IBrowsedir "\" +rwed all"))

       (set #HTML_invocation "IBrowse:IBrowse URL=file://localhost/%s")

       (if (NOT (exists "IBrowse:IBrowse" (noreq)))
           (set #add_IBrowse_assign 1)
       )
    )
)

(complete 26)

; Copy readme file
(if (= #OS3 1)
    (set #readme "/Bitte lesen, OS3")
    (set #readme "/Bitte lesen, OS2")
)

(copyfiles
   (prompt "")
   (help "")
   (source #readme)
   (dest @default-dest)
   (newname "Bitte lesen.guide")
   (infos)
   (nogauge)
   (optional force askuser nofail)
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" (tackon @default-dest "Bitte lesen.guide") "\" +rwed"))

(complete 27)

; Copy HTML readme file
(if (= #use_HTML 1)
    (
       (copyfiles
          (prompt "")
          (help "")
          (source "/Bitte lesen.html")
          (dest @default-dest)
          (infos)
          (nogauge)
          (optional force askuser nofail)
       )

       ; Remove file protection to avoid AmiCDFS 2.30 error
       (run (cat "/c/Protect >NIL: \"" (tackon @default-dest "Bitte lesen.html") "\" +rwed"))
    )
)

(complete 28)

; Copy OS2 Help-System
(if (= #OS2 1)
    (
       (copyfiles
          (prompt "")
          (help "")
          (source "/OS_dependent/os2.0/help")
          (dest helpdir)
          (all)
          (nogauge)
          (optional force askuser nofail)
       )

       ; Remove file protection to avoid AmiCDFS 2.30 error
       (run (cat "/c/Protect >NIL: \"" helpdir "\" +rwed all"))
    )
)

(complete 29)

; Create custom configuration
(working #copy_config)

(if (= #screenmode 0)
    (if (= #chipset "AA")
       (set #presetsource "/presets/AGA/")
       (set #presetsource "/presets/ECS/")
    )
)

(if (= #screenmode 1)
    (set #presetsource "/presets/Workbench/")
)

(complete 29)

(copyfiles
   (prompt "")
   (help "")
   (source #presetsource)
   (dest configdir)
   (all)
   (nogauge)
   (optional force askuser nofail)
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" configdir "\" +rwed all"))

(complete 30)

; Set default language to english
(if (= @language "english")
    (if (exists "/c/SetLanguage")
        (
           (protect (tackon configdir "Global.prefs") "+rwed")
           (run (cat "/c/SetLanguage \"" configdir "/Global.prefs\" english.cat £"))
        )
    )
)

(complete 31)

; Set custom picture viewer
(if (= #own_viewer 1)
    (if (exists "/c/SetPictureViewer")
        (
           (run (cat "/c/SetPictureViewer \"" configdir "/Global.prefs\" " #picture_viewer))
           (textfile
              (prompt "")
              (help   "")
              (dest #ENV_viewer)
              (append #picture_viewer)
           )
           (textfile
              (prompt "")
              (help   "")
              (dest #ENVARC_viewer)
              (append #picture_viewer)
           )
        )
    )
)

(complete 32)

; Set HTML browser
(if (= #use_HTML 1)
    (run (cat "/c/SetHTMLBrowser \"" configdir "/Global.prefs\" \"" #HTML_invocation "\""))
)

(complete 33)

; Set default map
(set #map_path (select #default_map #switzerland_path
                                    #austria_path
                                    #germany_path
                                    #D_CH_A_path
))
(run (cat "/c/SetDefaultMap \"" configdir "/Global.prefs\" " #map_path))

(complete 35)

; Install map of Germany
(working #copying_mapD)

(if (NOT (exists Dmapdir))
    (makedir Dmapdir)
)

(if (NOT (exists Dhoteldir))
    (makedir Dhoteldir)
)

(if (NOT (exists Dinfodir))
    (makedir Dinfodir)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/germany")
   (dest Dmapdir)
   (pattern "germany.#?")
   (nogauge)
   (optional force askuser nofail)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/germany")
   (dest Dmapdir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "annotation"
            "parks"
            "hotels.info"
            "information.info")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/germany/Information")
   (dest Dinfodir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "pictures"
            "CarRegistration.guide"
            "CarRegistration.html"
            "Tourist.guide")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/germany/hotels")
   (dest Dhoteldir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "Hotels.guide"
            "Hotels_EV.guide")
)


(copyfiles
   (prompt "")
   (help "")
   (source "/Germany.info")
   (dest @default-dest)
   (nogauge)
   (optional force askuser nofail)
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" Dmapdir "\" +rwed all"))

; Copy small geographic data in low memory environment
(if (< #memchoice 2)
    (copyfiles
       (prompt "")
       (help "")
       (source "/geo_germany")
       (dest Dmapdir)
       (nogauge)
       (optional force askuser nofail)
       (all)
    )
)

(if (= #OS2 1)
    (copyfiles
       (prompt "")
       (help "")
       (source "/OS_dependent/os2.0/germany")
       (dest Dmapdir)
       (all)
       (nogauge)
       (optional force askuser nofail)
    )
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" Dmapdir "\" +rwed all"))

(complete 42)

; Install map of Switzerland
(working #copying_mapCH)

(if (NOT (exists CHmapdir))
    (makedir CHmapdir)
)

(if (NOT (exists CHhoteldir))
    (makedir CHhoteldir)
)

(if (NOT (exists CHinfodir))
    (makedir CHinfodir)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/switzerland")
   (dest CHmapdir)
   (pattern "swiss.#?")
   (nogauge)
   (optional force askuser nofail)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/switzerland")
   (dest CHmapdir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "annotation"
            "parks"
            "hotels.info"
            "information.info")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/switzerland/Information")
   (dest CHinfodir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "pictures"
            "CarRegistration.guide"
            "CarRegistration.html"
            "Tourist.guide")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/switzerland/Hotels")
   (dest CHhoteldir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "Hotels.guide"
            "Hotels_EV.guide"
            "Hotels.html")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/Switzerland.info")
   (dest @default-dest)
   (nogauge)
   (optional force askuser nofail)
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" CHmapdir "\" +rwed all"))

; Copy small geographic data in low memory environment
(if (< #memchoice 2)
    (copyfiles
       (prompt "")
       (help "")
       (source "/geo_switzerland")
       (dest CHmapdir)
       (nogauge)
       (optional force askuser nofail)
       (all)
    )
)

(if (= #OS2 1)
    (copyfiles
       (prompt "")
       (help "")
       (source "/OS_dependent/os2.0/switzerland")
       (dest CHmapdir)
       (all)
       (nogauge)
       (optional force askuser nofail)
    )
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" CHmapdir "\" +rwed all"))

(complete 50)

; Install map of Austria
(working #copying_mapA)

(if (NOT (exists Amapdir))
    (makedir Amapdir)
)

(if (NOT (exists Ahoteldir))
    (makedir Ahoteldir)
)

(if (NOT (exists Ainfodir))
      (makedir Ainfodir)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/austria")
   (dest Amapdir)
   (pattern "austria.#?")
   (nogauge)
   (optional force askuser nofail)
)

(copyfiles
   (prompt "")
   (help "")
   (source "/austria")
   (dest Amapdir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "annotation"
            "parks"
            "hotels.info"
            "information.info")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/austria/Information")
   (dest Ainfodir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "pictures"
            "CarRegistration.guide"
            "CarRegistration.html"
            "Tourist.guide")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/austria/Hotels")
   (dest Ahoteldir)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "Hotels.guide"
            "Hotels_EV.guide"
            "Hotels.html")
)

(copyfiles
   (prompt "")
   (help "")
   (source "/Austria.info")
   (dest @default-dest)
   (nogauge)
   (optional force askuser nofail)
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" Amapdir "\" +rwed all"))

; Copy small geographic data in low memory environment
(if (< #memchoice 2)
    (copyfiles
       (prompt "")
       (help "")
       (source "/geo_austria")
       (dest Amapdir)
       (nogauge)
       (optional force askuser nofail)
       (all)
    )
)

(if (= #OS2 1)
    (copyfiles
       (prompt "")
       (help "")
       (source "/OS_dependent/os2.0/austria")
       (dest Amapdir)
       (all)
       (nogauge)
       (optional force askuser nofail)
    )
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" Amapdir "\" +rwed all"))

(complete 60)

; Install map D / CH / A
(working #copying_mapD_CH_A)

(copyfiles
   (prompt "")
   (help "")
   (source "/")
   (dest @default-dest)
   (infos)
   (nogauge)
   (optional force askuser nofail)
   (choices "D_CH_A")
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" D_CH_Amapdir "\" +rwed all"))

(if (= #OS2 1)
    (copyfiles
       (prompt "")
       (help "")
       (source "/OS_dependent/os2.0/D_CH_A")
       (dest ESmapdir)
       (all)
       (nogauge)
       (optional force askuser nofail)
    )
)

; Copy small geographic data in low memory environment
(if (< #memchoice 2)
    (copyfiles
       (prompt "")
       (help "")
       (source "/geo_D_CH_A")
       (dest D_CH_Amapdir)
       (nogauge)
       (optional force askuser nofail)
       (all)
    )
)

; Remove file protection to avoid AmiCDFS 2.30 error
(run (cat "/c/Protect >NIL: \"" D_CH_Amapdir "\" +rwed all"))

(complete 85)

; Are we running Kickstart 3.0 or higher ?
(if (= #OS3 1)
    (
       ; Check if ILBM-Datatype is missing
       (if (OR (NOT (exists "DEVS:datatypes/ILBM" (noreq)))
               (NOT (exists "SYS:classes/datatypes/ilbm.datatype" (noreq))))
           (message #msg_no_ILBM_datatype (all))
       )

       ; Check if JPEG-Datatype is missing
       (if (OR (NOT (exists "DEVS:datatypes/JPEG" (noreq)))
               (NOT (exists "SYS:classes/datatypes/jpeg.datatype" (noreq))))
           (message #msg_no_JPEG_datatype (all))
       )
    )
)

(complete 90)

; Add assign and stack commands to user-startup
(set #asstarget (expandpath @default-dest))

(set #assign_command (cat "Assign " #assname " \"" #asstarget "\"\n"))
(set #assign_command (cat #assign_command (cat "Stack " #min_stacksize)))
(if (= #add_IBrowse_assign 1)
    (set #assign_command (cat #assign_command "\nAssign IBrowse: " (tackon #assname "IBrowse_demo")))
)

(startup (cat #appname "_CH_A")
    (prompt (cat #make_assign @default-dest "\""))
    (help #make_assign_help)
    (command #assign_command)
)

(complete 93)

; Assign directory to logical device
(makeassign (cat #appname "_CH_A") #asstarget)
(if (= #add_IBrowse_assign 1)
    (makeassign "IBrowse" (tackon #assname "IBrowse_demo"))
)

(complete 95)

; Check memory situation
(set #memory_sufficient 1)
(if (< (+ (database "total-mem") 0) (+ "3000000" 0))
   (message #lowmem_message (all))
   (
      (if (<= (+ (database "graphics-mem") 0) (+ "524288" 0))
         (
            (set #memory_sufficient 0)
            (message #lowchip_message (all))
         )
      )
   )
)

(complete 100)

; Remember user to fill out registration form
(message #msg_registration_form (all))
(if (NOT (askbool
       (prompt #ask_registrate)
       (help "")
       (choices #yes #no)
       (default 1)
    ))
    (message #msg_not_registrated (all))
)

; Set up final message
(set #map (select #default_map #switzerland
                               #austria
                               #germany
                               #D_CH_A
          )
)
(set #final_message (cat #install_complete_1 #map #install_complete_2 (expandpath @default-dest)))

(message #final_message (all))

; Display new features
(if (= #OS3 1)
    (set #viewer "SYS:Utilities/MultiView")
    (set #viewer "/c/GuideView")
)

(if (exists #viewer (noreq))
    (
       (working "")
       (run (cat #viewer " " #assname "help/NewFeatures.guide"))
    )
)

(if (AND (= #memory_sufficient 1) (exists "C:Execute" (noreq)))
    (run ("C:Execute /s/start_program"))
)

(exit (quiet))

