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