home *** CD-ROM | disk | FTP | other *** search
- ; Installation script for TurboPrint Professional 4.0
- ; (C) 1995 IrseeSoft
- ;
- ;
- ; $VER: TurboPrint Professional 4.00 (22.05.95)
- ;
- ;
- ; "Install TurboPrint" operationMode = 0
- ; "Update TurboPrint" operationMode = 1
- ; "Remove TurboPrint" operationMode = 2
- ; "Query TurboPrint Version" operationMode = 3
- ;
- ; TODO
- ;
- ; String constants section. All messages and strings appear in this section
- ; for easier translation into foreign languages.
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;
- ; LANGUAGE SECTION
- ;
- ; to support more than only one language, there is a special section for
- ; each supported language.
- ;
-
- (if (<> @language "english")
- ((if (<> @language "deutsch")
- ( set @language "english")
- )
- ))
- (set #tp-version "TurboPrint Professional 4.00 (22.05.95)" )
-
- (set #introduction
- (cat "\nInstallation von TurboPrint Professional 4.0\n"
- " Copyright © 1988-1995 IrseeSoft SPCS\n\n"
- "Bitte wählen Sie:\n\n"
- )
- )
-
- (set #introduction-help
- (cat "Neu installieren von TurboPrint:\n"
- "Die TurboPrint Software wird auf Ihre Festplatte kopiert. "
- "Wählen Sie diese Option, falls noch keine ältere Version "
- "von TurboPrint auf Ihrer Festplatte installiert war.\n\n"
- "Update installieren:\n"
- "Eine bereits auf der Platte befindliche alte Version von "
- "TurboPrint wird durch TurboPrint Professional 4.0 ersetzt. "
- "Dazu werden nicht mehr benötigte Dateien der alten Version "
- "gelöscht.\n\n"
- "Entfernen von der Platte:\n"
- "Das TurboPrint Verzeichnis wird von der Platte gelöscht, "
- "Einträge in der user-startup und im WBStartup-Verzeichnis "
- "werden entfernt.\n\n"
- "Version:\n"
- "Die Versionsnummern von Kickstart, Workbench und TurboPrint "
- "werden angezeigt.\n\n"
- )
- )
-
- (set #need-os2
- (cat "\nTurboPrint Professional 4.0 benötigt Kickstart 2.04 oder höher\n"
- "Um TurboPrint Professional 4.0 zu verwenden, müssen Sie Ihren "
- "Amiga auf Betriebssystem 2.04 (oder 3.1) umrüsten.\n"
- "Umrüstkits (Kickstart-ROM + Workbench-Disketten) "
- "sind im Fachhandel oder Versandhandel erhältlich.\n"
- "Als Übergangslösung empfehlen wir die Verwendung von "
- "TurboPrint 3.0.\n"
- )
- )
-
- (set #install "Neu installieren von TurboPrint")
- (set #update "Update installieren")
- (set #remove "Entfernen von der Platte")
- (set #version "Versionsnummer anzeigen")
-
- ; additional help to the built-in one
- (set #generic-help
- (cat "Bitte lesen Sie auch die ReadMe-Datei auf dieser Diskette!\n"
- )
- )
-
- (set #which-printer
- (cat "Bitte wählen Sie Ihren Drucker aus\n(oder wählen Sie"
- "'Hilfe', falls Ihr Drucker nicht aufgelistet ist)\n")
- )
- (set #help-printer
- (cat "Falls Ihr Drucker nicht namentlich aufgelistet ist, "
- "sehen Sie bitte in Ihrem Drucker-Handbuch nach, welche "
- "Emulationen Ihr Drucker unterstützt und wählen den "
- "entsprechenden TurboPrint-Treiber "
- "(z.B. Epson LQ2550 -> Epson_LQ,SQxx50 in TurboPrint) "
- "oder wählen Sie einen der folgenden Einträge: \n"
- "'.24-Nadel', '.9-Nadel', '.Laser', "
- "'.Tinte-HP-kompatibel', '.Tinte-Epson-kompatibel'\n\n"
- "Sie können auch nach der Installation jederzeit weitere "
- "Treiber auswählen.\n\n" )
- )
-
- (set #another-printer
- (cat "Wollen Sie einen weiteren Drucker installieren?\n"
- "Bisher installierte Drucker:\n\n" )
- )
-
- (set #ask-priyes "Ja")
- (set #ask-prino "Nein")
-
- (set #remove-drivers
- (cat "\nSie haben 'TurboPrint von der Platte entfernen' gewählt.\n"
- "Dabei wird die TurboPrint-Schublade komplett von der Festplatte "
- "gelöscht. Bitte vergewissern Sie sich, ob sich darin noch "
- "von Ihnen benötigte Programme oder Dateien befinden!\n"
- )
- )
-
- (set #update-drivers
- (cat "\nBeim Update werden alle Dateien gelöscht, die "
- "sich momentan in den Verzeichnissen "
- "'Printers', 'Configs' und 'Turbo' innerhalb der TurboPrint "
- "Schublade befinden.\n"
- "z.B. auch alte Druckertreiber und Konfigurationsdateien.\n"
- "Falls Sie das nicht wollen, wählen Sie bitte "
- "'Installation abbrechen'."
- )
- )
-
- (set #removing-drivers
- (cat "\nTurboPrint wird von Ihrer Festplatte entfernt..."
- )
- )
- (set #removing-TurboPrefs
- (cat "Falls die startup-sequence/user-startup durch das TurboPrint "
- "Installationsprogramm geändert wurde, wird dies nun "
- "automatisch rückgängig gemacht."
- )
- )
- (set #adding-TurboPrefs
- (cat "Die user-startup Datei wird um den Befehl \n"
- "'Assign TurboPrint: <pfad>:TurboPrint' \n"
- "erweitert."
- )
- )
-
- (set #ask-wbstart20
- (cat "Sie können TurboPrint beim Rechnerstart automatisch installieren "
- "lassen. Dazu wird ein Startprogramm in die WBStartup-Schublade "
- "kopiert.\n"
- "Sie können den Autostart jederzeit wieder entfernen, indem Sie "
- "das Icon 'TurboStart' aus der WBStartup-Schublade herausnehmen.\n"
- )
- )
- (set #wbstart-help
- (cat "Autostart installieren:\n"
- "Beim Einschalten des Rechners oder nach einem Reset wird "
- "TurboPrint automatisch geladen. Dies ist sinnvoll, wenn "
- "Sie meistens TurboPrint-Treiber anstelle der Workbench-Druckertreiber "
- "verwenden wollen. Um wieder auf die Workbench-Treiber "
- "zurückzuschalten, verwenden Sie das Programm 'NoTurbo'.\n\n"
- "Kein Autostart:\n"
- "TurboPrint muß nach dem Einschalten mit Hilfe von TurboPrefs "
- "geladen werden. Diese Option ist sinnvoll, wenn Sie "
- "in der Regel mit den Workbench-Treibern arbeiten und nur "
- "bei Bedarf auf die TurboPrint-Treiber umschalten wollen.\n\n"
- )
- )
-
- (set #ask-wbyes "Autostart installieren" )
-
- (set #ask-wbno "Kein Autostart" )
-
- (set #ask-printmanager
- (cat "Wollen Sie das Grafik Anzeige- und Druckprogramm "
- "DruckManager installieren?"
- )
- )
-
- (set #ask-pmyes "DruckManager installieren" )
-
- (set #ask-pmno "Nicht installieren" )
-
- (set #ask-pictures
- (cat "Wollen Sie die Demo-Bilder auf die Festplatte kopieren?" )
- )
-
- (set #ask-piyes "Bilder kopieren" )
-
- (set #ask-pino "Nicht kopieren" )
-
- (set #version-info "\nInformation über Ihr System:\n")
- (set #system-version-info "Kickstart %ld.%ld, Workbench %ld.%ld\n")
-
-
- (set #installation-done
- (cat "Die Installation von TurboPrint ist abgeschlossen.\n"
- "Entfernen Sie nun bitte Ihre TurboPrint-Diskette und Starten "
- "Sie Ihren Amiga neu."
- )
- )
-
- ; General initialisation of internal states, options and pre-defined
- ; variables go here.
-
- (delopts askuser)
-
- ; Check whether this system is operating with at least Workbench 2.04 (V37).
- ; This is needed for the WBStartup feature and the Printmanager
-
- (set kickVersion (shiftright (getversion) 16))
-
- (set wbVersion (shiftright (getversion "LIBS:version.library") 16))
-
- ; set source directory
-
- (set sourcedir (pathonly @icon))
-
- ;
- (if (< wbVersion 37)
- (
- (message #need-os2)
- (exit (quiet))
- )
- )
- ;
- (welcome)
-
- ; remember current user level
-
- (set old-level @user-level)
-
- ; Introduce ourself to the user. Query whether the software shall be
- ; installed/updated or removed altogether.
-
- (set operationMode
- (askchoice
- (prompt #introduction)
- (choices #install #update #remove #version)
- (help #generic-help #introduction-help @askchoice-help)
- )
- )
-
- ; Show version number
-
- (if (= operationMode 3)
- (
- ; Find out the version of the Kickstart and Workbench and append it to the
- ; version information string.
-
- (run (cat (tackon sourcedir "c/Version") " >ENV:VERINFO"))
- (set #version-info (cat #version-info (getenv "VERINFO")))
- (delete "ENV:VERINFO")
-
- ; Get the version string from this installer script itself!
-
- (set #version-info (cat #version-info #tp-version))
- (delete "ENV:TPINFO")
-
-
- (message #version-info)
- (exit (quiet))
- )
- )
-
- ; Get path of TurboPrint
- ; Set the prompt depending on operationMode
-
- (if (= operationMode 0)
-
- (set #path-prompt (cat "In welchem Verzeichnis soll das TurboPrint-Verzeichnis "
- "erstellt werden?")
- )
- )
-
- (if (= operationMode 1)
-
- (set #path-prompt (cat "Wo befindet sich das TurboPrint-Verzeichnis, "
- "in welches das Update installiert werden soll?")
- )
- )
-
- (if (= operationMode 2)
-
- (set #path-prompt (cat "Wo befindet sich das TurboPrint-Verzeichnis, "
- "das entfernt werden soll?")
- )
- )
-
-
- ; ask for the destination directory
-
- (if (not (exists "Work:"))
- (user 1)
- )
-
- (set target
- (askdir (prompt #path-prompt)
- (help #generic-help @askdir-help)
- (default "Work:") )
- )
-
- (user old-level)
-
- ; do some cleanup if there was an old version of tp installed
- ; - no questions aked -
- ; try to remove TurboPrint
-
- (run (cat (tackon sourcedir "NoTurbo") " -q"))
-
- ; Update TurboPrint => remove contents of Printers, Configs and Turbo drawers
-
- (if (= operationMode 1)
- (
- (message #update-drivers)
-
- (delete (tackon target "TurboPrint/TurboPrefs"))
- (delete (tackon target "TurboPrint/TurboPrefs.info"))
- (delete (tackon target "TurboPrint/NoTurbo"))
- (delete (tackon target "TurboPrint/NoTurbo.info"))
-
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint/Printers/#?") "\" all"))
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint/Configs/#?") "\""))
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint/Turbo/#?") "\""))
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint/Colors/#?") "\""))
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint/Drivers/#?") "\""))
- )
- )
-
- ; Remove TurboPrint => remove TurboPrint drawer completely
-
- (if (= operationMode 2)
- (
- (message #remove-drivers)
- (working #removing-drivers)
-
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TurboPrint") "\" all"))
-
- ;Remove TurboStart in WBStartup
-
- (delete "sys:WBStartup/TurboStart.info")
-
- ;Remove TurboPrefs in Prefs
-
- (delete "sys:Prefs/TurboPrefs.info")
-
- ;Inform user
-
- (startup "TurboPrint"
- (prompt #removing-TurboPrefs)
- (help #generic-help @startup-help)
- )
- )
- )
-
- ;if install or update
-
- (if (or (= operationMode 0) (= operationMode 1) )
- (
-
- ;Personalisierung
-
- (run (cat (tackon sourcedir "Extra/Personalisierung") " -q"))
-
-
- ;Make TurboPrint drawer
- (makedir (tackon target "TurboPrint") (infos))
-
- ;Copy printer stuff
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Printers"))
- (dest (tackon target "TurboPrint/Printers"))
- (all)
- )
-
- ;Choose default printer(s)
-
- (set printer-copy 1)
-
- (user 1)
-
- (while (= 1 printer-copy)
- (
-
- (set printer-name
- (askfile (prompt #which-printer)
- (help #help-printer @askfile-help)
- (default (tackon target "TurboPrint/Printers"))
- )
- )
-
- (if ( = (tackon target "TurboPrint/Printers") (pathonly printer-name) )
- (
- (set printer-name (fileonly printer-name))
-
- (set printer-name (substr printer-name 0 ( - (strlen printer-name) 4) ))
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Configs/_Dummy_"))
- (dest (tackon target "TurboPrint/Configs" ))
- (newname (cat printer-name ".tpc") )
- )
-
- (set printer-list (cat printer-list printer-name "\n"))
-
- (set printer-copy (askbool (prompt (cat #another-printer printer-list) )
- (help @askchoice-help)
- ))
- )
- )
-
- )
- )
-
- (user old-level)
-
-
-
- ;user-startup
- ;the installer creates a user-startup if it doesn't already exist
- ;dont ask user
-
- ;Add assign to user-startup
-
- (startup "TurboPrint"
- (command (cat "Assign TurboPrint: " (tackon target "TurboPrint") )
- )
- (prompt #adding-TurboPrefs)
- (help #generic-help @startup-help)
- )
-
- ;Execute assign NOW
-
- (run (cat (tackon sourcedir "c/Assign") " TurboPrint: \"" (tackon target "TurboPrint") "\""))
-
-
- ;install one of the two autostart options
-
- ;OS 2.x/3.0 => wbstartup drawer
- ;ask user if he/she wants to have the autostart option installed
-
- (if (= 0 (askchoice (prompt #ask-wbstart20)
- (help #wbstart-help @askchoice-help)
- (choices #ask-wbyes #ask-wbno)
- (default 0)
- ) )
- (
- ;Copy TurboStart icon to WBStartup-drawer
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "extra/TurboStart.info"))
- (dest "sys:WBStartup" )
- )
-
- ;Put correct paths into TurboStart icon
-
- (tooltype
- (dest "sys:WBStartup/TurboStart")
- (setdefaulttool "TurboPrint:TurboPrefs" )
- (settooltype "QUICK" "")
- (settooltype "DONOTWAIT" "")
- (noposition)
- )
-
- )
- )
-
- ;install the print manager?
-
- (if (>= wbVersion 37)
- (if (= 0 (askchoice (prompt #ask-printmanager)
- (help @askchoice-help)
- (choices #ask-pmyes #ask-pmno)
- (default 0)
- )
- )
- (
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "DruckManager"))
- (dest (tackon target "TurboPrint") )
- (infos)
- )
- (copylib
- (source (tackon sourcedir "libs/multipic.library"))
- (dest "LIBS:")
- )
- )
- )
- )
-
- ;install the pictures?
-
- (if (= 0 (askchoice (prompt #ask-pictures)
- (help @askchoice-help)
- (choices #ask-piyes #ask-pino)
- (default 0)
- )
- )
- (
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Pictures"))
- (dest (tackon target "TurboPrint/Pictures"))
- (all)
- (infos)
- )
- )
- )
-
-
- ;Copy other stuff
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "TurboPrefs"))
- (dest (tackon target "TurboPrint") )
- (infos)
- )
-
- ;Copy TurboPrefs icon to sys:prefs
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "extra/TurboStart.info"))
- (dest "sys:Prefs" )
- (newname "TurboPrefs.info" )
- )
-
- ;Put correct paths into TurboStart icon
-
- (tooltype
- (dest "sys:Prefs/TurboPrefs")
- (setdefaulttool "TurboPrint:TurboPrefs" )
- (settooltype "(QUICK)" "" )
- (noposition)
- )
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "NoTurbo"))
- (dest (tackon target "TurboPrint") )
- (infos)
- )
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "LiesMich"))
- (dest (tackon target "TurboPrint") )
- (infos)
- )
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Turbo"))
- (dest (tackon target "TurboPrint/Turbo"))
- (all)
- )
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Extra"))
- (dest (tackon target "TurboPrint/Extra"))
- (infos)
- (all)
- )
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Configs/_Default_"))
- (dest (tackon target "TurboPrint/Configs"))
- )
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Colors"))
- (dest (tackon target "TurboPrint/Colors"))
- (all)
- )
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Drivers"))
- (dest (tackon target "TurboPrint/Drivers"))
- (all)
- )
-
-
- ))
- (user 1)
- (message #installation-done)
- (exit (quiet))
-
-