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