home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / TextEditors&Viewers / Texteditors / Words23.lha / Words / Install < prev    next >
Encoding:
Text File  |  1995-06-15  |  13.2 KB  |  436 lines

  1. ; $VER: Words 2 (15 JUN 95)
  2. ; Installer script ©1995 Dietmar Eilert
  3.  
  4. (delopts "oknodelete" "force" "askuser")
  5. (complete 0)
  6.  
  7. (onerror (
  8.  
  9.     (if (> @ioerr 0) 
  10.  
  11.         " Some error has occurred. Please inform a GoldED \n"
  12.         " support site (e.g. dietmar@tomate.tng.oche.de)  \n"
  13.         " AFTER having tried a different Installer release\n"
  14.         " (1.24 is known to work fine).                   \n"
  15.     )
  16. ))
  17.  
  18. (if (exists "GOLDED:" (NOREQ))
  19.  
  20.     (
  21.         (set vernum (getversion "golded:golded"))
  22.  
  23.         (set ver (/ vernum 65536))
  24.         (set rev (- vernum (* ver 65536)))
  25.  
  26.         (set version (+ (* 10 ver) rev))
  27.  
  28.         (if (< version 21)
  29.  
  30.             (
  31.                 (message "\nSorry, GoldED 2.1.0 or better required")
  32.                 (exit (quiet))
  33.             )
  34.         )
  35.  
  36.         (complete 5)
  37.  
  38.         (message (cat "\n"
  39.  
  40.             "Words 2.3 (Spell Checking Package)           \n"
  41.             "                                             \n"
  42.             "©1992-1995 Heinz Knutzen                     \n"
  43.             "           Martin Schulz,                    \n"
  44.             "           Loren J. Rittle                   \n"
  45.             "           Dietmar Eilert                    \n"
  46.             "                                             \n"
  47.             "All Rights Reserved. Commercial distribution \n"
  48.             "not allowed. All files are the property of   \n"
  49.             "their authors. Parts of this package are NOT \n"
  50.             "freeware. Ask for permission first if you    \n"
  51.             "intend to distribute this software. Thanks.  \n"
  52.         ))
  53.  
  54.         (complete 10)
  55.  
  56.         (set action (askoptions
  57.  
  58.             (prompt "Select parts to be installed")
  59.  
  60.             (help @askoptions-help)
  61.  
  62.             (default 3)
  63.  
  64.             (choices
  65.  
  66.                 "install binaries"
  67.                 "install German dictionary"
  68.                 "install English dictionary"
  69.             )
  70.         ))
  71.  
  72.         (complete 15)
  73.  
  74.         (if (exists "GoldED:API/SpellIT")
  75.  
  76.             (delete "GoldED:API/SpellIT/Manuel" (infos))
  77.  
  78.             (makedir "GoldED:API/SpellIT" (infos))
  79.         )
  80.  
  81.         ; install ISpell & SpellIT
  82.  
  83.         (if (in action 0) (
  84.  
  85.             (set target (askdir
  86.  
  87.                 (prompt  "Where do you want to have ISpell installed ?")
  88.                 (help    "Please specify a valid command path")
  89.                 (default "c:")
  90.             ))
  91.  
  92.             (complete 20)
  93.  
  94.             (copyfiles
  95.  
  96.                 (source "ISpell/c/ispell")
  97.                 (dest    target)
  98.             )
  99.  
  100.             (complete 25)
  101.  
  102.             (if (not (exists "locale:" (noreq))) (
  103.  
  104.                 (if (not (exists "sys:locale")) (makedir "sys:locale"))
  105.  
  106.                 (makeassign "locale" "sys:locale")
  107.             ))
  108.  
  109.             (copyfiles
  110.  
  111.                 (source "SpellIT/locale")
  112.                 (dest "locale:")
  113.                 (all)
  114.             )
  115.  
  116.             (copyfiles
  117.  
  118.                 (source "SpellIT")
  119.                 (dest   "GoldED:API/SpellIT")
  120.                 (pattern "(Anleitung|Manual|Manuel|SpellIT|Licence|presets|#?.info)")
  121.             )
  122.  
  123.             (complete 30)
  124.  
  125.         ))
  126.  
  127.         ; install German dictionary
  128.  
  129.         (complete 35)
  130.  
  131.         (if (in action 1) (
  132.  
  133.             (set partsA (askoptions
  134.  
  135.                 (prompt "Select German dictionaries to install (1/2)")
  136.  
  137.                 (help (cat "\n"
  138.  
  139.                     " The more dictionaries you select, the more\n"
  140.                     " memory ISpell will use. File sized listed \n"
  141.                     " do NOT equal memory requirements - memory \n"
  142.                     " requirements are about three times higher.\n"
  143.                 ))
  144.  
  145.                 (choices
  146.  
  147.                     "Substantive        (250 K)"
  148.                     "Verben             (120 K)"
  149.                     "Adjektive & Co     ( 10 K)"
  150.                     "Zusammensetzungen  (550 K)"
  151.                     "Geographie         ( 15 K)"
  152.                     "Namen              (  5 K)"
  153.                     "Abkuerzungen       (  1 K)"
  154.                     "Imperative         (  1 K)"
  155.                     "Latein             (  1 K)"
  156.                 )
  157.  
  158.                 (default 503)
  159.             ))
  160.  
  161.             (complete 40)
  162.  
  163.             (set partsB (askoptions
  164.  
  165.                 (prompt "Select German dictionaries to install (2/2)")
  166.  
  167.                 (help (cat "\n"
  168.  
  169.                     " The more dictionaries you select, the more\n"
  170.                     " memory ISpell will use. File sized listed \n"
  171.                     " do NOT equal memory requirements - memory \n"
  172.                     " requirements are about three times higher.\n"
  173.                 ))
  174.  
  175.                 (choices
  176.  
  177.                     "Informatik, EDV    ( 25 K)"
  178.                     "Elektronik         ( 10 K)"
  179.                     "Organisationen     (  1 K)"
  180.                     "Marken             (  1 K)"
  181.                     "Griechisch         (  1 K)"
  182.                     "Roemische Zahlen   (  1 K)"
  183.                     "Technik            (  2 K)"
  184.                     "Seltenes           ( 10 K)"
  185.                 )
  186.  
  187.                 (default 12)
  188.             ))
  189.  
  190.             (complete 45)
  191.  
  192.             (if (or (<> partsA 0) (<> partsB 0)) (
  193.  
  194.                 (working "\nCreating dictionary, sorting entries. May take a couple of minutes.\n")
  195.  
  196.                 (delete "words/all.words.cnt")
  197.                 (delete "words/all.words.stat")
  198.  
  199.                 (set cmd "bin/joinsorted >con://///AUTO DIR=words/data as=words/all.words ")
  200.  
  201.                 (if (in partsA 0) (set cmd (cat cmd "worte.txt "      )))
  202.                 (if (in partsA 1) (set cmd (cat cmd "verben.txt "     )))
  203.                 (if (in partsA 2) (set cmd (cat cmd "klein.txt "      )))
  204.                 (if (in partsA 2) (set cmd (cat cmd "adjektive.txt "  )))
  205.                 (if (in partsA 3) (set cmd (cat cmd "zusammen.txt "   )))
  206.                 (if (in partsA 4) (set cmd (cat cmd "geographie.txt " )))
  207.                 (if (in partsA 4) (set cmd (cat cmd "geogra2.txt "    )))
  208.                 (if (in partsA 5) (set cmd (cat cmd "namen.txt "      )))
  209.                 (if (in partsA 5) (set cmd (cat cmd "vornamen.txt "   )))
  210.                 (if (in partsA 5) (set cmd (cat cmd "vornam2.txt "    )))
  211.                 (if (in partsA 6) (set cmd (cat cmd "abkuerz.txt "    )))
  212.                 (if (in partsA 6) (set cmd (cat cmd "abkuerz2.txt "   )))
  213.                 (if (in partsA 7) (set cmd (cat cmd "imperat.txt "    )))
  214.                 (if (in partsA 8) (set cmd (cat cmd "latein.txt "     )))
  215.  
  216.                 (if (in partsB 0) (set cmd (cat cmd "compeng.txt "    )))
  217.                 (if (in partsB 0) (set cmd (cat cmd "infoabk.txt "    )))
  218.                 (if (in partsB 0) (set cmd (cat cmd "informatik.txt " )))
  219.                 (if (in partsB 1) (set cmd (cat cmd "elektronik.txt " )))
  220.                 (if (in partsB 2) (set cmd (cat cmd "orgabk.txt "     )))
  221.                 (if (in partsB 3) (set cmd (cat cmd "marken.txt "     )))
  222.                 (if (in partsB 4) (set cmd (cat cmd "alphabeta.txt "  )))
  223.                 (if (in partsB 5) (set cmd (cat cmd "roemisch.txt "   )))
  224.                 (if (in partsB 6) (set cmd (cat cmd "technik.txt "    )))
  225.                 (if (in partsB 7) (set cmd (cat cmd "seltenes.txt "   )))
  226.  
  227.                 (run cmd)
  228.  
  229.                 ; removing stuff not supported by the Amiga version of ISpell
  230.  
  231.                 (complete 50)
  232.  
  233.                 (working "\nChecking dictionary. May take a couple of minutes.\n")
  234.  
  235.                 (run "bin/ifilter >con://///AUTO FILE=words/all.words NOTEX NOFLAGS")
  236.  
  237.                 (complete 55)
  238.  
  239.                 (if (exists "words/all.words" (noreq))
  240.  
  241.                     (
  242.                         (if (exists "s:deutsch.hash")
  243.  
  244.                             (set remove (askbool
  245.  
  246.                                 (prompt "\nOverwrite old hash file (s:deutsch.hash) ?")
  247.  
  248.                                 (help "You might want to backup your old file :-)")
  249.  
  250.                                 (choices
  251.  
  252.                                     "overwrite"
  253.                                     "exit"
  254.                                 )
  255.                             ))
  256.  
  257.                             (set remove 1);
  258.                         )
  259.  
  260.                         (if (= remove 1)
  261.  
  262.                             (
  263.                                 (working "\nCreating hash file supporting fast data access. May take a couple of minutes.\n")
  264.  
  265.                                 (run "ispell/c/buildhash >con:////buildhash/AUTO words/all.words s:deutsch.hash")
  266.  
  267.                                 (complete 60)
  268.  
  269.                                 (if (exists "s:deutsch.hash")
  270.  
  271.                                     (message (cat "\nHash file 's:deutsch.hash' has been created successfully. Hash file size (ISpell RAM usage):\n\n" (getsize "s:deutsch.hash") " Bytes"))
  272.  
  273.                                     (
  274.  
  275.                                         (message "\nFatal error: hash file creation failed.\n")
  276.  
  277.                                         (delete "words/all.words")
  278.  
  279.                                         (exit (quiet))
  280.                                     )
  281.                                 )
  282.                             )
  283.                         )
  284.  
  285.                         (complete 65)
  286.  
  287.                         (delete "words/all.words")
  288.                     )
  289.  
  290.                     (
  291.                         (message "\nFatal error - dictionary creation failed.")
  292.  
  293.                         (exit (quiet))
  294.                     )
  295.                 )
  296.             ))
  297.         ))
  298.  
  299.         ; install English dictionary
  300.  
  301.         (complete 70)
  302.  
  303.         (if (in action 2) (
  304.  
  305.             (set partsA (askoptions
  306.  
  307.                 (prompt "Select English dictionaries to install")
  308.  
  309.                 (help (cat "\n"
  310.  
  311.                     " The more dictionaries you select, the more\n"
  312.                     " memory ISpell will use. File sized listed \n"
  313.                     " do NOT equal memory requirements - memory \n"
  314.                     " requirements are about three times higher.\n"
  315.                 ))
  316.  
  317.                 (choices
  318.  
  319.                     "all-purpose dictionary (250 K)"
  320.                 )
  321.  
  322.                 (default 1)
  323.             ))
  324.  
  325.             (complete 75)
  326.  
  327.             (if (<> partsA 0) (
  328.  
  329.                 (working "\nCreating dictionary, sorting entries. May take a couple of minutes.\n")
  330.  
  331.                 (delete "words/all.words.cnt")
  332.                 (delete "words/all.words.stat")
  333.  
  334.                 (set cmd "bin/joinsorted >con://///AUTO DIR=words/data as=words/all.words ")
  335.  
  336.                 (if (in partsA 0) (set cmd (cat cmd "english.txt")))
  337.  
  338.                 (run cmd)
  339.  
  340.                 ; removing stuff not supported by the Amiga version of ISpell
  341.  
  342.                 (complete 80)
  343.  
  344.                 (working "\nChecking dictionary. May take a couple of minutes.\n")
  345.  
  346.                 (run "bin/ifilter >con://///AUTO FILE=words/all.words NOTEX")
  347.  
  348.                 (complete 85)
  349.  
  350.                 (if (exists "words/all.words" (noreq))
  351.  
  352.                     (
  353.                         (if (exists "s:english.hash")
  354.  
  355.                             (set remove (askbool
  356.  
  357.                                 (prompt "\nOverwrite old hash file (s:english.hash) ?")
  358.  
  359.                                 (help "You might want to backup your old file :-)")
  360.  
  361.                                 (choices
  362.  
  363.                                     "overwrite"
  364.                                     "exit"
  365.                                 )
  366.                             ))
  367.  
  368.                             (set remove 1);
  369.                         )
  370.  
  371.                         (if (= remove 1)
  372.  
  373.                             (
  374.                                 (working "\nCreating hash file supporting fast data access. May take a couple of minutes.\n")
  375.  
  376.                                 (run "ispell/c/buildhash >con:////buildhash/AUTO words/all.words s:english.hash")
  377.  
  378.                                 (complete 90)
  379.  
  380.                                 (if (exists "s:english.hash")
  381.  
  382.                                     (message (cat "\nHash file 's:english.hash' has been created successfully. Hash file size (ISpell RAM usage):\n\n" (getsize "s:english.hash") " Bytes"))
  383.  
  384.                                     (
  385.  
  386.                                         (message "\nFatal error: hash file creation failed.\n")
  387.  
  388.                                         (delete "words/all.words")
  389.  
  390.                                         (exit (quiet))
  391.                                     )
  392.                                 )
  393.                             )
  394.                         )
  395.  
  396.                         (complete 95)
  397.  
  398.                         (delete "words/all.words")
  399.                     )
  400.  
  401.                     (
  402.                         (message "\nFatal error - dictionary creation failed.")
  403.  
  404.                         (exit (quiet))
  405.                     )
  406.                 )
  407.             ))
  408.         ))
  409.  
  410.         (complete 100)
  411.  
  412.         (message "\nInstallation done. Have fun :-)")
  413.  
  414.         (if (in action 0)
  415.  
  416.             (
  417.                (if (in action 1)
  418.  
  419.                    (run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_d.ged\"")))
  420.                    (run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_e.ged\"")))
  421.                )
  422.             )
  423.         )
  424.     )
  425.  
  426.     (message (cat "\n"
  427.  
  428.         " Please install GoldED Release 2+ before\n"
  429.         " attempting to install this package.    \n"
  430.     ))
  431. )
  432.  
  433. (exit (quiet))
  434.  
  435. (welcome)
  436.