home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / wp_dtp / tpp400en.lha / Install < prev    next >
Text File  |  1992-06-21  |  6KB  |  285 lines

  1. ;       $VER: Installation TPP V4.00E (21.06.92)
  2.  
  3. .BRA {
  4. .KET }
  5.  
  6. ; default root directory
  7.  
  8. Set DefaultDir "work:tpp"
  9.  
  10. ; set some internal flags
  11. Set ARexxIsInstalled Yes
  12. Set PaxTeXIsInstalled Yes
  13.  
  14. Lab Start
  15.  
  16. ; get the root directory of `TeXt Plus Professional'
  17.  
  18. Echo "Please, enter a name for the TeXt"
  19. Echo "Plus Professional root-directory."
  20. Echo "Directory (<Return> = $DefaultDir) ? " NoLine
  21.  
  22. ; unset previous value
  23.  
  24. UnSet Directory
  25.  
  26. ; get target directory
  27.  
  28. Set >NIL: Directory ?
  29.  
  30. ; If only <Return> has been pressed, use <DefaultDir>
  31.  
  32. If "$Directory" EQ "*$Directory"
  33.         Set Directory $DefaultDir
  34. EndIf
  35.  
  36. ; remember the original path
  37.  
  38. Set OrigDir $Directory
  39.  
  40. ; check wether a '/' is to be appended to the directory name
  41.  
  42. FailAt 21
  43.  
  44. Assign >NIL: ${Directory} Exists
  45.  
  46. If FAIL
  47.     FailAt 10
  48.  
  49.     ; directory already exists
  50.  
  51.     If NOT EXISTS $Directory
  52.         FailAt 21
  53.  
  54.         ; okay, try to make the directory
  55.  
  56.         MakeDir "$Directory"
  57.  
  58.         ; Das war nichts ...
  59.  
  60.         If FAIL
  61.             Echo "*NUnable to make $Directory"
  62.  
  63.             FailAt 10
  64.  
  65.             ; back where we started
  66.  
  67.             Skip Back Start
  68.         EndIf
  69.     EndIf
  70.  
  71.     ; attach an icon to the directory
  72.  
  73.     Copy tpp.info "$Directory.info"
  74.  
  75.     ; append a '/' to the directory-name
  76.  
  77.     Set Temp "$Directory/"
  78.  
  79.     Set Directory $Temp
  80.  
  81.     UnSet Temp
  82. EndIf
  83.  
  84. ; unpack main binaries
  85.  
  86. c/Lha -q x tpp/bin/TPPbin.lha "${Directory}"
  87.  
  88. ; unpack documentation
  89.  
  90. c/Lha -q x tpp/doc/TPPdoc.lha "${Directory}"
  91.  
  92. Set DocDefaultDir "S:"
  93.  
  94. Lab DocStart
  95.  
  96. ; Where to place 'TPP.guide'?
  97.  
  98. Echo "*NPlease, enter the directory-name, where"
  99. Echo "the HyperText-documentation is to be installed to."
  100. Echo "Directory (<Return> = $DocDefaultDir) ? " NoLine
  101.  
  102. ; unset previously set value
  103.  
  104. UnSet DocDirectory
  105.  
  106. ; get target directory
  107.  
  108. Set >NIL: DocDirectory ?
  109.  
  110. ; if only <Return> has been pressed, use <DocDefaultDir>
  111.  
  112. If "$DocDirectory" EQ "*$DocDirectory"
  113.         Set DocDirectory $DocDefaultDir
  114. EndIf
  115.  
  116. ; check wether a '/' is to be appended to the directory name
  117.  
  118. FailAt 21
  119.  
  120. Assign >NIL: ${DocDirectory} Exists
  121.  
  122. If FAIL
  123.     FailAt 10
  124.  
  125.     ; directory already exists?
  126.  
  127.     If NOT EXISTS $DocDirectory
  128.         FailAt 21
  129.  
  130.         ; okay, try to make a directory
  131.  
  132.         MakeDir "$DocDirectory"
  133.  
  134.         ; failed
  135.  
  136.         If FAIL
  137.             Echo "*NUnable to make $DocDirectory"
  138.  
  139.             FailAt 10
  140.  
  141.             ; back where be started
  142.  
  143.             Skip Back DocStart
  144.         EndIf
  145.     EndIf
  146. EndIf
  147.  
  148. ; copy hypertext documentation
  149. Copy ${Directory}doc/TPP.guide(.info|%) $DocDirectory Quiet
  150. ; and delete
  151. Delete >NIL: ${Directory}doc/TPP.guide(.info|%)
  152.  
  153. ; copy the readme file
  154. Copy LiesMich(.info|%) ${Directory}doc Quiet
  155.  
  156. ; copy the configuration files
  157.  
  158. Copy tpp/config "${Directory}config" All Quiet
  159.  
  160. ; and the parse-files,
  161.  
  162. Copy tpp/parse "${Directory}parse" All Quiet
  163.  
  164. ; the examples,
  165.  
  166. Copy tpp/example "${Directory}example" All Quiet
  167.  
  168. ; the picture, and
  169.  
  170. Copy tpp/iff "${Directory}iff" All Quiet
  171.  
  172. ; the example mailmerge file
  173.  
  174. Copy tpp/mailmerge "${Directory}mailmerge" All Quiet
  175.  
  176. ; copy additional pd-software MSClock23 und Find20
  177.  
  178. Copy tpp/pd "${Directory}pd" All Quiet
  179.  
  180. ; create the text-Directory
  181.  
  182. MakeDir "${Directory}text"
  183.  
  184. ; copy the handler
  185.  
  186. Copy l/TextPlus-Handler L: Quiet
  187.  
  188. ; copy some icons (but not rexx.info)
  189.  
  190. Copy tpp/[a-qs-z]#?.info "${Directory}" Quiet
  191.  
  192. ; Copy Nico François' powerpacker.library and reqtools.library
  193.  
  194. Echo "*NDo you want to install powerpacker.library"
  195. Echo "1.5 (35.344) and reqtools.library 1.0e (37.726)?"
  196. Echo "You should only hit 'n' now, if you already"
  197. Echo "installed newer versions than those above. "
  198.  
  199. Ask "y = Yes, n = No ?"
  200.  
  201. IF WARN
  202.     Copy libs/(powerpacker|reqtools).library LIBS: Quiet
  203. EndIF
  204.  
  205. ; is there a 'rexx:'-directory
  206.  
  207. If NOT EXISTS REXX:
  208.  
  209.     ; unfortunately not
  210.  
  211.     Echo "*NThere is no REXX:-directory!"
  212.     Echo "The ARexx-macros are not going to be installed."
  213.     Echo "If you nevertheless want to install them, you"
  214.     Echo "have to invoke this script for a second time,"
  215.     Echo "AFTER you have installed ARexx!"
  216.     Echo "Working with TPP without ARexx is not sensible!"
  217.  
  218.     Set ARexxIsInstalled No
  219.  
  220. EndIf
  221.  
  222. ; not everybody gets macros ...
  223.  
  224. If NOT $ARexxIsInstalled EQ No
  225.  
  226.     ; copy the arexx macros
  227.     Copy tpp/rexx/tpl rexx:tpl All Quiet
  228.     Copy tpp/rexx/#?.tpl rexx: All Quiet
  229.     Copy tpp/rexx/#?.sd rexx: All Quiet
  230.  
  231. EndIf
  232.  
  233. ; Is PaxTeX installed?
  234.  
  235. IF NOT EXISTS TeX:macros
  236.  
  237.     ; unfortunately not
  238.  
  239.     Echo "*NThere is no directory 'TeX:macros'!"
  240.     Echo "The TeX-macros are not going to be installed."
  241.     Echo "If you nevertheless want to install them, you"
  242.     Echo "have to invoke this script for a second time,"
  243.     Echo "AFTER you have installed PasTeX!"
  244.     Echo "You cannot compile or print documents without"
  245.     Echo "the TeX-macros!"
  246.  
  247.     Set PasTeXIsInstalled No
  248.  
  249. EndIf
  250.  
  251. ; Without TeX we are lost
  252.  
  253. If NOT $PasTeXIsInstalled EQ No
  254.  
  255.     ; copy the tex-macros
  256.     Copy tpp/tex/macros TeX:macros All Quiet
  257.  
  258. EndIf
  259.  
  260. ; this is the end of the script as I know it ...
  261.  
  262. Echo "*NTeXt Plus Professional has been installed."
  263. Echo "You only have to add the following line"
  264. Echo "to your S:Startup-Sequence or S:User-Startup:"
  265.  
  266. Echo "*NAssign TPP: $OrigDir"
  267.  
  268. ; bitch a bit
  269. IF $ARexxIsInstalled EQ No
  270.  
  271. Echo "*NDo not forget to install the ARexx macros!"
  272.  
  273. EndIf
  274.  
  275. IF $PasTeXIsInstalled EQ No
  276.  
  277. Echo "*NDo not forget to install the PasTeX macros!"
  278.  
  279. EndIf
  280.  
  281. ; execute the assign for prophylactical reasons
  282. Assign >NIL: TPP: "$OrigDir"
  283.  
  284. Echo "*NEnjoy TeXt Plus Professional!"
  285.