home *** CD-ROM | disk | FTP | other *** search
- ; $Id$
- ; Dies ist das Install-Programm für MakeCD.
- ; MakeCD ist aber auch direkt von Diskette lauffähig.
- ; $VER: Install-MakeCD 1.0 (9.11.96)
-
-
-
- (procedure P_GET_LANG_FROM_ENV
- (
- (if (exists "ENV:Language")
- (if (patmatch (getenv "language") txt_lang_0)
- 0
- (if (patmatch (getenv "language") txt_lang_1)
- 1
- 1
- )
- )
- (if (patmatch @language txt_lang_0)
- 0
- (if (patmatch @language txt_lang_1)
- 1
- 1
- )
- )
- )
- )
- )
-
-
-
- (procedure P_SELECT_LANGUAGE
- (
- (set txt_lang_0 "Deutsch") (set txt_langdir_0 "deutsch")
- (set txt_lang_1 "English") (set txt_langdir_1 "english")
- (set txt_lang_2 "Français") (set txt_langdir_2 "français")
- (set txt_lang_3 "Italiano") (set txt_langdir_3 "italiano")
- (set txt_lang_4 "Nederlands") (set txt_langdir_4 "nederlands")
- (set txt_lang_5 "Norsk") (set txt_langdir_5 "norsk")
- (set txt_lang_6 "Suomi") (set txt_langdir_6 "suomi")
- (set txt_lang_7 "Svenska") (set txt_langdir_7 "svenska")
- (set txt_lang_8 "") (set txt_langdir_8 "")
- (set txt_lang_9 "") (set txt_langdir_9 "")
-
- (set numlangs 2)
-
- (if (AND (= 0 origuserlevel) (exists "ENV:Language"))
- (
- (set langnum P_GET_LANG_FROM_ENV)
- )
- (
- (user 2)
- (set langnum
- (askchoice
- (prompt "Choose the language to be used in this installer script.")
- (help "Please select your favourite language.\n\n" "Bitte wählen Sie ihre bevorzugte Sprache.")
- (choices
- txt_lang_0
- txt_lang_1
- )
- (default
- P_GET_LANG_FROM_ENV
- )
- )
- )
- (user origuserlevel)
- )
- )
-
- (if (= langnum 0) (set langstring txt_lang_0))
- (if (= langnum 1) (set langstring txt_lang_1))
- (if (= langnum 2) (set langstring txt_lang_2))
- (if (= langnum 3) (set langstring txt_lang_3))
- (if (= langnum 4) (set langstring txt_lang_4))
- (if (= langnum 5) (set langstring txt_lang_5))
- (if (= langnum 6) (set langstring txt_lang_6))
- (if (= langnum 7) (set langstring txt_lang_7))
- (if (= langnum 8) (set langstring txt_lang_8))
- (if (= langnum 9) (set langstring txt_lang_9))
-
- (if (not (exists "ENV:Language"))
- (
- (run ("%s%s" "setenv Language " langstring))
- )
- )
-
-
- ; Set default strings
-
- (set #yes_answer
- ("%s"
- "Yes"
- )
- )
- (set #no_answer
- ("%s"
- "No"
- )
- )
- (set #choose_yes_or_no
- ("%s"
- "Please chose \"Yes\" or \"No\"."
- )
- )
- (set #warning_old_os
- (
- "%s%s"
- "Please update the operating system. "
- "MakeCD requires OS 2.04."
- )
- )
- (set #intro_msg
- ("%s%s%s"
- "Welcome at the MakeCD installation!\n\n"
- "Although MakeCD is able to run without further installation, you might want to "
- "copy it to your hard disk. This script will help you doing this."
- )
- )
- (set #select_dest_dir
- ("%s%s"
- "Please select the destination directory for MakeCD. "
- "The \"MakeCD\" directory will be created automatically."
- )
- )
- (set #which_languages_to_install
- ("%s"
- "Which languages do you want to install?"
- )
- )
- (set #install_developer
- ("%s%s%s%s%s"
- "Do you want to install developer material? This material "
- "describes all you have to know about SUSP (System Use "
- "Sharing Protocol), RRIP (Rock Ridge Interchange Protocol) "
- "and about the support of Amiga protection bits and file "
- "comments on CD-ROM."
- )
- )
- (set #cannot_find_lang_docs
- ("%s%s"
- "Sorry, cannot find any docs for language \"%s\".\n\n"
- "Installation of the docs of this language skipped."
- )
- )
- (set #cannot_find_lang_catalogs
- ("%s%s"
- "Sorry, cannot find any catalogs for language \"%s\".\n\n"
- "Installation of the catalogs of this language skipped."
- )
- )
- (set #copying_files
- ("%s"
- "Please stand by while copying ..."
- )
- )
- (set #select_drivers
- ("%s"
- "Please select the drivers to install."
- )
- )
- (set #copy_libs
- ("%s"
- "MakeCD requires triton.library V6."
- )
- )
-
-
- ; Hier folgen die Strings, die für die deutsche Übersetzung benötigt
- ; werden. Bei Übersetzungen in andere Sprachen einfach den folgenden
- ; Block komplett kopieren und die Texte ändern. Die Steuerzeichen
- ; sollten unverändert bleiben. Wer irgendwo eine Zeile hinzufügen oder
- ; löschen möchte, muß dir Anzahl der "%s" entsprechend anpassen - für
- ; jede Zeile steht ein "%s".
-
- (if (patmatch langstring "Deutsch")
- (
- (set #yes_answer
- "Ja"
- )
- (set #no_answer
- "Nein"
- )
- (set #choose_yes_or_no
- ("%s"
- "Wählen Sie bitte \"Ja\" oder \"Nein\"."
- )
- )
- (set #warning_old_os
- (
- "%s%s"
- "Bitte bringen Sie Ihr Betriebssystem auf den neuesten Stand. "
- "MakeCD funktioniert erst ab OS 2.04."
- )
- )
- (set #intro_msg
- ("%s%s%s"
- "Willkommen zur MakeCD Installation!\n\n"
- "MakeCD ist zwar auch ohne weitere Installation lauffähig, aber Sie werden es sicherlich "
- "auch auf Festplatte installieren wollen. Dabei hilft Ihnen dieses Skript."
- )
- )
- (set #select_dest_dir
- ("%s%s"
- "Bitte wählen Sie das Verzeichnis, in dem Sie MakeCD installieren möchten. "
- "Ein Verzeichnis \"MakeCD\" wird automatisch angelegt."
- )
- )
- (set #which_languages_to_install
- ("%s"
- "Welche Sprachen möchten Sie installieren?"
- )
- )
- (set #install_developer
- ("%s%s%s%s%s"
- "Möchten Sie die Dateien für Entwickeler installieren? Diese "
- "Dateien beschreiben alles, was Sie über SUSP (System Use "
- "Sharing Protocol), RRIP (Rock Ridge Interchange Protocol) "
- "und über die Unterstützung von Amiga Protection Bits and Datei-Kommentaren "
- "auf CD-ROMs wissen müssen."
- )
- )
- (set #cannot_find_lang_docs
- ("%s%s"
- "Die Anleitung für die Sprache \"%s\" kann leider nicht gefunden werden.\n\n"
- "Die Installation der Anleitung dieser Sprache wurde übersprungen."
- )
- )
- (set #cannot_find_lang_catalogs
- ("%s%s"
- "Der Katalog für die Sprache \"%s\" kann leider nicht gefunden werden.\n\n"
- "Die Installation des Katalogs dieser Sprache wurde übersprungen."
- )
- )
- (set #copying_files
- "Kopiere ... Bitte etwas Geduld."
- )
- (set #select_drivers
- "Welche Treiber möchten Sie installieren?"
- )
- (set #copy_libs
- "MakeCD benötigt triton.library V6."
- )
- )
- )
- )
- )
-
-
-
- (procedure P_SET_GLOBALS
- (
- (set osversion (/ (getversion) 65536))
- (set volname (expandpath (":")))
- (set origuserlevel @user-level)
- )
- )
-
-
-
- (procedure P_WARN_OLD_OS
- (
- (if (< osversion 37)
- (
- (user 2)
- (message
- #warning_old_os
- )
- (user origuserlevel)
- )
- )
- )
- )
-
-
-
- (procedure P_SELECT_DEST
- (
- (set destdir
- (tackon
- (askdir
- (prompt #select_dest_dir)
- (help @askdir-help)
- (default @default-dest)
- )
- "MakeCD"
- )
- )
- )
- )
-
-
-
- (procedure P_SELECT_INSTALL_LANG
- (
- (set i 0)
- (set langbits 0)
- (while (< i numlangs)
- (
- (set thislangdir (select i txt_langdir_0 txt_langdir_1 txt_langdir_2 txt_langdir_3 txt_langdir_4 txt_langdir_5 txt_langdir_6 txt_langdir_7 txt_langdir_8 txt_langdir_9))
- (set langbits
- (if
- (OR
- (OR
- (= 1 (exists ("doc_%s.lha" thislangdir)))
- (= 2 (exists (tackon "Catalogs" thislangdir)))
- )
- (= 2 (exists thislangdir))
- )
- ( ; then
- (+ langbits (shiftleft 1 i))
- )
- ( ; else
- (+ langbits 0)
- )
- )
- )
- (set i (+ i 1))
- )
- )
-
-
- (set langbits
- (askoptions
- (prompt #which_languages_to_install)
- (help @askoptions-help)
- (choices txt_lang_0 txt_lang_1)
- (default langbits)
- )
- )
- )
- )
-
-
-
- (procedure P_ASK_INSTALL_DEVELOPER
- (
- (set installdev
- (askbool
- (prompt #install_developer)
- (choices #yes_answer #no_answer)
- (help #choose_yes_or_no)
- (default 0)
- )
- )
- )
- )
-
-
-
- (procedure P_COPY_LANGUAGES
- (
- (set i 0)
- (while (< i numlangs)
- (
- (set thislang (select i txt_lang_0 txt_lang_1 txt_lang_2 txt_lang_3 txt_lang_4 txt_lang_5 txt_lang_6 txt_lang_7 txt_lang_8 txt_lang_9))
- (set thislangdir (select i txt_langdir_0 txt_langdir_1 txt_langdir_2 txt_langdir_3 txt_langdir_4 txt_langdir_5 txt_langdir_6 txt_langdir_7 txt_langdir_8 txt_langdir_9))
- (if (IN langbits i)
- (
- (if (= 2 (exists thislangdir))
- (
- (copyfiles
- (source "")
- (dest destdir)
- (pattern ("%s#?" thislangdir))
- (optional force)
- )
- )
- (
- (if (= 1 (exists ("doc_%s.lha" thislangdir)))
- (
- (if (= 1 (exists "lhex"))
- (
- (run ("lhex -afFqw=%s e doc_%s.lha" destdir thislangdir))
- )
- (
- (message ("LhA -a -m -M x doc_%s.lha %s/" thislangdir destdir))
- (run ("LhA -a -m -M x doc_%s.lha %s/" thislangdir destdir))
- )
- )
- )
- (
- (message (#cannot_find_lang_docs thislang))
- )
- )
- )
- )
- (if (= 2 (exists (tackon "Catalogs" thislangdir)))
- (
- (copyfiles
- (source "Catalogs")
- (dest (tackon destdir "Catalogs"))
- (pattern thislangdir)
- (optional force)
- )
- (copyfiles
- (source "Catalogs")
- (dest (tackon destdir "Catalogs"))
- (pattern ("%s.info" thislangdir))
- (optional force)
- )
- )
- ( ; else
- (if (NOT (patmatch "english" thislangdir)) ; nicht English
- (
- (message (#cannot_find_lang_catalogs thislang))
- )
- )
- )
- )
- )
- )
- (set i (+ i 1))
- )
- )
- )
- )
-
-
-
- (procedure P_CREATE_DIRS
- (
- (if (NOT (exists destdir))
- (
- (makedir
- destdir
- (infos)
- )
- )
- )
-
- (if (NOT (exists (tackon destdir "Modules")))
- (
- (makedir
- (tackon
- destdir
- "Modules"
- )
- )
- )
- )
-
- (if (NOT (exists (tackon destdir "Modules/SCSIDrivers")))
- (
- (makedir
- (tackon
- destdir
- "Modules/SCSIDrivers"
- )
- )
- )
- )
-
- (if (NOT (exists (tackon destdir "Catalogs")))
- (
- (makedir
- (tackon
- destdir
- "Catalogs"
- )
- )
- )
- )
- )
- )
-
-
-
- (procedure P_COPY_FILES
- (
- (copyfiles
- (prompt #copying_files)
- (choices "MakeCD" "MakeCD.info" "ReadMe" "ReadMe.info" "Modules.info" "Catalogs.info")
- (help @copyfiles-help)
- (source "")
- (dest destdir)
- (optional force)
- )
-
- (copyfiles
- (prompt #copying_files)
- (help @copyfiles-help)
- (choices "makecdromfs.module" "SCSISupport.module" "SCSIDrivers.info")
- (source "Modules")
- (dest (tackon destdir "Modules"))
- (optional force)
- )
-
- (if (= 1 installdev)
- (
- (copyfiles
- (prompt #copying_files)
- (help @copyfiles-help)
- (pattern "Developer#?")
- (source "")
- (dest destdir)
- (optional force)
- )
- )
- )
- )
- )
-
-
-
- (procedure P_COPY_DRIVERS
- (
- (copyfiles
- (prompt #select_drivers)
- (help @copyfiles-help)
- (pattern "#?")
- (source "Modules/SCSIDrivers")
- (dest (tackon destdir "Modules/SCSIDrivers"))
- (confirm)
- (optional force)
- )
- )
- )
-
-
-
- (procedure P_COPY_LIBS
- (
- (copylib
- (prompt #copy_libs)
- (help #copy_libs)
- (confirm)
- (source "triton.library")
- (dest "LIBS:")
- )
- )
- )
-
-
- (complete 5)
- (P_SET_GLOBALS)
- (complete 10)
- (P_SELECT_LANGUAGE)
- (complete 15)
- (P_WARN_OLD_OS)
- (complete 20)
- (message #intro_msg)
- (complete 25)
- (P_SELECT_DEST)
- (complete 30)
- (P_SELECT_INSTALL_LANG)
- (complete 35)
- (P_ASK_INSTALL_DEVELOPER)
- (complete 40)
- (P_CREATE_DIRS)
- (complete 45)
- (P_COPY_LANGUAGES)
- (complete 60)
- (P_COPY_FILES)
- (complete 80)
- (P_COPY_DRIVERS)
- (complete 90)
- (P_COPY_LIBS)
- (complete 99)
-
- (set @default-dest destdir)
-
- (complete 100)
-