home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / new / os20 / wb / toolsdaemon / install < prev    next >
Encoding:
Text File  |  1993-12-21  |  3.2 KB  |  150 lines

  1.  
  2. ; Install script for ToolsDaemon
  3.  
  4. (set old_level @user-level)
  5. (set @default-dest "")
  6.  
  7. (set reqtoolslib "libs/reqtools.library")
  8. (set catalogdir "Catalogs/")
  9. (set handler "ToolsDaemon-Handler")
  10. (set toolsdaemon "ToolsDaemon")
  11. (set toolsprefs "ToolsPrefs")
  12.  
  13. ;=============================================================================
  14. ; English strings
  15.  
  16. (set default_lang 4)
  17.  
  18. (set #bad-kick
  19. (cat "You must be using Kickstart 2.04 to install using this script!"
  20. ))
  21.  
  22. (set #copying-reqtools     "Copying reqtools.library to Libs:...")
  23. (set #copying-toolsdaemon    "Copying ToolsDaemon to SYS:WbStartup...")
  24. (set #copying-handler        "Copying ToolsDaemon-Handler to L:...")
  25.  
  26. (set #where-prefs "In which drawer should ToolsPrefs be installed ?")
  27.  
  28. (set #which-language
  29. (cat "\nWhich languages should be installed?"
  30. ))
  31. (set #which-language-help
  32. (cat "\nThe Amiga can be operated in many different"
  33.       " languages. If you want Spot to use the same"
  34.      " language as the Amiga Workbench"
  35.       " then a catalog file must be copied to your"
  36.       " harddisk for each language supported.\n\n"
  37.       "To reduce the amount of space consumed by the"
  38.       " language files, you can select to have only the"
  39.       " files of specific languages copied.\n\n"
  40.       "Simply check the boxes of the languages you wish"
  41.       " to have available on your system.\n\n"
  42.       @askoptions-help
  43. ))
  44.  
  45. (set #install-msg
  46. (cat "\n\nToolsDaemon installation script.\n"
  47.      "This script installs ToolsDaemon on your Amiga.\n\n"
  48.      "Read the documentation for more information\n"
  49.      "on the distribution of ToolsDaemon.\n\n"
  50.      "ToolsDaemon © 1991-1993 Nico François\n"
  51.      "All rights reserved."
  52. ))
  53.  
  54. ;=============================================================================
  55. ; make sure we are running under a 2.04 ROM
  56.  
  57. (if (< (/ (getversion) 65536) 37)
  58. (
  59.     (abort #bad-kick)
  60. ))
  61.  
  62. ;=============================================================================
  63.  
  64. (message #install-msg)
  65.  
  66. (copylib
  67.     (prompt "\n" #copying-reqtools)
  68.     (help @copylib-help)
  69.     (source reqtoolslib)
  70.     (dest "Libs:")
  71.     (confirm)
  72. )
  73.  
  74. (copylib
  75.     (prompt "\n" #copying-handler)
  76.     (help @copylib-help)
  77.     (source handler)
  78.     (dest "L:")
  79.     (confirm)
  80. )
  81.  
  82. (copylib
  83.     (prompt "\n" #copying-toolsdaemon)
  84.     (help @copylib-help)
  85.     (source toolsdaemon)
  86.     (dest "SYS:WbStartup")
  87.     (confirm)
  88.     (infos)
  89. )
  90.  
  91. (set prefsdir
  92.     (askdir
  93.         (prompt #where-prefs)
  94.         (help @askdir-help)
  95.         (default "SYS:Prefs")
  96.     )
  97. )
  98.  
  99. (copyfiles
  100.     (source toolsprefs)
  101.     (dest prefsdir)
  102.     (infos)
  103.     (noposition)
  104. )
  105.  
  106. (if (exists "SYS:Locale")
  107. (
  108.     (if (exists "LOCALE:")
  109.     (
  110.         (user 2)
  111.         (set lang (askoptions (prompt #which-language)
  112.                                      (help #which-language-help)
  113.                                      (choices
  114.                                          "Dansk"
  115.                                          "Deutsch"
  116.                                          "English"
  117.                                          "Français"
  118.                                          "Nederlands"
  119.                                          "Svenska")
  120.                                    (default default_lang)
  121.                      )
  122.         )
  123.         (user old_level)
  124.  
  125.         (set n 0)
  126.         (while (set language (select n
  127.                                         "dansk"
  128.                                         "deutsch"
  129.                                         "english"
  130.                                         "français"
  131.                                         "nederlands"
  132.                                         "svenska"
  133.                                         ""))
  134.         (
  135.             (if (IN lang n)
  136.             (
  137.                 (if (<> 2 n)
  138.                 (
  139.                     (makedir (cat "LOCALE:Catalogs/" language))
  140.                     (copyfiles (source (cat catalogdir language))
  141.                                   (dest (cat "LOCALE:Catalogs/" language))
  142.                                   (all)
  143.                     )
  144.                 ))
  145.             ))
  146.             (set n (+ n 1))
  147.         ))
  148.     ))
  149. ))
  150.