home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 124 / af124a.adf / af124a.lzx / PowerSnap / Install next >
Text File  |  1999-03-29  |  3KB  |  121 lines

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