home *** CD-ROM | disk | FTP | other *** search
- ; Installation-Script for ScreenTab V2.0
- ; Author: Michael Link
- ; First creation : 28.10.94
- ; Last change : 28.04.96
-
- ; ----- English string section -----
-
- (set #bad-version
- (cat "\n\nSorry, but ScreenTab requires\n"
- "at least Kickstart 2.04"
- )
- )
-
- (set #scrtab-installed
- (cat "\n\nScreenTab is already running on your system.\n"
- "If you want to install the new version in the same\n"
- "same directory as the old, the installation must\n"
- "stop the ScreenTab-Task. This could cause system\n"
- "instability until the next reboot.\n\n"
- "Do you want to continue ?"
- )
- )
-
- (set #help-dir
- (cat "You must enter the name of the directory, in which\n"
- "ScreenTab shall be installed.\n\n"
- "If you want ScreenTab to be active everytime you\n"
- "start the computer, enter the directory\n"
- "\"SYS:WBStartup\", which is the default directory."
- )
- )
-
- (set #dir-request
- (cat "Please enter the destination directory\n"
- "for ScreenTab"
- )
- )
-
- (set #prefs-dir-request
- (cat "Please enter the destination directory\n"
- "for the ScreenTab-Preferences"
- )
- )
-
- (set #which-hotkey
- (cat "\n\nWith which key combination shall the\n"
- "preferences be called ?"
- )
- )
-
- (set #which-scrkey
- (cat "\n\nWith which key combination shall the\n"
- "screens be switched ?\n\n"
- "(Don't use any of the SHIFT-Keys, because\n"
- "ScreenTab needs them for back-switching !)"
- )
- )
-
- (set #which-winkey
- (cat "\n\nWith which key combination shall the\n"
- "windows be switched ?\n\n"
- "(Don't use any of the SHIFT-Keys, because\n"
- "ScreenTab needs them for back-switching !)"
- )
- )
-
- (set #write-tooltypes
- "\nWriting Tool-Types ..."
- )
-
- (set #old-prefs-file
- (cat "\n\nThere's an older preferences file installed\n"
- "on your system. If you want to use these\n"
- "preferences, they must be converted.\n\n"
- "Do you want to do this ?"
- )
- )
-
- (set #ask-brushes
- (cat "\n\nDo you want to install the\n"
- "included image-files ?\n"
- "(Needs about 9 KB disk space)"
- )
- )
-
- (set #ask-brushes-dir
- (cat "In which directory shall I create\n"
- "the ScreenTab-Images-Directory ?"
- )
- )
-
- (set #ask-catalogs
- "\nWhich language catalogs shall be installed ?\n"
- )
-
- (set #ask-assign-brushes
- (cat "\n\nDo you want to add an ASSIGN to\n"
- "the image directory in S:User-Startup ?"
- )
- )
-
- (set #ask-scrnotify
- (cat "\n\nIf available, ScreenTab uses\n"
- "the ScreenNotify-Library to react on changes\n"
- "of the Workbench resolution.\n\n"
- "Do you want to install this library ?"
- )
- )
-
- (set #ask-scrnotify-help
- (cat "The usage of this library is optional.\n"
- "But if the Workbench resolution is changed\n"
- "without this library installed, it can\n"
- "cause system instability or crashes.\n\n"
- "If you don't want to use an installed\n"
- "ScreenNotify-Library, set the tool-type\n"
- "USESCREENNOTIFY to NO."
- )
- )
-
- (set #copy-screentab
- "\n\nCopying ScreenTab ..."
- )
-
- (set #copy-screentabprefs
- "\n\nCopying ScreenTabPrefs ..."
- )
-
- (set #copy-brushes
- "\n\nCopying Image-Files ..."
- )
-
- (set #copy-scrnotify
- "\n\nCopying ScreenNotify-Library ..."
- )
-
- (set #copy-catalogs
- "\n\nCopying language catalogs ..."
- )
-
- (set #lang-german
- "German"
- )
-
- (set #catalog-german
- "deutsch"
- )
-
- (set #error-conversion
- "Error during conversion !!!"
- )
-
-
- ; ----- German string section -----
-
- (if (= @language "deutsch")
- (
-
- (set #bad-version
- (cat "\n\nSorry, aber ScreenTab läuft erst ab\n"
- "Kickstart 2.04."
- )
- )
-
- (set #scrtab-installed
- (cat "\n\nScreenTab ist bereits auf Ihrem System aktiv.\n"
- "Falls Sie die neue Version in dasselbe Verzeichnis\n"
- "installieren wollen wie die alte, muss der\n"
- "ScreenTab-Task beendet werden. Dies kann u. U. zu\n"
- "Instabilitäten des Systems bis zum nächsten Reset\n"
- "führen.\n\n"
- "Wollen Sie trotzdem weitermachen ?"
- )
- )
-
- (set #help-dir
- (cat "An dieser Stelle müssen Sie angeben, in welchem\n"
- "Verzeichnis ScreenTab installiert werden soll.\n\n"
- "Wenn ScreenTab gleich nach dem Start des Computers\n"
- "aktiv sein soll, sollten Sie als Zielverzeichnis\n"
- "\"SYS:WBStartup\" angeben."
- )
- )
-
- (set #dir-request
- (cat "Geben Sie jetzt das Verzeichnis an,\n"
- "in dem ScreenTab installiert werden soll."
- )
- )
-
- (set #prefs-dir-request
- (cat "Geben Sie jetzt das Verzeichnis an, in das das\n"
- "Einstellungsprogramm kopiert werden soll."
- )
- )
-
- (set #which-hotkey
- (cat "\n\nMit welcher Tastenkombination sollen die\n"
- "ScreenTab-Voreinstellungen aufgerufen werden ?"
- )
- )
-
- (set #which-scrkey
- (cat "\n\nMit welcher Tastenkombination sollen die\n"
- "Screens umgeschaltet werden ?\n\n"
- "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
- "diese für das Zurückblättern gebraucht werden !)"
- )
- )
-
- (set #which-winkey
- (cat "\n\nMit welcher Tastenkombination sollen die\n"
- "Fenster umgeschaltet werden ?\n\n"
- "(Bitte geben Sie hier keine SHIFT-Taste an, da\n"
- "diese für das Zurückblättern gebraucht werden !)"
- )
- )
-
- (set #write-tooltypes
- "\nSchreibe Tool-Types ..."
- )
-
- (set #old-prefs-file
- (cat "\n\nEine ältere Voreinstellungsdatei ist auf\n"
- "ihrem System installiert. Um diese Einstellungen\n"
- "mit der neuen Version nutzen zu können, muß\n"
- "eine Konvertierung vorgenommen werden.\n\n"
- "Wollen Sie das ?"
- )
- )
-
- (set #ask-brushes
- (cat "\n\nWollen Sie die mitgelieferten Image-Dateien\n"
- "installieren ? (Benötigt ca. 9 KB Plattenplatz)"
- )
- )
-
- (set #ask-brushes-dir
- (cat "In welches Verzeichnis sollen die Image-Dateien\n"
- "kopiert werden ? Ein Verzeichnis mit dem Namen\n"
- "'ScreenTab-Images' wird dort angelegt"
- )
- )
-
- (set #ask-catalogs
- "\nWelche Sprach-Kataloge sollen installiert werden ?\n"
- )
-
- (set #ask-assign-brushes
- (cat "\n\nSoll ein ASSIGN auf das Image-Verzeichnis\n"
- "angelegt werden (in S:User-Startup) ?"
- )
- )
-
- (set #ask-scrnotify
- (cat "\n\nScreenTab benutzt, falls vorhanden,\n"
- "die ScreenNotify-Library, um auf Wechsel der\n"
- "Workbench-Auflösung reagieren zu können.\n\n"
- "Wollen Sie diese Library installieren ?"
- )
- )
-
- (set #ask-scrnotify-help
- (cat "Die Benutzung dieser Library ist optional.\n"
- "Allerdings kann es zu Fehlern oder Abstürzen\n"
- "kommen, wenn die Workbench-Auflösung ohne\n"
- "installierte Library gewechselt wird.\n\n"
- "Wenn Sie auf die ScreenNotify-Library\n"
- "verzichten wollen, können Sie dies gezielt\n"
- "mit dem Tool-Type USESCREENNOTIFY unterbinden,\n"
- "indem Sie ihn auf NO setzen."
- )
- )
-
- (set #copy-screentab
- "\n\nKopiere ScreenTab ..."
- )
-
- (set #copy-screentabprefs
- "\n\nKopiere ScreenTabPrefs ..."
- )
-
- (set #copy-brushes
- "\n\nKopiere Image-Dateien ..."
- )
-
- (set #copy-scrnotify
- "\n\nKopiere ScreenNotify-Library ..."
- )
-
- (set #copy-catalogs
- "\n\nKopiere Sprachkataloge ..."
- )
-
- (set #lang-german
- "Deutsch"
- )
-
- (set #catalog-german
- "deutsch"
- )
-
- (set #error-conversion
- "Fehler beim Konvertieren !!!"
- )
-
- )
- ) ; endif
-
-
- ; ----- different version numbers -----
-
- (set intuition_vernum (getversion "intuition.library" (resident)))
- (set intuition_ver (shiftright intuition_vernum 16))
- (set locale_vernum (getversion "locale.library" (resident)))
- (set locale_ver (shiftright locale_vernum 16))
- (set scrntfy_vernum (getversion "LIBS:screennotify.library"))
- (set scrntfy_ver (shiftright scrntfy_vernum 16))
-
- (if (< intuition_ver 37)
- (abort #bad-version)
- )
-
- ; ***********************************************************************
- ; * ScreenTab already running ? *
- ; ***********************************************************************
-
- (if (run "HandleScrTab CHECK" (safe))
- (if (askbool (prompt #scrtab-installed)
- (help)
- (default 1)
- )
- (run "HandleScrTab STOP")
- (exit (quiet))
- )
- )
-
- ; ***********************************************************************
- ; * Ask for destination directory *
- ; ***********************************************************************
-
- (set DIR (askdir (prompt #dir-request)
- (help #help-dir)
- (default "SYS:WBStartup")
- )
- )
-
- (set PREFSDIR (askdir (prompt #prefs-dir-request)
- (help @askdir-help)
- (default "SYS:Prefs")
- )
- )
-
-
- ; ***********************************************************************
- ; * Tool-Types *
- ; ***********************************************************************
-
- (set @default-dest PREFSDIR)
-
- (copyfiles (prompt #copy-screentabprefs)
- (help @copyfiles-help)
- (source "Prefs/ScreenTabPrefs")
- (dest PREFSDIR)
- (infos)
- )
-
- (set @default-dest DIR)
-
- (set HOTKEY (askstring (prompt #which-hotkey)
- (help @askstring-help)
- (default "ctrl alt s")
- )
- )
-
- (set SWITCHKEY (askstring (prompt #which-scrkey)
- (help @askstring-help)
- (default "LCommand Tab")
- )
- )
-
- (set WINSWITCHKEY (askstring (prompt #which-winkey)
- (help @askstring-help)
- (default "LCommand `")
- )
- )
-
- (tooltype (prompt #write-tooltypes)
- (help)
- (dest "ScreenTab")
- (settooltype "CX_POPKEY" HOTKEY)
- (settooltype "SWITCHKEY" SWITCHKEY)
- (settooltype "WINSWITCHKEY" WINSWITCHKEY)
- (settooltype "PREFSDIR" PREFSDIR)
- )
-
- (copyfiles (prompt #copy-screentab)
- (help @copyfiles-help)
- (source "ScreenTab")
- (dest DIR)
- (infos)
- )
-
-
- ; ***********************************************************************
- ; * Checking for preferences file and need for conversion *
- ; ***********************************************************************
-
- (if (exists "ENVARC:ScreenTab.prefs")
- (if (= (run "HandleScrTab PREFSVERSION" (safe) ) 2)
- (
- (if (askbool (prompt #old-prefs-file)
- (help)
- (default 1)
- )
- (if (= (run "HandleScrTab CONVERTPREFS" (safe) ) 0)
- (copyfiles (prompt)
- (help)
- (source "T:SCRT.TMP")
- (dest "ENVARC:")
- (newname "ScreenTab.prefs")
- )
- (message #error-conversion)
- )
- )
- )
- )
- (copyfiles (prompt #copy-preferences)
- (help)
- (source "ScreenTab.prefs")
- (dest "ENVARC:")
- )
- )
-
-
- ; ***********************************************************************
- ; * Copying of the IFF-Brushes *
- ; ***********************************************************************
-
- (if (askbool (prompt #ask-brushes)
- (help)
- (default 1)
- )
- (
- (set BRUSH_DIR (askdir (prompt #ask-brushes-dir)
- (help @askdir-help)
- (default "SYS:Prefs")
- )
- )
-
- (set BRUSH_DIR (tackon BRUSH_DIR "ScreenTab-Images"))
-
- (makedir BRUSH_DIR
- (prompt)
- (help @makedir-help)
- )
-
- (copyfiles (prompt #copy-brushes)
- (help)
- (source "ScreenTab-Images")
- (dest BRUSH_DIR)
- (pattern "#?.bsh")
- (files)
- )
-
- (startup "ScreenTab"
- (prompt #ask-assign-brushes)
- (help)
- (command "Assign ScreenTab: \"" BRUSH_DIR "\"")
- )
- )
- )
-
-
- ; ***********************************************************************
- ; * Installation of the ScreenNotify-Library *
- ; ***********************************************************************
-
- (if (= scrntfy_ver 0)
- (if (askbool (prompt #ask-scrnotify)
- (help #ask-scrnotify-help)
- (default 1)
- )
- (copylib (prompt #copy-scrnotify)
- (help)
- (source "libs/screennotify.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
-
-
- ; ***********************************************************************
- ; * Installation of the catalogs *
- ; ***********************************************************************
-
- (if (>= locale_ver 38)
- (
- (set CATALOGS (askoptions (prompt #ask-catalogs)
- (help)
- (choices #lang-german)
- (default 1)
- )
- )
-
- (set n 0)
-
- (while (set language (select n #catalog-german ""))
- (if (IN CATALOGS n)
- (
- (set SRCPATH (cat "catalogs/"
- language
- )
- )
-
- (set DSTPATH (tackon "LOCALE:Catalogs" language))
-
- (copyfiles (prompt #copy-catalogs)
- (help)
- (source SRCPATH)
- (dest DSTPATH)
- (pattern "#?.catalog")
- )
- )
- )
- (set n (+ n 1))
- )
- )
- )
-
-