home *** CD-ROM | disk | FTP | other *** search
- ; Installation-Script for ScreenTab V1.32
- ; Author: Michael Link
- ; Begin : 28.10.94
- ; Last change : 10.12.95
-
- (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 DIRHELP (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 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 COPY_PREFS "\n\nCopying preferences file ...")
-
- (set VERSION_PROMPT (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_LIBRARY (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_LIBRARY_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 PLEASE_RESET (cat "\n\nIf you want to activate the new ScreenTab\n"
- "version, you have to reset your computer.\n\n"
- "Have fun with ScreenTab !"
- )
- )
-
- (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))
- )
- )
-
- ; ***********************************************************************
- ; * *
- ; * Request for the destination directory *
- ; * *
- ; ***********************************************************************
-
- (set DIR (askdir (prompt DIR_REQUEST)
- (help DIRHELP)
- (default "SYS:WBStartup")
- )
- )
-
- (set @default-dest DIR)
-
-
- ; ***********************************************************************
- ; * *
- ; * Asking for the tool-types *
- ; * *
- ; ***********************************************************************
-
- (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 "Writing tool-type HOTKEY ...")
- (help)
- (dest "/ScreenTab")
- (settooltype "CX_POPKEY" HOTKEY)
- )
-
- (tooltype (prompt "Writing tool-Type SWITCHKEY ...")
- (help)
- (dest "/ScreenTab")
- (settooltype "SWITCHKEY" SWITCHKEY)
- )
-
- (tooltype (prompt "Writing tool-Type WINSWITCHKEY ...")
- (help)
- (dest "/ScreenTab")
- (settooltype "WINSWITCHKEY" WINSWITCHKEY)
- )
-
- (copyfiles (prompt ("Copying ScreenTab to %s" DIR) )
- (help @copyfiles-help)
- (source "/ScreenTab")
- (dest DIR)
- (infos)
- )
-
-
- ; ***********************************************************************
- ; * *
- ; * Checks for an existing preferences file and *
- ; * asks for a conversion *
- ; * *
- ; ***********************************************************************
-
- (if (exists "ENVARC:ScreenTab.prefs")
- (if (= (run "/HandleScrTab PREFSVERSION" (safe) ) 2)
- (
- (if (askbool (prompt VERSION_PROMPT)
- (help)
- (default 1)
- )
- (if (= (run "/HandleScrTab CONVERTPREFS" (safe) ) 0)
- (copyfiles (prompt)
- (help)
- (source "T:SCRT.TMP")
- (dest "ENVARC:")
- (newname "ScreenTab.prefs")
- )
- (message "Error during conversion !!!")
- )
- )
- )
- )
- (copyfiles (prompt COPY_PREFS)
- (help)
- (source "/ScreenTab.prefs")
- (dest "ENVARC:")
- )
- )
-
-
- ; ***********************************************************************
- ; * *
- ; * Installation of ScreenNotify-Library *
- ; * *
- ; ***********************************************************************
-
- (if (= scrntfy_ver 0)
- (if (askbool (prompt ASK_LIBRARY)
- (help ASK_LIBRARY_HELP)
- (default 1)
- )
- (copylib (prompt "Copying ScreenNotify-Library ...")
- (help)
- (source "/libs/screennotify.library")
- (dest "LIBS:")
- (confirm)
- )
- )
- )
-
-
- ; ***********************************************************************
- ; * *
- ; * Installation of the catalogs *
- ; * *
- ; ***********************************************************************
-
- (if (>= locale_ver 38)
- (
- (set CATALOGS (askoptions (prompt "\nWhich language catalogs shall be installed ?\n")
- (help)
- (choices "German" "Swedish" "French" "Polish" "Italian")
- (default 0)
- )
- )
-
- (set n 0)
-
- (while (set language (select n "deutsch" "svenska" "français" "polski" "italiano" ""))
- (if (IN CATALOGS n)
- (
- (set srcpath (cat "/catalogs/"
- language
- "/ScreenTab.catalog"
- )
- )
- (set dstpath (cat "LOCALE:Catalogs/" language))
- (set langmsg (cat "Copying "
- (select n "German" "Swedish" "French" "Polish" "Italian")
- " catalogue ..."
- )
- )
- (copyfiles (prompt langmsg)
- (help)
- (source srcpath)
- (dest dstpath)
- )
- )
- )
- (set n (+ n 1))
- )
- )
- )
-
- (message PLEASE_RESET)
-
-