home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
install
< prev
next >
Wrap
Text File
|
1995-10-26
|
38KB
|
1,043 lines
; Installer program for GoldFish Volume 3 CD.
; Written by Fred Fish, Amiga Library Services.
; This script is public domain. Use it for any purpose you wish.
; German translation by Daniel Amor.
; Italian translation by Rudi Chiarito.
(procedure RunStartups
; If not novice mode then ask user if OK to run the Useful-Startup script.
(if (= 0 @user-level)
(set runscript 1)
(set runscript
(askbool
(prompt ask_run_useful_startup)
(help help_run_useful_startup)
(choices yes no)
(default 1)
)
)
)
(if (= 1 runscript)
(
(if (= 1 debugflag) (debug "run script " UsefulStartup))
(makeassign "Useful" ("%s:Useful" volname))
(execute UsefulStartup)
)
)
; Check to see what version of ixemul.library is in LIBS:
(set ixversion (getversion "LIBS:ixemul.library"))
(if (= 1 debugflag) (debug "getversion ixemul.library returned " ixversion))
(set ixver (/ ixversion 65536))
(set ixrev (- ixversion (* ixver 65536)))
(if (= 1 debugflag) (debug "found ixemul.library version " ixver " revision " ixrev))
; If an old version of ixemul.library is installed, offer to remove it,
; regardless of the user level. Run flushlibs afterwards, which doesn't
; hurt either way and ensures that it is flushed from memory if it is
; removed.
(if (> ixversion 0)
(
(if (NOT (AND (>= ixver 41) (>= ixrev 4)))
(
(if (= 1 debugflag) (debug "found an obsolete ixemul.library"))
(set olduser @user-level)
(user 2)
(if (= 1 debugflag) (debug "attempt removal of old ixemul.library"))
(delete "LIBS:ixemul.library"
(confirm)
(optional askuser)
(help help_remove_ixemul)
(prompt ask_remove_ixemul)
)
(run (":Useful/Sys/C/FlushLibs") (safe))
(user olduser)
)
)
)
)
)
(procedure Options
; If not novice mode then ask user if program specific options presented
; by AmigaGuide interface should loop or not.
(if (= 0 @user-level)
(set loop 0)
(set loop
(askbool
(prompt ask_loop_requests)
(help help_loop_requests)
(choices yes no)
(default 1)
)
)
)
(if (= 0 loop)
(run ("SetEnv RDE_LOOP \"no\""))
(run ("SetEnv RDE_LOOP \"yes\""))
)
)
; Select the user's desired language to use during installation.
;
; This is also where all the language dependent strings get defined.
; To install support for a new language, just add the appropriate
; language selection and install the strings for that language.
(procedure SelectLanguage
(if (patmatch @language "English") (set lang 0))
(if (patmatch @language "Deutsch") (set lang 1))
(if (patmatch @language "Italiano") (set lang 2))
(set langval
(askchoice
(prompt (cat "Select your native language.\n"
"Bitte waehlen Sie die Sprache aus.\n"
"Scegli la tua lingua.\n"))
(help (cat "You can choose a language for prompts and help."
"\n\n"
"Sie koennen eine Sprache für die Anweisungen und die Hilfe auswaehlen."
"\n\n"
"Scegli la lingua da usare per i messaggi di richiesta e d'aiuto"
"\n\n"))
(choices
"English"
"Deutsch"
"Italiano"
)
(default lang)
)
)
(set @language
(select langval
("English")
("Deutsch")
("Italiano")))
(set yes
(select langval
("Yes")
("Ja")
("Sì")))
(set no
(select langval
("No")
("Nein")
("No")))
(set msg_hello
(select langval
(cat "Before using this CD you should run this installer script. "
"It will make no permanent changes to your system without asking "
"you first. If you do not agree to the change, a simple reboot "
"will always restore your system to the state it was in prior "
"to running this install script."
"\n\n"
"Most requesters have help available via the Help gadget or Help key.")
(cat "Vor der Benutzung dieser CD-ROM, sollten Sie dieses "
"Skript laufen lassen. Es wird keine Veränderungen "
"an ihrem, ohne ihre ausdrückliche Genehmigung vornehmen. "
"Es nimmt keine permanenten Veraenderungen vor, so dass ein "
"einfach Reboot die Einstellungen wieder rückgängig macht."
"\n\n"
"Viele Requester haben eine Hilfe-Funktion, die über das Hilfe-Symbol "
"oder die Help-Taste aktiviert werden können!")
(cat "Prima di usare questo CD dovresti lanciare il programma di installazione. "
"Esso non modificherà in modo permanente la configurazione del sistema senza "
"chiederlo prima. Se le impostazioni non sono di tuo gradimento, "
"riavviando la macchina, il sistema ritornerà nello stato precedente "
"all'avvio di questo programma."
"\n\n"
"La maggior parte delle schermate dispone di un aiuto in linea, "
"disponibile selezionando col mouse il pulsante Aiuto o premendo "
"Help sulla tastiera.")))
(set ask_run_useful_startup
(select langval
(cat "Shall I run the following script for you now?"
"\n\n "
UsefulStartup
"\n\n"
"Press the Help key or gadget now if you want to know more about "
"what this script will do before running it.")
(cat "Soll ich das folgende Skript nun starten?"
"\n\n "
UsefulStartup
"\n\n"
"Drücken Sie die Hilfe-Taste, wenn Sie wissen möchten, was dieses "
"Skript macht.")
(cat "Vuoi che esegua ORA il seguente programma?"
"\n\n "
UsefulStartup
"\n\n"
"Premi il tasto Help o seleziona Aiuto se vuoi sapere cosa fa, "
"prima di eseguirlo.")))
(set help_run_useful_startup
(select langval
(cat "The GoldFish CD contains many useful utilities under the directory "
"\"Useful\". There are utilities in Useful/Sys/C, libraries in "
"Useful/Sys/libs, datatypes in Useful/Sys/devs/datatypes, etc."
"\n\n"
"Assigns will be added to your existing C:, CLASSES:, DEVS:, FONTS:, "
"HELP:, L:, LIBS:, LOCALE: and S: assignments if you elect to run "
"this script, but no permanent changes will be made to your system."
"\n\n"
"If you do not elect to run this script, many things on the CD will "
"not work from WorkBench since most of the required tools and libraries "
"will not be found. Whenever possible we have tried to avoid hard coding "
"explicit pathnames into the icon tooltypes."
"\n\n"
"See the file "
GFCDstartup
" for a way to arrange "
"for this script to be run at boot time if the GoldFish CD is present.")
(cat "Die GoldFish CD enthält viele nützliche Utilities, im Verzeichnis "
"\"Useful\". Es gibt Utilities in Useful/Sys/C, Bibliotheken in "
"Useful/Sys/libs, datatypes in Useful/Sys/Devs/Datatypes, etc."
"\n\n"
"Assigns werden zu ihren existierenden Verzeichnissen C:, CLASSES:, "
"DEVS:, FONTS:, HELP; L:, LIBS:, LOCALE: und S: hinzugefügt, wenn Sie "
"dieses Skript starten. Es werden jedoch keine permanenten Änderungen "
"an Ihrem System durchgeführt."
"\n\n"
"Wenn Sie dieses Skript nicht starten, dann werden viele Dinge nicht "
"von der Workbench aus funktionieren, da die benötigten Werkzeuge und "
"Bibliotheken nicht zur Verfügung stehen. Wo es möglich war, haben wir "
"auf die Benutzung von absoluten Pfadnamen in den ToolTypes verzichtet."
"\n\n"
"In der Datei "
GFCDstartup
" haben Sie ein Beispiel "
"für ein Startup, wenn die GoldFish verfügbar ist.")
(cat "Il CD GoldFish contiene molti programmi di utilità nel cassetto "
"\"Useful\". Ci sono programmi in Useful/Sys/C, librerie di supporto in "
"Useful/Sys/libs, datatype in Useful/Sys/devs/datatypes, etc."
"\n\n"
"Verranno aggiunti nuovi assegnamenti a quelli esistenti per C:, CLASSES:, DEVS:, FONTS:, "
"HELP:, L:, LIBS:, LOCALE: e S:, se decidi di lanciare questo "
"programma, ma non verranno eseguite modifiche permanenti al sistema."
"\n\n"
"Se scegli di non lanciare questo programma, buona parte del materiale "
"su questo CD non funzionerà correttamente se lanciato da WorkBench, "
"dal momento che molti dei programmi e delle librerie di supporto richieste "
"non verranno trovati. Dove possibile si è cercato di evitare di specificare "
"direttamente i percorsi espliciti nei parametri delle icone."
"\n\n"
"Consulta il file "
GFCDstartup
" nel quale è spiegato come "
"modificare il programma in modo da farlo partire automaticamente "
"ad ogni avvio del sistema se il CD GoldFish è presente.")))
(set ask_select_metatoolprefs
(select langval
(cat "Select a MetaTool preferences file from which to read default settings. "
"This file will also be where the new preferences are written if "
"you agree later to having them preserved.")
(cat "Wählen Sie die MetaTool Einstellungsdatei aus, von der die Einstellungen "
"gelesen werden sollen. In diese Datei werden später auch die neuen "
"Einstellungen gespeichert, falls Sie das wünschen.")
(cat "Scegli un file di preferenze per MetaTool dal quale leggere la configurazione "
"predefinita. In questo file verranno memorizzate anche le future impostazioni.")))
(set help_select_metatoolprefs
(select langval
(cat "Please select a file for your MetaTool preferences."
"\n\n"
"If the file exists, default preferences will be extracted "
"from it and you will have the opportunity later to change them."
"\n\n"
"The file you select will be rebuilt, or created if it does "
"not currently exist, using default preferences or preferences "
"that you specify later.")
(cat "Bitte wählen Sie eine Datei für ihre MetaTool Voreinstellungen aus."
"\n\n"
"Falls die Datei bereits existiert, werden die Voreinstellungen ausgelesen "
"und Sie werden später die Moeglichkeit haben, diese zu ändern."
"\n\n"
"Diese Datei wird erzeugt, falls sie noch nicht existiert, und es werden "
"entweder die voreingestellten Werte oder die von Ihnen eingetragenen Werte "
"gespeichert.")
(cat "Scegli un file per le preferenze di MetaTool."
"\n\n"
"Se il file esiste, verranno estratte da esso le impostazioni "
"predefinite e in seguito avrai la possibilità di cambiarle."
"\n\n"
"Il file scelto verrà ricostruito, o creato se non esiste, "
"usando le preferenze predefinite o quelle che indicherai in seguito.")))
(set ask_update_metatoolprefs
(select langval
(cat "Do you wish to make changes to your MetaTool preferences "
"permanent by updating your preferences file?")
(cat "Möchten Sie die Änderungen in ihren MetaTool Einstellungen "
"permanent machen, in dem Sie die Datei updaten?")
(cat "Vuoi modificare in maniera permanente il tuo file di "
"preferenze di MetaTool aggiornandolo?")))
(set help_update_metatoolprefs
(select langval
(cat "If you select Yes, the new preferences will be copied to your "
"selected preferences file and "
"ENV:METACONFIG and ENVARC:METACONFIG will be updated "
"accordingly so that the next time you reboot you will "
"still get the new preferences file."
"\n\n"
"If you select No, MetaTool will use the preferences file "
ramprefs
" and will set ENV:METACONFIG to point to that file. "
"The first time you reboot, everything will be as it was before.")
(cat "Wenn Sie Ja auswählen, dann werden die neuen Einstellungen in Ihre "
"ausgewählte Datei geschrieben und ENV:METACONFIG und ENVARC:METACONFIG "
"werden geupdatet, so dass Sie beim nächsten Start die neuen Einstellungen "
"zur Verfügung haben."
"\n\n"
"Wenn Sie Nein wählen, wird MetaTool die Voreinstellungs-Datei ramprefs "
"benutzen und ENV:METACONFIG auf diese Datei ansetzen. "
"Nach einem Reboot wird alles wieder so sein, wie es davor war.")
(cat "Se selezioni Sì, le nuove preferenze verranno copiate nel file "
"che hai scelto e "
"ENV:METACONFIG ed ENVARC:METACONFIG verranno aggiornate "
"appropriatamente così che al prossimo avvio della macchina "
"verrà usato il nuovo file di preferenze."
"\n\n"
"Se selezioni No, MetaTool userà il file "
ramprefs
" e farà puntare ENV:METACONFIG ad esso. "
"Riavviando il sistema, tutto sarà nello stato in cui era prima.")))
(set ask_update_envarc
(select langval
(cat "Do you wish to preserve new environment variables in ENVARC:?")
(cat "Moechten Sie die neuen Umgebungsvariablen in ENVARC: speichern?")
(cat "Vuoi mantenere le nuove variabili d'ambiente in ENVARC:?")))
(set help_update_envarc
(select langval
(cat "If you select Yes, the new environment variables will be copied "
"to ENVARC: so that the next time you reboot you will "
"still get the new new values."
"\n\n"
"If you select No, the first time you reboot, everything will be "
"as it was before.")
(cat "Wenn Sie Ja auswaehlen, werden die neuen Umgebungsvariablen nach ENVARC: kopiert, "
"so dass nach dem erneuten Starten des Rechners diese Werte beibehalten werden. "
"\n\n"
"Wenn Sie Nein waehlen, wird alles nach dem ersten Reset zurueckgesetzt werden.")
(cat "Selezionando Si', le nuove variabili d'ambiente verranno copiate in ENVARC: in "
"modo che al prossimo avvio della macchina saranno attivi i valori correnti."
"\n\n"
"Selezionando No, al prossimo avvio tutto ritornera' come era prima.")))
(set ask_cli_or_workbench
(select langval
(cat "Run a CLI or WorkBench command for file type")
(cat "Starten Sie eine CLI oder Workbench-Befehl für die Dateiart")
(cat "Comando CLI o programma WB da eseguire per il tipo di dati")))
(set help_cli_or_workbench
(select langval
(cat "MetaTool looks at a file type (such as \"GUIDE\") given either in a tooltype "
"or as a command line option, and then runs a program appropriate for that "
"file type. The program that is run can be either a CLI or WorkBench command."
"\n\n"
"If you select CLI, you will be prompted for the CLI command line to run. "
"If you select WorkBench, a requester will let you select a command to run.")
(cat "MetaTool sucht nach der Dateiart (wie z.B. \"GUIDE\"), der entweder im Tooltype "
"oder der Befehlszeile steht und startet das entsprechende Programm für diese "
"Dateiart. Das Programm kann entweder ein CLI oder Workbench Befehl sein."
"\n\n"
"Wenn Sie CLI wählen, müssen Sie die CLI Befehlszeile eingeben. "
"Wenn Sie Workbench wählen, können Sie über einen Requester das Programm auswählen.")
(cat "MetaTool a seconda del tipo di file (es. \"GUIDE\") richiestogli dai parametri di una icona "
"o da una opzione di riga comandi, lancia un programma appropriato. "
" Si può specificare sia un comando CLI che un programma WorkBench."
"\n\n"
"Se scegli CLI, verrà chiesta la riga comandi CLI da eseguire. "
"Se scegli WorkBench, verrà chiesto il programma da lanciare.")))
(set ask_specify_Workbench_command
(select langval
(cat "Select Workbench command to run for file type")
(cat "Wählen Sie Workbench Befehl für Dateityp aus")
(cat "Scegli il comando Workbench da eseguire per il tipo di dati")))
(set help_specify_Workbench_command
(select langval
(cat "You can either accept the default command to run, or select/enter "
"another command to be run.")
(cat "Sie können entweder den voreigestellten Befehl annehmen, oder einen "
"anderen Befehl auswählen/eingeben.")
(cat "Puoi sia accettare il programma preimpostato o scegliere/inserire "
"un altro da lanciare.")))
(set ask_specify_CLI_command
(select langval
(cat "Enter a CLI command line to run for file type")
(cat "Geben Sie eine CLI Befehlszeile für diese Dateiart ein")
(cat "Introduci la riga comandi da eseguire per il tipo di dati")))
(set ask_specify_CLI_command_help
(select langval
(cat "\n\nSelect Help for more information.")
(cat "\n\nWählen Sie Hilfe für mehr Informationen.")
(cat "\n\nSeleziona Aiuto per maggiori informazioni.")))
(set help_specify_CLI_command
(select langval
(cat "Enter a CLI command to run, including any \"Execute\" if necessary. "
"Place a pair of square brackets (\"[]\") at the location in the "
"command line where the filename argument is to be inserted."
"\n\n"
"Example: \"Execute work:Players/PlayTunes []\"")
(cat "Geben Sie einen CLI Befehl ein, inklusive \"Execute\" falls nötig. "
"Setzen Sie ein paar eckige Klammern (\"[]\") an die Stelle in der "
"Befehlszeile, wo der Dateiname stehen soll."
"\n\n"
"Beispiel: \"Execute work:Players/PlayTunes []\"")
(cat "Inserisci un comando CLI da eseguire, compreso un eventuale "
"\"Execute\" se necessario. "
"Inserisci una coppia di parentesi quadre (\"[]\") nella posizione "
"della riga comandi in cui va copiato il nome del file."
"\n\n"
"Esempio: \"Execute work:Players/PlayTunes []\"")))
(set ask_remove_ixemul
(select langval
(cat "Remove obsolete ixemul.library version " ixver "." ixrev " from LIBS: "
"and flush from memory, so we can use the current version from this CD?")
(cat "Soll die alte ixemul.library Version " ixver ". " ixrev " aus LIBS: "
"gelöscht werden und aus dem Speicher entfernt werden, damit die aktuelle "
"Version von CD benutzt werden kann?")
(cat "Posso cancellar la vecchio versione ixemul.library " ixver "." ixrev" in LIBS: "
"e posso installare la nuova versione chi si trova su questo CD-ROM?")))
(set help_remove_ixemul
(select langval
(cat "The installation procedure has detected that you have obsolete "
"version "
ixver "." ixrev
" of ixemul.library installed in LIBS:. This may interfere "
"with proper operation of many programs on the GoldFish CD. Please "
"confirm whether to remove the old version or not. If you do, "
"the flushlibs program will be run to remove any traces of it from "
"memory.")
(cat "Die Installation hat entdeckt, dass Sie die alte Version "
ixver "." ixrev
"der ixemul.library in LIBS: installiert haben. Die kann zu Problemen "
"mit vielen Programmen auf der aktuellen GoldFish CD führen. Bestätigen "
"Sie bitte, ob die alte Version entfernt werden soll oder nicht. Falls ja "
"wird noch Flushlibs ausgeführt, um die Library aus dem Speicher zu entfernen.")
(cat "L'installazione ha trovato la vecchia versione "
ixver "." ixrev
"della ixemul.library nel LIBS:. Con qualche programmi saranno problemi "
"con questa versione. Qui poi cancellare la vecchia versione e installare "
"la nuova versione. Flushlibs sarebbe caricato per cancelare la libreria "
"nel ram.")))
(set ask_loop_requests
(select langval
(cat "When accessing material on this CD via the AmigaGuide interface, "
"you will be presented with a requester from which you can select "
"an operation to be performed. Do you want the requester to be presented "
"again after each operation completes? (We suggest NO)")
(cat "Beim Zugriff auf diese CD über das AmigaGuide Interface, erscheint "
"eine Meldung, indem ausgewählt werden kann, was gemacht werden soll "
"Möchten Sie, daß diese Meldung nach jeder abgeschlossenen Operartion "
"erneut erscheint (Empfehlung: NEIN?)")
(cat "Nell'accedere al materiale su questo CD attraverso l'interfaccia "
"AmigaGuide, apparirà un requester dal quale scegliere un'operazione "
"da eseguire. Vuoi che il requester appaia ogni volta che "
"un'operazione si conclude? (consigliato: NO)")))
(set help_loop_requests
(select langval
(cat "The AmigaGuide interface presents a requester with operations that "
"are specific to the material being accessed, such as 'read docs', "
"'install', 'run program', 'cancel'. The default is to perform "
"only the selected option and then exit."
"\n\n"
"If you wish, you can change the default so that the requester reappears "
"after each operation completes, until you explicitly cancel it. "
"You may find this behavior annoying after a while.")
(cat "Die AmigaGuide Oberfläche zeigt eine Meldung, die Operationen anzeigt, "
"die sich nach der Datei richten, die ausgewählt worden ist, so z.B. "
"'Doks lesen', 'Installieren', 'Programm starten', 'Abbruch'. Voreingestellt "
"ist, daß nur die ausgewählte Option ausgeführt wird und dann abgebrochen "
"wird."
"\n\n"
"Falls Sie möchten, können Sie die Voreinstellung ändern, so daß nach "
"jeder abgeschlossenen Operation erneut die Meldung erscheint, solange "
"bis Sie sie ausdrücklich abbrechen. "
"Dieses Verhalten mag Ihnen nach einer Weile auf die Nerven gehen.")
(cat "L'interfaccia AmigaGuide ha un requester che consente di effettuare "
"operazioni diverse a seconda del materiale a cui si accede, come "
"'leggi la documentazione', 'installa', 'lancia', 'annulla'. Normalmente "
"viene eseguita solo l'opzione scelta."
"\n\n"
"In alternativa si può far sì che il requester appaia dopo ogni "
"operazione, finché non si esce esplicitamente da esso. "
"Tale modo di operare può alla lunga risultare noioso.")))
)
; First set up defaults that we may need. We need to do this even if
; there is already an existing MetaTool prefs file, since some of these
; might not be in the file already.
;
; Note that for defaults, we assume that the paths are relative. This
; allows us to avoid putting volume name references for our CD into the
; commands, which is nasty because if someone runs this script again
; later with another CD, those volume references will cause a requester
; to insert the volume. This was first noticed when users ran the dacapo
; install script after having run the Meeting Pearls install script which
; generates a metatool.prefs file with absolute pathnames.
(procedure SetMetaToolDefaults
; Put default metatypes here, that apply to any version of the OS.
(if (= 1 debugflag) (debug "set default METATYPES"))
(set ANIM_METATYPE ":Useful/Sys/C/VT")
(set BMP_METATYPE ":Useful/Sys/C/JIV")
(set DIFF_METATYPE ":Useful/Sys/C/PlayDIFF")
(set EDIT_METATYPE "CLI Execute :Tools/Scripts/RunEmacs []")
(set HTML_METATYPE "CLI Execute :Tools/Scripts/RunMosaic []")
(set MAN_METATYPE ":Useful/Sys/C/Muchmore")
(set MED_METATYPE ":Useful/Sys/C/MultiPlayer")
(set MOD_METATYPE ":Useful/Sys/C/MultiPlayer")
(set MOVIE_METATYPE ":Useful/Sys/C/MoviePlayer")
(set S3M_METATYPE "CLI :Useful/Sys/C/HiP []")
(set SOURCE_METATYPE "CLI Execute :Tools/Scripts/RunEmacs []")
; Check for OS versions prior to KickStart/Workbench 2.04 Release.
(if (<= osver 36)
(
(if (= 1 debugflag) (debug "found Kickstart 2.0 prerelease or earlier"))
(set A8SVX_METATYPE "CLI :Useful/Sys/C/DSound []")
(set AIFF_METATYPE "CLI :Useful/Sys/C/NewZap []")
(set AU_METATYPE "CLI :Useful/Sys/C/NewZap []")
(set DVI_METATYPE "CLI :Useful/Sys/C/NewZap []")
(set EPS_METATYPE ":Useful/Sys/C/Muchmore")
(set EPSF_METATYPE ":Useful/Sys/C/Muchmore")
(set GIF_METATYPE ":Useful/Sys/C/Jiv")
(set GINFO_METATYPE "CLI :Useful/Sys/C/NewZap []")
(set GUIDE_METATYPE ":Useful/Sys/C/Muchmore")
(set ILBM_METATYPE ":Useful/Sys/C/Jiv")
(set JPEG_METATYPE ":Useful/Sys/C/Jiv")
(set PS_METATYPE ":Useful/Sys/C/Muchmore")
(set TEX_METATYPE ":Useful/Sys/C/Muchmore")
(set TEXT_METATYPE ":Useful/Sys/C/Muchmore")
(set VOC_METATYPE "CLI :Useful/Sys/C/NewZap []")
(set WAV_METATYPE "CLI :Useful/Sys/C/NewZap []")
)
)
(if (AND (> osver 36) (< osver 39))
(
(if (= 1 debugflag) (debug "found Kickstart 2.04 to 2.1"))
(set A8SVX_METATYPE "CLI :Useful/Sys/C/DSound []")
(set AIFF_METATYPE ":Useful/Sys/C/Play16")
(set AU_METATYPE ":Useful/Sys/C/Play16")
(set DVI_METATYPE ":Files/text/TeX/PasTeX/bin/ShowDVI")
(set EPS_METATYPE ":Useful/Sys/C/Muchmore")
(set EPSF_METATYPE ":Useful/Sys/C/Muchmore")
(set GIF_METATYPE ":Useful/Sys/C/JIV")
(set GINFO_METATYPE ":Useful/Sys/C/Muchmore")
(set GUIDE_METATYPE ":Useful/Sys/C/AmigaGuide")
(set ILBM_METATYPE ":Useful/Sys/C/JIV")
(set JPEG_METATYPE ":Useful/Sys/C/JIV")
(set PS_METATYPE ":Useful/Sys/C/Muchmore")
(set TEX_METATYPE ":Useful/Sys/C/Muchmore")
(set TEXT_METATYPE ":Useful/Sys/C/Muchmore")
(set VOC_METATYPE ":Useful/Sys/C/Play16")
(set WAV_METATYPE ":Useful/Sys/C/Play16")
)
)
(if (>= osver 39)
(
(if (= 1 debugflag) (debug "found Kickstart 3.0 or later"))
(set A8SVX_METATYPE "SYS:Utilities/MultiView")
(set AIFF_METATYPE "SYS:Utilities/MultiView")
(set AU_METATYPE "SYS:Utilities/MultiView")
(set DVI_METATYPE ":Files/text/TeX/PasTeX/bin/ShowDVI")
(set EPS_METATYPE "SYS:Utilities/MultiView")
(set EPSF_METATYPE "SYS:Utilities/MultiView")
(set GIF_METATYPE "SYS:Utilities/MultiView")
(set GINFO_METATYPE "SYS:Utilities/MultiView")
(set GUIDE_METATYPE "SYS:Utilities/MultiView")
(set ILBM_METATYPE "SYS:Utilities/MultiView")
(set JPEG_METATYPE "SYS:Utilities/MultiView")
(set PS_METATYPE "SYS:Utilities/MultiView")
(set TEX_METATYPE "SYS:Utilities/MultiView")
(set TEXT_METATYPE "SYS:Utilities/MultiView")
(set VOC_METATYPE "SYS:Utilities/MultiView")
(set WAV_METATYPE "SYS:Utilities/MultiView")
)
)
(if (= 1 debugflag) (debug "make and populate the ENV:MetaToolPrefs drawer"))
(if (AND (= 2 (exists "ENV:" (noreq)))
(= 0 (exists "ENV:MetaToolPrefs" (noreq))))
(makedir "ENV:MetaToolPrefs" (safe))
)
(textfile
(dest "ENV:MetaToolPrefs/8SVX")
(append A8SVX_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/AIFF")
(append AIFF_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/ANIM")
(append ANIM_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/AU")
(append AU_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/BMP")
(append BMP_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/DIFF")
(append DIFF_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/DVI")
(append DVI_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/EDIT")
(append EDIT_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/EPS")
(append EPS_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/EPSF")
(append EPSF_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/GIF")
(append GIF_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/GINFO")
(append GINFO_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/GUIDE")
(append GUIDE_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/HTML")
(append HTML_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/ILBM")
(append ILBM_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/JPEG")
(append JPEG_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/MAN")
(append MAN_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/MED")
(append MED_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/MOD")
(append MOD_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/MOVIE")
(append MOVIE_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/PS")
(append PS_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/S3M")
(append S3M_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/SOURCE")
(append SOURCE_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/TEX")
(append TEX_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/TEXT")
(append TEXT_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/VOC")
(append VOC_METATYPE)
)
(textfile
(dest "ENV:MetaToolPrefs/WAV")
(append WAV_METATYPE)
)
(if (= 1 debugflag) (debug "done building ENV:MetaToolPrefs defaults"))
)
; Get default values for the MetaTool.prefs file. If we can find an existing
; prefs file, then extract the default values for each METATYPE from that file.
; Otherwise, prepare suitable defaults based on the version of AmigaDOS that
; the user is running.
;
; This is kludgy because Installer doesn't provide any simple method of reading
; data in from an external file. We use a helper program that extracts all the
; metatypes and command lines from the preferences file, and stuffs them into
; environment variables in the ENV:MetaToolPrefs directory. We can then get the
; ones we are interested in via getenv, change them if necessary, and eventually
; rebuild the preferences files using all the extracted metatypes.
(procedure GetMetaToolPrefs
; Set a default for the name of the MetaTool prefs file.
(set metatoolprefs "S:MetaTool.prefs")
; Doing getenv on a non-existant env variable croaks the installer!
(if (exists "ENV:METACONFIG")
(
(set metaconfig (getenv "METACONFIG"))
(if (= 1 debugflag) (debug "ENV:METACONFIG contains " metaconfig))
; Make sure var is not empty before committing to it.
(if (<> 0 (strlen metaconfig))
(
(set metatoolprefs metaconfig)
)
)
)
)
(if (= 1 debugflag) (debug "use MetaTool prefs file " metatoolprefs))
; Allow average or expert user to select the MetaTool prefs file to read defaults from
; and to which the edited prefs will be written.
(if (> 0 @user-level)
(
; If a file does not currently exist, then the default filename
; used in the askfile command will NOT appear in the file requester.
; The "newpath" option would appear to be the solution for this, but
; no known installer accepts it. So we have to kludge around the problem
; by creating a temporary file that gets deleted after askfile completes.
(set deletefile "")
(if (= 0 (exists metatoolprefs))
(
(set deletefile metatoolprefs)
(if (= 1 debugflag) (debug "Create temporary " deletefile))
(textfile
(dest deletefile)
(append "delete me!")
)
)
)
(set metatoolprefs
(askfile
(prompt ask_select_metatoolprefs)
;;(newpath)
(default (expandpath metatoolprefs))
(help help_select_metatoolprefs)
)
)
(if (<> 0 (strlen deletefile))
(
(if (= 1 debugflag) (debug "Delete temporary " deletefile))
(delete deletefile)
)
)
)
)
(if (= 1 debugflag) (debug "Will use MetaTool prefs file " metatoolprefs))
; If there is an existing MetaTool prefs file, get defaults from it, overriding
; any existing defaults we may have set up.
(if (exists metatoolprefs (noreq))
(
(set commandline ("%s %s" MetaToolPrefs2Env metatoolprefs))
(if (= 1 debugflag) (debug "running " commandline))
(run commandline (safe))
)
)
)
; Edit the MetaTool prefs that are stored in the ENV:MetaToolPrefs drawer.
; Each one can be either a CLI command or a WorkBench command.
(procedure EditMetaToolPrefs
(foreach "ENV:MetaToolPrefs" "#?"
(if (= 1 debugflag) (debug "edit METATYPE " @each-name))
(set envvar ("%s/%s" "MetaToolPrefs" @each-name))
(set metacommand (getenv envvar))
(if (= (substr metacommand 0 4) "CLI ")
(
(set CLIcommand 1)
(set metacommand (substr metacommand 4))
)
(
(set CLIcommand 0)
)
)
(if (= 1 debugflag) (debug "CLIcommand is " CLIcommand "metacommand is " metacommand))
(set CLIcommand
(askchoice
(prompt ("%s %s?" ask_cli_or_workbench @each-name))
(help help_cli_or_workbench)
(choices "WorkBench" "CLI")
(default CLIcommand)
)
)
(if (= CLIcommand 0)
(
(set metacommand
(askfile
(prompt ("%s %s" ask_specify_Workbench_command @each-name))
(help help_specify_Workbench_command)
;;(newpath)
(default metacommand)
)
)
(run ("SetEnv MetaToolPrefs/%s \"%s\"" @each-name metacommand) (safe))
)
(
(set metacommand
(askstring
(prompt ("%s %s. %s" ask_specify_CLI_command @each-name ask_specify_CLI_command_help))
(help help_specify_CLI_command)
(default metacommand)
)
)
(run ("SetEnv MetaToolPrefs/%s \"CLI %s\"" @each-name metacommand) (safe))
)
)
)
)
; Using the MetaTool prefs stored in individual environment variables in ENV:MetaToolPrefs,
; rebuild a MetaTool prefs file and write it to the previously selected destination file.
(procedure RebuildMetaToolPrefs
(foreach "ENV:MetaToolPrefs" "#?"
(if (= 1 debugflag) (debug "found METATYPE " @each-name))
(set envvar ("%s/%s" "MetaToolPrefs" @each-name))
(set metacommand (getenv envvar))
(set prefs (cat prefs ("%s\t%s\n" @each-name metacommand)))
)
(textfile
(dest tmpprefs)
(append prefs)
)
; If not novice mode then ask user if OK to install new
; MetaTool prefs permanently.
(if (= 0 @user-level)
(set updateprefs 0)
(set updateprefs
(askbool
(prompt ask_update_metatoolprefs)
(help help_update_metatoolprefs)
(choices yes no)
(default 1)
)
)
)
(if (= 1 debugflag) (debug "update prefs selection is " updateprefs))
(if (= 0 updateprefs)
(set metatoolprefs ramprefs)
)
; Set METACONFIG environment variable to point to whereever
; we have selected the MetaTool prefs file to be.
(if (= 1 debugflag) (debug "set METACONFIG to " metatoolprefs))
(run ("SetEnv METACONFIG \"%s\"" metatoolprefs))
; Delete any old backup file and rename the current prefs file
; (if any) to a backup file.
(set prefsbackup ("%s.bak" metatoolprefs))
(if (= 1 debugflag) (debug "create backup file" prefsbackup))
(delete prefsbackup)
(rename metatoolprefs prefsbackup)
; Install the new prefs file. Note that this is such a small file that there is
; no sense in flashing the copy gauge at the user, who probably won't have time
; to read it anyway.
(if (= 1 debugflag) (debug "copy " tmpprefs " to " metatoolprefs))
(copyfiles
(source tmpprefs)
(dest (pathonly metatoolprefs))
(files)
(nogauge)
(delopts fail)
(optional nofail force)
)
; Note METACONFIG is optionally copied to ENVARC: later.
)
(procedure UpdateEnvArc
; If not novice mode then ask user if OK to preserve environment variables.
(if (= 1 debugflag) (debug "begin procedure UpdateEnvArc"))
(if (= 0 @user-level)
(set update_envarc 0)
(set update_envarc
(askbool
(prompt ask_update_envarc)
(help help_update_envarc)
(choices yes no)
(default 1)
)
)
)
(if (= 1 debugflag) (debug "update envarc: selection is " update_envarc))
(if (= 1 update_envarc)
(
(if (= 1 debugflag) (debug "copy ENV:METACONFIG and ENV:RDE#? files to ENVARC:"))
(copyfiles
(source "ENV:")
(prompt "Copy ENV: -> ENVARC: ?")
(help "")
(pattern "(METACONFIG|RDE_#?)")
(dest "ENVARC:")
(files)
(confirm)
(delopts fail)
(optional nofail force)
)
)
)
(if (= 1 debugflag) (debug "end procedure UpdateEnvArc"))
)
; First we set the defaults that we suggest for the user, then we override
; them in the environment variables with what the user currently has in his
; MetaTool prefs file.
;
; Then, for each METATYPE in the ENV:MetaToolPrefs directory, any which might
; have come from our internal defaults or the preferences file, we allow the
; user to either select the default in ENV:MetaToolsPrefs, select our internal
; default, or change to an entirely different command.
(procedure Main
; Set debugflag to 0 for no debugging or 1 to enable debug messages.
; Thus you can enable debugging with a single change to this file.
(set debugflag 0)
; Set some defaults for various things.
; Use an explicit volname which allows this installer script to reside anywhere.
(set volname "GoldFish-Vol3")
; This sets names of any temporary files used. Note that we create a special
; directory that is deleted after we are done, into which all the temporary
; files are stored. This is so that we can use the actual names of files
; that we want to create, so that "newname" is not necessary in any copyfiles,
; since the confirmation requester does not take into account the new name.
(set tmpdir "ram:GoldFish")
(set tmpfile ("%s/%s" tmpdir "GoldFish.tmp"))
(set tmpprefs ("%s/%s" tmpdir "MetaTool.prefs"))
(set ramprefs "ram:MetaTool.prefs")
(set UsefulStartup ("%s:Useful/sys/s/Useful-Startup" volname))
(set GFCDstartup ("%s:Useful/sys/s/FFCD-Startup" volname))
; Set RDE_* environment variables
(run ("SetEnv RDE_HEADER \"%s\"" ("%s:Tools/scripts/RDE.header" volname)))
(run ("SetEnv RDE_DEFAULT \"%s\"" ("%s:Tools/scripts/RDE.default" volname)))
(run ("SetEnv RDE_TRAILER \"%s\"" ("%s:Tools/scripts/RDE.trailer" volname)))
(run ("SetEnv RDE_LOOP \"no\""))
; This tool parses the MetaTool prefs file and creates environment variables that
; match each METATYPE.
(set MetaToolPrefs2Env ("%s:%s" volname "Tools/MetaTool/MetaToolPrefs2Env"))
; Find out some environment stuff.
(set osver (/ (getversion) 65536))
; If we abort, delete the entire MetaTool prefs directory that we created in
; ENV: and the temporary directory. Note that since a "delete ... all" is
; such a dangerous command, we explicitly name the targets here, rather than
; allowing a substitution of "tmpdir" for example. Paranoia rules...
(onerror (run ("delete ENV:MetaToolPrefs ram:GoldFish all") (safe)))
; Set @default-dest as the location for the log file.
(set @default-dest "ram:")
; Create the temporary directory.
(makedir tmpdir (safe))
; The real work starts here. Select the language to use.
(SelectLanguage)
(complete 10)
(message msg_hello)
(RunStartups)
(complete 20)
(Options)
(complete 30)
(SetMetaToolDefaults)
(complete 40)
(GetMetaToolPrefs)
(complete 60)
(if (= 2 @user-level)
(EditMetaToolPrefs)
)
(complete 80)
(RebuildMetaToolPrefs)
(UpdateEnvArc)
(complete 100)
(run ("delete ENV:MetaToolPrefs ram:GoldFish all") (safe))
)
(Main)