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