home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / install < prev    next >
Text File  |  1995-10-26  |  38KB  |  1,043 lines

  1. ; Installer program for GoldFish Volume 3 CD.
  2. ; Written by Fred Fish, Amiga Library Services.
  3. ; This script is public domain.     Use it for any purpose you wish.
  4. ; German translation by Daniel Amor.
  5. ; Italian translation by Rudi Chiarito.
  6.  
  7. (procedure RunStartups
  8.  
  9.     ; If not novice mode then ask user if OK to run the Useful-Startup script.
  10.     (if (= 0 @user-level)
  11.         (set runscript 1)
  12.         (set runscript
  13.             (askbool
  14.                 (prompt ask_run_useful_startup)
  15.                 (help help_run_useful_startup)
  16.                 (choices yes no)
  17.                 (default 1)
  18.             )
  19.         )
  20.     )
  21.     (if (= 1 runscript)
  22.         (
  23.             (if (= 1 debugflag) (debug "run script " UsefulStartup))
  24.             (makeassign "Useful" ("%s:Useful" volname))
  25.             (execute UsefulStartup)
  26.         )
  27.     )
  28.  
  29.     ; Check to see what version of ixemul.library is in LIBS:
  30.  
  31.     (set ixversion (getversion "LIBS:ixemul.library"))
  32.     (if (= 1 debugflag) (debug "getversion ixemul.library returned " ixversion))
  33.     (set ixver (/ ixversion 65536))
  34.     (set ixrev (- ixversion (* ixver 65536)))
  35.     (if (= 1 debugflag) (debug "found ixemul.library version " ixver " revision " ixrev))
  36.  
  37.     ; If an old version of ixemul.library is installed, offer to remove it,
  38.     ; regardless of the user level.  Run flushlibs afterwards, which doesn't
  39.     ; hurt either way and ensures that it is flushed from memory if it is
  40.     ; removed.
  41.  
  42.     (if (> ixversion 0)
  43.         (
  44.             (if (NOT (AND (>= ixver 41) (>= ixrev 4)))
  45.                 (
  46.                     (if (= 1 debugflag) (debug "found an obsolete ixemul.library"))
  47.                     (set olduser @user-level)
  48.                     (user 2)
  49.                     (if (= 1 debugflag) (debug "attempt removal of old ixemul.library"))
  50.                     (delete "LIBS:ixemul.library" 
  51.                         (confirm)
  52.                         (optional askuser)
  53.                         (help help_remove_ixemul)
  54.                         (prompt ask_remove_ixemul)
  55.                     )
  56.                     (run (":Useful/Sys/C/FlushLibs") (safe))
  57.                     (user olduser)
  58.                 )
  59.             )
  60.         )
  61.     )
  62. )
  63.  
  64. (procedure Options
  65.     ; If not novice mode then ask user if program specific options presented
  66.     ; by AmigaGuide interface should loop or not.
  67.     (if (= 0 @user-level)
  68.         (set loop 0)
  69.         (set loop
  70.             (askbool
  71.                 (prompt ask_loop_requests)
  72.                 (help help_loop_requests)
  73.                 (choices yes no)
  74.                 (default 1)
  75.             )
  76.         )
  77.     )
  78.     (if (= 0 loop)
  79.         (run ("SetEnv RDE_LOOP \"no\""))
  80.         (run ("SetEnv RDE_LOOP \"yes\""))
  81.     )
  82. )
  83.  
  84. ; Select the user's desired language to use during installation.
  85. ;
  86. ; This is also where all the language dependent strings get defined.
  87. ; To install support for a new language, just add the appropriate
  88. ; language selection and install the strings for that language.
  89.  
  90. (procedure SelectLanguage
  91.     (if (patmatch @language "English") (set lang 0))
  92.     (if (patmatch @language "Deutsch") (set lang 1))
  93.     (if (patmatch @language "Italiano") (set lang 2))
  94.     (set langval
  95.         (askchoice
  96.             (prompt    (cat    "Select your native language.\n"
  97.                     "Bitte waehlen Sie die Sprache aus.\n"
  98.                     "Scegli la tua lingua.\n"))
  99.             (help (cat    "You can choose a language for prompts and help."
  100.                     "\n\n"
  101.                     "Sie koennen eine Sprache für die Anweisungen und die Hilfe auswaehlen."
  102.                     "\n\n"
  103.                     "Scegli la lingua da usare per i messaggi di richiesta e d'aiuto"
  104.                     "\n\n")) 
  105.             (choices
  106.                 "English"
  107.                 "Deutsch"
  108.                 "Italiano"
  109.             )
  110.             (default lang)
  111.         )
  112.     
  113.     )
  114.  
  115.     (set @language
  116.         (select langval
  117.             ("English")
  118.             ("Deutsch")
  119.             ("Italiano")))
  120.     
  121.     (set yes
  122.         (select langval
  123.             ("Yes")
  124.             ("Ja")
  125.             ("Sì")))
  126.  
  127.     (set no
  128.         (select langval
  129.             ("No")
  130.             ("Nein")
  131.             ("No")))
  132.  
  133.     (set msg_hello
  134.         (select langval
  135.             (cat    "Before using this CD you should run this installer script. "
  136.                 "It will make no permanent changes to your system without asking "
  137.                 "you first.  If you do not agree to the change, a simple reboot "
  138.                 "will always restore your system to the state it was in prior "
  139.                 "to running this install script."
  140.                 "\n\n"
  141.                 "Most requesters have help available via the Help gadget or Help key.")
  142.             (cat    "Vor der Benutzung dieser CD-ROM, sollten Sie dieses "
  143.                 "Skript laufen lassen. Es wird keine Veränderungen "
  144.                 "an ihrem, ohne ihre ausdrückliche Genehmigung vornehmen. "
  145.                 "Es nimmt keine permanenten Veraenderungen vor, so dass ein "
  146.                 "einfach Reboot die Einstellungen wieder rückgängig macht."
  147.                 "\n\n"
  148.                 "Viele Requester haben eine Hilfe-Funktion, die über das Hilfe-Symbol "
  149.                 "oder die Help-Taste aktiviert werden können!")
  150.             (cat    "Prima di usare questo CD dovresti lanciare il programma di installazione. "
  151.                 "Esso non modificherà in modo permanente la configurazione del sistema senza "
  152.                 "chiederlo prima. Se le impostazioni non sono di tuo gradimento, "
  153.                 "riavviando la macchina, il sistema ritornerà nello stato precedente "
  154.                 "all'avvio di questo programma."
  155.                 "\n\n"
  156.                 "La maggior parte delle schermate dispone di un aiuto in linea, "
  157.                 "disponibile selezionando col mouse il pulsante Aiuto o premendo "
  158.                 "Help sulla tastiera.")))
  159.  
  160.     (set ask_run_useful_startup
  161.         (select langval
  162.             (cat    "Shall I run the following script for you now?"
  163.                 "\n\n "
  164.                 UsefulStartup
  165.                 "\n\n"
  166.                 "Press the Help key or gadget now if you want to know more about "
  167.                 "what this script will do before running it.")
  168.             (cat    "Soll ich das folgende Skript nun starten?"
  169.                 "\n\n "
  170.                 UsefulStartup                
  171.                 "\n\n"
  172.                 "Drücken Sie die Hilfe-Taste, wenn Sie wissen möchten, was dieses "
  173.                 "Skript macht.")
  174.             (cat    "Vuoi che esegua ORA il seguente programma?"
  175.                 "\n\n "
  176.                 UsefulStartup
  177.                 "\n\n"
  178.                 "Premi il tasto Help o seleziona Aiuto se vuoi sapere cosa fa, "
  179.                 "prima di eseguirlo.")))
  180.             
  181.     (set help_run_useful_startup
  182.         (select langval
  183.             (cat    "The GoldFish CD contains many useful utilities under the directory "
  184.                 "\"Useful\".  There are utilities in Useful/Sys/C, libraries in "
  185.                 "Useful/Sys/libs, datatypes in Useful/Sys/devs/datatypes, etc."
  186.                 "\n\n"
  187.                 "Assigns will be added to your existing C:, CLASSES:, DEVS:, FONTS:, "
  188.                 "HELP:, L:, LIBS:, LOCALE: and S: assignments if you elect to run "
  189.                 "this script, but no permanent changes will be made to your system."
  190.                 "\n\n"
  191.                 "If you do not elect to run this script, many things on the CD will "
  192.                 "not work from WorkBench since most of the required tools and libraries "
  193.                 "will not be found.  Whenever possible we have tried to avoid hard coding "
  194.                 "explicit pathnames into the icon tooltypes."
  195.                 "\n\n"
  196.                 "See the file "
  197.                 GFCDstartup
  198.                 " for a way to arrange "
  199.                 "for this script to be run at boot time if the GoldFish CD is present.")
  200.             (cat    "Die GoldFish CD enthält viele nützliche Utilities, im Verzeichnis "
  201.                 "\"Useful\". Es gibt Utilities in Useful/Sys/C, Bibliotheken in "
  202.                 "Useful/Sys/libs, datatypes in Useful/Sys/Devs/Datatypes, etc."
  203.                 "\n\n"
  204.                 "Assigns werden zu ihren existierenden Verzeichnissen C:, CLASSES:, "
  205.                 "DEVS:, FONTS:, HELP; L:, LIBS:, LOCALE: und S: hinzugefügt, wenn Sie "
  206.                 "dieses Skript starten. Es werden jedoch keine permanenten Änderungen "
  207.                 "an Ihrem System durchgeführt."
  208.                 "\n\n"
  209.                 "Wenn Sie dieses Skript nicht starten, dann werden viele Dinge nicht "
  210.                 "von der Workbench aus funktionieren, da die benötigten Werkzeuge und "
  211.                 "Bibliotheken nicht zur Verfügung stehen. Wo es möglich war, haben wir "
  212.                 "auf die Benutzung von absoluten Pfadnamen in den ToolTypes verzichtet."
  213.                 "\n\n"
  214.                 "In der Datei "
  215.                 GFCDstartup
  216.                 " haben Sie ein Beispiel "
  217.                 "für ein Startup, wenn die GoldFish verfügbar ist.")
  218.             (cat    "Il CD GoldFish contiene molti programmi di utilità nel cassetto "
  219.                 "\"Useful\".  Ci sono programmi in Useful/Sys/C, librerie di supporto in "
  220.                 "Useful/Sys/libs, datatype in Useful/Sys/devs/datatypes, etc."
  221.                 "\n\n"
  222.                 "Verranno aggiunti nuovi assegnamenti a quelli esistenti per C:, CLASSES:, DEVS:, FONTS:, "
  223.                 "HELP:, L:, LIBS:, LOCALE: e S:, se decidi di lanciare questo "
  224.                 "programma, ma non verranno eseguite modifiche permanenti al sistema."
  225.                 "\n\n"
  226.                 "Se scegli di non lanciare questo programma, buona parte del materiale "
  227.                 "su questo CD non funzionerà correttamente se lanciato da WorkBench, "
  228.                 "dal momento che molti dei programmi e delle librerie di supporto richieste "
  229.                 "non verranno trovati.  Dove possibile si è cercato di evitare di specificare "
  230.                 "direttamente i percorsi espliciti nei parametri delle icone."
  231.                 "\n\n"
  232.                 "Consulta il file "
  233.                 GFCDstartup
  234.                 " nel quale è spiegato come "
  235.                 "modificare il programma in modo da farlo partire automaticamente "
  236.                 "ad ogni avvio del sistema se il CD GoldFish è presente.")))
  237.  
  238.     (set ask_select_metatoolprefs
  239.         (select langval
  240.             (cat    "Select a MetaTool preferences file from which to read default settings. "
  241.                 "This file will also be where the new preferences are written if "
  242.                 "you agree later to having them preserved.")
  243.             (cat    "Wählen Sie die MetaTool Einstellungsdatei aus, von der die Einstellungen "
  244.                 "gelesen werden sollen. In diese Datei werden später auch die neuen "
  245.                 "Einstellungen gespeichert, falls Sie das wünschen.")
  246.             (cat    "Scegli un file di preferenze per MetaTool dal quale leggere la configurazione "
  247.                 "predefinita. In questo file verranno memorizzate anche le future impostazioni.")))
  248.  
  249.     (set help_select_metatoolprefs
  250.         (select langval
  251.             (cat    "Please select a file for your MetaTool preferences."
  252.                 "\n\n"
  253.                 "If the file exists, default preferences will be extracted "
  254.                 "from it and you will have the opportunity later to change them."
  255.                 "\n\n"
  256.                 "The file you select will be rebuilt, or created if it does "
  257.                 "not currently exist, using default preferences or preferences "
  258.                 "that you specify later.")
  259.             (cat    "Bitte wählen Sie eine Datei für ihre MetaTool Voreinstellungen aus."
  260.                 "\n\n"
  261.                 "Falls die Datei bereits existiert, werden die Voreinstellungen ausgelesen "
  262.                 "und Sie werden später die Moeglichkeit haben, diese zu ändern."
  263.                 "\n\n"
  264.                 "Diese Datei wird erzeugt, falls sie noch nicht existiert, und es werden "
  265.                 "entweder die voreingestellten Werte oder die von Ihnen eingetragenen Werte "
  266.                 "gespeichert.")
  267.             (cat    "Scegli un file per le preferenze di MetaTool."
  268.                 "\n\n"
  269.                 "Se il file esiste, verranno estratte da esso le impostazioni "
  270.                 "predefinite e in seguito avrai la possibilità di cambiarle."
  271.                 "\n\n"
  272.                 "Il file scelto verrà ricostruito, o creato se non esiste, "
  273.                 "usando le preferenze predefinite o quelle che indicherai in seguito.")))
  274.  
  275.     (set ask_update_metatoolprefs
  276.         (select langval
  277.             (cat    "Do you wish to make changes to your MetaTool preferences "
  278.                 "permanent by updating your preferences file?")
  279.             (cat    "Möchten Sie die Änderungen in ihren MetaTool Einstellungen "
  280.                 "permanent machen, in dem Sie die Datei updaten?")
  281.             (cat    "Vuoi modificare in maniera permanente il tuo file di "
  282.                 "preferenze di MetaTool aggiornandolo?")))
  283.  
  284.     (set help_update_metatoolprefs
  285.         (select langval
  286.             (cat    "If you select Yes, the new preferences will be copied to your "
  287.                 "selected preferences file and "
  288.                 "ENV:METACONFIG and ENVARC:METACONFIG will be updated "
  289.                 "accordingly so that the next time you reboot you will "
  290.                 "still get the new preferences file."
  291.                 "\n\n"
  292.                 "If you select No, MetaTool will use the preferences file "
  293.                 ramprefs
  294.                 " and will set ENV:METACONFIG to point to that file. "
  295.                 "The first time you reboot, everything will be as it was before.")
  296.             (cat    "Wenn Sie Ja auswählen, dann werden die neuen Einstellungen in Ihre "
  297.                 "ausgewählte Datei geschrieben und ENV:METACONFIG und ENVARC:METACONFIG "
  298.                 "werden geupdatet, so dass Sie beim nächsten Start die neuen Einstellungen "
  299.                 "zur Verfügung haben."
  300.                 "\n\n"
  301.                 "Wenn Sie Nein wählen, wird MetaTool die Voreinstellungs-Datei ramprefs "
  302.                 "benutzen und ENV:METACONFIG auf diese Datei ansetzen. "
  303.                 "Nach einem Reboot wird alles wieder so sein, wie es davor war.")
  304.             (cat    "Se selezioni Sì, le nuove preferenze verranno copiate nel file "
  305.                 "che hai scelto e "
  306.                 "ENV:METACONFIG ed ENVARC:METACONFIG verranno aggiornate "
  307.                 "appropriatamente così che al prossimo avvio della macchina "
  308.                 "verrà usato il nuovo file di preferenze."
  309.                 "\n\n"
  310.                 "Se selezioni No, MetaTool userà il file "
  311.                 ramprefs
  312.                 " e farà puntare ENV:METACONFIG ad esso. "
  313.                 "Riavviando il sistema, tutto sarà nello stato in cui era prima.")))
  314.  
  315.     (set ask_update_envarc
  316.         (select langval
  317.                         (cat    "Do you wish to preserve new environment variables in ENVARC:?")
  318.                         (cat    "Moechten Sie die neuen Umgebungsvariablen in ENVARC: speichern?")
  319.             (cat    "Vuoi mantenere le nuove variabili d'ambiente in ENVARC:?")))
  320.  
  321.     (set help_update_envarc
  322.         (select langval
  323.                         (cat    "If you select Yes, the new environment variables will be copied "
  324.                                 "to ENVARC: so that the next time you reboot you will "
  325.                                 "still get the new new values."
  326.                                 "\n\n"
  327.                                 "If you select No, the first time you reboot, everything will be "
  328.                                 "as it was before.")
  329.             (cat    "Wenn Sie Ja auswaehlen, werden die neuen Umgebungsvariablen nach ENVARC: kopiert, "
  330.                 "so dass nach dem erneuten Starten des Rechners diese Werte beibehalten werden. "
  331.                 "\n\n"
  332.                 "Wenn Sie Nein waehlen, wird alles nach dem ersten Reset zurueckgesetzt werden.")
  333.             (cat    "Selezionando Si', le nuove variabili d'ambiente verranno copiate in ENVARC: in "
  334.                 "modo che al prossimo avvio della macchina saranno attivi i valori correnti."
  335.                 "\n\n"
  336.                 "Selezionando No, al prossimo avvio tutto ritornera' come era prima.")))
  337.  
  338.     (set ask_cli_or_workbench
  339.         (select langval
  340.             (cat    "Run a CLI or WorkBench command for file type")
  341.             (cat    "Starten Sie eine CLI oder Workbench-Befehl für die Dateiart")
  342.             (cat    "Comando CLI o programma WB da eseguire per il tipo di dati")))
  343.  
  344.     (set help_cli_or_workbench
  345.         (select langval
  346.             (cat    "MetaTool looks at a file type (such as \"GUIDE\") given either in a tooltype "
  347.                 "or as a command line option, and then runs a program appropriate for that "
  348.                 "file type.  The program that is run can be either a CLI or WorkBench command."
  349.                 "\n\n"
  350.                 "If you select CLI, you will be prompted for the CLI command line to run. "
  351.                 "If you select WorkBench, a requester will let you select a command to run.")
  352.             (cat    "MetaTool sucht nach der Dateiart (wie z.B. \"GUIDE\"), der entweder im Tooltype "
  353.                 "oder der Befehlszeile steht und startet das entsprechende Programm für diese "
  354.                 "Dateiart. Das Programm kann entweder ein CLI oder Workbench Befehl sein."
  355.                 "\n\n"
  356.                 "Wenn Sie CLI wählen, müssen Sie die CLI Befehlszeile eingeben. "
  357.                 "Wenn Sie Workbench wählen, können Sie über einen Requester das Programm auswählen.")
  358.             (cat    "MetaTool a seconda del tipo di file (es. \"GUIDE\") richiestogli dai parametri di una icona "
  359.                 "o da una opzione di riga comandi, lancia un programma appropriato. "
  360.                 " Si può specificare sia un comando CLI che un programma WorkBench."
  361.                 "\n\n"
  362.                 "Se scegli CLI, verrà chiesta la riga comandi CLI da eseguire. "
  363.                 "Se scegli WorkBench, verrà chiesto il programma da lanciare.")))
  364.  
  365.     (set ask_specify_Workbench_command
  366.         (select langval
  367.             (cat    "Select Workbench command to run for file type")
  368.             (cat    "Wählen Sie Workbench Befehl für Dateityp aus")
  369.             (cat    "Scegli il comando Workbench da eseguire per il tipo di dati")))
  370.  
  371.     (set help_specify_Workbench_command
  372.         (select langval
  373.             (cat    "You can either accept the default command to run, or select/enter "
  374.                 "another command to be run.")
  375.             (cat    "Sie können entweder den voreigestellten Befehl annehmen, oder einen "
  376.                 "anderen Befehl auswählen/eingeben.")
  377.             (cat    "Puoi sia accettare il programma preimpostato o scegliere/inserire "
  378.                 "un altro da lanciare.")))
  379.  
  380.     (set ask_specify_CLI_command
  381.         (select langval
  382.             (cat    "Enter a CLI command line to run for file type")
  383.             (cat    "Geben Sie eine CLI Befehlszeile für diese Dateiart ein")
  384.             (cat    "Introduci la riga comandi da eseguire per il tipo di dati")))
  385.  
  386.     (set ask_specify_CLI_command_help
  387.         (select langval
  388.             (cat    "\n\nSelect Help for more information.")
  389.             (cat    "\n\nWählen Sie Hilfe für mehr Informationen.")
  390.             (cat    "\n\nSeleziona Aiuto per maggiori informazioni.")))
  391.  
  392.     (set help_specify_CLI_command
  393.         (select langval
  394.             (cat    "Enter a CLI command to run, including any \"Execute\" if necessary. "
  395.                 "Place a pair of square brackets (\"[]\") at the location in the "
  396.                 "command line where the filename argument is to be inserted."
  397.                 "\n\n"
  398.                 "Example: \"Execute work:Players/PlayTunes []\"")
  399.             (cat    "Geben Sie einen CLI Befehl ein, inklusive \"Execute\" falls nötig. "
  400.                 "Setzen Sie ein paar eckige Klammern (\"[]\") an die Stelle in der "
  401.                 "Befehlszeile, wo der Dateiname stehen soll."
  402.                 "\n\n"
  403.                 "Beispiel: \"Execute work:Players/PlayTunes []\"")
  404.             (cat    "Inserisci un comando CLI da eseguire, compreso un eventuale "
  405.                 "\"Execute\" se necessario. "
  406.                 "Inserisci una coppia di parentesi quadre (\"[]\") nella posizione "
  407.                 "della riga comandi in cui va copiato il nome del file."
  408.                 "\n\n"
  409.                 "Esempio: \"Execute work:Players/PlayTunes []\"")))
  410.     (set ask_remove_ixemul
  411.         (select langval
  412.             (cat    "Remove obsolete ixemul.library version " ixver "." ixrev " from LIBS: "
  413.                 "and flush from memory, so we can use the current version from this CD?")
  414.             (cat    "Soll die alte ixemul.library Version " ixver ". " ixrev " aus LIBS: "
  415.                 "gelöscht werden und aus dem Speicher entfernt werden, damit die aktuelle "
  416.                 "Version von CD benutzt werden kann?")
  417.             (cat    "Posso cancellar la vecchio versione ixemul.library " ixver "." ixrev" in LIBS: "
  418.                 "e posso installare la nuova versione chi si trova su questo CD-ROM?")))
  419.  
  420.     (set help_remove_ixemul
  421.         (select langval
  422.             (cat    "The installation procedure has detected that you have obsolete "
  423.                 "version "
  424.                 ixver "." ixrev
  425.                 " of ixemul.library installed in LIBS:.  This may interfere "
  426.                 "with proper operation of many programs on the GoldFish CD.  Please "
  427.                 "confirm whether to remove the old version or not.  If you do, "
  428.                 "the flushlibs program will be run to remove any traces of it from "
  429.                 "memory.")
  430.             (cat    "Die Installation hat entdeckt, dass Sie die alte Version "
  431.                 ixver "." ixrev
  432.                 "der ixemul.library in LIBS: installiert haben. Die kann zu Problemen "
  433.                 "mit vielen Programmen auf der aktuellen GoldFish CD führen. Bestätigen "
  434.                 "Sie bitte, ob die alte Version entfernt werden soll oder nicht. Falls ja "
  435.                 "wird noch Flushlibs ausgeführt, um die Library aus dem Speicher zu entfernen.")
  436.             (cat    "L'installazione ha trovato la vecchia versione "
  437.                 ixver "." ixrev
  438.                 "della ixemul.library nel LIBS:. Con qualche programmi saranno problemi "
  439.                 "con questa versione. Qui poi cancellare la vecchia versione e installare "
  440.                 "la nuova versione. Flushlibs sarebbe caricato per cancelare la libreria "
  441.                 "nel ram.")))
  442.  
  443.     (set ask_loop_requests
  444.         (select langval
  445.             (cat    "When accessing material on this CD via the AmigaGuide interface, "
  446.                 "you will be presented with a requester from which you can select "
  447.                 "an operation to be performed.  Do you want the requester to be presented "
  448.                 "again after each operation completes?  (We suggest NO)")
  449.             (cat    "Beim Zugriff auf diese CD über das AmigaGuide Interface, erscheint "
  450.                 "eine Meldung, indem ausgewählt werden kann, was gemacht werden soll "
  451.                 "Möchten Sie, daß diese Meldung nach jeder abgeschlossenen Operartion "
  452.                 "erneut erscheint (Empfehlung: NEIN?)")
  453.             (cat    "Nell'accedere al materiale su questo CD attraverso l'interfaccia "
  454.                 "AmigaGuide, apparirà un requester dal quale scegliere un'operazione "
  455.                 "da eseguire. Vuoi che il requester appaia ogni volta che "
  456.                 "un'operazione si conclude?  (consigliato: NO)")))
  457.  
  458.     (set help_loop_requests
  459.         (select langval
  460.             (cat    "The AmigaGuide interface presents a requester with operations that "
  461.                 "are specific to the material being accessed, such as 'read docs', "
  462.                 "'install', 'run program', 'cancel'.  The default is to perform "
  463.                 "only the selected option and then exit."
  464.                 "\n\n"
  465.                 "If you wish, you can change the default so that the requester reappears "
  466.                 "after each operation completes, until you explicitly cancel it. "
  467.                 "You may find this behavior annoying after a while.")
  468.             (cat    "Die AmigaGuide Oberfläche zeigt eine Meldung, die Operationen anzeigt, "
  469.                 "die sich nach der Datei richten, die ausgewählt worden ist, so z.B. "
  470.                 "'Doks lesen', 'Installieren', 'Programm starten', 'Abbruch'. Voreingestellt "
  471.                 "ist, daß nur die ausgewählte Option ausgeführt wird und dann abgebrochen "
  472.                 "wird."
  473.                 "\n\n"
  474.                 "Falls Sie möchten, können Sie die Voreinstellung ändern, so daß nach "
  475.                 "jeder abgeschlossenen Operation erneut die Meldung erscheint, solange "
  476.                 "bis Sie sie ausdrücklich abbrechen. "
  477.                 "Dieses Verhalten mag Ihnen nach einer Weile auf die Nerven gehen.")
  478.             (cat    "L'interfaccia AmigaGuide ha un requester che consente di effettuare "
  479.                 "operazioni diverse a seconda del materiale a cui si accede, come "
  480.                 "'leggi la documentazione', 'installa', 'lancia', 'annulla'.  Normalmente "
  481.                 "viene eseguita solo l'opzione scelta."
  482.                 "\n\n"
  483.                 "In alternativa si può far sì che il requester appaia dopo ogni "
  484.                 "operazione, finché non si esce esplicitamente da esso. "
  485.                 "Tale modo di operare può alla lunga risultare noioso.")))
  486. )
  487.  
  488. ; First set up defaults that we may need.  We need to do this even if
  489. ; there is already an existing MetaTool prefs file, since some of these
  490. ; might not be in the file already.
  491. ;
  492. ; Note that for defaults, we assume that the paths are relative.  This
  493. ; allows us to avoid putting volume name references for our CD into the
  494. ; commands, which is nasty because if someone runs this script again
  495. ; later with another CD, those volume references will cause a requester
  496. ; to insert the volume.  This was first noticed when users ran the dacapo
  497. ; install script after having run the Meeting Pearls install script which
  498. ; generates a metatool.prefs file with absolute pathnames.
  499.  
  500. (procedure SetMetaToolDefaults
  501.  
  502.     ; Put default metatypes here, that apply to any version of the OS.
  503.  
  504.     (if (= 1 debugflag) (debug "set default METATYPES"))
  505.  
  506.     (set ANIM_METATYPE    ":Useful/Sys/C/VT")
  507.     (set BMP_METATYPE    ":Useful/Sys/C/JIV")
  508.     (set DIFF_METATYPE    ":Useful/Sys/C/PlayDIFF")
  509.     (set EDIT_METATYPE    "CLI Execute :Tools/Scripts/RunEmacs []")
  510.     (set HTML_METATYPE    "CLI Execute :Tools/Scripts/RunMosaic []")
  511.     (set MAN_METATYPE    ":Useful/Sys/C/Muchmore")
  512.     (set MED_METATYPE    ":Useful/Sys/C/MultiPlayer")
  513.     (set MOD_METATYPE    ":Useful/Sys/C/MultiPlayer")
  514.     (set MOVIE_METATYPE    ":Useful/Sys/C/MoviePlayer")
  515.     (set S3M_METATYPE    "CLI :Useful/Sys/C/HiP []")
  516.     (set SOURCE_METATYPE    "CLI Execute :Tools/Scripts/RunEmacs []")
  517.  
  518.     ; Check for OS versions prior to KickStart/Workbench 2.04 Release.
  519.  
  520.     (if (<= osver 36)
  521.         (
  522.             (if (= 1 debugflag) (debug "found Kickstart 2.0 prerelease or earlier"))
  523.  
  524.             (set A8SVX_METATYPE    "CLI :Useful/Sys/C/DSound []")
  525.             (set AIFF_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  526.             (set AU_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  527.             (set DVI_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  528.             (set EPS_METATYPE    ":Useful/Sys/C/Muchmore")
  529.             (set EPSF_METATYPE    ":Useful/Sys/C/Muchmore")
  530.             (set GIF_METATYPE    ":Useful/Sys/C/Jiv")
  531.             (set GINFO_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  532.             (set GUIDE_METATYPE    ":Useful/Sys/C/Muchmore")
  533.             (set ILBM_METATYPE    ":Useful/Sys/C/Jiv")
  534.             (set JPEG_METATYPE    ":Useful/Sys/C/Jiv")
  535.             (set PS_METATYPE    ":Useful/Sys/C/Muchmore")
  536.             (set TEX_METATYPE    ":Useful/Sys/C/Muchmore")
  537.             (set TEXT_METATYPE    ":Useful/Sys/C/Muchmore")
  538.             (set VOC_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  539.             (set WAV_METATYPE    "CLI :Useful/Sys/C/NewZap []")
  540.             
  541.         )
  542.     )
  543.     (if (AND (> osver 36) (< osver 39))
  544.         (
  545.             (if (= 1 debugflag) (debug "found Kickstart 2.04 to 2.1"))
  546.  
  547.             (set A8SVX_METATYPE    "CLI :Useful/Sys/C/DSound []")
  548.             (set AIFF_METATYPE    ":Useful/Sys/C/Play16")
  549.             (set AU_METATYPE    ":Useful/Sys/C/Play16")
  550.             (set DVI_METATYPE    ":Files/text/TeX/PasTeX/bin/ShowDVI")
  551.             (set EPS_METATYPE    ":Useful/Sys/C/Muchmore")
  552.             (set EPSF_METATYPE    ":Useful/Sys/C/Muchmore")
  553.             (set GIF_METATYPE    ":Useful/Sys/C/JIV")
  554.             (set GINFO_METATYPE    ":Useful/Sys/C/Muchmore")
  555.             (set GUIDE_METATYPE    ":Useful/Sys/C/AmigaGuide")
  556.             (set ILBM_METATYPE    ":Useful/Sys/C/JIV")
  557.             (set JPEG_METATYPE    ":Useful/Sys/C/JIV")
  558.             (set PS_METATYPE    ":Useful/Sys/C/Muchmore")
  559.             (set TEX_METATYPE    ":Useful/Sys/C/Muchmore")
  560.             (set TEXT_METATYPE    ":Useful/Sys/C/Muchmore")
  561.             (set VOC_METATYPE    ":Useful/Sys/C/Play16")
  562.             (set WAV_METATYPE    ":Useful/Sys/C/Play16")
  563.         )
  564.     )
  565.     (if (>= osver 39)
  566.         (
  567.             (if (= 1 debugflag) (debug "found Kickstart 3.0 or later"))
  568.  
  569.             (set A8SVX_METATYPE    "SYS:Utilities/MultiView")
  570.             (set AIFF_METATYPE    "SYS:Utilities/MultiView")
  571.             (set AU_METATYPE    "SYS:Utilities/MultiView")
  572.             (set DVI_METATYPE    ":Files/text/TeX/PasTeX/bin/ShowDVI")
  573.             (set EPS_METATYPE    "SYS:Utilities/MultiView")
  574.             (set EPSF_METATYPE    "SYS:Utilities/MultiView")
  575.             (set GIF_METATYPE    "SYS:Utilities/MultiView")
  576.             (set GINFO_METATYPE    "SYS:Utilities/MultiView")
  577.             (set GUIDE_METATYPE    "SYS:Utilities/MultiView")
  578.             (set ILBM_METATYPE    "SYS:Utilities/MultiView")
  579.             (set JPEG_METATYPE    "SYS:Utilities/MultiView")
  580.             (set PS_METATYPE    "SYS:Utilities/MultiView")
  581.             (set TEX_METATYPE    "SYS:Utilities/MultiView")
  582.             (set TEXT_METATYPE    "SYS:Utilities/MultiView")
  583.             (set VOC_METATYPE    "SYS:Utilities/MultiView")
  584.             (set WAV_METATYPE    "SYS:Utilities/MultiView")
  585.         )
  586.     )
  587.     (if (= 1 debugflag) (debug "make and populate the ENV:MetaToolPrefs drawer"))
  588.     (if (AND (= 2 (exists "ENV:" (noreq)))
  589.          (= 0 (exists "ENV:MetaToolPrefs" (noreq))))
  590.             (makedir "ENV:MetaToolPrefs" (safe))
  591.     )
  592.     (textfile
  593.         (dest "ENV:MetaToolPrefs/8SVX")
  594.         (append A8SVX_METATYPE)
  595.     )
  596.     (textfile
  597.         (dest "ENV:MetaToolPrefs/AIFF")
  598.         (append AIFF_METATYPE)
  599.     )
  600.     (textfile
  601.         (dest "ENV:MetaToolPrefs/ANIM")
  602.         (append ANIM_METATYPE)
  603.     )
  604.     (textfile
  605.         (dest "ENV:MetaToolPrefs/AU")
  606.         (append AU_METATYPE)
  607.     )
  608.     (textfile
  609.         (dest "ENV:MetaToolPrefs/BMP")
  610.         (append BMP_METATYPE)
  611.     )
  612.     (textfile
  613.         (dest "ENV:MetaToolPrefs/DIFF")
  614.         (append DIFF_METATYPE)
  615.     )
  616.     (textfile
  617.         (dest "ENV:MetaToolPrefs/DVI")
  618.         (append DVI_METATYPE)
  619.     )
  620.     (textfile
  621.         (dest "ENV:MetaToolPrefs/EDIT")
  622.         (append EDIT_METATYPE)
  623.     )
  624.     (textfile
  625.         (dest "ENV:MetaToolPrefs/EPS")
  626.         (append EPS_METATYPE)
  627.     )
  628.     (textfile
  629.         (dest "ENV:MetaToolPrefs/EPSF")
  630.         (append EPSF_METATYPE)
  631.     )
  632.     (textfile
  633.         (dest "ENV:MetaToolPrefs/GIF")
  634.         (append GIF_METATYPE)
  635.     )
  636.     (textfile
  637.         (dest "ENV:MetaToolPrefs/GINFO")
  638.         (append GINFO_METATYPE)
  639.     )
  640.     (textfile
  641.         (dest "ENV:MetaToolPrefs/GUIDE")
  642.         (append GUIDE_METATYPE)
  643.     )
  644.     (textfile
  645.         (dest "ENV:MetaToolPrefs/HTML")
  646.         (append HTML_METATYPE)
  647.     )
  648.     (textfile
  649.         (dest "ENV:MetaToolPrefs/ILBM")
  650.         (append ILBM_METATYPE)
  651.     )
  652.     (textfile
  653.         (dest "ENV:MetaToolPrefs/JPEG")
  654.         (append JPEG_METATYPE)
  655.     )
  656.     (textfile
  657.         (dest "ENV:MetaToolPrefs/MAN")
  658.         (append MAN_METATYPE)
  659.     )
  660.     (textfile
  661.         (dest "ENV:MetaToolPrefs/MED")
  662.         (append MED_METATYPE)
  663.     )
  664.     (textfile
  665.         (dest "ENV:MetaToolPrefs/MOD")
  666.         (append MOD_METATYPE)
  667.     )
  668.     (textfile
  669.         (dest "ENV:MetaToolPrefs/MOVIE")
  670.         (append MOVIE_METATYPE)
  671.     )
  672.     (textfile
  673.         (dest "ENV:MetaToolPrefs/PS")
  674.         (append PS_METATYPE)
  675.     )
  676.     (textfile
  677.         (dest "ENV:MetaToolPrefs/S3M")
  678.         (append S3M_METATYPE)
  679.     )
  680.     (textfile
  681.         (dest "ENV:MetaToolPrefs/SOURCE")
  682.         (append SOURCE_METATYPE)
  683.     )
  684.     (textfile
  685.         (dest "ENV:MetaToolPrefs/TEX")
  686.         (append TEX_METATYPE)
  687.     )
  688.     (textfile
  689.         (dest "ENV:MetaToolPrefs/TEXT")
  690.         (append TEXT_METATYPE)
  691.     )
  692.     (textfile
  693.         (dest "ENV:MetaToolPrefs/VOC")
  694.         (append VOC_METATYPE)
  695.     )
  696.     (textfile
  697.         (dest "ENV:MetaToolPrefs/WAV")
  698.         (append WAV_METATYPE)
  699.     )
  700.     (if (= 1 debugflag) (debug "done building ENV:MetaToolPrefs defaults"))
  701. )
  702.  
  703. ; Get default values for the MetaTool.prefs file.  If we can find an existing
  704. ; prefs file, then extract the default values for each METATYPE from that file.
  705. ; Otherwise, prepare suitable defaults based on the version of AmigaDOS that
  706. ; the user is running.
  707. ;
  708. ; This is kludgy because Installer doesn't provide any simple method of reading
  709. ; data in from an external file.  We use a helper program that extracts all the
  710. ; metatypes and command lines from the preferences file, and stuffs them into
  711. ; environment variables in the ENV:MetaToolPrefs directory.  We can then get the
  712. ; ones we are interested in via getenv, change them if necessary, and eventually
  713. ; rebuild the preferences files using all the extracted metatypes.
  714.  
  715.  
  716. (procedure GetMetaToolPrefs
  717.  
  718.     ; Set a default for the name of the MetaTool prefs file.
  719.  
  720.     (set metatoolprefs "S:MetaTool.prefs")
  721.  
  722.     ; Doing getenv on a non-existant env variable croaks the installer!
  723.  
  724.     (if (exists "ENV:METACONFIG")
  725.         (
  726.             (set metaconfig (getenv "METACONFIG"))
  727.             (if (= 1 debugflag) (debug "ENV:METACONFIG contains " metaconfig))
  728.             ; Make sure var is not empty before committing to it.
  729.             (if (<> 0 (strlen metaconfig))
  730.                 (
  731.                     (set metatoolprefs metaconfig)
  732.                 )
  733.             )
  734.         )
  735.     )
  736.     (if (= 1 debugflag) (debug "use MetaTool prefs file " metatoolprefs))
  737.  
  738.     ; Allow average or expert user to select the MetaTool prefs file to read defaults from
  739.     ; and to which the edited prefs will be written.
  740.  
  741.     (if (> 0 @user-level)
  742.         (
  743.             ; If a file does not currently exist, then the default filename
  744.             ; used in the askfile command will NOT appear in the file requester.
  745.             ; The "newpath" option would appear to be the solution for this, but
  746.             ; no known installer accepts it.  So we have to kludge around the problem
  747.             ; by creating a temporary file that gets deleted after askfile completes.
  748.             (set deletefile "")
  749.             (if (= 0 (exists metatoolprefs))
  750.                 (
  751.                     (set deletefile metatoolprefs)
  752.                     (if (= 1 debugflag) (debug "Create temporary " deletefile))
  753.                     (textfile
  754.                         (dest deletefile)
  755.                         (append "delete me!")
  756.                     )
  757.                 )
  758.             )
  759.             (set metatoolprefs
  760.                 (askfile
  761.                     (prompt ask_select_metatoolprefs)
  762.                     ;;(newpath)
  763.                     (default (expandpath metatoolprefs))
  764.                     (help help_select_metatoolprefs)
  765.                 )
  766.             )
  767.             (if (<> 0 (strlen deletefile))
  768.                 (
  769.                     (if (= 1 debugflag) (debug "Delete temporary " deletefile))
  770.                     (delete deletefile)
  771.                 )
  772.             )
  773.         )
  774.     )
  775.     (if (= 1 debugflag) (debug "Will use MetaTool prefs file " metatoolprefs))
  776.  
  777.     ; If there is an existing MetaTool prefs file, get defaults from it, overriding
  778.     ; any existing defaults we may have set up.
  779.  
  780.     (if (exists metatoolprefs (noreq))
  781.         (
  782.             (set commandline ("%s %s" MetaToolPrefs2Env metatoolprefs))
  783.             (if (= 1 debugflag) (debug "running " commandline))
  784.             (run commandline (safe))
  785.         )
  786.     )
  787. )
  788.  
  789. ; Edit the MetaTool prefs that are stored in the ENV:MetaToolPrefs drawer.
  790. ; Each one can be either a CLI command or a WorkBench command.
  791.  
  792. (procedure EditMetaToolPrefs
  793.     (foreach "ENV:MetaToolPrefs" "#?"
  794.         (if (= 1 debugflag) (debug "edit METATYPE " @each-name))
  795.         (set envvar ("%s/%s" "MetaToolPrefs" @each-name))
  796.         (set metacommand (getenv envvar))
  797.         (if (= (substr metacommand 0 4) "CLI ")
  798.             (
  799.                 (set CLIcommand 1)
  800.                 (set metacommand (substr metacommand 4))
  801.             )
  802.             (
  803.                 (set CLIcommand 0)
  804.             )
  805.         )
  806.         (if (= 1 debugflag) (debug "CLIcommand is " CLIcommand "metacommand is " metacommand))
  807.         (set CLIcommand
  808.             (askchoice
  809.                 (prompt ("%s %s?" ask_cli_or_workbench @each-name))
  810.                 (help help_cli_or_workbench)
  811.                 (choices "WorkBench" "CLI")
  812.                 (default CLIcommand)
  813.             )
  814.         )
  815.         (if (= CLIcommand 0)
  816.             (
  817.                 (set metacommand
  818.                     (askfile
  819.                         (prompt ("%s %s" ask_specify_Workbench_command @each-name))
  820.                         (help help_specify_Workbench_command)
  821.                         ;;(newpath)
  822.                         (default metacommand)
  823.                     )
  824.                 )
  825.                 (run ("SetEnv MetaToolPrefs/%s \"%s\"" @each-name metacommand) (safe))
  826.             )
  827.             (
  828.                 (set metacommand
  829.                     (askstring
  830.                         (prompt ("%s %s. %s" ask_specify_CLI_command @each-name ask_specify_CLI_command_help))
  831.                         (help help_specify_CLI_command)
  832.                         (default metacommand)
  833.                     )
  834.                 )
  835.                 (run ("SetEnv MetaToolPrefs/%s \"CLI %s\"" @each-name metacommand) (safe))
  836.             )
  837.         )
  838.     )
  839. )
  840.  
  841. ; Using the MetaTool prefs stored in individual environment variables in ENV:MetaToolPrefs,
  842. ; rebuild a MetaTool prefs file and write it to the previously selected destination file.
  843.  
  844. (procedure RebuildMetaToolPrefs
  845.     (foreach "ENV:MetaToolPrefs" "#?"
  846.         (if (= 1 debugflag) (debug "found METATYPE " @each-name))
  847.         (set envvar ("%s/%s" "MetaToolPrefs" @each-name))
  848.         (set metacommand (getenv envvar))
  849.         (set prefs (cat prefs ("%s\t%s\n" @each-name metacommand)))
  850.     )
  851.     (textfile
  852.         (dest tmpprefs)
  853.         (append prefs)
  854.     )
  855.  
  856.     ; If not novice mode then ask user if OK to install new
  857.     ; MetaTool prefs permanently.
  858.  
  859.     (if (= 0 @user-level)
  860.         (set updateprefs 0)
  861.         (set updateprefs
  862.             (askbool
  863.                 (prompt ask_update_metatoolprefs)
  864.                 (help help_update_metatoolprefs)
  865.                 (choices yes no)
  866.                 (default 1)
  867.             )
  868.         )
  869.     )
  870.     (if (= 1 debugflag) (debug "update prefs selection is " updateprefs))
  871.     (if (= 0 updateprefs)
  872.         (set metatoolprefs ramprefs)
  873.     )
  874.  
  875.     ; Set METACONFIG environment variable to point to whereever
  876.     ; we have selected the MetaTool prefs file to be.
  877.  
  878.     (if (= 1 debugflag) (debug "set METACONFIG to " metatoolprefs))
  879.     (run ("SetEnv METACONFIG \"%s\"" metatoolprefs))
  880.  
  881.     ; Delete any old backup file and rename the current prefs file
  882.     ; (if any) to a backup file.
  883.  
  884.     (set prefsbackup ("%s.bak" metatoolprefs))
  885.     (if (= 1 debugflag) (debug "create backup file" prefsbackup))
  886.     (delete prefsbackup)
  887.     (rename metatoolprefs prefsbackup)
  888.  
  889.  
  890.     ; Install the new prefs file.  Note that this is such a small file that there is
  891.     ; no sense in flashing the copy gauge at the user, who probably won't have time
  892.     ; to read it anyway.
  893.  
  894.     (if (= 1 debugflag) (debug "copy " tmpprefs " to " metatoolprefs))
  895.     (copyfiles
  896.         (source tmpprefs)
  897.         (dest (pathonly metatoolprefs))
  898.         (files)
  899.         (nogauge)
  900.         (delopts fail)
  901.         (optional nofail force)
  902.     )
  903.  
  904.     ; Note METACONFIG is optionally copied to ENVARC: later.
  905. )
  906.  
  907. (procedure UpdateEnvArc
  908.  
  909.     ; If not novice mode then ask user if OK to preserve environment variables.
  910.  
  911.     (if (= 1 debugflag) (debug "begin procedure UpdateEnvArc"))
  912.     (if (= 0 @user-level)
  913.         (set update_envarc 0)
  914.         (set update_envarc
  915.             (askbool
  916.                 (prompt ask_update_envarc)
  917.                 (help help_update_envarc)
  918.                 (choices yes no)
  919.                 (default 1)
  920.             )
  921.         )
  922.     )
  923.     (if (= 1 debugflag) (debug "update envarc: selection is " update_envarc))
  924.     (if (= 1 update_envarc)
  925.         (
  926.             (if (= 1 debugflag) (debug "copy ENV:METACONFIG and ENV:RDE#? files to ENVARC:"))
  927.             (copyfiles
  928.                 (source "ENV:")
  929.                 (prompt "Copy ENV: -> ENVARC: ?")
  930.                 (help "")
  931.                 (pattern "(METACONFIG|RDE_#?)")
  932.                 (dest "ENVARC:")
  933.                 (files)
  934.                 (confirm)
  935.                 (delopts fail)
  936.                 (optional nofail force)
  937.             )
  938.         )
  939.     )
  940.     (if (= 1 debugflag) (debug "end procedure UpdateEnvArc"))
  941. )
  942.  
  943. ; First we set the defaults that we suggest for the user, then we override
  944. ; them in the environment variables with what the user currently has in his
  945. ; MetaTool prefs file.
  946. ;
  947. ; Then, for each METATYPE in the ENV:MetaToolPrefs directory, any which might
  948. ; have come from our internal defaults or the preferences file, we allow the
  949. ; user to either select the default in ENV:MetaToolsPrefs, select our internal
  950. ; default, or change to an entirely different command.
  951.  
  952. (procedure Main
  953.  
  954.     ; Set debugflag to 0 for no debugging or 1 to enable debug messages.
  955.     ; Thus you can enable debugging with a single change to this file.
  956.  
  957.     (set debugflag 0)
  958.  
  959.     ; Set some defaults for various things.
  960.  
  961.     ; Use an explicit volname which allows this installer script to reside anywhere.
  962.  
  963.     (set volname "GoldFish-Vol3")
  964.  
  965.     ; This sets names of any temporary files used.  Note that we create a special
  966.     ; directory that is deleted after we are done, into which all the temporary
  967.     ; files are stored.  This is so that we can use the actual names of files
  968.     ; that we want to create, so that "newname" is not necessary in any copyfiles,
  969.     ; since the confirmation requester does not take into account the new name.
  970.  
  971.     (set tmpdir "ram:GoldFish")
  972.     (set tmpfile ("%s/%s" tmpdir "GoldFish.tmp"))
  973.     (set tmpprefs ("%s/%s" tmpdir "MetaTool.prefs"))
  974.     (set ramprefs "ram:MetaTool.prefs")
  975.     (set UsefulStartup ("%s:Useful/sys/s/Useful-Startup" volname))
  976.     (set GFCDstartup ("%s:Useful/sys/s/FFCD-Startup" volname))
  977.  
  978.     ; Set RDE_* environment variables
  979.  
  980.     (run ("SetEnv RDE_HEADER \"%s\"" ("%s:Tools/scripts/RDE.header" volname)))
  981.     (run ("SetEnv RDE_DEFAULT \"%s\"" ("%s:Tools/scripts/RDE.default" volname)))
  982.     (run ("SetEnv RDE_TRAILER \"%s\"" ("%s:Tools/scripts/RDE.trailer" volname)))
  983.     (run ("SetEnv RDE_LOOP \"no\""))
  984.  
  985.     ; This tool parses the MetaTool prefs file and creates environment variables that
  986.     ; match each METATYPE.
  987.  
  988.     (set MetaToolPrefs2Env ("%s:%s" volname "Tools/MetaTool/MetaToolPrefs2Env"))
  989.  
  990.     ; Find out some environment stuff.
  991.  
  992.     (set osver (/ (getversion) 65536))
  993.  
  994.     ; If we abort, delete the entire MetaTool prefs directory that we created in
  995.     ; ENV: and the temporary directory.  Note that since a "delete ... all" is
  996.     ; such a dangerous command, we explicitly name the targets here, rather than
  997.     ; allowing a substitution of "tmpdir" for example.  Paranoia rules...
  998.  
  999.     (onerror (run ("delete ENV:MetaToolPrefs ram:GoldFish all") (safe)))
  1000.  
  1001.     ; Set @default-dest as the location for the log file.
  1002.  
  1003.     (set @default-dest "ram:")
  1004.  
  1005.     ; Create the temporary directory.
  1006.  
  1007.     (makedir tmpdir (safe))
  1008.  
  1009.     ; The real work starts here.  Select the language to use.
  1010.  
  1011.     (SelectLanguage)
  1012.     (complete 10)
  1013.  
  1014.     (message msg_hello)
  1015.     
  1016.     (RunStartups)
  1017.     (complete 20)
  1018.  
  1019.     (Options)
  1020.     (complete 30)
  1021.  
  1022.     (SetMetaToolDefaults)
  1023.     (complete 40)
  1024.  
  1025.     (GetMetaToolPrefs)
  1026.     (complete 60)
  1027.  
  1028.     (if (= 2 @user-level)
  1029.         (EditMetaToolPrefs)
  1030.     )
  1031.     (complete 80)
  1032.  
  1033.     (RebuildMetaToolPrefs)
  1034.  
  1035.     (UpdateEnvArc)
  1036.     (complete 100)
  1037.  
  1038.     (run ("delete ENV:MetaToolPrefs ram:GoldFish all") (safe))
  1039. )
  1040.  
  1041.  
  1042. (Main)
  1043.