home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / fish / disks / d1084.lha / Programs / MathScript / Install < prev    next >
Text File  |  1995-04-12  |  9KB  |  185 lines

  1. (SET rexxhelp "This will copy some example ARexx scripts to your \"Rexx\" directory")
  2. (SET languagehelp "Beginnig with OS 2.1 MathScript can be localized to your local language. English is built-in and so always available.\nWith OS 2.1 the following languages are also available:\ndeutsch\nfrançais")
  3. (SET formulahelp "This will copy some example formulas to your \"Formulas\" directory")
  4. (SET iconhelp "You can choose between two kinds of icons: Standard icons and MagicWB icons.\nMagicWB installs 8-color icons styled like the original MagicWB icons.\nOnly use this option if you have MagicWB installed to your system.\n\nMagicWB ©Copyright Martin Huttenloher") 
  5. (SET startuphelp "MathScript needs an assign pointing to its directory to operate correctly. By selecting PROCEED an assign will be added to your User-Startup file to make this assign everytime you boot")
  6. (SET docshelp "The MathScript package includes AmigaGuide Documents in the following languages:\nenglish\ndeutsch")
  7. (SET doctype_help "AmigaGuide is the standard hypertext format.\nIt has to be displayed by either Multiview or AmigaGuide.\n\nYou must specify this option if you want Online Help!")
  8. (SET NoGuide_help "If you select \"No\" the documentation will be installed in the AmigaGuide format. Otherwise a plain Ascii documentation will be installed!\n\n")
  9. (SET install_type_help "If you have a previous version of MathScript installed completely (!), select \"Update\" else \"Full Installation\"!")
  10. (SET postlib_help "This copies the post.library (68000 version) to your Libs: directory\nIt is required!")
  11.  
  12.  
  13. (SET install_type 0)
  14.  
  15. (IF (EXISTS "MathScript:MathScript" (NOREQ))
  16.         (
  17.         (SET install_type (ASKCHOICE (PROMPT "MathScript has been detected on your system! Which type of Installation do you want?") (CHOICES "Full Installation" "Update") (HELP install_type_help) (DEFAULT 1)))
  18.         ))
  19.  
  20. (IF (= install_type 1)
  21. (
  22. (SET ziel "MathScript:")
  23. (SET @default-dest ziel)
  24. (RUN "delete MathScript:docs ALL")
  25. (RUN "delete MathScript:icons ALL")
  26. (MAKEDIR "MathScript:Docs")
  27. )
  28. (
  29. (SET ziel (ASKDIR (PROMPT "Where shall the directory 'MathScript' be created?") (HELP @askdir-help) (DEFAULT @default-dest) ))
  30. (SET ziel (TACKON ziel "MathScript"))
  31. (SET @default-dest ziel)
  32. (MAKEDIR ziel)
  33. (MAKEDIR (TACKON ziel "rexx"))
  34. (MAKEDIR (TACKON ziel "Formulas") (INFOS))
  35. (MAKEDIR (TACKON ziel "icons") (INFOS))
  36. (MAKEDIR (TACKON ziel "Docs") (INFOS))
  37. (MAKEDIR (TACKON ziel "Catalogs"))
  38. ))
  39.  
  40. (COPYFILES (SOURCE "MathScript") (DEST ziel) (INFOS))
  41. (COPYFILES (SOURCE "fonts") (ALL) (Dest (TACKON ziel "fonts")))
  42. (COPYFILES (SOURCE "init.ps") (DEST ziel))
  43. (COPYFILES (SOURCE "metrics") (DEST ziel))
  44. (COPYFILES (SOURCE "PSFont") (DEST ziel))
  45. (COPYFILES (SOURCE "MathScript.prefs") (DEST ziel))
  46. (COPYLIB (SOURCE "post.library") (DEST "Libs:") (HELP postlib_help) (CONFIRM 2) (PROMPT "Install post.library? (68000 version)"))
  47. (IF (EXISTS "MathScript.key" (NOREQ))
  48.         (COPYFILES (SOURCE "MathScript.key") (DEST ziel)))
  49.  
  50. (IF (>= (SUBSTR (GETENV "Workbench") 0 2) 38)   ; ab OS 2.1
  51.         (
  52.         (SET sprachen (ASKOPTIONS (PROMPT "Which additional languages shall be installed?") (HELP languagehelp)
  53.                 (CHOICES "deutsch" "français" "svenska" "suomi") ))
  54.  
  55.         (if (IN sprachen 0)
  56.                 (COPYFILES (SOURCE "Catalogs/deutsch/MathScript.catalog") (DEST (TACKON ziel "Catalogs/deutsch"))))
  57.         (IF (IN sprachen 1)
  58.                 (COPYFILES (SOURCE "Catalogs/français/MathScript.catalog") (DEST (TACKON ziel "Catalogs/français"))))
  59.         (if (IN sprachen 2)
  60.                 (COPYFILES (SOURCE "Catalogs/svenska/MathScript.catalog") (DEST (TACKON ziel "Catalogs/svenska"))))
  61.         (if (IN sprachen 3)
  62.                 (COPYFILES (SOURCE "Catalogs/suomi/MathScript.catalog") (DEST (TACKON ziel "Catalogs/suomi"))))
  63.  
  64.  
  65.  
  66.  
  67.         (COPYFILES (SOURCE "Catalogs/readme") (DEST (TACKON ziel "Catalogs")))
  68.         (COPYFILES (SOURCE "Catalogs/newlanguage.ct") (DEST (TACKON ziel "Catalogs")))
  69.         )
  70. )
  71.  
  72. (SET apps (ASKOPTIONS (PROMPT "Which applications do you want to use with MathScript?") (HELP apphelp) (CHOICES "FinalWriter")))
  73. (IF (IN apps 0)
  74.         (
  75.         (COPYFILES (SOURCE "Rexx/OpenMathScript.ms") (DEST (TACKON ziel "Rexx")))
  76.         (COPYFILES (SOURCE "Rexx/InsertFormula.ms") (DEST (TACKON ziel "Rexx")))
  77.         (COPYFILES (SOURCE "Rexx/CloseMathScript.ms") (DEST (TACKON ziel "Rexx")))
  78.         )
  79. )
  80.  
  81. (IF (EXISTS "sys:utilities/Multiview")
  82.         (SET def-tool "SYS:Utilities/Multiview")
  83.         (IF (EXISTS "sys:utilities/AmigaGuide")
  84.                 (SET def-tool "SYS:Utilities/AmigaGuide")
  85.                 (SET def-tool "more"))
  86. )
  87. (SET docs (ASKCHOICE (PROMPT "In which languages shall the Doc files be installed?") (HELP docshelp) 
  88.         (CHOICES "english" "deutsch")))
  89. (IF (= @user-level 2) 
  90.         (SET type (ASKOPTIONS (PROMPT "Which type of document shall be installed?") (HELP doctype_help) (CHOICES "AmigaGuide" "Ascii") (DEFAULT 1)))
  91.         (
  92.         (IF (= def-tool "more")
  93.                 (
  94.                 (SET type (ASKBOOL (prompt "Neither Multiview nor AmigaGuide was found! Shall the documentation be installed as ASCII ?") (help (CAT NoGuide_help doctype_help)) (choices "Yes" "No")))
  95.                 (IF (= type 1) (SET type 2) (SET type 1) )
  96.                 )       
  97.                 (SET type 1)
  98.                 )
  99.         ))
  100. (IF (= def-tool "more") (SET def-tool "AmigaGuide"))
  101. ;type AND 010 -> DOK ; type AND 001 -> GUIDE 
  102.  
  103. (IF (= docs 0)
  104.         (
  105.         (IF (IN type 0)         
  106.                 (
  107.                 (COPYFILES (SOURCE "Docs/english/MathScript.guide") (DEST (TACKON ziel "Docs")) (INFOS))
  108.                 (TOOLTYPE (DEST (TACKON ziel "Docs/MathScript.guide")) (SETDEFAULTTOOL def-tool))
  109.                 (IF (IN apps 0) 
  110.                         (
  111.                         (COPYFILES (SOURCE "Docs/english/FinalWriter.guide") (DEST (TACKON ziel "Docs")) (INFOS))
  112.                         (TOOLTYPE (DEST (TACKON ziel "Docs/FinalWriter.guide")) (SETDEFAULTTOOL def-tool))
  113.                         ))
  114.                 ))
  115.         (IF (IN type 1)         
  116.                 (
  117.                 (COPYFILES (SOURCE "Docs/english/MathScript.doc") (DEST (TACKON ziel "Docs")) (INFOS))
  118.                 (IF (IN apps 0) (COPYFILES (SOURCE "Docs/english/FinalWriter.doc") (DEST (TACKON ziel "Docs")) (INFOS)))
  119.                 ))
  120.         ))
  121. (IF (= docs 1)
  122.         (
  123.         (IF (IN type 0)         
  124.                 (
  125.                 (COPYFILES (SOURCE "Docs/deutsch/MathScript.guide") (DEST (TACKON ziel "Docs")) (INFOS))
  126.                 (TOOLTYPE (DEST (TACKON ziel "Docs/MathScript.guide")) (SETDEFAULTTOOL def-tool))
  127.                 (IF (IN apps 0) 
  128.                         (
  129.                         (COPYFILES (SOURCE "Docs/deutsch/FinalWriter.guide") (DEST (TACKON ziel "Docs")) (INFOS))
  130.                         (TOOLTYPE (DEST (TACKON ziel "Docs/FinalWriter.guide")) (SETDEFAULTTOOL def-tool))
  131.                         ))
  132.  
  133.                 ))
  134.         (IF (IN type 1)         
  135.                 (
  136.                 (COPYFILES (SOURCE "Docs/deutsch/MathScript.dok") (DEST (TACKON ziel "Docs")) (INFOS))
  137.                 (IF (IN apps 0) (COPYFILES (SOURCE "Docs/deutsch/FinalWriter.dok") (DEST (TACKON ziel "Docs")) (INFOS)))
  138.                 ))
  139.         ))
  140. (COPYFILES (SOURCE "Docs/Changes") (DEST (TACKON ziel "Docs")) (INFOS))
  141.  
  142. (SET icon (ASKCHOICE (PROMPT "Which icons shall be used?") (CHOICES "Standard" "MagicWB") (HELP iconhelp)))
  143. (IF (= icon 0)
  144.         (
  145.         (COPYFILES (SOURCE "icons/def_FML.info") (DEST (TACKON ziel "icons")) (INFOS) )
  146.         (COPYFILES (SOURCE "icons/def_PS.info") (DEST (TACKON ziel "icons")) (INFOS) )
  147.         (COPYFILES (SOURCE "icons/def_EPS.info") (DEST (TACKON ziel "icons")) (INFOS) )
  148.         (COPYFILES (SOURCE "icons/def_IFF.info") (DEST (TACKON ziel "icons")) (INFOS) )
  149.         (COPYFILES (SOURCE "icons/def_TIFF.info") (DEST (TACKON ziel "icons")) (INFOS) )
  150.         (COPYFILES (SOURCE "icons/MathScript.info") (DEST ziel ) (INFOS) )
  151.         )
  152.         (
  153.         (COPYFILES (SOURCE "icons/def_FML8.info") (DEST (TACKON ziel "icons")) (NEWNAME "def_FML.info") (INFOS) )
  154.         (COPYFILES (SOURCE "icons/def_PS8.info") (DEST (TACKON ziel "icons")) (NEWNAME "def_PS.info") (INFOS) )
  155.         (COPYFILES (SOURCE "icons/def_EPS8.info") (DEST (TACKON ziel "icons")) (NEWNAME "def_EPS.info") (INFOS) )
  156.         (COPYFILES (SOURCE "icons/def_IFF8.info") (DEST (TACKON ziel "icons")) (NEWNAME "def_IFF.info") (INFOS) )
  157.         (COPYFILES (SOURCE "icons/def_TIFF8.info") (DEST (TACKON ziel "icons")) (NEWNAME "def_TIFF.info") (INFOS) )
  158.         (COPYFILES (SOURCE "icons/MathScript8.info") (DEST ziel) (NEWNAME "MathScript.info") (INFOS))
  159.         )
  160. )
  161.  
  162. (IF (ASKBOOL (PROMPT "Shall the example formulas be installed?") (HELP formulahelp))
  163.         (COPYFILES (SOURCE "Formulas") (DEST (TACKON ziel "Formulas")) (ALL)))    
  164.  
  165.  
  166.  
  167.  
  168. (if (= install_type 0)
  169. (
  170. (STARTUP "MathScript" (PROMPT "Assigns called 'MathScript:' and 'PSFonts:' are needed to use the program. Shall they be added to your User-Startup?") (HELP startuphelp) (COMMAND (CAT "Assign MathScript: " ziel) "\n" (CAT "Assign PSFonts: " (CAT "MathScript: " "add"))) )
  171. (MAKEASSIGN "MathScript" ziel)
  172. (MAKEASSIGN "PSFonts" ziel)
  173. )
  174. )
  175.  
  176. (IF (IN sprachen 0)
  177.         (IF (> (RUN "sys:utilities/multiview liesmich") 0)
  178.                 (RUN "ed liesmich"))
  179.         (IF (> (RUN "sys:utilities/multiview readme") 0)
  180.                 (RUN "ed readme"))
  181. )
  182.  
  183. (EXIT)
  184.  
  185.