(SET rexxhelp "This will copy some example ARexx scripts to your \"Rexx\" directory")
(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")
(SET formulahelp "This will copy some example formulas to your \"Formulas\" directory")
(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")
(SET docshelp "The MathScript package includes AmigaGuide Documents in the following languages:\nenglish\ndeutsch")
(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!")
(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")
(SET install_type_help "If you have a previous version of MathScript installed completely (!), select \"Update\" else \"Full Installation\"!")
(SET postlib_help "This copies the post.library (68000 version) to your Libs: directory\nIt is required!")
(SET install_type 0)
(IF (EXISTS "MathScript:MathScript" (NOREQ))
(
(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)))
))
(IF (= install_type 1)
(
(SET ziel "MathScript:")
(SET @default-dest ziel)
(RUN "delete MathScript:docs ALL")
(RUN "delete MathScript:icons ALL")
(MAKEDIR "MathScript:Docs")
)
(
(SET ziel (ASKDIR (PROMPT "Where shall the directory 'MathScript' be created?") (HELP @askdir-help) (DEFAULT @default-dest) ))
(COPYFILES (SOURCE "Catalogs/deutsch/MathScript.catalog") (DEST (TACKON ziel "Catalogs/deutsch"))))
(IF (IN sprachen 1)
(COPYFILES (SOURCE "Catalogs/français/MathScript.catalog") (DEST (TACKON ziel "Catalogs/français"))))
(if (IN sprachen 2)
(COPYFILES (SOURCE "Catalogs/svenska/MathScript.catalog") (DEST (TACKON ziel "Catalogs/svenska"))))
(if (IN sprachen 3)
(COPYFILES (SOURCE "Catalogs/suomi/MathScript.catalog") (DEST (TACKON ziel "Catalogs/suomi"))))
(COPYFILES (SOURCE "Catalogs/readme") (DEST (TACKON ziel "Catalogs")))
(COPYFILES (SOURCE "Catalogs/newlanguage.ct") (DEST (TACKON ziel "Catalogs")))
)
)
(SET apps (ASKOPTIONS (PROMPT "Which applications do you want to use with MathScript?") (HELP apphelp) (CHOICES "FinalWriter")))
(IF (IN apps 0)
(
(COPYFILES (SOURCE "Rexx/OpenMathScript.ms") (DEST (TACKON ziel "Rexx")))
(COPYFILES (SOURCE "Rexx/InsertFormula.ms") (DEST (TACKON ziel "Rexx")))
(COPYFILES (SOURCE "Rexx/CloseMathScript.ms") (DEST (TACKON ziel "Rexx")))
)
)
(IF (EXISTS "sys:utilities/Multiview")
(SET def-tool "SYS:Utilities/Multiview")
(IF (EXISTS "sys:utilities/AmigaGuide")
(SET def-tool "SYS:Utilities/AmigaGuide")
(SET def-tool "more"))
)
(SET docs (ASKCHOICE (PROMPT "In which languages shall the Doc files be installed?") (HELP docshelp)
(CHOICES "english" "deutsch")))
(IF (= @user-level 2)
(SET type (ASKOPTIONS (PROMPT "Which type of document shall be installed?") (HELP doctype_help) (CHOICES "AmigaGuide" "Ascii") (DEFAULT 1)))
(
(IF (= def-tool "more")
(
(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")))
(IF (ASKBOOL (PROMPT "Shall the example formulas be installed?") (HELP formulahelp))
(COPYFILES (SOURCE "Formulas") (DEST (TACKON ziel "Formulas")) (ALL)))
(if (= install_type 0)
(
(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"))) )