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