author | Claus Gittinger <cg@exept.de> |
Wed, 25 Oct 2006 00:04:24 +0200 | |
changeset 10140 | 154f52dd6821 |
parent 10132 | e2afb1e0363a |
child 10144 | 89b932dbdacc |
permissions | -rw-r--r-- |
9553 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9536 | 13 |
|
9569 | 14 |
Object subclass:#ProjectDefinition |
9984 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Support-Projects' |
|
9536 | 19 |
! |
20 |
||
9607 | 21 |
ProjectDefinition class instanceVariableNames:'overwrittenMethods' |
22 |
||
23 |
" |
|
24 |
No other class instance variables are inherited by this class. |
|
25 |
" |
|
26 |
! |
|
27 |
||
9569 | 28 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 29 |
|
30 |
copyright |
|
31 |
" |
|
32 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
33 |
All Rights Reserved |
|
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
9714 | 42 |
! |
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
redefinable build-file attributes: |
|
47 |
||
48 |
stcOptimizationOptions -> STCLOCALOPT |
|
49 |
stcWarningOptions -> STCLOCALOPT |
|
50 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
|
51 |
localIncludes_win32 -> LOCALINCLUDES (nt.mak) |
|
52 |
||
53 |
for applications: |
|
54 |
startupClassName |
|
55 |
startupSelector |
|
56 |
||
57 |
for libraries: |
|
58 |
||
59 |
" |
|
9553 | 60 |
! ! |
9536 | 61 |
|
9569 | 62 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 63 |
|
64 |
newForPackage:packageID |
|
65 |
^ self |
|
66 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
|
67 |
package:packageID. |
|
68 |
||
69 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
70 |
! |
|
71 |
||
72 |
newNamed:newName package:packageID |
|
73 |
|newClass| |
|
74 |
||
75 |
"/ for now, we are strict. |
|
76 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9569 | 77 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 78 |
|
79 |
newClass := self |
|
80 |
subclass:(newName asSymbol) |
|
81 |
instanceVariableNames:'' |
|
82 |
classVariableNames:'' |
|
83 |
poolDictionaries:'' |
|
84 |
category:(self defaultCategory). |
|
85 |
||
86 |
newClass package:packageID asSymbol. |
|
87 |
^ newClass |
|
88 |
||
89 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
90 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 91 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 92 |
! ! |
93 |
||
9569 | 94 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 95 |
|
96 |
defaultCategory |
|
97 |
^'* Projects *' |
|
98 |
||
99 |
"Created: / 11-08-2006 / 14:16:49 / cg" |
|
100 |
! |
|
101 |
||
102 |
initialClassNameForDefinitionOf:aPackageId |
|
103 |
|s| |
|
104 |
||
105 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
|
106 |
(s endsWith:$_) ifTrue:[ |
|
107 |
s := s copyWithoutLast:1 |
|
108 |
]. |
|
109 |
^ s |
|
110 |
||
111 |
" |
|
112 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
|
113 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic' |
|
114 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
115 |
" |
|
116 |
||
117 |
"Created: / 09-08-2006 / 17:44:47 / fm" |
|
118 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
|
119 |
! |
|
120 |
||
121 |
libraryName |
|
9575 | 122 |
^ self package asPackageId libraryName |
9536 | 123 |
|
9559 | 124 |
" |
9688 | 125 |
bosch_dapasx_datenbasis libraryName |
9575 | 126 |
stx_libbasic3 libraryName |
9559 | 127 |
" |
9536 | 128 |
|
129 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 130 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 131 |
! |
132 |
||
9559 | 133 |
libraryNameFor:aProjectID |
9575 | 134 |
^ aProjectID asPackageId libraryName |
9536 | 135 |
|
9559 | 136 |
" |
9575 | 137 |
bosch_dapasx_datenbasis libraryName |
138 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
9688 | 139 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 140 |
" |
9536 | 141 |
|
142 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 143 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 144 |
! |
145 |
||
146 |
module |
|
9559 | 147 |
^ self moduleOfClass:self |
9536 | 148 |
|
9559 | 149 |
" |
150 |
bosch_dapasx_datenbasis_Definition module |
|
151 |
DapasX_Datenbasis module |
|
9575 | 152 |
stx_libbasic3 module |
9559 | 153 |
" |
9536 | 154 |
|
155 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
156 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 157 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 158 |
! |
159 |
||
160 |
moduleDirectory |
|
9575 | 161 |
^ (PackageId from:self package) directory |
9536 | 162 |
|
9559 | 163 |
" |
9575 | 164 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
165 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
166 |
stx_libbasic3 moduleDirectory |
|
9559 | 167 |
" |
9536 | 168 |
|
169 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9575 | 170 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
9536 | 171 |
! |
172 |
||
9559 | 173 |
moduleDirectoryFor:aProjectID |
174 |
^ (aProjectID subStrings:$:) last |
|
9536 | 175 |
|
9559 | 176 |
" |
177 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
178 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
179 |
" |
|
9536 | 180 |
|
181 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 182 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 183 |
! |
184 |
||
9891 | 185 |
moduleDirectory_win32 |
186 |
^ (PackageId from:self package) directory copy replaceAll:$/ with:$\ |
|
187 |
||
188 |
" |
|
189 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
190 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
191 |
stx_libbasic3 moduleDirectory_win32 |
|
192 |
" |
|
193 |
||
194 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
195 |
! |
|
196 |
||
9559 | 197 |
moduleFor:aProjectID |
198 |
^ (aProjectID subStrings:$:) first |
|
9536 | 199 |
|
9559 | 200 |
" |
201 |
DapasXProject module |
|
202 |
DapasX_Datenbasis module |
|
203 |
" |
|
9536 | 204 |
|
205 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 206 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 207 |
! |
208 |
||
9559 | 209 |
moduleOfClass:aClass |
210 |
^ self moduleFor:aClass package |
|
9536 | 211 |
|
9559 | 212 |
" |
213 |
DapasXProject module |
|
214 |
DapasX_Datenbasis module |
|
215 |
" |
|
9536 | 216 |
|
217 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 218 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 219 |
! |
220 |
||
9559 | 221 |
msdosPathToPackage:toPackageID from:fromPackageID |
222 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
223 |
||
9901 | 224 |
|pTop parts1 parts2 common up down rel| |
9852 | 225 |
|
226 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
227 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
228 |
common := parts1 commonPrefixWith:parts2. |
|
229 |
common notEmpty ifTrue:[ |
|
9880 | 230 |
up := ((1 to:parts1 size - common size) collect:[:p | '..\']) asStringWith:''. |
231 |
down := (parts2 copyFrom:common size+1) asStringWith:'\'. |
|
232 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
|
233 |
^ up,down |
|
9852 | 234 |
]. |
9714 | 235 |
|
9901 | 236 |
rel := (self topRelativePathToPackage_win32:toPackageID). |
237 |
(rel startsWith:'stx\') ifTrue:[ |
|
238 |
^ '$(TOP)',(rel copyFrom:'stx' size+1) |
|
9714 | 239 |
]. |
9536 | 240 |
|
9901 | 241 |
^ '$(TOP)\..\',rel. |
242 |
||
243 |
"/ pTop := self msdosPathToTopFor:fromPackageID. |
|
244 |
"/ (pTop endsWith:'\stx') ifTrue:[ |
|
245 |
"/ ^ (pTop copyButLast:'stx' size),(self topRelativePathToPackage_win32:toPackageID) |
|
246 |
"/ ] ifFalse:[ |
|
247 |
"/ ^ pTop,'\..\',(self topRelativePathToPackage_win32:toPackageID) |
|
248 |
"/ ]. |
|
249 |
||
9559 | 250 |
" |
251 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
9852 | 252 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
253 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
9559 | 254 |
" |
9536 | 255 |
|
9559 | 256 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 257 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 258 |
! |
259 |
||
9714 | 260 |
msdosPathToTopFor:aProjectID |
9559 | 261 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
9536 | 262 |
|
9852 | 263 |
|parts| |
264 |
||
265 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
266 |
||
267 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
268 |
parts size == 1 ifTrue:[^ '.']. |
|
269 |
^ (((2 to:parts size-1) collect:[:p | '..\']) asStringWith:'') , '..' |
|
270 |
]. |
|
271 |
||
272 |
^ ((parts collect:[:p | '..\']) asStringWith:'') , 'stx' |
|
9536 | 273 |
|
9559 | 274 |
" |
9852 | 275 |
self msdosPathToTopFor: #'bosch' |
276 |
self msdosPathToTopFor: #'bosch:dapasx' |
|
9559 | 277 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
9852 | 278 |
self msdosPathToTopFor: #'stx' |
279 |
self msdosPathToTopFor: #'stx:libview' |
|
280 |
self msdosPathToTopFor: #'stx:goodies/foo' |
|
9559 | 281 |
" |
9536 | 282 |
|
283 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 284 |
"Modified: / 14-09-2006 / 14:49:17 / cg" |
9559 | 285 |
! |
286 |
||
9536 | 287 |
packageName |
9688 | 288 |
"the last component" |
9536 | 289 |
|
9688 | 290 |
^ self packageNameFor: self package |
9536 | 291 |
|
9688 | 292 |
" |
293 |
bosch_dapasx_hw_schnittstellen packageName |
|
294 |
bosch_dapasx_datenbasis packageName |
|
295 |
bosch_dapasx_parameter_system packageName |
|
296 |
" |
|
9536 | 297 |
|
298 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
299 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
300 |
! |
|
301 |
||
302 |
packageNameFor: aProjectID |
|
9688 | 303 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 304 |
|
9688 | 305 |
" |
306 |
bosch_dapasx_hw_schnittstellen packageName |
|
307 |
bosch_dapasx_datenbasis packageName |
|
308 |
bosch_dapasx_parameter_system packageName |
|
309 |
" |
|
9536 | 310 |
|
311 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
312 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
313 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
314 |
! |
|
315 |
||
316 |
parentProject |
|
317 |
||
318 |
^(self parentProjectFor: self package) |
|
319 |
||
320 |
" |
|
321 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
322 |
DapasX_Datenbasis parentProject |
|
323 |
" |
|
324 |
||
325 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
326 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
327 |
! |
|
328 |
||
329 |
parentProjectFor: aProjectID |
|
330 |
||
331 |
^(aProjectID subStrings: $/) first |
|
332 |
||
333 |
" |
|
9664 | 334 |
bosch_dapasx_hw_schnittstellen parentProject |
9536 | 335 |
" |
336 |
||
337 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
338 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9664 | 339 |
"Modified: / 23-08-2006 / 15:07:36 / cg" |
9536 | 340 |
! |
341 |
||
9850 | 342 |
pathSeparator:architecture |
343 |
architecture == #unix ifTrue:[ |
|
344 |
^ self pathSeparator_unix |
|
345 |
]. |
|
346 |
architecture == #win32 ifTrue:[ |
|
347 |
^ self pathSeparator_win32 |
|
348 |
]. |
|
349 |
self error. |
|
350 |
||
351 |
"Created: / 14-09-2006 / 13:38:00 / cg" |
|
352 |
! |
|
353 |
||
354 |
pathSeparator_unix |
|
355 |
^ $/ |
|
356 |
||
357 |
"Created: / 14-09-2006 / 13:37:18 / cg" |
|
358 |
! |
|
359 |
||
360 |
pathSeparator_win32 |
|
361 |
^ $\ |
|
362 |
||
363 |
"Created: / 14-09-2006 / 13:37:23 / cg" |
|
364 |
! |
|
365 |
||
366 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
367 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
368 |
||
369 |
|p| |
|
370 |
||
371 |
arch == #unix ifTrue:[ |
|
372 |
p := (self pathToPackage_unix:aPackageID). |
|
373 |
aBaseFilename isNil ifTrue:[^ p]. |
|
374 |
^ p , '/' , aBaseFilename |
|
375 |
]. |
|
376 |
arch == #win32 ifTrue:[ |
|
377 |
p := self pathToPackage_win32:aPackageID. |
|
378 |
aBaseFilename isNil ifTrue:[^ p]. |
|
379 |
^ p , '\' , aBaseFilename |
|
380 |
]. |
|
381 |
self error |
|
382 |
||
383 |
"Created: / 14-09-2006 / 13:29:20 / cg" |
|
384 |
! |
|
385 |
||
386 |
pathToPackage_unix:aPackageID |
|
387 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
388 |
||
389 |
|pTop| |
|
390 |
||
9880 | 391 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
392 |
^ self unixPathToPackage:aPackageID from:self package |
|
393 |
]. |
|
9850 | 394 |
pTop := self pathToTop_unix. |
395 |
(pTop endsWith:'/stx') ifTrue:[ |
|
396 |
^ (pTop copyWithoutLast:'stx' size),(self topRelativePathToPackage_unix:aPackageID) |
|
397 |
] ifFalse:[ |
|
398 |
^ pTop,'/../',(self topRelativePathToPackage_unix:aPackageID) |
|
399 |
] |
|
400 |
||
401 |
" |
|
9880 | 402 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/kernel' |
403 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/support' |
|
404 |
stx_libbasic pathToPackage_unix:'bosch:dapasx/kernel' |
|
9850 | 405 |
" |
406 |
||
407 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
408 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 409 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
9850 | 410 |
! |
411 |
||
412 |
pathToPackage_win32:aPackageID |
|
413 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
414 |
||
415 |
|pTop| |
|
416 |
||
9880 | 417 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
418 |
^ self msdosPathToPackage:aPackageID from:self package |
|
419 |
]. |
|
420 |
||
9850 | 421 |
pTop := self pathToTop_win32. |
422 |
(pTop endsWith:'\stx') ifTrue:[ |
|
423 |
^ (pTop copyWithoutLast:'stx' size),(self topRelativePathToPackage_win32:aPackageID) |
|
424 |
] ifFalse:[ |
|
425 |
^ pTop,'\..\',(self topRelativePathToPackage_win32:aPackageID) |
|
426 |
]. |
|
427 |
||
428 |
" |
|
9880 | 429 |
self pathToPackage_win32:'bosch:dapasx/kernel' |
430 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/kernel' |
|
431 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/support' |
|
432 |
stx_libbasic pathToPackage_win32:'bosch:dapasx/kernel' |
|
9850 | 433 |
" |
434 |
||
435 |
"Created: / 14-09-2006 / 13:22:52 / cg" |
|
9880 | 436 |
"Modified: / 14-09-2006 / 15:28:45 / cg" |
9850 | 437 |
! |
438 |
||
9714 | 439 |
pathToTop_unix |
440 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
441 |
||
9852 | 442 |
^ self unixPathToTopFor:self package. |
9714 | 443 |
|
444 |
" |
|
9852 | 445 |
bosch_dapasx_kernel pathToTop_unix |
446 |
stx_goodies_xml pathToTop_unix |
|
447 |
stx_libhtml pathToTop_unix |
|
448 |
stx_goodies_refactoryBrowser_changes pathToTop_unix |
|
9714 | 449 |
" |
450 |
||
451 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 452 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 453 |
! |
454 |
||
455 |
pathToTop_win32 |
|
456 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
457 |
||
458 |
^self msdosPathToTopFor: self package |
|
459 |
||
460 |
" |
|
461 |
bosch_dapasx_datenbasis pathToTop_win32 |
|
462 |
stx_libbasic pathToTop_win32 |
|
463 |
" |
|
464 |
||
465 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9831 | 466 |
"Modified: / 07-09-2006 / 15:51:00 / cg" |
9714 | 467 |
! |
468 |
||
9536 | 469 |
requiredProjects |
470 |
||
471 |
^self preRequisites, self subProjects |
|
472 |
! |
|
473 |
||
9850 | 474 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
475 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
476 |
||
477 |
|p| |
|
478 |
||
479 |
arch == #unix ifTrue:[ |
|
480 |
p := (self topRelativePathToPackage_unix:aPackageID). |
|
481 |
aBaseFilename isNil ifTrue:[^ p]. |
|
482 |
^ p , '/' , aBaseFilename |
|
483 |
]. |
|
484 |
arch == #win32 ifTrue:[ |
|
485 |
p := self topRelativePathToPackage_win32:aPackageID. |
|
486 |
aBaseFilename isNil ifTrue:[^ p]. |
|
487 |
^ p , '\' , aBaseFilename |
|
488 |
]. |
|
489 |
self error |
|
490 |
||
491 |
"Created: / 14-09-2006 / 13:34:05 / cg" |
|
492 |
! |
|
493 |
||
494 |
topRelativePathToPackage_unix:aPackageID |
|
495 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
|
496 |
||
497 |
^ aPackageID asString copy replaceAny:':/' with:$/ |
|
498 |
||
499 |
" |
|
500 |
self topRelativePathToPackage_unix:'stx:goodies/xml' |
|
501 |
self topRelativePathToPackage_unix:'bosch:dapasx/kernel' |
|
502 |
" |
|
503 |
||
504 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
505 |
! |
|
506 |
||
507 |
topRelativePathToPackage_win32:aPackageID |
|
9559 | 508 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
509 |
||
510 |
^ aPackageID asString copy replaceAny:':/' with:$\ |
|
511 |
||
512 |
" |
|
9850 | 513 |
self topRelativePathToPackage_win32:'stx:goodies/xml' |
514 |
self topRelativePathToPackage_win32:'bosch:dapasx/kernel' |
|
9559 | 515 |
" |
9536 | 516 |
|
9850 | 517 |
"Created: / 14-09-2006 / 13:20:12 / cg" |
9852 | 518 |
! |
519 |
||
9880 | 520 |
unixPathToPackage:toPackageID from:fromPackageID |
521 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
522 |
||
523 |
|pTop parts1 parts2 common up down| |
|
524 |
||
525 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
526 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
527 |
common := parts1 commonPrefixWith:parts2. |
|
528 |
common notEmpty ifTrue:[ |
|
529 |
up := ((1 to:parts1 size - common size) collect:[:p | '../']) asStringWith:''. |
|
530 |
down := (parts2 copyFrom:common size+1) asStringWith:'/'. |
|
531 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
|
532 |
^ up , down |
|
533 |
]. |
|
534 |
||
535 |
pTop := self unixPathToTopFor:fromPackageID. |
|
536 |
(pTop endsWith:'/stx') ifTrue:[ |
|
537 |
^ (pTop copyButLast:'stx' size),(self topRelativePathToPackage_unix:toPackageID) |
|
538 |
] ifFalse:[ |
|
539 |
^ pTop,'/../',(self topRelativePathToPackage_unix:toPackageID) |
|
540 |
]. |
|
541 |
||
542 |
" |
|
543 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
544 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
|
545 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
546 |
" |
|
547 |
||
548 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
549 |
! |
|
550 |
||
9852 | 551 |
unixPathToTopFor:aProjectID |
552 |
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory" |
|
553 |
||
554 |
|parts| |
|
555 |
||
556 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
557 |
||
558 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
559 |
parts size == 1 ifTrue:[^ '.']. |
|
560 |
^ (((2 to:parts size-1) collect:[:p | '../']) asStringWith:'') , '..' |
|
561 |
]. |
|
562 |
||
563 |
^ ((parts collect:[:p | '../']) asStringWith:'') , 'stx' |
|
564 |
||
565 |
" |
|
566 |
self unixPathToTopFor: #'bosch' |
|
567 |
self unixPathToTopFor: #'bosch:dapasx' |
|
568 |
self unixPathToTopFor: #'bosch:dapasx/datenbasis' |
|
569 |
self unixPathToTopFor: #'stx' |
|
570 |
self unixPathToTopFor: #'stx:libview' |
|
571 |
self unixPathToTopFor: #'stx:goodies/foo' |
|
572 |
" |
|
573 |
||
574 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
9536 | 575 |
! ! |
576 |
||
9714 | 577 |
!ProjectDefinition class methodsFor:'class initialization'! |
578 |
||
579 |
initialize |
|
580 |
LibraryType := #'Library'. |
|
581 |
GUIApplicationType := #'GUI-Application'. |
|
582 |
NonGUIApplicationType := #'NonGUI-Application'. |
|
583 |
||
10121 | 584 |
" |
585 |
self initialize |
|
586 |
" |
|
587 |
||
588 |
"Modified: / 23-10-2006 / 16:40:58 / cg" |
|
589 |
! |
|
590 |
||
591 |
initializeAllProjectDefinitions |
|
592 |
"needs everything else (especially the compiler etc.) to be initialized. |
|
593 |
Therefore, its not invoked by #initialize, but instead explicitely, |
|
594 |
by Smalltalk" |
|
10119 | 595 |
|
10124 | 596 |
Smalltalk isStandAloneApp ifFalse:[ |
597 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
598 |
eachProjectDefinitionClass installAutoloadedClasses. |
|
599 |
]. |
|
10115 | 600 |
]. |
601 |
||
9714 | 602 |
" |
603 |
self initialize |
|
604 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
605 |
|
10121 | 606 |
"Created: / 23-10-2006 / 16:40:53 / cg" |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
607 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
608 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
609 |
installAutoloadedClasses |
10114 | 610 |
(self classNamesForWhich:[:nm :attr | (attr includes:#autoload)]) |
611 |
do:[:className | |
|
10121 | 612 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
10114 | 613 |
(Smalltalk classNamed:className) isNil ifTrue:[ |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
614 |
Smalltalk |
10114 | 615 |
installAutoloadedClassNamed:className |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
616 |
category:'* unknown category *' |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
617 |
package:self package |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
618 |
revision:nil |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
619 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
620 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
621 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
622 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
623 |
stx_libbasic installAutoloadedClasses |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
624 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
625 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
626 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
9714 | 627 |
! ! |
628 |
||
9998 | 629 |
!ProjectDefinition class methodsFor:'code generation'! |
630 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
631 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 632 |
"generate method code returning all classes of the project. |
633 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
634 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
635 |
if false, existing entries are preserved. |
10010 | 636 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
637 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
638 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 639 |
|
9998 | 640 |
^ String streamContents:[:s | |
10010 | 641 |
|oldSpec| |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
642 |
|
10010 | 643 |
oldSpec := self classNamesAndAttributes. |
644 |
||
9998 | 645 |
s nextPutLine:'classNamesAndAttributes'. |
646 |
s nextPutLine:' ^ #('. |
|
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
647 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
648 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
649 |
ignoreOldEntries ifFalse:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
650 |
oldSpec do:[:entry | |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
651 |
s spaces:8. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
652 |
(entry isArray and:[entry first isString]) ifTrue:[ |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
653 |
(entry collect:[:s | s asSymbol]) storeArrayElementOn:s. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
654 |
] ifFalse:[ |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
655 |
entry isString ifTrue:[ |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
656 |
entry asSymbol storeArrayElementOn:s. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
657 |
] ifFalse:[ |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
658 |
entry storeArrayElementOn:s. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
659 |
]. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
660 |
]. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
661 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
662 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
663 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
664 |
|
9998 | 665 |
self searchForClasses do:[:eachClass | |
10076
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
666 |
|attributes oldSpecEntry oldAttributes| |
9998 | 667 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
668 |
oldSpecEntry := oldSpec detect:[:entry | entry = eachClass name or:[entry first = eachClass name]] ifNone:nil. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
669 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
670 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
671 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
672 |
(self additionalClassNamesAndAttributes includes:eachClass name) ifFalse:[ |
10076
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
673 |
(oldSpecEntry isArray and:[oldSpecEntry size > 1]) ifTrue:[ |
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
674 |
oldAttributes := oldSpecEntry copyFrom:2. |
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
675 |
]. |
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
676 |
|
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
677 |
ignoreOldDefinition ifTrue:[ |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
678 |
"take autoload attribute from classes state in the image" |
10076
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
679 |
oldAttributes notNil ifTrue:[ |
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
680 |
attributes := oldAttributes copyWithout:#autoload. |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
681 |
] ifFalse:[ |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
682 |
attributes := #() |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
683 |
]. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
684 |
eachClass isLoaded ifFalse:[ |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
685 |
attributes := attributes copyWith:#autoload. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
686 |
]. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
687 |
] ifFalse:[ |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
688 |
"keep any existing attribute" |
10076
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
689 |
oldAttributes notNil ifTrue:[ |
4fdaf2564cfd
oops - regenerate extracted wrong attributes
Michael Beyl <mb@exept.de>
parents:
10074
diff
changeset
|
690 |
attributes := oldAttributes. |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
691 |
] ifFalse:[ |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
692 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
693 |
]. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
694 |
]. |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
695 |
|
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
696 |
s spaces:8. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
697 |
attributes isEmptyOrNil ifTrue:[ |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
698 |
eachClass name storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
699 |
] ifFalse:[ |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
700 |
s nextPut:$(. eachClass name storeArrayElementOn:s. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
701 |
attributes do:[:eachAttribute | s space. eachAttribute storeOn:s.]. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
702 |
s nextPut:$). |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
703 |
]. |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
704 |
s cr. |
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
705 |
] |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
706 |
] |
9998 | 707 |
] |
708 |
]. |
|
709 |
s nextPutLine:' )' |
|
710 |
]. |
|
711 |
||
712 |
" |
|
10010 | 713 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldDefinition:true |
9998 | 714 |
" |
715 |
||
716 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
717 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
718 |
"Modified: / 11-10-2006 / 14:32:59 / cg" |
9998 | 719 |
! |
720 |
||
721 |
companyName_code |
|
722 |
^ String streamContents:[:s | |
|
723 |
s nextPutLine:'companyName'. |
|
724 |
s nextPutLine:' "Return a companyname which will appear in <lib>.rc"'. |
|
725 |
s cr; nextPutLine:' ^ ',self companyName storeString. |
|
726 |
]. |
|
727 |
||
728 |
" |
|
729 |
self companyName_code |
|
730 |
stx_libbasic3 companyName_code |
|
731 |
" |
|
732 |
||
733 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
734 |
! |
|
735 |
||
736 |
compileDescriptionMethods |
|
737 |
(self isLibraryDefinition |
|
738 |
or:[ self isApplicationDefinition ] ) ifFalse:[ |
|
739 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
|
740 |
]. |
|
741 |
||
742 |
self |
|
743 |
forEachMethodsCodeToCompileDo:[:code :category | |
|
744 |
self compile:code categorized:category |
|
745 |
]. |
|
746 |
||
747 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
748 |
||
749 |
" |
|
750 |
DapasXProject compileDescriptionMethods |
|
751 |
DapasX_Datenbasis compileDescriptionMethods |
|
752 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
753 |
stx_libbasic compileDescriptionMethods |
|
754 |
" |
|
755 |
||
756 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
757 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
758 |
! |
|
759 |
||
760 |
description_code |
|
761 |
^ String streamContents:[:s | |
|
762 |
s nextPutLine:'description'. |
|
763 |
s nextPutLine:' "Return a description string which will appear in nt.def / bc.def"'. |
|
764 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
|
765 |
]. |
|
766 |
||
767 |
" |
|
768 |
self description_code |
|
769 |
stx_libbasic3 description_code |
|
770 |
" |
|
771 |
||
772 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
773 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
774 |
! |
|
775 |
||
776 |
extensionMethodNames_code |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
777 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
778 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
779 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
780 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
781 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
782 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
783 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
784 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
785 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
786 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
787 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 788 |
^ String streamContents:[:s | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
789 |
|oldSpec| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
790 |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
791 |
s nextPutLine:'extensionMethodNames'. |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
792 |
s nextPutLine:' ^ #('. |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
793 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
794 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
795 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
796 |
ignoreOldEntries ifFalse:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
797 |
oldSpec do:[:entry | |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
798 |
|mclassName mselector| |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
799 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
800 |
mclassName := entry key asSymbol. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
801 |
mselector := entry value asSymbol. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
802 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
803 |
s spaces:8. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
804 |
mclassName storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
805 |
s space. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
806 |
mselector storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
807 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
808 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
809 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
810 |
|
10011 | 811 |
self searchForExtensions do:[:eachMethod | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
812 |
|attributes oldSpecEntry mclassName mselector| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
813 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
814 |
mclassName := eachMethod mclass name. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
815 |
mselector := eachMethod selector. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
816 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
817 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
818 |
s spaces:8. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
819 |
mclassName storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
820 |
s space. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
821 |
mselector storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
822 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
823 |
] |
9998 | 824 |
]. |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
825 |
|
9998 | 826 |
s nextPutLine:' )' |
827 |
]. |
|
828 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
829 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
830 |
self extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
831 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
832 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
833 |
" |
9998 | 834 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
835 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
836 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
9998 | 837 |
! |
838 |
||
839 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
840 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
841 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
9998 | 842 |
value:'description - contents'. |
843 |
||
844 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
845 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
9998 | 846 |
value: 'description - contents'. |
847 |
||
848 |
aTwoArgBlock |
|
849 |
value: self preRequisites_code |
|
850 |
value: 'description'. |
|
851 |
||
852 |
"Created: / 15-09-2006 / 16:47:54 / cg" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
853 |
"Modified: / 10-10-2006 / 22:01:28 / cg" |
9998 | 854 |
! |
855 |
||
856 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
|
857 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
|
858 |
! |
|
859 |
||
860 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
861 |
self |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
862 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
863 |
ignoreOldDefinition:ignoreOldDefinition. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
864 |
|
9998 | 865 |
(self class implements:#description) ifFalse:[ |
866 |
aTwoArgBlock |
|
867 |
value: self description_code |
|
868 |
value: 'description - project information'. |
|
869 |
]. |
|
870 |
(self class implements:#productName) ifFalse:[ |
|
871 |
aTwoArgBlock |
|
872 |
value: self productName_code |
|
873 |
value: 'description - project information'. |
|
874 |
]. |
|
875 |
(self class implements:#companyName) ifFalse:[ |
|
876 |
aTwoArgBlock |
|
877 |
value: self companyName_code |
|
878 |
value: 'description - project information'. |
|
879 |
]. |
|
880 |
(self class implements:#legalCopyright) ifFalse:[ |
|
881 |
aTwoArgBlock |
|
882 |
value: self legalCopyright_code |
|
883 |
value: 'description - project information'. |
|
884 |
]. |
|
885 |
||
886 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
887 |
"Modified: / 10-10-2006 / 22:02:24 / cg" |
9998 | 888 |
! |
889 |
||
890 |
legalCopyright_code |
|
891 |
^ String streamContents:[:s | |
|
892 |
s nextPutLine:'legalCopyright'. |
|
893 |
s nextPutLine:' "Return a copyright string which will appear in <lib>.rc"'. |
|
894 |
s cr; nextPutLine:' ^ ',self legalCopyright storeString. |
|
895 |
]. |
|
896 |
||
897 |
" |
|
898 |
self legalCopyright_code |
|
899 |
stx_libbasic3 legalCopyright_code |
|
900 |
" |
|
901 |
||
902 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
903 |
! |
|
904 |
||
905 |
preRequisites_code |
|
906 |
|preRequisites| |
|
907 |
||
908 |
preRequisites := self preRequisites asSet. |
|
10063 | 909 |
preRequisites addAll: (self searchForPreRequisites keys). |
9998 | 910 |
|
911 |
self isApplicationDefinition ifTrue:[ |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
912 |
preRequisites add:#'stx:libcomp'. |
9998 | 913 |
self isGUIApplication ifTrue:[ |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
914 |
preRequisites add:#'stx:libbasic2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
915 |
preRequisites add:#'stx:libview'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
916 |
preRequisites add:#'stx:libview2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
917 |
preRequisites add:#'stx:libwidg'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
918 |
preRequisites add:#'stx:libwidg2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
919 |
preRequisites add:#'stx:libui'. |
9998 | 920 |
]. |
921 |
]. |
|
922 |
||
923 |
preRequisites removeAll: self excludedFromPreRequisites. |
|
10034 | 924 |
preRequisites remove:self package ifAbsent:[]. |
9998 | 925 |
|
926 |
^ String streamContents:[:s | |
|
927 |
s nextPutLine:'preRequisites'. |
|
928 |
s nextPutLine:' ^ #('. |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
929 |
preRequisites asSortedCollection do:[:eachPackageID | |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
930 |
s spaces:8. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
931 |
eachPackageID storeOn:s. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
932 |
s cr. |
9998 | 933 |
]. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
934 |
s nextPutLine:' )' |
9998 | 935 |
]. |
936 |
||
937 |
" |
|
938 |
bosch_dapasx_application preRequisites_code |
|
939 |
demo_demoApp1 preRequisites_code |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
940 |
stx_libtool2 preRequisites_code |
9998 | 941 |
" |
942 |
||
943 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
944 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
10063 | 945 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
9998 | 946 |
! |
947 |
||
948 |
productName_code |
|
949 |
^ String streamContents:[:s | |
|
950 |
s nextPutLine:'productName'. |
|
951 |
s nextPutLine:' "Return a product name which will appear in <lib>.rc"'. |
|
952 |
s cr; nextPutLine:' ^ ',self productName storeString. |
|
953 |
]. |
|
954 |
||
955 |
" |
|
956 |
self productName_code |
|
957 |
stx_libbasic3 productName_code |
|
958 |
" |
|
959 |
||
960 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
961 |
! ! |
|
962 |
||
9569 | 963 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 964 |
|
9664 | 965 |
applicationTypes |
9714 | 966 |
GUIApplicationType isNil ifTrue:[self initialize]. |
967 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 968 |
|
9714 | 969 |
" |
970 |
self applicationTypes |
|
971 |
" |
|
9664 | 972 |
! |
973 |
||
9536 | 974 |
defaultDescription |
975 |
^ 'description' |
|
9664 | 976 |
! |
977 |
||
9714 | 978 |
defaultProjectType |
9745 | 979 |
^ self libraryTypes first |
980 |
"/ ^ self applicationTypes first |
|
9714 | 981 |
|
982 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
983 |
! |
|
984 |
||
985 |
defaultProjectTypeForGUIApplication |
|
986 |
^ GUIApplicationType |
|
987 |
! |
|
988 |
||
989 |
defaultProjectTypeForNonGUIApplication |
|
990 |
^ NonGUIApplicationType |
|
991 |
! |
|
9664 | 992 |
|
9714 | 993 |
guiApplicationType |
994 |
^ GUIApplicationType |
|
995 |
! |
|
996 |
||
997 |
libraryType |
|
998 |
^ LibraryType |
|
999 |
! |
|
1000 |
||
1001 |
libraryTypes |
|
1002 |
LibraryType isNil ifTrue:[self initialize]. |
|
1003 |
^ Array with:LibraryType |
|
1004 |
||
1005 |
" |
|
1006 |
self libraryTypes |
|
1007 |
" |
|
1008 |
! |
|
1009 |
||
1010 |
nonGuiApplicationType |
|
1011 |
^ NonGUIApplicationType |
|
9664 | 1012 |
! |
1013 |
||
1014 |
projectTypes |
|
1015 |
^ self libraryTypes , self applicationTypes |
|
1016 |
||
1017 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
9536 | 1018 |
! ! |
1019 |
||
9569 | 1020 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 1021 |
|
9983 | 1022 |
excludedFromPreRequisites |
1023 |
"list packages which are to be explicitely excluded from the automatic constructed |
|
1024 |
prerequisites list. If empty, everything that is found along the inheritance of any of |
|
1025 |
my classes is considered to be a prerequisite package." |
|
1026 |
||
1027 |
^ #() |
|
1028 |
||
1029 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
1030 |
! |
|
1031 |
||
10039 | 1032 |
isConsoleApplication |
1033 |
"Return true, if this is a console application (used with win32 only). |
|
1034 |
Console applications have stdout and stderr and open up a command-window |
|
1035 |
when started. Only console applications can interact with the user in the |
|
1036 |
command line window. |
|
1037 |
By default, GUI apps are compiled as non-console apps." |
|
1038 |
||
1039 |
^ self isGUIApplication not |
|
1040 |
||
1041 |
"Created: / 20-09-2006 / 11:29:24 / cg" |
|
1042 |
! |
|
1043 |
||
9575 | 1044 |
postLoadAction |
1045 |
"invoked after loading a project" |
|
1046 |
||
1047 |
"/ intentionally left blank |
|
1048 |
||
1049 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1050 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
1051 |
! |
|
1052 |
||
1053 |
preRequisites |
|
1054 |
"list packages which are required as a prerequisite. This method is generated automatically, |
|
1055 |
by searching along the inheritance chain of all of my classes. |
|
1056 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1057 |
in excludedFromPreRequisites." |
|
1058 |
||
1059 |
^ #() |
|
1060 |
||
1061 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
1062 |
! |
|
1063 |
||
1064 |
preUnloadAction |
|
1065 |
"invoked before unloading a project" |
|
1066 |
||
1067 |
"/ intentionally left blank |
|
1068 |
||
1069 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1070 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
1071 |
! |
|
1072 |
||
9685 | 1073 |
siblingsAreSubProjects |
1074 |
^ false |
|
1075 |
! |
|
1076 |
||
9575 | 1077 |
subProjects |
1078 |
"list packages which are known as subprojects. This method is generated automatically. |
|
1079 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1080 |
in excludedFromSubProjects." |
|
1081 |
||
1082 |
^ #() |
|
1083 |
||
1084 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
1085 |
! ! |
|
1086 |
||
1087 |
!ProjectDefinition class methodsFor:'description - classes'! |
|
1088 |
||
9621 | 1089 |
additionalClassNamesAndAttributes |
1090 |
^ #() |
|
1091 |
||
1092 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
1093 |
! |
|
1094 |
||
9607 | 1095 |
allClassNames |
1096 |
^ self classNamesForWhich:[:nm :attr | true ]. |
|
1097 |
! |
|
9536 | 1098 |
|
9607 | 1099 |
classNames |
1100 |
"a correponding method with real names is generated in my subclasses" |
|
1101 |
||
1102 |
self halt. |
|
9595 | 1103 |
^ #() |
9536 | 1104 |
|
1105 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1106 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
9607 | 1107 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
9536 | 1108 |
! |
1109 |
||
9607 | 1110 |
classNamesAndAttributes |
9575 | 1111 |
"a correponding method with real names is generated in my subclasses" |
1112 |
||
9595 | 1113 |
^ #() |
9536 | 1114 |
|
9575 | 1115 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
1116 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1117 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
1118 |
! |
|
1119 |
||
9607 | 1120 |
classNamesForWhich:aBlock |
1121 |
"a correponding method with real names is generated in my subclasses" |
|
1122 |
||
1123 |
|coll| |
|
1124 |
||
1125 |
coll := OrderedCollection new. |
|
1126 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
1127 |
(aBlock value:nm value:attributes) ifTrue:[ |
|
1128 |
coll add:nm. |
|
1129 |
]. |
|
1130 |
]. |
|
1131 |
^ coll |
|
1132 |
||
1133 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1134 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1135 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
1136 |
! |
|
1137 |
||
1138 |
compiled_classNames |
|
9615 | 1139 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
9607 | 1140 |
|
1141 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1142 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
9615 | 1143 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
9607 | 1144 |
! |
1145 |
||
10005 | 1146 |
compiled_classNamesForPlatform:platformName |
1147 |
"answer the classes to be compiled only for platformName |
|
1148 |
platformName is one of #unix, #win32 (OperatingSystem platformName)" |
|
1149 |
||
9607 | 1150 |
^ self |
10005 | 1151 |
classNamesForWhich:[:nm :attr | |
10058
290deec5f493
fixed: platform-specific classes which also have the autoload flag
Claus Gittinger <cg@exept.de>
parents:
10047
diff
changeset
|
1152 |
"(attr includes:#autoload) not and:[" (attr includes:platformName)" ]" |
9607 | 1153 |
]. |
1154 |
||
1155 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1156 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
10058
290deec5f493
fixed: platform-specific classes which also have the autoload flag
Claus Gittinger <cg@exept.de>
parents:
10047
diff
changeset
|
1157 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
9607 | 1158 |
! |
1159 |
||
10005 | 1160 |
compiled_classNames_common |
1161 |
"classes to be compiled for any platform" |
|
9607 | 1162 |
|
1163 |
^ self |
|
1164 |
classNamesForWhich:[:nm :attr | |
|
1165 |
attr isEmptyOrNil |
|
1166 |
]. |
|
1167 |
||
1168 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
1169 |
! |
|
1170 |
||
10005 | 1171 |
compiled_classNames_unix |
9584 | 1172 |
"class, only to be compiled under unix" |
10005 | 1173 |
|
1174 |
^ self compiled_classNamesForPlatform:#unix. |
|
9584 | 1175 |
|
1176 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
1177 |
! |
|
1178 |
||
10005 | 1179 |
compiled_classNames_windows |
9584 | 1180 |
"class, only to be compiled under windows" |
10005 | 1181 |
|
1182 |
^ self compiled_classNamesForPlatform:#win32. |
|
9584 | 1183 |
|
1184 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
1185 |
! |
|
1186 |
||
9575 | 1187 |
extensionMethodNames |
1188 |
"list class/selector pairs of extensions. |
|
1189 |
A correponding method with real names is generated in my subclasses" |
|
1190 |
||
9595 | 1191 |
^ #() |
9575 | 1192 |
|
1193 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
1194 |
! ! |
|
1195 |
||
1196 |
!ProjectDefinition class methodsFor:'description - compilation'! |
|
9536 | 1197 |
|
9625 | 1198 |
additionalDefinitions_make_dot_proto |
1199 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
1200 |
||
1201 |
^ '' |
|
1202 |
||
1203 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
1204 |
! |
|
1205 |
||
1206 |
additionalDefinitions_nt_dot_mak |
|
1207 |
"allows for additional definitions/rules to be added to the nt.mak file." |
|
1208 |
||
1209 |
^ '' |
|
1210 |
||
1211 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1212 |
! |
|
1213 |
||
9733 | 1214 |
additionalLinkLibraries_make_dot_proto |
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1215 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 1216 |
|
1217 |
^ '' |
|
1218 |
||
1219 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1220 |
! |
|
1221 |
||
9625 | 1222 |
additionalRules_make_dot_proto |
1223 |
"allows for additional rules to be added to the make.proto file." |
|
1224 |
||
1225 |
^ '' |
|
1226 |
||
1227 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
1228 |
! |
|
1229 |
||
1230 |
additionalRules_nt_dot_mak |
|
1231 |
"allows for additional rules to be added to the nt.mak file." |
|
1232 |
||
1233 |
^ '' |
|
1234 |
||
1235 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
|
1236 |
! |
|
1237 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1238 |
additionalSharedLinkLibraries_make_dot_proto |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1239 |
"allows for additional shared libraries to be added to the make.proto file." |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1240 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1241 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1242 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1243 |
|
9625 | 1244 |
additionalTargets_make_dot_proto |
1245 |
"allows for additional targets to be added to the make.proto file." |
|
1246 |
||
1247 |
^ '' |
|
1248 |
||
1249 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1250 |
! |
|
1251 |
||
1252 |
additionalTargets_nt_dot_mak |
|
1253 |
"allows for additional targets to be added to the nt.mak file." |
|
1254 |
||
1255 |
^ '' |
|
1256 |
||
1257 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
1258 |
! |
|
1259 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1260 |
localIncludes |
9714 | 1261 |
"allow for the specification of addition include directories" |
1262 |
||
1263 |
^ '' |
|
1264 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1265 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1266 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1267 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1268 |
localIncludes_unix |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1269 |
"allow for the specification of addition include directories" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1270 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1271 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1272 |
|
9714 | 1273 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1274 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 1275 |
! |
1276 |
||
1277 |
localIncludes_win32 |
|
1278 |
"allow for the specification of addition include directories" |
|
1279 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1280 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 1281 |
|
1282 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1283 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 1284 |
! |
1285 |
||
9575 | 1286 |
stcOptimizationOptions |
1287 |
"see the stc reference / stc usage for options. |
|
1288 |
For now, the following variants are useful: |
|
1289 |
+optspace3 most compact code |
|
1290 |
- use for all gui, application code. |
|
1291 |
||
9714 | 1292 |
+optinline +optinline2 +inlineNew |
1293 |
fastest code |
|
9575 | 1294 |
- use only for computation-intensive classes" |
1295 |
||
1296 |
^ '+optspace3' |
|
1297 |
||
1298 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 1299 |
! |
1300 |
||
9575 | 1301 |
stcWarningOptions |
1302 |
"see the stc reference / stc usage for options. |
|
1303 |
For now, the following variants are useful: |
|
1304 |
-warn no warnings |
|
1305 |
-warnNonStandard no warnings about non-standard smalltalk features" |
|
1306 |
||
9714 | 1307 |
^ '-warnNonStandard' |
9575 | 1308 |
|
1309 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
1310 |
! ! |
|
9536 | 1311 |
|
9575 | 1312 |
!ProjectDefinition class methodsFor:'description - project information'! |
1313 |
||
1314 |
companyName |
|
9584 | 1315 |
"Returns a company string which will appear in <lib>.rc. |
1316 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1317 |
|
1318 |
self module = 'stx' ifTrue:[ |
|
1319 |
^ 'eXept Software AG' |
|
1320 |
]. |
|
1321 |
||
1322 |
^ 'My Company' |
|
1323 |
||
9584 | 1324 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 1325 |
! |
1326 |
||
1327 |
description |
|
9575 | 1328 |
"Returns a description string which will appear in nt.def / bc.def" |
9536 | 1329 |
|
9803 | 1330 |
^self productName,' ',self packageName |
1331 |
"/ ^ self name |
|
9536 | 1332 |
|
1333 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 1334 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
1335 |
! |
|
1336 |
||
1337 |
fileDescription |
|
1338 |
"Returns a description string which will appear in libName.rc" |
|
1339 |
||
9803 | 1340 |
^self description |
9575 | 1341 |
|
1342 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
1343 |
! |
|
1344 |
||
1345 |
fileMajorVersionNr |
|
1346 |
"Returns a versionNumber which will appear in libName.rc" |
|
1347 |
||
1348 |
^ Smalltalk majorVersionNr printString |
|
1349 |
||
1350 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 1351 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 1352 |
! |
1353 |
||
1354 |
fileMinorVersionNr |
|
1355 |
"Returns a versionNumber which will appear in libName.rc" |
|
1356 |
||
9618 | 1357 |
^ Smalltalk minorVersionNr printString |
9575 | 1358 |
|
1359 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 1360 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 1361 |
! |
1362 |
||
1363 |
fileReleaseNr |
|
1364 |
"Returns a releaseNumber which will appear in libName.rc" |
|
1365 |
||
9817 | 1366 |
"take the default revision from the cvs-version" |
9618 | 1367 |
^ self cvsRevision last |
9575 | 1368 |
|
1369 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
|
9817 | 1370 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
9536 | 1371 |
! |
1372 |
||
9575 | 1373 |
fileRevisionNr |
1374 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 1375 |
|
9817 | 1376 |
"take the default revision from the cvs-version" |
9618 | 1377 |
^ self cvsRevision first |
9575 | 1378 |
|
1379 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
|
9817 | 1380 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
9536 | 1381 |
! |
1382 |
||
9575 | 1383 |
fileVersion |
1384 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1385 |
||
1386 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
1387 |
||
9817 | 1388 |
^ self fileMajorVersionNr |
9575 | 1389 |
, '.' |
9817 | 1390 |
, self fileMinorVersionNr |
9575 | 1391 |
, '.' |
9817 | 1392 |
, self fileRevisionNr |
9575 | 1393 |
, '.' |
9817 | 1394 |
, self fileReleaseNr |
9575 | 1395 |
|
1396 |
" |
|
1397 |
self fileVersion |
|
1398 |
" |
|
1399 |
||
9817 | 1400 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 1401 |
! |
9536 | 1402 |
|
9575 | 1403 |
fileVersionCommaSeparated |
1404 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1405 |
||
9817 | 1406 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
1407 |
||
1408 |
^ self fileMajorVersionNr |
|
9575 | 1409 |
, ',' |
9817 | 1410 |
, self fileMinorVersionNr |
9575 | 1411 |
, ',' |
9817 | 1412 |
, self fileRevisionNr |
9575 | 1413 |
, ',' |
9579 | 1414 |
, self fileReleaseNr |
9575 | 1415 |
|
1416 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 1417 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
1418 |
! |
|
1419 |
||
1420 |
iconFileName |
|
1421 |
"Returns the icon-filename for the application (nil if there is none)" |
|
1422 |
||
1423 |
^ nil |
|
1424 |
||
1425 |
"Created: / 30-08-2006 / 18:44:15 / cg" |
|
9575 | 1426 |
! |
1427 |
||
1428 |
internalName |
|
1429 |
"Returns a name string which will appear in libName.rc" |
|
1430 |
||
1431 |
^self packageName |
|
1432 |
||
1433 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 1434 |
! |
1435 |
||
9575 | 1436 |
legalCopyright |
9584 | 1437 |
"Returns a copyright string which will appear in <lib>.rc. |
1438 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1439 |
|
1440 |
self module = 'stx' ifTrue:[ |
|
9817 | 1441 |
"hardwired-default" |
9625 | 1442 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
1443 |
bindWith:(Date today year printString) |
|
9575 | 1444 |
]. |
9817 | 1445 |
self module = 'exept' ifTrue:[ |
1446 |
"hardwired-default" |
|
1447 |
^ 'Copyright eXept Software AG 1998-%1' |
|
1448 |
bindWith:(Date today year printString) |
|
1449 |
]. |
|
9575 | 1450 |
|
1451 |
^ 'My CopyRight or CopyLeft' |
|
1452 |
||
9817 | 1453 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 1454 |
! |
1455 |
||
1456 |
majorVersionNr |
|
1457 |
"Returns a versionNumber which will appear in libName.rc" |
|
1458 |
||
1459 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
1460 |
the default here takes smalltalks version number. |
|
1461 |
But thats probably not good for an end-user-app." |
|
1462 |
||
9817 | 1463 |
^ Smalltalk majorVersionNr printString |
9575 | 1464 |
|
1465 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 1466 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 1467 |
! |
1468 |
||
1469 |
minorVersionNr |
|
1470 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 1471 |
|
9575 | 1472 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
1473 |
the default here takes smalltalks version number. |
|
1474 |
But thats probably not good for an end-user-app." |
|
1475 |
||
9817 | 1476 |
^ Smalltalk minorVersionNr printString |
9575 | 1477 |
|
1478 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 1479 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 1480 |
! |
1481 |
||
1482 |
productDate |
|
1483 |
"Returns a product-date string which will appear in libName.rc" |
|
1484 |
||
1485 |
"take the current date - by default" |
|
9536 | 1486 |
|
9575 | 1487 |
^ Timestamp now printStringRFC1123Format |
1488 |
||
1489 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
1490 |
! |
|
1491 |
||
9898 | 1492 |
productInstallDir |
1493 |
"Returns a product default installDir which will appear in <app>.nsi." |
|
1494 |
||
1495 |
^ '$PROGRAMFILES\',self module |
|
1496 |
||
1497 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
1498 |
! |
|
1499 |
||
9575 | 1500 |
productName |
9584 | 1501 |
"Returns a product name which will appear in <lib>.rc. |
1502 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1503 |
|
1504 |
self module = 'stx' ifTrue:[ |
|
1505 |
^ 'Smalltalk/X' |
|
1506 |
]. |
|
1507 |
||
1508 |
^ 'My Product' |
|
1509 |
||
9584 | 1510 |
"Modified: / 18-08-2006 / 16:08:26 / cg" |
9536 | 1511 |
! |
1512 |
||
9898 | 1513 |
productPublisher |
1514 |
"Returns a product publisher which will appear in <app>.nsi." |
|
1515 |
||
1516 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
1517 |
^ 'eXept Software AG' |
|
1518 |
]. |
|
1519 |
||
1520 |
^ 'thePublisher' |
|
1521 |
||
1522 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
1523 |
! |
|
1524 |
||
9575 | 1525 |
productVersion |
1526 |
"Returns a product version which will appear in libName.rc" |
|
1527 |
||
1528 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 1529 |
|
9817 | 1530 |
^ self majorVersionNr |
9575 | 1531 |
, '.' |
9817 | 1532 |
, self minorVersionNr |
9575 | 1533 |
, '.' |
9817 | 1534 |
, self revisionNr |
9575 | 1535 |
, '.' |
9817 | 1536 |
, self releaseNr |
9536 | 1537 |
|
9575 | 1538 |
" |
1539 |
self productVersion |
|
1540 |
" |
|
1541 |
||
9817 | 1542 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 1543 |
! |
1544 |
||
9575 | 1545 |
productVersionCommaSeparated |
1546 |
"Returns a product version which will appear in libName.rc" |
|
1547 |
||
1548 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 1549 |
|
9817 | 1550 |
^ self majorVersionNr |
9575 | 1551 |
, ',' |
9817 | 1552 |
, self minorVersionNr |
9575 | 1553 |
, ',' |
9817 | 1554 |
, self revisionNr |
9575 | 1555 |
, ',' |
9817 | 1556 |
, self releaseNr |
9536 | 1557 |
|
9575 | 1558 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 1559 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 1560 |
! |
1561 |
||
9898 | 1562 |
productWebSite |
1563 |
"Returns a product webSite which will appear in <app>.nsi." |
|
1564 |
||
1565 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
1566 |
^ 'http://www.exept.de' |
|
1567 |
]. |
|
1568 |
||
1569 |
^ 'http://www.yoursite.com' |
|
1570 |
||
1571 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
1572 |
! |
|
1573 |
||
9575 | 1574 |
releaseNr |
1575 |
"Returns a releaseNr which will appear in libName.rc" |
|
1576 |
||
1577 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
1578 |
the default here takes smalltalks version number. |
|
1579 |
But thats probably not good for an end-user-app." |
|
1580 |
||
9817 | 1581 |
^ Smalltalk releaseNr printString |
9536 | 1582 |
|
9575 | 1583 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 1584 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 1585 |
! |
1586 |
||
1587 |
revisionNr |
|
1588 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 1589 |
|
9575 | 1590 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
1591 |
the default here takes smalltalks version number. |
|
1592 |
But thats probably not good for an end-user-app." |
|
1593 |
||
9817 | 1594 |
^ Smalltalk revisionNr printString |
9575 | 1595 |
|
1596 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 1597 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 1598 |
! |
1599 |
||
1600 |
versionNumber |
|
9575 | 1601 |
"Returns a version string which will appear in nt.def " |
9536 | 1602 |
|
9575 | 1603 |
^'' |
9536 | 1604 |
|
1605 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 1606 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 1607 |
! ! |
1608 |
||
9569 | 1609 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 1610 |
|
9852 | 1611 |
basicFileNamesToGenerate |
1612 |
self subclassResponsibility |
|
1613 |
||
1614 |
"Created: / 14-09-2006 / 14:36:31 / cg" |
|
1615 |
! |
|
1616 |
||
9536 | 1617 |
fileNamesToGenerate |
9852 | 1618 |
^ self basicFileNamesToGenerate reject:[:p | self protectedFileNames includes:(p first) ]. |
1619 |
||
1620 |
"Modified: / 14-09-2006 / 14:36:10 / cg" |
|
9536 | 1621 |
! |
1622 |
||
9544 | 1623 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
1624 |
|pairs| |
|
1625 |
||
1626 |
pairs := OrderedCollection new. |
|
1627 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
|
1628 |
|file| |
|
1629 |
||
1630 |
file := self perform:generator. |
|
1631 |
pairs add:(Array with:fileName with:file) |
|
1632 |
]. |
|
1633 |
||
1634 |
pairs pairsDo:aTwoArgBlock |
|
1635 |
||
1636 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
1637 |
! |
|
1638 |
||
9536 | 1639 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
1640 |
|fileNamesAndSelectors| |
|
1641 |
||
9898 | 1642 |
fileNamesAndSelectors := self fileNamesToGenerate. |
9536 | 1643 |
fileNamesAndSelectors pairsDo:aTwoArgBlock |
9831 | 1644 |
|
9898 | 1645 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 1646 |
! |
1647 |
||
1648 |
generateFile:filename |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
1649 |
self basicFileNamesToGenerate |
9817 | 1650 |
pairsDo:[:fn :action | |
1651 |
filename = fn ifTrue:[ |
|
1652 |
^ self perform:action |
|
1653 |
]. |
|
1654 |
]. |
|
9898 | 1655 |
(filename = 'app.rc' or:[filename = 'lib.rc' or:[filename = self rcFilename]]) ifTrue:[ |
9817 | 1656 |
^ self generate_packageName_dot_rc |
9607 | 1657 |
]. |
9898 | 1658 |
(filename = 'app.nsi' or:[filename = self nsiFilename]) ifTrue:[ |
1659 |
^ self generate_packageName_dot_nsi |
|
1660 |
]. |
|
1661 |
||
9850 | 1662 |
(filename = 'loadAll') ifTrue:[ |
1663 |
^ self generate_loadAll |
|
1664 |
]. |
|
9621 | 1665 |
self error:('File "%1" not appropriate (not generated) for this type of project.' |
1666 |
bindWith:filename) |
|
9575 | 1667 |
|
9898 | 1668 |
"Modified: / 14-09-2006 / 21:07:49 / cg" |
9536 | 1669 |
! |
1670 |
||
1671 |
generate_abbrev_dot_stc |
|
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1672 |
|anyNil check| |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1673 |
|
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1674 |
anyNil := false. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1675 |
check := |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1676 |
[:eachClassName | |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1677 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1678 |
|
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1679 |
cls := Smalltalk classNamed:eachClassName. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1680 |
cls isNil ifTrue:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1681 |
anyNil := true. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1682 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1683 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1684 |
|
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1685 |
self allClassNames do:check. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1686 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1687 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1688 |
check value:nm |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1689 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1690 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1691 |
anyNil ifTrue:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1692 |
(Dialog confirm:'Some classes are missing. Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' withCRs) |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1693 |
ifFalse:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1694 |
AbortSignal raise. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1695 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1696 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1697 |
|
9536 | 1698 |
^ String |
1699 |
streamContents:[:s | |
|
9621 | 1700 |
|addEntry| |
1701 |
||
1702 |
addEntry := |
|
1703 |
[:eachClassName | |
|
9681 | 1704 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
9621 | 1705 |
|
1706 |
s nextPutAll:eachClassName. |
|
1707 |
s nextPutAll:' '. |
|
9536 | 1708 |
|
9621 | 1709 |
cls := Smalltalk classNamed:eachClassName. |
1710 |
cls isNil ifTrue:[ |
|
9678 | 1711 |
fn := (Smalltalk fileNameForClass:eachClassName) asFilename withoutSuffix. |
1712 |
fn suffix notEmptyOrNil ifTrue:[ |
|
1713 |
fn := fn withoutSuffix |
|
1714 |
]. |
|
1715 |
fn := fn baseName. |
|
1716 |
s nextPutAll:fn. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
1717 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 1718 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
1719 |
s nextPutAll:' '; nextPutAll:'0'. |
|
1720 |
] ifFalse:[ |
|
1721 |
wasLoaded := cls isLoaded. |
|
9714 | 1722 |
wasLoaded ifFalse:[ |
1723 |
failedToLoad := false. |
|
9681 | 1724 |
|
9714 | 1725 |
Error handle:[:ex | |
1726 |
failedToLoad := true. |
|
1727 |
] do:[ |
|
1728 |
ParserFlags |
|
1729 |
withSTCCompilation:#never |
|
1730 |
do:[ |
|
1731 |
cls autoload. |
|
1732 |
] |
|
1733 |
]. |
|
9681 | 1734 |
]. |
9584 | 1735 |
|
9678 | 1736 |
fn := cls classFilename asFilename withoutSuffix. |
1737 |
fn suffix notEmptyOrNil ifTrue:[ |
|
1738 |
fn := fn withoutSuffix |
|
1739 |
]. |
|
1740 |
fn := fn baseName. |
|
9621 | 1741 |
(fn includes:Character space) ifTrue:[ |
1742 |
s nextPutAll:fn storeString. |
|
1743 |
] ifFalse:[ |
|
1744 |
s nextPutAll:fn. |
|
1745 |
]. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
1746 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 1747 |
s nextPutAll: (cls category asString storeString). |
9681 | 1748 |
failedToLoad ifTrue:[ |
1749 |
s nextPutAll:' 0'. |
|
1750 |
] ifFalse:[ |
|
1751 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
|
1752 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
|
1753 |
]. |
|
9714 | 1754 |
|
9621 | 1755 |
wasLoaded ifFalse:[ |
1756 |
cls unload |
|
1757 |
] |
|
1758 |
]. |
|
1759 |
s cr. |
|
9536 | 1760 |
]. |
9615 | 1761 |
|
9621 | 1762 |
self allClassNames do:addEntry. |
1763 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
1764 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
1765 |
addEntry value:nm |
|
1766 |
]. |
|
1767 |
]. |
|
9536 | 1768 |
] |
1769 |
||
1770 |
" |
|
1771 |
DapasXProject generate_abbrev_dot_stc |
|
1772 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
1773 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
|
1774 |
" |
|
1775 |
||
1776 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
1777 |
"Modified: / 20-10-2006 / 16:31:08 / cg" |
9536 | 1778 |
! |
1779 |
||
1780 |
generate_bc_dot_def |
|
1781 |
||
1782 |
^self replaceMappings: self bc_dot_def_mappings |
|
1783 |
in: self bc_dot_def |
|
1784 |
||
1785 |
" |
|
1786 |
DapasXProject generate_bc_dot_def |
|
1787 |
DapasX_Datenbasis generate_bc_dot_def |
|
1788 |
||
1789 |
" |
|
1790 |
||
1791 |
"Modified: / 09-08-2006 / 11:30:42 / fm" |
|
1792 |
! |
|
1793 |
||
9575 | 1794 |
generate_bmake_dot_mak |
1795 |
||
1796 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
1797 |
in: self bmake_dot_mak |
|
1798 |
||
1799 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
1800 |
! |
|
1801 |
||
9850 | 1802 |
generate_loadAll |
1803 |
^ String |
|
1804 |
streamContents:[:s | |
|
1805 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
|
1806 |
||
10005 | 1807 |
classNames := self compiled_classNames_common. |
9850 | 1808 |
classesLoaded := classNames |
10010 | 1809 |
collect:[:nm | Smalltalk classNamed:nm] |
9850 | 1810 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
1811 |
classNamesUnloaded := classNames |
|
1812 |
select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]]. |
|
1813 |
||
1814 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
|
10010 | 1815 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
9850 | 1816 |
|
1817 |
||
1818 |
s nextPutAll:'"/ |
|
1819 |
"/ $' , 'Header' , '$ |
|
1820 |
"/ |
|
1821 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
1822 |
"/ |
|
1823 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1824 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 1825 |
"/ |
1826 |
"/ |
|
1827 |
"/ Prerequisites: |
|
1828 |
"/ |
|
1829 |
"/ Smalltalk loadPackage:''module:directory''. |
|
1830 |
"/ Smalltalk loadPackage:''....''. |
|
1831 |
!! |
|
1832 |
||
1833 |
"{ package:''' , self package, ''' }" |
|
1834 |
!! |
|
1835 |
||
1836 |
|files| |
|
1837 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1838 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 1839 |
|
1840 |
files := #( |
|
1841 |
'. |
|
1842 |
||
1843 |
classesSorted do:[:eachClass | |
|
10080 | 1844 |
s nextPutLine:' ''' , eachClass classBaseFilename, ''''. |
9850 | 1845 |
]. |
1846 |
classNamesUnloaded do:[:nm | |
|
1847 |
s nextPutLine:' ''' , (Smalltalk fileNameForClass: nm) asFilename baseName, ''''. |
|
1848 |
]. |
|
1849 |
||
1850 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
|
1851 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
1852 |
s nextPutLine:' ''' , (Smalltalk fileNameForClass: nm) asFilename baseName, ''''. |
|
1853 |
]. |
|
1854 |
]. |
|
1855 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
1856 |
self hasExtensionMethods ifTrue:[ |
9850 | 1857 |
s nextPutLine:' ''extensions.st'''. |
1858 |
]. |
|
1859 |
||
1860 |
s nextPutAll:' |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1861 |
). |
9850 | 1862 |
|
1863 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1864 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 1865 |
|handle loaded| |
1866 |
||
1867 |
handle := ObjectFileLoader loadedObjectHandles |
|
1868 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
|
1869 |
handle ifNotNil:[ |
|
1870 |
loaded := Set new:(handle classes size). |
|
10080 | 1871 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1872 |
files := files \ loaded. |
9850 | 1873 |
]. |
1874 |
]. |
|
1875 |
||
1876 |
"/ load files which are not in the classLibrary (all if there is none) |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1877 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1878 |
'''' infoPrintCR. |
9850 | 1879 |
files do:[:f | |
1880 |
''.'' infoPrint. |
|
1881 |
f asFilename exists ifTrue:[ |
|
1882 |
Smalltalk fileIn:f. |
|
1883 |
] ifFalse:[ |
|
1884 |
Smalltalk fileIn:(''source/'' , f) |
|
1885 |
] |
|
1886 |
]. |
|
1887 |
'' '' infoPrintCR. |
|
1888 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
1889 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 1890 |
'. |
1891 |
]. |
|
1892 |
||
1893 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 1894 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 1895 |
! |
1896 |
||
9536 | 1897 |
generate_make_dot_proto |
1898 |
||
9733 | 1899 |
^ (self |
1900 |
replaceMappings: self make_dot_proto_mappings |
|
1901 |
in: self make_dot_proto) asStringCollection withTabs asString |
|
9536 | 1902 |
|
9733 | 1903 |
" |
1904 |
stx:libbasic2 generate_make_dot_proto |
|
1905 |
" |
|
9536 | 1906 |
|
1907 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
1908 |
! |
|
1909 |
||
1910 |
generate_make_dot_spec |
|
9733 | 1911 |
^ (self |
1912 |
replaceMappings: self make_dot_spec_mappings |
|
1913 |
in: self make_dot_spec) asStringCollection withTabs asString |
|
9536 | 1914 |
|
9733 | 1915 |
" |
1916 |
DapasXProject generate_make_dot_spec |
|
1917 |
DapasX_Datenbasis generate_make_dot_spec |
|
1918 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
1919 |
" |
|
9536 | 1920 |
|
1921 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
1922 |
! |
|
1923 |
||
1924 |
generate_modules_dot_stx |
|
1925 |
||
1926 |
^self replaceMappings: self modules_dot_stx_mappings |
|
1927 |
in: self modules_dot_stx |
|
1928 |
||
1929 |
" |
|
1930 |
bosch_dapasx_application generate_modules_dot_stx |
|
1931 |
||
1932 |
" |
|
1933 |
||
1934 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
1935 |
"Modified: / 11-08-2006 / 14:01:56 / cg" |
|
1936 |
! |
|
1937 |
||
1938 |
generate_nt_dot_def |
|
1939 |
||
1940 |
^self replaceMappings: self nt_dot_def_mappings |
|
1941 |
in: self nt_dot_def |
|
1942 |
||
1943 |
" |
|
1944 |
DapasXProject generate_nt_dot_def |
|
1945 |
DapasX_Datenbasis generate_nt_dot_def |
|
1946 |
||
1947 |
" |
|
1948 |
||
1949 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
1950 |
! |
|
1951 |
||
1952 |
generate_nt_dot_mak |
|
9733 | 1953 |
^ (self |
1954 |
replaceMappings: self nt_dot_mak_mappings |
|
1955 |
in: self nt_dot_mak) asStringCollection withTabs asString |
|
9536 | 1956 |
|
9733 | 1957 |
" |
1958 |
DapasXProject generate_nt_dot_mak |
|
1959 |
DapasX_Datenbasis generate_nt_dot_mak |
|
1960 |
" |
|
9536 | 1961 |
|
1962 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
1963 |
! |
|
1964 |
||
1965 |
generate_packageName_dot_rc |
|
1966 |
||
1967 |
^self replaceMappings: self packageName_dot_rc_mappings |
|
1968 |
in: self packageName_dot_rc |
|
1969 |
||
1970 |
" |
|
1971 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
1972 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 1973 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 1974 |
stx_libwidg3 generate_packageName_dot_rc |
1975 |
stx_libwidg3 productVersion |
|
9536 | 1976 |
|
1977 |
" |
|
1978 |
||
1979 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 1980 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 1981 |
! |
1982 |
||
9898 | 1983 |
nsiFilename |
1984 |
^ self packageName,'.nsi'. |
|
1985 |
||
1986 |
"Created: / 14-09-2006 / 21:03:41 / cg" |
|
1987 |
! |
|
1988 |
||
9852 | 1989 |
protectedFileNames |
1990 |
"names of files which should NOT be generated |
|
1991 |
- redefine this to protect a hand-written Make.proto" |
|
1992 |
||
1993 |
^ #() |
|
1994 |
||
1995 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
1996 |
! |
|
1997 |
||
9831 | 1998 |
rcFilename |
1999 |
^ self packageName,'.rc'. |
|
2000 |
||
2001 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 2002 |
! ! |
2003 |
||
9569 | 2004 |
!ProjectDefinition class methodsFor:'file templates'! |
9536 | 2005 |
|
9575 | 2006 |
bmake_dot_mak |
2007 |
"the template code for the bmake.bat file" |
|
2008 |
||
2009 |
^ |
|
9888 | 2010 |
'%(SUBPROJECT_BMAKE_CALLS) |
2011 |
make.exe -N -f nt.mak %%1 %%2 |
|
9575 | 2012 |
' |
2013 |
||
2014 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
9888 | 2015 |
"Modified: / 14-09-2006 / 19:46:40 / cg" |
9575 | 2016 |
! |
2017 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2018 |
classLine_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2019 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2020 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2021 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2022 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2023 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2024 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2025 |
|
9817 | 2026 |
make_dot_spec |
2027 |
||
2028 |
^ |
|
2029 |
'# $','Header','$ |
|
2030 |
# |
|
2031 |
# DO NOT EDIT |
|
2032 |
# automagically generated from the projectDefinition: ',self name,'. |
|
2033 |
# |
|
2034 |
# Warning: once you modify this file, do not rerun |
|
2035 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
2036 |
# |
|
2037 |
# This file contains specifications which are common to all platforms. |
|
2038 |
# |
|
2039 |
||
2040 |
# Do NOT CHANGE THESE DEFINITIONS |
|
2041 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
2042 |
# to find the source code of a class and to find the library for a package) |
|
2043 |
MODULE=%(MODULE) |
|
2044 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
2045 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2046 |
||
2047 |
||
2048 |
# Argument(s) to the stc compiler (stc --usage). |
|
2049 |
# -H. : create header files locally |
|
2050 |
# (if removed, they will be created as common |
|
2051 |
# -Pxxx : defines the package |
|
2052 |
# -Zxxx : a prefix for variables within the classLib |
|
2053 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2054 |
# -Ixxx : include path passed to CC for inline C-code |
|
2055 |
# +optspace : optimized for space |
|
2056 |
# +optspace2 : optimized more for space |
|
2057 |
# +optspace3 : optimized even more for space |
|
2058 |
# +optinline : generate inline code for some ST constructs |
|
2059 |
# +inlineNew : additionally inline new |
|
2060 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
2061 |
# |
|
2062 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2063 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2064 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2065 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
2066 |
||
2067 |
||
2068 |
# Argument(s) to the stc compiler (stc --usage). |
|
2069 |
# -warn : no warnings |
|
2070 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2071 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2072 |
# -warnPrivacy : no warnings about privateClass extension |
|
2073 |
# |
|
2074 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2075 |
# STCWARNINGS=-warn |
|
2076 |
# STCWARNINGS=-warnNonStandard |
|
2077 |
# STCWARNINGS=-warnEOLComments |
|
2078 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
2079 |
||
2080 |
%(OBJECTS) |
|
2081 |
' |
|
2082 |
||
2083 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2084 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
2085 |
"Modified: / 30-08-2006 / 19:07:26 / cg" |
|
2086 |
! |
|
2087 |
||
2088 |
objectLine_make_dot_spec |
|
2089 |
||
2090 |
^' $(OUTDIR)%(CLASSFILE).$(O) \' |
|
2091 |
||
2092 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
2093 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
2094 |
! |
|
2095 |
||
9627 | 2096 |
packageName_dot_rc |
2097 |
"the template code for the <libName>.rc file" |
|
2098 |
||
2099 |
^ |
|
2100 |
'// |
|
2101 |
// DO NOT EDIT |
|
2102 |
// automagically generated from the projectDefinition: ',self name,'. |
|
2103 |
// |
|
2104 |
VS_VERSION_INFO VERSIONINFO |
|
2105 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
2106 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
2107 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
2108 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
2109 |
FILEOS VOS_NT_WINDOWS32 |
|
2110 |
FILETYPE %(FILETYPE) |
|
2111 |
FILESUBTYPE VS_USER_DEFINED |
|
2112 |
||
2113 |
BEGIN |
|
2114 |
BLOCK "StringFileInfo" |
|
2115 |
BEGIN |
|
2116 |
BLOCK "040904E4" |
|
2117 |
BEGIN |
|
2118 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
2119 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
2120 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
2121 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
9630 | 2122 |
%(LEGAL_COPYRIGHT_LINE) |
9627 | 2123 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
2124 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
2125 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
2126 |
END |
|
2127 |
||
2128 |
END |
|
2129 |
||
2130 |
BLOCK "VarFileInfo" |
|
2131 |
BEGIN // Language | Translation |
|
2132 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
2133 |
END |
|
2134 |
END |
|
2135 |
' |
|
2136 |
" |
|
2137 |
stx_libbasic3 packageName_dot_rc |
|
2138 |
stx_libbasic3 generate_packageName_dot_rc |
|
2139 |
" |
|
2140 |
||
2141 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2142 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
9630 | 2143 |
"Modified: / 23-08-2006 / 01:32:23 / cg" |
9536 | 2144 |
! ! |
2145 |
||
9569 | 2146 |
!ProjectDefinition class methodsFor:'loading'! |
9551 | 2147 |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2148 |
load |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2149 |
"load the project" |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2150 |
|
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2151 |
"try to load a binary class library first. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2152 |
If this fails, classes are filed in, as well as classes not present |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2153 |
in the class library" |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2154 |
|
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2155 |
self loadClassLibrary. |
9627 | 2156 |
self loadExtensions. |
2157 |
self loadAllClasses. |
|
10140 | 2158 |
self loadPreRequisites:true. |
9579 | 2159 |
|
9627 | 2160 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
10140 | 2161 |
"Modified: / 24-10-2006 / 23:48:24 / cg" |
9579 | 2162 |
! |
2163 |
||
9627 | 2164 |
loadAllClasses |
10005 | 2165 |
"load (fileIn) classes that should be present - |
2166 |
install as autoloaded classes marked to be autoloaded" |
|
2167 |
||
2168 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName| |
|
2169 |
||
2170 |
platformName := OperatingSystem platformName. |
|
2171 |
classNamesToLoad := OrderedCollection new. |
|
2172 |
classNamesToAutoload := OrderedCollection new. |
|
2173 |
||
10007
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2174 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |eachClassnameSym isAutoload cls| |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2175 |
eachClassnameSym := eachClassname asSymbol. |
10005 | 2176 |
isAutoload := eachAttributes includes:#autoload. |
2177 |
||
10007
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2178 |
"no need to (re-)load an existing class, but install if should be loaded" |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2179 |
((cls := Smalltalk loadedClassNamed:eachClassnameSym) isNil |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2180 |
or:[cls isLoaded not and:[isAutoload not]] |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2181 |
) ifTrue:[ |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2182 |
(eachAttributes isEmpty |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2183 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2184 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2185 |
hasClassesToLoad := true. |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2186 |
isAutoload ifTrue:[ |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2187 |
classNamesToAutoload add:eachClassnameSym. |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2188 |
] ifFalse:[ |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2189 |
classNamesToLoad add:eachClassnameSym. |
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2190 |
]. |
10005 | 2191 |
]. |
10007
93f73465ef11
Fix class loading (if class is already present)
Stefan Vogel <sv@exept.de>
parents:
10005
diff
changeset
|
2192 |
]. |
10005 | 2193 |
]. |
2194 |
||
2195 |
hasClassesToLoad ifTrue:[ |
|
2196 |
loadedClasses := OrderedCollection new. |
|
2197 |
||
2198 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
|
2199 |
of class name to file name" |
|
2200 |
||
2201 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
|
2202 |
||
2203 |
"install autoloaded classes first, |
|
2204 |
some others may depend on them" |
|
2205 |
||
2206 |
classNamesToAutoload do:[:eachClassName | |
|
2207 |
Smalltalk |
|
2208 |
installAutoloadedClassNamed:eachClassName |
|
2209 |
category:#autoloaded "FIXME" |
|
2210 |
package:self package |
|
2211 |
revision:nil |
|
2212 |
numClassInstVars:0. "FIXME" |
|
2213 |
]. |
|
2214 |
||
2215 |
classNamesToLoad do:[:eachClassName | |
|
9627 | 2216 |
|cls| |
2217 |
||
10005 | 2218 |
cls := Smalltalk |
2219 |
fileInClass:eachClassName |
|
2220 |
package:self package |
|
2221 |
initialize:false |
|
2222 |
lazy:false |
|
2223 |
silent:false. |
|
2224 |
cls notNil ifTrue:[ |
|
2225 |
loadedClasses add:cls |
|
9627 | 2226 |
]. |
2227 |
]. |
|
10005 | 2228 |
loadedClasses do:[:eachLoadedClass | |
2229 |
"do not initialize, if initialize method is inherited" |
|
2230 |
(eachLoadedClass theMetaclass implements:#initialize) ifTrue:[ |
|
2231 |
eachLoadedClass initialize |
|
2232 |
]. |
|
9627 | 2233 |
]. |
2234 |
]. |
|
2235 |
||
2236 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
|
9817 | 2237 |
"Modified: / 30-08-2006 / 18:32:56 / cg" |
9551 | 2238 |
! |
2239 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2240 |
loadClassLibrary |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2241 |
"try to load a binary class library" |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2242 |
|
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2243 |
(Smalltalk fileInClassLibrary:self libraryName inPackage:self package) ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2244 |
"/ |handle loaded| |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2245 |
"/ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2246 |
"/ handle := ObjectFileLoader loadedObjectHandles |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2247 |
"/ detect:[:h | h package = self package] ifNone:nil. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2248 |
"/ handle ifNotNil:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2249 |
"/ loaded := Set new:(handle classes size). |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2250 |
"/ handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]]. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2251 |
"/ files := files \ loaded. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2252 |
"/ ]. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2253 |
]. |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2254 |
! |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2255 |
|
9627 | 2256 |
loadExtensions |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2257 |
"load extension methods - do not load if they are already present" |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2258 |
|
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2259 |
self hasAllExtensionsLoaded ifFalse:[ |
9909
a92096c60681
Do not try to load extensions, if there are none
Stefan Vogel <sv@exept.de>
parents:
9908
diff
changeset
|
2260 |
Smalltalk loadExtensionsForPackage:self package. |
a92096c60681
Do not try to load extensions, if there are none
Stefan Vogel <sv@exept.de>
parents:
9908
diff
changeset
|
2261 |
]. |
9627 | 2262 |
|
2263 |
"Created: / 17-08-2006 / 00:21:39 / cg" |
|
2264 |
! |
|
2265 |
||
10129
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2266 |
loadPreRequisites |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2267 |
"load other packages (at least the projectDefinitions and their extensions)" |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2268 |
|
10140 | 2269 |
self loadPreRequisites:false |
2270 |
||
2271 |
"Modified: / 24-10-2006 / 23:48:45 / cg" |
|
2272 |
! |
|
2273 |
||
2274 |
loadPreRequisites:fullLoad |
|
2275 |
"load other packages (at least the projectDefinitions and their extensions)" |
|
2276 |
||
10129
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2277 |
self preRequisites do:[:preReqPackage | |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2278 |
|def| |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2279 |
|
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2280 |
def := ProjectDefinition definitionClassForPackage:preReqPackage. |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2281 |
def notNil ifTrue:[ |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2282 |
def autoload. |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2283 |
]. |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2284 |
]. |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2285 |
|
10140 | 2286 |
fullLoad ifTrue:[ |
2287 |
self preRequisites do:[:preReqPackage | |
|
2288 |
|def| |
|
2289 |
||
2290 |
def := ProjectDefinition definitionClassForPackage:preReqPackage. |
|
2291 |
def notNil ifTrue:[ |
|
2292 |
def isFullyLoaded ifFalse:[ |
|
2293 |
def load. |
|
2294 |
]. |
|
2295 |
]. |
|
2296 |
]. |
|
2297 |
]. |
|
2298 |
||
2299 |
"Created: / 24-10-2006 / 23:48:07 / cg" |
|
10129
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2300 |
! |
6103c9187040
load prerequisites after autoload (for extensions)
Claus Gittinger <cg@exept.de>
parents:
10124
diff
changeset
|
2301 |
|
9627 | 2302 |
postAutoload |
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
2303 |
self hasExtensionMethods ifTrue:[ |
9627 | 2304 |
self loadExtensions |
2305 |
]. |
|
10140 | 2306 |
self loadPreRequisites:false. |
9627 | 2307 |
|
2308 |
"Created: / 17-08-2006 / 00:21:29 / cg" |
|
10140 | 2309 |
"Modified: / 24-10-2006 / 23:48:19 / cg" |
9551 | 2310 |
! ! |
2311 |
||
9569 | 2312 |
!ProjectDefinition class methodsFor:'mappings'! |
9536 | 2313 |
|
9627 | 2314 |
bc_dot_def_mappings |
2315 |
^ (Dictionary new) |
|
9887 | 2316 |
at:'DESCRIPTION' |
9627 | 2317 |
put:[ |
2318 |
|d| |
|
2319 |
||
2320 |
d := self description. |
|
2321 |
(d isEmptyOrNil ifTrue:[ self defaultDescription ] ifFalse:[ d ]) storeString. |
|
2322 |
]; |
|
2323 |
yourself |
|
2324 |
||
2325 |
"Created: / 09-08-2006 / 11:17:59 / fm" |
|
9887 | 2326 |
"Modified: / 14-09-2006 / 18:51:17 / cg" |
9536 | 2327 |
! |
2328 |
||
9627 | 2329 |
bmake_dot_mak_mappings |
2330 |
^ (Dictionary new) |
|
9887 | 2331 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
9627 | 2332 |
yourself |
2333 |
||
2334 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
9887 | 2335 |
"Modified: / 14-09-2006 / 18:55:33 / cg" |
9575 | 2336 |
! |
2337 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2338 |
classLine_mappings: aClassName |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2339 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2340 |
^Dictionary new |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2341 |
at: 'CLASS' put: ( self st2c:aClassName ); |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2342 |
yourself |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2343 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2344 |
"Modified: / 09-08-2006 / 18:27:07 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2345 |
"Created: / 19-09-2006 / 22:47:43 / cg" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2346 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2347 |
|
9627 | 2348 |
make_dot_spec_mappings |
2349 |
^ Dictionary new |
|
9887 | 2350 |
at: 'TAB' put: ( Character tab asString ); |
2351 |
at: 'MODULE' put: ( self module ); |
|
2352 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2353 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
|
2354 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
|
2355 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
9627 | 2356 |
yourself |
2357 |
||
2358 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
9887 | 2359 |
"Modified: / 14-09-2006 / 18:51:24 / cg" |
9575 | 2360 |
! |
2361 |
||
9627 | 2362 |
nt_dot_mak_mappings |
2363 |
|d| |
|
2364 |
||
2365 |
d := Dictionary new. |
|
2366 |
d |
|
9887 | 2367 |
at: 'TAB' put: ( Character tab asString ); |
2368 |
at: 'TOP' put: ( self pathToTop_win32 ); |
|
2369 |
at: 'MODULE' put: ( self module ); |
|
9891 | 2370 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
2371 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ). |
|
9627 | 2372 |
^ d |
2373 |
||
2374 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
9891 | 2375 |
"Modified: / 14-09-2006 / 20:20:19 / cg" |
9575 | 2376 |
! |
2377 |
||
9817 | 2378 |
objectLine_make_dot_spec_mappings: aClassName |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2379 |
|cls fn| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2380 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2381 |
(cls := Smalltalk classNamed:aClassName) isNil ifTrue:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2382 |
fn := Smalltalk fileNameForClass:aClassName |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2383 |
] ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2384 |
fn := cls classFilename asFilename withoutSuffix baseName |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2385 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2386 |
|
9817 | 2387 |
^ Dictionary new |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2388 |
at: 'CLASSFILE' put: fn; |
9817 | 2389 |
yourself |
2390 |
||
2391 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
|
2392 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2393 |
"Modified: / 20-10-2006 / 16:22:58 / cg" |
9817 | 2394 |
! |
2395 |
||
9627 | 2396 |
packageName_dot_rc_mappings |
9630 | 2397 |
|d s| |
9627 | 2398 |
|
9630 | 2399 |
d := Dictionary new. |
2400 |
d |
|
9887 | 2401 |
at: 'PRODUCT_NAME' put: (self productName); |
2402 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
2403 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
2404 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
|
2405 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
|
2406 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
|
2407 |
||
2408 |
at: 'COMPANY_NAME' put: (self companyName); |
|
2409 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
|
2410 |
at: 'FILE_VERSION' put: (self fileVersion); |
|
2411 |
at: 'INTERNAL_NAME' put: (self internalName). |
|
9630 | 2412 |
s := self legalCopyright. |
2413 |
s notNil ifTrue:[ |
|
2414 |
d |
|
9887 | 2415 |
at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 2416 |
]. |
9817 | 2417 |
s := self iconFileName. |
2418 |
s notNil ifTrue:[ |
|
2419 |
d |
|
2420 |
at: #'ICONDEFINITION_LINE' put: 'IDR_MAINFRAME ICON DISCARDABLE "',s,'"' |
|
2421 |
]. |
|
2422 |
||
9630 | 2423 |
^ d |
9627 | 2424 |
|
2425 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
9887 | 2426 |
"Modified: / 14-09-2006 / 18:52:37 / cg" |
9536 | 2427 |
! |
2428 |
||
9627 | 2429 |
replaceMappings: mappings in: fileTemplate |
9733 | 2430 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 2431 |
|
9733 | 2432 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 2433 |
|
9733 | 2434 |
" |
2435 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
|
2436 |
" |
|
9627 | 2437 |
|
2438 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
2439 |
"Modified: / 08-08-2006 / 12:46:13 / fm" |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2440 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2441 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2442 |
st2c:aString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2443 |
^ (aString asString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2444 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2445 |
replaceAny:':' with:$_ |
9536 | 2446 |
! ! |
2447 |
||
9817 | 2448 |
!ProjectDefinition class methodsFor:'mappings support'! |
2449 |
||
10005 | 2450 |
generateClassLines:classLineTemplate |
2451 |
^ String |
|
2452 |
streamContents:[:s | |
|
2453 |
|classNames classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
|
2454 |
||
2455 |
putLineForClassName := [:className | |
|
2456 |
|newClassLine mappings| |
|
2457 |
||
2458 |
mappings := self classLine_mappings:className. |
|
2459 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
|
2460 |
s nextPutLine:newClassLine |
|
2461 |
]. |
|
2462 |
classNames := self compiled_classNames_common. |
|
10010 | 2463 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
2464 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
|
10005 | 2465 |
classNamesUnloaded := classNames |
2466 |
select:[:nm | |
|
2467 |
|cls| |
|
2468 |
||
2469 |
cls := Smalltalk classNamed:nm. |
|
2470 |
cls isNil or:[ cls isLoaded not ] |
|
2471 |
]. |
|
10010 | 2472 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
10005 | 2473 |
classNamesSorted do:putLineForClassName. |
2474 |
classNamesUnloaded do:putLineForClassName. |
|
2475 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
2476 |
do:[:nm :attr | |
|
2477 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
2478 |
putLineForClassName value:nm. |
|
2479 |
]. |
|
2480 |
]. |
|
10010 | 2481 |
#( ('UNIX' unix) |
2482 |
('WIN32' win32) |
|
2483 |
('VMS' vms) |
|
2484 |
('BEOS' beos) ) |
|
2485 |
pairsDo:[:ifdef :platformName | |
|
10005 | 2486 |
|archClassNames archClassesLoaded| |
2487 |
||
10010 | 2488 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
10005 | 2489 |
archClassNames notEmpty ifTrue:[ |
2490 |
s nextPutLine:'#ifdef ' , ifdef. |
|
2491 |
archClassNames do:[:clsName | |
|
2492 |
putLineForClassName value:clsName |
|
2493 |
]. |
|
2494 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
|
2495 |
]. |
|
2496 |
]. |
|
2497 |
] |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2498 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2499 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2500 |
bosch_dapasx_datenbasis generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2501 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 2502 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
2503 |
" |
|
2504 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2505 |
"Modified: / 16-08-2006 / 18:52:10 / User" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2506 |
"Created: / 19-09-2006 / 22:47:50 / cg" |
9979
e2e247d73233
oops - libInit forgot non-loaded, alien-OS files.
Claus Gittinger <cg@exept.de>
parents:
9972
diff
changeset
|
2507 |
"Modified: / 20-09-2006 / 11:47:25 / cg" |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2508 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2509 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2510 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2511 |
^ self generateClassLines:(self classLine_libInit_dot_cc) |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2512 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2513 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2514 |
bosch_dapasx_datenbasis generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2515 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2516 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2517 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2518 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2519 |
"Created: / 09-08-2006 / 11:21:48 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2520 |
"Modified: / 16-08-2006 / 18:52:10 / User" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2521 |
"Modified: / 19-09-2006 / 22:48:14 / cg" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2522 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2523 |
|
10005 | 2524 |
generateDependencies:whichArchitecture |
2525 |
^ String |
|
2526 |
streamContents:[:s | |
|
2527 |
|classNames classesLoaded classesSorted classNamesSorted putDependencyForClass archClassNames archClassesLoaded putSingleClassDependencyEntry putDependencyForExtensions| |
|
2528 |
||
2529 |
putSingleClassDependencyEntry := [:cls | |
|
2530 |
|sclsBaseName| |
|
2531 |
||
2532 |
s nextPutAll:' $(INCLUDE_TOP)'. |
|
2533 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
|
2534 |
sclsBaseName := cls classFilename asFilename withoutSuffix baseName. |
|
2535 |
s nextPutAll:(self |
|
2536 |
topRelativePathTo:sclsBaseName |
|
2537 |
inPackage:cls package |
|
2538 |
architecture:whichArchitecture). |
|
2539 |
s nextPutAll:'.$(H)'. |
|
9887 | 2540 |
]. |
10005 | 2541 |
putDependencyForClass := [:cls | |
2542 |
|clsBaseName already| |
|
2543 |
||
2544 |
clsBaseName := cls classFilename asFilename withoutSuffix baseName. |
|
2545 |
s nextPutAll:'$(OUTDIR)'. |
|
2546 |
s nextPutAll:clsBaseName. |
|
2547 |
s nextPutAll:'.$(O)'. |
|
2548 |
s nextPutAll:' '. |
|
2549 |
s nextPutAll:clsBaseName. |
|
2550 |
s nextPutAll:'.$(H)'. |
|
2551 |
s nextPutAll:': '. |
|
2552 |
s nextPutAll:clsBaseName. |
|
2553 |
s nextPutAll:'.st'. |
|
2554 |
already := Set new. |
|
2555 |
cls |
|
2556 |
allSuperclassesDo:[:scls | |
|
2557 |
putSingleClassDependencyEntry value:scls. |
|
2558 |
already add:scls. |
|
9887 | 2559 |
]. |
10005 | 2560 |
cls |
2561 |
privateClassesDo:[:eachPrivateClass | |
|
2562 |
eachPrivateClass |
|
2563 |
allSuperclassesDo:[:scls | |
|
2564 |
|sclsBaseName| |
|
2565 |
||
2566 |
scls ~~ cls ifTrue:[ |
|
2567 |
scls isPrivate ifFalse:[ |
|
2568 |
(already includes:scls) ifFalse:[ |
|
2569 |
putSingleClassDependencyEntry value:scls. |
|
2570 |
already add:scls. |
|
2571 |
]. |
|
2572 |
]. |
|
2573 |
]. |
|
2574 |
] |
|
2575 |
]. |
|
2576 |
s nextPutAll:' $(STCHDR)'. |
|
2577 |
s cr. |
|
9887 | 2578 |
]. |
10005 | 2579 |
putDependencyForExtensions := [ |
2580 |
|already| |
|
2581 |
||
2582 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
|
2583 |
already := Set new. |
|
2584 |
self extensionMethodNames |
|
2585 |
pairWiseDo:[:className :selector | |
|
2586 |
|mthdCls cls| |
|
2587 |
||
2588 |
((mthdCls := Smalltalk classNamed:className) notNil |
|
2589 |
and:[ mthdCls isLoaded ]) |
|
2590 |
ifTrue:[ |
|
2591 |
cls := mthdCls theNonMetaclass. |
|
2592 |
(already includes:cls) ifFalse:[ |
|
2593 |
cls |
|
10063 | 2594 |
withAllSuperclassesDo:[:scls | |
10005 | 2595 |
(already includes:scls) ifFalse:[ |
2596 |
putSingleClassDependencyEntry value:scls. |
|
2597 |
already add:scls. |
|
2598 |
]. |
|
2599 |
]. |
|
2600 |
]. |
|
2601 |
]. |
|
9887 | 2602 |
]. |
10005 | 2603 |
s nextPutAll:' $(STCHDR)'. |
2604 |
s cr. |
|
2605 |
]. |
|
2606 |
classNames := self compiled_classNames_common. |
|
2607 |
classesLoaded := classNames |
|
10010 | 2608 |
collect:[:className | Smalltalk classNamed:className] |
2609 |
thenSelect:[:cls | cls notNil and:[cls isLoaded]]. |
|
2610 |
||
10005 | 2611 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
2612 |
classesSorted do:putDependencyForClass. |
|
2613 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
2614 |
do:[:className :attr | |
|
2615 |
|cls| |
|
2616 |
||
2617 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
2618 |
((cls := Smalltalk classNamed:className) notNil and:[ cls isLoaded ]) ifTrue:[ |
|
2619 |
putDependencyForClass value:cls. |
|
2620 |
] |
|
9887 | 2621 |
]. |
2622 |
]. |
|
10005 | 2623 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
2624 |
archClassesLoaded := archClassNames |
|
10010 | 2625 |
collect:[:className | Smalltalk classNamed:className] |
10005 | 2626 |
thenSelect:[:cls | cls notNil and:[ cls isLoaded ] ]. |
10010 | 2627 |
|
10005 | 2628 |
archClassesLoaded notEmpty ifTrue:[ |
10010 | 2629 |
(Class classesSortedByLoadOrder:archClassesLoaded) do:putDependencyForClass. |
9887 | 2630 |
]. |
10005 | 2631 |
self hasExtensionMethods ifTrue:putDependencyForExtensions. |
2632 |
] |
|
9887 | 2633 |
|
2634 |
" |
|
2635 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 2636 |
stx_libbasic3 generateDependencies:#win32 |
2637 |
" |
|
2638 |
||
9887 | 2639 |
"Modified: / 16-08-2006 / 18:52:10 / User" |
2640 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
|
10063 | 2641 |
"Modified: / 09-10-2006 / 14:23:16 / cg" |
9887 | 2642 |
! |
2643 |
||
2644 |
generateDependencies_unix |
|
2645 |
^ self generateDependencies:#unix |
|
2646 |
||
2647 |
" |
|
2648 |
stx_libbasic3 generateDependencies:#unix |
|
2649 |
stx_libbasic3 generateDependencies:#win32 |
|
2650 |
" |
|
2651 |
||
2652 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
2653 |
! |
|
2654 |
||
2655 |
generateDependencies_win32 |
|
2656 |
^ self generateDependencies:#win32 |
|
2657 |
||
2658 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
2659 |
! |
|
2660 |
||
9956 | 2661 |
generateLocalIncludes_unix |
2662 |
^ String streamContents:[:s | |
|
2663 |
s nextPutAll:(self localIncludes_unix). |
|
2664 |
self searchForProjectsWhichProvideHeaderFiles |
|
2665 |
do:[:includeProject | |
|
2666 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
|
2667 |
] |
|
2668 |
] |
|
2669 |
||
2670 |
" |
|
2671 |
bosch_dapasx generateLocalIncludes_unix |
|
2672 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
|
2673 |
stx_libbasic generateLocalIncludes_unix |
|
2674 |
stx_libview generateLocalIncludes_unix |
|
2675 |
stx_libtool2 generateLocalIncludes_unix |
|
2676 |
stx_libui generateLocalIncludes_unix |
|
2677 |
" |
|
2678 |
||
2679 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
2680 |
"Modified: / 14-09-2006 / 15:38:16 / cg" |
|
2681 |
! |
|
2682 |
||
9887 | 2683 |
generateLocalIncludes_win32 |
2684 |
^ String streamContents:[:s | |
|
2685 |
s nextPutAll:(self localIncludes_win32). |
|
2686 |
self searchForProjectsWhichProvideHeaderFiles |
|
2687 |
do:[:includeProject | |
|
2688 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
|
2689 |
] |
|
2690 |
] |
|
2691 |
||
2692 |
" |
|
2693 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
2694 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
|
2695 |
stx_libbasic generateLocalIncludes_win32 |
|
2696 |
stx_libview generateLocalIncludes_win32 |
|
2697 |
stx_libtool2 generateLocalIncludes_win32 |
|
2698 |
" |
|
2699 |
||
2700 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
2701 |
"Modified: / 14-09-2006 / 15:37:35 / cg" |
|
2702 |
! |
|
2703 |
||
9817 | 2704 |
generateObjects_make_dot_spec |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
2705 |
|pivateClassesOf sorter classes| |
9817 | 2706 |
|
2707 |
classes := self compiled_classes_common. |
|
2708 |
pivateClassesOf := IdentityDictionary new. |
|
2709 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
2710 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
2711 |
sorter := [:a :b | |
9817 | 2712 |
"/ a must come before b iff: |
2713 |
"/ b is a subclass of a |
|
2714 |
"/ b has a private class which is a subclass of a |
|
2715 |
"/ a is a sharedPool, used by b |
|
2716 |
||
2717 |
|mustComeBefore pivateClassesOfB| |
|
2718 |
||
2719 |
mustComeBefore := false. |
|
2720 |
mustComeBefore := (a isSharedPool and:[(b sharedPools includes: a name)]). |
|
2721 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
2722 |
mustComeBefore ifFalse:[ |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
2723 |
pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ]. |
9817 | 2724 |
pivateClassesOfB do:[:eachClassInB | |
2725 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
2726 |
]. |
|
2727 |
]. |
|
2728 |
mustComeBefore |
|
2729 |
]. |
|
2730 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
2731 |
classes topologicalSort:sorter. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
2732 |
|
9817 | 2733 |
^ String streamContents:[:s | |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2734 |
|putLineForClass putLineForClassName sysDepOrNil| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2735 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2736 |
putLineForClassName := |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2737 |
[:eachClassName | |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2738 |
|mappings newObjectLine| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2739 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2740 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2741 |
s nextPutLine:newObjectLine. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2742 |
]. |
9817 | 2743 |
|
2744 |
putLineForClass := |
|
2745 |
[:eachClass | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2746 |
putLineForClassName value:(eachClass name) |
9817 | 2747 |
]. |
2748 |
||
2749 |
sysDepOrNil := nil. |
|
2750 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2751 |
|define prefix depClasses depClassNames| |
9817 | 2752 |
|
2753 |
define := OperatingSystem platformDefineForPlatformName:platformID. |
|
2754 |
prefix := define copyFrom:('-D' size + 1). |
|
2755 |
depClasses := self compiled_classesForArchitecture:platformID. |
|
2756 |
depClasses notEmpty ifTrue:[ |
|
2757 |
sysDepOrNil := prefix,'_OBJS'. |
|
2758 |
s nextPutLine:sysDepOrNil,'= \'. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2759 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2760 |
(depClasses includes:nil) ifTrue:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2761 |
(Dialog confirm:'Dependencies are not in order (some classes are not present).\\Continue anyway ?' withCRs) |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2762 |
ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2763 |
AbortSignal raise. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2764 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2765 |
depClassNames := self compiled_classNamesForPlatform:platformID. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2766 |
depClassNames do:putLineForClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2767 |
] ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2768 |
depClasses topologicalSort:sorter. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2769 |
depClasses do:putLineForClass. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2770 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2771 |
|
9817 | 2772 |
s cr. |
2773 |
s cr. |
|
2774 |
] |
|
2775 |
]. |
|
2776 |
||
2777 |
s nextPutLine:'COMMON_OBJS= \'. |
|
2778 |
||
2779 |
classes do:putLineForClass. |
|
2780 |
||
2781 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
2782 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
2783 |
s nextPutLine:(' $(OUTDIR)',(Smalltalk fileNameForClass:nm),'.$(O) \'). |
|
2784 |
]. |
|
2785 |
]. |
|
2786 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
2787 |
self hasExtensionMethods ifTrue:[ |
9850 | 2788 |
s nextPutLine:' $(OUTDIR)extensions.$(O) \'. |
2789 |
]. |
|
9817 | 2790 |
s cr. |
2791 |
] |
|
2792 |
||
2793 |
" |
|
2794 |
bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec |
|
2795 |
DapasXProject generateObjects_make_dot_spec |
|
2796 |
stx_libbasic3 generateObjects_make_dot_spec |
|
2797 |
" |
|
2798 |
||
2799 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2800 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 2801 |
! |
2802 |
||
10022 | 2803 |
generateSubDirectories |
2804 |
^ String streamContents:[:s | |
|
2805 |
self subProjects |
|
2806 |
do:[:projectID | |
|
2807 |
s space; nextPutAll:projectID |
|
2808 |
] |
|
2809 |
] |
|
2810 |
||
2811 |
" |
|
2812 |
DapasXProject generateSubDirectories |
|
2813 |
DapasX_Datenbasis generateSubDirectories |
|
2814 |
" |
|
2815 |
||
2816 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
2817 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
2818 |
! |
|
2819 |
||
2820 |
headerFileOutputArg |
|
2821 |
"/ "all stx stuff goes to the common include directory. |
|
2822 |
"/ Everything else is left locally" |
|
2823 |
"/ |
|
2824 |
"/ ( |
|
2825 |
"/ #( |
|
2826 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
2827 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
2828 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
2829 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
2830 |
"/ 'stx:libboss' 'stx:libdb' |
|
2831 |
"/ ) |
|
2832 |
"/ includes:self package) ifTrue:[ |
|
2833 |
"/ ^ '-H$(INCLUDE)' |
|
2834 |
"/ ]. |
|
2835 |
^ '-H.' |
|
2836 |
||
2837 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
2838 |
"Modified: / 14-09-2006 / 15:38:25 / cg" |
|
2839 |
! |
|
2840 |
||
9887 | 2841 |
subProjectBmakeCalls |
2842 |
^ String streamContents:[:s | |
|
2843 |
self subProjects do:[:packageID | |
|
2844 |
s nextPutLine:'cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
2845 |
s nextPutLine:'call bmake %1 %2'. |
|
2846 |
s nextPutLine:'cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
9888 | 2847 |
s cr. |
9887 | 2848 |
] |
2849 |
] |
|
2850 |
||
2851 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
9888 | 2852 |
"Modified: / 14-09-2006 / 19:46:57 / cg" |
9817 | 2853 |
! ! |
2854 |
||
9575 | 2855 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 2856 |
|
9996 | 2857 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
2858 |
aSetOfClasses |
|
2859 |
do:[:aClass | |
|
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2860 |
self |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2861 |
addReferencesToClassesFromGlobalsInMethods: |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2862 |
(aClass theNonMetaclass methodDictionary values |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2863 |
select:[:m | m package = aClass package]) |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2864 |
to:usedClassReasons. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2865 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2866 |
self |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2867 |
addReferencesToClassesFromGlobalsInMethods: |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2868 |
(aClass theMetaclass methodDictionary values |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2869 |
select:[:m | m package = aClass package]) |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2870 |
to:usedClassReasons. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2871 |
]. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2872 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2873 |
"Modified: / 10-10-2006 / 23:03:45 / cg" |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2874 |
! |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2875 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2876 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2877 |
someMethods do:[:method | |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2878 |
method usedGlobals |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2879 |
do:[:global | |usedClass| |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2880 |
usedClass := Smalltalk at: global asSymbol. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2881 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2882 |
ifTrue:[ |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2883 |
(usedClassReasons at: usedClass ifAbsentPut:[Set new]) |
10132 | 2884 |
add: (usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
9996 | 2885 |
] |
2886 |
] |
|
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2887 |
] |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2888 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
2889 |
"Created: / 10-10-2006 / 23:00:07 / cg" |
9996 | 2890 |
! |
2891 |
||
9627 | 2892 |
classNamesAndAttributesDo: aBlock |
2893 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
2894 |
||
2895 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 2896 |
! |
2897 |
||
9664 | 2898 |
compile:someCode categorized:category |
2899 |
Class packageQuerySignal |
|
2900 |
answer:self package |
|
2901 |
do:[ |
|
2902 |
self theMetaclass compilerClass |
|
2903 |
compile:someCode |
|
2904 |
forClass:self theMetaclass |
|
2905 |
inCategory:category |
|
2906 |
notifying:nil |
|
2907 |
install:true |
|
2908 |
skipIfSame:true |
|
2909 |
silent:true. |
|
2910 |
] |
|
2911 |
||
2912 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
2913 |
! |
|
2914 |
||
9627 | 2915 |
compiled_classes |
10073 | 2916 |
^ self compiled_classNames |
2917 |
collect: |
|
2918 |
[:eachName| |
|
2919 |
|cls| |
|
2920 |
||
2921 |
cls := (Smalltalk at:eachName asSymbol). |
|
2922 |
cls isNil ifTrue:[ |
|
2923 |
self error:('missing class: ',eachName) mayProceed:true. |
|
2924 |
]. |
|
2925 |
cls. |
|
2926 |
] |
|
9627 | 2927 |
|
2928 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
2929 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10073 | 2930 |
"Modified: / 11-10-2006 / 14:23:24 / cg" |
9536 | 2931 |
! |
2932 |
||
9627 | 2933 |
compiled_classesDo:aBlock |
2934 |
self compiled_classes do:aBlock. |
|
2935 |
||
2936 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
2937 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
2938 |
! |
|
2939 |
||
10005 | 2940 |
compiled_classesForArchitecture:arch |
2941 |
^ (self compiled_classNamesForPlatform:arch) |
|
2942 |
collect:[:eachName | (Smalltalk at:eachName asSymbol) ] |
|
9627 | 2943 |
|
2944 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
2945 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
2946 |
! |
|
2947 |
||
2948 |
compiled_classes_common |
|
2949 |
^ self compiled_classNames_common collect:[:eachName| (Smalltalk at:eachName asSymbol)] |
|
2950 |
||
2951 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
2952 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
9607 | 2953 |
! |
2954 |
||
9627 | 2955 |
cvsRevision |
2956 |
|rev| |
|
2957 |
||
2958 |
rev := self revision. |
|
2959 |
rev isNil ifTrue:[ |
|
2960 |
"not yet pubplished" |
|
2961 |
^ #( '0' '1' ) |
|
2962 |
]. |
|
2963 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
2964 |
||
2965 |
" |
|
2966 |
self cvsRevision |
|
2967 |
stx_libbasic3 cvsRevision |
|
2968 |
" |
|
2969 |
||
2970 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 2971 |
! |
2972 |
||
9627 | 2973 |
inconsistency:message |
2974 |
Dialog warn:message |
|
9536 | 2975 |
|
9627 | 2976 |
" |
2977 |
self searchForNeverCompiledSuperclasses |
|
2978 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
2979 |
" |
|
2980 |
||
2981 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 2982 |
! |
2983 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2984 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2985 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2986 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2987 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2988 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2989 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2990 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2991 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2992 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2993 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2994 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2995 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2996 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2997 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2998 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2999 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3000 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3001 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3002 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3003 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3004 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3005 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3006 |
|
9627 | 3007 |
namesAndAttributesIn:aCollection do: aBlock |
3008 |
aCollection do:[:entry | |
|
3009 |
|className attributes| |
|
3010 |
||
3011 |
entry isArray ifFalse:[ |
|
3012 |
className := entry. |
|
3013 |
attributes := #(). |
|
3014 |
] ifTrue:[ |
|
3015 |
className := entry first. |
|
3016 |
attributes := entry copyFrom:2. |
|
3017 |
]. |
|
3018 |
aBlock value: className value: attributes |
|
3019 |
]. |
|
3020 |
||
3021 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 3022 |
! |
3023 |
||
9627 | 3024 |
searchForClasses |
10010 | 3025 |
"answer all non-private classes that belong to this project. |
10005 | 3026 |
They are sorted in load order" |
3027 |
||
3028 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
|
9627 | 3029 |
|
3030 |
" |
|
10010 | 3031 |
stx_libbasic3 searchForClasses |
9627 | 3032 |
" |
3033 |
||
3034 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3035 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 3036 |
! |
3037 |
||
9627 | 3038 |
searchForClassesWithProject: aProjectID |
3039 |
||
3040 |
^ Smalltalk allClasses |
|
9829 | 3041 |
select:[:cls | (cls package = aProjectID) ]. |
9627 | 3042 |
|
3043 |
" |
|
3044 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
3045 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
3046 |
self searchForClassesWithProject: #'bosch:dapasx/kernel' |
|
3047 |
" |
|
3048 |
||
3049 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3050 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3051 |
"Modified: / 16-08-2006 / 18:50:48 / User" |
|
9536 | 3052 |
! |
3053 |
||
9627 | 3054 |
searchForExtensions |
3055 |
^ self searchForExtensionsWithProject:self package |
|
3056 |
||
3057 |
" |
|
3058 |
self searchForExtensions |
|
3059 |
DapasXProject searchForExtensions |
|
3060 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3061 |
stx_libtool searchForExtensions |
9627 | 3062 |
" |
3063 |
||
3064 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
3065 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3066 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 3067 |
! |
3068 |
||
9627 | 3069 |
searchForExtensionsWithProject:aProjectID |
3070 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3071 |
Return the extension-methods sorted by classname-selector" |
9627 | 3072 |
|
3073 |
|methods| |
|
3074 |
||
9904 | 3075 |
methods := OrderedCollection new. |
9627 | 3076 |
Smalltalk allClassesDo:[:eachClass | |
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3077 |
methods addAll:(eachClass extensionsFrom:aProjectID). |
9627 | 3078 |
]. |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3079 |
methods |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3080 |
sort:[:m1 :m2 | |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3081 |
|c1 c2| |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3082 |
|
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3083 |
c1 := m1 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3084 |
c2 := m2 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3085 |
c1 == c2 ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3086 |
m1 selector < m2 selector |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3087 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3088 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3089 |
true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3090 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3091 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3092 |
false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3093 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3094 |
c1 name < c2 name |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3095 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3096 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3097 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3098 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3099 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3100 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3101 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3102 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3103 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3104 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3105 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3106 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3107 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3108 |
]. |
9627 | 3109 |
^ methods |
3110 |
||
3111 |
" |
|
3112 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
3113 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3114 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 3115 |
" |
3116 |
||
3117 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3118 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 3119 |
! |
3120 |
||
9983 | 3121 |
searchForPreRequisites |
10132 | 3122 |
"answer a Dictionary where the keys are the prerequisite package for this package |
3123 |
and the values are a Set of reasons, why each package is required" |
|
3124 |
||
3125 |
|requiredClasses requiredPackageReasons usedClassesWithReasons ignoredPackages| |
|
3126 |
||
3127 |
usedClassesWithReasons := Dictionary new. |
|
3128 |
||
3129 |
"my classes are required" |
|
3130 |
requiredClasses := (self searchForClassesWithProject:self package) asSet. |
|
3131 |
||
3132 |
"my subproject's classes are required" |
|
3133 |
self subProjects do:[:eachProjectName | |
|
3134 |
requiredClasses addAll: (self searchForClassesWithProject:eachProjectName asSymbol) |
|
9983 | 3135 |
]. |
3136 |
||
10132 | 3137 |
"all superclasses of my classes and my subProject's classes are required" |
3138 |
requiredClasses do:[:cls | |
|
3139 |
cls allSuperclassesDo:[:eachSuperclass | |
|
3140 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[Set new]) |
|
3141 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
|
9983 | 3142 |
] |
3143 |
]. |
|
10132 | 3144 |
|
3145 |
"all classes referenced by my classes or my subproject's classes |
|
3146 |
are required. But: |
|
3147 |
only search for locals refered to by my methods (assuming that superclasses' |
|
3148 |
prerequisites are specified in their package)." |
|
3149 |
||
3150 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:usedClassesWithReasons. |
|
3151 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:usedClassesWithReasons. |
|
3152 |
||
3153 |
"don't put classes from subProjects into the required list" |
|
3154 |
ignoredPackages := (self siblingsAreSubProjects |
|
3155 |
ifTrue:[ self searchForSiblingProjects ] |
|
3156 |
ifFalse:[ self searchForSubProjects ]) asSet. |
|
3157 |
||
3158 |
ignoredPackages add:self package. |
|
3159 |
ignoredPackages add:Project noProjectID. |
|
3160 |
||
3161 |
"now map classes to packages and collect the reasons" |
|
3162 |
requiredPackageReasons := Dictionary new. |
|
3163 |
usedClassesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass | |usedClassPackage| |
|
3164 |
usedClassPackage := usedClass package. |
|
3165 |
(ignoredPackages includes:usedClassPackage) ifFalse:[ |
|
3166 |
(requiredPackageReasons at:usedClassPackage ifAbsentPut:[Set new]) |
|
3167 |
addAll:reasonsPerClass. |
|
9983 | 3168 |
]. |
10063 | 3169 |
]. |
9983 | 3170 |
|
10132 | 3171 |
^ requiredPackageReasons |
9983 | 3172 |
|
3173 |
" |
|
3174 |
self searchForPreRequisites |
|
10132 | 3175 |
stx_libbasic3 searchForPreRequisites |
9983 | 3176 |
bosch_dapasx_Application searchForPreRequisites |
3177 |
" |
|
3178 |
||
3179 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3180 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10132 | 3181 |
"Modified: / 20-09-2006 / 17:29:59 / cg" |
9983 | 3182 |
! |
3183 |
||
9627 | 3184 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3185 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3186 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3187 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3188 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3189 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3190 |
addPackage := |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3191 |
[:package | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3192 |
(package ~= myPackageID) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3193 |
true "(package startsWith:'stx:') not" ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3194 |
package ~= Project noProjectID ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3195 |
requiredPackages add:package. |
9627 | 3196 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3197 |
] |
9627 | 3198 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3199 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3200 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3201 |
self compiled_classesDo:[:cls | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3202 |
cls allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3203 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3204 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3205 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3206 |
cls privateClassesDo:[:eachPrivateClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3207 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3208 |
eachSuperClass isPrivate ifFalse:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3209 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3210 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3211 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3212 |
]. |
9956 | 3213 |
|
3214 |
cls sharedPools do:[:eachPoolName | |
|
3215 |
|eachPoolClass| |
|
3216 |
||
3217 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
|
3218 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
|
3219 |
addPackage value:(eachPoolSuperClass package) |
|
3220 |
] |
|
3221 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3222 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3223 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3224 |
self extensionMethodNames pairWiseDo:[:className :selector | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3225 |
|cls| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3226 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3227 |
addPackage value:(cls package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3228 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3229 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3230 |
^ requiredPackages |
9627 | 3231 |
|
9880 | 3232 |
" |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3233 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
9880 | 3234 |
" |
9627 | 3235 |
|
3236 |
"Created: / 09-08-2006 / 16:26:37 / fm" |
|
9956 | 3237 |
"Modified: / 19-09-2006 / 20:57:54 / cg" |
9664 | 3238 |
! |
3239 |
||
9667 | 3240 |
searchForSiblingProjects |
10132 | 3241 |
"answer all the packages (package names) having the my parent package" |
3242 |
||
9667 | 3243 |
|myPackage myParentPackage| |
3244 |
||
3245 |
myPackage := self package asPackageId. |
|
3246 |
myParentPackage := myPackage parentPackage. |
|
3247 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
3248 |
||
3249 |
^ Smalltalk allProjectIDs |
|
3250 |
select:[:projectID | |
|
3251 |
|thisPackage| |
|
3252 |
thisPackage := projectID asPackageId. |
|
3253 |
(thisPackage parentPackage = myParentPackage) |
|
3254 |
and:[ thisPackage ~= myPackage ]. |
|
3255 |
] |
|
3256 |
||
3257 |
" |
|
3258 |
self searchForSiblingProjects |
|
3259 |
bosch_dapasx_Application searchForSiblingProjects |
|
3260 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
3261 |
" |
|
3262 |
||
3263 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3264 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
3265 |
! |
|
3266 |
||
9664 | 3267 |
searchForSubProjects |
10132 | 3268 |
"answer all packages (package names), that are my subProjects" |
3269 |
||
9664 | 3270 |
|myPackage| |
3271 |
||
3272 |
myPackage := self package. |
|
3273 |
^ Smalltalk allProjectIDs select:[:projectID | |
|
3274 |
(projectID asPackageId parentPackage) = myPackage]. |
|
3275 |
||
3276 |
" |
|
3277 |
self searchForSubProjects |
|
3278 |
bosch_dapasx_Application searchForSubProjects |
|
3279 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
3280 |
" |
|
3281 |
||
3282 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3283 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3284 |
"Modified: / 23-08-2006 / 15:11:50 / cg" |
|
3285 |
! |
|
3286 |
||
3287 |
setupForType:typeOrNil |
|
9714 | 3288 |
typeOrNil = GUIApplicationType ifTrue:[ |
9664 | 3289 |
self compile:'isGUIApplication\ ^ true' withCRs |
3290 |
categorized:'description'. |
|
3291 |
^ self |
|
3292 |
]. |
|
9714 | 3293 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
9664 | 3294 |
self compile:'isGUIApplication\ ^ false' withCRs |
3295 |
categorized:'description'. |
|
3296 |
^ self |
|
3297 |
]. |
|
3298 |
^ self. |
|
3299 |
||
3300 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
9536 | 3301 |
! ! |
3302 |
||
9585 | 3303 |
!ProjectDefinition class methodsFor:'queries'! |
3304 |
||
9627 | 3305 |
definitionClassForPackage: aPackageID |
3306 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
3307 |
||
3308 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
9585 | 3309 |
! |
3310 |
||
9664 | 3311 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
3312 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
3313 |
||
3314 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
3315 |
! |
|
3316 |
||
3317 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
9627 | 3318 |
|packageDefinitionClassName class| |
3319 |
||
3320 |
packageDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageID. |
|
3321 |
class := Smalltalk classNamed:packageDefinitionClassName. |
|
3322 |
class isNil ifTrue:[ |
|
3323 |
doCreateIfAbsent ifTrue:[ |
|
3324 |
class := self newForPackage:aPackageID. |
|
9664 | 3325 |
"setup before prerequisites are defined" |
3326 |
class setupForType:typeOrNil. |
|
9627 | 3327 |
]. |
9664 | 3328 |
] ifFalse:[ |
3329 |
typeOrNil notNil ifTrue:[ |
|
3330 |
class setupForType:typeOrNil. |
|
3331 |
]. |
|
9627 | 3332 |
]. |
3333 |
^ class |
|
3334 |
||
9664 | 3335 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
3336 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
9585 | 3337 |
! |
3338 |
||
9664 | 3339 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
3340 |
^ (self definitionClassForType:typeOrNil) |
|
3341 |
definitionClassForPackage:newProjectID |
|
3342 |
createIfAbsent:createIfAbsent |
|
3343 |
projectType:typeOrNil |
|
9627 | 3344 |
|
9664 | 3345 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
9627 | 3346 |
! |
3347 |
||
3348 |
definitionClassForType: type |
|
9714 | 3349 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
3350 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
3351 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
|
9627 | 3352 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. |
3353 |
self error. |
|
3354 |
||
3355 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
9664 | 3356 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
9585 | 3357 |
! |
3358 |
||
9627 | 3359 |
hasAllClassesLoaded |
3360 |
|checkLoaded| |
|
3361 |
||
10005 | 3362 |
checkLoaded := [:eachClassName | |
9627 | 3363 |
|cls| |
3364 |
||
10005 | 3365 |
cls := Smalltalk loadedClassNamed:eachClassName. |
10140 | 3366 |
(cls isNil "or:[cls isLoaded not]") ifTrue:[ |
3367 |
Transcript showCR:(self name,' missing class: "',eachClassName,'".'). |
|
3368 |
^ false |
|
3369 |
]. |
|
9627 | 3370 |
]. |
10005 | 3371 |
|
10140 | 3372 |
(self classNamesForWhich:[:nm :attr | (attr includes:#autoload) |
3373 |
or:[attr isEmptyOrNil] ]) do:checkLoaded. |
|
10005 | 3374 |
(self compiled_classNamesForPlatform:OperatingSystem platformName) do:checkLoaded. |
9627 | 3375 |
|
3376 |
^ true. |
|
3377 |
||
3378 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 3379 |
"Modified: / 25-10-2006 / 00:04:06 / cg" |
9585 | 3380 |
! |
3381 |
||
9627 | 3382 |
hasAllExtensionsLoaded |
3383 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
3384 |
|cls| |
|
9585 | 3385 |
|
10140 | 3386 |
cls := Smalltalk classNamed:className. |
3387 |
(cls isNil "or:[cls isLoaded not]") ifTrue:[ |
|
3388 |
Transcript showCR:(self name,' missing extension class "',className,'".'). |
|
3389 |
^ false |
|
3390 |
]. |
|
3391 |
cls autoload. |
|
3392 |
(cls compiledMethodAt:selector) isNil ifTrue:[ |
|
3393 |
Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
|
3394 |
^ false |
|
3395 |
]. |
|
9627 | 3396 |
]. |
3397 |
^ true. |
|
3398 |
||
3399 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 3400 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 3401 |
! |
3402 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
3403 |
hasExtensionMethods |
9850 | 3404 |
^ self extensionMethodNames notEmpty |
3405 |
||
3406 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 3407 |
! |
3408 |
||
10140 | 3409 |
isFullyLoaded |
3410 |
^ self hasAllClassesLoaded and:[self hasAllExtensionsLoaded ] |
|
3411 |
||
3412 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
3413 |
! |
|
3414 |
||
10005 | 3415 |
packageDirectory |
3416 |
^ Smalltalk getPackageDirectoryForPackage:self package. |
|
3417 |
||
3418 |
" |
|
3419 |
self packageDirectory |
|
3420 |
stx_libbasic3 packageDirectory |
|
3421 |
" |
|
9585 | 3422 |
! ! |
3423 |
||
9726 | 3424 |
!ProjectDefinition class methodsFor:'sanity checks'! |
3425 |
||
3426 |
validateDescription |
|
9956 | 3427 |
|emptyProjects nonProjects emptyOrNonProjects| |
3428 |
||
3429 |
emptyProjects := Set withAll:self subProjects. |
|
3430 |
Smalltalk allClassesDo:[:cls | |
|
3431 |
emptyProjects remove:(cls package) ifAbsent:[]. |
|
3432 |
]. |
|
3433 |
nonProjects := self subProjects select:[:p | |
|
3434 |
(ProjectDefinition definitionClassForPackage: p) isNil |
|
3435 |
]. |
|
3436 |
||
3437 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
3438 |
emptyOrNonProjects addAll:nonProjects. |
|
3439 |
||
3440 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
3441 |
(Dialog |
|
3442 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
|
3443 |
, ((emptyOrNonProjects |
|
3444 |
asSortedCollection |
|
3445 |
collect:[:p | p allBold]) |
|
3446 |
asStringWith:'\ ') |
|
3447 |
, '\\Continue ?') withCRs |
|
3448 |
yesLabel:'OK' noLabel:'Cancel') |
|
3449 |
ifFalse:[ |
|
3450 |
AbortSignal raise |
|
3451 |
]. |
|
3452 |
]. |
|
3453 |
||
3454 |
"Modified: / 19-09-2006 / 20:30:39 / cg" |
|
9726 | 3455 |
! ! |
3456 |
||
9585 | 3457 |
!ProjectDefinition class methodsFor:'testing'! |
3458 |
||
9664 | 3459 |
isApplicationDefinition |
3460 |
^ false |
|
3461 |
||
3462 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 3463 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
3464 |
! |
|
3465 |
||
3466 |
isGUIApplication |
|
3467 |
^ false |
|
3468 |
||
3469 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 3470 |
! |
3471 |
||
3472 |
isLibraryDefinition |
|
3473 |
^ false |
|
3474 |
||
3475 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 3476 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 3477 |
! |
3478 |
||
9627 | 3479 |
isProjectDefinition |
9664 | 3480 |
"concrete i.e. not abstract" |
3481 |
||
9627 | 3482 |
^ self ~~ ProjectDefinition |
3483 |
||
3484 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
9664 | 3485 |
"Modified: / 23-08-2006 / 14:24:38 / cg" |
9585 | 3486 |
! ! |
3487 |
||
9569 | 3488 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 3489 |
|
3490 |
version |
|
10140 | 3491 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.111 2006-10-24 22:04:24 cg Exp $' |
9536 | 3492 |
! ! |
9714 | 3493 |
|
3494 |
ProjectDefinition initialize! |