author | Claus Gittinger <cg@exept.de> |
Wed, 28 Apr 1999 09:57:39 +0200 | |
changeset 1118 | ebecbe5d4b6b |
parent 1117 | 657dde1e749d |
child 1119 | 556bb6c9e36c |
permissions | -rw-r--r-- |
0 | 1 |
Object subclass:#STXInstaller |
24 | 2 |
instanceVariableNames:'stxLibDir stxLibBinDir stxBinDir installDocFiles |
678 | 3 |
installSourceFiles installSTCFiles installGoodyFiles fullDir |
24 | 4 |
actionPercentageHolder actionTextHolder commandTraceView |
1010 | 5 |
resources dfHolder copyProcess installWhat' |
678 | 6 |
classVariableNames:'LastBinDir LastLibBinDir LastLibDir LastFullDir' |
0 | 7 |
poolDictionaries:'' |
8 |
category:'eXept-tools' |
|
9 |
! |
|
10 |
||
11 |
||
28 | 12 |
!STXInstaller class methodsFor:'startup'! |
0 | 13 |
|
14 |
open |
|
15 |
^ self new open |
|
16 |
||
11 | 17 |
" |
18 |
STXInstaller open |
|
19 |
" |
|
1 | 20 |
! ! |
21 |
||
22 |
!STXInstaller methodsFor:'defaults'! |
|
23 |
||
24 |
defaultBinDirs |
|
25 |
|dirs| |
|
26 |
||
27 |
dirs := OrderedCollection new. |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
28 |
dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/bin'. |
1 | 29 |
dirs add:'/usr/local/bin'. |
30 |
dirs add:'/usr/bin'. |
|
31 |
dirs add:(Filename homeDirectory constructString:'bin'). |
|
14 | 32 |
dirs add:((Filename homeDirectory |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
33 |
construct:'stx') |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
34 |
constructString:'bin'). |
1 | 35 |
dirs add:'/tmp/stxbin'. |
3 | 36 |
('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[ |
37 |
dirs add:'/home/stx/bin'. |
|
38 |
]. |
|
39 |
('/home2' asFilename exists and:['/home2' asFilename isDirectory]) ifTrue:[ |
|
40 |
dirs add:'/home2/stx/bin'. |
|
41 |
]. |
|
42 |
||
43 |
"/ dirs := dirs select:[:path | |
|
44 |
"/ |f| |
|
45 |
"/ |
|
46 |
"/ f := path asFilename. |
|
47 |
"/ f exists and:[f isDirectory]]. |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
48 |
^ dirs "sort" |
1 | 49 |
|
50 |
"Created: 18.7.1996 / 19:43:00 / cg" |
|
51 |
"Modified: 18.7.1996 / 19:45:08 / cg" |
|
52 |
! |
|
53 |
||
678 | 54 |
defaultFullDirs |
55 |
|dirs| |
|
56 |
||
57 |
dirs := OrderedCollection new. |
|
58 |
dirs add:(Filename homeDirectory constructString:'stxDevelop'). |
|
59 |
dirs add:((Filename homeDirectory |
|
60 |
construct:'stx') |
|
61 |
constructString:'develop'). |
|
62 |
('/home' asFilename exists and:['/home' asFilename isDirectory]) ifTrue:[ |
|
63 |
dirs add:'/home/stx/develop'. |
|
64 |
]. |
|
65 |
||
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
66 |
^ dirs "sort" |
678 | 67 |
|
68 |
"Modified: / 18.7.1996 / 19:45:08 / cg" |
|
69 |
"Created: / 25.2.1998 / 17:14:43 / cg" |
|
70 |
! |
|
71 |
||
24 | 72 |
defaultLibBinDirs |
73 |
|dirs| |
|
74 |
||
75 |
dirs := OrderedCollection new. |
|
76 |
dirs add:'/usr/local/lib'. |
|
77 |
dirs add:'/usr/lib'. |
|
78 |
dirs add:'/lib'. |
|
79 |
dirs add:(Filename homeDirectory |
|
80 |
constructString:'lib'). |
|
81 |
||
82 |
dirs add:((Filename homeDirectory |
|
83 |
construct:'stx') |
|
84 |
constructString:'lib'). |
|
85 |
dirs add:'/tmp/stxlib'. |
|
86 |
dirs add:'/home/stx/lib'. |
|
87 |
dirs add:'/home2/stx/lib'. |
|
88 |
||
89 |
^ dirs sort |
|
90 |
||
91 |
"Created: 18.7.1996 / 19:43:21 / cg" |
|
92 |
"Modified: 18.7.1996 / 19:46:04 / cg" |
|
93 |
! |
|
94 |
||
1 | 95 |
defaultLibDirs |
96 |
|dirs| |
|
97 |
||
98 |
dirs := OrderedCollection new. |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
99 |
dirs add:'/opt/smalltalk/' , self smalltalkRelease , '/lib'. |
1 | 100 |
dirs add:'/usr/local/lib/smalltalk'. |
101 |
dirs add:'/usr/lib/smalltalk'. |
|
102 |
dirs add:((Filename homeDirectory |
|
103 |
construct:'lib') |
|
104 |
constructString:'smalltalk'). |
|
15 | 105 |
dirs add:((Filename homeDirectory |
106 |
construct:'stx') |
|
107 |
constructString:'lib'). |
|
1 | 108 |
dirs add:'/tmp/stxlib'. |
109 |
dirs add:'/home/stx/lib'. |
|
110 |
dirs add:'/home2/stx/lib'. |
|
3 | 111 |
|
112 |
"/ dirs := dirs select:[:path | |
|
113 |
"/ |f| |
|
114 |
"/ |
|
115 |
"/ f := path asFilename. |
|
116 |
"/ f exists and:[f isDirectory]]. |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
117 |
^ dirs "sort" |
1 | 118 |
|
119 |
"Created: 18.7.1996 / 19:43:21 / cg" |
|
120 |
"Modified: 18.7.1996 / 19:46:04 / cg" |
|
11 | 121 |
! |
0 | 122 |
|
11 | 123 |
directoriesToMake |
124 |
|dirsToMake| |
|
0 | 125 |
|
11 | 126 |
dirsToMake := OrderedCollection new. |
1010 | 127 |
installWhat == #full ifTrue:[ |
678 | 128 |
dirsToMake add:fullDir. |
129 |
] ifFalse:[ |
|
130 |
dirsToMake add:stxBinDir. |
|
131 |
dirsToMake add:stxLibDir. |
|
132 |
dirsToMake add:stxLibBinDir. |
|
133 |
dirsToMake add:(stxLibDir asFilename constructString:'configurations'). |
|
134 |
dirsToMake add:(stxLibDir asFilename constructString:'doc'). |
|
135 |
dirsToMake add:(stxLibDir asFilename constructString:'doc/online'). |
|
136 |
dirsToMake add:(stxLibDir asFilename constructString:'doc/online/english'). |
|
137 |
dirsToMake add:(stxLibDir asFilename constructString:'doc/online/german'). |
|
138 |
dirsToMake add:(stxLibDir asFilename constructString:'doc/online/french'). |
|
139 |
dirsToMake add:(stxLibDir asFilename constructString:'doc/online/italian'). |
|
140 |
dirsToMake add:(stxLibDir asFilename constructString:'include'). |
|
141 |
dirsToMake add:(stxLibDir asFilename constructString:'resources'). |
|
142 |
dirsToMake add:(stxLibDir asFilename constructString:'binary'). |
|
143 |
dirsToMake add:(stxLibDir asFilename constructString:'bitmaps'). |
|
144 |
dirsToMake add:(stxLibDir asFilename constructString:'goodies'). |
|
145 |
]. |
|
146 |
^ dirsToMake |
|
0 | 147 |
|
678 | 148 |
"Modified: / 25.2.1998 / 17:15:19 / cg" |
11 | 149 |
! |
150 |
||
73 | 151 |
listOfOptionalPackages |
152 |
^ #( |
|
153 |
'libDB' |
|
154 |
'clients/CBrowser' |
|
155 |
'libcompat' |
|
156 |
'libxt' |
|
157 |
||
158 |
||
159 |
"/ mhmh - these should not be needed here ... |
|
160 |
||
161 |
'projects/smalltalk/bitmaps/javaImages' |
|
162 |
'doc/online/english/overview/icons' |
|
163 |
) |
|
164 |
||
165 |
"Created: 2.3.1997 / 12:39:59 / cg" |
|
166 |
"Modified: 2.3.1997 / 13:24:41 / cg" |
|
167 |
! |
|
168 |
||
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
169 |
smalltalkRelease |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
170 |
^ Smalltalk majorVersionNr printString |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
171 |
, '.' , Smalltalk minorVersionNr printString |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
172 |
, '.' , Smalltalk revisionNr printString. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
173 |
! |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
174 |
|
11 | 175 |
specOfFilesToCopy |
176 |
|fileSpec| |
|
0 | 177 |
|
178 |
fileSpec := #( |
|
27 | 179 |
"/ name destination subDir required mode |
12
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
180 |
( 'projects/smalltalk/smalltalk' #bin nil true '755' ) |
27 | 181 |
( 'projects/smalltalk/stx' #bin nil true '755' ) |
12
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
182 |
( 'projects/smalltalk/include' #lib nil true '644' ) |
277 | 183 |
( 'COPYRIGHT' #lib nil true '644' ) |
12
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
184 |
( 'projects/smalltalk/*.rc' #lib nil true '644' ) |
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
185 |
( 'projects/smalltalk/patches' #lib nil true '644' ) |
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
186 |
( 'projects/smalltalk/bitmaps' #lib nil true '644' ) |
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
187 |
( 'projects/smalltalk/resources' #lib nil true '644' ) |
6cb00d713d4d
LICENSE texts must always be installed
Claus Gittinger <cg@exept.de>
parents:
11
diff
changeset
|
188 |
( 'projects/smalltalk/lib' #lib nil true '644' ) |
16 | 189 |
( 'doc/online/german/LICENCE.STX.html' #lib 'doc/online/german' true '644' ) |
277 | 190 |
( 'doc/online/english/LICENCE.STX.html' #lib 'doc/online/english' true '644' ) |
5 | 191 |
). |
0 | 192 |
|
5 | 193 |
installDocFiles ifTrue:[ |
194 |
fileSpec := fileSpec , #( |
|
24 | 195 |
( 'doc' #lib nil false '644' ) |
5 | 196 |
). |
197 |
]. |
|
198 |
||
9 | 199 |
installSourceFiles ifTrue:[ |
200 |
fileSpec := fileSpec , #( |
|
24 | 201 |
( 'projects/smalltalk/source' #lib nil false '644' ) |
9 | 202 |
). |
203 |
]. |
|
204 |
||
5 | 205 |
installSTCFiles ifTrue:[ |
206 |
fileSpec := fileSpec , #( |
|
24 | 207 |
( 'stc/stc' #bin nil false '755' ) |
208 |
( 'rules/stmkmp' #bin nil false '755' ) |
|
209 |
( 'rules/stmkmf' #bin nil false '755' ) |
|
210 |
( 'include' #lib nil false '644' ) |
|
211 |
( 'configurations' #lib nil false '644' ) |
|
212 |
( 'configurations/PACKS' #lib 'configurations' false '644' ) |
|
213 |
( 'configurations/my*' #lib 'configurations' false '644' ) |
|
214 |
( 'configurations/vendor*' #lib 'configurations' false '644' ) |
|
215 |
( 'rules' #lib nil false '644' ) |
|
5 | 216 |
|
276 | 217 |
( 'support/VGL/vogl/src/libvogl.*' #lib 'lib' false '644' ) |
218 |
( 'support/VGL/vogl/src/*.h' #lib 'include' false '644' ) |
|
219 |
( 'support/DLD/dld-3.2.5/libdld.*' #lib 'lib' false '644' ) |
|
220 |
||
221 |
( 'goodies/persistency/db-1.6/PORT/libdb.*' #lib 'lib' false '644' ) |
|
0 | 222 |
|
276 | 223 |
( 'librun/librun.*' #libBin nil false '644' ) |
224 |
( 'libbasic/libbasic.*' #libBin nil false '644' ) |
|
225 |
( 'libbasic2/libbasic2.*' #libBin nil false '644' ) |
|
226 |
( 'libbasic3/libbasic3.*' #libBin nil false '644' ) |
|
227 |
( 'libhtml/libhtml.*' #libBin nil false '644' ) |
|
228 |
( 'libcomp/libcomp.*' #libBin nil false '644' ) |
|
229 |
( 'libcomp/ObjFL*.o' #libBin nil false '644' ) |
|
230 |
( 'libcomp/ObjFL*.obj' #libBin nil false '644' ) |
|
231 |
( 'libcomp/ObjFL*.so' #libBin nil false '644' ) |
|
232 |
( 'libview/libview.*' #libBin nil false '644' ) |
|
233 |
( 'libview/GLX*.o' #libBin nil false '644' ) |
|
234 |
( 'libview/GLX*.obj' #libBin nil false '644' ) |
|
235 |
( 'libview/GLX*.so' #libBin nil false '644' ) |
|
236 |
( 'libview/XW*.o' #libBin nil false '644' ) |
|
237 |
( 'libview/XW*.obj' #libBin nil false '644' ) |
|
238 |
( 'libview/XW*.so' #libBin nil false '644' ) |
|
239 |
( 'libview2/libview2.*' #libBin nil false '644' ) |
|
240 |
( 'libwidg/libwidg.*' #libBin nil false '644' ) |
|
241 |
( 'libwidg2/libwidg2.*' #libBin nil false '644' ) |
|
242 |
( 'libwidg3/libwidg3.*' #libBin nil false '644' ) |
|
243 |
( 'libui/libui.*' #libBin nil false '644' ) |
|
244 |
||
27 | 245 |
"/ ( 'libsnmp/libsnmp.*' #libBin nil false '644' ) |
246 |
"/ ( 'contrib/libPVM/libPVM.*' #libBin nil false '644' ) |
|
24 | 247 |
( 'goodies/persistency/libdbase.*' #libBin nil false '644' ) |
27 | 248 |
"/ ( 'libtable/libtable.*' #libBin nil false '644' ) |
24 | 249 |
( 'libtool/libtool.*' #libBin nil false '644' ) |
214
e5aaf5e3bbf9
also install libtool2 & libui
Claus Gittinger <cg@exept.de>
parents:
117
diff
changeset
|
250 |
( 'libtool2/libtool2.*' #libBin nil false '644' ) |
27 | 251 |
"/ ( 'libxt/libxt.*' #libBin nil false '644' ) |
252 |
"/ ( 'librt/librt.*' #libBin nil false '644' ) |
|
5 | 253 |
). |
254 |
]. |
|
0 | 255 |
|
5 | 256 |
installGoodyFiles ifTrue:[ |
257 |
fileSpec := fileSpec , #( |
|
258 |
( 'goodies/*.st' #lib 'goodies' false '644' ) |
|
259 |
( 'goodies/*.chg' #lib 'goodies' false '644' ) |
|
260 |
( 'goodies/rdoit/rdoit' #bin nil false '755' ) |
|
236 | 261 |
( 'goodies/bitmaps/rdoit' #lib 'goodies/bitmaps' false '755' ) |
5 | 262 |
). |
263 |
]. |
|
0 | 264 |
|
11 | 265 |
|
266 |
^ fileSpec |
|
267 |
||
277 | 268 |
"Modified: 8.8.1997 / 18:39:06 / cg" |
11 | 269 |
! ! |
270 |
||
271 |
!STXInstaller methodsFor:'installing'! |
|
272 |
||
790 | 273 |
changeWritability |
791 | 274 |
|msg| |
790 | 275 |
|
1010 | 276 |
installWhat == #full ifTrue:[ |
792 | 277 |
msg := (resources array:#('ST/X Installation' '' 'making target dir writable' '' '' '')) asStringCollection. |
790 | 278 |
|
792 | 279 |
commandTraceView showCR:(resources string:'making target dir writable ...'). |
280 |
commandTraceView endEntry. |
|
790 | 281 |
OperatingSystem executeCommand:('(cd ' , fullDir , ' ; find . -exec chmod u+w {} \;)'). |
282 |
]. |
|
283 |
||
791 | 284 |
"Created: / 17.7.1996 / 15:24:19 / cg" |
792 | 285 |
"Modified: / 20.4.1998 / 15:40:00 / cg" |
790 | 286 |
! |
287 |
||
11 | 288 |
copyFiles |
678 | 289 |
|msg fileSpec filesToCopy numFiles nDone cmd| |
290 |
||
291 |
msg := (resources array:#('ST/X Installation' '' 'copying:' '' 'to:' '')) asStringCollection. |
|
292 |
||
1010 | 293 |
installWhat == #full ifTrue:[ |
678 | 294 |
msg at:4 put:(' all from CD' asText allBold). |
295 |
msg at:6 put:' ' , (fullDir asText allBold). |
|
296 |
actionTextHolder value:nil. |
|
297 |
actionTextHolder value:msg. |
|
11 | 298 |
|
793
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
299 |
cmd := '(cd ../.. ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'. |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
300 |
"/ "/ |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
301 |
"/ "/ not all systems have cp -rv |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
302 |
"/ "/ |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
303 |
"/ OperatingSystem getOSType = 'linux' ifTrue:[ |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
304 |
"/ cmd := 'cp -rv ../../* ' , fullDir. |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
305 |
"/ ]. |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
306 |
"/ commandTraceView showCR:cmd , ' ...'. |
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
307 |
commandTraceView showCR:'copying ...'. |
678 | 308 |
commandTraceView endEntry. |
309 |
cmd := cmd , ' 2>&1' . |
|
310 |
||
311 |
self executeCommandAndShowOutput:cmd. |
|
312 |
||
313 |
^ true |
|
314 |
]. |
|
11 | 315 |
|
316 |
fileSpec := self specOfFilesToCopy. |
|
317 |
||
0 | 318 |
filesToCopy := OrderedCollection new. |
319 |
||
320 |
fileSpec do:[:entry | |
|
8 | 321 |
|fileNames dest subDir required destDir| |
0 | 322 |
|
8 | 323 |
fileNames := entry at:1. |
0 | 324 |
dest := entry at:2. |
325 |
subDir := entry at:3. |
|
326 |
required := entry at:4. |
|
327 |
||
328 |
dest == #bin ifTrue:[ |
|
329 |
destDir := stxBinDir |
|
330 |
] ifFalse:[ |
|
24 | 331 |
dest == #libBin ifTrue:[ |
332 |
destDir := stxLibBinDir |
|
333 |
] ifFalse:[ |
|
334 |
destDir := stxLibDir |
|
335 |
] |
|
0 | 336 |
]. |
337 |
||
338 |
destDir := destDir asFilename. |
|
339 |
subDir notNil ifTrue:[ |
|
340 |
destDir := destDir construct:subDir |
|
341 |
]. |
|
342 |
||
8 | 343 |
filesToCopy add:(fileNames -> destDir pathName) |
0 | 344 |
]. |
345 |
||
346 |
numFiles := filesToCopy size. |
|
347 |
nDone := 0. |
|
348 |
||
349 |
filesToCopy do:[:entry | |
|
678 | 350 |
|fileName destDir cmd| |
0 | 351 |
|
352 |
fileName := entry key. |
|
353 |
destDir := entry value. |
|
354 |
||
8 | 355 |
((fileName includes:$*) |
356 |
or:[('../../' , fileName) asFilename exists])ifTrue:[ |
|
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
357 |
actionPercentageHolder value:(nDone / numFiles * 100) rounded. |
0 | 358 |
|
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
359 |
msg at:4 put:' ' , (fileName asText allBold). |
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
360 |
msg at:6 put:' ' , (destDir asText allBold). |
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
361 |
actionTextHolder value:nil. |
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
362 |
actionTextHolder value:msg. |
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
363 |
|
73 | 364 |
((fileName includes:$*) not |
365 |
and:[('../../' , fileName) asFilename exists not]) ifTrue:[ |
|
366 |
(self listOfOptionalPackages includes:fileName) ifFalse:[ |
|
117 | 367 |
commandTraceView showCR:('cannot copy ' , fileName , ' - not included in distribution'). |
368 |
commandTraceView endEntry. |
|
73 | 369 |
] |
370 |
] ifFalse:[ |
|
371 |
cmd := 'cp -r ../../' , fileName , ' ' , destDir. |
|
372 |
commandTraceView showCR:cmd , ' ...'. |
|
117 | 373 |
commandTraceView endEntry. |
73 | 374 |
cmd := cmd , ' 2>&1' . |
1 | 375 |
|
678 | 376 |
self executeCommandAndShowOutput:cmd |
73 | 377 |
] |
1 | 378 |
]. |
0 | 379 |
|
380 |
nDone := nDone + 1 |
|
381 |
]. |
|
382 |
||
383 |
^ true |
|
384 |
||
678 | 385 |
" |
386 |
STXInstaller open |
|
387 |
" |
|
388 |
||
389 |
"Created: / 17.7.1996 / 15:16:20 / cg" |
|
793
43a9a195b0f3
use tar instead of cp to copy full
Claus Gittinger <cg@exept.de>
parents:
792
diff
changeset
|
390 |
"Modified: / 20.4.1998 / 17:41:45 / cg" |
0 | 391 |
! |
392 |
||
393 |
createDirectories |
|
394 |
|msg dirsToMake numDirs nDone| |
|
395 |
||
11 | 396 |
msg := (resources array:#('ST/X Installation' '' 'creating directory:' '' '' '')) asStringCollection. |
0 | 397 |
|
11 | 398 |
dirsToMake := self directoriesToMake. |
0 | 399 |
|
400 |
numDirs := dirsToMake size. |
|
401 |
nDone := 0. |
|
402 |
||
403 |
dirsToMake do:[:dirName | |
|
404 |
|d errMsg stop box| |
|
405 |
||
406 |
actionPercentageHolder value:(nDone / numDirs * 100) rounded. |
|
407 |
||
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
408 |
msg at:4 put:' ' , (dirName asText allBold). |
0 | 409 |
actionTextHolder value:nil. |
410 |
actionTextHolder value:msg. |
|
411 |
||
412 |
d := dirName asFilename. |
|
413 |
||
11 | 414 |
commandTraceView showCR:(resources string:'creating %1 ...' with:d pathName). |
117 | 415 |
commandTraceView endEntry. |
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
416 |
|
0 | 417 |
d exists ifFalse:[ |
418 |
OperatingSystem recursiveCreateDirectory:d pathName |
|
419 |
]. |
|
420 |
||
421 |
d exists ifFalse:[ |
|
11 | 422 |
errMsg := resources string:'failed to create directory: %1' with: dirName. |
0 | 423 |
stop := true |
424 |
] ifTrue:[ |
|
425 |
d isDirectory ifFalse:[ |
|
11 | 426 |
errMsg := resources string:'not a directory: %1' with:dirName. |
0 | 427 |
stop := true |
428 |
] ifTrue:[ |
|
429 |
(d isReadable |
|
430 |
and:[d isWritable]) ifFalse:[ |
|
11 | 431 |
errMsg := resources string:'no read/write access to directory: %1' with:dirName. |
0 | 432 |
stop := false |
433 |
] ifTrue:[ |
|
434 |
errMsg := nil |
|
435 |
] |
|
436 |
] |
|
437 |
]. |
|
438 |
||
439 |
errMsg notNil ifTrue:[ |
|
440 |
box := WarningBox new. |
|
441 |
box title:errMsg. |
|
442 |
box showAtPointerNotCovering:(WindowGroup activeGroup topViews first). |
|
1 | 443 |
stop ifTrue:[^ false]. |
0 | 444 |
]. |
445 |
||
446 |
Delay waitForSeconds:0.25. |
|
447 |
nDone := nDone + 1. |
|
448 |
]. |
|
449 |
^ true |
|
450 |
||
451 |
"Created: 17.7.1996 / 15:24:19 / cg" |
|
117 | 452 |
"Modified: 22.5.1997 / 15:06:41 / cg" |
19 | 453 |
! |
454 |
||
455 |
createSymbolicLinks |
|
456 |
|msg dirsToMake numDirs nDone| |
|
457 |
||
458 |
msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection. |
|
459 |
||
28 | 460 |
commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'). |
117 | 461 |
commandTraceView endEntry. |
1010 | 462 |
installWhat == #full ifTrue:[ |
678 | 463 |
OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)'). |
464 |
] ifFalse:[ |
|
465 |
OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)'). |
|
466 |
]. |
|
19 | 467 |
|
678 | 468 |
"Created: / 17.7.1996 / 15:24:19 / cg" |
792 | 469 |
"Modified: / 20.4.1998 / 15:40:11 / cg" |
678 | 470 |
! |
471 |
||
472 |
executeCommandAndShowOutput:cmd |
|
473 |
|doneSemaphore line p| |
|
474 |
||
475 |
doneSemaphore := Semaphore new. |
|
476 |
||
477 |
copyProcess := [ |
|
478 |
||
479 |
p := PipeStream readingFrom:cmd. |
|
480 |
p isNil ifTrue:[ |
|
481 |
self warn:('command error. Could not execute:\\' , cmd) withCRs. |
|
482 |
] ifFalse:[ |
|
483 |
[ |
|
484 |
[p atEnd] whileFalse:[ |
|
485 |
(p readWaitWithTimeout:0.1) ifFalse:[ |
|
486 |
line := p nextLine. |
|
487 |
(line notNil and:[line notEmpty]) ifTrue:[ |
|
488 |
commandTraceView showCR:((' ' , line) asText emphasizeAllWith:(#color->Color red)). |
|
489 |
commandTraceView endEntry. |
|
490 |
] |
|
491 |
] |
|
492 |
]. |
|
493 |
p close. |
|
494 |
] valueOnUnwindDo:[ |
|
495 |
p shutDown |
|
496 |
] |
|
497 |
]. |
|
498 |
doneSemaphore signal. |
|
499 |
copyProcess := nil. |
|
500 |
] forkAt:4. |
|
501 |
||
502 |
doneSemaphore wait. |
|
503 |
||
504 |
"Created: / 25.2.1998 / 17:46:06 / cg" |
|
505 |
"Modified: / 25.2.1998 / 18:36:50 / cg" |
|
73 | 506 |
! |
507 |
||
508 |
outputInitialMessage |
|
509 |
#( |
|
510 |
'Notice:' |
|
511 |
'' |
|
512 |
'During the installation, you may get error messages' |
|
513 |
'complaining that some files where not found' |
|
514 |
'and could therefore not be copied.' |
|
515 |
) do:[:line | |
|
516 |
commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)). |
|
517 |
commandTraceView endEntry. |
|
518 |
]. |
|
519 |
||
520 |
Delay waitForSeconds:2. |
|
521 |
||
522 |
#( |
|
523 |
'' |
|
524 |
'This is normal behavior; since the CD may contain' |
|
525 |
'broken symbolic links to non-existing packages' |
|
526 |
'which are either not contained on your ordered' |
|
276 | 527 |
'package (i.e. non-commercial) or are not required' |
528 |
'for your architecture (and therefore not contained' |
|
529 |
'on the CD).' |
|
530 |
'' |
|
73 | 531 |
) do:[:line | |
532 |
commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)). |
|
533 |
commandTraceView endEntry. |
|
534 |
]. |
|
535 |
||
536 |
Delay waitForSeconds:2. |
|
537 |
||
538 |
#( |
|
539 |
'' |
|
540 |
'Please excuse this inconvenience.' |
|
541 |
'' |
|
542 |
) do:[:line | |
|
543 |
commandTraceView showCR:((resources string:line) asText emphasizeAllWith:(#color->Color blue)). |
|
544 |
commandTraceView endEntry. |
|
545 |
]. |
|
546 |
||
547 |
Delay waitForSeconds:2. |
|
548 |
||
549 |
"Created: 2.3.1997 / 12:49:52 / cg" |
|
276 | 550 |
"Modified: 8.8.1997 / 17:47:06 / cg" |
0 | 551 |
! ! |
552 |
||
553 |
!STXInstaller methodsFor:'startup'! |
|
554 |
||
555 |
askAndInstall |
|
556 |
"/ check, if we are in the projects/smalltalk directory |
|
557 |
||
678 | 558 |
|answer| |
559 |
||
11 | 560 |
resources := ResourcePack for:self class. |
561 |
||
0 | 562 |
(Filename currentDirectory pathName endsWith:'projects/smalltalk') ifFalse:[ |
11 | 563 |
self warn:(resources string:'must be in the ''projects/smalltalk'' directory'). |
0 | 564 |
^ self |
565 |
]. |
|
566 |
||
678 | 567 |
answer := self askForFullInstallation. |
568 |
answer ifFalse:[^ self]. |
|
569 |
||
0 | 570 |
[self askForDestination] whileTrue:[ |
73 | 571 |
self checkForExistingInstallationAndConfirm ifTrue:[ |
572 |
self preInstall. |
|
573 |
self doInstall ifTrue:[ |
|
574 |
self postInstall. |
|
575 |
^ self |
|
576 |
]. |
|
577 |
(self confirm:(resources string:'installation failed or aborted - retry ?')) |
|
578 |
ifFalse:[ |
|
579 |
^ self |
|
580 |
] |
|
0 | 581 |
] |
582 |
]. |
|
583 |
||
678 | 584 |
"Modified: / 25.2.1998 / 16:54:51 / cg" |
0 | 585 |
! |
586 |
||
587 |
askForDestination |
|
588 |
"open a dialog to enter destination directories" |
|
589 |
||
1010 | 590 |
installWhat == #full ifTrue:[ |
678 | 591 |
^ self askForDestinationForFullInstallation |
592 |
] ifFalse:[ |
|
593 |
^ self askForDestinationForPartialInstallation |
|
594 |
] |
|
595 |
||
596 |
" |
|
597 |
STXInstaller open |
|
598 |
" |
|
599 |
||
600 |
"Modified: / 25.2.1998 / 17:12:45 / cg" |
|
601 |
! |
|
602 |
||
603 |
askForDestinationForFullInstallation |
|
604 |
"open a dialog to enter destination directories" |
|
605 |
||
606 |
|d cm l green dark img |
|
607 |
fullDirHolder| |
|
608 |
||
609 |
LastFullDir isNil ifTrue:[ |
|
610 |
LastFullDir := (Filename homeDirectory |
|
611 |
construct:'stx') |
|
612 |
constructString:'develop' |
|
613 |
]. |
|
614 |
||
615 |
fullDirHolder := LastFullDir asValue. |
|
616 |
||
617 |
Screen current hasColors ifTrue:[ |
|
618 |
green := (Color red:0 green:80 blue:20) "darkened". |
|
619 |
dark := Color grey:10. |
|
620 |
] ifFalse:[ |
|
621 |
green := Color white. |
|
622 |
dark := Color black. |
|
623 |
]. |
|
624 |
||
625 |
d := DialogBox new. |
|
626 |
||
627 |
d label:(resources string:'ST/X Full Installation'). |
|
628 |
img := Image fromFile:'SmalltalkX.xbm'. |
|
629 |
||
630 |
l := d addTextLabel:img. |
|
631 |
l adjust:#left; foregroundColor:green backgroundColor:dark. |
|
632 |
||
633 |
l := d addTextLabel:(resources string:'Smalltalk/X CD installation (full).'). |
|
634 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
635 |
d addVerticalSpace. |
|
636 |
d addVerticalSpace. |
|
637 |
||
638 |
d addHorizontalLine. |
|
639 |
||
640 |
l := d addTextLabel:(resources string:'ST/X development directory:'). |
|
641 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
642 |
||
643 |
cm := ComboBoxView on:fullDirHolder. |
|
644 |
cm list:self defaultFullDirs. |
|
645 |
d |
|
646 |
addLabelledField:cm |
|
647 |
label:(resources string:'stx develop') |
|
648 |
adjust:#left |
|
649 |
tabable:true |
|
650 |
from:0.0 to:1.0 separateAtX:0.25 |
|
651 |
nameAs:'fullBox'. |
|
652 |
||
653 |
(d componentAt:'fullBox.label') backgroundColor:dark; foregroundColor:Color white. |
|
654 |
||
655 |
d addVerticalSpace. |
|
656 |
d addHorizontalLine. |
|
657 |
||
658 |
d addHelpButtonFor:'STXInstaller/installHelp.html'; |
|
659 |
addAbortButton; |
|
660 |
addOkButtonLabelled:(resources string:'install'). |
|
661 |
d extent:500@400. |
|
662 |
||
663 |
d allViewBackground:dark. |
|
664 |
||
665 |
d openAtCenter. |
|
666 |
d accepted ifTrue:[ |
|
667 |
fullDir := LastFullDir := fullDirHolder value. |
|
668 |
d destroy. |
|
669 |
^ true |
|
670 |
]. |
|
671 |
d destroy. |
|
672 |
^ false |
|
673 |
||
674 |
" |
|
675 |
STXInstaller open |
|
676 |
" |
|
677 |
||
678 |
"Created: / 25.2.1998 / 17:11:37 / cg" |
|
679 |
"Modified: / 25.2.1998 / 17:29:07 / cg" |
|
680 |
! |
|
681 |
||
682 |
askForDestinationForPartialInstallation |
|
683 |
"open a dialog to enter destination directories" |
|
684 |
||
2 | 685 |
|d cm l green dark img |
24 | 686 |
stxLibDirHolder stxLibBinDirHolder stxBinDirHolder |
5 | 687 |
installDocHolder installSourceHolder installSTCHolder installGoodiesHolder |
73 | 688 |
binMegabytes libMegabytes docMegabytes stcMegabytes srcMegabytes |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
689 |
goodyMegabytes |
0 | 690 |
| |
691 |
||
678 | 692 |
binMegabytes := 12. |
73 | 693 |
libMegabytes := 30. |
678 | 694 |
docMegabytes := 15. |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
695 |
stcMegabytes := 2. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
696 |
srcMegabytes := 25. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
697 |
goodyMegabytes := 2. |
11 | 698 |
|
0 | 699 |
LastLibDir isNil ifTrue:[ |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
700 |
LastLibDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib' |
0 | 701 |
]. |
24 | 702 |
LastLibBinDir isNil ifTrue:[ |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
703 |
LastLibBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/lib' |
24 | 704 |
]. |
0 | 705 |
LastBinDir isNil ifTrue:[ |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
706 |
LastBinDir := '/opt/smalltalk/' , self smalltalkRelease , '/bin' |
0 | 707 |
]. |
708 |
||
709 |
stxLibDirHolder := LastLibDir asValue. |
|
24 | 710 |
stxLibBinDirHolder := LastLibBinDir asValue. |
0 | 711 |
stxBinDirHolder := LastBinDir asValue. |
24 | 712 |
|
5 | 713 |
installDocHolder := true asValue. |
714 |
installSourceHolder := true asValue. |
|
715 |
installSTCHolder := true asValue. |
|
716 |
installGoodiesHolder := true asValue. |
|
0 | 717 |
|
718 |
Screen current hasColors ifTrue:[ |
|
719 |
green := (Color red:0 green:80 blue:20) "darkened". |
|
720 |
dark := Color grey:10. |
|
721 |
] ifFalse:[ |
|
722 |
green := Color white. |
|
723 |
dark := Color black. |
|
724 |
]. |
|
725 |
||
726 |
d := DialogBox new. |
|
727 |
||
678 | 728 |
d label:(resources string:'ST/X Partial Installation'). |
2 | 729 |
img := Image fromFile:'SmalltalkX.xbm'. |
730 |
||
731 |
l := d addTextLabel:img. |
|
732 |
l adjust:#left; foregroundColor:green backgroundColor:dark. |
|
733 |
||
678 | 734 |
l := d addTextLabel:(resources string:'Smalltalk/X CD installation (partial).'). |
0 | 735 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
736 |
d addVerticalSpace. |
|
737 |
d addVerticalSpace. |
|
738 |
||
739 |
d addHorizontalLine. |
|
740 |
||
11 | 741 |
l := d addTextLabel:(resources string:'Destination directories:'). |
0 | 742 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
743 |
||
678 | 744 |
l := d addTextLabel:(resources string:'(the defaults below are recommended)'). |
745 |
l adjust:#right; backgroundColor:dark; foregroundColor:Color white. |
|
746 |
||
0 | 747 |
cm := ComboBoxView on:stxBinDirHolder. |
1 | 748 |
cm list:self defaultBinDirs. |
0 | 749 |
d |
750 |
addLabelledField:cm |
|
11 | 751 |
label:(resources string:'binaries') |
0 | 752 |
adjust:#left |
753 |
tabable:true |
|
754 |
from:0.0 to:1.0 separateAtX:0.25 |
|
755 |
nameAs:'binaryBox'. |
|
756 |
||
757 |
(d componentAt:'binaryBox.label') backgroundColor:dark; foregroundColor:Color white. |
|
758 |
||
24 | 759 |
cm := ComboBoxView on:stxLibBinDirHolder. |
760 |
cm list:self defaultLibBinDirs. |
|
761 |
d |
|
762 |
addLabelledField:cm |
|
763 |
label:(resources string:'libraries') |
|
764 |
adjust:#left |
|
765 |
tabable:true |
|
766 |
from:0.0 to:1.0 separateAtX:0.25 |
|
767 |
nameAs:'libraryBinBox'. |
|
768 |
||
769 |
(d componentAt:'libraryBinBox.label') backgroundColor:dark; foregroundColor:Color white. |
|
770 |
||
0 | 771 |
cm := ComboBoxView on:stxLibDirHolder. |
1 | 772 |
cm list:self defaultLibDirs. |
0 | 773 |
d |
774 |
addLabelledField:cm |
|
117 | 775 |
label:(resources string:'other files') |
0 | 776 |
adjust:#left |
777 |
tabable:true |
|
778 |
from:0.0 to:1.0 separateAtX:0.25 |
|
779 |
nameAs:'libraryBox'. |
|
780 |
||
781 |
(d componentAt:'libraryBox.label') backgroundColor:dark; foregroundColor:Color white. |
|
782 |
||
5 | 783 |
d addVerticalSpace. |
784 |
d addHorizontalLine. |
|
785 |
d addVerticalSpace. |
|
786 |
||
11 | 787 |
(d addTextLabel:(resources string:'required:')) |
5 | 788 |
adjust:#left; foregroundColor:Color white backgroundColor:dark. |
789 |
||
790 |
d leftIndent:35. |
|
11 | 791 |
(d addTextLabel:(resources string:'binaries (approx. %1 Mb)' with:binMegabytes printString)) |
5 | 792 |
adjust:#left; foregroundColor:Color white backgroundColor:dark. |
11 | 793 |
(d addTextLabel:(resources string:'libraries (approx. %1 Mb)' with:libMegabytes printString)) |
5 | 794 |
adjust:#left; foregroundColor:Color white backgroundColor:dark. |
795 |
d leftIndent:0. |
|
796 |
||
797 |
d addVerticalSpace. |
|
798 |
d addHorizontalLine. |
|
799 |
d addVerticalSpace. |
|
800 |
||
11 | 801 |
(d addTextLabel:(resources string:'optional:')) |
5 | 802 |
adjust:#left; foregroundColor:Color white backgroundColor:dark. |
803 |
||
73 | 804 |
(d addCheckBox:((resources string:'doc files (+%1 Mb)' with:docMegabytes)) on:installDocHolder) |
5 | 805 |
labelView foregroundColor:Color white backgroundColor:dark. |
73 | 806 |
(d addCheckBox:((resources string:'stc & support files (+%1 Mb)' with:stcMegabytes)) on:installSTCHolder) |
10 | 807 |
labelView foregroundColor:Color white backgroundColor:dark. |
808 |
||
809 |
d addVerticalSpace. |
|
810 |
d addHorizontalLine. |
|
811 |
d addVerticalSpace. |
|
812 |
||
11 | 813 |
(d addTextLabel:(resources string:'optional (but highly recommended):')) |
10 | 814 |
adjust:#left; foregroundColor:Color white backgroundColor:dark. |
815 |
||
73 | 816 |
(d addCheckBox:((resources string:'smalltalk source files (+%1 Mb)' with:srcMegabytes)) on:installSourceHolder) |
5 | 817 |
labelView foregroundColor:Color white backgroundColor:dark. |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
818 |
(d addCheckBox:((resources string:'goodies (+%1 Mb)' with:goodyMegabytes)) on:installGoodiesHolder) |
5 | 819 |
labelView foregroundColor:Color white backgroundColor:dark. |
820 |
||
821 |
d addVerticalSpace. |
|
822 |
d addHorizontalLine. |
|
823 |
||
24 | 824 |
d addHelpButtonFor:'STXInstaller/installHelp.html'; |
825 |
addAbortButton; |
|
826 |
addOkButtonLabelled:(resources string:'install'). |
|
73 | 827 |
d extent:500@400. |
0 | 828 |
|
829 |
d allViewBackground:dark. |
|
830 |
||
831 |
d openAtCenter. |
|
832 |
d accepted ifTrue:[ |
|
833 |
stxLibDir := LastLibDir := stxLibDirHolder value. |
|
24 | 834 |
stxLibBinDir := LastLibBinDir := stxLibBinDirHolder value. |
0 | 835 |
stxBinDir := LastBinDir := stxBinDirHolder value. |
5 | 836 |
installDocFiles := installDocHolder value. |
837 |
installSourceFiles := installSourceHolder value. |
|
838 |
installSTCFiles := installSTCHolder value. |
|
839 |
installGoodyFiles := installGoodiesHolder value. |
|
1 | 840 |
d destroy. |
0 | 841 |
^ true |
842 |
]. |
|
1 | 843 |
d destroy. |
0 | 844 |
^ false |
845 |
||
678 | 846 |
" |
847 |
STXInstaller open |
|
848 |
" |
|
849 |
||
850 |
"Created: / 25.2.1998 / 17:11:26 / cg" |
|
851 |
"Modified: / 25.2.1998 / 19:43:30 / cg" |
|
852 |
! |
|
853 |
||
854 |
askForFullInstallation |
|
855 |
"open a dialog to enter destination directories" |
|
856 |
||
857 |
|d cm l green dark img| |
|
858 |
||
859 |
Screen current hasColors ifTrue:[ |
|
860 |
green := (Color red:0 green:80 blue:20) "darkened". |
|
861 |
dark := Color grey:10. |
|
862 |
] ifFalse:[ |
|
863 |
green := Color white. |
|
864 |
dark := Color black. |
|
865 |
]. |
|
866 |
||
867 |
d := DialogBox new. |
|
868 |
||
869 |
d label:(resources string:'ST/X CD Installation'). |
|
870 |
img := Image fromFile:'SmalltalkX.xbm'. |
|
871 |
||
872 |
l := d addTextLabel:img. |
|
873 |
l adjust:#left; foregroundColor:green backgroundColor:dark. |
|
874 |
||
875 |
l := d addTextLabel:(resources string:'Smalltalk/X CD installation.'). |
|
876 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
877 |
d addVerticalSpace. |
|
878 |
d addVerticalSpace. |
|
879 |
||
880 |
d addHorizontalLine. |
|
881 |
||
882 |
l := d addTextLabel:(resources string: |
|
883 |
'You can either perform a ' , 'full' asText allBold , ' installation, or a ' , 'partial' asText allBold ,' installation.'). |
|
884 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
885 |
||
886 |
d addVerticalSpace. |
|
887 |
d addHorizontalLine. |
|
888 |
||
889 |
d leftIndent:20. |
|
890 |
l := d addTextLabel:(resources string: |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
891 |
'full:' asText allBold , ' |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
892 |
The full installation is required if you want to build your own |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
893 |
customized smalltalk executable. It allows you to create and include |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
894 |
additional precompiled binary classes or classLibraries. |
678 | 895 |
This is also required if you want to link your own standalone executables. |
896 |
||
897 |
It consists of a directory hierachy, including makefiles for a customizeable |
|
898 |
rebuild of the whole smalltalk system. |
|
899 |
(Actually, it simply copies the whole CD contents onto your disk). |
|
900 |
This requires roughly 120-200Mb of hard disk space.'). |
|
901 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
902 |
||
903 |
d addVerticalSpace. |
|
904 |
d addHorizontalLine. |
|
905 |
||
906 |
l := d addTextLabel:(resources string: |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
907 |
'partial:' asText allBold , ' |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
908 |
The partial (runTime) installation requires less disk space and only copies the |
678 | 909 |
smalltalk executable, shared libraries and support files onto your hard disk. |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
910 |
This setup allows normal smalltalk development and is also useful as a runtime |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
911 |
environment for smalltalk applications. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
912 |
However, it does not support recreation of a new smalltal executable and/or |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
913 |
shared binary classLibraries. |
678 | 914 |
This requires roughly 70-90Mb of hard disk space. |
915 |
||
916 |
||
917 |
'). |
|
918 |
l adjust:#left; backgroundColor:dark; foregroundColor:Color white. |
|
919 |
||
920 |
||
921 |
d leftIndent:0. |
|
922 |
d addVerticalSpace. |
|
923 |
d addHorizontalLine. |
|
924 |
||
925 |
||
926 |
d addHelpButtonFor:'STXInstaller/installHelp.html'; |
|
927 |
addAbortButton; |
|
1010 | 928 |
addOkButton:(Button label:(resources string:'full') action:[installWhat := #full]); |
929 |
addOkButtonLabelled:(resources string:'partial'). |
|
678 | 930 |
d extent:500@400. |
931 |
||
932 |
d allViewBackground:dark. |
|
933 |
||
1010 | 934 |
installWhat := #partial. |
678 | 935 |
d openAtCenter. |
936 |
d accepted ifTrue:[ |
|
937 |
d destroy. |
|
938 |
^ true |
|
939 |
]. |
|
940 |
d destroy. |
|
941 |
^ false |
|
942 |
||
943 |
" |
|
944 |
STXInstaller open |
|
945 |
" |
|
946 |
||
947 |
"Created: / 25.2.1998 / 16:50:16 / cg" |
|
948 |
"Modified: / 25.2.1998 / 19:42:31 / cg" |
|
0 | 949 |
! |
950 |
||
951 |
checkForExistingInstallationAndConfirm |
|
952 |
"look if there is another installation and confirm |
|
953 |
reinstalling; return true if ok, false if not" |
|
954 |
||
678 | 955 |
|whichDir canOverWrite whatToDo box| |
956 |
||
1010 | 957 |
installWhat == #full ifTrue:[ |
678 | 958 |
whichDir := fullDir. |
959 |
canOverWrite := false. |
|
960 |
] ifFalse:[ |
|
961 |
whichDir := stxLibDir. |
|
962 |
canOverWrite := true. |
|
963 |
]. |
|
1 | 964 |
|
678 | 965 |
whichDir asFilename exists ifTrue:[ |
966 |
whatToDo := Dialog |
|
967 |
choose:(resources |
|
968 |
string:'detected existing ST/X installation in %1' |
|
969 |
with:whichDir asText allBold) |
|
970 |
label:(resources string:'Attention') |
|
971 |
labels:(resources array:(canOverWrite |
|
972 |
ifFalse:[#('remove first' 'cancel')] |
|
973 |
ifTrue:[#('remove first' 'overwrite' 'cancel')] )) |
|
974 |
values:(canOverWrite ifFalse:[#(remove nil)] ifTrue:[#(remove over nil)]) |
|
975 |
default:nil. |
|
73 | 976 |
|
678 | 977 |
whatToDo isNil ifTrue:[^false]. |
978 |
whatToDo == #remove ifTrue:[ |
|
979 |
((whichDir findString:'stx') == 0 |
|
980 |
and:[(whichDir findString:'smalltalk') == 0]) ifTrue:[ |
|
981 |
"/ confirm again |
|
982 |
(self confirm:(resources |
|
983 |
string:'are you certain that the directory to remove |
|
984 |
(' , whichDir , ') is really a smalltalk directory ? |
|
23
42997b231783
double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents:
22
diff
changeset
|
985 |
|
73 | 986 |
Remove it now ?')) ifFalse:[ |
678 | 987 |
^ false |
988 |
] |
|
989 |
]. |
|
990 |
||
991 |
[ |
|
992 |
box := DialogBox new label:'please wait'. |
|
993 |
box addTextLabel:'removing ' , whichDir , ' ...'. |
|
994 |
box showAtPointer. |
|
995 |
] forkAt:(Processor activePriority+1). |
|
996 |
box waitUntilVisible. |
|
23
42997b231783
double confirm removal of directory, if its name
Claus Gittinger <cg@exept.de>
parents:
22
diff
changeset
|
997 |
|
678 | 998 |
(OperatingSystem recursiveRemoveDirectory:whichDir) |
999 |
ifFalse:[ |
|
1000 |
self warn:(resources string:'mhmh - could not remove old installation. |
|
1001 |
||
1002 |
Please remove it manually (using root privileges if required) |
|
1003 |
and try again.'). |
|
1004 |
box destroy. |
|
1005 |
^ false |
|
1006 |
]. |
|
1007 |
||
1008 |
box destroy |
|
1 | 1009 |
]. |
0 | 1010 |
]. |
678 | 1011 |
|
0 | 1012 |
^ true |
1013 |
||
678 | 1014 |
" |
1015 |
STXInstaller open |
|
1016 |
" |
|
1017 |
||
1018 |
"Modified: / 25.2.1998 / 19:35:12 / cg" |
|
0 | 1019 |
! |
1020 |
||
1021 |
doInstall |
|
1022 |
"install ST/X; return true if ok, false if not" |
|
1023 |
||
678 | 1024 |
|progressView ok v textView p l |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1025 |
dirToMonitor doDfMonitoring dfMonitorProcess kB| |
678 | 1026 |
|
1027 |
doDfMonitoring := false. |
|
1028 |
||
1029 |
v := View new preferredExtent:(250 @ 350). |
|
1030 |
||
1031 |
textView := HVScrollableView for:TextCollector in:v. |
|
1032 |
textView origin:0.0@0.0 corner:1.0@1.0. |
|
1033 |
textView bottomInset:30. |
|
1034 |
commandTraceView := textView scrolledView. |
|
1035 |
||
1010 | 1036 |
installWhat == #full ifTrue:[ |
678 | 1037 |
dirToMonitor := fullDir. |
1038 |
] ifFalse:[ |
|
1039 |
dirToMonitor := stxLibDir |
|
1040 |
]. |
|
1041 |
||
1042 |
(OperatingSystem canExecuteCommand:'df ' , dirToMonitor) ifTrue:[ |
|
1043 |
p := HorizontalPanelView in:v. |
|
1044 |
p origin:0.0@1.0 corner:1.0@1.0. |
|
1045 |
p topInset:-30. |
|
1046 |
p horizontalLayout:#fit. |
|
1047 |
||
1048 |
l := Label label:'' in:p. |
|
1049 |
l labelChannel:(dfHolder := '' asValue). |
|
1050 |
l adjust:#left. |
|
1051 |
dfMonitorProcess := [ |
|
1052 |
|ok p text keys values i l| |
|
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1053 |
|
678 | 1054 |
ok := true. |
1055 |
[ok] whileTrue:[ |
|
1056 |
doDfMonitoring ifTrue:[ |
|
1057 |
ok := false. |
|
1058 |
p := PipeStream readingFrom:('df -k ' , dirToMonitor). |
|
1059 |
p notNil ifTrue:[ |
|
1060 |
[ |
|
1061 |
text := p contentsOfEntireFile. |
|
1062 |
] valueNowOrOnUnwindDo:[ |
|
1063 |
p close. |
|
1064 |
]. |
|
1065 |
"/ Transcript showCR:text asString. |
|
1066 |
text notNil ifTrue:[ |
|
1067 |
text := text asCollectionOfLines. |
|
1068 |
text size >= 2 ifTrue:[ |
|
1069 |
keys := (text at:1) asCollectionOfWords. |
|
1070 |
values := (text at:2) asCollectionOfWords. |
|
1071 |
i := (keys indexOf:'Capacity'). |
|
1072 |
i == 0 ifTrue:[ |
|
1073 |
i := (keys indexOf:'capacity'). |
|
1074 |
]. |
|
1075 |
i ~~ 0 ifTrue:[ |
|
1076 |
l := 'Used disk space: ' , (values at:i) withoutSeparators. |
|
1077 |
i := (keys indexOf:'Available'). |
|
1078 |
i == 0 ifTrue:[ |
|
1079 |
i := (keys indexOf:'available'). |
|
1080 |
i == 0 ifTrue:[ |
|
1081 |
i := (keys indexOf:'avail'). |
|
1082 |
i == 0 ifTrue:[ |
|
1083 |
i := (keys indexOf:'Avail'). |
|
1084 |
]. |
|
1085 |
]. |
|
1086 |
]. |
|
1087 |
i ~~ 0 ifTrue:[ |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1088 |
kB := (values at:i) withoutSeparators. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1089 |
l := l , ' (' , kB , 'k available)'. |
678 | 1090 |
]. |
1091 |
dfHolder value:l. |
|
1092 |
ok := true. |
|
1093 |
Delay waitForSeconds:9. |
|
1094 |
] |
|
1095 |
] |
|
1096 |
]. |
|
1097 |
]. |
|
1098 |
]. |
|
1099 |
Delay waitForSeconds:1. |
|
1100 |
] |
|
1101 |
] forkAt:(Processor activePriority+3) |
|
1102 |
]. |
|
0 | 1103 |
|
1104 |
progressView := ProgressIndicator |
|
1118 | 1105 |
inBoxWithLabel:'ST/X Installation' icon:(Icon stxIcon) |
0 | 1106 |
text:#('ST/X Installation' '' '' '' '' '' '' '') asStringCollection |
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1107 |
abortable:true |
678 | 1108 |
view:v |
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1109 |
closeWhenDone:false. |
73 | 1110 |
progressView topView extent:(640 min:Display width) @ (500 min:Display height). |
0 | 1111 |
|
1112 |
ok := false. |
|
1113 |
||
1114 |
progressView showProgressOf: |
|
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1115 |
[:progressValue :currentAction| |msg| |
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1116 |
|
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1117 |
Processor activeProcess withPriority:7 do:[ |
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1118 |
[ |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1119 |
actionPercentageHolder := progressValue. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1120 |
actionTextHolder := currentAction. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1121 |
|
1010 | 1122 |
installWhat == #full ifFalse:[ |
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1123 |
self outputInitialMessage. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1124 |
]. |
0 | 1125 |
|
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1126 |
(self createDirectories) ifTrue:[ |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1127 |
doDfMonitoring := true. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1128 |
ok := self copyFiles |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1129 |
]. |
790 | 1130 |
self changeWritability. |
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1131 |
self createSymbolicLinks. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1132 |
|
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1133 |
progressValue value:100. |
73 | 1134 |
|
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1135 |
progressView topView raise. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1136 |
commandTraceView showCR:'Installation finished.' asText allBold. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1137 |
commandTraceView endEntry. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1138 |
textView flash. |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1139 |
|
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1140 |
progressView topView abortButton label:(resources string:'continue'). |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1141 |
progressView topView abortButton action:[progressView topView hide]. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1142 |
msg := (resources |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1143 |
array:#('ST/X Installation finished.' '' 'press continue ...' '' '' '')) |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1144 |
asStringCollection. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1145 |
actionTextHolder value:nil. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1146 |
actionTextHolder value:msg. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1147 |
] valueOnUnwindDo:[ |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1148 |
dfMonitorProcess notNil ifTrue:[ |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1149 |
dfMonitorProcess terminate. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1150 |
dfMonitorProcess := nil. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1151 |
]. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1152 |
copyProcess notNil ifTrue:[ |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1153 |
copyProcess terminate. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1154 |
copyProcess := nil. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1155 |
]. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1156 |
] |
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1157 |
] |
0 | 1158 |
]. |
1159 |
||
678 | 1160 |
dfMonitorProcess notNil ifTrue:[ |
682
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1161 |
dfMonitorProcess terminate. |
9fcd010d8fd3
terminate monitor process on unwind
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
1162 |
dfMonitorProcess := nil. |
678 | 1163 |
]. |
1164 |
copyProcess notNil ifTrue:[ |
|
1165 |
copyProcess terminate. |
|
1166 |
copyProcess := nil. |
|
1167 |
]. |
|
0 | 1168 |
^ ok |
1169 |
||
678 | 1170 |
" |
1171 |
STXInstaller open |
|
1172 |
" |
|
1173 |
||
1174 |
"Created: / 17.7.1996 / 15:11:27 / cg" |
|
790 | 1175 |
"Modified: / 20.4.1998 / 15:36:40 / cg" |
0 | 1176 |
! |
1177 |
||
1178 |
open |
|
1 | 1179 |
self askAndInstall. |
0 | 1180 |
|
5 | 1181 |
" |
1182 |
STXInstaller open |
|
1183 |
" |
|
1 | 1184 |
! |
1185 |
||
1186 |
postInstall |
|
1187 |
"some messages at the end ..." |
|
1188 |
||
4
8b68fdf7c870
better looking; show command output
Claus Gittinger <cg@exept.de>
parents:
3
diff
changeset
|
1189 |
|shInfo cshInfo msg havePath| |
1 | 1190 |
|
678 | 1191 |
resources isNil ifTrue:[ |
1192 |
resources := ResourcePack for:self class. |
|
1193 |
]. |
|
1194 |
||
11 | 1195 |
msg := (resources string:'ST/X Installation complete.\\') withCRs. |
1 | 1196 |
shInfo := ''. |
1197 |
cshInfo := ''. |
|
1198 |
||
1010 | 1199 |
installWhat == #full ifTrue:[ |
678 | 1200 |
msg := msg , 'You will now find a development directory hierarchy |
1201 |
in ''' , fullDir asText allBold , '''. |
|
1202 |
||
1203 |
To try it, ''cd'' to ''' , fullDir , '/projects/smalltalk'' |
|
1204 |
and start smalltalk with the command: ''./smalltalk''. |
|
1205 |
||
1206 |
To perform a partial installation of your customized smalltalk later, |
|
1207 |
use the INSTALL script found in ''' , fullDir , ''''. |
|
1 | 1208 |
|
678 | 1209 |
] ifFalse:[ |
1210 |
havePath := true. |
|
1211 |
(((OperatingSystem getEnvironment:'PATH') |
|
1212 |
asCollectionOfSubstringsSeparatedBy:$:) |
|
1213 |
includes:stxBinDir) ifFalse:[ |
|
1 | 1214 |
|
678 | 1215 |
havePath := false. |
1216 |
shInfo := 'PATH=$PATH:' , stxBinDir , ' ; export PATH\'. |
|
1217 |
cshInfo := 'set path=($path ' , stxBinDir , ')\'. |
|
1218 |
msg := msg , (resources string:'%1 is not in your PATH.\You should change your ".login" and/or ".profile" files to include it.\\' |
|
1219 |
with:stxBinDir asText allBold) withCRs. |
|
1 | 1220 |
]. |
1221 |
||
678 | 1222 |
(stxLibDir ~= '/usr/local/lib/smalltalk' |
1117
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1223 |
and:[stxLibDir ~= '/usr/lib/smalltalk' |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1224 |
and:[stxLibDir ~= ('/opt/smalltalk/' , self smalltalkRelease , '/lib')]]) ifTrue:[ |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1225 |
msg := msg , (resources string:'The library directory is not a standard ST/X library directory\("/opt/smalltalk/' , self smalltalkRelease , '/lib", "/usr/local/lib/smalltalk" or "/usr/lib/smalltalk"). |
657dde1e749d
new default destination: /opt/smalltalk/<RELEASE>
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
1226 |
You may have to define the %1 environment variable\as %2 if ST/X complains about not finding its files.\' |
678 | 1227 |
with:'STX_LIBDIR' asText allBold |
1228 |
with:stxLibDir asText allBold) withCRs. |
|
1229 |
havePath ifFalse:[ |
|
1230 |
msg := msg , (resources string:'The above mentioned files are also a good place to do this.\') withCRs. |
|
1231 |
] ifTrue:[ |
|
1232 |
msg := msg , (resources string:'The ".login" and/or ".profile" files are a good place to do this.\') withCRs. |
|
1233 |
]. |
|
1 | 1234 |
|
678 | 1235 |
shInfo := shInfo , 'STX_LIBDIR=' , stxLibDir , ' ; export STX_LIBDIR\'. |
1236 |
cshInfo := cshInfo , 'setenv STX_LIBDIR ' , stxLibDir , '\'. |
|
1237 |
]. |
|
1238 |
||
1239 |
shInfo notEmpty ifTrue:[ |
|
1240 |
'*********************************************************' errorPrintCR. |
|
1241 |
(resources string:'Message from the ST/X Installer:\\') withCRs errorPrintCR. |
|
1242 |
(resources string:'Please add the following to your ".profile" file:') withCRs errorPrintCR. |
|
1243 |
'' errorPrintCR. |
|
1244 |
shInfo withCRs errorPrintCR. |
|
1245 |
'' errorPrintCR. |
|
1246 |
(resources string:'or (if you use csh/tcsh), add to your ".login" file:') withCRs errorPrintCR. |
|
1247 |
'' errorPrintCR. |
|
1248 |
cshInfo withCRs errorPrintCR. |
|
1249 |
'' errorPrintCR. |
|
1250 |
'*********************************************************' errorPrintCR. |
|
1251 |
]. |
|
1 | 1252 |
]. |
73 | 1253 |
|
1254 |
msg := msg , '\\Have fun using ST/X !!'. |
|
1255 |
||
1256 |
self information:msg withCRs. |
|
1 | 1257 |
|
678 | 1258 |
"Modified: / 25.2.1998 / 19:29:04 / cg" |
25
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1259 |
! |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1260 |
|
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1261 |
preInstall |
678 | 1262 |
"clobber the doc directory, to avoid copying cyclic symbolic links. |
1263 |
Notice, the CD does not contain symlinks, but checking for them |
|
1264 |
allows installing from a development dir." |
|
25
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1265 |
|
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1266 |
|f| |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1267 |
|
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1268 |
f := '../../doc/online/english/german' asFilename. |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1269 |
f exists ifTrue:[ |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1270 |
f isSymbolicLink ifTrue:[ |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1271 |
OperatingSystem executeCommand:'(cd ../../doc/online; make clobber) >/dev/null 2>/dev/null' |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1272 |
] |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1273 |
] |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1274 |
|
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1275 |
" |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1276 |
STXInstaller new preInstall |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1277 |
" |
42ee3e7ced09
remove local symbolic links (if any) in doc/online
Claus Gittinger <cg@exept.de>
parents:
24
diff
changeset
|
1278 |
|
678 | 1279 |
"Modified: / 25.2.1998 / 17:39:55 / cg" |
0 | 1280 |
! ! |
1281 |
||
28 | 1282 |
!STXInstaller class methodsFor:'documentation'! |
0 | 1283 |
|
1284 |
version |
|
1285 |
^ '$Header$' |
|
1286 |
! ! |