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