home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 3
/
goldfish_volume_3.bin
/
files
/
text
/
edit
/
words
/
install
< prev
next >
Wrap
Text File
|
1995-09-03
|
18KB
|
585 lines
; $VER: Words 3 (6 AUG 95)
; Installer script ©1995 Dietmar Eilert
(delopts "oknodelete" "force" "askuser")
(complete 0)
(onerror (
(if (> @ioerr 0)
" Some error has occurred. Please inform a GoldED \n"
" support site (e.g. dietmar@tomate.tng.oche.de) \n"
" AFTER having tried a different Installer release\n"
" (1.24 is known to work fine). \n"
)
))
(if (exists "GOLDED:" (NOREQ))
(
(set vernum (getversion "golded:golded"))
(set ver (/ vernum 65536))
(set rev (- vernum (* ver 65536)))
(set version (+ (* 10 ver) rev))
(if (< version 30)
(
(message "\nSorry, GoldED 3.0.0 or better required")
(exit (quiet))
)
)
(if (not (exists "libs/ixemul.library"))
(if (not (exists "libs:ixemul.library"))
(
(message "\nSorry, libs:ixemul.library required.")
(exit (quiet))
)
)
)
(complete 5)
(message (cat "\n"
"Words 3.0 - Spell Checking Software \n"
" \n"
"Authors: Heinz Knutzen, Martin Schulz, Loren \n"
"J. Rittle, Jesper Skov, Dietmar Eilert \n"
" \n"
"Words 3.0 is a collection of spell checking \n"
"software by various authors ready to be used \n"
"with GoldED. Commercial distribution not \n"
"allowed. All files are the property of their \n"
"authors unless stated otherwise. \n"
" \n"
"ABOUT 4 MB RAM REQUIRED DURING INSTALLATION !\n"
))
(welcome)
(complete 10)
(set action (askoptions
(prompt "Select parts to be installed")
(help @askoptions-help)
(default 1)
(choices
"install binaries"
"install German dictionary"
"install English dictionary"
)
))
(complete 15)
(if (exists "GoldED:API/SpellIT")
(delete "GoldED:API/SpellIT/Manuel" (infos))
(makedir "GoldED:API/SpellIT" (infos))
)
; install binaries
(if (in action 0) (
; install syntax parser
(copyfiles
(source "warpspell/parser")
(dest "golded:syntax")
(all)
)
(copyfiles
(source "warpspell/presets")
(dest "golded:presets")
(all)
)
(if (exists "golded:syntax/developer/source")
(if (not (exists "golded:syntax/developer/source/example_warpSPELL"))
(makedir "golded:syntax/developer/source/example_warpSPELL")
)
)
(copyfiles
(source "warpspell/source")
(dest "golded:syntax/developer/source/example_warpSPELL")
(all)
)
(if (exists "libs/ixemul.library")
; install ixemul.library (required by ISpell)
(copylib
(prompt "Install ixemul.library ?")
(source "libs/ixemul.library")
(dest "libs:")
(help @copylib-help)
(confirm)
)
)
; install ISpell & SpellIT
(if (exists "ispell:" (quiet))
(set target (pathonly (expandpath "ispell:")))
(set target "sys:")
)
(set target (askdir
(prompt (cat "\n"
"Where do you want to have ISpell installed ?\n"
))
(help "A new drawer is created in the path you specify.")
(default target)
))
; $HOME is required by ISpell
(if (= (getenv "HOME") "")
(run "echo >envarc:HOME sys:")
)
(complete 20)
(set target (tackon target "ispell"))
(if (not (exists target))
(makedir target)
)
(makeassign "ispell" target)
(if (not (exists "ispell:bin"))
(makedir "ispell:bin")
)
(if (not (exists "ispell:lib"))
(makedir "ispell:lib")
)
(if (not (exists "ispell:doc"))
(makedir "ispell:doc")
)
(startup "WORDS"
(prompt "Add ISpell: assign to your user-startup ?")
(help @startup-help)
(command ("ASSIGN >NIL: ispell: %s\nPATH ISPELL:BIN ADD" target))
)
(copyfiles
(source "ISpell/doc")
(dest "ispell:doc")
(all)
)
(copyfiles
(source "ISpell/bin")
(dest "ispell:bin")
(all)
)
(complete 25)
(if (not (exists "locale:" (noreq))) (
(if (not (exists "sys:locale")) (makedir "sys:locale"))
(makeassign "locale" "sys:locale")
))
(copyfiles
(source "SpellIT/locale")
(dest "locale:")
(all)
)
(copyfiles
(source "SpellIT")
(dest "GoldED:API/SpellIT")
(pattern "(Anleitung|Manual|Manuel|SpellIT|Licence|presets|#?.info)")
)
(complete 30)
))
; install German dictionary
(complete 35)
(if (in action 1) (
(set partsA (askoptions
(prompt "Select German dictionaries to be installed (1)")
(help (cat "\n"
" The more dictionaries you select, the more\n"
" memory ISpell will use. File sized listed \n"
" do NOT equal memory requirements - memory \n"
" requirements are about three times higher.\n"
))
(choices
"Substantive (250 K)"
"Verben (120 K)"
"Adjektive & Co ( 10 K)"
"Zusammensetzungen (550 K)"
"Geographie ( 15 K)"
"Namen ( 5 K)"
"Abkuerzungen ( 1 K)"
"Imperative ( 1 K)"
"Latein ( 1 K)"
)
(default 503)
))
(complete 40)
(set partsB (askoptions
(prompt "Select German dictionaries to be installed (2)")
(help (cat "\n"
" The more dictionaries you select, the more\n"
" memory ISpell will use. File sized listed \n"
" do NOT equal memory requirements - memory \n"
" requirements are about three times higher.\n"
))
(choices
"Informatik, EDV ( 25 K)"
"Elektronik ( 10 K)"
"Organisationen ( 1 K)"
"Marken ( 1 K)"
"Griechisch ( 1 K)"
"Roemische Zahlen ( 1 K)"
"Technik ( 2 K)"
"Seltenes ( 10 K)"
)
(default 12)
))
(complete 45)
(if (or (<> partsA 0) (<> partsB 0)) (
(working "\nCreating dictionary, sorting entries. May take some minutes.\n")
(delete "dictionary/deutsch/words/all.words.cnt")
(delete "dictionary/deutsch/words/all.words.stat")
(set cmd "bin/joinsorted >con://///AUTO DIR=dictionary/deutsch/words as=dictionary/deutsch/words/all.words ")
(if (in partsA 0) (set cmd (cat cmd "worte.txt " )))
(if (in partsA 1) (set cmd (cat cmd "verben.txt " )))
(if (in partsA 2) (set cmd (cat cmd "klein.txt " )))
(if (in partsA 2) (set cmd (cat cmd "adjektive.txt " )))
(if (in partsA 3) (set cmd (cat cmd "zusammen.txt " )))
(if (in partsA 4) (set cmd (cat cmd "geographie.txt " )))
(if (in partsA 4) (set cmd (cat cmd "geogra2.txt " )))
(if (in partsA 5) (set cmd (cat cmd "namen.txt " )))
(if (in partsA 5) (set cmd (cat cmd "vornamen.txt " )))
(if (in partsA 5) (set cmd (cat cmd "vornam2.txt " )))
(if (in partsA 6) (set cmd (cat cmd "abkuerz.txt " )))
(if (in partsA 6) (set cmd (cat cmd "abkuerz2.txt " )))
(if (in partsA 7) (set cmd (cat cmd "imperat.txt " )))
(if (in partsA 8) (set cmd (cat cmd "latein.txt " )))
(if (in partsB 0) (set cmd (cat cmd "compeng.txt " )))
(if (in partsB 0) (set cmd (cat cmd "infoabk.txt " )))
(if (in partsB 0) (set cmd (cat cmd "informatik.txt " )))
(if (in partsB 1) (set cmd (cat cmd "elektronik.txt " )))
(if (in partsB 2) (set cmd (cat cmd "orgabk.txt " )))
(if (in partsB 3) (set cmd (cat cmd "marken.txt " )))
(if (in partsB 4) (set cmd (cat cmd "alphabeta.txt " )))
(if (in partsB 5) (set cmd (cat cmd "roemisch.txt " )))
(if (in partsB 6) (set cmd (cat cmd "technik.txt " )))
(if (in partsB 7) (set cmd (cat cmd "seltenes.txt " )))
(run cmd)
(if (exists "dictionary/deutsch/words/all.words" (noreq))
(
(working "\nChecking dictionary. May take some minutes.\n")
(run "bin/ifilter >con://///AUTO FILE=dictionary/deutsch/words/all.words NOTEX")
(if (exists "ispell:lib/deutsch.hash")
(set remove (askbool
(prompt "\nOverwrite old hash file (ispell:lib/deutsch.hash) ?")
(help "You might want to backup your old file :-)")
(choices
"overwrite"
"exit"
)
))
(set remove 1);
)
(if (= remove 1)
(
(delete "ispell:lib/deutsch.hash")
(working "\nCreating hash file supporting fast data access. May take some minutes and LOTS of RAM.\n")
(run "ispell/bin/buildhash >NIL: -s dictionary/deutsch/words/all.words dictionary/deutsch/words/deutsch.aff ispell:lib/deutsch.hash")
(complete 60)
(if (exists "ispell:lib/deutsch.hash")
(
(copyfiles
(source "dictionary/deutsch/words/deutsch.aff")
(dest "ispell:lib")
)
(message (cat "\nHash file 'ispell:lib/deutsch.hash' has been created successfully. Hash file size (ISpell RAM usage):\n\n" (getsize "ispell:lib/deutsch.hash") " Bytes"))
)
(
(message "\nFatal error: hash file creation failed (out of RAM ?).\n")
(delete "language/deutsch/words/all.words")
(exit (quiet))
)
)
)
)
(complete 65)
(delete "dictionary/deutsch/words/all.words")
)
(
(message "\nFatal error - dictionary creation failed.")
(exit (quiet))
)
)
))
))
; install English dictionary
(complete 70)
(if (in action 2) (
(set partsA (askoptions
(prompt "Select English dictionaries to install")
(help (cat "\n"
" The more dictionaries you select, the more\n"
" memory ISpell will use. File sized listed \n"
" do NOT equal memory requirements - memory \n"
" requirements are about three times higher.\n"
))
(choices
"small (205 KB)"
"medium (355 KB)"
"large (760 KB)"
"extra large ( 1 MB)"
)
(default 2)
))
(complete 75)
(if (<> partsA 0) (
(working "\nCreating dictionary, sorting entries. May take some minutes.\n")
(delete "dictionary/english/words/all.words.cnt")
(delete "dictionary/english/words/all.words.stat")
(set cmd "bin/joinsorted >con://///AUTO DIR=dictionary/english/words as=dictionary/english/words/all.words ")
(if (> partsA 0) (set cmd (cat cmd "english.0 american.0 british.0 ")))
(if (> partsA 1) (set cmd (cat cmd "english.1 american.1 british.1 ")))
(if (> partsA 3) (set cmd (cat cmd "english.2 american.2 british.2 ")))
(if (> partsA 7) (set cmd (cat cmd "english.3 ")))
(run cmd)
(if (exists "dictionary/english/words/all.words" (noreq))
(
(if (exists "ispell:lib/english.hash")
(set remove (askbool
(prompt "\nOverwrite old hash file (ispell:lib/english.hash) ?")
(help "You might want to backup your old file :-)")
(choices
"overwrite"
"exit"
)
))
(set remove 1);
)
(if (= remove 1)
(
(delete "ispell:lib/english.hash")
(working "\nCreating hash file supporting fast data access. May take some minutes.\n")
(run "ispell/bin/buildhash >NIL: -s dictionary/english/words/all.words dictionary/english/words/english.aff ispell:lib/english.hash")
(complete 90)
(if (exists "ispell:lib/english.hash")
(
(copyfiles
(source "dictionary/english/words/english.aff")
(dest "ispell:lib")
)
(message (cat "\nHash file 'ispell:lib/english.hash' has been created successfully. Hash file size (ISpell RAM usage):\n\n" (getsize "ispell:lib/english.hash") " Bytes"))
)
(
(message "\nFatal error: hash file creation failed (out of RAM ?).\n")
(delete "dictionary/english/words/all.words")
(exit (quiet))
)
)
)
)
(complete 95)
(delete "dictionary/english/words/all.words")
)
(
(message "\nFatal error - dictionary creation failed.")
(exit (quiet))
)
)
))
))
(complete 100)
(if (in action 0)
(
(if (in action 1)
(run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_d.ged\"")))
(if (in action 2)
(run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_e.ged\"")))
(
(set language (askchoice
(prompt "Select dictionary you are going to use most:")
(help @askoptions-help)
(default 0)
(choices
"English dictionary"
"German dictionary"
)
))
(if (= language 0)
(run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_e.ged\"")))
(run (cat "gx FORCE MACRO=\"" (tackon (pathonly @icon) "auto_d.ged\"")))
)
)
)
)
)
)
)
(message (cat "\n"
" Please install GoldED Release 3+ before\n"
" attempting to install this package. \n"
))
)
(exit (quiet))