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