1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
; $VER: Installation TPP V4.10E (17.01.93)
.BRA {
.KET }
; default root directory
Set DefaultDir "work:tpp"
; set some internal flags
Set ARexxIsInstalled Yes
Set PaxTeXIsInstalled Yes
Set MakeIndexIsInstalled Yes
Set Update No
Set LHAbin "c/LHA -q -m -a x"
Set LangArc TPPEnglish.lha
Set GlobArc TPPGlobal.lha
Lab Start
; get the root directory of `TeXt Plus Professional'
Echo "TeXt Plus Professional V4.10*n"
Echo "If this is an update from 4.00 to 4.10,"
Echo "*.Config and *.parse files are not"
Echo "overwritten.*n"
Echo "Please, enter a name for the TeXt"
Echo "Plus Professional root-directory."
Echo "Directory (<Return> = $DefaultDir) ? " NoLine
; unset previous value
UnSet Directory
; get target directory
Set >NIL: Directory ?
; If only <Return> has been pressed, use <DefaultDir>
If "$Directory" EQ "*$Directory"
Set Directory $DefaultDir
EndIf
; remember the original path
Set OrigDir $Directory
; check wether a '/' is to be appended to the directory name
FailAt 21
Assign >NIL: ${Directory} Exists
If FAIL
FailAt 10
; directory already exists
If NOT EXISTS $Directory
FailAt 21
; okay, try to make the directory
MakeDir "$Directory"
; Das war nichts ...
If FAIL
Echo "*NUnable to make $Directory"
FailAt 10
; back where we started
Skip Back Start
EndIf
EndIf
; append a '/' to the directory-name
Set Temp "$Directory/"
Set Directory $Temp
UnSet Temp
EndIf
; Fist all english programs are installed
; unpack main binaries
$LHAbin $LangArc bin/TeXtPlusProfessional(.info|%) "${Directory}"
; unpack documentation
$LHAbin $LangArc doc/#? "${Directory}"
Set DocDefaultDir "S:"
Lab DocStart
; Where to place 'TPP.guide'?
Echo "*NPlease, enter the directory-name, where"
Echo "the HyperText-documentation is to be installed to."
Echo "Directory (<Return> = $DocDefaultDir) ? " NoLine
; unset previously set value
UnSet DocDirectory
; get target directory
Set >NIL: DocDirectory ?
; if only <Return> has been pressed, use <DocDefaultDir>
If "$DocDirectory" EQ "*$DocDirectory"
Set DocDirectory $DocDefaultDir
EndIf
; check wether a '/' is to be appended to the directory name
FailAt 21
Assign >NIL: ${DocDirectory} Exists
If FAIL
FailAt 10
; directory already exists?
If NOT EXISTS $DocDirectory
FailAt 21
; okay, try to make a directory
MakeDir "$DocDirectory"
; failed
If FAIL
Echo "*NUnable to make $DocDirectory"
FailAt 10
; back where be started
Skip Back DocStart
EndIf
EndIf
EndIf
; copy hypertext documentation
Copy ${Directory}doc/TPP.guide(.info|%) $DocDirectory Quiet Clone
; and delete
Delete >NIL: ${Directory}doc/TPP.guide(.info|%)
; copy handler
$LHAbin $LangArc l/TeXtPlus-Handler L:
; install configuration files
; save old configration files
If $Update EQ Yes
If Exists ${Directory}config
Rename >NIL: ${Directory}config ${Directory}config.old
Endif
Endif
; install
$LHAbin $LangArc config/#? ${Directory}
; ------------------------------------------------------------
; install all global files
; save old parse files
If $Update EQ Yes
If Exists ${Directory}parse
Rename >NIL: ${Directory}parse ${Directory}parse.old
Endif
Endif
; decrunch everything
$LHAbin $GlobArc #? ${Directory}
; copy the readme file
Copy ReadMe(.info|%) ${Directory}doc Quiet Clone
; copy the history file
Copy History(.info|%) ${Directory}doc Quiet Clone
; Copy Nico François' powerpacker.library (35.344) and
; reqtools.library (38.961)
; They are only installed if no newer version is
; already installed
FailAt 21
Version >NIL: reqtools.library 38 961
If Warn
Copy ${Directory}libs/reqtools.library libs: Quiet Clone
endif
Version >NIL: powerpacker.library 35 344
If Warn
Copy ${Directory}libs/powerpacker.library libs: Quiet Clone
endif
; and clean up
Delete >NIL: ${Directory}libs All
; is there a 'rexx:'-directory
If NOT EXISTS REXX:
; unfortunately not
Echo "*NThere is no REXX:-directory!"
Echo "The ARexx-macros are not going to be installed."
Echo "If you nevertheless want to install them, you"
Echo "have to invoke this script for a second time,"
Echo "AFTER you have installed ARexx!"
Echo "Working with TPP without ARexx is not sensible!"
Set ARexxIsInstalled No
EndIf
; not everybody gets macros ...
If NOT $ARexxIsInstalled EQ No
; copy the arexx macros
Copy ${Directory}rexx/tpl rexx:tpl All Quiet Clone
Copy ${Directory}rexx/#?.tpl rexx: All Quiet Clone
Copy ${Directory}rexx/#?.sd rexx: All Quiet Clone
; and clean up
Delete >NIL: ${Directory}rexx All
EndIf
; Is PaxTeX installed?
IF NOT EXISTS TeX:macros
; unfortunately not
Echo "*NThere is no directory 'TeX:macros'!"
Echo "The TeX-macros are not going to be installed."
Echo "If you nevertheless want to install them, you"
Echo "have to invoke this script for a second time,"
Echo "AFTER you have installed PasTeX!"
Echo "You cannot compile or print documents without"
Echo "the TeX-macros!"
Set PasTeXIsInstalled No
EndIf
; Without TeX we are lost
If NOT $PasTeXIsInstalled EQ No
; copy the tex-macros
Copy ${Directory}tex/macros TeX:macros All Quiet Clone
; and clean up
Delete >NIL: ${Directory}tex/macros All
EndIf
; Can MakeIndex be installed?
IF NOT EXISTS TeX:bin
; unfortunately not
Echo "*NThere is no directory 'TeX:bin'!"
Echo "MakeIndex is not installed."
Echo "If you nevertheless want to install it, you"
Echo "have to invoke this script for a second time,"
Echo "AFTER you have installed PasTeX!"
Echo "You create a sorted index without MakeIndex!*n"
Set MakeIndexIsInstalled No
EndIf
; lost again?
If NOT $MakeIndexIsInstalled EQ No
; copy MakeIndex
Copy ${Directory}tex/bin/#? TeX:bin All Quiet Clone
; and clean up
Delete >NIL: ${Directory}tex/bin All
EndIf
; this is the end of the script as I know it ...
Echo "*NTeXt Plus Professional has been installed."
Echo "You only have to add the following line"
Echo "to your S:Startup-Sequence or S:User-Startup:"
Echo "*NAssign TPP: $OrigDir"
; bitch a bit
IF $ARexxIsInstalled EQ No
Echo "*NDo not forget to install the ARexx macros!"
EndIf
IF $PasTeXIsInstalled EQ No
Echo "*NDo not forget to install the PasTeX macros!"
EndIf
IF $MakeIndexIsInstalled EQ No
Echo "*NDo not forget to install MakeIndex!"
EndIf
; execute the assign for prophylactical reasons
Assign >NIL: TPP: "$OrigDir"
Echo "*NEnjoy TeXt Plus Professional!"
|