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