home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
text
/
tpp
/
install
/
install_tpp
< prev
next >
Wrap
Text File
|
1995-02-27
|
14KB
|
579 lines
;
; Install script for TeXt Plus Professional
;
; $VER: Installation TPP V5.00 (07.01.94)
;
(set @default-dest "")
;=============================================================================
; English strings
(set default_lang 1)
(set #bad-kick "TPP only runs under OS 2.04 or higher!\n")
(set #install-msg
(cat "\n\nTeXt Plus Professional installation script.\n"
"This script installs TPP on your Amiga.\n\n"
"Read the documentation for\n"
"further information on TPP.\n\n"
"TeXt Plus Professional © 1988-1994 Martin Steppler\n"
"All rights reserved."
)
)
(set #update-msg
(cat "\nIf this is an update, please, do *NOT* install TPP\n"
"over the old version, because the\n"
"directory-hierarchy has changed and in order to\n"
"guarantee a smooth transition to the new version.\n"
)
)
(set #ask-destination
(cat "Enter the name of the destination-directory!"
)
)
(set #ask-destination-msg
(cat "\nEnter the name of the directory, you wish to\n"
"install TPP to. A directory called TPP will\n"
"automatically be created in this directory\n"
"All other files will be stored in the directory TPP.\n\n"
"This is why you do not have to create a directory\n"
"on your own.\n"
)
)
(set #which-language
(cat "Which languages (incl. documentation) are to\n"
"be installed?\n"
)
)
(set #no-tex "No TeX")
(set #which-tex
(cat "Which implementation of TeX do you intend\n"
"to use in combination with TPP?\n"
)
)
(set #ask-bigtex
(cat "Which variant of the TeX compiler do you use?"
)
)
(set #ask-latex
(cat "TPP needs LaTeX of March 25th, 1992.\n"
"Do you want to install the LaTeX-files,\n"
"needed by TPP for working correctly?\n"
"Before the installation, you will be\n"
"asked for a destination directory."
)
)
(set #answer-yes "Yes")
(set #answer-no "No")
(set #ask-tppstyles
(cat "Do you want to install the TPP-style-\n"
"files, which TPP needs to work cor-\n"
"rectly?.\n"
"Before the installation, you will be\n"
"asked for a destination directory."
)
)
(set #ask-germanstyle
(cat "Do you want to install the style file\n"
"german.sty 2.4a, which TPP needs to work\n"
"correctly (with languages different from\n"
"German, too)?\n"
"Before the installation, you will be\n"
"asked for a destination directory."
)
)
(set #install-reqtools "Installing reqtools.library ...")
(set #ask-reqtools "Select a place for reqtools.library!")
(set #install-powerpacker "Installing powerpacker.library ...")
(set #ask-powerpacker "Select a place for powerpacker.library!")
(set #install-amigaguide "Installing amigaguide.library ...")
(set #ask-amigaguide "Select a place for amigaguide.library!")
(set #assign-msg
(cat "An assign for TPP: has to be\n"
"appended to your S:User-Startup"
)
)
;=============================================================================
; German strings
(if (= @language "deutsch")
(
(set default_lang 2)
(set #bad-kick "TPP läuft nur unter OS 2.04 oder besser!\n")
(set #install-msg
(cat "\n\nTeXt Plus Professional Installationsskript.\n"
"Diese Befehlsdatei installiert TPP auf Ihrem Amiga.\n"
"Lesen Sie die Dokumentation für\n"
"weitere Informationen über TPP.\n\n"
"TeXt Plus Professional © 1988-1994 Martin Steppler\n"
"All rights reserved."
)
)
(set #update-msg
(cat "\nFalls dies ein Update ist, installieren Sie TPP\n"
"bitte *NICHT* über die alte Version, da sich die\n"
"Verzeichnisstruktur geändert hat und um Ihnen\n"
"einen sicheren Übergang zur neuen Version zu\n"
"gewährleisten.\n"
)
)
(set #ask-destination
(cat "Geben Sie das Zielverzeichnis an!"
)
)
(set #ask-destination-msg
(cat "\nGeben Sie den Namen des Verzeichnisses an, wohin\n"
"TPP installiert werden soll. In diesem Verzeichnis\n"
"wird automatisch ein Verzeichnis TPP erzeugt, in dem\n"
"die weiteren Dateien abgelegt werden.\n\n"
"Sie brauchen also kein Verzeichnis selbst anlegen."
)
)
(set #which-language
(cat "Welche Sprachen (inkl. Dokumentation) sollen\n"
"installiert werden?\n"
)
)
(set #no-tex "Kein TeX")
(set #which-tex
(cat "Welche Implementation von TeX werden Sie\n"
"in Zusammenarbeit mit TPP benutzen?\n"
)
)
(set #ask-bigtex
(cat "Welche Variante des TeX-Compilers benutzen Sie?"
)
)
(set #ask-latex
(cat "TPP benötigt LaTeX vom 25.3.92.\n"
"Sollen die für den Betrieb von TPP nötigen\n"
"LaTeX-Dateien installiert werden?\n"
"Sie werden vorher nach dem Zielverzeichnis\n"
"gefragt werden."
)
)
(set #answer-yes "Ja")
(set #answer-no "Nein")
(set #ask-tppstyles
(cat "Sollen die TPP-Style-Dateien, die zur\n"
"Arbeit von TPP mit TeX *notwendig* sind,\n"
"installiert werden?\n"
"Sie werden vorher nach dem Zielverzeichnis\n"
"gefragt werden."
)
)
(set #ask-germanstyle
(cat "Soll der Style german.sty 2.4a, der zur\n"
"Arbeit von TPP mit TeX *notwendig* ist\n"
"(auch bei anderen Sprachen), installiert\n"
"werden?\n"
"Sie werden vorher nach dem Zielverzeichnis\n"
"gefragt werden."
)
)
(set #install-reqtools "Installiere reqtools.library ...")
(set #ask-reqtools "Wohin soll reqtools.library installiert werden?")
(set #install-powerpacker "Installiere powerpacker.library ...")
(set #ask-powerpacker "Wohin soll powerpacker.library installiert werden?")
(set #install-amigaguide "Installiere amigaguide.library ...")
(set #ask-amigaguide "Wohin soll amigaguide.library installiert werden?")
(set #assign-msg
(cat "Es muß ein Assign für TPP: an Ihre\n"
"S:User-Startup angehängt werden"
)
)
))
;=============================================================================
;=============================================================================
; make sure we are running under a 2.04 ROM
(complete 0)
(if (< (/ (getversion) 65536) 37)
(
(abort #bad-kick)
))
;=============================================================================
(message #install-msg)
(if (exists "TPP:" (noreq))
(
(message #update-msg)
))
(message #ask-destination-msg)
(complete 5)
; ask user where to install TPP to
(set @default-dest
(tackon
(askdir
(prompt #ask-destination)
(help @askdir-help)
(default "Work:")
)
"TPP"
)
)
(complete 10)
; ask user which languages are to be installed
(set lang
(askoptions
(prompt #which-language)
(help @askoptions-help)
(choices "english"
"deutsch"
)
(default default_lang)
)
)
(complete 15)
; ask user which implementation of TeX he works with
(set tex
(askchoice
(prompt #which-tex)
(help @askchoice-help)
(choices "PasTeX"
"AmigaTeX"
#no-tex
)
)
)
(complete 20)
; if he works with PasTeX, does he use BigTeX or SmallTeX?
(if (= 0 tex)
(
(set bigtex
(askchoice
(prompt #ask-bigtex)
(help @askchoice-help)
(choices "SmallTeX"
"BigTeX"
)
)
)
))
;-----------------------------------------------------------------------------
; copy all language non-specific files
(copyfiles
(source "/")
(dest @default-dest)
(pattern "(TPP|Text|Hist|Parse|Rexx|Mailmerge|IFF)#?")
(infos)
)
; make several dirs
(makedir (cat @default-dest "/Config"))
(makedir (cat @default-dest "/Doc"))
(makedir (cat @default-dest "/Example"))
(makedir (cat @default-dest "/Help"))
; copy their icons
(copyfiles
(source "/")
(dest @default-dest)
(pattern "(Config|Doc|Example|Help).info")
)
; copy tpp default icon
(copyfiles
(source "/Config/def_tpp.info")
(dest
(cat @default-dest "/Config")
)
)
; no catalogs, if only "deutsch" was specified
(if (<> 2 lang)
(
(makedir (cat @default-dest "/Catalogs"))
))
(complete 50)
; copy all language specific files
(set n 0)
(while
(set language
(select n "english"
"deutsch"
""
)
)
(
(if (IN lang n)
(
(set k 0)
(while
(set dir
(select k "/Config/"
"/Doc/"
"/Example/"
"/Help/"
""
)
)
(
(copyfiles
(source
(cat dir language)
)
(dest
(cat @default-dest dir language)
)
(infos)
(all)
)
(set k (+ k 1))
))
; copy Catalog files
(if (<> 1 n)
(
(copyfiles
(source
(cat "/Catalogs/" language)
)
(dest
(cat @default-dest "/Catalogs/" language)
)
(all)
)
))
; copy readme file
(copyfiles
(source
(select n "/ReadMe"
"/LiesMich"
)
)
(dest @default-dest)
(infos)
)
; install config file according to user's
; previously made choices
(copyfiles
(source
(select tex
(select bigtex
(cat "/Config/" language "/TPP_PasTeX_SmallTeX.Config")
(cat "/Config/" language "/TPP_PasTeX_BigTeX.Config")
)
(cat "/Config/" language "/TPP_AmigaTeX.Config")
(cat "/Config/" language "/TPP_PRT.Config")
)
)
(dest
(cat @default-dest "/Config/" language)
)
(newname "TPP.Config")
)
))
(set n (+ n 1))
))
(complete 80)
; copy TeX related files
(if (<> 2 tex)
(
(copyfiles
(source "/")
(dest @default-dest)
(infos)
(pattern "(Bin|TeX)")
)
(if (askbool
(prompt #ask-latex)
(help @askbool-help)
(default 1)
(choices #answer-yes #answer-no)
)
(
; ask user where to install LaTeX style files
(set latex_dir
(askdir
(prompt #ask-destination)
(help @askdir-help)
(default
(select tex "TeX:macros/latex"
"TeX:inputs"
)
)
)
)
; install LaTeX files
(copyfiles
(source "/TeX/latex")
(dest latex_dir)
(all)
)
))
(if (askbool
(prompt #ask-tppstyles)
(help @askbool-help)
(default 1)
(choices #answer-yes #answer-no)
)
(
; ask user where to install TPP style files
(set tppstyles_dir
(askdir
(prompt #ask-destination)
(help @askdir-help)
(default
(select tex "TeX:macros"
"TeX:inputs"
)
)
)
)
; install tppstyles files
(copyfiles
(source "/TeX")
(dest tppstyles_dir)
(pattern "tpp#?.(sty|tex)")
)
))
(if (askbool
(prompt #ask-germanstyle)
(help @askbool-help)
(default 1)
(choices #answer-yes #answer-no)
)
(
; ask user where to install german style file
(set germanstyle_dir
(askdir
(prompt #ask-destination)
(help @askdir-help)
(default
(select tex "TeX:macros"
"TeX:inputs"
)
)
)
)
; install germanstyle file
(copyfiles
(source "/TeX/german.sty")
(dest germanstyle_dir)
)
))
))
(complete 90)
; install reqtools.library
; powerpacker.library
; amigaguide.library
(copylib
(prompt #install-reqtools)
(help @copylib-help)
(confirm)
(source "/Libs/reqtools.library")
(dest
(askdir
(prompt #ask-reqtools)
(help @askdir-help)
(default "LIBS:")
)
)
)
(copylib
(prompt #install-powerpacker)
(help @copylib-help)
(confirm)
(source "/Libs/powerpacker.library")
(dest
(askdir
(prompt #ask-powerpacker)
(help @askdir-help)
(default "LIBS:")
)
)
)
(copylib
(prompt #install-amigaguide)
(help @copylib-help)
(confirm)
(source "/Libs/amigaguide.library")
(dest
(askdir
(prompt #ask-amigaguide)
(help @askdir-help)
(default "LIBS:")
)
)
)
(complete 95)
; add assign to s:user-startup
(startup "TeXtPlusProfessional"
(prompt #assign-msg)
(help @startup-help)
(command (cat "Assign >NIL: TPP: " @default-dest))
)
; and make assign
(makeassign "TPP" @default-dest)
; so long and thanks for all the fish
(complete 100)