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