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