home *** CD-ROM | disk | FTP | other *** search
- ; Installation script for TURBOprint Professional 3.0
- ; (C) 1994 IrseeSoft
- ;
- ;
- ; $VER: TURBOprint Professional 3.00 (18.04.94)
- ;
- ;
- ; "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 3.00 (18.04.94)" )
-
- (set #introduction
- (cat "\nInstallation von TURBOprint Professional 3.0\n"
- " Copyright © 1988-1994 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 3.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 #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 LiesMich-Datei auf dieser Diskette!\n"
- )
- )
-
- (set #which-printer
- (cat "Welche Druckertreiber sollen installiert werden?\n")
- )
- (set #all-printer
- (cat "Sollen alle Druckertreiber installiert werden?\n")
- )
- (set #ask-pryes
- (cat "Alle Treiber")
- )
- (set #ask-prno
- (cat "Einzelne Treiber")
- )
-
- (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 dieses "
- "Installationsprogramm geändert wurde, wird dies nun "
- "automatisch rückgängig gemacht."
- )
- )
- (set #adding-turboprefs
- (cat "Die user-startup Datei wird um die Befehle \n"
- "'Assign TURBOprint: <pfad>:TURBOprint' und \n"
- "'TURBOprint:TURBOprefs -q' erweitert."
- )
- )
- (set #removing-startup
- (cat "Falls Sie bei der letzten Installation von TURBOprint "
- "Ihre startup-sequence geändert haben: \n"
- "Die Befehle 'assign TURBOprint: ...' und 'TURBOprint:Turboprefs -q' sind "
- "nicht mehr notwendig und sollten aus der "
- "startup-sequence bzw. user-startup entfernt werden.\n"
- )
- )
-
- (set #ask-wbstart20
- (cat "Sie können TURBOprint beim Rechnerstart automatisch installieren "
- "lassen. Dazu wird ein Startprogramm in die WBStartup-Schublade "
- "kopiert.\n")
- )
- (set #ask-wbstart13
- (cat "Sie können TURBOprint beim Rechnerstart automatisch installieren "
- "lassen. Dazu wird ein Aufruf in die User-Startup Datei "
- "eingetragen.\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. "
- )
- )
-
- ; 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))
-
- ; remember current user level
-
- (set old-level @user-level)
-
- ;
-
- (welcome)
-
- ; 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 "SYS:"))
- (user 1)
- )
-
- (set target
- (askdir (prompt #path-prompt)
- (help #generic-help @askdir-help)
- (default "SYS:") )
- )
-
- (user old-level)
-
- ; do some cleanup if there was an old version of tp installed
- ; - no questions aked -
- ; try to remove turboprint
-
- (run "TURBOprint: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/#?") "\""))
- )
- )
-
- ; 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
- ;if version >= 37
-
- (if (>= wbVersion 37)
- (
- (delete "sys:WBStartup/TURBOstart.info")
- )
- )
- )
- )
-
- ;If update or remove: care about startup files
-
- (if (or (= operationMode 2) (and (= operationMode 1) (>= wbVersion 37)))
- (
- ;Remove startup-sequence & user-startup commands
- ;if (update and version >= 37) or remove
-
- ;Inform user
-
- (message #removing-startup)
-
- (startup "TURBOprint"
- (prompt #removing-turboprefs)
- (help #generic-help @startup-help)
- )
- )
- )
-
- ;if install or update
-
- (if (or (= operationMode 0) (= operationMode 1) )
- (
-
- ;Make TURBOprint drawer
- (makedir (tackon target "TURBOprint") (infos))
-
- ;Copy some stuff
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "TURBOprefs"))
- (dest (tackon target "TURBOprint") )
- (infos)
- )
-
- (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 "Zu_Install"))
- (dest (tackon target "TURBOprint") )
- (infos)
- )
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "c/More"))
- (dest (tackon target "TURBOprint/c") )
- (infos)
- )
-
- (run (cat (tackon sourcedir "c/Delete") " >nil: \"" (tackon target "TURBOprint/c.info") "\""))
-
- (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 "Configs"))
- (dest (tackon target "TURBOprint/Configs"))
- (all)
- )
-
- ;default: copy all printers
-
- (set prt -1)
-
- ;aks user if (s)he wants to copy all printers
-
- (if (askchoice (prompt #all-printer)
- (help @askchoice-help)
- (choices #ask-pryes #ask-prno)
- (default 0)
- )
- (
- ;ask him which printers to copy
-
- (set prt (askoptions (prompt #which-printer)
- (help @askoption-help)
- (choices "Brother"
- "Canon"
- "Citizen"
- "Epson"
- "Facit"
- "Fargo"
- "Fujitsu"
- "Hewlett-Packard"
- "Mannesmann-Tally"
- "Nec"
- "Oki"
- "Panasonic"
- "Seikosha"
- "Siemens"
- "Star"
- )
- (default 0)
- )
- )))
-
- ;set pattern for printers
-
- (set n 0)
- (set printerpat "(%")
- (while (set printer (select n
- "Brother"
- "Canon"
- "Citizen"
- "Epson"
- "Facit"
- "Fargo"
- "Fujitsu"
- "HP"
- "Mannesmann-Tally"
- "Nec"
- "Oki"
- "Panasonic"
- "Seikosha"
- "Siemens"
- "Star"
- ""
- )
- )
- (
- (if (IN prt n)
- (
- (set printerpat (cat printerpat "|" printer))
- ))
- (set n (+ n 1))
- ))
-
- ;finally, copy the printers
-
- (copyfiles
- (help #generic-help @copyfiles-help)
- (source (tackon sourcedir "Printers"))
- (dest (tackon target "TURBOprint/Printers"))
- (pattern (cat printerpat ")"))
- )
-
- ;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)
- )
-
- )
- )
- )
-
- ;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)
- )
- )
- )
-
- ;install one of the two autostart options
-
- (if (>= wbVersion 37)
- (
- ;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
- (help @tooltype-help)
- (settooltype "PATH" (tackon target "TURBOprint") )
- (settooltype "QUICK")
- (setdefaulttool (tackon target "TURBOprint/TURBOprefs") )
- (noposition)
- (dest "sys:WBStartup/TURBOstart")
- )
-
- )
-
-
- )
- )
- )
- (if (< wbVersion 37)
- (
- ;OS 1.2/1.3 => user-startup
- ;the installer creates a user-startup if it doesn't already exist
- ;ask user
-
- (if (= 0 (askchoice (prompt #ask-wbstart13)
- (help #wbstart-help @askchoice-help)
- (choices #ask-wbyes #ask-wbno)
- (default 0)
- ) )
- (
- ;Add commands to user-startup
-
- (startup "TURBOprint"
- (command (cat "Assign TURBOprint: " (tackon target "TURBOprint") "\n"
- "TURBOprint:TURBOprefs -q")
- )
- (prompt #adding-turboprefs)
- (help #generic-help @startup-help)
- )
-
- )
- )
- )
- )
-
- ))
-
- (message #installation-done)
- (exit (quiet))
-