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