author | fm |
Wed, 16 Aug 2006 12:58:51 +0200 | |
changeset 9533 | fae577b43add |
parent 9530 | a60552823186 |
child 9534 | b326ffacb811 |
permissions | -rw-r--r-- |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
3 |
All Rights Reserved |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
4 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
5 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
10 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
11 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
12 |
|
9493 | 13 |
"{ Package: 'stx:libbasic3' }" |
14 |
||
15 |
Object subclass:#ProjectDefinition |
|
9533 | 16 |
instanceVariableNames:'' |
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-Support-Projects' |
|
9493 | 20 |
! |
21 |
||
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
22 |
!ProjectDefinition class methodsFor:'documentation'! |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
23 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
24 |
copyright |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
25 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
26 |
COPYRIGHT (c) 2006 by eXept Software AG |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
27 |
All Rights Reserved |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
28 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
29 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
30 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
31 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
32 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
33 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
34 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
35 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
36 |
! ! |
9493 | 37 |
|
38 |
!ProjectDefinition class methodsFor:'instance creation'! |
|
39 |
||
40 |
definitionClassForPackage:aPackageID |
|
9529 | 41 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
9493 | 42 |
|
9529 | 43 |
"Modified: / 11-08-2006 / 14:29:21 / cg" |
44 |
! |
|
45 |
||
46 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
47 |
|class| |
|
9493 | 48 |
|
9529 | 49 |
class := Smalltalk at:(aPackageID asString copy replaceAny:':/' with:$_) asSymbol. |
50 |
class isNil ifTrue:[ |
|
51 |
doCreateIfAbsent ifTrue:[ |
|
52 |
^ self newForPackage:aPackageID |
|
53 |
] |
|
54 |
]. |
|
55 |
^ class. |
|
9493 | 56 |
|
9529 | 57 |
"Created: / 11-08-2006 / 14:28:51 / cg" |
58 |
! |
|
59 |
||
60 |
newForPackage:packageID |
|
61 |
^ self |
|
62 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
|
63 |
package:packageID. |
|
64 |
||
65 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
9493 | 66 |
! |
67 |
||
68 |
newNamed:newName package:packageID |
|
69 |
|newClass| |
|
70 |
||
9529 | 71 |
"/ for now, we are strict. |
72 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9493 | 73 |
newClass := self |
74 |
subclass:(newName asSymbol) |
|
75 |
instanceVariableNames:'' |
|
76 |
classVariableNames:'' |
|
77 |
poolDictionaries:'' |
|
9529 | 78 |
category:(self defaultCategory). |
9493 | 79 |
|
80 |
newClass package:packageID asSymbol. |
|
81 |
^ newClass |
|
82 |
||
83 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
84 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9529 | 85 |
"Modified: / 11-08-2006 / 14:18:01 / cg" |
9493 | 86 |
! ! |
87 |
||
88 |
!ProjectDefinition class methodsFor:'accessing'! |
|
89 |
||
9529 | 90 |
defaultCategory |
91 |
^'* Projects *' |
|
92 |
||
93 |
"Created: / 11-08-2006 / 14:16:49 / cg" |
|
94 |
! |
|
95 |
||
9493 | 96 |
initialClassNameForDefinitionOf:aPackageId |
9513 | 97 |
|s| |
98 |
||
9530 | 99 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
9513 | 100 |
(s endsWith:$_) ifTrue:[ |
101 |
s := s copyWithoutLast:1 |
|
102 |
]. |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
103 |
^ s |
9493 | 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" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
112 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
9493 | 113 |
! |
114 |
||
115 |
libraryName |
|
9530 | 116 |
^ self libraryNameFor: self package |
117 |
||
118 |
" |
|
119 |
bosch_dapasx_datenbasis_Definition libraryName |
|
120 |
" |
|
121 |
||
122 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
123 |
! |
|
124 |
||
125 |
libraryNameFor: aProjectID |
|
126 |
^ aProjectID asString copy replaceAny:':/' with:$_ |
|
9493 | 127 |
|
128 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
129 |
bosch_dapasx_datenbasis libraryName |
9493 | 130 |
" |
131 |
||
132 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
133 |
"Modified: / 11-08-2006 / 14:02:06 / cg" |
9493 | 134 |
! |
135 |
||
136 |
module |
|
137 |
||
138 |
^self moduleOfClass: self |
|
139 |
||
140 |
" |
|
9530 | 141 |
bosch_dapasx_datenbasis_Definition module |
9493 | 142 |
DapasX_Datenbasis module |
143 |
" |
|
144 |
||
145 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
146 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
147 |
! |
|
148 |
||
149 |
moduleDirectory |
|
150 |
||
9530 | 151 |
^self moduleDirectoryFor: self package |
9493 | 152 |
|
153 |
" |
|
9530 | 154 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
155 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
9493 | 156 |
" |
157 |
||
158 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
159 |
! |
|
160 |
||
9530 | 161 |
moduleDirectoryFor: aProjectID |
162 |
||
163 |
^(aProjectID subStrings: $:) last |
|
164 |
||
165 |
" |
|
166 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
167 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
168 |
" |
|
169 |
||
170 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
171 |
! |
|
172 |
||
173 |
moduleFor: aProjectID |
|
174 |
||
175 |
^(aProjectID subStrings: $:) first |
|
176 |
||
177 |
" |
|
178 |
DapasXProject module |
|
179 |
DapasX_Datenbasis module |
|
180 |
" |
|
181 |
||
182 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
183 |
! |
|
184 |
||
9493 | 185 |
moduleOfClass: aClass |
186 |
||
9530 | 187 |
^self moduleFor: aClass package |
9493 | 188 |
|
189 |
" |
|
190 |
DapasXProject module |
|
191 |
DapasX_Datenbasis module |
|
192 |
" |
|
193 |
||
194 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
195 |
! |
|
196 |
||
9503 | 197 |
msdosPathToPackage:aPackageID |
198 |
"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" |
|
199 |
||
9533 | 200 |
^ self msdosPathToTop , '\..\' , (aPackageID asString copy replaceAny:':/' by:$\) |
9503 | 201 |
|
202 |
" |
|
9533 | 203 |
self msdosPathToPackage:'bosch:dapasx/kernel' |
9503 | 204 |
" |
205 |
||
206 |
"Created: / 09-08-2006 / 16:35:22 / fm" |
|
207 |
! |
|
208 |
||
9533 | 209 |
msdosPathToProjectFor: aProjectID |
210 |
||
211 |
^ aProjectID asString copy replaceAny:':/' with:$\ |
|
212 |
||
213 |
" |
|
214 |
self msdosPathToProjectFor: #'bosch:dapasx/datenbasis' |
|
215 |
" |
|
216 |
||
217 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
218 |
! |
|
219 |
||
9503 | 220 |
msdosPathToTop |
221 |
"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" |
|
222 |
||
223 |
||
9530 | 224 |
^self msdosPathToTopFor: self package |
225 |
||
226 |
" |
|
227 |
bosch_dapasx_datenbasis_Definition msdosPathToTop |
|
228 |
DapasX_Datenbasis pathToTop |
|
229 |
" |
|
230 |
||
231 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
232 |
! |
|
233 |
||
234 |
msdosPathToTopFor: aProjectID |
|
235 |
"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" |
|
236 |
||
237 |
||
238 |
^ (((1 to:(aProjectID asCollectionOfSubstringsSeparatedByAny:':/') size) |
|
9503 | 239 |
collect:[:n | '..\']) asStringWith:'') , 'stx' |
240 |
||
241 |
" |
|
9530 | 242 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
243 |
||
9503 | 244 |
" |
245 |
||
246 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
247 |
! |
|
248 |
||
9516 | 249 |
packageName |
250 |
||
9530 | 251 |
^self packageNameFor: self package |
252 |
||
253 |
||
254 |
" |
|
255 |
bosch_dapasx_hw_schnittstellen_Definition packageName |
|
256 |
bosch_dapasx_datenbasis_Definition packageName |
|
257 |
bosch_dapasx_parameter_system_Definition packageName |
|
258 |
" |
|
259 |
||
260 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
261 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
262 |
! |
|
263 |
||
264 |
packageNameFor: aProjectID |
|
265 |
||
266 |
^((aProjectID asString copy replaceAny:'/' with:$:) subStrings: $:) last |
|
9516 | 267 |
|
268 |
||
269 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
270 |
bosch_dapasx_hw_schnittstellen packageName |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
271 |
bosch_dapasx_datenbasis packageName |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
272 |
bosch_dapasx_parameter_system packageName |
9516 | 273 |
" |
274 |
||
275 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
276 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
277 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
9516 | 278 |
! |
279 |
||
9493 | 280 |
parentProject |
281 |
||
9530 | 282 |
^(self parentProjectFor: self package) |
283 |
||
284 |
" |
|
285 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
286 |
DapasX_Datenbasis parentProject |
|
287 |
" |
|
288 |
||
289 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
290 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
291 |
! |
|
292 |
||
293 |
parentProjectFor: aProjectID |
|
294 |
||
295 |
^(aProjectID subStrings: $/) first |
|
9493 | 296 |
|
297 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
298 |
bosch_dapasx_hw_schnittstellen parentProject |
9493 | 299 |
" |
300 |
||
301 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
302 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
303 |
"Modified: / 11-08-2006 / 14:02:56 / cg" |
9493 | 304 |
! |
305 |
||
9503 | 306 |
unixPathToPackage:aPackageID |
9493 | 307 |
"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" |
308 |
||
9503 | 309 |
^ self unixPathToTop , '/../' , (aPackageID asString copy replaceAll:$: by:$/) |
9493 | 310 |
|
311 |
" |
|
312 |
DapasX_Datenbasis pathToPackage:'bosch:dapasx/kernel' |
|
313 |
" |
|
314 |
||
315 |
"Created: / 09-08-2006 / 16:35:22 / fm" |
|
316 |
! |
|
317 |
||
9533 | 318 |
unixPathToProjectFor: aProjectID |
319 |
||
320 |
^ aProjectID asString copy replaceAny:':/' with:$/ |
|
321 |
||
322 |
" |
|
323 |
self unixPathToProjectFor: #'bosch:dapasx/datenbasis' |
|
324 |
" |
|
325 |
||
326 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
327 |
! |
|
328 |
||
9503 | 329 |
unixPathToTop |
9493 | 330 |
"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" |
331 |
||
9503 | 332 |
|
9493 | 333 |
^ (((1 to:(self package asCollectionOfSubstringsSeparatedByAny:':/') size) |
334 |
collect:[:n | '../']) asStringWith:'') , 'stx' |
|
335 |
||
336 |
" |
|
337 |
DapasXProject pathToTop |
|
338 |
DapasX_Datenbasis pathToTop |
|
339 |
" |
|
340 |
||
341 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
342 |
! ! |
|
343 |
||
344 |
!ProjectDefinition class methodsFor:'file generation'! |
|
345 |
||
9495 | 346 |
allClassNames |
347 |
^ (self compiled_classNames , self autoloaded_classNames , self excluded_classNames) |
|
348 |
! |
|
349 |
||
9501 | 350 |
generate_abbrev_dot_stc |
9495 | 351 |
^ String |
352 |
streamContents:[:s | |
|
353 |
self allClassNames do:[:eachClassName | |
|
9503 | 354 |
|cls fn| |
9495 | 355 |
|
356 |
cls := Smalltalk classNamed:eachClassName. |
|
357 |
cls autoload. |
|
358 |
s nextPutAll:eachClassName. |
|
359 |
s nextPutAll:' '. |
|
9503 | 360 |
fn := cls classFilename asFilename withoutSuffix baseName. |
361 |
(fn includes:Character space) ifTrue:[ |
|
362 |
s nextPutAll:fn storeString. |
|
363 |
] ifFalse:[ |
|
364 |
s nextPutAll:fn. |
|
365 |
]. |
|
9495 | 366 |
s nextPutAll:' '. |
367 |
s nextPutAll:cls package. |
|
368 |
s nextPutAll:' '. |
|
9502 | 369 |
s nextPutAll:cls category asString storeString. |
9495 | 370 |
s nextPutAll:' '. |
9500 | 371 |
s nextPutAll:(cls theMetaclass instVarNames size) printString. |
9495 | 372 |
s cr. |
373 |
] |
|
374 |
] |
|
375 |
||
376 |
" |
|
9501 | 377 |
DapasXProject generate_abbrev_dot_stc |
378 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
379 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
9495 | 380 |
" |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
381 |
|
9495 | 382 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
383 |
"Modified: / 11-08-2006 / 14:01:51 / cg" |
9495 | 384 |
! |
385 |
||
9493 | 386 |
generate_bc_dot_def |
387 |
||
388 |
^self replaceMappings: self bc_dot_def_mappings |
|
389 |
in: self bc_dot_def |
|
390 |
||
391 |
" |
|
392 |
DapasXProject generate_bc_dot_def |
|
393 |
DapasX_Datenbasis generate_bc_dot_def |
|
394 |
||
395 |
" |
|
396 |
||
397 |
"Modified: / 09-08-2006 / 11:30:42 / fm" |
|
398 |
! |
|
399 |
||
400 |
generate_libInit_dot_cc |
|
401 |
||
402 |
^self replaceMappings: self libInit_dot_cc_mappings |
|
403 |
in: self libInit_dot_cc |
|
404 |
||
405 |
" |
|
406 |
DapasXProject generate_libInit_dot_cc |
|
407 |
DapasX_Datenbasis generate_libInit_dot_cc |
|
408 |
||
409 |
" |
|
410 |
||
411 |
"Created: / 08-08-2006 / 12:47:16 / fm" |
|
412 |
"Modified: / 09-08-2006 / 11:30:52 / fm" |
|
413 |
! |
|
414 |
||
415 |
generate_make_dot_proto |
|
416 |
||
417 |
^self replaceMappings: self make_dot_proto_mappings |
|
418 |
in: self make_dot_proto |
|
419 |
||
420 |
" |
|
421 |
DapasXProject generate_make_dot_proto |
|
422 |
DapasX_Datenbasis generate_make_dot_proto |
|
423 |
||
424 |
" |
|
425 |
||
426 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
427 |
! |
|
428 |
||
429 |
generate_make_dot_spec |
|
430 |
||
431 |
^self replaceMappings: self make_dot_spec_mappings |
|
432 |
in: self make_dot_spec |
|
433 |
||
434 |
" |
|
435 |
DapasXProject generate_make_dot_spec |
|
436 |
DapasX_Datenbasis generate_make_dot_spec |
|
9530 | 437 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
9493 | 438 |
|
439 |
" |
|
440 |
||
441 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
442 |
! |
|
443 |
||
444 |
generate_nt_dot_def |
|
445 |
||
446 |
^self replaceMappings: self nt_dot_def_mappings |
|
447 |
in: self nt_dot_def |
|
448 |
||
449 |
" |
|
450 |
DapasXProject generate_nt_dot_def |
|
451 |
DapasX_Datenbasis generate_nt_dot_def |
|
452 |
||
453 |
" |
|
454 |
||
455 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
456 |
! |
|
457 |
||
458 |
generate_nt_dot_mak |
|
459 |
||
460 |
^self replaceMappings: self nt_dot_mak_mappings |
|
461 |
in: self nt_dot_mak |
|
462 |
||
463 |
" |
|
464 |
DapasXProject generate_nt_dot_mak |
|
465 |
DapasX_Datenbasis generate_nt_dot_mak |
|
466 |
||
467 |
" |
|
468 |
||
469 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
9516 | 470 |
! |
471 |
||
472 |
generate_packageName_dot_rc |
|
473 |
||
474 |
^self replaceMappings: self packageName_dot_rc_mappings |
|
475 |
in: self packageName_dot_rc |
|
476 |
||
477 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
478 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
479 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
9516 | 480 |
|
481 |
" |
|
482 |
||
483 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
484 |
"Modified: / 11-08-2006 / 14:01:56 / cg" |
9493 | 485 |
! ! |
486 |
||
487 |
!ProjectDefinition class methodsFor:'file templates'! |
|
488 |
||
489 |
bc_dot_def |
|
490 |
||
491 |
^ |
|
492 |
'LIBRARY %(LIBRARY_NAME) |
|
493 |
DESCRIPTION %(DESCRIPTION) |
|
494 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
495 |
SEGMENTS |
|
496 |
INITCODE PRELOAD DISCARDABLE |
|
497 |
EXPORTS |
|
9530 | 498 |
__%(C_LIBRARY_NAME)_Init @1 |
9504 | 499 |
' |
9493 | 500 |
|
501 |
"Created: / 08-08-2006 / 12:26:58 / fm" |
|
502 |
"Modified: / 08-08-2006 / 19:32:27 / fm" |
|
503 |
! |
|
504 |
||
505 |
classLine_libInit_dot_cc |
|
506 |
||
507 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
|
508 |
||
509 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
510 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
511 |
! |
|
512 |
||
513 |
extensionLine_libInit_dot_cc |
|
514 |
||
515 |
^'_%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);' |
|
516 |
||
517 |
"Created: / 08-08-2006 / 15:48:56 / fm" |
|
518 |
"Modified: / 08-08-2006 / 19:32:33 / fm" |
|
519 |
! |
|
520 |
||
521 |
libInit_dot_cc |
|
522 |
||
523 |
^ |
|
524 |
'/* |
|
525 |
* DO NOT EDIT |
|
526 |
* automagically generated from Make.proto (by make libInit.cc) |
|
527 |
*/ |
|
528 |
#define __INDIRECTVMINITCALLS__ |
|
529 |
#include <stc.h> |
|
530 |
#define INIT_TEXT_SECT /* as nothing */ |
|
531 |
#ifdef WIN32 |
|
532 |
# pragma codeseg INITCODE "INITCODE" |
|
533 |
#else /* not WIN32 */ |
|
534 |
# if defined(__GNUC__) && !!defined(NO_SECTION_ATTRIBUTES) |
|
535 |
# if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2 |
|
536 |
# undef INIT_TEXT_SECT |
|
537 |
# define INIT_TEXT_SECT __attribute__((section(".stxitext"))) |
|
538 |
# endif |
|
539 |
# endif /* not GNUC */ |
|
540 |
#endif /* not WIN32 */ |
|
541 |
#ifdef INIT_TEXT_SECT |
|
542 |
extern void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECT; |
|
543 |
#endif |
|
544 |
void _%(LIBRARY_NAME)_Init(pass, __pRT__, snd) |
|
545 |
OBJ snd; struct __vmData__ *__pRT__; { |
|
546 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)"); |
|
547 |
%(CLASSES) |
|
548 |
%(EXTENSION) |
|
549 |
__END_PACKAGE__(); |
|
550 |
}' |
|
551 |
||
552 |
"Created: / 08-08-2006 / 12:40:45 / fm" |
|
553 |
"Modified: / 08-08-2006 / 19:33:01 / fm" |
|
554 |
! |
|
555 |
||
556 |
make_dot_proto |
|
557 |
||
558 |
^ |
|
559 |
'# |
|
560 |
# Warning: once you modify this file, do not rerun |
|
561 |
# stmkmp again - otherwise, your changes are lost. |
|
562 |
# |
|
563 |
# The Makefile as generated by this Make.proto supports the following targets: |
|
564 |
# make - compile all st-files to a classLib |
|
565 |
# make install - install the classLib in /opt/smalltalk/... |
|
566 |
# make clean - clean all temp files |
|
567 |
# make clobber - clean all |
|
568 |
||
569 |
# |
|
570 |
# position (of this package) in directory hierarchy: |
|
571 |
# (must point to ST/X top directory, for tools and includes) |
|
572 |
TOP=%(TOP) |
|
573 |
||
574 |
||
575 |
# subdirectories where targets are to be made: |
|
576 |
SUBDIRS=%(SUBDIRECTORIES) |
|
577 |
||
578 |
||
579 |
# subdirectories where Makefiles are to be made: |
|
580 |
# (only define if different from SUBDIRS) |
|
581 |
# ALLSUBDIRS= |
|
582 |
||
583 |
||
584 |
# if your embedded C code requires any system includes, |
|
585 |
# add the path(es) here:, |
|
586 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
587 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
588 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
589 |
||
590 |
||
591 |
# if you need any additional defines for embedded C code, |
|
592 |
# add them here:, |
|
593 |
# ********** OPTIONAL: MODIFY the next lines *** |
|
594 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
595 |
LOCALDEFINES=%(LOCAL_DEFINES) |
|
596 |
||
597 |
||
598 |
# |
|
599 |
# The next 2 defines should be left as-is |
|
600 |
# for a class-library package, you can uncomment the following: |
|
601 |
# (it does not hurt much, if you leave it as is - but you may NOT |
|
602 |
# uncomment it if object files are to be loaded individually later). |
|
603 |
# INITCODESEPFLAG=$(SEPINITCODE) |
|
604 |
# |
|
605 |
# the following MAY ONLY be uncommented for classes/classLibs, |
|
606 |
# which are ALWAYS statically included in the executable. |
|
607 |
# (i.e. NEVER for those which are subject to dynamic loading). |
|
608 |
# COMMONSYMFLAG=$(COMMONSYMBOLS) |
|
609 |
# |
|
610 |
STCLOCALOPT=-I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
611 |
||
612 |
||
613 |
# ********** OPTIONAL: MODIFY the next line *** |
|
614 |
# additional C-libraries that should be pre-linked with the class-objects |
|
615 |
LD_OBJ_LIBS= |
|
616 |
||
617 |
||
618 |
# ********** OPTIONAL: MODIFY the next line *** |
|
619 |
# additional C targets or libraries should be added below |
|
620 |
LOCAL_EXTRA_TARGETS= |
|
621 |
||
622 |
all:: preMake classLibRule postMake |
|
623 |
||
624 |
||
625 |
# add more install actions here |
|
626 |
install:: |
|
627 |
||
628 |
# add more install actions for aux-files (resources) here |
|
629 |
installAux:: |
|
630 |
||
631 |
# add more preMake actions here |
|
632 |
preMake:: |
|
633 |
||
634 |
# add more postMake actions here |
|
635 |
postMake:: cleanjunk |
|
636 |
||
637 |
cleanjunk:: |
|
638 |
||
639 |
clean:: |
|
640 |
-rm -f *.o *.H |
|
641 |
||
642 |
clobber:: |
|
643 |
-rm -f *.so *.dll |
|
644 |
||
645 |
', |
|
646 |
" |
|
647 |
$(INSTALLBASE):: |
|
648 |
@test -d $@ || mkdir $@ |
|
649 |
||
650 |
$(INSTALLBASE)/packages:: $(INSTALLBASE) |
|
651 |
@test -d $@ || mkdir $@ |
|
652 |
||
653 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages |
|
654 |
@test -d $@ || mkdir $@ |
|
655 |
||
656 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE) |
|
657 |
@test -d $@ || mkdir $@ |
|
658 |
||
659 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx |
|
660 |
@test -d $@ || mkdir $@ |
|
661 |
||
662 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
663 |
@test -d $@ || mkdir $@ |
|
664 |
" |
|
665 |
' |
|
666 |
# if other things are to be compiled, |
|
667 |
# add target definitions here, |
|
668 |
# and list them in LOCAL_EXTRA_TARGETS above. |
|
669 |
# (care for make syntax - TABS are required in the actions) |
|
670 |
# foo: foo.o |
|
671 |
# $(CC) -o foo foo.o |
|
672 |
||
673 |
# ''make depend'' will add dependency info between |
|
674 |
# BEGIN...END below |
|
675 |
# |
|
676 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
677 |
# ENDMAKEDEPEND --- do not remove this line |
|
678 |
||
679 |
' |
|
680 |
||
681 |
"Created: / 08-08-2006 / 20:45:36 / fm" |
|
682 |
"Modified: / 09-08-2006 / 16:50:23 / fm" |
|
683 |
! |
|
684 |
||
685 |
make_dot_spec |
|
686 |
||
687 |
^ |
|
688 |
'# |
|
689 |
# This file contains specifications which are common to all platforms. |
|
690 |
# |
|
691 |
# Warning: once you modify this file, do not rerun |
|
692 |
# stmkmp again - otherwise, your changes are lost. |
|
693 |
# |
|
694 |
# This file contains definitions for Unix based platforms. |
|
695 |
# |
|
696 |
||
697 |
||
698 |
||
699 |
||
700 |
# module and directory-in-module; |
|
701 |
# these should correspond to the directory hierarchy |
|
702 |
# location (otherwise, ST/X will have a hard time to |
|
703 |
# find out the packages location from its packageID) |
|
704 |
MODULE=%(MODULE) |
|
705 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
706 |
||
707 |
||
708 |
# the name of your classLibrary: |
|
709 |
# ********** REQUIRED: CHECK the next line *** |
|
710 |
LIBNAME=%(LIBRARY_NAME) |
|
711 |
||
712 |
||
713 |
# the package is stored as an ID in classes and methods |
|
714 |
# to identify code belonging to this project. |
|
715 |
# It also specifies the position in the source repository |
|
716 |
# and directory tree, when packages are loaded by packageID. |
|
717 |
# ********** REQUIRED: CHECK the next line *** |
|
718 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
719 |
||
720 |
||
721 |
# Argument(s) to the stc compiler. |
|
722 |
# -H. : create header files locally |
|
723 |
# (if removed, they will be created as common |
|
724 |
# -Pxxx : defines the package |
|
725 |
# -Zxxx : a prefix for variables within the classLib |
|
726 |
# -Dxxx : defines passed to to CC for inline C-code |
|
727 |
# -Ixxx : include path passed to CC for inline C-code |
|
728 |
# +optspace : optimized for space |
|
729 |
# +optspace2 : optimized more for space |
|
730 |
# +optspace3 : optimized even more for space |
|
731 |
# +optinline : generate inline code for some ST constructs |
|
732 |
# +inlineNew : additionally inline new |
|
733 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
734 |
# |
|
735 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
736 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
737 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
738 |
STCLOCALOPTIMIZATIONS=+optspace3 |
|
739 |
||
740 |
||
741 |
# Argument(s) to the stc compiler. |
|
742 |
# -warn : no warnings |
|
743 |
# -warnNonStandard : no warnings about ST/X extensions |
|
744 |
# -warnEOLComments : no warnings about EOL comment extension |
|
745 |
# -warnPrivacy : no warnings about privateClass extension |
|
746 |
# |
|
747 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
748 |
# STCWARNINGS=-warn |
|
749 |
# STCWARNINGS=-warnNonStandard |
|
750 |
# STCWARNINGS=-warnEOLComments |
|
751 |
STCWARNINGS= |
|
752 |
||
753 |
OBJS= \ |
|
754 |
%(OBJECTS) |
|
755 |
' |
|
756 |
||
757 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
758 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
759 |
! |
|
760 |
||
761 |
nt_dot_def |
|
762 |
||
763 |
^ |
|
764 |
'LIBRARY %(LIBRARY_NAME) |
|
765 |
DESCRIPTION %(DESCRIPTION) |
|
766 |
VERSION %(VERSION_NUMBER) |
|
767 |
CODE EXECUTE READ |
|
768 |
DATA READ WRITE |
|
769 |
SECTIONS |
|
770 |
INITCODE READ EXECUTE |
|
771 |
INITDATA READ WRITE |
|
772 |
EXPORTS |
|
773 |
_%(LIBRARY_NAME)_Init @1 |
|
774 |
IMPORTS' |
|
775 |
||
776 |
"Modified: / 08-08-2006 / 19:33:14 / fm" |
|
777 |
! |
|
778 |
||
779 |
nt_dot_mak |
|
780 |
||
781 |
^ |
|
782 |
'# |
|
783 |
# This file contains make rules for the win32 platform (using borland-bcc). |
|
784 |
# |
|
785 |
# Warning: once you modify this file, do not rerun |
|
786 |
# stmkmp again - otherwise, your changes are lost. |
|
787 |
# |
|
788 |
TOP=%(TOP) |
|
789 |
||
790 |
!!INCLUDE $(TOP)\rules\stdHeader_nt |
|
791 |
||
792 |
!!INCLUDE Make.spec |
|
793 |
||
794 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
795 |
||
796 |
STCLOCALOPT=-I. $(LOCALINCLUDES) -H. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG) |
|
797 |
||
798 |
ALL:: $(LIBJPEG) $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll |
|
799 |
||
800 |
!!INCLUDE $(TOP)\rules\stdRules_nt |
|
801 |
||
802 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
803 |
# ENDMAKEDEPEND --- do not remove this line |
|
804 |
' |
|
805 |
||
806 |
"Created: / 09-08-2006 / 11:44:20 / fm" |
|
807 |
"Modified: / 09-08-2006 / 19:59:32 / fm" |
|
808 |
! |
|
809 |
||
810 |
objectLine_make_dot_spec |
|
811 |
||
812 |
^' %(CLASS).$(O) \' |
|
813 |
||
814 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
9516 | 815 |
! |
816 |
||
817 |
packageName_dot_rc |
|
818 |
||
819 |
^ |
|
820 |
'VS_VERSION_INFO VERSIONINFO |
|
821 |
FILEVERSION 0,1,1,1 |
|
822 |
PRODUCTVERSION 0,1,1,1 |
|
823 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
824 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
825 |
FILEOS VOS_NT_WINDOWS32 |
|
826 |
FILETYPE VFT_DLL |
|
827 |
FILESUBTYPE VS_USER_DEFINED |
|
828 |
||
829 |
BEGIN |
|
830 |
BLOCK "StringFileInfo" |
|
831 |
BEGIN |
|
832 |
BLOCK "040904E4" |
|
833 |
BEGIN |
|
834 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
835 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
836 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
837 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
838 |
VALUE "LegalCopyright", "%(LEGAL_COPYRIGHT)\0" |
|
839 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
|
840 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
841 |
END |
|
842 |
||
843 |
END |
|
844 |
||
845 |
BLOCK "VarFileInfo" |
|
846 |
BEGIN // Language | Translation |
|
847 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
848 |
END |
|
849 |
END |
|
850 |
' |
|
851 |
||
852 |
||
853 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
854 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
9493 | 855 |
! ! |
856 |
||
857 |
!ProjectDefinition class methodsFor:'mappings'! |
|
858 |
||
859 |
bc_dot_def_mappings |
|
9504 | 860 |
^ (Dictionary new) |
861 |
at:#'LIBRARY_NAME' put:[ self libraryName ]; |
|
9530 | 862 |
at:#'C_LIBRARY_NAME' put:[ self st2c:self libraryName ]; |
9504 | 863 |
at:#'DESCRIPTION' |
864 |
put:[ |
|
865 |
|d| |
|
9493 | 866 |
|
9504 | 867 |
d := self description. |
868 |
(d isEmptyOrNil ifTrue:[ 'test' ] ifFalse:[ d ]) storeString. |
|
869 |
]; |
|
870 |
yourself |
|
9493 | 871 |
|
872 |
"Created: / 09-08-2006 / 11:17:59 / fm" |
|
873 |
! |
|
874 |
||
875 |
classLine_libInit_dot_cc_mappings: aClassName |
|
876 |
||
877 |
^Dictionary new |
|
9530 | 878 |
at: #'CLASS' put: [self st2c:aClassName]; |
9493 | 879 |
yourself |
880 |
||
881 |
"Created: / 08-08-2006 / 14:04:00 / fm" |
|
882 |
"Modified: / 09-08-2006 / 18:27:07 / fm" |
|
883 |
! |
|
884 |
||
885 |
extensionLine_libInit_dot_cc_mappings |
|
886 |
||
887 |
^Dictionary new |
|
888 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
889 |
yourself |
|
890 |
||
891 |
"Created: / 09-08-2006 / 11:19:59 / fm" |
|
892 |
! |
|
893 |
||
894 |
libInit_dot_cc_mappings |
|
895 |
||
896 |
^Dictionary new |
|
9530 | 897 |
at: #'LIBRARY_NAME' put: [self st2c:self libraryName]; |
9493 | 898 |
at: #'PACKAGE' put: [self package]; |
899 |
at: #'CLASSES' put: [self generateClassLines_libInit_dot_cc]; |
|
900 |
at: #'EXTENSION' put: [self generateExtensionLine_libInit_dot_cc]; |
|
901 |
||
902 |
yourself |
|
903 |
||
904 |
"Created: / 09-08-2006 / 11:20:24 / fm" |
|
905 |
! |
|
906 |
||
907 |
make_dot_proto_mappings |
|
908 |
||
909 |
^Dictionary new |
|
9503 | 910 |
at: #'TOP' put: [self unixPathToTop]; |
9493 | 911 |
at: #'SUBDIRECTORIES' put: [self generateSubDirectories]; |
9503 | 912 |
at: #'LOCAL_INCLUDES' put: [self generateUnixLocalIncludes]; |
9493 | 913 |
at: #'LOCAL_DEFINES' put: ['']; |
914 |
yourself |
|
915 |
||
916 |
"Created: / 09-08-2006 / 11:20:45 / fm" |
|
917 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
|
918 |
! |
|
919 |
||
920 |
make_dot_spec_mappings |
|
921 |
||
922 |
^Dictionary new |
|
923 |
at: #'MODULE' put: [self module]; |
|
924 |
at: #'MODULE_DIRECTORY' put: [self moduleDirectory]; |
|
925 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
926 |
at: #'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
927 |
yourself |
|
928 |
||
929 |
"Created: / 09-08-2006 / 11:21:06 / fm" |
|
930 |
! |
|
931 |
||
932 |
nt_dot_def_mappings |
|
933 |
||
934 |
^Dictionary new |
|
935 |
at: #'LIBRARY_NAME' put: [self libraryName]; |
|
9504 | 936 |
at: #'DESCRIPTION' put: [self description storeString]; |
9493 | 937 |
at: #'VERSION_NUMBER' put: [self versionNumber]; |
938 |
yourself |
|
939 |
||
940 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
941 |
! |
|
942 |
||
943 |
nt_dot_mak_mappings |
|
944 |
||
945 |
^Dictionary new |
|
9503 | 946 |
at: #'TOP' put: [self msdosPathToTop]; |
947 |
at: #'LOCAL_INCLUDES' put: [self generateMsdosLocalIncludes]; |
|
9493 | 948 |
yourself |
949 |
||
950 |
"Created: / 09-08-2006 / 11:44:36 / fm" |
|
951 |
"Modified: / 09-08-2006 / 20:00:01 / fm" |
|
952 |
! |
|
953 |
||
954 |
objectLine_make_dot_spec_mappings: aClassName |
|
955 |
||
956 |
^Dictionary new |
|
9503 | 957 |
at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix baseName]; |
9493 | 958 |
yourself |
959 |
||
960 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
|
961 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
|
962 |
! |
|
963 |
||
9516 | 964 |
packageName_dot_rc_mappings |
965 |
||
966 |
^Dictionary new |
|
967 |
at: #'COMPANY_NAME' put: [self companyName]; |
|
968 |
at: #'FILE_DESCRIPTION' put: [self fileDescription]; |
|
969 |
at: #'FILE_VERSION' put: [self fileVersion]; |
|
970 |
at: #'INTERNAL_NAME' put: [self internalName]; |
|
971 |
at: #'LEGAL_COPYRIGHT' put: [self legalCopyright]; |
|
972 |
at: #'PRODUCT_NAME' put: [self productName]; |
|
973 |
at: #'PRODUCT_VERSION' put: [self productVersion]; |
|
974 |
yourself |
|
975 |
||
976 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
977 |
! |
|
978 |
||
9493 | 979 |
replaceMappings: mappings in: fileTemplate |
980 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
|
981 |
||
982 |
^ fileTemplate bindWithArguments:mappings. |
|
983 |
||
984 |
" |
|
985 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
|
986 |
" |
|
987 |
||
988 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
989 |
"Modified: / 08-08-2006 / 12:46:13 / fm" |
|
9530 | 990 |
! |
991 |
||
992 |
st2c:aString |
|
993 |
^ (aString asString |
|
994 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
|
995 |
replaceAny:':' with:$_ |
|
9493 | 996 |
! ! |
997 |
||
998 |
!ProjectDefinition class methodsFor:'mappings support'! |
|
999 |
||
1000 |
generateClassLines_libInit_dot_cc |
|
1001 |
||
9495 | 1002 |
^self compiled_classNames |
9493 | 1003 |
inject: '' |
1004 |
into:[:classLines :className | |
|
1005 |
|newClassLine mappings| |
|
1006 |
mappings := self classLine_libInit_dot_cc_mappings: className. |
|
1007 |
newClassLine := self replaceMappings: mappings |
|
1008 |
in: self classLine_libInit_dot_cc. |
|
1009 |
classLines concatenate: newClassLine |
|
1010 |
and: String lf |
|
1011 |
] |
|
1012 |
||
1013 |
" |
|
1014 |
DapasXProject generateClassLines_libInit_dot_cc |
|
9530 | 1015 |
bosch_dapasx_datenbasis_Definition generateClassLines_libInit_dot_cc |
9493 | 1016 |
|
1017 |
" |
|
1018 |
||
1019 |
"Created: / 09-08-2006 / 11:21:48 / fm" |
|
1020 |
! |
|
1021 |
||
1022 |
generateExtensionLine_libInit_dot_cc |
|
1023 |
|mappings| |
|
1024 |
^self extensionMethodNames isEmpty |
|
1025 |
ifTrue:[''] |
|
1026 |
ifFalse:[ mappings := self extensionLine_libInit_dot_cc_mappings. |
|
1027 |
self replaceMappings: mappings |
|
1028 |
in: self extensionLine_libInit_dot_cc.] |
|
1029 |
" |
|
1030 |
DapasXProject generateExtensionLine_libInit_dot_cc |
|
1031 |
DapasX_Datenbasis generateExtensionLine_libInit_dot_cc |
|
1032 |
||
1033 |
" |
|
1034 |
||
1035 |
"Created: / 09-08-2006 / 11:23:34 / fm" |
|
1036 |
! |
|
1037 |
||
9503 | 1038 |
generateMsdosLocalIncludes |
9493 | 1039 |
|
1040 |
^self searchForProjectsWhichProvideHeaderFiles |
|
1041 |
inject: '' |
|
1042 |
into:[:objectLines :includeProjectName | |
|
9503 | 1043 |
objectLines , ' -I',(self msdosPathToPackage: includeProjectName) |
9493 | 1044 |
] |
1045 |
||
1046 |
" |
|
1047 |
DapasXProject generateLocalIncludes |
|
1048 |
DapasX_Datenbasis generateLocalIncludes |
|
1049 |
||
1050 |
" |
|
1051 |
||
1052 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
1053 |
! |
|
1054 |
||
1055 |
generateObjects_make_dot_spec |
|
9504 | 1056 |
|pivateClassesOf classes| |
9493 | 1057 |
|
9504 | 1058 |
classes := self compiled_classes. |
1059 |
pivateClassesOf := IdentityDictionary new. |
|
1060 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
1061 |
||
1062 |
classes topologicalSort:[:a :b | |
|
1063 |
"/ a must come before b iff: |
|
1064 |
"/ b is a subclass of a |
|
1065 |
"/ b has a private class which is a subclass of a |
|
1066 |
||
1067 |
|mustComeBefore pivateClassesOfB| |
|
9533 | 1068 |
|
1069 |
mustComeBefore := false. |
|
1070 |
(a isSharedPool and:[(b sharedPools includes: a name)]) ifTrue:[ |
|
1071 |
mustComeBefore := true |
|
1072 |
]. |
|
1073 |
||
1074 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
9504 | 1075 |
pivateClassesOfB := pivateClassesOf at:b. |
1076 |
pivateClassesOfB do:[:eachClassInB | |
|
1077 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
1078 |
]. |
|
1079 |
mustComeBefore |
|
1080 |
]. |
|
1081 |
||
1082 |
^ String streamContents:[:s | |
|
1083 |
classes do:[:eachClass | |
|
1084 |
|mappings newObjectLine| |
|
1085 |
||
1086 |
mappings := self objectLine_make_dot_spec_mappings: eachClass name. |
|
1087 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
|
1088 |
s nextPutAll:newObjectLine. |
|
1089 |
s cr. |
|
1090 |
] |
|
9493 | 1091 |
] |
1092 |
" |
|
9533 | 1093 |
bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec |
9493 | 1094 |
DapasXProject generateObjects_make_dot_spec |
1095 |
DapasX_Datenbasis generateObjects_make_dot_spec |
|
1096 |
||
1097 |
" |
|
1098 |
||
1099 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
1100 |
! |
|
1101 |
||
1102 |
generatePrerequisiteProjectsPaths |
|
1103 |
||
1104 |
^self prerequisiteProjects |
|
1105 |
inject: '' |
|
1106 |
into:[:objectLines :subProjectName | |
|
1107 |
objectLines |
|
1108 |
concatenate: String lf |
|
1109 |
and: ' -I' |
|
1110 |
and: subProjectName |
|
1111 |
] |
|
1112 |
||
1113 |
" |
|
1114 |
DapasXProject generatePrerequisiteProjectsPaths |
|
1115 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths |
|
1116 |
||
1117 |
" |
|
1118 |
||
1119 |
"Created: / 09-08-2006 / 12:34:20 / fm" |
|
1120 |
! |
|
1121 |
||
1122 |
generateSubDirectories |
|
1123 |
||
1124 |
^self subProjects |
|
1125 |
inject: '' |
|
1126 |
into:[:objectLines :subProjectName | |
|
1127 |
objectLines |
|
1128 |
concatenate: ' ' |
|
1129 |
and: subProjectName |
|
1130 |
] |
|
1131 |
||
1132 |
" |
|
1133 |
DapasXProject generateSubDirectories |
|
1134 |
DapasX_Datenbasis generateSubDirectories |
|
1135 |
||
1136 |
" |
|
1137 |
||
1138 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
1139 |
! |
|
1140 |
||
9503 | 1141 |
generateUnixLocalIncludes |
1142 |
||
1143 |
^self searchForProjectsWhichProvideHeaderFiles |
|
1144 |
inject: '' |
|
1145 |
into:[:objectLines :includeProjectName | |
|
1146 |
objectLines , ' -I',(self unixPathToPackage: includeProjectName) |
|
1147 |
] |
|
1148 |
||
1149 |
" |
|
1150 |
DapasXProject generateLocalIncludes |
|
1151 |
DapasX_Datenbasis generateLocalIncludes |
|
1152 |
||
1153 |
" |
|
1154 |
||
1155 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
1156 |
! |
|
1157 |
||
9493 | 1158 |
prerequisiteProjectsOrdered |
1159 |
||
1160 |
^self prerequisiteProjects asSortedCollection:[:a :b | ] |
|
1161 |
||
1162 |
" |
|
1163 |
DapasXProject generatePrerequisiteProjectsPaths |
|
1164 |
DapasX_Datenbasis generatePrerequisiteProjectsPaths |
|
1165 |
||
1166 |
" |
|
1167 |
||
1168 |
"Created: / 09-08-2006 / 13:12:01 / fm" |
|
1169 |
! ! |
|
1170 |
||
1171 |
!ProjectDefinition class methodsFor:'project description'! |
|
1172 |
||
9495 | 1173 |
autoloaded_classNames |
1174 |
"classes listed here will NOT be compiled, but remain autoloaded. |
|
1175 |
to be excluded from the build process can be user-defined in my subclasses" |
|
9493 | 1176 |
|
1177 |
^#() |
|
1178 |
||
1179 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1180 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1181 |
! |
|
1182 |
||
9495 | 1183 |
classNames |
1184 |
"this is a stupid default, a correponding method with real names |
|
1185 |
is generated in my subclasses" |
|
1186 |
||
1187 |
^#() |
|
1188 |
||
1189 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1190 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1191 |
! |
|
1192 |
||
1193 |
compiled_classNames |
|
1194 |
"this is a stupid default, a correponding method with real names |
|
1195 |
is generated in my subclasses" |
|
1196 |
||
1197 |
^#() |
|
1198 |
||
1199 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1200 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1201 |
! |
|
1202 |
||
9504 | 1203 |
compiled_classes |
1204 |
^ self compiled_classNames collect:[:eachName| (Smalltalk at:eachName asSymbol)] |
|
1205 |
||
1206 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
1207 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
1208 |
! |
|
1209 |
||
9495 | 1210 |
compiled_classesDo:aBlock |
9504 | 1211 |
self compiled_classes do:aBlock. |
9493 | 1212 |
|
1213 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
1214 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
1215 |
! |
|
1216 |
||
1217 |
description |
|
1218 |
"Returns a description string which will appear in nt.def and in the files info inside it's properties " |
|
1219 |
||
1220 |
^'' |
|
1221 |
||
1222 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
1223 |
! |
|
1224 |
||
9495 | 1225 |
excluded_classNames |
1226 |
"this is a stupid default, a correponding method with real names |
|
1227 |
to be excluded from the build process can be user-defined in my subclasses" |
|
1228 |
||
1229 |
^#() |
|
1230 |
||
1231 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1232 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1233 |
! |
|
1234 |
||
9493 | 1235 |
extensionMethodNames |
1236 |
||
1237 |
^#() |
|
1238 |
||
1239 |
"Created: / 08-08-2006 / 11:07:08 / fm" |
|
1240 |
! |
|
1241 |
||
1242 |
postLoadAction |
|
1243 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1244 |
||
1245 |
^ self subclassResponsibility |
|
1246 |
||
1247 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1248 |
! |
|
1249 |
||
1250 |
preUnloadAction |
|
1251 |
"raise an error: must be redefined in concrete subclass(es)" |
|
1252 |
||
1253 |
^ self subclassResponsibility |
|
1254 |
||
1255 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1256 |
! |
|
1257 |
||
1258 |
prerequisiteProjects |
|
1259 |
||
1260 |
^#() |
|
1261 |
||
1262 |
"Created: / 08-08-2006 / 21:17:34 / fm" |
|
1263 |
! |
|
1264 |
||
1265 |
subProjects |
|
1266 |
||
1267 |
^#() |
|
1268 |
||
1269 |
"Created: / 08-08-2006 / 11:08:23 / fm" |
|
1270 |
! |
|
1271 |
||
1272 |
versionNumber |
|
1273 |
"Returns a version string which will appear in nt.def and in the files info inside it's properties " |
|
1274 |
||
1275 |
^'' |
|
1276 |
||
1277 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
1278 |
! ! |
|
1279 |
||
9516 | 1280 |
!ProjectDefinition class methodsFor:'project information'! |
1281 |
||
1282 |
companyName |
|
1283 |
^'eXept Software AG' |
|
1284 |
! |
|
1285 |
||
1286 |
fileDescription |
|
1287 |
^self productName,' ', self packageName |
|
1288 |
! |
|
1289 |
||
1290 |
fileVersion |
|
9517 | 1291 |
^self revision ? '0.1.1.1' |
9516 | 1292 |
! |
1293 |
||
1294 |
internalName |
|
1295 |
^self packageName |
|
1296 |
! |
|
1297 |
||
1298 |
legalCopyright |
|
1299 |
^'Copyright eXept Software AG 2006 (until payment)' |
|
1300 |
! |
|
1301 |
||
1302 |
productName |
|
1303 |
^'Product Name' |
|
1304 |
! |
|
1305 |
||
1306 |
productVersion |
|
1307 |
^'0.1.1.1' |
|
1308 |
! ! |
|
1309 |
||
9493 | 1310 |
!ProjectDefinition class methodsFor:'public update description'! |
1311 |
||
1312 |
compileDescriptionMethods |
|
9514 | 1313 |
self forEachMethodsCodeToCompileDo:[:code :category | |
1314 |
self theMetaclass |
|
1315 |
compile: code |
|
1316 |
classified: category. |
|
1317 |
]. |
|
9493 | 1318 |
|
1319 |
" |
|
1320 |
DapasXProject compileDescriptionMethods |
|
1321 |
DapasX_Datenbasis compileDescriptionMethods |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1322 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
9493 | 1323 |
" |
1324 |
||
1325 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1326 |
"Modified: / 11-08-2006 / 14:01:29 / cg" |
9517 | 1327 |
! |
1328 |
||
1329 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
|
1330 |
|fileNamesAndSelectors| |
|
1331 |
||
1332 |
fileNamesAndSelectors := #( |
|
1333 |
#('Make.proto' #'generate_make_dot_proto') |
|
1334 |
#('Make.spec' #'generate_make_dot_spec') |
|
1335 |
#('libInit.cc' #'generate_libInit_dot_cc') |
|
1336 |
#('bc.def' #'generate_bc_dot_def') |
|
1337 |
#('nt.mak' #'generate_nt_dot_mak') |
|
1338 |
#('nt.def' #'generate_nt_dot_def') |
|
1339 |
#('abbrev.stc' #'generate_abbrev_dot_stc') |
|
1340 |
) asOrderedCollection. |
|
1341 |
||
1342 |
fileNamesAndSelectors |
|
1343 |
add: (Array with: self packageName, '.rc' |
|
1344 |
with: #'generate_packageName_dot_rc'). |
|
1345 |
fileNamesAndSelectors pairsDo:aTwoArgBlock |
|
9493 | 1346 |
! ! |
1347 |
||
1348 |
!ProjectDefinition class methodsFor:'sanity checks'! |
|
1349 |
||
1350 |
searchForInconsistencies |
|
1351 |
self searchForNeverCompiledSuperclasses. |
|
1352 |
||
1353 |
" |
|
1354 |
self searchForInconsistencies |
|
1355 |
DapasX_Datenbasis searchForInconsistencies |
|
1356 |
" |
|
1357 |
||
1358 |
"Created: / 09-08-2006 / 16:30:46 / fm" |
|
1359 |
! |
|
1360 |
||
1361 |
searchForNeverCompiledSuperclasses |
|
9495 | 1362 |
self compiled_classesDo:[:includedClass | |
9493 | 1363 |
includedClass allSuperclassesDo:[:eachSuperClass | |
1364 |
eachSuperClass package == Project noProjectID ifTrue:[ |
|
1365 |
self inconsistency:'uncompiled superclass: ' , eachSuperClass name |
|
1366 |
]. |
|
1367 |
] |
|
1368 |
]. |
|
1369 |
||
1370 |
" |
|
1371 |
self searchForNeverCompiledSuperclasses |
|
1372 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
1373 |
" |
|
1374 |
||
1375 |
"Created: / 09-08-2006 / 16:31:54 / fm" |
|
1376 |
! ! |
|
1377 |
||
9514 | 1378 |
!ProjectDefinition class methodsFor:'testing'! |
1379 |
||
1380 |
isProjectDefinition |
|
1381 |
^ self ~~ ProjectDefinition |
|
1382 |
||
1383 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
1384 |
! ! |
|
1385 |
||
9493 | 1386 |
!ProjectDefinition class methodsFor:'update description'! |
1387 |
||
9495 | 1388 |
autoloadedClassNamesGeneratedCodeToCompile |
1389 |
|classNamesCode| |
|
1390 |
||
1391 |
classNamesCode := 'autoloaded_classNames', String lf, '"This method has been automatically generated"'. |
|
1392 |
classNamesCode := classNamesCode, String lf, self autoloadedClassNamesGeneratedString. |
|
1393 |
^classNamesCode |
|
1394 |
||
1395 |
" |
|
1396 |
DapasXProject autoloadedClassNamesGeneratedCodeToCompile |
|
1397 |
DapasX_Datenbasis autoloadedClassNamesGeneratedCodeToCompile |
|
1398 |
||
1399 |
" |
|
1400 |
||
1401 |
"Created: / 08-08-2006 / 15:07:06 / fm" |
|
1402 |
! |
|
1403 |
||
1404 |
autoloadedClassNamesGeneratedString |
|
1405 |
| | |
|
1406 |
||
1407 |
^ String streamContents:[:s | |
|
1408 |
s nextPutAll:'^#('. |
|
1409 |
self searchForClassesWithProject do:[:eachClass | |
|
9530 | 1410 |
(false "eachClass wasAutoloaded" or:[ eachClass isLoaded not ]) ifTrue:[ |
9495 | 1411 |
(self compiled_classNames includes:eachClass name) ifFalse:[ |
1412 |
(self excluded_classNames includes:eachClass name) ifFalse:[ |
|
1413 |
s cr; nextPutAll:eachClass name asString storeString |
|
1414 |
] |
|
1415 |
] |
|
1416 |
] |
|
1417 |
]. |
|
1418 |
s cr; nextPutAll:')' |
|
1419 |
]. |
|
1420 |
||
1421 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1422 |
bosch_dapasx_interactiver_editor autoloadedClassNamesGeneratedString |
9495 | 1423 |
" |
1424 |
||
1425 |
"Created: / 08-08-2006 / 15:00:17 / fm" |
|
1426 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1427 |
"Modified: / 11-08-2006 / 14:01:23 / cg" |
9495 | 1428 |
! |
1429 |
||
9493 | 1430 |
classNamesGeneratedCodeToCompile |
1431 |
|classNamesCode| |
|
1432 |
||
9495 | 1433 |
classNamesCode := 'compiled_classNames', String lf, '"This method has been automatically generated"'. |
9493 | 1434 |
classNamesCode := classNamesCode, String lf, self classNamesGeneratedString. |
1435 |
^classNamesCode |
|
1436 |
||
1437 |
" |
|
9495 | 1438 |
DapasXProject Datenbasis |
1439 |
DapasX_Datenbasis Datenbasis |
|
9493 | 1440 |
|
1441 |
" |
|
1442 |
||
1443 |
"Created: / 08-08-2006 / 15:07:06 / fm" |
|
1444 |
! |
|
1445 |
||
1446 |
classNamesGeneratedString |
|
9495 | 1447 |
| | |
9493 | 1448 |
|
9495 | 1449 |
^ String streamContents:[:s | |
1450 |
s nextPutAll:'^#('. |
|
1451 |
self searchForClassesWithProject do:[:eachClass | |
|
1452 |
(self autoloaded_classNames includes:eachClass name) ifFalse:[ |
|
1453 |
(self excluded_classNames includes:eachClass name) ifFalse:[ |
|
1454 |
s cr; nextPutAll:eachClass name asString storeString |
|
1455 |
] |
|
1456 |
] |
|
1457 |
]. |
|
1458 |
s cr; nextPutAll:')' |
|
1459 |
]. |
|
9493 | 1460 |
|
1461 |
" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1462 |
bosch_dapasx_interactiver_editor classNamesGeneratedString |
9493 | 1463 |
" |
1464 |
||
1465 |
"Created: / 08-08-2006 / 15:00:17 / fm" |
|
1466 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1467 |
"Modified: / 11-08-2006 / 14:01:26 / cg" |
9493 | 1468 |
! |
1469 |
||
1470 |
extensionMethodNamesGeneratedCodeToCompile |
|
1471 |
|extensionMethodNamesCode| |
|
1472 |
||
1473 |
extensionMethodNamesCode := 'extensionMethodNames', String lf, '"This method has been automatically generated"'. |
|
1474 |
extensionMethodNamesCode := extensionMethodNamesCode, String lf, self extensionMethodNamesGeneratedString. |
|
1475 |
^extensionMethodNamesCode |
|
1476 |
||
1477 |
" |
|
1478 |
DapasXProject extensionMethodNamesGeneratedCodeToCompile |
|
1479 |
DapasX_Datenbasis extensionMethodNamesGeneratedCodeToCompile |
|
1480 |
||
1481 |
" |
|
1482 |
||
1483 |
"Created: / 08-08-2006 / 18:54:42 / fm" |
|
1484 |
! |
|
1485 |
||
1486 |
extensionMethodNamesGeneratedString |
|
1487 |
|generatedString | |
|
1488 |
||
1489 |
generatedString := self searchForExtensionsWithProject |
|
1490 |
inject: '^#(' |
|
1491 |
into:[:string :each | |
|
1492 |
string, String lf, each mclass name asString storeString, ' #', each name ]. |
|
1493 |
^generatedString, String lf, ')' |
|
1494 |
||
1495 |
" |
|
1496 |
self extensionMethodNamesGeneratedString |
|
1497 |
" |
|
1498 |
||
1499 |
"Created: / 08-08-2006 / 18:55:04 / fm" |
|
1500 |
! |
|
1501 |
||
9514 | 1502 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
1503 |
aTwoArgBlock |
|
1504 |
value:self autoloadedClassNamesGeneratedCodeToCompile |
|
1505 |
value:'project description'. |
|
1506 |
||
1507 |
aTwoArgBlock |
|
1508 |
value: self classNamesGeneratedCodeToCompile |
|
1509 |
value: 'project description'. |
|
1510 |
||
1511 |
(self theMetaclass includesSelector:#excluded_classNames) ifFalse:[ |
|
1512 |
aTwoArgBlock |
|
1513 |
value: 'excluded_classNames\^ #()' withCRs |
|
1514 |
value: 'project description'. |
|
1515 |
]. |
|
1516 |
||
1517 |
aTwoArgBlock |
|
1518 |
value: self extensionMethodNamesGeneratedCodeToCompile |
|
1519 |
value: 'project description'. |
|
1520 |
||
1521 |
"/ aTwoArgBlock |
|
1522 |
"/ value: 'description ^''bla bla''' |
|
1523 |
"/ value: 'project description' |
|
1524 |
||
1525 |
"Created: / 10-08-2006 / 16:35:47 / cg" |
|
1526 |
! |
|
1527 |
||
9493 | 1528 |
inconsistency:message |
1529 |
Dialog warn:message |
|
1530 |
||
1531 |
" |
|
1532 |
self searchForNeverCompiledSuperclasses |
|
1533 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
1534 |
" |
|
1535 |
||
1536 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
1537 |
! |
|
1538 |
||
1539 |
searchForClassesNamesWithProject |
|
1540 |
||
1541 |
^self searchForClassesWithProject collect:[:each | each name]. |
|
1542 |
||
1543 |
" |
|
1544 |
self searchForClassesNamesWithProject |
|
1545 |
" |
|
1546 |
||
1547 |
"Created: / 07-08-2006 / 21:37:06 / fm" |
|
1548 |
! |
|
1549 |
||
1550 |
searchForClassesWithProject |
|
1551 |
||
9530 | 1552 |
^self searchForClassesWithProject: self package |
9493 | 1553 |
|
1554 |
" |
|
1555 |
self searchForClassesWithProject |
|
1556 |
" |
|
1557 |
||
1558 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
1559 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
1560 |
! |
|
1561 |
||
9530 | 1562 |
searchForClassesWithProject: aProjectID |
1563 |
||
1564 |
^ Smalltalk allClasses select:[:cls | cls package == aProjectID]. |
|
1565 |
||
1566 |
" |
|
1567 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
1568 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
1569 |
" |
|
1570 |
||
1571 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
1572 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
1573 |
! |
|
1574 |
||
9493 | 1575 |
searchForExtensionsForProject:aProjectID |
1576 |
|methods| |
|
1577 |
||
1578 |
methods := IdentitySet new. |
|
1579 |
Smalltalk allClassesDo:[:eachClass | |
|
1580 |
|classPackage| |
|
1581 |
||
1582 |
classPackage := eachClass package. |
|
1583 |
eachClass instAndClassMethodsDo:[:mthd | |
|
1584 |
mthd package ~= classPackage ifTrue:[ |
|
1585 |
mthd package == aProjectID ifTrue:[ |
|
1586 |
methods add:mthd |
|
1587 |
] |
|
1588 |
]. |
|
1589 |
]. |
|
1590 |
]. |
|
1591 |
^ methods |
|
1592 |
" |
|
1593 |
self searchForExtensionsForProject:#'bosch:dapasx' |
|
1594 |
" |
|
1595 |
||
1596 |
"Created: / 07-08-2006 / 22:03:55 / fm" |
|
1597 |
! |
|
1598 |
||
1599 |
searchForExtensionsWithProject |
|
1600 |
^ self searchForExtensionsForProject:self package |
|
1601 |
||
1602 |
" |
|
1603 |
self searchForExtensionsWithProject |
|
1604 |
DapasXProject searchForExtensionsWithProject |
|
1605 |
DapasX_Datenbasis searchForExtensionsWithProject |
|
1606 |
||
1607 |
" |
|
1608 |
||
1609 |
"Created: / 07-08-2006 / 21:03:10 / fm" |
|
1610 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
1611 |
! |
|
1612 |
||
1613 |
searchForProjectsWhichProvideHeaderFiles |
|
1614 |
|myPackageID requiredPackages| |
|
1615 |
||
1616 |
requiredPackages := Set new. |
|
1617 |
myPackageID := self package. |
|
1618 |
||
9495 | 1619 |
self compiled_classesDo:[:includedClass | |
9493 | 1620 |
includedClass allSuperclassesDo:[:eachSuperClass | |
1621 |
((eachSuperClass package ~= myPackageID) |
|
1622 |
and:[ (self moduleOfClass: eachSuperClass) ~= 'stx' ]) |
|
1623 |
ifTrue:[ |
|
1624 |
eachSuperClass package == Project noProjectID ifFalse:[ |
|
1625 |
requiredPackages add:(eachSuperClass package). |
|
1626 |
] |
|
1627 |
] |
|
1628 |
] |
|
1629 |
]. |
|
1630 |
^ requiredPackages |
|
1631 |
||
1632 |
" |
|
1633 |
self searchForProjectsWhichProvideHeaderFiles |
|
1634 |
DapasX_Datenbasis searchForProjectsWhichProvideHeaderFiles |
|
1635 |
" |
|
1636 |
||
1637 |
"Created: / 09-08-2006 / 16:26:37 / fm" |
|
1638 |
! ! |
|
1639 |
||
1640 |
!ProjectDefinition class methodsFor:'xxx'! |
|
1641 |
||
1642 |
try |
|
1643 |
^ 'hhh' , '989898' |
|
1644 |
||
1645 |
"Created: / 09-08-2006 / 16:50:52 / fm" |
|
1646 |
! |
|
1647 |
||
1648 |
try2 |
|
1649 |
^ 1 + 2 |
|
1650 |
||
1651 |
"Created: / 09-08-2006 / 16:53:16 / fm" |
|
1652 |
! ! |
|
1653 |
||
1654 |
!ProjectDefinition class methodsFor:'documentation'! |
|
1655 |
||
1656 |
version |
|
9533 | 1657 |
^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.15 2006-08-16 10:58:51 fm Exp $' |
9493 | 1658 |
! ! |