home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 84 / af084sub.adf / STAB / stab.lzx / ScreenTab / English / Install_English next >
Text File  |  1996-03-06  |  10KB  |  278 lines

  1. ; Installation-Script for ScreenTab V1.32
  2. ; Author: Michael Link
  3. ; Begin       : 28.10.94
  4. ; Last change : 10.12.95
  5.  
  6. (set BAD_VERSION    (cat "\n\nSorry, but ScreenTab requires\n"
  7.                          "at least Kickstart 2.04"
  8.                     )
  9. )
  10.  
  11. (set SCRTAB_INSTALLED
  12.                     (cat "\n\nScreenTab is already running on your system.\n"
  13.                          "If you want to install the new version in the same\n"
  14.                          "same directory as the old, the installation must\n"
  15.                          "stop the ScreenTab-Task. This could cause system\n"
  16.                          "instability until the next reboot.\n\n"
  17.                          "Do you want to continue ?"
  18.                     )
  19. )
  20.  
  21. (set DIRHELP (cat "You must enter the name of the directory, in which\n"
  22.                   "ScreenTab shall be installed.\n\n"
  23.                   "If you want ScreenTab to be active everytime you\n"
  24.                   "start the computer, enter the directory\n"
  25.                   "\"SYS:WBStartup\", which is the default directory."
  26.              )
  27. )
  28.  
  29. (set DIR_REQUEST (cat "Please enter the destination directory\n"
  30.                       "for ScreenTab"
  31.                  )
  32. )
  33.  
  34. (set WHICH_HOTKEY (cat "\n\nWith which key combination shall the\n"
  35.                        "preferences be called ?"
  36.                   )
  37. )
  38.  
  39. (set WHICH_SCRKEY (cat "\n\nWith which key combination shall the\n"
  40.                        "screens be switched ?\n\n"
  41.                        "(Don't use any of the SHIFT-Keys, because\n"
  42.                        "ScreenTab needs them for back-switching !)"
  43.                   )
  44. )
  45.  
  46. (set WHICH_WINKEY (cat "\n\nWith which key combination shall the\n"
  47.                        "windows be switched ?\n\n"
  48.                        "(Don't use any of the SHIFT-Keys, because\n"
  49.                        "ScreenTab needs them for back-switching !)"
  50.                   )
  51. )     
  52.  
  53. (set COPY_PREFS     "\n\nCopying preferences file ...")
  54.  
  55. (set VERSION_PROMPT (cat "\n\nThere's an older preferences file installed\n"
  56.                          "on your system. If you want to use these\n"
  57.                          "preferences, they must be converted.\n\n"
  58.                          "Do you want to do this ?"
  59.                     )
  60. )
  61.  
  62. (set ASK_LIBRARY    (cat "\n\nIf available, ScreenTab uses\n"
  63.                          "the ScreenNotify-Library to react on changes\n"
  64.                          "of the Workbench resolution.\n\n"
  65.                          "Do you want to install this library ?"
  66.                     )
  67. )
  68.  
  69. (set ASK_LIBRARY_HELP
  70.                     (cat "The usage of this library is optional.\n"
  71.                          "But if the Workbench resolution is changed\n"
  72.                          "without this library installed, it can\n"
  73.                          "cause system instability or crashes.\n\n"
  74.                          "If you don't want to use an installed\n"
  75.                          "ScreenNotify-Library, set the tool-type\n"
  76.                          "USESCREENNOTIFY to NO."
  77.                     )
  78. )
  79.  
  80. (set PLEASE_RESET   (cat "\n\nIf you want to activate the new ScreenTab\n"
  81.                          "version, you have to reset your computer.\n\n"
  82.                          "Have fun with ScreenTab !"
  83.                     )
  84. )  
  85.  
  86. (set intuition_vernum (getversion "intuition.library" (resident)))
  87. (set intuition_ver    (shiftright intuition_vernum 16))
  88. (set locale_vernum    (getversion "locale.library" (resident)))
  89. (set locale_ver       (shiftright locale_vernum 16))
  90. (set scrntfy_vernum   (getversion "LIBS:screennotify.library"))
  91. (set scrntfy_ver      (shiftright scrntfy_vernum 16))
  92.  
  93. (if (< intuition_ver 37)
  94.     (abort BAD_VERSION)
  95. )
  96.  
  97. ; ***********************************************************************
  98. ; *                                                                     *
  99. ; * ScreenTab already running ?                                         *
  100. ; *                                                                     *
  101. ; ***********************************************************************
  102.  
  103. (if (run "/HandleScrTab CHECK" (safe))
  104.     (if (askbool (prompt SCRTAB_INSTALLED)
  105.                  (help)
  106.                  (default 1)
  107.         )
  108.         (run "/HandleScrTab STOP")
  109.         (exit (quiet))
  110.     )
  111. )
  112.  
  113. ; ***********************************************************************
  114. ; *                                                                     *
  115. ; * Request for the destination directory                               *
  116. ; *                                                                     *
  117. ; ***********************************************************************
  118.  
  119. (set DIR (askdir (prompt DIR_REQUEST)
  120.                  (help DIRHELP)
  121.                  (default "SYS:WBStartup")
  122.          )
  123. )
  124.  
  125. (set @default-dest DIR)
  126.  
  127.  
  128. ; ***********************************************************************
  129. ; *                                                                     *
  130. ; * Asking for the tool-types                                           *
  131. ; *                                                                     *
  132. ; ***********************************************************************
  133.  
  134. (set HOTKEY (askstring (prompt WHICH_HOTKEY)
  135.                        (help @askstring-help)
  136.                        (default "ctrl alt s")
  137.             )
  138. )
  139.  
  140. (set SWITCHKEY (askstring (prompt WHICH_SCRKEY)
  141.                           (help @askstring-help)
  142.                           (default "LCommand Tab")
  143.                )
  144. )  
  145.  
  146. (set WINSWITCHKEY (askstring (prompt WHICH_WINKEY)
  147.                           (help @askstring-help)
  148.                           (default "LCommand `")
  149.                   )
  150. )  
  151.  
  152. (tooltype (prompt "Writing tool-type HOTKEY ...")
  153.           (help)
  154.           (dest "/ScreenTab")
  155.           (settooltype "CX_POPKEY" HOTKEY)
  156. )
  157.  
  158. (tooltype (prompt "Writing tool-Type SWITCHKEY ...")
  159.           (help)
  160.           (dest "/ScreenTab")
  161.           (settooltype "SWITCHKEY" SWITCHKEY)
  162. )   
  163.  
  164. (tooltype (prompt "Writing tool-Type WINSWITCHKEY ...")
  165.           (help)
  166.           (dest "/ScreenTab")
  167.           (settooltype "WINSWITCHKEY" WINSWITCHKEY)
  168. )   
  169.  
  170. (copyfiles (prompt ("Copying ScreenTab to %s" DIR) )
  171.            (help @copyfiles-help)
  172.            (source "/ScreenTab")
  173.            (dest DIR)
  174.            (infos)
  175. )
  176.  
  177.  
  178. ; ***********************************************************************
  179. ; *                                                                     *
  180. ; * Checks for an existing preferences file and                         *
  181. ; * asks for a conversion                                               *
  182. ; *                                                                     *
  183. ; ***********************************************************************
  184.  
  185. (if (exists "ENVARC:ScreenTab.prefs")
  186.     (if (= (run "/HandleScrTab PREFSVERSION" (safe) ) 2)
  187.         (
  188.             (if (askbool (prompt VERSION_PROMPT)
  189.                          (help)
  190.                          (default 1)
  191.                 )
  192.                 (if (= (run "/HandleScrTab CONVERTPREFS" (safe) ) 0)
  193.                     (copyfiles (prompt)
  194.                                (help)
  195.                                (source "T:SCRT.TMP")
  196.                                (dest "ENVARC:")
  197.                                (newname "ScreenTab.prefs")
  198.                     )
  199.                     (message "Error during conversion !!!")
  200.                 )
  201.             )
  202.         )
  203.     )
  204.     (copyfiles (prompt COPY_PREFS)
  205.                (help)
  206.                (source "/ScreenTab.prefs")
  207.                (dest "ENVARC:")
  208.     )
  209. )
  210.  
  211.  
  212. ; ***********************************************************************
  213. ; *                                                                     *
  214. ; * Installation of ScreenNotify-Library                                *
  215. ; *                                                                     *
  216. ; ***********************************************************************
  217.  
  218. (if (= scrntfy_ver 0)
  219.     (if (askbool (prompt ASK_LIBRARY)
  220.                  (help   ASK_LIBRARY_HELP)
  221.                  (default 1)
  222.         )
  223.         (copylib (prompt "Copying ScreenNotify-Library ...")
  224.                  (help)
  225.                  (source "/libs/screennotify.library")
  226.                  (dest   "LIBS:")
  227.                  (confirm)
  228.         )
  229.     )
  230. )
  231.  
  232.  
  233. ; ***********************************************************************
  234. ; *                                                                     *
  235. ; * Installation of the catalogs                                        *
  236. ; *                                                                     *
  237. ; ***********************************************************************
  238.  
  239. (if (>= locale_ver 38)
  240.     (
  241.         (set CATALOGS (askoptions (prompt "\nWhich language catalogs shall be installed ?\n")
  242.                                   (help)
  243.                                   (choices "German" "Swedish" "French" "Polish" "Italian")
  244.                                   (default 0)
  245.                       )
  246.         )
  247.  
  248.         (set n 0)
  249.  
  250.         (while (set language (select n "deutsch" "svenska" "français" "polski" "italiano" ""))
  251.             (if (IN CATALOGS n)
  252.                 (
  253.                     (set srcpath (cat "/catalogs/"
  254.                                       language
  255.                                       "/ScreenTab.catalog"
  256.                                  )
  257.                     )
  258.                     (set dstpath (cat "LOCALE:Catalogs/" language))
  259.                     (set langmsg (cat "Copying "
  260.                                       (select n "German" "Swedish" "French" "Polish" "Italian")
  261.                                       " catalogue ..."
  262.                                  )
  263.                     )
  264.                     (copyfiles (prompt langmsg)
  265.                                (help)
  266.                                (source srcpath)
  267.                                (dest   dstpath)
  268.                     )
  269.                 )
  270.             )
  271.             (set n (+ n 1))
  272.         )
  273.     )
  274. )
  275.  
  276. (message PLEASE_RESET)
  277.  
  278.