author | Claus Gittinger <cg@exept.de> |
Tue, 04 Jun 2013 12:47:24 +0200 | |
changeset 15366 | 5b5b28b61455 |
parent 15343 | d46cfae69fd4 |
child 15367 | 62084d5299ff |
permissions | -rw-r--r-- |
9553 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3 |
All Rights Reserved |
9553 | 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 |
15024 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType |
|
17 |
PackagesBeingLoaded Verbose AbbrevDictionary AccessLock' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-Support-Projects' |
|
9536 | 20 |
! |
21 |
||
14580 | 22 |
ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded' |
9607 | 23 |
|
24 |
" |
|
25 |
No other class instance variables are inherited by this class. |
|
26 |
" |
|
27 |
! |
|
28 |
||
13592 | 29 |
Object subclass:#AbbrevEntry |
15024 | 30 |
instanceVariableNames:'className fileName category numClassInstVars' |
31 |
classVariableNames:'' |
|
32 |
poolDictionaries:'' |
|
33 |
privateIn:ProjectDefinition |
|
13592 | 34 |
! |
35 |
||
9569 | 36 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 37 |
|
12210 | 38 |
buildingMakefiles |
39 |
" |
|
40 |
You can define additional rules and flag settings for use in the makeFile generation: |
|
41 |
||
42 |
redefinable build-file attributes: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
43 |
stcOptimizationOptions -> STCLOCALOPT |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
44 |
stcWarningOptions -> STCLOCALOPT |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
45 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
46 |
localIncludes_win32 -> LOCALINCLUDES (bc.mak) |
13419 | 47 |
|
48 |
for applications: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
49 |
startupClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
50 |
startupSelector |
13419 | 51 |
|
52 |
for libraries: |
|
12210 | 53 |
|
54 |
" |
|
55 |
! |
|
56 |
||
9553 | 57 |
copyright |
58 |
" |
|
59 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
60 |
All Rights Reserved |
9553 | 61 |
|
62 |
This software is furnished under a license and may be used |
|
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
" |
|
9714 | 69 |
! |
70 |
||
71 |
documentation |
|
72 |
" |
|
12210 | 73 |
As ST/X is (still) very tightly bound with stc, we keep the package and project information |
74 |
in a class-object (instead of some Project-object). This has the advantage, that it can be |
|
75 |
compiled and included in a compiled class library just like any other class. |
|
76 |
Every package includes an subclass of me (an instance of my meta), which provides useful |
|
77 |
information about the versioning and packaging. Me myself, I know how to generate dependency |
|
78 |
information and can generate makefiles and other build-support files for compilation. |
|
79 |
||
80 |
Some special notes about extension methods: |
|
81 |
if a package is loaded (Smalltalk loadPackage:'foo:bar/baz'), any already loaded package of which |
|
82 |
methods are overwritten by an extension of this package, the other package is asked to safe those |
|
83 |
methods in its safe(ForOverwrittenMethods). Thus, if the other package or any of its classes is asked |
|
84 |
to file itself out, it can do so using the safe (otherwise, you'D not be able to checkin a class while |
|
85 |
it has an overriding extension loaded). |
|
86 |
Also, the information about which other package was in charge when a method is overwritten is recorded in |
|
87 |
extensionOverwriteInfo. This is used to correctly reinstall an overwritten method, whenever a package is |
|
88 |
unloaded. |
|
9714 | 89 |
|
90 |
" |
|
9553 | 91 |
! ! |
9536 | 92 |
|
9569 | 93 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 94 |
|
12371 | 95 |
definitionClassForMonticelloPackage:aMonicelloPackagename |
96 |
^ self definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:false |
|
97 |
||
98 |
" |
|
99 |
self definitionClassForMonticelloPackage:'foobar' |
|
100 |
" |
|
101 |
! |
|
102 |
||
103 |
definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:createIfAbsent |
|
13419 | 104 |
^ self allSubclasses |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
105 |
detect:[:eachProjectDefinition | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
106 |
eachProjectDefinition monticelloPackageName = aMonicelloPackagename ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
107 |
ifNone:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
108 |
|dfn squeakPackageInfo| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
109 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
110 |
createIfAbsent ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
111 |
dfn := ApplicationDefinition |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
112 |
definitionClassForPackage:'mc:',aMonicelloPackagename createIfAbsent:true projectType:GUIApplicationType. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
113 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
114 |
"/ if the squeak-stuff is loaded, use it. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
115 |
PackageInfo notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
116 |
squeakPackageInfo := PackageInfo allSubclasses |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
117 |
detect:[:pi | pi new packageName = aMonicelloPackagename] ifNone:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
118 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
119 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
120 |
squeakPackageInfo notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
121 |
dfn classNames:(squeakPackageInfo new classes collect:[:each | each name]). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
122 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
123 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
124 |
nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
125 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
126 |
] |
12371 | 127 |
|
128 |
" |
|
129 |
self definitionClassForMonticelloPackage:'foobar' |
|
130 |
self definitionClassForMonticelloPackage:'foobar' createIfAbsent:true |
|
131 |
" |
|
13118
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
132 |
|
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
133 |
"Modified: / 30-10-2010 / 00:26:07 / cg" |
12371 | 134 |
! |
135 |
||
136 |
definitionClassForPackage:aPackageID |
|
137 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
138 |
||
139 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
140 |
! |
|
141 |
||
142 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
143 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
144 |
||
145 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
146 |
! |
|
147 |
||
148 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
149 |
|packageDefinitionClassName class| |
|
150 |
||
14812 | 151 |
packageDefinitionClassName := self initialClassNameForDefinitionOf:aPackageID. |
12371 | 152 |
class := Smalltalk classNamed:packageDefinitionClassName. |
153 |
class isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
154 |
doCreateIfAbsent ifTrue:[ |
15070 | 155 |
typeOrNil = GUIApplicationType ifTrue:[ |
156 |
class := ApplicationDefinition newForPackage:aPackageID. |
|
157 |
] ifFalse:[ |
|
158 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
|
159 |
class := ApplicationDefinition newForPackage:aPackageID. |
|
160 |
] ifFalse:[ |
|
161 |
class := LibraryDefinition newForPackage:aPackageID. |
|
162 |
] |
|
163 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
164 |
"setup before prerequisites are defined" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
165 |
class setupForType:typeOrNil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
166 |
"/ look what is there and include it; is this ok ? |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
167 |
class compileDescriptionMethods |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
168 |
]. |
12371 | 169 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
170 |
typeOrNil notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
171 |
class projectType == typeOrNil ifFalse: [ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
172 |
class setupForType:typeOrNil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
173 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
174 |
]. |
12371 | 175 |
]. |
176 |
^ class |
|
177 |
||
178 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
|
179 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
180 |
! |
|
181 |
||
182 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
|
183 |
^ (self definitionClassForType:typeOrNil) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
184 |
definitionClassForPackage:newProjectID |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
185 |
createIfAbsent:createIfAbsent |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
186 |
projectType:typeOrNil |
12371 | 187 |
|
188 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
|
189 |
! |
|
190 |
||
191 |
definitionClassForType: type |
|
192 |
"answer the class that describes a give project type" |
|
193 |
||
194 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
|
195 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
196 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
197 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. "/ temporary - for backward compat. |
|
198 |
self error:'unknown project type'. |
|
199 |
||
200 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
201 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
|
202 |
! |
|
203 |
||
9559 | 204 |
newForPackage:packageID |
13419 | 205 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
206 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
207 |
package:packageID. |
9559 | 208 |
|
209 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
210 |
! |
|
211 |
||
212 |
newNamed:newName package:packageID |
|
213 |
|newClass| |
|
214 |
||
215 |
"/ for now, we are strict. |
|
216 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9569 | 217 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 218 |
|
219 |
newClass := self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
220 |
subclass:(newName asSymbol) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
221 |
instanceVariableNames:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
222 |
classVariableNames:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
223 |
poolDictionaries:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
224 |
category:(self defaultCategory). |
9559 | 225 |
|
226 |
newClass package:packageID asSymbol. |
|
227 |
^ newClass |
|
228 |
||
229 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
230 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 231 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 232 |
! ! |
233 |
||
9569 | 234 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 235 |
|
12575 | 236 |
directory |
237 |
"for packageId compatibility" |
|
238 |
||
239 |
^ self moduleDirectory |
|
240 |
||
241 |
" |
|
242 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
243 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 244 |
stx_libbasic3 moduleDirectory |
245 |
cg_croquet moduleDirectory |
|
246 |
cg_croquet package asPackageId module |
|
247 |
cg_croquet moduleDirectory |
|
248 |
stx_goodies_xml_vw moduleDirectory |
|
12575 | 249 |
" |
250 |
||
251 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
252 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
|
253 |
! |
|
254 |
||
13823 | 255 |
extensionsRevisionInfoForManager:managerOrNil |
256 |
"return the revisionInfo object for my extensions for a particular source code manager. |
|
257 |
Return nil, if there is either no manager, or I have no extensions" |
|
258 |
||
259 |
|mgr versionMethod revString| |
|
260 |
||
261 |
(mgr := managerOrNil) isNil ifTrue:[ |
|
262 |
mgr := SourceCodeManagerUtilities default sourceCodeManagerFor:self. |
|
263 |
mgr isNil ifTrue:[ |
|
264 |
^ nil |
|
265 |
]. |
|
266 |
]. |
|
267 |
||
268 |
versionMethod := mgr nameOfVersionMethodForExtensions. |
|
269 |
(self class implements:versionMethod) ifFalse:[^ nil]. |
|
270 |
||
271 |
revString := self perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
|
272 |
revString isNil ifTrue:[ |
|
273 |
^ nil. |
|
274 |
]. |
|
275 |
^ mgr revisionInfoFromString:revString. |
|
276 |
||
277 |
" |
|
278 |
(stx_libcomp extensionsRevisionInfoForManager:nil) revision |
|
279 |
(stx_libbasic extensionsRevisionInfoForManager:nil) |
|
280 |
" |
|
281 |
||
282 |
"Created: / 25-11-2011 / 14:34:01 / cg" |
|
283 |
! |
|
284 |
||
9536 | 285 |
initialClassNameForDefinitionOf:aPackageId |
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
286 |
"given a package-ID, return an appropriate class name for this package" |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
287 |
|
9536 | 288 |
|s| |
289 |
||
290 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
|
291 |
(s endsWith:$_) ifTrue:[ |
|
15164
0d122c4ad04a
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
15126
diff
changeset
|
292 |
s := s copyButLast:1 |
9536 | 293 |
]. |
294 |
^ s |
|
295 |
||
12186 | 296 |
" |
13419 | 297 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
298 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic' |
|
299 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
12186 | 300 |
" |
9536 | 301 |
|
302 |
"Created: / 09-08-2006 / 17:44:47 / fm" |
|
303 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
|
304 |
! |
|
305 |
||
306 |
libraryName |
|
9575 | 307 |
^ self package asPackageId libraryName |
9536 | 308 |
|
9559 | 309 |
" |
9688 | 310 |
bosch_dapasx_datenbasis libraryName |
9575 | 311 |
stx_libbasic3 libraryName |
9559 | 312 |
" |
9536 | 313 |
|
314 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 315 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 316 |
! |
317 |
||
13419 | 318 |
libraryNameFor:aProjectID |
9575 | 319 |
^ aProjectID asPackageId libraryName |
9536 | 320 |
|
9559 | 321 |
" |
9575 | 322 |
bosch_dapasx_datenbasis libraryName |
323 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
13419 | 324 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 325 |
" |
9536 | 326 |
|
327 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 328 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 329 |
! |
330 |
||
14577 | 331 |
loadDirectory |
332 |
"if I was loaded from a directory (as oposed to loaded via a dll or from a scm), |
|
333 |
return that directory. Otherwise return nil." |
|
334 |
||
14583 | 335 |
^ self getAttribute:#projectDirectory |
14577 | 336 |
! |
337 |
||
338 |
loadDirectory:aDirectory |
|
339 |
"remember the directory from which I was loaded from" |
|
340 |
||
14583 | 341 |
self setAttribute:#projectDirectory to:aDirectory |
14577 | 342 |
! |
343 |
||
9536 | 344 |
module |
9559 | 345 |
^ self moduleOfClass:self |
9536 | 346 |
|
9559 | 347 |
" |
348 |
bosch_dapasx_datenbasis_Definition module |
|
349 |
DapasX_Datenbasis module |
|
13419 | 350 |
stx_libbasic3 module |
351 |
stx_libbasic3 directory |
|
9559 | 352 |
" |
9536 | 353 |
|
354 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
355 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 356 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 357 |
! |
358 |
||
359 |
moduleDirectory |
|
9575 | 360 |
^ (PackageId from:self package) directory |
9536 | 361 |
|
9559 | 362 |
" |
9575 | 363 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
364 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 365 |
stx_libbasic3 moduleDirectory |
366 |
cg_croquet moduleDirectory |
|
367 |
cg_croquet package asPackageId module |
|
368 |
cg_croquet moduleDirectory |
|
369 |
stx_goodies_xml_vw moduleDirectory |
|
14339 | 370 |
cg_demos_demo1 moduleDirectory |
9559 | 371 |
" |
9536 | 372 |
|
373 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
14339 | 374 |
"Modified (comment): / 05-09-2012 / 10:07:18 / cg" |
9536 | 375 |
! |
376 |
||
13419 | 377 |
moduleDirectoryFor:aProjectID |
9559 | 378 |
^ (aProjectID subStrings:$:) last |
9536 | 379 |
|
9559 | 380 |
" |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
381 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
382 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
9559 | 383 |
" |
9536 | 384 |
|
385 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 386 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 387 |
! |
388 |
||
9891 | 389 |
moduleDirectory_win32 |
390 |
^ (PackageId from:self package) directory copy replaceAll:$/ with:$\ |
|
391 |
||
392 |
" |
|
393 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
394 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
13419 | 395 |
stx_libbasic3 moduleDirectory_win32 |
9891 | 396 |
" |
397 |
||
398 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
399 |
! |
|
400 |
||
10562 | 401 |
moduleDirectory_win32For: projectID |
402 |
||
403 |
^(self moduleDirectoryFor:projectID) copy replaceAll:$/ with:$\ |
|
404 |
||
405 |
" |
|
406 |
self moduleDirectory_win32For: #'bosch:dapasx/pav_vergleich' |
|
407 |
self moduleDirectory_win32For: #'stx:goodies/xml/stx' |
|
408 |
self moduleDirectory_win32For: #'stx:libbasic2' |
|
409 |
" |
|
410 |
! |
|
411 |
||
13419 | 412 |
moduleFor:aProjectID |
9559 | 413 |
^ (aProjectID subStrings:$:) first |
9536 | 414 |
|
9559 | 415 |
" |
416 |
DapasXProject module |
|
417 |
DapasX_Datenbasis module |
|
418 |
" |
|
9536 | 419 |
|
420 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 421 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 422 |
! |
423 |
||
13419 | 424 |
moduleOfClass:aClass |
9559 | 425 |
^ self moduleFor:aClass package |
9536 | 426 |
|
9559 | 427 |
" |
428 |
DapasXProject module |
|
429 |
DapasX_Datenbasis module |
|
430 |
" |
|
9536 | 431 |
|
432 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 433 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 434 |
! |
435 |
||
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
436 |
monticelloPackageName |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
437 |
"hook for packages which have been loaded from monticello" |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
438 |
|
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
439 |
^ nil |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
440 |
! |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
441 |
|
9559 | 442 |
msdosPathToPackage:toPackageID from:fromPackageID |
443 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
13419 | 444 |
|
10976
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
445 |
|parts1 parts2 common up down| |
9852 | 446 |
|
447 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
448 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
449 |
common := parts1 commonPrefixWith:parts2. |
|
10976
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
450 |
up := ((1 to:parts1 size - common size) collect:[:p | '..']) asStringWith:'\'. |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
451 |
down := (parts2 copyFrom:common size+1) asStringWith:'\'. |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
452 |
up isEmpty ifTrue:[ |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
453 |
down isEmpty ifTrue:[^ '.']. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
454 |
^ down. |
9852 | 455 |
]. |
10976
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
456 |
down isEmpty ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
457 |
^ up. |
9714 | 458 |
]. |
13419 | 459 |
^ up, '\', down |
9901 | 460 |
|
9559 | 461 |
" |
462 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
13419 | 463 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
464 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
465 |
self msdosPathToPackage:'exept:expecco' from:'exept:expecco/application' |
|
466 |
self msdosPathToPackage:'exept:expecco/application' from:'exept:expecco' |
|
9559 | 467 |
" |
9536 | 468 |
|
9559 | 469 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 470 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 471 |
! |
472 |
||
9714 | 473 |
msdosPathToTopFor:aProjectID |
9559 | 474 |
"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 | 475 |
|
9852 | 476 |
|parts| |
477 |
||
478 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
479 |
||
480 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
481 |
parts size == 1 ifTrue:[^ '.']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
482 |
^ (((2 to:parts size-1) collect:[:p | '..\']) asStringWith:'') , '..' |
9852 | 483 |
]. |
484 |
||
13419 | 485 |
^ ((parts collect:[:p | '..\']) asStringWith:'') , 'stx' |
486 |
||
487 |
" |
|
488 |
self msdosPathToTopFor: #'bosch' |
|
489 |
self msdosPathToTopFor: #'bosch:dapasx' |
|
490 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
|
491 |
self msdosPathToTopFor: #'stx' |
|
492 |
self msdosPathToTopFor: #'stx:libview' |
|
493 |
self msdosPathToTopFor: #'stx:goodies/foo' |
|
9559 | 494 |
" |
9536 | 495 |
|
496 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 497 |
"Modified: / 14-09-2006 / 14:49:17 / cg" |
9559 | 498 |
! |
499 |
||
12028 | 500 |
packageDirectory |
14577 | 501 |
"if I was loaded from a directory (as oposed to loaded via a dll or from a scm), |
502 |
return that directory. |
|
503 |
Otherwise ask Smalltalk for my package directory a long the package path." |
|
504 |
||
14580 | 505 |
|loadDirectory| |
506 |
||
14586 | 507 |
(loadDirectory := self loadDirectory) ifNotNil:[ ^ loadDirectory ]. |
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
508 |
^ Smalltalk packageDirectoryForPackageId: self package |
12028 | 509 |
|
510 |
"Created: / 15-06-2009 / 12:01:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
511 |
! |
|
512 |
||
9536 | 513 |
packageName |
9688 | 514 |
"the last component" |
9536 | 515 |
|
9688 | 516 |
^ self packageNameFor: self package |
9536 | 517 |
|
9688 | 518 |
" |
10810 | 519 |
stx_libwidg2 packageName |
9688 | 520 |
bosch_dapasx_hw_schnittstellen packageName |
521 |
bosch_dapasx_datenbasis packageName |
|
13419 | 522 |
bosch_dapasx_parameter_system packageName |
9688 | 523 |
" |
9536 | 524 |
|
525 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
526 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
527 |
! |
|
528 |
||
529 |
packageNameFor: aProjectID |
|
9688 | 530 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 531 |
|
9688 | 532 |
" |
533 |
bosch_dapasx_hw_schnittstellen packageName |
|
534 |
bosch_dapasx_datenbasis packageName |
|
13419 | 535 |
bosch_dapasx_parameter_system packageName |
536 |
cg_croquet packageName |
|
537 |
stx_goodies_xml_vw packageName |
|
538 |
stx_goodies_xml_vw packageDirectory |
|
9688 | 539 |
" |
9536 | 540 |
|
541 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
542 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
543 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
544 |
! |
|
545 |
||
546 |
parentProject |
|
10306 | 547 |
^ (self parentProjectFor: self package) |
9536 | 548 |
|
549 |
" |
|
550 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
551 |
DapasX_Datenbasis parentProject |
|
552 |
" |
|
553 |
||
554 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
555 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
556 |
! |
|
557 |
||
558 |
parentProjectFor: aProjectID |
|
10306 | 559 |
^ (aProjectID subStrings: $/) first |
9536 | 560 |
|
561 |
" |
|
9664 | 562 |
bosch_dapasx_hw_schnittstellen parentProject |
9536 | 563 |
" |
564 |
||
565 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
566 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9664 | 567 |
"Modified: / 23-08-2006 / 15:07:36 / cg" |
9536 | 568 |
! |
569 |
||
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
570 |
pathSeparator:platformName |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
571 |
platformName == #unix ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
572 |
^ self pathSeparator_unix |
9850 | 573 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
574 |
platformName == #win32 ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
575 |
^ self pathSeparator_win32 |
9850 | 576 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
577 |
self error:'unknown operating system platform'. |
9850 | 578 |
|
579 |
"Created: / 14-09-2006 / 13:38:00 / cg" |
|
580 |
! |
|
581 |
||
582 |
pathSeparator_unix |
|
583 |
^ $/ |
|
584 |
||
585 |
"Created: / 14-09-2006 / 13:37:18 / cg" |
|
586 |
! |
|
587 |
||
588 |
pathSeparator_win32 |
|
589 |
^ $\ |
|
590 |
||
591 |
"Created: / 14-09-2006 / 13:37:23 / cg" |
|
592 |
! |
|
593 |
||
594 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
595 |
"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" |
|
596 |
||
597 |
|p| |
|
598 |
||
599 |
arch == #unix ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
600 |
p := (self pathToPackage_unix:aPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
601 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
602 |
^ p , '/' , aBaseFilename |
9850 | 603 |
]. |
604 |
arch == #win32 ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
605 |
p := self pathToPackage_win32:aPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
606 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
607 |
^ p , '\' , aBaseFilename |
9850 | 608 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
609 |
self error:'unknown operating system platform'. |
9850 | 610 |
|
611 |
"Created: / 14-09-2006 / 13:29:20 / cg" |
|
612 |
! |
|
613 |
||
614 |
pathToPackage_unix:aPackageID |
|
615 |
"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" |
|
616 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
617 |
|rel| |
9850 | 618 |
|
9880 | 619 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
620 |
^ self unixPathToPackage:aPackageID from:self package |
9880 | 621 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
622 |
rel := self topRelativePathToPackage_unix:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
623 |
(rel startsWith:'stx/') ifTrue:[ |
15223 | 624 |
^ '$(TOP)/', (rel withoutPrefix:'stx/'). |
9850 | 625 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
626 |
^ '$(TOP)/../', rel |
9850 | 627 |
] |
628 |
||
629 |
" |
|
13419 | 630 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/kernel' |
631 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/support' |
|
632 |
stx_libbasic pathToPackage_unix:'bosch:dapasx/kernel' |
|
9850 | 633 |
" |
634 |
||
635 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
636 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 637 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
9850 | 638 |
! |
639 |
||
13419 | 640 |
pathToPackage_win32:aPackageID |
9850 | 641 |
"Returns the path to the package defined by aPackageID relative to my path" |
13419 | 642 |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
643 |
|rel| |
9850 | 644 |
|
9880 | 645 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
646 |
^ self msdosPathToPackage:aPackageID from:self package |
9880 | 647 |
]. |
648 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
649 |
rel := self topRelativePathToPackage_win32:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
650 |
(rel startsWith:'stx\') ifTrue:[ |
15223 | 651 |
^ '$(TOP)\', (rel withoutPrefix:'stx\'). |
9850 | 652 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
653 |
^ '$(TOP)\..\', rel |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
654 |
] |
9850 | 655 |
|
656 |
" |
|
13419 | 657 |
self pathToPackage_win32:'bosch:dapasx/kernel' |
658 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/kernel' |
|
659 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/support' |
|
660 |
stx_libbasic pathToPackage_win32:'bosch:dapasx/kernel' |
|
9850 | 661 |
" |
662 |
||
663 |
"Created: / 14-09-2006 / 13:22:52 / cg" |
|
9880 | 664 |
"Modified: / 14-09-2006 / 15:28:45 / cg" |
9850 | 665 |
! |
666 |
||
9714 | 667 |
pathToTop_unix |
668 |
"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" |
|
669 |
||
9852 | 670 |
^ self unixPathToTopFor:self package. |
9714 | 671 |
|
672 |
" |
|
13419 | 673 |
bosch_dapasx_kernel pathToTop_unix |
674 |
stx_goodies_xml pathToTop_unix |
|
675 |
stx_libhtml pathToTop_unix |
|
676 |
stx_goodies_refactoryBrowser_changes pathToTop_unix |
|
9714 | 677 |
" |
678 |
||
679 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 680 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 681 |
! |
682 |
||
683 |
pathToTop_win32 |
|
684 |
"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" |
|
685 |
||
13419 | 686 |
^self msdosPathToTopFor: self package |
687 |
||
688 |
" |
|
689 |
bosch_dapasx_datenbasis pathToTop_win32 |
|
690 |
stx_libbasic pathToTop_win32 |
|
9714 | 691 |
" |
692 |
||
693 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9831 | 694 |
"Modified: / 07-09-2006 / 15:51:00 / cg" |
9714 | 695 |
! |
696 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
697 |
projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
698 |
"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
|
699 |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
700 |
projectIsLoaded isNil ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
701 |
projectIsLoaded := false. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
702 |
]. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
703 |
^ projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
704 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
705 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
706 |
stx_libbasic projectIsLoaded |
13251 | 707 |
(ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
708 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
709 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
710 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
711 |
projectIsLoaded:something |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
712 |
projectIsLoaded := something. |
13251 | 713 |
something ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
714 |
"register myself as dependent - I want to get notified on method changes" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
715 |
self class addDependent:self. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
716 |
]. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
717 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
718 |
|
9850 | 719 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
13419 | 720 |
"Returns the path to stx counting the number of $/ and $: in the package name |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
721 |
and adding for each one '../' to get the ST/X top directory" |
9850 | 722 |
|
723 |
|p| |
|
724 |
||
725 |
arch == #unix ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
726 |
p := (self topRelativePathToPackage_unix:aPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
727 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
728 |
^ p , '/' , aBaseFilename |
9850 | 729 |
]. |
730 |
arch == #win32 ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
731 |
p := self topRelativePathToPackage_win32:aPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
732 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
733 |
^ p , '\' , aBaseFilename |
9850 | 734 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
735 |
self error:'unknown operating system platform'. |
9850 | 736 |
|
737 |
"Created: / 14-09-2006 / 13:34:05 / cg" |
|
738 |
! |
|
739 |
||
13419 | 740 |
topRelativePathToPackage_unix:aPackageID |
9850 | 741 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
13419 | 742 |
|
9850 | 743 |
^ aPackageID asString copy replaceAny:':/' with:$/ |
744 |
||
745 |
" |
|
746 |
self topRelativePathToPackage_unix:'stx:goodies/xml' |
|
747 |
self topRelativePathToPackage_unix:'bosch:dapasx/kernel' |
|
748 |
" |
|
749 |
||
750 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
751 |
! |
|
752 |
||
13419 | 753 |
topRelativePathToPackage_win32:aPackageID |
9559 | 754 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
13419 | 755 |
|
9559 | 756 |
^ aPackageID asString copy replaceAny:':/' with:$\ |
757 |
||
758 |
" |
|
9850 | 759 |
self topRelativePathToPackage_win32:'stx:goodies/xml' |
760 |
self topRelativePathToPackage_win32:'bosch:dapasx/kernel' |
|
9559 | 761 |
" |
9536 | 762 |
|
9850 | 763 |
"Created: / 14-09-2006 / 13:20:12 / cg" |
9852 | 764 |
! |
765 |
||
9880 | 766 |
unixPathToPackage:toPackageID from:fromPackageID |
767 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
13419 | 768 |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
769 |
|parts1 parts2 common up down rel| |
9880 | 770 |
|
771 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
772 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
773 |
common := parts1 commonPrefixWith:parts2. |
|
774 |
common notEmpty ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
775 |
up := ((1 to:parts1 size - common size) collect:[:p | '../']) asStringWith:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
776 |
down := (parts2 copyFrom:common size+1) asStringWith:'/'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
777 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
778 |
^ up , down |
9880 | 779 |
]. |
780 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
781 |
rel := (self topRelativePathToPackage_unix:toPackageID). |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
782 |
(rel startsWith:'stx/') ifTrue:[ |
15223 | 783 |
^ '$(TOP)', (rel copyFrom:'stx/' size) "/ notice: the slash remains |
9880 | 784 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
785 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
786 |
^ '$(TOP)/../', rel. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
787 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
788 |
"/ pTop := self unixPathToTopFor:fromPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
789 |
"/ (pTop endsWith:'/stx') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
790 |
"/ pTop := pTop copyButLast:'stx' size. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
791 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
792 |
"/ pTop isEmpty ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
793 |
"/ pTop := '../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
794 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
795 |
"/ pTop := pTop, '/../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
796 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
797 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
798 |
"/ ^ pTop, (self topRelativePathToPackage_unix:toPackageID) |
9880 | 799 |
|
800 |
" |
|
10713 | 801 |
self unixPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
13419 | 802 |
self unixPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
803 |
self unixPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
9880 | 804 |
" |
805 |
||
806 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
807 |
! |
|
808 |
||
9852 | 809 |
unixPathToTopFor:aProjectID |
810 |
"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" |
|
811 |
||
812 |
|parts| |
|
813 |
||
814 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
815 |
||
816 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
817 |
parts size == 1 ifTrue:[^ '']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
818 |
^ (((2 to:parts size-1) collect:[:p | '../']) asStringWith:'') , '..' |
9852 | 819 |
]. |
820 |
||
13419 | 821 |
^ ((parts collect:[:p | '../']) asStringWith:'') , 'stx' |
822 |
||
823 |
" |
|
824 |
self unixPathToTopFor: #'bosch' |
|
825 |
self unixPathToTopFor: #'bosch:dapasx' |
|
826 |
self unixPathToTopFor: #'bosch:dapasx/datenbasis' |
|
827 |
self unixPathToTopFor: #'stx' |
|
828 |
self unixPathToTopFor: #'stx:libview' |
|
829 |
self unixPathToTopFor: #'stx:goodies/foo' |
|
9852 | 830 |
" |
831 |
||
832 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
9536 | 833 |
! ! |
834 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
835 |
!ProjectDefinition class methodsFor:'accessing - packaging'! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
836 |
|
12371 | 837 |
classNames:aCollectionOfClassNames |
838 |
"set the set of classes" |
|
839 |
||
840 |
self classNamesAndAttributes:aCollectionOfClassNames usingCompiler:nil |
|
841 |
! |
|
842 |
||
843 |
classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
|
13419 | 844 |
"set the set of classes. and attributes |
845 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12371 | 846 |
which has to do the job. |
847 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
848 |
||
849 |
|oldSpec newCode| |
|
850 |
||
851 |
oldSpec := self classNamesAndAttributes. |
|
852 |
newSpec = oldSpec ifTrue: [^ self]. |
|
853 |
||
854 |
newCode := self classNamesAndAttributes_codeFor:newSpec. |
|
855 |
||
15006 | 856 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
12371 | 857 |
! |
858 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
859 |
excludeClasses:toExclude usingCompiler:compilerOrNil |
13419 | 860 |
"exclude (remove from classList) a number of classes. |
861 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
862 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
863 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
864 |
|
12371 | 865 |
|newSpec| |
866 |
||
867 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
868 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
869 |
toExclude do:[:eachClassToExclude | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
870 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
871 |
className := eachClassToExclude theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
872 |
(self allClassNames includes:className) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
873 |
|idx| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
874 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
875 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
876 |
idx ~~ 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
877 |
newSpec := newSpec copyWithoutIndex:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
878 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
879 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
880 |
]. |
12371 | 881 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
882 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
883 |
"Created: / 30-08-2007 / 18:28:28 / cg" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
884 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
885 |
|
15069 | 886 |
excludeMethodFor:selector inClassNamed:className usingCompiler:compilerOrNil |
887 |
"exclude (remove from extensionList) a method by name. |
|
888 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
889 |
which has to do the job. |
|
890 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
891 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
892 |
||
893 |
|oldSpec newSpec newCode extensionMethods idx| |
|
894 |
||
895 |
oldSpec := self extensionMethodNames. |
|
896 |
newSpec := oldSpec copy. |
|
897 |
extensionMethods := self extensionMethods. |
|
898 |
||
899 |
idx := (1 to:newSpec size-1 by:2) |
|
900 |
detect:[:i | |
|
901 |
((newSpec at:i) = className) |
|
902 |
and:[ (newSpec at:i+1) = selector ]] |
|
903 |
ifNone:nil. |
|
904 |
idx isNil ifTrue:[ ^ self ]. |
|
905 |
||
906 |
"/ attention: there are two spec-elements per method |
|
907 |
newSpec := newSpec removeFromIndex:idx toIndex:idx+1. |
|
908 |
||
909 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
910 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
|
911 |
! |
|
912 |
||
15005 | 913 |
excludeMethods:toRemove usingCompiler:compilerOrNil |
914 |
"exclude (remove from extensionList) a number of methods. |
|
915 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
916 |
which has to do the job. |
|
917 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
918 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
919 |
||
920 |
|oldSpec newSpec newCode extensionMethods| |
|
921 |
||
922 |
oldSpec := self extensionMethodNames. |
|
923 |
newSpec := oldSpec copy. |
|
924 |
extensionMethods := self extensionMethods. |
|
925 |
||
926 |
toRemove do:[:eachMethodToRemove | |
|
927 |
|className selector idx| |
|
928 |
||
929 |
(extensionMethods includes:eachMethodToRemove) ifTrue:[ |
|
930 |
className := eachMethodToRemove mclass name. |
|
931 |
selector := eachMethodToRemove selector. |
|
15069 | 932 |
idx := (1 to:newSpec size-1 by:2) |
933 |
detect:[:i | |
|
934 |
((newSpec at:i) = className) |
|
935 |
and:[ (newSpec at:i+1) = selector ]] |
|
936 |
ifNone:nil. |
|
937 |
idx notNil ifTrue:[ |
|
938 |
"/ attention: there are two spec-elements per method |
|
939 |
newSpec := newSpec removeFromIndex:idx toIndex:idx+1 |
|
940 |
] |
|
15005 | 941 |
]. |
942 |
]. |
|
943 |
||
944 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
15006 | 945 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15005 | 946 |
! |
947 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
948 |
includeClasses:toInclude usingCompiler:compilerOrNil |
13419 | 949 |
"include (add to classList) a number of classes. |
950 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
951 |
which has to do the job. |
15005 | 952 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
953 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
954 |
|
12371 | 955 |
|oldSpec newSpec| |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
956 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
957 |
oldSpec := self classNamesAndAttributes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
958 |
newSpec := oldSpec copy. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
959 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
960 |
toInclude do:[:eachClassToInclude | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
961 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
962 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
963 |
className := eachClassToInclude theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
964 |
(self compiled_classNames includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
965 |
| idx entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
966 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
967 |
idx := oldSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
968 |
idx == 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
969 |
newSpec := newSpec copyWith:(Array with:className) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
970 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
971 |
entry := newSpec at:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
972 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
973 |
entry := entry copyWithout:#autoload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
974 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
975 |
newSpec at:idx put:entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
976 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
977 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
978 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
979 |
|
12371 | 980 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
981 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
982 |
|
15005 | 983 |
includeMethods:toInclude usingCompiler:compilerOrNil |
984 |
"include (add to extensionList) a number of methods. |
|
985 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
986 |
which has to do the job. |
|
987 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
988 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
989 |
||
990 |
|oldSpec newSpec newCode extensionMethods| |
|
991 |
||
992 |
oldSpec := self extensionMethodNames. |
|
993 |
newSpec := oldSpec copy. |
|
994 |
extensionMethods := self extensionMethods. |
|
995 |
||
996 |
toInclude do:[:eachMethodToInclude | |
|
997 |
(extensionMethods includes:eachMethodToInclude) ifFalse:[ |
|
998 |
newSpec := newSpec copyWith:eachMethodToInclude mclass name. |
|
999 |
newSpec := newSpec copyWith:eachMethodToInclude selector. |
|
1000 |
]. |
|
1001 |
]. |
|
1002 |
||
1003 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
15006 | 1004 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15005 | 1005 |
! |
1006 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1007 |
makeClassesAutoloaded:toMakeAutoloaded usingCompiler:compilerOrNil |
13419 | 1008 |
"include as autoloaded (add to classList) a number of classes. |
1009 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1010 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1011 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1012 |
|
12371 | 1013 |
|newSpec| |
1014 |
||
1015 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1016 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1017 |
toMakeAutoloaded do:[:eachClassToMakeAutoloaded | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1018 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1019 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1020 |
className := eachClassToMakeAutoloaded theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1021 |
(self autoloaded_classNames includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1022 |
|idx entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1023 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1024 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1025 |
idx == 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1026 |
newSpec := newSpec copyWith:(Array with:className with:#autoload) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1027 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1028 |
entry := newSpec at:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1029 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1030 |
entry := (entry copyWithout:#autoload) copyWith:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1031 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1032 |
entry := Array with:entry with:#autoload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1033 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1034 |
newSpec at:idx put:entry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1035 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1036 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1037 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1038 |
|
12371 | 1039 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
14982 | 1040 |
! |
1041 |
||
15052 | 1042 |
updateContentsMethodsCodeUsingCompiler:compilerOrNil ignoreOldDefinition:doRegenerate |
1043 |
"regenerate the contents-describing methods. |
|
1044 |
This searches through the system and picks classes and extension methods |
|
1045 |
which have me as package and lists them in the generated class- |
|
1046 |
and extensionMethods methods. |
|
1047 |
If doRegenerate is true, forget any any previous contents info; |
|
1048 |
otherwise, merge new items into the existing lists." |
|
1049 |
||
1050 |
Class packageQuerySignal |
|
1051 |
answer:self package |
|
1052 |
do:[ |
|
1053 |
self |
|
1054 |
forEachContentsMethodsCodeToCompileDo: |
|
1055 |
[:code :category | |
|
1056 |
(compilerOrNil ? self theMetaclass compilerClass) |
|
1057 |
compile:code |
|
1058 |
forClass:self theMetaclass |
|
1059 |
inCategory:category. |
|
1060 |
] |
|
1061 |
ignoreOldDefinition:doRegenerate |
|
1062 |
]. |
|
1063 |
! |
|
1064 |
||
14982 | 1065 |
updateExtensionMethodNamesUsingCompiler:compilerOrNil |
1066 |
"set the set of extension methods |
|
1067 |
Because this requires compilation of my extensionMethodNames-method, |
|
1068 |
a compiler can be passed in, which has to do the job. |
|
1069 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
1070 |
||
1071 |
|newCode| |
|
1072 |
||
1073 |
newCode := self extensionMethodNames_code. |
|
15006 | 1074 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15052 | 1075 |
! |
1076 |
||
1077 |
updateMethodsCodeUsingCompiler:compilerOrNil ignoreOldDefinition:doRegenerate |
|
1078 |
"regenerate the all contents- plus version describing methods. |
|
1079 |
This searches through the system and picks classes and extension methods |
|
1080 |
which have me as package and lists them in the generated class- |
|
1081 |
and extensionMethods methods. |
|
1082 |
If doRegenerate is true, forget any any previous contents info; |
|
1083 |
otherwise, merge new items into the existing lists." |
|
1084 |
||
1085 |
Class packageQuerySignal |
|
1086 |
answer:self package |
|
1087 |
do:[ |
|
1088 |
self |
|
1089 |
forEachMethodsCodeToCompileDo: |
|
1090 |
[:code :category | |
|
1091 |
(compilerOrNil ? self theMetaclass compilerClass) |
|
1092 |
compile:code |
|
1093 |
forClass:self theMetaclass |
|
1094 |
inCategory:category. |
|
1095 |
] |
|
1096 |
ignoreOldDefinition:doRegenerate |
|
1097 |
]. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1098 |
! ! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1099 |
|
13411 | 1100 |
!ProjectDefinition class methodsFor:'accessing - tests'! |
1101 |
||
13419 | 1102 |
excludedFromTestSuite |
13411 | 1103 |
"List of testcases and/or tests excluded from testsuite. |
1104 |
Entries maybe ClassName or #(ClassName testName) |
|
1105 |
" |
|
1106 |
^ #() |
|
1107 |
||
1108 |
"Created: / 03-06-2011 / 16:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1109 |
! |
|
1110 |
||
1111 |
testSuite |
|
13544 | 1112 |
"generate and return a testSuite containing all of my test-classes" |
13411 | 1113 |
|
1114 |
|suite classes| |
|
1115 |
||
1116 |
suite := TestSuite named:self package. |
|
13695 | 1117 |
classes := self classes |
14877 | 1118 |
select:[:each | |
1119 |
[ |
|
1120 |
each isLoaded ifFalse:[each autoload]. |
|
1121 |
(each isTestCaseLike) and:[ each isAbstract not ] |
|
1122 |
] on: Autoload autoloadFailedSignal do:[ |
|
1123 |
false |
|
1124 |
] |
|
1125 |
]. |
|
13544 | 1126 |
|
13411 | 1127 |
classes := classes asSortedCollection:[:a :b | a name <= b name ]. |
13695 | 1128 |
classes do: [:eachClass | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1129 |
| tests | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1130 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1131 |
tests := eachClass suite tests. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1132 |
tests := tests reject:[:test|self shouldExcludeTest: test]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1133 |
suite addTests: tests |
13544 | 1134 |
]. |
1135 |
^ suite |
|
13411 | 1136 |
|
1137 |
"Created: / 01-04-2011 / 15:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1138 |
"Modified: / 03-06-2011 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13568 | 1139 |
"Modified: / 08-08-2011 / 14:59:45 / cg" |
12028 | 1140 |
! ! |
1141 |
||
9714 | 1142 |
!ProjectDefinition class methodsFor:'class initialization'! |
1143 |
||
1144 |
initialize |
|
14776
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1145 |
AccessLock isNil ifTrue:[ |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1146 |
LibraryType := #Library. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1147 |
GUIApplicationType := #'GUI-Application'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1148 |
NonGUIApplicationType := #'NonGUI-Application'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1149 |
AccessLock := Semaphore forMutualExclusion name:'ProjectDefinition Lock'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1150 |
Verbose := false. |
15172 | 1151 |
PackagesBeingLoaded := Set new. |
14776
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1152 |
]. |
9714 | 1153 |
|
10121 | 1154 |
" |
1155 |
self initialize |
|
1156 |
" |
|
1157 |
||
13592 | 1158 |
"Modified: / 18-08-2011 / 13:48:31 / cg" |
10121 | 1159 |
! |
1160 |
||
1161 |
initializeAllProjectDefinitions |
|
1162 |
"needs everything else (especially the compiler etc.) to be initialized. |
|
1163 |
Therefore, its not invoked by #initialize, but instead explicitely, |
|
1164 |
by Smalltalk" |
|
13695 | 1165 |
|
13609 | 1166 |
|isStandAloneApp| |
1167 |
||
1168 |
isStandAloneApp := Smalltalk isStandAloneApp. |
|
1169 |
||
1170 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1171 |
eachProjectDefinitionClass isAbstract ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1172 |
isStandAloneApp ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1173 |
eachProjectDefinitionClass installAutoloadedClasses. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1174 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1175 |
eachProjectDefinitionClass projectIsLoaded:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1176 |
] |
13609 | 1177 |
]. |
10115 | 1178 |
|
9714 | 1179 |
" |
1180 |
self initialize |
|
1181 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1182 |
|
10121 | 1183 |
"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
|
1184 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1185 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1186 |
installAutoloadedClasses |
12372 | 1187 |
"install all of my autoloaded classes (if any)" |
1188 |
||
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1189 |
|classesToFixClassFileName| |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1190 |
|
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1191 |
classesToFixClassFileName := OrderedCollection new. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1192 |
|
13592 | 1193 |
self autoloaded_classNames do:[:className | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1194 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1195 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1196 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1197 |
(cls := Smalltalk classNamed:className) isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1198 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1199 |
(self name,' [warning]: failed to install autoloaded: ',className) errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1200 |
(self name,' [info]: reason: ',ex description) errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1201 |
"/ thisContext fullPrintAll. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1202 |
] do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1203 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1204 |
installAutoloadedClassNamed:className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1205 |
category:'* as yet unknown category *' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1206 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1207 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1208 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1209 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1210 |
classesToFixClassFileName add:cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1211 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1212 |
]. |
13592 | 1213 |
]. |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1214 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1215 |
Smalltalk addStartBlock:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1216 |
|abbrevs| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1217 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1218 |
abbrevs := self abbrevs. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1219 |
"/ patch the classFileNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1220 |
classesToFixClassFileName do:[:cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1221 |
|entry classFilenameFromAbbreviations| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1222 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1223 |
entry := abbrevs at:cls name ifAbsent:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1224 |
entry notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1225 |
classFilenameFromAbbreviations := entry fileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1226 |
classFilenameFromAbbreviations notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1227 |
classFilenameFromAbbreviations := classFilenameFromAbbreviations,'.st'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1228 |
(classFilenameFromAbbreviations ~= cls getClassFilename) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1229 |
cls setClassFilename:classFilenameFromAbbreviations |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1230 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1231 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1232 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1233 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1234 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1235 |
"/ patch the categories |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1236 |
Class withoutUpdatingChangesDo:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1237 |
|entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1238 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1239 |
self classNames do:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1240 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1241 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1242 |
((cls := Smalltalk at: nm) notNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1243 |
and:[ cls isLoaded not |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1244 |
and:[ (entry := abbrevs at:cls name ifAbsent:[nil]) notNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1245 |
]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1246 |
cls category: (entry category) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1247 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1248 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1249 |
] |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1250 |
]. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1251 |
|
13411 | 1252 |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1253 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1254 |
stx_libbasic installAutoloadedClasses |
12268
b3cd2af642f2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12264
diff
changeset
|
1255 |
stx_libhtml installAutoloadedClasses |
13592 | 1256 |
stx_libtool2 installAutoloadedClasses |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1257 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1258 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1259 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
13411 | 1260 |
"Modified: / 06-03-2011 / 18:26:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1261 |
"Modified: / 20-08-2011 / 23:32:32 / cg" |
9714 | 1262 |
! ! |
1263 |
||
9998 | 1264 |
!ProjectDefinition class methodsFor:'code generation'! |
1265 |
||
11072 | 1266 |
applicationIconFileName_code |
1267 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1268 |
s nextPutLine:'applicationIconFileName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1269 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon); will be included in the rc-resource file"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1270 |
s cr; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1271 |
nextPutLine:' ^ nil'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1272 |
nextPutLine:' "/ ^ self applicationName'. |
11072 | 1273 |
]. |
1274 |
||
1275 |
" |
|
13873 | 1276 |
self applicationIconFileName_code |
1277 |
stx_libbasic3 applicationIconFileName_code |
|
11072 | 1278 |
" |
1279 |
||
1280 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1281 |
! |
|
1282 |
||
10393 | 1283 |
classNamesAndAttributes_codeFor:aSpecArray |
1284 |
"generate method code returning all classes of the project from the given spec." |
|
1285 |
||
1286 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1287 |
s nextPutLine:'classNamesAndAttributes'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1288 |
s nextPutLine:' "lists the classes which are to be included in the project.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1289 |
s nextPutLine:' Each entry in the list may be: a single class-name (symbol),'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1290 |
s nextPutLine:' or an array-literal consisting of class name and attributes.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1291 |
s nextPutLine:' Attributes are: #autoload or #<os> where os is one of win32, unix,..."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1292 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1293 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1294 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1295 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1296 |
(self classNamesAndAttributesFromSpecArray:aSpecArray) do:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1297 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1298 |
entry storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1299 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1300 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1301 |
s nextPutLine:' )' |
10393 | 1302 |
]. |
1303 |
||
1304 |
" |
|
1305 |
stx_libbasic3 classNamesAndAttributes_codeFor:(stx_libbasic3 classNamesAndAttributes) |
|
1306 |
exept_expecco classNamesAndAttributes_codeFor:(exept_expecco classNamesAndAttributes) |
|
1307 |
" |
|
1308 |
||
1309 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1310 |
"Created: / 19-02-2007 / 15:43:27 / cg" |
|
1311 |
! |
|
1312 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1313 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 1314 |
"generate method code returning all classes of the project. |
1315 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1316 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1317 |
if false, existing entries are preserved. |
10010 | 1318 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
13419 | 1319 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1320 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 1321 |
|
10393 | 1322 |
|newSpec oldSpec ignored| |
1323 |
||
1324 |
oldSpec := self classNamesAndAttributesAsSpecArray. |
|
1325 |
ignored := self ignoredClassNames asSet. |
|
1326 |
newSpec := OrderedCollection new. |
|
1327 |
||
1328 |
ignoreOldEntries ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1329 |
oldSpec do:[:oldEntry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1330 |
|newEntry className cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1331 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1332 |
newEntry := oldEntry copy. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1333 |
className := newEntry first. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1334 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1335 |
(ignored includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1336 |
cls := Smalltalk classNamed:className. |
14354
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1337 |
cls notNil ifTrue:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1338 |
ignoreOldDefinition ifTrue:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1339 |
cls isLoaded ifFalse:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1340 |
(newEntry includes:#autoload) ifFalse:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1341 |
newEntry := newEntry copyWith:#autoload. |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1342 |
]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1343 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1344 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1345 |
"JV @ 2010-06-19 |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1346 |
Force merge default class attributes with existing ones" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1347 |
newEntry := self mergeDefaultClassAttributesFor: cls with: newEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1348 |
newSpec add:newEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1349 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1350 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1351 |
]. |
10393 | 1352 |
]. |
1353 |
||
1354 |
self searchForClasses do:[:eachClass | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1355 |
|className attributes oldSpecEntry oldAttributes newEntry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1356 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1357 |
className := eachClass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1358 |
(ignored includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1359 |
oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1360 |
|
14354
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1361 |
(ignoreOldEntries or:[oldSpecEntry isNil]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1362 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1363 |
(self additionalClassNamesAndAttributes includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1364 |
(oldSpecEntry size > 1) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1365 |
oldAttributes := oldSpecEntry copyFrom:2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1366 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1367 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1368 |
ignoreOldDefinition ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1369 |
"take autoload attribute from classes state in the image" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1370 |
oldAttributes notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1371 |
attributes := oldAttributes copyWithout:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1372 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1373 |
attributes := #() |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1374 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1375 |
eachClass isLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1376 |
attributes := attributes copyWith:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1377 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1378 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1379 |
"keep any existing attribute" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1380 |
oldAttributes notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1381 |
attributes := oldAttributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1382 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1383 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1384 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1385 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1386 |
"JV @ 2010-06-19 |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1387 |
Support fo additional class attributes and programming language attribute" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1388 |
attributes := self mergeDefaultClassAttributesFor: eachClass with: attributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1389 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1390 |
newEntry := Array with:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1391 |
attributes notEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1392 |
newEntry := newEntry , attributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1393 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1394 |
newSpec add:newEntry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1395 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1396 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1397 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1398 |
] |
9998 | 1399 |
]. |
15005 | 1400 |
|
10393 | 1401 |
^ self classNamesAndAttributes_codeFor:newSpec |
1402 |
||
13419 | 1403 |
" |
10393 | 1404 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
1405 |
exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
1406 |
" |
|
9998 | 1407 |
|
1408 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1409 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
13411 | 1410 |
"Modified: / 19-06-2010 / 10:56:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
1411 |
"Modified: / 06-09-2011 / 07:48:52 / cg" |
9998 | 1412 |
! |
1413 |
||
1414 |
companyName_code |
|
12541 | 1415 |
^ self companyName_codeFor:self companyName |
1416 |
||
1417 |
" |
|
1418 |
self companyName_code |
|
1419 |
stx_libbasic3 companyName_code |
|
1420 |
" |
|
1421 |
||
1422 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1423 |
! |
|
1424 |
||
1425 |
companyName_codeFor:aString |
|
9998 | 1426 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1427 |
s nextPutLine:'companyName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1428 |
s nextPutLine:' "Return a companyname which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1429 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1430 |
]. |
1431 |
||
1432 |
" |
|
1433 |
self companyName_code |
|
1434 |
stx_libbasic3 companyName_code |
|
1435 |
" |
|
1436 |
||
1437 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1438 |
! |
|
1439 |
||
1440 |
compileDescriptionMethods |
|
1441 |
(self isLibraryDefinition |
|
1442 |
or:[ self isApplicationDefinition ] ) ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1443 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
9998 | 1444 |
]. |
1445 |
||
13419 | 1446 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1447 |
forEachMethodsCodeToCompileDo:[:code :category | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1448 |
self compile:code categorized:category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1449 |
]. |
9998 | 1450 |
|
1451 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
1452 |
||
1453 |
" |
|
1454 |
DapasXProject compileDescriptionMethods |
|
1455 |
DapasX_Datenbasis compileDescriptionMethods |
|
1456 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
1457 |
stx_libbasic compileDescriptionMethods |
|
1458 |
" |
|
1459 |
||
1460 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
1461 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
1462 |
! |
|
1463 |
||
1464 |
description_code |
|
1465 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1466 |
s nextPutLine:'description'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1467 |
s nextPutLine:' "Return a description string which will appear in vc.def / bc.def"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1468 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
9998 | 1469 |
]. |
1470 |
||
1471 |
" |
|
13419 | 1472 |
self description_code |
1473 |
stx_libbasic3 description_code |
|
9998 | 1474 |
" |
1475 |
||
1476 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
1477 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
1478 |
! |
|
1479 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1480 |
effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1481 |
"get the subProjects, that are not excluded" |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1482 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1483 |
|subProjects| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1484 |
|
15026 | 1485 |
subProjects := self subProjects asNewSet. |
1486 |
subProjects |
|
1487 |
removeAllFoundIn:self excludedFromSubProjects; |
|
1488 |
remove:self package ifAbsent:[]. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1489 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1490 |
^ subProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1491 |
! |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1492 |
|
12425 | 1493 |
excludedFromPreRequisites_code |
1494 |
"generate the code of the #excludedFromPreRequisites method" |
|
1495 |
||
1496 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1497 |
s nextPutLine:'excludedFromPreRequisites'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1498 |
s nextPutLine:' "list all packages which should be ignored in the automatic'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1499 |
s nextPutLine:' preRequisites scan. See #preRequisites for more."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1500 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1501 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1502 |
s nextPutLine:' )' |
12425 | 1503 |
]. |
1504 |
! |
|
1505 |
||
9998 | 1506 |
extensionMethodNames_code |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1507 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1508 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1509 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1510 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1511 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1512 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1513 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1514 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1515 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1516 |
|
15005 | 1517 |
extensionMethodNames_code_For:extensionMethodNames |
1518 |
^ String streamContents:[:s | |
|
1519 |
|spec| |
|
1520 |
||
1521 |
s nextPutLine:'extensionMethodNames'. |
|
1522 |
s nextPutLine:' "lists the extension methods which are to be included in the project.'. |
|
1523 |
s nextPutLine:' Entries are pairwise elements, consisting of class-name and selector."'. |
|
1524 |
s nextPutLine:''. |
|
1525 |
s nextPutLine:' ^ #('. |
|
1526 |
||
1527 |
spec := extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
|
1528 |
spec do:[:entry | |
|
1529 |
|mclassName mselector| |
|
1530 |
||
1531 |
mclassName := entry key asSymbol. |
|
1532 |
(mclassName endsWith:' class') ifTrue:[ |
|
1533 |
mclassName := mclassName asString. |
|
1534 |
]. |
|
1535 |
mselector := entry value asSymbol. |
|
1536 |
||
1537 |
s spaces:8. |
|
1538 |
mclassName storeArrayElementOn:s. |
|
1539 |
s space. |
|
1540 |
mselector storeArrayElementOn:s. |
|
1541 |
s cr. |
|
1542 |
]. |
|
1543 |
s nextPutLine:' )' |
|
1544 |
]. |
|
1545 |
! |
|
1546 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1547 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 1548 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1549 |
|oldSpec| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1550 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1551 |
s nextPutLine:'extensionMethodNames'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1552 |
s nextPutLine:' "lists the extension methods which are to be included in the project.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1553 |
s nextPutLine:' Entries are 2-element array literals, consisting of class-name and selector."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1554 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1555 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1556 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1557 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1558 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1559 |
ignoreOldEntries ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1560 |
oldSpec do:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1561 |
|mclassName mselector| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1562 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1563 |
mclassName := entry key asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1564 |
(mclassName endsWith:' class') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1565 |
mclassName := mclassName asString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1566 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1567 |
mselector := entry value asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1568 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1569 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1570 |
mclassName storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1571 |
s space. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1572 |
mselector storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1573 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1574 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1575 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1576 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1577 |
self searchForExtensions do:[:eachMethod | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1578 |
|attributes oldSpecEntry mclassName mselector| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1579 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1580 |
mclassName := eachMethod mclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1581 |
mselector := eachMethod selector. |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1582 |
"JV@2012-09-07: Do not list Java methods in extensionMethodNames. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1583 |
They are loaded lazily by JavaClassReader and if listed here, |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1584 |
they would cause an error if the package is loaded from source. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1585 |
Sort of a HACK, indeed" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1586 |
eachMethod mclass theNonMetaclass isJavaClass ifFalse:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1587 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1588 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1589 |
s spaces:8. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1590 |
mclassName storeArrayElementOn:s. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1591 |
s space. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1592 |
mselector storeArrayElementOn:s. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1593 |
s cr. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1594 |
] |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1595 |
]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1596 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1597 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1598 |
s nextPutLine:' )' |
9998 | 1599 |
]. |
1600 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1601 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1602 |
self extensionMethodNames_code_ignoreOldEntries:false |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1603 |
stx_libjava extensionMethodNames_code_ignoreOldEntries:false |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1604 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1605 |
" |
9998 | 1606 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1607 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1608 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1609 |
"Modified: / 18-11-2012 / 19:41:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1610 |
! |
1611 |
||
1612 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
15052 | 1613 |
"generate code for each contents-specifying method |
1614 |
(classesAndAttributes, extensionMethodNames, etc.), |
|
1615 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1616 |
If ignoreOldDefinition is true, new code is generated (class/method scan); |
|
1617 |
otherwise, new items are added to the existing lists" |
|
1618 |
||
13419 | 1619 |
aTwoArgBlock |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1620 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1621 |
value:'description - contents'. |
13419 | 1622 |
|
1623 |
aTwoArgBlock |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1624 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1625 |
value: 'description - contents'. |
13419 | 1626 |
|
1627 |
aTwoArgBlock |
|
14843 | 1628 |
value: self mandatoryPreRequisites_code |
1629 |
value: 'description'. |
|
1630 |
||
1631 |
aTwoArgBlock |
|
1632 |
value: self referencedPreRequisites_code |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1633 |
value: 'description'. |
13419 | 1634 |
|
14812 | 1635 |
((self class includesSelector:#excludedFromPreRequisites) not or:[ignoreOldDefinition]) ifTrue:[ |
1636 |
aTwoArgBlock |
|
1637 |
value: self excludedFromPreRequisites_code |
|
1638 |
value: 'description'. |
|
1639 |
]. |
|
13411 | 1640 |
|
14988 | 1641 |
aTwoArgBlock |
1642 |
value: self subProjects_code |
|
1643 |
value: 'description'. |
|
1644 |
||
13411 | 1645 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1646 |
aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1647 |
value: self monticelloTimestamps_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1648 |
value: 'description - monticello'. |
13411 | 1649 |
]. |
1650 |
||
1651 |
"Modified: / 09-11-2010 / 18:41:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1652 |
! |
|
1653 |
||
9998 | 1654 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
15052 | 1655 |
"update code for each method (contents plus version info), |
1656 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1657 |
New items are added to the existing lists" |
|
1658 |
||
9998 | 1659 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
1660 |
! |
|
1661 |
||
1662 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
15052 | 1663 |
"generate code for each method (contents plus version info), |
1664 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1665 |
If ignoreOldDefinition is true, new code is generated (class/method scan); |
|
1666 |
otherwise, new items are added to the existing lists" |
|
1667 |
||
13419 | 1668 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1669 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1670 |
ignoreOldDefinition:ignoreOldDefinition. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1671 |
|
13873 | 1672 |
"/ code like: |
1673 |
"/ |
|
1674 |
"/ (self class includesSelector:#productName) ifFalse:[ |
|
1675 |
"/ aTwoArgBlock |
|
1676 |
"/ value: self productName_code |
|
1677 |
"/ value: 'description - project information'. |
|
1678 |
"/ ]. |
|
1679 |
||
1680 |
#( |
|
1681 |
(productName productName_code) |
|
1682 |
(description description_code) |
|
1683 |
(companyName companyName_code) |
|
1684 |
(legalCopyright legalCopyright_code) |
|
1685 |
) pairsDo:[:selector :codeMethodSelector | |
|
1686 |
(self class includesSelector:selector) ifFalse:[ |
|
1687 |
aTwoArgBlock |
|
1688 |
value: (self perform:codeMethodSelector) |
|
1689 |
value: 'description - project information'. |
|
1690 |
]. |
|
11072 | 1691 |
]. |
9998 | 1692 |
|
13411 | 1693 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1694 |
aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1695 |
value: self monticelloTimestamps_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1696 |
value: 'description - monticello'. |
13411 | 1697 |
]. |
1698 |
||
9998 | 1699 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
13411 | 1700 |
"Modified: / 09-11-2010 / 18:41:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13873 | 1701 |
"Modified: / 21-12-2011 / 16:42:41 / cg" |
9998 | 1702 |
! |
1703 |
||
1704 |
legalCopyright_code |
|
1705 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1706 |
s nextPutLine:'legalCopyright'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1707 |
s nextPutLine:' "Return a copyright string which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1708 |
s cr; nextPutLine:' ^ ', self legalCopyright storeString. |
9998 | 1709 |
]. |
1710 |
||
1711 |
" |
|
13419 | 1712 |
self legalCopyright_code |
1713 |
stx_libbasic3 legalCopyright_code |
|
9998 | 1714 |
" |
1715 |
||
1716 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1717 |
! |
|
1718 |
||
14843 | 1719 |
mandatoryPreRequisites_code |
1720 |
"generate the code of the #mandatoryPreRequisites method" |
|
1721 |
||
1722 |
|preRequisites| |
|
1723 |
||
1724 |
preRequisites := self searchForPreRequisites first. |
|
1725 |
preRequisites removeAllKeys:self excludedFromPreRequisites ifAbsent:[]. |
|
1726 |
||
1727 |
^ String streamContents:[:s | |
|
1728 |
s nextPutLine:'mandatoryPreRequisites'. |
|
1729 |
s nextPutLine:' "list all required mandatory packages.'. |
|
1730 |
s nextPutLine:' Packages are mandatory, if they contain superclasses of the package''s classes'. |
|
1731 |
s nextPutLine:' or classes which are extended by this package.'. |
|
1732 |
s nextPutLine:' This list can be maintained manually or (better) generated and'. |
|
1733 |
s nextPutLine:' updated by scanning the superclass hierarchies'. |
|
1734 |
s nextPutLine:' (the browser has a menu function for that)'. |
|
1735 |
s nextPutLine:' However, often too much is found, and you may want to explicitely'. |
|
1736 |
s nextPutLine:' exclude individual packages in the #excludedFromPreRequisites method."'. |
|
1737 |
s nextPutLine:''. |
|
1738 |
s nextPutLine:' ^ #('. |
|
1739 |
preRequisites keys asSortedCollection do:[:eachPackageID | |
|
1740 |
|reason| |
|
1741 |
||
1742 |
s spaces:8. |
|
1743 |
eachPackageID asSymbol storeOn:s. |
|
1744 |
reason := preRequisites at:eachPackageID ifAbsent:nil. |
|
1745 |
reason notEmptyOrNil ifTrue:[ |
|
1746 |
s nextPutAll:' "'; nextPutAll:reason anElement; nextPutAll:' "'. |
|
1747 |
]. |
|
1748 |
s cr. |
|
1749 |
]. |
|
1750 |
s nextPutLine:' )' |
|
1751 |
]. |
|
1752 |
||
1753 |
" |
|
1754 |
demo_demoApp1 mandatoryPreRequisites_code |
|
1755 |
stx_libbasic3 mandatoryPreRequisites_code |
|
1756 |
stx_libtool2 mandatoryPreRequisites_code |
|
1757 |
" |
|
1758 |
||
1759 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1760 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
1761 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
|
1762 |
! |
|
1763 |
||
13873 | 1764 |
productInstallDirBaseName_code |
1765 |
^ String streamContents:[:s | |
|
1766 |
s nextPutLine:'productInstallDirBaseName'. |
|
1767 |
s nextPutLine:' "Returns a default installDir which will appear in <app>.nsi.'. |
|
1768 |
s nextPutLine:' This is usually not the one you want to keep"'. |
|
1769 |
s cr; |
|
1770 |
nextPutLine:' ^ (self package asCollectionOfSubstringsSeparatedByAny:'':/'') last'. |
|
1771 |
]. |
|
1772 |
||
1773 |
" |
|
1774 |
self productInstallDirBaseName_code |
|
1775 |
stx_libbasic3 productInstallDirBaseName_code |
|
1776 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDirBaseName_code |
|
1777 |
" |
|
1778 |
||
1779 |
"Created: / 21-12-2011 / 16:38:11 / cg" |
|
1780 |
! |
|
1781 |
||
9998 | 1782 |
productName_code |
12541 | 1783 |
^ self productName_codeFor:(self productName) |
1784 |
||
1785 |
" |
|
1786 |
self productName_code |
|
1787 |
stx_libbasic3 productName_code |
|
1788 |
" |
|
1789 |
||
1790 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
1791 |
! |
|
1792 |
||
1793 |
productName_codeFor:aString |
|
9998 | 1794 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1795 |
s nextPutLine:'productName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1796 |
s nextPutLine:' "Return a product name which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1797 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1798 |
]. |
1799 |
||
1800 |
" |
|
1801 |
self productName_code |
|
1802 |
stx_libbasic3 productName_code |
|
1803 |
" |
|
1804 |
||
1805 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
12028 | 1806 |
! |
1807 |
||
14843 | 1808 |
referencedPreRequisites_code |
1809 |
"generate the code of the #referencedPreRequisites method" |
|
1810 |
||
1811 |
|preRequisitesColl preRequisites| |
|
1812 |
||
1813 |
preRequisitesColl := self searchForPreRequisites. |
|
14885 | 1814 |
preRequisites := preRequisitesColl second. |
14843 | 1815 |
preRequisites |
1816 |
removeAllKeys:self excludedFromPreRequisites ifAbsent:[]; |
|
1817 |
removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites" |
|
1818 |
||
1819 |
^ String streamContents:[:s | |
|
1820 |
s nextPutLine:'referencedPreRequisites'. |
|
1821 |
s nextPutLine:' "list all packages containing classes referenced by the packages''s members.'. |
|
1822 |
s nextPutLine:' This list can be maintained manually or (better) generated and'. |
|
1823 |
s nextPutLine:' updated by looking for global variable accesses'. |
|
1824 |
s nextPutLine:' (the browser has a menu function for that)'. |
|
1825 |
s nextPutLine:' However, often too much is found, and you may want to explicitely'. |
|
1826 |
s nextPutLine:' exclude individual packages in the #excludedFromPreRequisites method."'. |
|
1827 |
s nextPutLine:''. |
|
1828 |
s nextPutLine:' ^ #('. |
|
1829 |
preRequisites keys asSortedCollection do:[:eachPackageID | |
|
1830 |
|reason| |
|
1831 |
||
1832 |
s spaces:8. |
|
1833 |
eachPackageID asSymbol storeOn:s. |
|
1834 |
reason := preRequisites at:eachPackageID ifAbsent:nil. |
|
1835 |
reason notEmptyOrNil ifTrue:[ |
|
1836 |
s nextPutAll:' "'; nextPutAll:reason anElement; nextPutAll:' "'. |
|
1837 |
]. |
|
1838 |
s cr. |
|
1839 |
]. |
|
1840 |
s nextPutLine:' )' |
|
1841 |
]. |
|
1842 |
||
1843 |
" |
|
1844 |
demo_demoApp1 referencedPreRequisites_code |
|
1845 |
stx_libbasic3 referencedPreRequisites_code |
|
1846 |
stx_libtool2 referencedPreRequisites_code |
|
1847 |
" |
|
1848 |
||
1849 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1850 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
1851 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
|
1852 |
! |
|
1853 |
||
14988 | 1854 |
subProjects_code |
1855 |
"generate the code of the #subProjects method. |
|
1856 |
Returns nil if no such code is needed (because there are none)" |
|
1857 |
||
1858 |
^ String streamContents:[:s | |
|
1859 |
s nextPutLine:'subProjects'. |
|
1860 |
s nextPutLine:' "list packages which are known as subprojects.'. |
|
1861 |
s nextPutLine:' The generated makefile will enter those and make there as well.'. |
|
1862 |
s nextPutLine:' However: they are not forced to be loaded when a package is loaded;'. |
|
1863 |
s nextPutLine:' for those, redefine requiredPrerequisites"'. |
|
1864 |
s nextPutLine:''. |
|
1865 |
s nextPutLine:' ^ #('. |
|
1866 |
ProjectDefinition allSubclassesDo:[:each | |
|
1867 |
(each package startsWith:(self package,'/')) ifTrue:[ |
|
1868 |
s nextPutLine:' #''',each package,''''. |
|
1869 |
] |
|
1870 |
]. |
|
1871 |
s nextPutLine:' )' |
|
1872 |
]. |
|
1873 |
! |
|
1874 |
||
12028 | 1875 |
svnRevisionNr_code: revisionNrOrNil |
1876 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1877 |
s nextPutLine:'svnRevisionNr'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1878 |
s nextPutLine:' "Return a SVN revision number of myself.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1879 |
s nextPutLine:' This number is updated after a commit"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1880 |
s cr; |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1881 |
nextPutLine:' ^ "$SVN-Revision:"''', ('%-16s' printf: (Array with: revisionNrOrNil printString)) , '''"$"'. |
12028 | 1882 |
]. |
1883 |
||
1884 |
" |
|
1885 |
self svnRevisionNr_code |
|
1886 |
stx_libbasic3 svnRevisionNr_code |
|
1887 |
" |
|
1888 |
||
1889 |
"Created: / 16-06-2009 / 12:12:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1890 |
"Modified: / 22-08-2009 / 09:05:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1891 |
"Modified: / 29-03-2012 / 18:43:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1892 |
! ! |
1893 |
||
9569 | 1894 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 1895 |
|
9664 | 1896 |
applicationTypes |
9714 | 1897 |
GUIApplicationType isNil ifTrue:[self initialize]. |
1898 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 1899 |
|
9714 | 1900 |
" |
13419 | 1901 |
self applicationTypes |
9714 | 1902 |
" |
9664 | 1903 |
! |
1904 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1905 |
defaultCategory |
10466 | 1906 |
^'* Projects & Packages *' |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1907 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1908 |
"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
|
1909 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1910 |
|
9714 | 1911 |
defaultProjectType |
9745 | 1912 |
^ self libraryTypes first |
1913 |
"/ ^ self applicationTypes first |
|
9714 | 1914 |
|
1915 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1916 |
! |
|
1917 |
||
1918 |
defaultProjectTypeForGUIApplication |
|
1919 |
^ GUIApplicationType |
|
1920 |
! |
|
1921 |
||
1922 |
defaultProjectTypeForNonGUIApplication |
|
1923 |
^ NonGUIApplicationType |
|
1924 |
! |
|
9664 | 1925 |
|
9714 | 1926 |
guiApplicationType |
1927 |
^ GUIApplicationType |
|
1928 |
! |
|
1929 |
||
1930 |
libraryType |
|
1931 |
^ LibraryType |
|
1932 |
! |
|
1933 |
||
13419 | 1934 |
libraryTypes |
9714 | 1935 |
LibraryType isNil ifTrue:[self initialize]. |
1936 |
^ Array with:LibraryType |
|
1937 |
||
1938 |
" |
|
13419 | 1939 |
self libraryTypes |
9714 | 1940 |
" |
1941 |
! |
|
1942 |
||
1943 |
nonGuiApplicationType |
|
1944 |
^ NonGUIApplicationType |
|
9664 | 1945 |
! |
1946 |
||
12331 | 1947 |
projectTypeSelectors |
1948 |
"a list of possible project type selectors" |
|
1949 |
||
1950 |
^ #( libraryType guiApplicationType nonGuiApplicationType ) |
|
1951 |
||
1952 |
" |
|
1953 |
self libraryType |
|
1954 |
self guiApplicationType |
|
1955 |
self nonGuiApplicationType |
|
1956 |
" |
|
1957 |
||
1958 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1959 |
! |
|
1960 |
||
9664 | 1961 |
projectTypes |
12331 | 1962 |
"a list of possible project types" |
1963 |
||
9664 | 1964 |
^ self libraryTypes , self applicationTypes |
1965 |
||
12331 | 1966 |
" |
1967 |
self projectTypes |
|
1968 |
" |
|
1969 |
||
9664 | 1970 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
9536 | 1971 |
! ! |
1972 |
||
9569 | 1973 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 1974 |
|
13419 | 1975 |
excludedFromPreRequisites |
9983 | 1976 |
"list packages which are to be explicitely excluded from the automatic constructed |
1977 |
prerequisites list. If empty, everything that is found along the inheritance of any of |
|
1978 |
my classes is considered to be a prerequisite package." |
|
1979 |
||
1980 |
^ #() |
|
1981 |
||
1982 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
1983 |
! |
|
1984 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1985 |
excludedFromSubProjects |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1986 |
"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
|
1987 |
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
|
1988 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1989 |
^ #() |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1990 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1991 |
"Modified: / 17-08-2006 / 19:49:40 / cg" |
10039 | 1992 |
! |
1993 |
||
14808 | 1994 |
includedInPreRequisites |
1995 |
"list packages which are to be explicitely included in the prerequisites list, |
|
1996 |
even if not found by the automatic search. |
|
1997 |
Redefine this, if classes from other packages are referred to via reflection |
|
1998 |
or by constructing names dynamically (i.e. the search cannot find it)" |
|
1999 |
||
2000 |
^ #() |
|
2001 |
! |
|
2002 |
||
14843 | 2003 |
mandatoryPreRequisites |
2004 |
"list packages which are mandatory as a prerequisite. |
|
2005 |
This are packages containing superclasses of my classes and classes which |
|
2006 |
are extended by myself. |
|
2007 |
They are mandatory, beacuse we need these packages as a prerequisite for loading and compiling. |
|
2008 |
This method is generated automatically, |
|
2009 |
by searching along the inheritance chain of all of my classes." |
|
9575 | 2010 |
|
2011 |
^ #() |
|
14843 | 2012 |
! |
2013 |
||
2014 |
preRequisites |
|
2015 |
"list packages which are required as a prerequisite." |
|
2016 |
||
2017 |
"use an OrderedSet here, so that mandatory prerequisites come first" |
|
2018 |
||
2019 |
^ OrderedSet new |
|
2020 |
addAll:self mandatoryPreRequisites; |
|
2021 |
addAll:self referencedPreRequisites; |
|
2022 |
addAll:self includedInPreRequisites; |
|
2023 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
2024 |
yourself. |
|
9575 | 2025 |
|
2026 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
2027 |
! |
|
2028 |
||
14843 | 2029 |
preRequisitesFor:packageId |
2030 |
|def| |
|
13411 | 2031 |
|
2032 |
def := self definitionClassForPackage:packageId. |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2033 |
def isNil ifTrue:[ |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2034 |
"Maybe the package is not loaded? Try to load it..." |
14843 | 2035 |
(Smalltalk loadPackage:packageId) ifTrue:[ |
2036 |
def := self definitionClassForPackage:packageId |
|
2037 |
] |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2038 |
]. |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2039 |
^ def isNil |
14843 | 2040 |
ifTrue:[ |
2041 |
"Still no project definition - maybe it does not exist?" |
|
2042 |
Transcript showCR:'Warning: no definition class for package: ', packageId. |
|
14866 | 2043 |
((self searchForPreRequisites:packageId) |
2044 |
fold:[:d1 :d2| d1 addAll:d2; yourself]) keys |
|
14843 | 2045 |
] |
2046 |
ifFalse:[ def effectivePreRequisites ] |
|
13411 | 2047 |
|
2048 |
"Created: / 24-02-2011 / 22:47:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2049 |
"Modified: / 18-11-2011 / 14:52:43 / cg" |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2050 |
"Modified (format): / 19-11-2011 / 11:25:36 / cg" |
13411 | 2051 |
! |
2052 |
||
14843 | 2053 |
referencedPreRequisites |
2054 |
"list packages which are a prerequisite, because the contain |
|
2055 |
classes which are referenced by my classes. |
|
2056 |
We do not need these packages as a prerequisite for loading or compiling. |
|
2057 |
This method is generated automatically, |
|
2058 |
by searching along the inheritance chain of all of my classes." |
|
2059 |
||
2060 |
^ #() |
|
12186 | 2061 |
! |
2062 |
||
9685 | 2063 |
siblingsAreSubProjects |
2064 |
^ false |
|
2065 |
! |
|
2066 |
||
11377 | 2067 |
splashFileName |
2068 |
"answer the base-name of the splash bitmap. |
|
2069 |
||
2070 |
Default is nil, for no splash. If non-nil, it must be a bmp file's name" |
|
2071 |
||
2072 |
^ nil. |
|
2073 |
! |
|
2074 |
||
9575 | 2075 |
subProjects |
14959 | 2076 |
"list packages which are known as subprojects. |
2077 |
The generated makefile will enter those and make there as well. |
|
14988 | 2078 |
However: they are not forced to be loaded when a package is loaded; |
2079 |
for those, redefine requiredPrerequisites." |
|
9575 | 2080 |
|
2081 |
^ #() |
|
2082 |
||
2083 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
2084 |
! ! |
|
2085 |
||
12372 | 2086 |
!ProjectDefinition class methodsFor:'description - actions'! |
2087 |
||
2088 |
postLoadAction |
|
2089 |
"invoked after loading a project" |
|
2090 |
||
2091 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2092 |
||
2093 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
2094 |
! |
|
2095 |
||
2096 |
preLoadAction |
|
2097 |
"invoked before loading a project" |
|
2098 |
||
2099 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2100 |
! |
|
2101 |
||
2102 |
preUnloadAction |
|
2103 |
"invoked before unloading a project" |
|
2104 |
||
2105 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2106 |
||
2107 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
2108 |
! ! |
|
2109 |
||
9575 | 2110 |
!ProjectDefinition class methodsFor:'description - classes'! |
2111 |
||
9621 | 2112 |
additionalClassNamesAndAttributes |
15124 | 2113 |
"a List of classes, that belong to the project, but may not be included |
2114 |
in the image (someone may have removed it by purpose)" |
|
2115 |
||
9621 | 2116 |
^ #() |
2117 |
||
2118 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
2119 |
! |
|
2120 |
||
9607 | 2121 |
classNamesAndAttributes |
12368 | 2122 |
"a correponding method with real names must be present in my concrete subclasses" |
9575 | 2123 |
|
12202 | 2124 |
"/ should this be a subclassResponsibility here ? |
9595 | 2125 |
^ #() |
9536 | 2126 |
|
9575 | 2127 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
2128 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
2129 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
2130 |
! |
|
2131 |
||
2132 |
extensionMethodNames |
|
2133 |
"list class/selector pairs of extensions. |
|
12368 | 2134 |
A correponding method with real names must be present in my concrete subclasses" |
2135 |
||
2136 |
"/ should this be a subclassResponsibility here ? |
|
9595 | 2137 |
^ #() |
9575 | 2138 |
|
2139 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2140 |
! |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2141 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2142 |
ignoredClassNames |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2143 |
"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
|
2144 |
generated classNamesAndAttributes spec" |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2145 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2146 |
^ #() |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2147 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2148 |
"Created: / 23-01-2007 / 19:08:27 / cg" |
9575 | 2149 |
! ! |
2150 |
||
2151 |
!ProjectDefinition class methodsFor:'description - compilation'! |
|
9536 | 2152 |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2153 |
additionalBaseAddressDefinition_bc_dot_mak |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2154 |
"allows for a base-address definition to be added to the bc.mak file. |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2155 |
Subclasses may redefine this to something like |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2156 |
LIB_BASE=$(LIBWIDG_BASE) |
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2157 |
This will be inserted BEFORE the 'include stdHeader' |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2158 |
" |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2159 |
|
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2160 |
^ nil |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2161 |
! |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2162 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2163 |
additionalDefinitions |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2164 |
"allows for additional definitions/rules to be added to the make.proto and bc.mak file." |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2165 |
|
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2166 |
^ '' |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2167 |
! |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2168 |
|
10306 | 2169 |
additionalDefinitions_bc_dot_mak |
2170 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 2171 |
Subclasses may redefine this." |
10306 | 2172 |
|
2173 |
^ self additionalDefinitions_nt_dot_mak |
|
2174 |
||
2175 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2176 |
! |
|
2177 |
||
9625 | 2178 |
additionalDefinitions_make_dot_proto |
2179 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
2180 |
||
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2181 |
^ self additionalDefinitions |
9625 | 2182 |
|
2183 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
2184 |
! |
|
2185 |
||
2186 |
additionalDefinitions_nt_dot_mak |
|
10306 | 2187 |
"obsolete - kept for compatibility with old project files" |
9625 | 2188 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2189 |
^ self additionalDefinitions |
9625 | 2190 |
|
2191 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2192 |
! |
|
2193 |
||
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2194 |
additionalHeaderRulesUsingTemplate:template pathConverter:pathConverter |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2195 |
"rules for header files (of autoloaded classes). |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2196 |
For each extended class, which is autoloaded (and therefore, we will not find a header file for it), |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2197 |
generate a rule to create the header file only." |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2198 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2199 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2200 |
(self extensionClassesWithSuperclasses:true) do:[:eachExtendedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2201 |
|headerFileDirPath baseFilename| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2202 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2203 |
(eachExtendedClass isLoaded not or:[eachExtendedClass wasAutoloaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2204 |
headerFileDirPath := self perform:pathConverter with:eachExtendedClass package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2205 |
baseFilename := self filenameForClass:eachExtendedClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2206 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2207 |
s nextPutAll:(template |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2208 |
bindWith:headerFileDirPath |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2209 |
with:baseFilename). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2210 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2211 |
]. |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2212 |
]. |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2213 |
|
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2214 |
"Created: / 12-09-2011 / 16:23:52 / cg" |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2215 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2216 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2217 |
additionalHeaderRules_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2218 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2219 |
|
13695 | 2220 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2221 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_bc_dot_mak) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2222 |
pathConverter:#pathToPackage_win32: |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2223 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2224 |
"Created: / 12-09-2011 / 15:44:09 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2225 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2226 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2227 |
additionalHeaderRules_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2228 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2229 |
|
13695 | 2230 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2231 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_make_dot_proto) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2232 |
pathConverter:#pathToPackage_unix: |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2233 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2234 |
"Created: / 12-09-2011 / 15:44:28 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2235 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2236 |
|
10306 | 2237 |
additionalLinkLibraries_bc_dot_mak |
2238 |
"allows for additional static libraries to be added to the bc.mak file. |
|
2239 |
Subclasses may redefine this" |
|
2240 |
||
2241 |
"backward compatibilty with old projects" |
|
2242 |
||
2243 |
^ self additionalLinkLibraries_nt_dot_mak |
|
2244 |
||
2245 |
||
2246 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2247 |
! |
|
2248 |
||
9733 | 2249 |
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
|
2250 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 2251 |
|
2252 |
^ '' |
|
2253 |
||
2254 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2255 |
! |
|
2256 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2257 |
additionalLinkLibraries_nt_dot_mak |
10306 | 2258 |
"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
|
2259 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2260 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2261 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2262 |
"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
|
2263 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2264 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2265 |
additionalRulesHG_bc_dot_mak |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2266 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2267 |
(self class includesSelector: #version_HG) ifFalse:[^'']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2268 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2269 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2270 |
# **Must be at end** |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2271 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2272 |
# Enforce recompilation of package definition class if Mercurial working |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2273 |
# copy state changes. Together with --guessVersion it ensures that package |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2274 |
# definition class always contains correct binary revision string. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2275 |
!!IFDEF HGROOT |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2276 |
$(OUTDIR)%1.$(O): $(HGROOT)\.hg\dirstate |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2277 |
!!ENDIF |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2278 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2279 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2280 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2281 |
stx_libscm_mercurial additionalRulesHG_bc_dot_mak |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2282 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2283 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2284 |
"Created: / 28-11-2012 / 10:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2285 |
"Modified: / 08-12-2012 / 12:18:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2286 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2287 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2288 |
additionalRulesHG_make_dot_proto |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2289 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2290 |
(self class includesSelector: #version_HG) ifFalse:[^'']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2291 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2292 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2293 |
# Enforce recompilation of package definition class if Mercurial working |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2294 |
# copy state changes. Together with --guessVersion it ensures that package |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2295 |
# definition class always contains correct binary revision string. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2296 |
ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n ''**NOHG**'')) |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2297 |
%1.$(O): $(shell hg root)/.hg/dirstate |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2298 |
endif |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2299 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2300 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2301 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2302 |
stx_libscm_mercurial additionalRulesHG_make_dot_proto |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2303 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2304 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2305 |
"Created: / 28-11-2012 / 10:12:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2306 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2307 |
|
12028 | 2308 |
additionalRulesSvn_make_dot_proto |
2309 |
||
2310 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
2311 |
||
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2312 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2313 |
# Update SVN revision in package definition class |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2314 |
ifneq (,$(findstring .svn,$(wildcard .svn))) |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2315 |
.svnversion: *.st |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2316 |
if [ -d .svn ]; then \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2317 |
rev=$(shell svnversion -n); \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2318 |
echo -n $$rev > .svnversion; \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2319 |
else \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2320 |
echo -n exported > .svnversion; \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2321 |
fi |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2322 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2323 |
%1.o: %1.st .svnversion |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2324 |
@if [ -d .svn ]; then \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2325 |
rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2326 |
echo " [SV] Expanding svnRevisionNo in $1.st"; \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2327 |
sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\''$$rev2\''\"\$$\"/g" $< > .%1.svn.st; \ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2328 |
fi |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2329 |
$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.%1.svn $(C_RULE); |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2330 |
sed -i -e "s/\".%1.svn.st\");/\"\%1.st\");/g" .%1.svn.c |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2331 |
$(MAKE) .%1.svn.$(O) |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2332 |
@mv .%1.svn.$(O) %1.$(O) |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2333 |
endif |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2334 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2335 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2336 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2337 |
stx_libbasic3 additionalRulesSvn_make_dot_proto |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2338 |
" |
12028 | 2339 |
|
2340 |
"Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2341 |
"Modified: / 28-11-2012 / 10:12:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2342 |
! |
2343 |
||
10306 | 2344 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2345 |
"obsolete - kept for compatibility with old project files" |
13419 | 2346 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2347 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2348 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2349 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 2350 |
! |
2351 |
||
9625 | 2352 |
additionalRules_make_dot_proto |
2353 |
"allows for additional rules to be added to the make.proto file." |
|
2354 |
||
2355 |
^ '' |
|
2356 |
||
2357 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
2358 |
! |
|
2359 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2360 |
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
|
2361 |
"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
|
2362 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2363 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2364 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2365 |
|
12028 | 2366 |
additionalTargetsSvn_make_dot_proto |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2367 |
"Returns additional targets to make when build projec |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2368 |
checked out from SVN" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2369 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2370 |
"As of 2011-02-06, new version of libsvn does not use any additional targets" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2371 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2372 |
^'' |
12028 | 2373 |
|
2374 |
"Created: / 24-06-2009 / 21:35:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2375 |
"Modified (comment): / 06-02-2012 / 15:34:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2376 |
! |
2377 |
||
10306 | 2378 |
additionalTargets_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2379 |
"obsolete - kept for compatibility with old project files" |
13419 | 2380 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2381 |
^ '' |
10306 | 2382 |
|
2383 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
2384 |
! |
|
2385 |
||
9625 | 2386 |
additionalTargets_make_dot_proto |
2387 |
"allows for additional targets to be added to the make.proto file." |
|
2388 |
||
2389 |
^ '' |
|
2390 |
||
2391 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2392 |
! |
|
2393 |
||
10979 | 2394 |
globalDefines |
2395 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2396 |
an subprojects" |
|
2397 |
||
2398 |
^ '' |
|
2399 |
! |
|
2400 |
||
2401 |
globalDefines_unix |
|
2402 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2403 |
an subprojects" |
|
2404 |
||
2405 |
^ self globalDefines |
|
2406 |
! |
|
2407 |
||
2408 |
globalDefines_win32 |
|
2409 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2410 |
an subprojects" |
|
2411 |
||
2412 |
^ self globalDefines |
|
2413 |
! |
|
2414 |
||
10331 | 2415 |
localDefines |
10979 | 2416 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2417 |
|
2418 |
^ '' |
|
2419 |
! |
|
2420 |
||
2421 |
localDefines_unix |
|
10979 | 2422 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2423 |
|
2424 |
^ self localDefines |
|
2425 |
! |
|
2426 |
||
2427 |
localDefines_win32 |
|
10979 | 2428 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2429 |
|
2430 |
^ self localDefines |
|
2431 |
! |
|
2432 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2433 |
localIncludes |
10979 | 2434 |
"allow for the specification of additional include directories" |
9714 | 2435 |
|
2436 |
^ '' |
|
2437 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2438 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2439 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2440 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2441 |
localIncludes_unix |
10979 | 2442 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2443 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2444 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2445 |
|
9714 | 2446 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2447 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 2448 |
! |
2449 |
||
2450 |
localIncludes_win32 |
|
10979 | 2451 |
"allow for the specification of additional include directories" |
9714 | 2452 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2453 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 2454 |
|
2455 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2456 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 2457 |
! |
2458 |
||
11576
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2459 |
primaryTarget |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2460 |
"allows the primary make target to be defined in the Make.proto/bc.mak file." |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2461 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2462 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2463 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2464 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2465 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2466 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2467 |
primaryTarget_bc_dot_mak |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2468 |
"allows the primary make target to be defined in the bc.mak file." |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2469 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2470 |
^ self primaryTarget |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2471 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2472 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2473 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2474 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2475 |
primaryTarget_make_dot_proto |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2476 |
"allows the primary make target to be defined in the Make.proto file." |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2477 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2478 |
^ self primaryTarget |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2479 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2480 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2481 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2482 |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2483 |
singleHeaderRuleTemplate_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2484 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2485 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2486 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2487 |
%1\%2.$(H): |
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2488 |
pushd %1 \ |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2489 |
& $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2490 |
& popd |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2491 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2492 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2493 |
"Created: / 12-09-2011 / 15:55:49 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2494 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2495 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2496 |
singleHeaderRuleTemplate_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2497 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2498 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2499 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2500 |
%1/%2.$(H): |
15173 | 2501 |
cd %1 && $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2502 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2503 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2504 |
"Created: / 12-09-2011 / 15:55:57 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2505 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2506 |
|
9575 | 2507 |
stcOptimizationOptions |
2508 |
"see the stc reference / stc usage for options. |
|
2509 |
For now, the following variants are useful: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2510 |
+optspace3 most compact code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2511 |
- use for all gui, application code. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2512 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2513 |
+optinline +optinline2 +inlineNew |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2514 |
fastest code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2515 |
- use only for computation-intensive classes" |
9575 | 2516 |
|
2517 |
^ '+optspace3' |
|
2518 |
||
2519 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 2520 |
! |
2521 |
||
9575 | 2522 |
stcWarningOptions |
2523 |
"see the stc reference / stc usage for options. |
|
2524 |
For now, the following variants are useful: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2525 |
-warn no warnings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2526 |
-warnNonStandard no warnings about non-standard smalltalk features" |
9575 | 2527 |
|
9714 | 2528 |
^ '-warnNonStandard' |
9575 | 2529 |
|
2530 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
2531 |
! ! |
|
9536 | 2532 |
|
9575 | 2533 |
!ProjectDefinition class methodsFor:'description - project information'! |
2534 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2535 |
applicationAdditionalIconFileNames |
13419 | 2536 |
"Return the icon-filenames for additional icons of the application |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2537 |
(empty collection if there are none)" |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2538 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2539 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2540 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2541 |
|
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2542 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2543 |
"Return the icon-filename for the application (nil if there is none)" |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2544 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2545 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2546 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2547 |
|
9575 | 2548 |
companyName |
9584 | 2549 |
"Returns a company string which will appear in <lib>.rc. |
2550 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2551 |
|
13419 | 2552 |
( |
11172 | 2553 |
#( |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2554 |
'stx' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2555 |
'exept' |
11172 | 2556 |
) includes:self module) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2557 |
^ 'eXept Software AG' |
9575 | 2558 |
]. |
2559 |
||
2560 |
^ 'My Company' |
|
2561 |
||
9584 | 2562 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 2563 |
! |
2564 |
||
2565 |
description |
|
10306 | 2566 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 2567 |
|
9803 | 2568 |
^self productName,' ',self packageName |
2569 |
"/ ^ self name |
|
9536 | 2570 |
|
2571 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 2572 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
2573 |
! |
|
2574 |
||
2575 |
fileDescription |
|
10416 | 2576 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 2577 |
|
9803 | 2578 |
^self description |
9575 | 2579 |
|
2580 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
2581 |
! |
|
2582 |
||
2583 |
fileMajorVersionNr |
|
2584 |
"Returns a versionNumber which will appear in libName.rc" |
|
2585 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2586 |
^ self majorVersionNr |
9575 | 2587 |
|
2588 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 2589 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 2590 |
! |
2591 |
||
2592 |
fileMinorVersionNr |
|
2593 |
"Returns a versionNumber which will appear in libName.rc" |
|
2594 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2595 |
^ self minorVersionNr |
9575 | 2596 |
|
2597 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 2598 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 2599 |
! |
2600 |
||
2601 |
fileReleaseNr |
|
2602 |
"Returns a releaseNumber which will appear in libName.rc" |
|
2603 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2604 |
"take the default revision from the cvs-version, |
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2605 |
but ignore a possibly present 'm'-flag that is set when this revision has been modified" |
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2606 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2607 |
"JV@2012-11-20: Original code was: |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2608 |
|
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2609 |
^ self cvsRevision last upTo:$m |
9575 | 2610 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2611 |
But this is too CVS specific. Modern SCMs does not use X.Y style |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2612 |
revision numbers, instead it uses hashes (Git/Mercurial/Darcs/Monotone). |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2613 |
Even worse, all the SCM code passes strings around, so providing compatible, |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2614 |
polymorph object is not possible. Hence following hack." |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2615 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2616 |
| nr | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2617 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2618 |
nr := (self cvsRevision last upTo:$m) select:[:c|c isDigit]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2619 |
nr isEmptyOrNil ifTrue:[^'0']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2620 |
nr := (nr asInteger min: 16r7FFF) printString. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2621 |
^nr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2622 |
|
9575 | 2623 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
9817 | 2624 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2625 |
"Modified: / 23-11-2012 / 11:24:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9536 | 2626 |
! |
2627 |
||
9575 | 2628 |
fileRevisionNr |
2629 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 2630 |
|
9817 | 2631 |
"take the default revision from the cvs-version" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2632 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2633 |
"JV@2012-11-20: Original code was: |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2634 |
|
9618 | 2635 |
^ self cvsRevision first |
9575 | 2636 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2637 |
But this is too CVS specific. Modern SCMs does not use X.Y style |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2638 |
revision numbers, instead it uses hashes (Git/Mercurial/Darcs/Monotone). |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2639 |
Even worse, all the SCM code passes strings around, so providing compatible, |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2640 |
polymorph object is not possible. Hence following hack." |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2641 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2642 |
| nr | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2643 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2644 |
nr := self cvsRevision first select:[:c|c isDigit]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2645 |
nr isEmptyOrNil ifTrue:[^'0']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2646 |
nr := (nr asInteger min: 16r7FFF) printString. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2647 |
^nr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2648 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2649 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2650 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2651 |
stx_libbasic fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2652 |
stx_libbasic2 fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2653 |
stx_libscm_mercurial fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2654 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2655 |
|
9575 | 2656 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
9817 | 2657 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2658 |
"Modified: / 23-11-2012 / 11:24:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9536 | 2659 |
! |
2660 |
||
9575 | 2661 |
fileVersion |
2662 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2663 |
||
2664 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
2665 |
||
13419 | 2666 |
^ '%1.%2.%3.%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2667 |
bindWith:self fileMajorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2668 |
with:self fileMinorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2669 |
with:self fileRevisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2670 |
with:self fileReleaseNr. |
9575 | 2671 |
|
2672 |
" |
|
2673 |
self fileVersion |
|
2674 |
" |
|
2675 |
||
9817 | 2676 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 2677 |
! |
9536 | 2678 |
|
9575 | 2679 |
fileVersionCommaSeparated |
2680 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2681 |
||
9817 | 2682 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
2683 |
||
13419 | 2684 |
^ '%1,%2,%3,%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2685 |
bindWith:self fileMajorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2686 |
with:self fileMinorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2687 |
with:self fileRevisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2688 |
with:self fileReleaseNr. |
9575 | 2689 |
|
2690 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 2691 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
2692 |
! |
|
2693 |
||
9575 | 2694 |
internalName |
2695 |
"Returns a name string which will appear in libName.rc" |
|
2696 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
2697 |
^ self package |
9575 | 2698 |
|
2699 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 2700 |
! |
2701 |
||
9575 | 2702 |
legalCopyright |
9584 | 2703 |
"Returns a copyright string which will appear in <lib>.rc. |
2704 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2705 |
|
2706 |
self module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2707 |
"hardwired-default" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2708 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
14911 | 2709 |
bindWith:(Date today year) |
9575 | 2710 |
]. |
9817 | 2711 |
self module = 'exept' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2712 |
"hardwired-default" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2713 |
^ 'Copyright eXept Software AG 1998-%1' |
14911 | 2714 |
bindWith:(Date today year) |
9817 | 2715 |
]. |
9575 | 2716 |
|
2717 |
^ 'My CopyRight or CopyLeft' |
|
2718 |
||
14911 | 2719 |
" |
2720 |
self legalCopyright |
|
2721 |
" |
|
2722 |
||
9817 | 2723 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 2724 |
! |
2725 |
||
2726 |
majorVersionNr |
|
2727 |
"Returns a versionNumber which will appear in libName.rc" |
|
2728 |
||
2729 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2730 |
the default here takes smalltalks version number. |
|
2731 |
But thats probably not good for an end-user-app." |
|
2732 |
||
11042 | 2733 |
^ Smalltalk majorVersionNr |
9575 | 2734 |
|
2735 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 2736 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 2737 |
! |
2738 |
||
2739 |
minorVersionNr |
|
2740 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 2741 |
|
9575 | 2742 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2743 |
the default here takes smalltalks version number. |
|
2744 |
But thats probably not good for an end-user-app." |
|
2745 |
||
11042 | 2746 |
^ Smalltalk minorVersionNr |
9575 | 2747 |
|
2748 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 2749 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 2750 |
! |
2751 |
||
2752 |
productDate |
|
11043 | 2753 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 2754 |
|
2755 |
"take the current date - by default" |
|
9536 | 2756 |
|
9575 | 2757 |
^ Timestamp now printStringRFC1123Format |
2758 |
||
2759 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
2760 |
! |
|
2761 |
||
13177 | 2762 |
productDescription |
2763 |
"Returns a description (for autopackage)" |
|
2764 |
||
2765 |
^ self description |
|
2766 |
||
2767 |
"Created: / 21-12-2010 / 09:32:16 / cg" |
|
2768 |
! |
|
2769 |
||
10426 | 2770 |
productFilename |
2771 |
"Returns a filename which be used as linkname, product file name etc." |
|
2772 |
||
2773 |
^ self productNameAsValidFilename |
|
2774 |
||
2775 |
" |
|
13419 | 2776 |
stx_projects_smalltalk productName |
10426 | 2777 |
stx_projects_smalltalk productFilename |
2778 |
" |
|
2779 |
||
2780 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
2781 |
! |
|
2782 |
||
9898 | 2783 |
productInstallDir |
13873 | 2784 |
"Returns a default installDir which will appear in <app>.nsi." |
2785 |
||
2786 |
^ '$PROGRAMFILES\',(self productInstallDirBaseName). |
|
2787 |
||
2788 |
" |
|
2789 |
stx_projects_smalltalk productInstallDir |
|
2790 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDir |
|
2791 |
" |
|
9898 | 2792 |
|
2793 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
2794 |
! |
|
2795 |
||
13873 | 2796 |
productInstallDirBaseName |
2797 |
"Returns a default installDir which will appear in <app>.nsi. |
|
2798 |
This is usually not the one you want to keep" |
|
2799 |
||
2800 |
^ self module |
|
2801 |
||
2802 |
"Created: / 21-12-2011 / 16:31:38 / cg" |
|
2803 |
! |
|
2804 |
||
13177 | 2805 |
productLicense |
2806 |
"Returns the license (for autopackage)" |
|
2807 |
||
2808 |
^ 'Commercial' |
|
2809 |
||
2810 |
"Created: / 21-12-2010 / 09:31:25 / cg" |
|
2811 |
! |
|
2812 |
||
2813 |
productMaintainer |
|
2814 |
"Returns the maintainer (for autopackage)" |
|
2815 |
||
2816 |
^ self companyName |
|
2817 |
||
2818 |
"Created: / 21-12-2010 / 09:26:16 / cg" |
|
2819 |
! |
|
2820 |
||
9575 | 2821 |
productName |
9584 | 2822 |
"Returns a product name which will appear in <lib>.rc. |
15216 | 2823 |
Under win32, this is placed into the dlls file-info. |
2824 |
This method is usually redefined in a concrete application definition" |
|
2825 |
||
2826 |
|m nm| |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2827 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2828 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2829 |
m = 'stx' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2830 |
^ 'Smalltalk/X' |
9575 | 2831 |
]. |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2832 |
m = 'exept' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2833 |
^ 'eXept addOns' |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2834 |
]. |
15343 | 2835 |
|
2836 |
self isApplicationDefinition ifFalse:[ |
|
2837 |
^ 'LibraryName' |
|
2838 |
]. |
|
2839 |
||
15221 | 2840 |
SubclassResponsibilityError handle:[:ex | |
2841 |
"/ we get this error, if the concrete class has not yet redefined |
|
2842 |
"/ startupClassName. |
|
2843 |
self breakPoint:#cg. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2844 |
^ 'ProductName' |
10296 | 2845 |
] do:[ |
15216 | 2846 |
nm := self startupClassName. |
2847 |
(nm endsWith:'Startup') ifTrue:[ |
|
2848 |
^ nm copyButLast:'Startup' size. |
|
2849 |
]. |
|
2850 |
(nm endsWith:'Start') ifTrue:[ |
|
2851 |
^ nm copyButLast:'Start' size. |
|
2852 |
]. |
|
2853 |
^ nm |
|
10296 | 2854 |
]. |
2855 |
||
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2856 |
"Modified: / 08-11-2007 / 16:45:14 / cg" |
9536 | 2857 |
! |
2858 |
||
10426 | 2859 |
productNameAsValidFilename |
2860 |
"Returns a product name which will appear in <lib>.rc. |
|
2861 |
Under win32, this is placed into the dlls file-info" |
|
2862 |
||
2863 |
|nm| |
|
2864 |
||
2865 |
nm := self productName. |
|
2866 |
^ nm copy replaceAny:'/\:;.,' with:$_ |
|
2867 |
||
2868 |
" |
|
2869 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
2870 |
" |
|
2871 |
||
2872 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
2873 |
! |
|
2874 |
||
9898 | 2875 |
productPublisher |
2876 |
"Returns a product publisher which will appear in <app>.nsi." |
|
2877 |
||
2878 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2879 |
^ 'eXept Software AG' |
9898 | 2880 |
]. |
2881 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
2882 |
^ self companyName |
9898 | 2883 |
|
2884 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
2885 |
! |
|
2886 |
||
13177 | 2887 |
productType |
2888 |
"Returns the product type for autopackage" |
|
2889 |
||
2890 |
^ 'Application' |
|
2891 |
||
2892 |
"Created: / 21-12-2010 / 09:28:48 / cg" |
|
2893 |
! |
|
2894 |
||
9575 | 2895 |
productVersion |
11043 | 2896 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 2897 |
|
2898 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 2899 |
|
13419 | 2900 |
^ '%1.%2.%3.%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2901 |
bindWith:self majorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2902 |
with:self minorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2903 |
with:self revisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2904 |
with:self releaseNr. |
9536 | 2905 |
|
9575 | 2906 |
" |
2907 |
self productVersion |
|
2908 |
" |
|
2909 |
||
9817 | 2910 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 2911 |
! |
2912 |
||
9575 | 2913 |
productVersionCommaSeparated |
2914 |
"Returns a product version which will appear in libName.rc" |
|
2915 |
||
2916 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 2917 |
|
13419 | 2918 |
^ '%1,%2,%3,%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2919 |
bindWith:self majorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2920 |
with:self minorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2921 |
with:self revisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2922 |
with:self releaseNr. |
11042 | 2923 |
|
2924 |
" |
|
2925 |
self productVersionCommaSeparated |
|
2926 |
" |
|
9536 | 2927 |
|
9575 | 2928 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 2929 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 2930 |
! |
2931 |
||
9898 | 2932 |
productWebSite |
2933 |
"Returns a product webSite which will appear in <app>.nsi." |
|
2934 |
||
2935 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2936 |
^ 'http://www.exept.de' |
9898 | 2937 |
]. |
2938 |
||
10426 | 2939 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 2940 |
^ 'http://www.yoursite.com' |
2941 |
||
2942 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 2943 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 2944 |
! |
2945 |
||
9575 | 2946 |
releaseNr |
2947 |
"Returns a releaseNr which will appear in libName.rc" |
|
2948 |
||
2949 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2950 |
the default here takes smalltalks version number. |
|
2951 |
But thats probably not good for an end-user-app." |
|
2952 |
||
11042 | 2953 |
^ Smalltalk releaseNr |
9536 | 2954 |
|
9575 | 2955 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 2956 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 2957 |
! |
2958 |
||
2959 |
revisionNr |
|
2960 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 2961 |
|
9575 | 2962 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2963 |
the default here takes smalltalks version number. |
|
2964 |
But thats probably not good for an end-user-app." |
|
2965 |
||
11042 | 2966 |
^ Smalltalk revisionNr |
9575 | 2967 |
|
2968 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 2969 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 2970 |
! |
2971 |
||
2972 |
versionNumber |
|
10306 | 2973 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 2974 |
|
9575 | 2975 |
^'' |
9536 | 2976 |
|
2977 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 2978 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 2979 |
! ! |
2980 |
||
9569 | 2981 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 2982 |
|
13177 | 2983 |
apspecFilename |
13968 | 2984 |
"/ for linux |
13177 | 2985 |
^ 'autopackage/default.apspec' |
2986 |
||
2987 |
"Created: / 21-12-2010 / 09:43:13 / cg" |
|
2988 |
! |
|
2989 |
||
9852 | 2990 |
basicFileNamesToGenerate |
13419 | 2991 |
"answer a dictionary (filename -> generator method) with all the files, |
11937 | 2992 |
that have to be generated for this package" |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2993 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2994 |
|dict| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2995 |
|
13419 | 2996 |
dict := OrderedDictionary withKeysAndValues:#( |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2997 |
'Make.spec' #'generate_make_dot_spec' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2998 |
'Make.proto' #'generate_make_dot_proto' |
15201 | 2999 |
"/ cg: changed to generate Makefile.init instead of Makefile, |
3000 |
"/ because macosx files are not case sensitive. |
|
3001 |
"/ You will have to execute make -f Makefile.init initially |
|
3002 |
"/ 'Makefile' #'generate_makefile' "/ for unix |
|
3003 |
'Makefile.init' #'generate_makefile' "/ for unix |
|
13968 | 3004 |
'bc.mak' #'generate_bc_dot_mak' "/ for windows |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3005 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
13968 | 3006 |
'bmake.bat' #'generate_bmake_dot_mak' "/ for bcc32 |
3007 |
'vcmake.bat' #'generate_vcmake_dot_mak' "/ for msvc |
|
15202 | 3008 |
'lccmake.bat' #'generate_lccmake_dot_mak' "/ for lcc - not supported at the moment |
14345 | 3009 |
"/ 'tccmake.bat' #'generate_tccmake_dot_mak' "/ for tcc - cannot link at the moment |
3010 |
'mingwmake.bat' #'generate_mingwmake_dot_mak' "/ for mingw |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3011 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3012 |
|
13419 | 3013 |
dict |
14060 | 3014 |
at:self rcFilename put:#'generate_packageName_dot_rc'. "/ for windows |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3015 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3016 |
^ dict. |
13154
bac0fcd8a888
make sure that the makefiles are generated before the libInit file
Claus Gittinger <cg@exept.de>
parents:
13148
diff
changeset
|
3017 |
|
14345 | 3018 |
"Modified (comment): / 05-09-2012 / 19:43:07 / cg" |
9852 | 3019 |
! |
3020 |
||
9536 | 3021 |
fileNamesToGenerate |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
3022 |
"answer the files that have to be generated as a dictionary of names and generator method" |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3023 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3024 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3025 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3026 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3027 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3028 |
" |
9536 | 3029 |
! |
3030 |
||
13419 | 3031 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
14930 | 3032 |
"for build-support file generation, checkin etc., use this common method which |
3033 |
enumerates all fileNames with their generated contents to be built." |
|
3034 |
||
9544 | 3035 |
|pairs| |
3036 |
||
3037 |
pairs := OrderedCollection new. |
|
13419 | 3038 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3039 |
|file| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3040 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3041 |
file := self perform:generator. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3042 |
pairs add:(Array with:fileName with:file) |
9544 | 3043 |
]. |
3044 |
||
3045 |
pairs pairsDo:aTwoArgBlock |
|
3046 |
||
3047 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
3048 |
! |
|
3049 |
||
13419 | 3050 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
14930 | 3051 |
"helper for build-support file generation" |
3052 |
||
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3053 |
self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
9831 | 3054 |
|
9898 | 3055 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 3056 |
! |
3057 |
||
3058 |
generateFile:filename |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3059 |
|action| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3060 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3061 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3062 |
action notNil ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3063 |
^ self perform:action |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3064 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3065 |
(filename = 'app.rc' or:[filename = 'lib.rc']) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3066 |
^ self generate_packageName_dot_rc |
9607 | 3067 |
]. |
9850 | 3068 |
(filename = 'loadAll') ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3069 |
^ self generate_loadAll |
9850 | 3070 |
]. |
13177 | 3071 |
self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
3072 |
||
3073 |
"Modified: / 21-12-2010 / 11:01:10 / cg" |
|
13968 | 3074 |
"Modified (format): / 21-01-2012 / 12:31:40 / cg" |
9536 | 3075 |
! |
3076 |
||
13411 | 3077 |
generateFile:filename in: directory |
3078 |
||
3079 |
| dir s | |
|
3080 |
dir := directory asFilename. |
|
3081 |
dir exists ifFalse:[self error:'Directory does not exist']. |
|
3082 |
[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3083 |
s := ( dir / (filename asFilename baseName) ) writeStream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3084 |
s nextPutAll: (self generateFile: filename). |
13411 | 3085 |
] ensure:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3086 |
s ifNotNil:[s close] |
13411 | 3087 |
] |
3088 |
||
3089 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3090 |
stx_projects_smalltalk generateFile:'package.deps.rake' in: '/tmp' |
13411 | 3091 |
" |
3092 |
||
3093 |
"Created: / 26-02-2011 / 10:42:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3094 |
"Modified: / 09-06-2011 / 14:53:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3095 |
! |
|
3096 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3097 |
generateRemoveShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3098 |
"generate a shell script to a cvs remove of broken class filenames. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3099 |
To be called after the output of #generateRenameShellScript: has been performed" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3100 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3101 |
|firstLine| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3102 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3103 |
firstLine := true. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3104 |
self searchForClasses do:[:eachClass| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3105 |
firstLine ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3106 |
aStream nextPutAll:'cvs rm -f '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3107 |
firstLine := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3108 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3109 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3110 |
aStream nextPutAll:eachClass classBaseFilename; space. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3111 |
] |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3112 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3113 |
firstLine ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3114 |
aStream cr. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3115 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3116 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3117 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3118 |
stx_goodies_webServer_htmlTree generateRemoveShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3119 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3120 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3121 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3122 |
generateRenameShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3123 |
"generate a shell script to rename broken class filenames" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3124 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3125 |
self searchForClasses do:[:eachClass| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3126 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3127 |
aStream nextPutAll:'cp '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3128 |
nextPutAll:eachClass classBaseFilename; nextPutAll:',v '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3129 |
nextPutAll:eachClass generateClassFilename; nextPutAll:'.st,v'; cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3130 |
] |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3131 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3132 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3133 |
" |
11981
e479249ba36e
Fix #generateRenameShellScriptOn:
Stefan Vogel <sv@exept.de>
parents:
11980
diff
changeset
|
3134 |
stx_libdb generateRemoveShellScriptOn:Transcript |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3135 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3136 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3137 |
|
9536 | 3138 |
generate_abbrev_dot_stc |
13968 | 3139 |
"/ for stc: provides abbreviations and namespace information |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3140 |
self checkIfClassesArePresent. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
3141 |
|
13419 | 3142 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3143 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3144 |
|addEntry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3145 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3146 |
addEntry := |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3147 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3148 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3149 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3150 |
s nextPutAll:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3151 |
s nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3152 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3153 |
cls := Smalltalk classNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3154 |
cls isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3155 |
fn := self filenameForClass:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3156 |
s nextPutAll:fn. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3157 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3158 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3159 |
s nextPutAll:' '; nextPutAll:'0'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3160 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3161 |
wasLoaded := cls isLoaded. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3162 |
wasLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3163 |
failedToLoad := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3164 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3165 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3166 |
failedToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3167 |
] do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3168 |
ParserFlags |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3169 |
withSTCCompilation:#never |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3170 |
do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3171 |
cls autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3172 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3173 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3174 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3175 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3176 |
fn := self filenameForClass:cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3177 |
(fn includes:Character space) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3178 |
s nextPutAll:fn storeString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3179 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3180 |
s nextPutAll:fn. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3181 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3182 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3183 |
s nextPutAll: (cls category asString storeString). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3184 |
failedToLoad ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3185 |
s nextPutAll:' 0'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3186 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3187 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3188 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3189 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3190 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3191 |
wasLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3192 |
cls unload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3193 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3194 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3195 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3196 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3197 |
|
13968 | 3198 |
s nextPutLine:'# automagically generated by the project definition'. |
3199 |
s nextPutLine:'# this file is needed for stc to be able to compile modules independently.'. |
|
3200 |
s nextPutLine:'# it provides information about a classes filename, category and especially namespace.'. |
|
3201 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3202 |
self allClassNames do:addEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3203 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3204 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3205 |
addEntry value:nm |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3206 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3207 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3208 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3209 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3210 |
" |
13968 | 3211 |
stx_libbasic generate_abbrev_dot_stc |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3212 |
DapasXProject generate_abbrev_dot_stc |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3213 |
DapasX_Datenbasis generate_abbrev_dot_stc |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3214 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
9536 | 3215 |
" |
3216 |
||
3217 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
13968 | 3218 |
"Modified: / 21-01-2012 / 12:42:57 / cg" |
9536 | 3219 |
! |
3220 |
||
13177 | 3221 |
generate_autopackage_default_dot_apspec |
3222 |
||
13419 | 3223 |
^self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3224 |
replaceMappings: self autopackage_default_dot_apspec_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3225 |
in: self autopackage_default_dot_apspec |
13177 | 3226 |
|
3227 |
" |
|
3228 |
stx_projects_smalltalk generate_autopackage_default_dot_apspec |
|
3229 |
" |
|
3230 |
||
3231 |
"Created: / 21-12-2010 / 09:40:04 / cg" |
|
3232 |
! |
|
3233 |
||
13419 | 3234 |
generate_bc_dot_mak |
3235 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3236 |
replaceMappings: self bc_dot_mak_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3237 |
in: self bc_dot_mak) asStringCollection withTabs asString |
10306 | 3238 |
|
3239 |
" |
|
3240 |
DapasXProject generate_bc_dot_mak |
|
3241 |
DapasX_Datenbasis generate_bc_dot_mak |
|
3242 |
" |
|
3243 |
||
3244 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
3245 |
! |
|
3246 |
||
13419 | 3247 |
generate_bmake_dot_mak |
3248 |
||
3249 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3250 |
in: self bmake_dot_mak |
9575 | 3251 |
|
3252 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
3253 |
! |
|
3254 |
||
13411 | 3255 |
generate_builder_baseline_dot_rbspec |
3256 |
^ self replaceMappings:self builder_baseline_dot_rbspec_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3257 |
in:self builder_baseline_dot_rbspec |
13411 | 3258 |
|
3259 |
" |
|
3260 |
stx_projects_smalltalk generate_builder_baseline_dot_rbspec |
|
3261 |
||
3262 |
" |
|
3263 |
||
3264 |
"Created: / 24-02-2011 / 11:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3265 |
! |
|
3266 |
||
14334 | 3267 |
generate_lccmake_dot_mak |
13419 | 3268 |
|
3269 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
14334 | 3270 |
in: self lccmake_dot_mak |
3271 |
||
3272 |
"Created: / 03-09-2012 / 19:49:56 / cg" |
|
11979 | 3273 |
! |
3274 |
||
9850 | 3275 |
generate_loadAll |
13419 | 3276 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3277 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3278 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3279 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3280 |
classNames := self compiled_classNames_common. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3281 |
classesLoaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3282 |
collect:[:nm | Smalltalk classNamed:nm] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3283 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3284 |
classNamesUnloaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3285 |
select:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3286 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3287 |
cls := Smalltalk classNamed:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3288 |
cls isNil or:[cls isLoaded not] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3289 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3290 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3291 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3292 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3293 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3294 |
s nextPutAll:'"/ |
9850 | 3295 |
"/ $' , 'Header' , '$ |
3296 |
"/ |
|
3297 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
3298 |
"/ |
|
3299 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3300 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 3301 |
"/ |
3302 |
"/ |
|
3303 |
"/ Prerequisites: |
|
3304 |
"/ |
|
3305 |
"/ Smalltalk loadPackage:''module:directory''. |
|
3306 |
"/ Smalltalk loadPackage:''....''. |
|
3307 |
!! |
|
3308 |
||
3309 |
"{ package:''' , self package, ''' }" |
|
3310 |
!! |
|
3311 |
||
3312 |
|files| |
|
3313 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3314 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 3315 |
|
3316 |
files := #( |
|
3317 |
'. |
|
3318 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3319 |
classesSorted do:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3320 |
s nextPutLine:' ''' , (self filenameForClass:eachClass), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3321 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3322 |
classNamesUnloaded do:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3323 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3324 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3325 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3326 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3327 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3328 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3329 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3330 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3331 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3332 |
self hasExtensionMethods ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3333 |
s nextPutLine:' ''extensions.st'''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3334 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3335 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3336 |
s nextPutAll:' |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3337 |
). |
9850 | 3338 |
|
3339 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3340 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 3341 |
|handle loaded| |
3342 |
||
13419 | 3343 |
handle := ObjectFileLoader loadedObjectHandles |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3344 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
9850 | 3345 |
handle ifNotNil:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3346 |
loaded := Set new:(handle classes size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3347 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3348 |
files := files \ loaded. |
9850 | 3349 |
]. |
3350 |
]. |
|
3351 |
||
3352 |
"/ 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
|
3353 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3354 |
'''' infoPrintCR. |
9850 | 3355 |
files do:[:f | |
3356 |
''.'' infoPrint. |
|
3357 |
f asFilename exists ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3358 |
Smalltalk fileIn:f. |
9850 | 3359 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3360 |
Smalltalk fileIn:(''source/'' , f) |
9850 | 3361 |
] |
3362 |
]. |
|
3363 |
'' '' infoPrintCR. |
|
3364 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3365 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 3366 |
'. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3367 |
]. |
9850 | 3368 |
|
3369 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 3370 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 3371 |
! |
3372 |
||
13419 | 3373 |
generate_make_dot_proto |
3374 |
||
3375 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3376 |
replaceMappings: self make_dot_proto_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3377 |
in: self make_dot_proto) asStringCollection withTabs asString |
9536 | 3378 |
|
9733 | 3379 |
" |
12428 | 3380 |
stx_libbasic2 generate_make_dot_proto |
9733 | 3381 |
" |
9536 | 3382 |
|
3383 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
3384 |
! |
|
3385 |
||
3386 |
generate_make_dot_spec |
|
13419 | 3387 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3388 |
replaceMappings: self make_dot_spec_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3389 |
in: self make_dot_spec) asStringCollection withTabs asString |
9536 | 3390 |
|
9733 | 3391 |
" |
3392 |
DapasXProject generate_make_dot_spec |
|
3393 |
DapasX_Datenbasis generate_make_dot_spec |
|
3394 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
3395 |
" |
|
9536 | 3396 |
|
3397 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
3398 |
! |
|
3399 |
||
13419 | 3400 |
generate_makefile |
3401 |
||
3402 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3403 |
replaceMappings: self makefile_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3404 |
in: self makefile) asStringCollection withTabs asString |
12428 | 3405 |
|
3406 |
" |
|
3407 |
stx_libbasic2 generate_makefile |
|
3408 |
" |
|
3409 |
! |
|
3410 |
||
14345 | 3411 |
generate_mingwmake_dot_mak |
3412 |
||
3413 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
3414 |
in: self mingwmake_dot_mak |
|
3415 |
||
3416 |
"Created: / 05-09-2012 / 19:44:07 / cg" |
|
3417 |
! |
|
3418 |
||
9536 | 3419 |
generate_packageName_dot_rc |
3420 |
||
13419 | 3421 |
^self replaceMappings: self packageName_dot_rc_mappings |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3422 |
in: self packageName_dot_rc |
9536 | 3423 |
|
3424 |
" |
|
3425 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
3426 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 3427 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 3428 |
stx_libwidg3 generate_packageName_dot_rc |
13419 | 3429 |
stx_libwidg3 productVersion |
9536 | 3430 |
|
3431 |
" |
|
3432 |
||
3433 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 3434 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 3435 |
! |
3436 |
||
13411 | 3437 |
generate_package_dot_deps_dot_rake |
3438 |
^ (self replaceMappings:self package_dot_deps_dot_rake_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3439 |
in:self package_dot_deps_dot_rake) asStringCollection |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3440 |
withTabs asString |
13411 | 3441 |
|
3442 |
" |
|
3443 |
stx_libjava generate_dependencies_dot_rake" |
|
3444 |
||
3445 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3446 |
! |
|
3447 |
||
14334 | 3448 |
generate_tccmake_dot_mak |
3449 |
||
3450 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
3451 |
in: self tccmake_dot_mak |
|
3452 |
||
3453 |
"Created: / 03-09-2012 / 19:50:25 / cg" |
|
3454 |
! |
|
3455 |
||
13419 | 3456 |
generate_vc_dot_def |
3457 |
||
3458 |
^self replaceMappings: self vc_dot_def_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3459 |
in: self vc_dot_def |
10306 | 3460 |
|
3461 |
" |
|
3462 |
DapasXProject generate_vc_dot_def |
|
3463 |
DapasX_Datenbasis generate_vc_dot_def |
|
3464 |
||
3465 |
" |
|
3466 |
||
3467 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
3468 |
! |
|
3469 |
||
13419 | 3470 |
generate_vcmake_dot_mak |
3471 |
||
3472 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3473 |
in: self vcmake_dot_mak |
11937 | 3474 |
! |
3475 |
||
9852 | 3476 |
protectedFileNames |
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
3477 |
"names of files which should NOT be generated (because they are hand-maintained) |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
3478 |
- redefine this to protect a hand-written Make.proto or other handwritten support files" |
9852 | 3479 |
|
3480 |
^ #() |
|
3481 |
||
3482 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
3483 |
"Modified: / 21-12-2010 / 11:36:46 / cg" |
9852 | 3484 |
! |
3485 |
||
9831 | 3486 |
rcFilename |
3487 |
^ self packageName,'.rc'. |
|
3488 |
||
3489 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 3490 |
! ! |
3491 |
||
12364 | 3492 |
!ProjectDefinition class methodsFor:'file mappings'! |
9536 | 3493 |
|
13177 | 3494 |
autopackage_default_dot_apspec_mappings |
3495 |
|mappings| |
|
3496 |
||
3497 |
mappings := Dictionary new. |
|
3498 |
mappings |
|
14339 | 3499 |
at: 'TOP' put: ( self pathToTop_unix ); "/ unix here |
3500 |
"/ at: 'MODULE_PATH' put: ( self moduleDirectory ); "/ unix here |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3501 |
at: 'DESCRIPTION' put: (self description); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3502 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3503 |
at: 'PRODUCT_DATE' put: (self productDate); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3504 |
at: 'PRODUCT_PUBLISHER' put: (self productPublisher); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3505 |
at: 'PRODUCT_WEBSITE' put: (self productWebSite); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3506 |
at: 'PRODUCT_INSTALLDIR' put: (self productInstallDir); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3507 |
at: 'PRODUCT_TYPE' put: (self productType); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3508 |
at: 'PRODUCT_LICENSE' put: (self productLicense); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3509 |
at: 'PRODUCT_DESCRIPTION' put: (self productDescription); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3510 |
at: 'MAINTAINER' put: (self productMaintainer); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3511 |
at: 'PACKAGER' put: (self productPublisher); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3512 |
yourself. |
13419 | 3513 |
|
13177 | 3514 |
^ mappings |
3515 |
||
3516 |
"Created: / 21-12-2010 / 09:00:49 / cg" |
|
14339 | 3517 |
"Modified: / 05-09-2012 / 10:09:06 / cg" |
13177 | 3518 |
! |
3519 |
||
10306 | 3520 |
bc_dot_mak_mappings |
3521 |
|d| |
|
3522 |
||
14337 | 3523 |
d := self common_mappings. |
14944 | 3524 |
^ d |
14339 | 3525 |
at: 'TOP' put: ( self pathToTop_win32 ); "/ win32 here |
3526 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ); "/ win32 here |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3527 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3528 |
at: 'ADDITIONAL_BASE_ADDRESS_DEFINITION' put: (self additionalBaseAddressDefinition_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3529 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3530 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_bc_dot_mak); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3531 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak ? ''); |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3532 |
at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_bc_dot_mak ? ''); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3533 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3534 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3535 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32 ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3536 |
at: 'LOCAL_DEFINES' put: self localDefines_win32 ? ''; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3537 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32 ? ''; |
14944 | 3538 |
yourself. |
10306 | 3539 |
|
3540 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
14339 | 3541 |
"Modified: / 05-09-2012 / 10:02:51 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3542 |
"Modified: / 28-11-2012 / 10:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10306 | 3543 |
! |
3544 |
||
9627 | 3545 |
bmake_dot_mak_mappings |
14337 | 3546 |
^ self common_mappings |
14344
b06bca5c82fa
changed: #bmake_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
14339
diff
changeset
|
3547 |
at:'TOP' put: ( self pathToTop_win32 ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3548 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3549 |
at:'SUBPROJECT_VCMAKE_CALLS' put:(self subProjectVCmakeCalls); |
14334 | 3550 |
at:'SUBPROJECT_LCCMAKE_CALLS' put:(self subProjectLCCmakeCalls); |
3551 |
at:'SUBPROJECT_TCCMAKE_CALLS' put:(self subProjectTCCmakeCalls); |
|
14345 | 3552 |
at:'SUBPROJECT_MINGWMAKE_CALLS' put:(self subProjectMingwmakeCalls); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3553 |
yourself |
9627 | 3554 |
|
3555 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
14345 | 3556 |
"Modified: / 05-09-2012 / 19:45:36 / cg" |
9575 | 3557 |
! |
3558 |
||
13411 | 3559 |
builder_baseline_dot_rbspec_mappings |
3560 |
|mappings| |
|
3561 |
||
3562 |
mappings := Dictionary new. |
|
3563 |
mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3564 |
at:'APPLICATION' put:(self perform:#applicationName ifNotUnderstood:[self packageName]); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3565 |
at:'APPLICATION_PACKAGE' put:self package printString; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3566 |
at:'PREAMBLE' put:self builder_baseline_dot_rbspec_preamble; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3567 |
at:'POSTAMBLE' put:self builder_baseline_dot_rbspec_postamble; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3568 |
at:'PACKAGES' put:self builder_baseline_dot_rbspec_packages; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3569 |
yourself. |
13411 | 3570 |
^ mappings |
3571 |
||
3572 |
"Modified: / 21-12-2010 / 11:00:22 / cg" |
|
3573 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3574 |
"Modified: / 09-06-2011 / 14:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3575 |
! |
|
3576 |
||
3577 |
builder_baseline_dot_rbspec_packages |
|
3578 |
^ String streamContents: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3579 |
[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3580 |
self allPreRequisitesSorted do: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3581 |
[:packageId | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3582 |
s |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3583 |
nextPutAll:(' package "%1"' bindWith:packageId); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3584 |
cr ] ]. |
13411 | 3585 |
|
3586 |
"Created: / 24-02-2011 / 11:59:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3587 |
! |
|
3588 |
||
13419 | 3589 |
classLine_mappings:aClassName |
12545 | 3590 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3591 |
at:'CLASS' put:(self st2c:aClassName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3592 |
yourself |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3593 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3594 |
"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
|
3595 |
"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
|
3596 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3597 |
|
14337 | 3598 |
common_mappings |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3599 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3600 |
at: 'TAB' put: ( Character tab asString ); |
14339 | 3601 |
at: 'TOP' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3602 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3603 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
14337 | 3604 |
at: 'MODULE' put: ( self module ); |
14339 | 3605 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); "/ always unix format |
3606 |
at: 'MODULE_PATH' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
|
14337 | 3607 |
yourself |
3608 |
||
3609 |
"Created: / 04-09-2012 / 13:04:26 / cg" |
|
3610 |
! |
|
3611 |
||
3612 |
make_dot_proto_mappings |
|
3613 |
^ self common_mappings |
|
14339 | 3614 |
at: 'MODULE' put: ( self module ); |
3615 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
3616 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
|
3617 |
at: 'TOP' put: ( self pathToTop_unix ); |
|
3618 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
|
14337 | 3619 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3620 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3621 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3622 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3623 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3624 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3625 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3626 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3627 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3628 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3629 |
at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto); |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3630 |
at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_make_dot_proto); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3631 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3632 |
at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3633 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3634 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3635 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3636 |
yourself |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3637 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3638 |
"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
|
3639 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
12028 | 3640 |
"Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
3641 |
"Modified: / 22-08-2009 / 12:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14339 | 3642 |
"Modified: / 05-09-2012 / 10:10:40 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3643 |
"Modified: / 28-11-2012 / 10:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3644 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3645 |
|
9627 | 3646 |
make_dot_spec_mappings |
14337 | 3647 |
^ self common_mappings |
14339 | 3648 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3649 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3650 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3651 |
at: 'CLASSES' put: [self generateClasses_make_dot_spec]; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3652 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3653 |
yourself |
9627 | 3654 |
|
3655 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
14339 | 3656 |
"Modified: / 05-09-2012 / 10:11:02 / cg" |
9575 | 3657 |
! |
3658 |
||
12428 | 3659 |
makefile_mappings |
3660 |
^ Dictionary new |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3661 |
yourself |
12428 | 3662 |
! |
3663 |
||
9627 | 3664 |
packageName_dot_rc_mappings |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3665 |
|d s resourceCount| |
9627 | 3666 |
|
9630 | 3667 |
d := Dictionary new. |
3668 |
d |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3669 |
at: 'PRODUCT_NAME' put: (self productName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3670 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3671 |
at: 'PRODUCT_DATE' put: (self productDate); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3672 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3673 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3674 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3675 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3676 |
at: 'COMPANY_NAME' put: (self companyName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3677 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3678 |
at: 'FILE_VERSION' put: (self fileVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3679 |
at: 'INTERNAL_NAME' put: (self internalName). |
11377 | 3680 |
|
9630 | 3681 |
s := self legalCopyright. |
3682 |
s notNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3683 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 3684 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3685 |
s := String streamContents:[:stream| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3686 |
|suff| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3687 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3688 |
s := self applicationIconFileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3689 |
s notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3690 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3691 |
suff := '.ico' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3692 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3693 |
suff := '' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3694 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3695 |
'IDR_MAINFRAME ICON DISCARDABLE "%1%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3696 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3697 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3698 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3699 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3700 |
s := self splashFileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3701 |
s notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3702 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3703 |
suff := '.bmp' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3704 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3705 |
suff := '' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3706 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3707 |
'IDR_SPLASH BITMAP DISCARDABLE "%1%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3708 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3709 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3710 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3711 |
resourceCount := 2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3712 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3713 |
'IDR_MAINFRAME+%1 ICON DISCARDABLE "%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3714 |
expandPlaceholdersWith:(Array with:resourceCount with:eachFilename) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3715 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3716 |
resourceCount := resourceCount+1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3717 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3718 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3719 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 3720 |
|
9630 | 3721 |
^ d |
9627 | 3722 |
|
3723 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
13309
27f463f6c0cb
changed: #packageName_dot_rc_mappings
Claus Gittinger <cg@exept.de>
parents:
13285
diff
changeset
|
3724 |
"Modified: / 22-02-2011 / 11:30:36 / cg" |
9536 | 3725 |
! |
3726 |
||
13411 | 3727 |
package_dot_deps_dot_rake_mappings |
14843 | 3728 |
|dependencies| |
3729 |
||
3730 |
dependencies := String |
|
3731 |
streamContents:[:s | |
|
3732 |
self allPreRequisites do:[:package | |
|
3733 |
(self preRequisitesFor:package) do:[:prereq | |
|
3734 |
s |
|
3735 |
nextPutAll:('task "%1" => "%2"' bindWith:package with:prereq); |
|
3736 |
cr |
|
3737 |
]. |
|
3738 |
s cr |
|
3739 |
]. |
|
3740 |
self effectivePreRequisites do:[:prereq | |
|
3741 |
s |
|
3742 |
nextPutAll:('task "%1" => "%2"' bindWith:self package with:prereq); |
|
3743 |
cr |
|
3744 |
]. |
|
3745 |
]. |
|
13411 | 3746 |
|
3747 |
^ (Dictionary new) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3748 |
at:'DEPENDENCIES' put:dependencies; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3749 |
yourself |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3750 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3751 |
" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3752 |
stx_libjava generate_package_dot_deps_dot_rake |
13411 | 3753 |
" |
3754 |
||
3755 |
"Created: / 24-02-2011 / 22:32:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3756 |
! |
|
3757 |
||
9627 | 3758 |
replaceMappings: mappings in: fileTemplate |
9733 | 3759 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 3760 |
|
9733 | 3761 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 3762 |
|
9733 | 3763 |
" |
13419 | 3764 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
9733 | 3765 |
" |
9627 | 3766 |
|
3767 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
3768 |
"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
|
3769 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3770 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3771 |
st2c:aString |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3772 |
^ (aString asString |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3773 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3774 |
replaceAny:':' with:$_ |
9536 | 3775 |
! ! |
3776 |
||
12364 | 3777 |
!ProjectDefinition class methodsFor:'file mappings support'! |
9817 | 3778 |
|
12545 | 3779 |
classNamesByCategory |
3780 |
"answer a dictionary |
|
13728 | 3781 |
category -> classNames topological sorted" |
12545 | 3782 |
|
15124 | 3783 |
|classes classNames mapping| |
12545 | 3784 |
|
3785 |
mapping := Dictionary new. |
|
3786 |
||
15126 | 3787 |
classes := Class classesSortedByLoadOrder:self compiled_classes_common. |
15124 | 3788 |
classNames := classes collect:[:eachClass| eachClass name]. |
3789 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3790 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
3791 |
classNames add:nm. |
|
13728 | 3792 |
]. |
15124 | 3793 |
]. |
3794 |
mapping at:'COMMON' put:classNames. |
|
3795 |
||
12545 | 3796 |
|
3797 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
15124 | 3798 |
|platformClasses platformClassNames| |
3799 |
||
3800 |
platformClasses := self compiled_classesForPlatform:platformID. |
|
3801 |
platformClasses notEmpty ifTrue:[ |
|
3802 |
(platformClasses contains:[:each| each isNil or:[each isLoaded not]]) ifTrue:[ |
|
3803 |
"win32 classes are not present in linux..." |
|
3804 |
Transcript show:'Missing classes for platform: '. Transcript showCR:platformID. |
|
3805 |
platformClassNames := self compiled_classNamesForPlatform:platformID. |
|
3806 |
platformClassNames |
|
3807 |
select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]] |
|
3808 |
thenDo:[:nm | Transcript tab; showCR:nm]. |
|
3809 |
(Dialog confirm:('Dependencies (and therefore build-order) might be incorrect\(some classes for platform ''%1'' are not present or autoloaded; see Transcript).\\Continue anyway without recomputing the order for this platform''s classes?' withCRs bindWith:platformID)) |
|
13728 | 3810 |
ifFalse:[ |
3811 |
AbortOperationRequest raise. |
|
3812 |
]. |
|
3813 |
] ifFalse:[ |
|
15126 | 3814 |
classes := Class classesSortedByLoadOrder:platformClasses. |
15124 | 3815 |
platformClassNames := platformClasses collect:[:eachClass| eachClass name]. |
13728 | 3816 |
]. |
15124 | 3817 |
mapping at:platformID asUppercase put:platformClassNames. |
13728 | 3818 |
]. |
12545 | 3819 |
]. |
3820 |
^ mapping |
|
3821 |
||
3822 |
" |
|
3823 |
stx_libbasic classNamesByCategory |
|
3824 |
stx_libbasic3 classNamesByCategory |
|
3825 |
stx_libview classNamesByCategory |
|
15124 | 3826 |
stx_libjava classNamesByCategory |
12545 | 3827 |
" |
3828 |
||
3829 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
13836
97abd31bbd13
changed: #classNamesByCategory
Claus Gittinger <cg@exept.de>
parents:
13823
diff
changeset
|
3830 |
"Modified: / 25-11-2011 / 16:41:47 / cg" |
12545 | 3831 |
! |
3832 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3833 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3834 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3835 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3836 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3837 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3838 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3839 |
filenameForClass:classNameOrClass |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3840 |
"answer the base filename of the class without suffix" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3841 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3842 |
"/ "enable this code if you want to convert old filenames to new filenames. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3843 |
"/ See also: #generateRemoveShellScriptOn: and #generateRenamShellScriptOn:" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3844 |
"/ classNameOrClass isBehavior ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3845 |
"/ ^ classNameOrClass generateClassFilename. |
13419 | 3846 |
"/ ] ifFalse:[ |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3847 |
"/ |cls| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3848 |
"/ |
13419 | 3849 |
"/ cls := Smalltalk classNamed:classNameOrClass. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3850 |
"/ cls notNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3851 |
"/ ^ cls generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3852 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3853 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3854 |
"/ "end special code" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3855 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3856 |
^ Smalltalk fileNameForClass:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3857 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3858 |
" |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3859 |
self filenameForClass:HTML::Encoder |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3860 |
Smalltalk fileNameForClass:HTML::Encoder |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3861 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3862 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3863 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3864 |
"Modified: / 20-10-2006 / 16:22:58 / cg" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3865 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3866 |
|
13419 | 3867 |
generateClassLines:classLineTemplate |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3868 |
"for the init-file: generate class-init-lines for all classes" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3869 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3870 |
^ self generateClassLines:classLineTemplate forClasses:(self compiled_classNames_common) |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3871 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3872 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3873 |
generateClassLines:classLineTemplate forClasses:classNames |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3874 |
"for the init-file: generate class-init-lines for a collection of classes" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3875 |
|
13419 | 3876 |
^ self generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:true |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3877 |
! |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3878 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3879 |
generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:includeAdditionalClasses |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3880 |
"for the init-file: generate class-init-lines for a collection of classes" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3881 |
|
13419 | 3882 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3883 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3884 |
|classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3885 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3886 |
putLineForClassName := [:className | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3887 |
|newClassLine mappings| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3888 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3889 |
mappings := self classLine_mappings:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3890 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3891 |
s nextPutLine:newClassLine |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3892 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3893 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3894 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3895 |
classNamesUnloaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3896 |
select:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3897 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3898 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3899 |
cls := Smalltalk classNamed:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3900 |
cls isNil or:[ cls isLoaded not ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3901 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3902 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3903 |
classNamesSorted do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3904 |
classNamesUnloaded do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3905 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3906 |
includeAdditionalClasses ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3907 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3908 |
do:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3909 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3910 |
putLineForClassName value:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3911 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3912 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3913 |
#( ('UNIX' unix) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3914 |
('WIN32' win32) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3915 |
('VMS' vms) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3916 |
('BEOS' beos) ) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3917 |
pairsDo:[:ifdef :platformName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3918 |
|archClassNames archClassesLoaded| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3919 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3920 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3921 |
archClassNames notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3922 |
s nextPutLine:'#ifdef ' , ifdef. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3923 |
archClassNames do:[:clsName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3924 |
putLineForClassName value:clsName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3925 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3926 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3927 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3928 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3929 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3930 |
] |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3931 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3932 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3933 |
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
|
3934 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 3935 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
3936 |
" |
|
3937 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3938 |
"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
|
3939 |
"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
|
3940 |
"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
|
3941 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3942 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3943 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3944 |
^ 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
|
3945 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3946 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3947 |
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
|
3948 |
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
|
3949 |
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
|
3950 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3951 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3952 |
"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
|
3953 |
"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
|
3954 |
"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
|
3955 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3956 |
|
13419 | 3957 |
generateClasses_make_dot_spec |
12545 | 3958 |
|classNamesDict| |
3959 |
||
3960 |
classNamesDict := self classNamesByCategory. |
|
3961 |
||
3962 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3963 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3964 |
s nextPutLine:eachCategory,'_CLASSES= \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3965 |
classNames do:[:eachClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3966 |
s tab; nextPutAll:eachClassName; nextPutLine:' \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3967 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3968 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3969 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3970 |
s cr. |
12545 | 3971 |
]. |
3972 |
||
3973 |
" |
|
3974 |
stx_libbasic generateClasses_make_dot_spec |
|
3975 |
stx_libbasic3 generateClasses_make_dot_spec |
|
3976 |
stx_libview generateClasses_make_dot_spec |
|
3977 |
stx_libboss generateClasses_make_dot_spec |
|
3978 |
" |
|
3979 |
||
3980 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
3981 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
|
3982 |
! |
|
3983 |
||
13419 | 3984 |
generateDependencies:whichArchitecture |
3985 |
^ String |
|
13763
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3986 |
streamContents:[:s | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3987 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3988 |
putDependencyForClassBaseNameBlock |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3989 |
archClassNames archClassesPresent archClassesLoaded |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3990 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3991 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3992 |
putSingleClassDependencyEntryBlock := [:cls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3993 |
|sclsBaseName| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3994 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3995 |
s nextPutAll:' $(INCLUDE_TOP)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3996 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3997 |
sclsBaseName := self filenameForClass:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3998 |
s nextPutAll:(self |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3999 |
topRelativePathTo:sclsBaseName |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4000 |
inPackage:cls package |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4001 |
architecture:whichArchitecture). |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4002 |
s nextPutAll:'.$(H)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4003 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4004 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4005 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4006 |
s nextPutAll:'$(OUTDIR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4007 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4008 |
s nextPutAll:'.$(O)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4009 |
s nextPutAll:' '. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4010 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4011 |
s nextPutAll:'.$(H)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4012 |
s nextPutAll:': '. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4013 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4014 |
s nextPutAll:'.st'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4015 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4016 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4017 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4018 |
putDependencyForClassBlock := [:cls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4019 |
|clsBaseName already| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4020 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4021 |
clsBaseName := self filenameForClass:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4022 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4023 |
cls isLoaded ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4024 |
already := IdentitySet new. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4025 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4026 |
sharedPools do:[:poolClass | |
13798
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4027 |
poolClass isNil ifTrue:[ |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4028 |
Dialog warn:'At least one pool class is missing.\\Dependencies are incomplete.' withCRs |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4029 |
] ifFalse:[ |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4030 |
putSingleClassDependencyEntryBlock value:poolClass. |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4031 |
already add:poolClass. |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4032 |
] |
13763
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4033 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4034 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4035 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4036 |
allSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4037 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4038 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4039 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4040 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4041 |
allPrivateClassesDo:[:eachPrivateClass | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4042 |
eachPrivateClass |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4043 |
allSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4044 |
|sclsBaseName| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4045 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4046 |
scls ~~ cls ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4047 |
scls isPrivate ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4048 |
(already includes:scls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4049 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4050 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4051 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4052 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4053 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4054 |
] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4055 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4056 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4057 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4058 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4059 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4060 |
putDependencyForExtensionsBlock := [ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4061 |
|already| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4062 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4063 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4064 |
already := Set new. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4065 |
self extensionMethodNames pairWiseDo:[:className :selector | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4066 |
|mthdCls cls| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4067 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4068 |
((mthdCls := Smalltalk classNamed:className) notNil |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4069 |
and:[ mthdCls isLoaded ]) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4070 |
ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4071 |
cls := mthdCls theNonMetaclass. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4072 |
(already includes:cls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4073 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4074 |
withAllSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4075 |
(already includes:scls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4076 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4077 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4078 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4079 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4080 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4081 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4082 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4083 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4084 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4085 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4086 |
classNames := self compiled_classNames_common. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4087 |
classesPresent := classNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4088 |
collect:[:className | Smalltalk classNamed:className] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4089 |
thenSelect:[:cls | cls notNil]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4090 |
classesLoaded := classesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4091 |
select:[:cls | cls isLoaded]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4092 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4093 |
(Class classesSortedByLoadOrder:classesLoaded) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4094 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4095 |
(classesPresent select:[:cls | cls isLoaded not]) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4096 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4097 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4098 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4099 |
do:[:className :attr | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4100 |
|cls| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4101 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4102 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4103 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4104 |
putDependencyForClassBlock value:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4105 |
] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4106 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4107 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4108 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4109 |
archClassesPresent := archClassNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4110 |
collect:[:className | Smalltalk classNamed:className] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4111 |
thenSelect:[:cls | cls notNil]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4112 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4113 |
archClassesLoaded := archClassesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4114 |
select:[:cls | cls isLoaded]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4115 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4116 |
(Class classesSortedByLoadOrder:archClassesLoaded) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4117 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4118 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4119 |
"some classes are not loaded - probably this is the wrong architecture. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4120 |
Sorry, but for these classes, we do not know the superclass chain" |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4121 |
archClassesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4122 |
select:[:cls | cls isLoaded not] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4123 |
thenDo:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4124 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4125 |
"for the following classes, we do not know the superclass chain |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4126 |
and neither the real class file name" |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4127 |
archClassNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4128 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4129 |
thenDo:[:eachClassName | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4130 |
putDependencyForClassBaseNameBlock value:(self filenameForClass:eachClassName). |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4131 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4132 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4133 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4134 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
4135 |
] |
9887 | 4136 |
|
4137 |
" |
|
4138 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 4139 |
stx_libbasic3 generateDependencies:#win32 |
4140 |
" |
|
4141 |
||
9887 | 4142 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
13798
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4143 |
"Modified: / 27-10-2011 / 16:35:59 / cg" |
9887 | 4144 |
! |
4145 |
||
4146 |
generateDependencies_unix |
|
4147 |
^ self generateDependencies:#unix |
|
4148 |
||
4149 |
" |
|
4150 |
stx_libbasic3 generateDependencies:#unix |
|
4151 |
stx_libbasic3 generateDependencies:#win32 |
|
4152 |
" |
|
4153 |
||
4154 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
4155 |
! |
|
4156 |
||
4157 |
generateDependencies_win32 |
|
4158 |
^ self generateDependencies:#win32 |
|
4159 |
||
4160 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
4161 |
! |
|
4162 |
||
9956 | 4163 |
generateLocalIncludes_unix |
4164 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4165 |
s nextPutAll:(self localIncludes_unix). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4166 |
self searchForProjectsWhichProvideHeaderFiles |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4167 |
do:[:includeProject | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4168 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4169 |
] |
9956 | 4170 |
] |
4171 |
||
4172 |
" |
|
4173 |
bosch_dapasx generateLocalIncludes_unix |
|
13419 | 4174 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
4175 |
stx_libbasic generateLocalIncludes_unix |
|
4176 |
stx_libview generateLocalIncludes_unix |
|
4177 |
stx_libtool2 generateLocalIncludes_unix |
|
4178 |
stx_libui generateLocalIncludes_unix |
|
14939 | 4179 |
cg_demos_helloWorld localIncludes_unix |
9956 | 4180 |
" |
4181 |
||
4182 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 4183 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
9956 | 4184 |
! |
4185 |
||
9887 | 4186 |
generateLocalIncludes_win32 |
4187 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4188 |
s nextPutAll:(self localIncludes_win32). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4189 |
self searchForProjectsWhichProvideHeaderFiles |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4190 |
do:[:includeProject | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4191 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4192 |
] |
9887 | 4193 |
] |
4194 |
||
4195 |
" |
|
4196 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
13419 | 4197 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
4198 |
stx_libbasic generateLocalIncludes_win32 |
|
4199 |
stx_libview generateLocalIncludes_win32 |
|
4200 |
stx_libtool2 generateLocalIncludes_win32 |
|
9887 | 4201 |
" |
4202 |
||
4203 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 4204 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
9887 | 4205 |
! |
4206 |
||
13419 | 4207 |
generateObjects_make_dot_spec |
12545 | 4208 |
|classNamesDict| |
4209 |
||
4210 |
classNamesDict := self classNamesByCategory. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4211 |
|
9817 | 4212 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4213 |
|putLineForClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4214 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4215 |
putLineForClassName := |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4216 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4217 |
|mappings newObjectLine| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4218 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4219 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4220 |
s nextPutLine:newObjectLine. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4221 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4222 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4223 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4224 |
s nextPutLine:eachCategory,'_OBJS= \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4225 |
classNames do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4226 |
(eachCategory = 'COMMON' and:[self hasExtensionMethods]) ifTrue:[ |
14643 | 4227 |
s nextPutLine:' $(OUTDIR_SLASH)extensions.$(O) \'. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4228 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4229 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4230 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4231 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4232 |
s cr. |
12545 | 4233 |
]. |
9817 | 4234 |
|
4235 |
" |
|
12545 | 4236 |
stx_libbasic generateObjects_make_dot_spec |
9817 | 4237 |
stx_libbasic3 generateObjects_make_dot_spec |
12545 | 4238 |
stx_libview generateObjects_make_dot_spec |
4239 |
stx_libboss generateObjects_make_dot_spec |
|
9817 | 4240 |
" |
4241 |
||
4242 |
"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
|
4243 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 4244 |
! |
4245 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4246 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
4247 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4248 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4249 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4250 |
myProjectId := self package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4251 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4252 |
is required!! |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4253 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4254 |
'popd' is not needed, since each line is executed in |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4255 |
an own cmd.exe process. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4256 |
'popd' is not desireable, since it masks a possible |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4257 |
error return from the 'bmake'. |
14547 | 4258 |
" |
4259 |
||
4260 |
"cg: changed to not go and remake librun" |
|
15082 | 4261 |
(self allPreRequisitesSorted:#effectiveMandatoryPreRequisites "#effectivePreRequisites") do:[:eachProjectId | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4262 |
s tab; nextPutAll:'pushd '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4263 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4264 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4265 |
]. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4266 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4267 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4268 |
" |
13419 | 4269 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
4270 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4271 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4272 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4273 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4274 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4275 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4276 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4277 |
^ String streamContents:[:s | |
14547 | 4278 |
"cg: changed to not go and remake librun" |
15082 | 4279 |
(self allPreRequisitesSorted:#effectiveMandatoryPreRequisites "#effectivePreRequisites") do:[:projectID | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4280 |
libPath := self pathToPackage_unix:projectID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4281 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4282 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4283 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4284 |
s cr. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4285 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4286 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4287 |
" |
13419 | 4288 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
4289 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4290 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4291 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4292 |
|
14882 | 4293 |
generateRequiredMakeReferences_bc_dot_mak |
4294 |
|myProjectId preRequisites| |
|
4295 |
||
4296 |
myProjectId := self package. |
|
4297 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
|
4298 |
is required!! |
|
4299 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
|
4300 |
'popd' is not needed, since each line is executed in |
|
4301 |
an own cmd.exe process. |
|
4302 |
'popd' is not desierable, since it masks a possible |
|
4303 |
error return from the 'bmake'. |
|
4304 |
" |
|
4305 |
||
4306 |
preRequisites := self allPreRequisitesSorted:#effectivePreRequisites. |
|
4307 |
"these have been already built in preReq" |
|
4308 |
preRequisites removeAllFoundIn:(self allPreRequisites:#mandatoryPreRequisites). |
|
4309 |
||
4310 |
^ String streamContents:[:s | |
|
4311 |
preRequisites do:[:eachProjectId | |
|
4312 |
s tab; nextPutAll:'pushd '; |
|
4313 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
|
4314 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
|
4315 |
]. |
|
4316 |
]. |
|
4317 |
||
4318 |
" |
|
4319 |
exept_expecco_application generateRequiredMakeReferences_bc_dot_mak |
|
4320 |
alspa_batch_application generateRequiredMakeReferences_bc_dot_mak |
|
4321 |
" |
|
4322 |
! |
|
4323 |
||
4324 |
generateRequiredMakeReferences_make_dot_proto |
|
4325 |
|libPath preRequisites| |
|
4326 |
||
4327 |
preRequisites := self allPreRequisitesSorted:#effectivePreRequisites. |
|
4328 |
"these have been already built in preReq" |
|
4329 |
preRequisites removeAllFoundIn:(self allPreRequisites:#mandatoryPreRequisites). |
|
4330 |
||
4331 |
^ String streamContents:[:s | |
|
4332 |
preRequisites do:[:projectID | |
|
4333 |
libPath := self pathToPackage_unix:projectID. |
|
4334 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"'. |
|
4335 |
]. |
|
4336 |
||
4337 |
s cr. |
|
4338 |
]. |
|
4339 |
||
4340 |
" |
|
4341 |
exept_expecco_application generateRequiredMakeReferences_make_dot_proto |
|
4342 |
alspa_batch_application generateRequiredMakeReferences_make_dot_proto |
|
4343 |
" |
|
4344 |
! |
|
4345 |
||
10022 | 4346 |
generateSubDirectories |
4347 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4348 |
self subProjects |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4349 |
do:[:eachProjectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4350 |
s space; nextPutAll:(self unixPathToPackage:eachProjectID from:self package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4351 |
] |
10022 | 4352 |
] |
4353 |
||
4354 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
4355 |
exept_expecco generateSubDirectories |
10022 | 4356 |
" |
4357 |
||
4358 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
4359 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
4360 |
! |
|
4361 |
||
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4362 |
generate_definitionClassLine_libInit_dot_cc |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4363 |
"for the init-file: generate a single class-init-line for the definition class itself" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4364 |
|
13419 | 4365 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4366 |
generateClassLines:(self classLine_libInit_dot_cc) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4367 |
forClasses:(Array with:self name) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4368 |
includeAdditionalClasses:false |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4369 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4370 |
" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4371 |
stx_libbasic generate_definitionClassLine_libInit_dot_cc |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4372 |
" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4373 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4374 |
|
10022 | 4375 |
headerFileOutputArg |
4376 |
"/ "all stx stuff goes to the common include directory. |
|
4377 |
"/ Everything else is left locally" |
|
4378 |
"/ |
|
4379 |
"/ ( |
|
4380 |
"/ #( |
|
13419 | 4381 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
10022 | 4382 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
4383 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
4384 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
4385 |
"/ 'stx:libboss' 'stx:libdb' |
|
4386 |
"/ ) |
|
4387 |
"/ includes:self package) ifTrue:[ |
|
4388 |
"/ ^ '-H$(INCLUDE)' |
|
4389 |
"/ ]. |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4390 |
^ '-headerDir=.' |
10022 | 4391 |
|
4392 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4393 |
"Modified: / 23-12-2011 / 15:07:27 / cg" |
10022 | 4394 |
! |
4395 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4396 |
objectLine_make_dot_spec_mappings: aClassName |
13419 | 4397 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4398 |
at: 'CLASSFILE' put:(self filenameForClass:aClassName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4399 |
yourself |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4400 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4401 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4402 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4403 |
"Modified: / 20-10-2006 / 16:22:58 / cg" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4404 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4405 |
|
9887 | 4406 |
subProjectBmakeCalls |
12439 | 4407 |
"generate submake-calls for borland bcc" |
4408 |
||
13419 | 4409 |
^ self subProjectMakeCallsUsing:'call bmake %1 %2'. |
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4410 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4411 |
|
14334 | 4412 |
subProjectLCCmakeCalls |
4413 |
"generate submake-calls for lcc" |
|
4414 |
||
4415 |
^ self subProjectMakeCallsUsing:'call lccmake %1 %2'. |
|
4416 |
||
4417 |
"Created: / 03-09-2012 / 19:49:08 / cg" |
|
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4418 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4419 |
|
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4420 |
subProjectMakeCallsUsing:callString |
9887 | 4421 |
^ String streamContents:[:s | |
13734 | 4422 |
self subProjects do:[:packageID | |
4423 |
s nextPutLine:'@echo "***********************************"'. |
|
4424 |
s nextPutLine:'@echo "Buildung ',(packageID copyReplaceAll:$: with:$/). |
|
4425 |
s nextPutLine:'@echo "***********************************"'. |
|
4426 |
s nextPutLine:'@cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
4427 |
s nextPutAll:'@'; nextPutLine:callString. |
|
4428 |
s nextPutLine:'@cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
4429 |
s cr. |
|
4430 |
] |
|
9887 | 4431 |
] |
4432 |
||
4433 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
13734 | 4434 |
"Modified: / 27-09-2011 / 19:36:12 / cg" |
11937 | 4435 |
! |
4436 |
||
14345 | 4437 |
subProjectMingwmakeCalls |
4438 |
"generate submake-calls for mingw" |
|
4439 |
||
4440 |
^ self subProjectMakeCallsUsing:'call mingwmake %1 %2'. |
|
4441 |
||
4442 |
"Created: / 05-09-2012 / 19:45:53 / cg" |
|
4443 |
! |
|
4444 |
||
14334 | 4445 |
subProjectTCCmakeCalls |
4446 |
"generate submake-calls for tcc" |
|
4447 |
||
4448 |
^ self subProjectMakeCallsUsing:'call tccmake %1 %2'. |
|
4449 |
||
4450 |
"Created: / 03-09-2012 / 19:50:53 / cg" |
|
4451 |
! |
|
4452 |
||
11937 | 4453 |
subProjectVCmakeCalls |
12439 | 4454 |
"generate submake-calls for visual-C" |
4455 |
||
13419 | 4456 |
^ self subProjectMakeCallsUsing:'call vcmake %1 %2'. |
9817 | 4457 |
! ! |
4458 |
||
12364 | 4459 |
!ProjectDefinition class methodsFor:'file templates'! |
4460 |
||
13177 | 4461 |
autopackage_default_dot_apspec |
4462 |
"for linux's autopackage" |
|
4463 |
||
4464 |
^ |
|
4465 |
'# -*- shell-script -*- |
|
4466 |
[Meta] |
|
4467 |
ShortName: %(APPLICATION) |
|
4468 |
SoftwareVersion: %(PRODUCT_VERSION) |
|
4469 |
DisplayName: %(DESCRIPTION) |
|
4470 |
RootName: @exept.de/expecco:$SOFTWAREVERSION |
|
4471 |
Summary: %(DESCRIPTION) |
|
4472 |
Maintainer: %(MAINTAINER) |
|
4473 |
Packager: %(PACKAGER) |
|
4474 |
PackageVersion: 1 |
|
4475 |
CPUArchitectures: x86 |
|
4476 |
AutopackageTarget: 1.0 |
|
4477 |
Type: %(PRODUCT_TYPE) |
|
13419 | 4478 |
License: %(PRODUCT_LICENSE) |
13177 | 4479 |
|
4480 |
[Description] |
|
4481 |
%(PRODUCT_DESCRIPTION) |
|
4482 |
||
4483 |
[BuildPrepare] |
|
4484 |
# If you''re using autotools, the default should be enough. |
|
4485 |
# prepareBuild will set up apbuild and run configure for you. If you |
|
4486 |
# need to pass arguments to configure, just add them to prepareBuild: |
|
4487 |
# prepareBuild --enable-foo --disable-bar |
|
4488 |
#prepareBuild |
|
4489 |
||
4490 |
[BuildUnprepare] |
|
4491 |
# If you''re using prepareBuild above, there is no need to change this!! |
|
4492 |
#unprepareBuild |
|
4493 |
||
4494 |
[Globals] |
|
4495 |
# Variables declared in this section will be available in all other sections |
|
4496 |
export APKG_BUILD_SKIP_CONFIGURE=1 |
|
4497 |
export APKG_BUILD_SKIP_MAKE=1 |
|
4498 |
export MYPREFIX=/opt/%(APPLICATION) |
|
4499 |
||
4500 |
[Prepare] |
|
4501 |
#recommend ''@autopackage.org/autopackage-gtk'' 1 |
|
4502 |
||
4503 |
[Imports] |
|
4504 |
import <<EOF |
|
4505 |
$source_dir/%(APPLICATION) |
|
4506 |
$source_dir/resources |
|
4507 |
$source_dir/keyboard.rc |
|
4508 |
$source_dir/display.rc |
|
4509 |
$source_dir/../doc |
|
4510 |
$source_dir/../testsuites/webedition |
|
4511 |
$source_dir/../projects/libraries |
|
4512 |
$source_dir/../reportGenerator/tools |
|
4513 |
$source_dir/../../pdf/afm |
|
4514 |
$source_dir/../plugin/selenium/libexept_expecco_plugin_selenium.so |
|
4515 |
$source_dir/../externalTools |
|
4516 |
EOF |
|
4517 |
||
4518 |
for i in $source_dir/*.so |
|
4519 |
do |
|
4520 |
echo $source_dir/$(readlink $i) |
|
4521 |
done | import |
|
4522 |
||
4523 |
[Install] |
|
4524 |
if [ "$PREFIX" !!= "/usr" ] |
|
4525 |
then |
|
4526 |
export MYPREFIX=$PREFIX |
|
4527 |
fi |
|
4528 |
||
4529 |
find . -type d \( -name CVS -or -name ''not_*'' \) -print | xargs rm -rf |
|
4530 |
mkdir -p $MYPREFIX |
|
4531 |
copyFiles expecco *.rc resources $MYPREFIX/bin |
|
4532 |
copyFiles *.so $MYPREFIX/lib |
|
4533 |
copyFiles doc externalTools $MYPREFIX/packages/exept/expecco |
|
4534 |
copyFiles webedition/projects libraries $MYPREFIX/testsuites |
|
4535 |
copyFiles tools $MYPREFIX/packages/exept/expecco/reportGenerator |
|
4536 |
copyFiles afm $MYPREFIX/packages/exept/pdf |
|
4537 |
copyFiles libexept_expecco_plugin_selenium.so $MYPREFIX/plugin |
|
4538 |
||
4539 |
#installExe expecco |
|
4540 |
#installLib *.so |
|
4541 |
#installData resources |
|
4542 |
#installData keyboard.rc |
|
4543 |
#installData doc |
|
4544 |
||
4545 |
[Uninstall] |
|
4546 |
# Leaving this at the default is safe unless you use custom commands in |
|
4547 |
# "Install" to create files. All autopackage API functions |
|
4548 |
# that installs files are logged. |
|
4549 |
uninstallFromLog |
|
4550 |
' |
|
4551 |
||
4552 |
"Created: / 21-12-2010 / 09:06:21 / cg" |
|
4553 |
! |
|
4554 |
||
12364 | 4555 |
bc_dot_mak |
4556 |
"answer a template for the bc.mak makefile. |
|
4557 |
Any variable definition %(Variable) will be later replaced by the mapping. |
|
4558 |
$% characters have to be duplicated. |
|
4559 |
Only needed for WIN" |
|
4560 |
||
4561 |
^ self subclassResponsibility |
|
4562 |
! |
|
4563 |
||
4564 |
bmake_dot_mak |
|
4565 |
"the template code for the bmake.bat file" |
|
4566 |
||
13419 | 4567 |
^ |
12364 | 4568 |
'@REM ------- |
14336 | 4569 |
@REM make using Borland bcc32 |
12364 | 4570 |
@REM type bmake, and wait... |
4571 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4572 |
@REM ------- |
|
13797 | 4573 |
make.exe -N -f bc.mak %%* |
12364 | 4574 |
|
4575 |
%(SUBPROJECT_BMAKE_CALLS) |
|
4576 |
' |
|
4577 |
||
4578 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
14336 | 4579 |
"Modified: / 04-09-2012 / 11:46:22 / cg" |
12364 | 4580 |
! |
4581 |
||
13411 | 4582 |
builder_baseline_dot_rbspec |
4583 |
"For rake-base automatic builder" |
|
13419 | 4584 |
|
13411 | 4585 |
^ ' |
4586 |
# generated from project definition |
|
4587 |
||
4588 |
# load package dependencies |
|
4589 |
load ''package.deps.rake'' |
|
4590 |
||
4591 |
# kludge: clear some invalid dependencies of libwidg |
|
4592 |
# (should be fixed in baseline) |
|
4593 |
clear "stx:libwidg" => "stx:libui" |
|
4594 |
clear "stx:libwidg2" => "stx:libui" |
|
4595 |
||
4596 |
project :''%(APPLICATION):baseline'' do |
|
4597 |
# preamble |
|
4598 |
%(PREAMBLE) |
|
4599 |
# -------- |
|
4600 |
||
4601 |
%(PACKAGES) |
|
4602 |
||
4603 |
application "%(APPLICATION_PACKAGE)" |
|
4604 |
||
4605 |
# postamble |
|
4606 |
%(POSTABLE) |
|
4607 |
# --------- |
|
4608 |
||
4609 |
end |
|
4610 |
' |
|
4611 |
||
4612 |
"Created: / 24-02-2011 / 11:39:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4613 |
"Modified: / 27-02-2011 / 12:42:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4614 |
! |
|
4615 |
||
4616 |
builder_baseline_dot_rbspec_postamble |
|
4617 |
^ '' |
|
4618 |
||
4619 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4620 |
! |
|
4621 |
||
4622 |
builder_baseline_dot_rbspec_preamble |
|
4623 |
^ '' |
|
4624 |
||
4625 |
"Created: / 24-02-2011 / 11:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4626 |
! |
|
4627 |
||
12364 | 4628 |
classLine_libInit_dot_cc |
4629 |
||
4630 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
|
4631 |
||
4632 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
4633 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
4634 |
! |
|
4635 |
||
14334 | 4636 |
lccmake_dot_mak |
4637 |
"the template code for the lccmake.bat file" |
|
12364 | 4638 |
|
13419 | 4639 |
^ |
12364 | 4640 |
'@REM ------- |
4641 |
@REM make using lcc compiler |
|
14334 | 4642 |
@REM type lccmake, and wait... |
12364 | 4643 |
@REM do not edit - automatically generated from ProjectDefinition |
4644 |
@REM ------- |
|
14361 | 4645 |
make.exe -N -f bc.mak -DUSELCC=1 %%* |
12364 | 4646 |
|
4647 |
%(SUBPROJECT_LCCMAKE_CALLS) |
|
4648 |
' |
|
14334 | 4649 |
|
4650 |
"Created: / 03-09-2012 / 19:49:23 / cg" |
|
12364 | 4651 |
! |
4652 |
||
4653 |
make_dot_proto |
|
4654 |
"the template code for the make.proto file" |
|
4655 |
||
4656 |
^ self subclassResponsibility |
|
4657 |
! |
|
4658 |
||
4659 |
make_dot_spec |
|
4660 |
||
13419 | 4661 |
^ |
12364 | 4662 |
'# $','Header','$ |
4663 |
# |
|
13419 | 4664 |
# DO NOT EDIT |
14248 | 4665 |
# automagically generated from the projectDefinition: ',self name,"' at ',Timestamp now printString,"'. |
12364 | 4666 |
# |
4667 |
# Warning: once you modify this file, do not rerun |
|
4668 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
4669 |
# |
|
4670 |
# This file contains specifications which are common to all platforms. |
|
4671 |
# |
|
4672 |
||
4673 |
# Do NOT CHANGE THESE DEFINITIONS |
|
4674 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
4675 |
# to find the source code of a class and to find the library for a package) |
|
4676 |
MODULE=%(MODULE) |
|
4677 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
4678 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
4679 |
||
4680 |
||
4681 |
# Argument(s) to the stc compiler (stc --usage). |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4682 |
# -headerDir=. : create header files locally |
12364 | 4683 |
# (if removed, they will be created as common |
4684 |
# -Pxxx : defines the package |
|
4685 |
# -Zxxx : a prefix for variables within the classLib |
|
4686 |
# -Dxxx : defines passed to to CC for inline C-code |
|
4687 |
# -Ixxx : include path passed to CC for inline C-code |
|
4688 |
# +optspace : optimized for space |
|
4689 |
# +optspace2 : optimized more for space |
|
4690 |
# +optspace3 : optimized even more for space |
|
4691 |
# +optinline : generate inline code for some ST constructs |
|
4692 |
# +inlineNew : additionally inline new |
|
4693 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
4694 |
# |
|
4695 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
4696 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
4697 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
4698 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
4699 |
||
4700 |
||
4701 |
# Argument(s) to the stc compiler (stc --usage). |
|
4702 |
# -warn : no warnings |
|
4703 |
# -warnNonStandard : no warnings about ST/X extensions |
|
4704 |
# -warnEOLComments : no warnings about EOL comment extension |
|
4705 |
# -warnPrivacy : no warnings about privateClass extension |
|
4706 |
# |
|
4707 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
4708 |
# STCWARNINGS=-warn |
|
4709 |
# STCWARNINGS=-warnNonStandard |
|
4710 |
# STCWARNINGS=-warnEOLComments |
|
4711 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
4712 |
||
12545 | 4713 |
%(CLASSES) |
4714 |
||
12364 | 4715 |
%(OBJECTS) |
4716 |
' |
|
4717 |
||
4718 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
4719 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
14248 | 4720 |
"Modified: / 26-07-2012 / 00:56:03 / cg" |
12364 | 4721 |
! |
4722 |
||
12428 | 4723 |
makefile |
13419 | 4724 |
^ |
12428 | 4725 |
'# |
13419 | 4726 |
# DO NOT EDIT |
12428 | 4727 |
# |
13419 | 4728 |
# make uses this file (Makefile) only, if there is no |
12428 | 4729 |
# file named "makefile" (lower-case m) in the same directory. |
4730 |
# My only task is to generate the real makefile and call make again. |
|
4731 |
# Thereafter, I am no longer used and needed. |
|
4732 |
# |
|
15201 | 4733 |
# MACOSX caveat: |
4734 |
# as filenames are not case sensitive (in a default setup), |
|
4735 |
# we cannot use tha above trick. Therefore, this file is now named |
|
4736 |
# "Makefile.init", and you have to execute "make -f Makefile.init" to |
|
4737 |
# get the initial makefile. This is now also done by the toplevel CONFIG |
|
4738 |
# script. |
|
12428 | 4739 |
|
4740 |
.PHONY: run |
|
4741 |
||
4742 |
run: makefile |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4743 |
$(MAKE) -f makefile |
12428 | 4744 |
|
4745 |
#only needed for the definition of $(TOP) |
|
4746 |
include Make.proto |
|
4747 |
||
14665 | 4748 |
makefile: mf |
4749 |
||
4750 |
mf: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4751 |
$(TOP)/rules/stmkmf |
12428 | 4752 |
' |
4753 |
! |
|
4754 |
||
14345 | 4755 |
mingwmake_dot_mak |
4756 |
"the template code for the mingwmake.bat file" |
|
4757 |
||
4758 |
^ |
|
4759 |
'@REM ------- |
|
4760 |
@REM make using mingw gnu compiler |
|
4761 |
@REM type mingwmake, and wait... |
|
4762 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4763 |
@REM ------- |
|
14642 | 4764 |
|
14850 | 4765 |
@pushd %(TOP)\rules |
4766 |
@call find_mingw.bat |
|
4767 |
@popd |
|
14748 | 4768 |
make.exe -N -f bc.mak %%USEMINGW_ARG%% %%* |
14345 | 4769 |
|
4770 |
%(SUBPROJECT_MINGWMAKE_CALLS) |
|
4771 |
' |
|
4772 |
||
4773 |
"Created: / 05-09-2012 / 19:44:51 / cg" |
|
4774 |
! |
|
4775 |
||
12364 | 4776 |
objectLine_make_dot_spec |
4777 |
||
14643 | 4778 |
^' $(OUTDIR_SLASH)%(CLASSFILE).$(O) \' |
12364 | 4779 |
|
4780 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
4781 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
4782 |
! |
|
4783 |
||
4784 |
packageName_dot_rc |
|
4785 |
"the template code for the <libName>.rc file. |
|
4786 |
Only used for WIN" |
|
4787 |
||
13419 | 4788 |
^ |
12364 | 4789 |
'// |
13419 | 4790 |
// DO NOT EDIT |
12364 | 4791 |
// automagically generated from the projectDefinition: ',self name,'. |
4792 |
// |
|
4793 |
VS_VERSION_INFO VERSIONINFO |
|
4794 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
4795 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4796 |
#if (__BORLANDC__) |
12364 | 4797 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
4798 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
4799 |
FILEOS VOS_NT_WINDOWS32 |
|
4800 |
FILETYPE %(FILETYPE) |
|
4801 |
FILESUBTYPE VS_USER_DEFINED |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4802 |
#endif |
12364 | 4803 |
|
4804 |
BEGIN |
|
4805 |
BLOCK "StringFileInfo" |
|
4806 |
BEGIN |
|
4807 |
BLOCK "040904E4" |
|
4808 |
BEGIN |
|
4809 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
4810 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
4811 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
4812 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
4813 |
%(LEGAL_COPYRIGHT_LINE) |
|
4814 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
|
4815 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
4816 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
4817 |
END |
|
4818 |
||
4819 |
END |
|
4820 |
||
4821 |
BLOCK "VarFileInfo" |
|
4822 |
BEGIN // Language | Translation |
|
4823 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
4824 |
END |
|
4825 |
END |
|
4826 |
' |
|
4827 |
" |
|
4828 |
stx_libbasic3 packageName_dot_rc |
|
4829 |
stx_libbasic3 generate_packageName_dot_rc |
|
4830 |
" |
|
4831 |
||
4832 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
4833 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4834 |
"Modified: / 07-10-2011 / 10:51:34 / cg" |
12364 | 4835 |
! |
4836 |
||
13411 | 4837 |
package_dot_deps_dot_rake |
4838 |
^ ' |
|
4839 |
# Package dependencies. |
|
4840 |
# Automatically generated by project defintion. |
|
4841 |
||
4842 |
%(DEPENDENCIES) |
|
4843 |
||
4844 |
' |
|
4845 |
||
4846 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4847 |
! |
|
4848 |
||
14334 | 4849 |
tccmake_dot_mak |
4850 |
"the template code for the tccmake.bat file" |
|
4851 |
||
4852 |
^ |
|
4853 |
'@REM ------- |
|
14336 | 4854 |
@REM make using tcc compiler (Tiny-C) |
14334 | 4855 |
@REM type tccmake, and wait... |
4856 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4857 |
@REM ------- |
|
14361 | 4858 |
make.exe -N -f bc.mak -DUSETCC=1 %%* |
14334 | 4859 |
|
4860 |
%(SUBPROJECT_TCCMAKE_CALLS) |
|
4861 |
' |
|
4862 |
||
4863 |
"Created: / 03-09-2012 / 19:50:41 / cg" |
|
4864 |
! |
|
4865 |
||
12364 | 4866 |
vcmake_dot_mak |
4867 |
"the template code for the vcmake.bat file" |
|
4868 |
||
13419 | 4869 |
^ |
12364 | 4870 |
'@REM ------- |
14336 | 4871 |
@REM make using Microsoft Visual C compiler |
12364 | 4872 |
@REM type vcmake, and wait... |
4873 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4874 |
@REM ------- |
|
13789 | 4875 |
|
4876 |
@if not defined VSINSTALLDIR ( |
|
14850 | 4877 |
pushd %(TOP)\rules |
4878 |
call vcsetup.bat |
|
4879 |
popd |
|
13789 | 4880 |
) |
13797 | 4881 |
make.exe -N -f bc.mak -DUSEVC %%* |
12364 | 4882 |
|
4883 |
%(SUBPROJECT_VCMAKE_CALLS) |
|
4884 |
' |
|
12966 | 4885 |
|
14336 | 4886 |
"Modified: / 04-09-2012 / 11:45:49 / cg" |
12364 | 4887 |
! ! |
4888 |
||
4889 |
!ProjectDefinition class methodsFor:'loading'! |
|
4890 |
||
12397 | 4891 |
ensureFullyLoaded |
4892 |
"ensure that all classes and extensions are loaded properly. |
|
4893 |
This is normally no problem for compiled classLibs - however, if a package |
|
4894 |
has only be installedAsAutoloaded, some classes might want to ensure that |
|
4895 |
when being loaded themself." |
|
4896 |
||
4897 |
self hasAllExtensionsLoaded ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4898 |
self breakPoint:#cg. |
12397 | 4899 |
]. |
4900 |
self hasAllClassesFullyLoaded ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4901 |
self hasAllClassesLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4902 |
self breakPoint:#cg. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4903 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4904 |
self installAutoloadedClasses. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4905 |
self classes do:[:cls | cls autoload ]. |
12397 | 4906 |
]. |
4907 |
||
4908 |
" |
|
4909 |
stx_libbasic ensureFullyLoaded |
|
4910 |
" |
|
12731 | 4911 |
"Verbose := true |
4912 |
stx_libjavascript hasAllExtensionsLoaded |
|
4913 |
" |
|
12735
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4914 |
"Verbose := true |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4915 |
stx_goodies_soap_xe hasAllExtensionsLoaded |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4916 |
" |
13689
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
4917 |
|
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
4918 |
"Modified: / 12-09-2011 / 16:57:53 / cg" |
12397 | 4919 |
! |
4920 |
||
12364 | 4921 |
load |
4922 |
"load the project |
|
13419 | 4923 |
Answer true, if new classes have been installed for this package, |
12364 | 4924 |
false if the package's classes have been already present." |
4925 |
||
4926 |
^ self loadAsAutoloaded:false. |
|
4927 |
! |
|
4928 |
||
4929 |
loadAsAutoloaded:asAutoloaded |
|
4930 |
"load the project. |
|
4931 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
4932 |
Answer true, if new classes have been installed for this package, |
|
4933 |
false if the package's classes have been already present." |
|
4934 |
||
4935 |
|newStuffHasBeenLoaded meOrMySecondIncarnation| |
|
4936 |
||
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4937 |
self projectIsLoaded ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4938 |
asAutoloaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4939 |
"/ to be considered !! |
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4940 |
"/ self isFullyLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4941 |
"/ self hasAllExtensionsLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4942 |
"/ self loadExtensions. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4943 |
"/ ]. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4944 |
"/ self loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4945 |
"/ ]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4946 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4947 |
^ false |
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4948 |
]. |
12749 | 4949 |
thisContext isRecursive ifTrue:[self breakPoint:#cg. ^ false]. "/ avoid endless loops |
15172 | 4950 |
(PackagesBeingLoaded includes:self package) ifTrue:[ |
14851 | 4951 |
"/ seems to be a recursive call |
4952 |
^ false |
|
4953 |
]. |
|
12364 | 4954 |
|
15172 | 4955 |
PackagesBeingLoaded add:self package. |
4956 |
[ |
|
4957 |
newStuffHasBeenLoaded := false. |
|
4958 |
||
4959 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
4960 |
"/ thisContext fullPrintAll. |
|
4961 |
Transcript showCR:('loading %1%2...' |
|
4962 |
bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:['']) |
|
4963 |
with:self name). |
|
4964 |
]. |
|
4965 |
||
4966 |
self rememberOverwrittenExtensionMethods. |
|
4967 |
||
4968 |
self activityNotification:'Executing pre-load action'. |
|
4969 |
self executeHooks: #preLoad. |
|
4970 |
self preLoadAction. |
|
4971 |
||
4972 |
meOrMySecondIncarnation := self. |
|
4973 |
||
4974 |
Class withoutUpdatingChangesDo:[ |
|
4975 |
self activityNotification:'Loading prerequisities'. |
|
4976 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
|
4977 |
||
4978 |
self checkPrerequisitesForLoading. |
|
4979 |
||
4980 |
asAutoloaded ifFalse:[ |
|
4981 |
self loadClassLibrary. |
|
4982 |
"/ could have overloaded my first incarnation |
|
4983 |
meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self. |
|
4984 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
|
4985 |
meOrMySecondIncarnation fetchSlotsFrom:self. |
|
4986 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4987 |
]. |
15172 | 4988 |
|
4989 |
self hasAllExtensionsLoaded ifFalse:[ |
|
4990 |
self activityNotification:'Loading extensions'. |
|
4991 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions. |
|
4992 |
]. |
|
4993 |
(self hasAllClassesLoaded:asAutoloaded not) ifFalse:[ |
|
4994 |
self activityNotification:'Loading classes'. |
|
4995 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded). |
|
4996 |
]. |
|
4997 |
"/ no, don't load subProjects here - will lead to a recursion, which leads |
|
4998 |
"/ to some classes being loaded from source (soap) |
|
4999 |
self activityNotification:'Loading sub projects'. |
|
5000 |
meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5001 |
]. |
15172 | 5002 |
self activityNotification:('Executing post-load action for %1' bindWith:self package). |
5003 |
||
5004 |
"/ mhmh - already done for dll-loaded packages |
|
5005 |
"/ meOrMySecondIncarnation initializeAllClasses. |
|
5006 |
meOrMySecondIncarnation postLoadAction. |
|
5007 |
meOrMySecondIncarnation executeHooks: #postLoad. |
|
5008 |
||
5009 |
meOrMySecondIncarnation projectIsLoaded:true. |
|
5010 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
|
5011 |
self projectIsLoaded:true. |
|
5012 |
]. |
|
5013 |
] ensure:[ |
|
5014 |
PackagesBeingLoaded remove:self package ifAbsent:[]. |
|
12736
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
5015 |
]. |
12364 | 5016 |
|
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
5017 |
self activityNotification:('Done (%1).' bindWith:self package). |
12364 | 5018 |
^ newStuffHasBeenLoaded |
5019 |
||
5020 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
|
5021 |
"Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
5022 |
"Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13623
46625f58d8ee
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13614
diff
changeset
|
5023 |
"Modified: / 04-09-2011 / 10:01:53 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5024 |
"Modified: / 20-11-2012 / 23:06:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12364 | 5025 |
! |
5026 |
||
5027 |
unloadPackage |
|
5028 |
"unload the project. |
|
5029 |
Fails if there are still instances of any of my classes in the system" |
|
5030 |
||
5031 |
self projectIsLoaded ifFalse:[^ false]. |
|
5032 |
thisContext isRecursive ifTrue:[^ false]. |
|
5033 |
||
5034 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5035 |
"/ thisContext fullPrintAll. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5036 |
Transcript show:'unloading '; showCR:self name. |
12364 | 5037 |
]. |
5038 |
||
5039 |
self activityNotification:'Executing pre-unload action'. |
|
5040 |
self preUnloadAction. |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5041 |
self executeHooks: #preUnload. |
12364 | 5042 |
|
5043 |
self activityNotification:'Restoring original methods'. |
|
5044 |
self restoreOverwrittenExtensionMethods. |
|
5045 |
||
5046 |
Class withoutUpdatingChangesDo:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5047 |
self activityNotification:'Unloading sunprojects'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5048 |
self unloadSubProjects. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5049 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5050 |
self activityNotification:'Unloading classes'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5051 |
self unloadClassLibrary. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5052 |
self unloadAllClasses. |
12364 | 5053 |
]. |
5054 |
self projectIsLoaded:false. |
|
5055 |
^ true |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5056 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5057 |
"Modified: / 20-11-2012 / 23:06:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12364 | 5058 |
! ! |
5059 |
||
12086 | 5060 |
!ProjectDefinition class methodsFor:'misc ui support'! |
5061 |
||
5062 |
iconInBrowserSymbol |
|
5063 |
<resource: #programImage> |
|
5064 |
||
5065 |
self theNonMetaclass isApplicationDefinition ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5066 |
self theNonMetaclass isGUIApplication ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5067 |
^ #guiApplicationDefinitionClassIcon |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5068 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5069 |
^ #applicationDefinitionClassIcon |
12086 | 5070 |
]. |
5071 |
^ super iconInBrowserSymbol |
|
5072 |
! ! |
|
5073 |
||
9575 | 5074 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 5075 |
|
13411 | 5076 |
abbrevs |
13592 | 5077 |
"return a dictionary containing my abbreviations; |
5078 |
this dictionary is read from my project-directory's abbrev.stc file, |
|
5079 |
and cached for future use" |
|
5080 |
||
5081 |
|abbrevs| |
|
5082 |
||
5083 |
AccessLock critical:[ |
|
13959 | 5084 |
|mustRead file myPackageDirectory| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5085 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5086 |
AbbrevDictionary isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5087 |
AbbrevDictionary := WeakIdentityDictionary new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5088 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5089 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5090 |
mustRead := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5091 |
abbrevs := AbbrevDictionary at:self ifAbsent:[ mustRead := true. Dictionary new ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5092 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5093 |
mustRead ifTrue:[ |
13959 | 5094 |
myPackageDirectory := self packageDirectory. |
5095 |
myPackageDirectory isNil ifTrue:[ |
|
5096 |
] ifFalse:[ |
|
5097 |
file := myPackageDirectory / 'abbrev.stc'. |
|
5098 |
file exists ifTrue: [ |
|
5099 |
file readingFileDo:[:stream | |
|
5100 |
Smalltalk |
|
5101 |
withAbbreviationsFromStream:stream |
|
5102 |
do:[:nm :fn :pkg :cat :sz| |
|
5103 |
abbrevs at: nm put: (AbbrevEntry new className:nm fileName:fn category:cat numClassInstVars:sz) |
|
5104 |
] |
|
5105 |
] |
|
5106 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5107 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5108 |
]. |
13419 | 5109 |
]. |
13695 | 5110 |
|
13411 | 5111 |
^abbrevs |
5112 |
||
5113 |
"Created: / 06-03-2011 / 18:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13959 | 5114 |
"Modified: / 20-01-2012 / 15:42:47 / cg" |
13411 | 5115 |
! |
5116 |
||
12368 | 5117 |
additionalClassAttributesFor: aClass |
5118 |
"Answers additional set of class attributes for given class |
|
5119 |
Individual project definitions may override this method, but |
|
5120 |
overriding method should always merge its attributes with result |
|
5121 |
of 'super additionalClassAttributesFor: aClass'. |
|
5122 |
||
5123 |
Here, we add #autoload attributes to all test cases and |
|
5124 |
test resources, as they are not neccessary for the package |
|
5125 |
and should not be compiled (because of unwanted dependency |
|
5126 |
on stx:goodies/sunit package) |
|
5127 |
" |
|
5128 |
||
5129 |
(aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)]. |
|
5130 |
(aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)]. |
|
5131 |
||
5132 |
"No additional attributes" |
|
5133 |
^#() |
|
5134 |
||
5135 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5136 |
stx_libbasic additionalClassAttributesFor: Object |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5137 |
stx_libtool additionalClassAttributesFor: Tools::NavigationHistoryTests |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5138 |
stx_goodies_sunit additionalClassAttributesFor: TestCase |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5139 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5140 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5141 |
stx_libtool classNamesAndAttributes_code_ignoreOldEntries:true ignoreOldDefinition: true |
12368 | 5142 |
|
5143 |
" |
|
5144 |
||
5145 |
"Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5146 |
! |
|
5147 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5148 |
checkIfClassesArePresent |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5149 |
"check if all classes defined by this project are present and |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5150 |
offer a dialog to abort the current operation if not" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5151 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5152 |
|check nonExistantClasses| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5153 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5154 |
nonExistantClasses := Set new. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5155 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5156 |
check := |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5157 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5158 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5159 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5160 |
cls := Smalltalk classNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5161 |
cls isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5162 |
Transcript showCR:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5163 |
nonExistantClasses add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5164 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5165 |
]. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5166 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5167 |
self allClassNames do:check. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5168 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5169 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5170 |
check value:nm |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5171 |
]. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5172 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5173 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5174 |
nonExistantClasses notEmpty ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5175 |
(Dialog confirm:(Dialog classResources |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5176 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5177 |
with:nonExistantClasses anElement allBold)) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5178 |
ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5179 |
AbortOperationRequest raise. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5180 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5181 |
^ false. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5182 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5183 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5184 |
^ true |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5185 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5186 |
|
12368 | 5187 |
classNamesAndAttributesAsSpecArray |
13419 | 5188 |
"given a classNamesAndAttributes array, make this a spec array (array of arrays). |
12368 | 5189 |
This decompresses class-name entries into a one-element array for easier processing" |
5190 |
||
5191 |
^ self classNamesAndAttributes |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5192 |
collect:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5193 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5194 |
entry first isSymbol ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5195 |
entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5196 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5197 |
(Array with:entry first asSymbol) , (entry copyFrom:2) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5198 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5199 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5200 |
Array with:entry asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5201 |
]]. |
12368 | 5202 |
|
5203 |
"Created: / 19-02-2007 / 16:11:53 / cg" |
|
5204 |
! |
|
5205 |
||
9627 | 5206 |
classNamesAndAttributesDo: aBlock |
5207 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
5208 |
||
5209 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 5210 |
! |
5211 |
||
12368 | 5212 |
classNamesAndAttributesFromSpecArray:aSpecArray |
5213 |
"given a spec array (array of arrays), make this a classNamesAndAttributes array |
|
5214 |
as stored literally in the method. |
|
5215 |
This compresses single element array-elements into plain names |
|
5216 |
(to save code in the compiled binaries)" |
|
5217 |
||
5218 |
^ aSpecArray |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5219 |
collect:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5220 |
(entry isArray and:[entry size == 1]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5221 |
entry first |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5222 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5223 |
entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5224 |
]]. |
12368 | 5225 |
|
5226 |
"Created: / 19-02-2007 / 16:12:32 / cg" |
|
5227 |
! |
|
5228 |
||
9664 | 5229 |
compile:someCode categorized:category |
15006 | 5230 |
^ self compile:someCode categorized:category using:nil |
5231 |
! |
|
5232 |
||
5233 |
compile:someCode categorized:category using:compilerOrNil |
|
5234 |
^ Class packageQuerySignal |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5235 |
answer:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5236 |
do:[ |
15006 | 5237 |
(compilerOrNil ? self theMetaclass compilerClass) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5238 |
compile:someCode |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5239 |
forClass:self theMetaclass |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5240 |
inCategory:category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5241 |
] |
9664 | 5242 |
|
5243 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
5244 |
! |
|
5245 |
||
9627 | 5246 |
compiled_classes |
13419 | 5247 |
^ self compiled_classNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5248 |
collect: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5249 |
[:eachName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5250 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5251 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5252 |
cls := (Smalltalk at:eachName asSymbol). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5253 |
(cls isNil or:[cls isBehavior not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5254 |
Transcript showCR:('ProjectDefinition: missing/invalid class: ', eachName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5255 |
cls := nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5256 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5257 |
cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5258 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5259 |
thenSelect:[:cls | cls notNil] |
9627 | 5260 |
|
5261 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
5262 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 5263 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 5264 |
! |
5265 |
||
9627 | 5266 |
compiled_classesDo:aBlock |
5267 |
self compiled_classes do:aBlock. |
|
5268 |
||
5269 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
5270 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
5271 |
! |
|
5272 |
||
15124 | 5273 |
compiled_classesForPlatform:arch |
13419 | 5274 |
^ (self compiled_classNamesForPlatform:arch) |
15124 | 5275 |
collect:[:eachName | (Smalltalk classNamed:eachName)] |
9627 | 5276 |
|
10251 | 5277 |
" |
5278 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
5279 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
5280 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
5281 |
" |
|
5282 |
||
9627 | 5283 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
5284 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 5285 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 5286 |
! |
5287 |
||
5288 |
compiled_classes_common |
|
13419 | 5289 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5290 |
compiled_classNames_common |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5291 |
collect:[:eachName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5292 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5293 |
|
15124 | 5294 |
cls := Smalltalk classNamed:eachName. |
5295 |
cls isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5296 |
self warn:('Missing/invalid class: %1\\%2' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5297 |
bindWith:eachName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5298 |
with:('Warning: The class is skipped in the list of compiled classes.' allBold)) withCRs. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5299 |
cls := nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5300 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5301 |
cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5302 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5303 |
thenSelect:[:cls| cls notNil "isBehavior"] |
9627 | 5304 |
|
5305 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
5306 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
13090
827d5322948f
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
13088
diff
changeset
|
5307 |
"Modified: / 11-10-2010 / 12:11:06 / cg" |
9607 | 5308 |
! |
5309 |
||
9627 | 5310 |
cvsRevision |
5311 |
|rev| |
|
5312 |
||
5313 |
rev := self revision. |
|
5314 |
rev isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5315 |
"not yet pubplished" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5316 |
^ #( '0' '1' ) |
9627 | 5317 |
]. |
5318 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
5319 |
||
5320 |
" |
|
5321 |
self cvsRevision |
|
13419 | 5322 |
stx_libbasic3 cvsRevision |
9627 | 5323 |
" |
5324 |
||
5325 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 5326 |
! |
5327 |
||
13411 | 5328 |
defaultClassAttributesFor: aClass |
5329 |
"Answers default set of class attributes for given class. |
|
5330 |
This is internal method only, to per-project customization |
|
5331 |
please override either #additionalClassAttributes or |
|
5332 |
#additional classAttributesFor:" |
|
5333 |
||
5334 |
| attrs | |
|
5335 |
||
5336 |
"JV @ 2010-06-19 |
|
5337 |
Add a programming language attribute for non-smalltalk classes. |
|
5338 |
Used by multi-lang enabled loading mechanism" |
|
13419 | 5339 |
attrs := aClass programmingLanguage isSmalltalk |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5340 |
ifTrue:[#()] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5341 |
ifFalse:[Array with: (Array with: #lang with: aClass programmingLanguage name asSymbol)]. |
13419 | 5342 |
|
13411 | 5343 |
|
5344 |
"JV @ 2009-10-26 |
|
5345 |
Give a project definition to specify additional attributes for given class." |
|
5346 |
attrs := attrs , (self additionalClassAttributesFor: aClass). |
|
5347 |
||
5348 |
^attrs |
|
5349 |
||
5350 |
"Created: / 19-06-2010 / 10:44:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5351 |
! |
|
5352 |
||
9627 | 5353 |
inconsistency:message |
5354 |
Dialog warn:message |
|
9536 | 5355 |
|
9627 | 5356 |
" |
5357 |
self searchForNeverCompiledSuperclasses |
|
13419 | 5358 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
9627 | 5359 |
" |
5360 |
||
5361 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 5362 |
! |
5363 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5364 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5365 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5366 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5367 |
" |
13419 | 5368 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
5369 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5370 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5371 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5372 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5373 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5374 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5375 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5376 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5377 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5378 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5379 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5380 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5381 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5382 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5383 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5384 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5385 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5386 |
|
13411 | 5387 |
mergeClassAttributes: attr1 with: attr2 |
5388 |
||
5389 |
^attr1 , (attr2 reject:[:each|attr1 includes: each]) |
|
5390 |
||
5391 |
"Created: / 19-06-2010 / 10:50:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5392 |
! |
|
5393 |
||
5394 |
mergeDefaultClassAttributesFor: aClass with: attributes |
|
5395 |
||
5396 |
^self mergeClassAttributes: attributes with: (self defaultClassAttributesFor: aClass) |
|
5397 |
||
5398 |
"Created: / 19-06-2010 / 10:51:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5399 |
! |
|
5400 |
||
9627 | 5401 |
namesAndAttributesIn:aCollection do: aBlock |
5402 |
aCollection do:[:entry | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5403 |
|className attributes| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5404 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5405 |
entry isArray ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5406 |
className := entry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5407 |
attributes := #(). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5408 |
] ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5409 |
className := entry first. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5410 |
attributes := entry copyFrom:2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5411 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5412 |
aBlock value: className value: attributes |
9627 | 5413 |
]. |
5414 |
||
5415 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 5416 |
! |
5417 |
||
9627 | 5418 |
searchForClasses |
10010 | 5419 |
"answer all non-private classes that belong to this project. |
10005 | 5420 |
They are sorted in load order" |
5421 |
||
13419 | 5422 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
9627 | 5423 |
|
5424 |
" |
|
10010 | 5425 |
stx_libbasic3 searchForClasses |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5426 |
stx_goodies_webServer_htmlTree searchForClasses |
9627 | 5427 |
" |
5428 |
||
5429 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
5430 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 5431 |
! |
5432 |
||
9627 | 5433 |
searchForClassesWithProject: aProjectID |
15098 | 5434 |
"answer all public and private classes belonging to aProjectID" |
9627 | 5435 |
|
13419 | 5436 |
^ Smalltalk allClasses |
15098 | 5437 |
select:[:cls | cls package = aProjectID]. |
9627 | 5438 |
|
5439 |
" |
|
15098 | 5440 |
self searchForClassesWithProject: #'exept:ctypes' |
9627 | 5441 |
" |
5442 |
||
5443 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
9536 | 5444 |
! |
5445 |
||
9627 | 5446 |
searchForExtensions |
5447 |
^ self searchForExtensionsWithProject:self package |
|
5448 |
||
5449 |
" |
|
13419 | 5450 |
self searchForExtensions |
9627 | 5451 |
DapasXProject searchForExtensions |
5452 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
5453 |
stx_libtool searchForExtensions |
9627 | 5454 |
" |
5455 |
||
5456 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
5457 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
5458 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 5459 |
! |
5460 |
||
9627 | 5461 |
searchForExtensionsWithProject:aProjectID |
5462 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5463 |
Return the extension-methods sorted by classname-selector" |
9627 | 5464 |
|
5465 |
|methods| |
|
5466 |
||
11152 | 5467 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
13419 | 5468 |
methods |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5469 |
sort:[:m1 :m2 | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5470 |
|c1 c2| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5471 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5472 |
c1 := m1 mclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5473 |
c2 := m2 mclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5474 |
c1 == c2 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5475 |
m1 selector < m2 selector |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5476 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5477 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5478 |
true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5479 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5480 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5481 |
false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5482 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5483 |
c1 name < c2 name |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5484 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5485 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5486 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5487 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5488 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5489 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5490 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5491 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5492 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5493 |
"/ ]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5494 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5495 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5496 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5497 |
]. |
9627 | 5498 |
^ methods |
5499 |
||
5500 |
" |
|
5501 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
5502 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5503 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 5504 |
" |
5505 |
||
5506 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5507 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 5508 |
! |
5509 |
||
9627 | 5510 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5511 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5512 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5513 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5514 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5515 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5516 |
addPackage := |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5517 |
[:package | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5518 |
(package ~= myPackageID) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5519 |
true "(package startsWith:'stx:') not" ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5520 |
package ~= PackageId noProjectID ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5521 |
requiredPackages add:package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5522 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5523 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5524 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5525 |
]. |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5526 |
|
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5527 |
"/ need them also... |
14886 | 5528 |
self mandatoryPreRequisites do:[:eachPreRequisitePackage | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5529 |
addPackage value:eachPreRequisitePackage |
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5530 |
]. |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5531 |
|
10788 | 5532 |
self compiled_classesDo:[:cls | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5533 |
cls allSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5534 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5535 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5536 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5537 |
cls allPrivateClassesDo:[:eachPrivateClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5538 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5539 |
eachSuperClass isPrivate ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5540 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5541 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5542 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5543 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5544 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5545 |
cls sharedPoolNames do:[:eachPoolName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5546 |
|eachPoolClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5547 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5548 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5549 |
eachPoolClass isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5550 |
Transcript showCR:('Warning: missing pool: %1 (required by %2)' bindWith:eachPoolName with:cls name) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5551 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5552 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5553 |
addPackage value:(eachPoolSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5554 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5555 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5556 |
]. |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5557 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5558 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5559 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5560 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5561 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5562 |
cls withAllSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5563 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5564 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5565 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5566 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5567 |
^ requiredPackages |
9627 | 5568 |
|
9880 | 5569 |
" |
13419 | 5570 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
14939 | 5571 |
cg_demos_helloWorld searchForProjectsWhichProvideHeaderFiles |
9880 | 5572 |
" |
9627 | 5573 |
|
10251 | 5574 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
13216 | 5575 |
"Modified: / 18-01-2011 / 17:58:33 / cg" |
9664 | 5576 |
! |
5577 |
||
9667 | 5578 |
searchForSiblingProjects |
10132 | 5579 |
"answer all the packages (package names) having the my parent package" |
5580 |
||
9667 | 5581 |
|myPackage myParentPackage| |
5582 |
||
5583 |
myPackage := self package asPackageId. |
|
5584 |
myParentPackage := myPackage parentPackage. |
|
5585 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
5586 |
||
13419 | 5587 |
^ Smalltalk allProjectIDs |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5588 |
select:[:projectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5589 |
|thisPackage| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5590 |
thisPackage := projectID asPackageId. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5591 |
(thisPackage parentPackage = myParentPackage) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5592 |
and:[ thisPackage ~= myPackage ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5593 |
] |
9667 | 5594 |
|
5595 |
" |
|
5596 |
self searchForSiblingProjects |
|
5597 |
bosch_dapasx_Application searchForSiblingProjects |
|
5598 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
5599 |
" |
|
5600 |
||
5601 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
5602 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
5603 |
! |
|
5604 |
||
9664 | 5605 |
searchForSubProjects |
10132 | 5606 |
"answer all packages (package names), that are my subProjects" |
5607 |
||
9664 | 5608 |
|myPackage| |
5609 |
||
5610 |
myPackage := self package. |
|
13419 | 5611 |
^ Smalltalk allProjectIDs |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5612 |
select:[:projectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5613 |
projectID ~= PackageId noProjectID |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5614 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
13419 | 5615 |
|
5616 |
" |
|
5617 |
self searchForSubProjects |
|
9664 | 5618 |
bosch_dapasx_Application searchForSubProjects |
5619 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
5620 |
" |
|
5621 |
||
5622 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
5623 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 5624 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 5625 |
! |
5626 |
||
5627 |
setupForType:typeOrNil |
|
9714 | 5628 |
typeOrNil = GUIApplicationType ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5629 |
self compile: |
12425 | 5630 |
'isGUIApplication |
5631 |
"return true, if this is a GUI application. |
|
5632 |
(these need more libraries and use a different startup procedure)" |
|
5633 |
||
5634 |
^ true |
|
5635 |
' |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5636 |
categorized:'description'. |
15070 | 5637 |
self setSuperclass: ApplicationDefinition. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5638 |
^ self |
9664 | 5639 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
5640 |
|
9714 | 5641 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5642 |
self compile: |
12425 | 5643 |
'isGUIApplication |
5644 |
"return true, if this is a GUI application. |
|
5645 |
(these need more libraries and use a different startup procedure)" |
|
5646 |
||
5647 |
^ false |
|
5648 |
' |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5649 |
categorized:'description'. |
15070 | 5650 |
self setSuperclass: ApplicationDefinition. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5651 |
^ self |
13419 | 5652 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
5653 |
|
12349 | 5654 |
self theMetaclass removeSelector: #isGUIApplication. |
15070 | 5655 |
self setSuperclass: LibraryDefinition. |
9664 | 5656 |
^ self. |
5657 |
||
5658 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
13411 | 5659 |
! |
5660 |
||
5661 |
shouldExcludeTest: test |
|
5662 |
||
5663 |
self excludedFromTestSuite do: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5664 |
[:spec| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5665 |
(spec isSymbol and:[test class name == spec]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5666 |
ifTrue:[^true]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5667 |
(spec isArray and:[test class name == spec first and:[test selector == spec second]]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5668 |
ifTrue:[^true]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5669 |
]. |
13411 | 5670 |
^false |
5671 |
||
5672 |
"Created: / 03-06-2011 / 17:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
9536 | 5673 |
! ! |
5674 |
||
12210 | 5675 |
!ProjectDefinition class methodsFor:'private-extension handling'! |
5676 |
||
15057 | 5677 |
extensionOverwriteInfo |
5678 |
^ extensionOverwriteInfo |
|
5679 |
! |
|
5680 |
||
5681 |
fetchSlotsFrom:myFirstIncarnation |
|
5682 |
"this is invoked in a just loaded instance of myself, |
|
5683 |
to fetch the safe and extensionInfo from my first incarnation" |
|
5684 |
||
5685 |
safeForOverwrittenMethods := myFirstIncarnation safeForOverwrittenMethods. |
|
5686 |
extensionOverwriteInfo := myFirstIncarnation extensionOverwriteInfo. |
|
5687 |
! |
|
5688 |
||
12210 | 5689 |
hasSavedOverwrittenMethods |
5690 |
"true, if any of my methods was overwritten by another loaded package. |
|
5691 |
These methods are now in my safe" |
|
5692 |
||
12208
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5693 |
^ safeForOverwrittenMethods notEmptyOrNil |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5694 |
! |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5695 |
|
14984 | 5696 |
methodOverwrittenBy:anExtensionMethod |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5697 |
"return the (hidden) original method, which was located in another package |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5698 |
and which got overwritten by one of my extension methods. Nil if there is none." |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5699 |
|
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5700 |
|mclass selector oldPackage| |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5701 |
|
12218
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
5702 |
extensionOverwriteInfo isNil ifTrue:[^ nil]. |
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
5703 |
|
14984 | 5704 |
mclass := anExtensionMethod mclass. |
5705 |
selector := anExtensionMethod selector. |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5706 |
oldPackage := extensionOverwriteInfo at:(mclass name,'>>',selector) ifAbsent:nil. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5707 |
oldPackage isNil ifTrue:[^ nil]. |
13419 | 5708 |
^ oldPackage asPackageId projectDefinitionClass |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5709 |
savedOverwrittenMethodForClass:mclass selector:selector. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5710 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5711 |
|
12210 | 5712 |
rememberOverwrittenExtensionMethods |
5713 |
"before loading, tell other packages to keep a safe reference to any method |
|
5714 |
which gets overloaded by me, and also remember here, whome I have overloaded. |
|
5715 |
This allows for two things: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5716 |
a) correct fileout of the other base-package (for example, when checking in any of its class) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5717 |
b) correct unloading of myself" |
12210 | 5718 |
|
5719 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5720 |
|class oldMethod oldPackage defClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5721 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5722 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5723 |
class notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5724 |
oldMethod := class compiledMethodAt:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5725 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5726 |
oldMethod notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5727 |
oldPackage := oldMethod package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5728 |
oldPackage ~= PackageId noProjectID ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5729 |
defClass := oldPackage asPackageId projectDefinitionClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5730 |
defClass notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5731 |
defClass rememberOverwrittenMethod:oldMethod inClass:class. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5732 |
extensionOverwriteInfo isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5733 |
extensionOverwriteInfo := Dictionary new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5734 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5735 |
extensionOverwriteInfo at:(className,'>>',selector) put:oldPackage. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5736 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5737 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5738 |
]. |
12210 | 5739 |
]. |
5740 |
! |
|
5741 |
||
5742 |
rememberOverwrittenMethod:oldMethod inClass:aClass |
|
5743 |
"invoked from another projectDefinition, when that package is about to be loaded |
|
13419 | 5744 |
and about to overwrite one of my methods. |
5745 |
I will save the method locally, to allow for correct fileout of this class/project or |
|
12210 | 5746 |
to correctly reestablish my methods when the other package is unloaded later." |
5747 |
||
5748 |
|thisIsOneOfMyMethods selector| |
|
5749 |
||
5750 |
selector := oldMethod selector. |
|
5751 |
||
12293
983b9555f6e8
changed: #rememberOverwrittenMethod:inClass:
Claus Gittinger <cg@exept.de>
parents:
12286
diff
changeset
|
5752 |
thisIsOneOfMyMethods := (self classNames includes:aClass theNonMetaclass name) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5753 |
or:[ aClass isPrivate and:[ self classNames includes: aClass topOwningClass theNonMetaclass name ]]. |
12210 | 5754 |
thisIsOneOfMyMethods ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5755 |
self extensionMethodNames pairWiseDo:[:extClassName :extSelector | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5756 |
extClassName = aClass name ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5757 |
selector = extSelector ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5758 |
thisIsOneOfMyMethods := true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5759 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5760 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5761 |
] |
12210 | 5762 |
]. |
5763 |
thisIsOneOfMyMethods ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5764 |
self error:'oops - this is not one of my methods' mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5765 |
^ self |
12210 | 5766 |
]. |
5767 |
||
5768 |
safeForOverwrittenMethods isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5769 |
safeForOverwrittenMethods := Dictionary new. |
12210 | 5770 |
]. |
14984 | 5771 |
safeForOverwrittenMethods at:(aClass name,'>>',selector) put:oldMethod. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5772 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5773 |
|
12624 | 5774 |
restoreOverwrittenExtensionMethods |
5775 |
"after unloading, tell other packages to restore any safed reference to any method |
|
14981 | 5776 |
which got overloaded by me. |
5777 |
Unfinished!!" |
|
12624 | 5778 |
|
5779 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5780 |
|class oldMethod oldPackage| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5781 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5782 |
oldPackage := extensionOverwriteInfo at:(className,'>>',selector). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5783 |
oldPackage notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5784 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5785 |
class notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5786 |
oldMethod := oldPackage savedOverwrittenMethodForClass:class selector:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5787 |
oldMethod notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5788 |
self breakPoint:#cg. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5789 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5790 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5791 |
]. |
12624 | 5792 |
]. |
5793 |
! |
|
5794 |
||
15057 | 5795 |
safeForOverwrittenMethods |
5796 |
^ safeForOverwrittenMethods |
|
5797 |
! |
|
5798 |
||
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5799 |
savedOverwrittenMethodForClass:aClass selector:aSelector |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5800 |
"return one of my saved original methods" |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5801 |
|
13692
2dffef08a4ac
changed: #savedOverwrittenMethodForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
13689
diff
changeset
|
5802 |
safeForOverwrittenMethods isNil ifTrue:[^ nil]. |
12274 | 5803 |
^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil |
14981 | 5804 |
! |
5805 |
||
5806 |
savedOverwrittenMethods |
|
5807 |
"return my saved original methods" |
|
5808 |
||
5809 |
^ safeForOverwrittenMethods ? #() |
|
12210 | 5810 |
! ! |
5811 |
||
5812 |
!ProjectDefinition class methodsFor:'private-loading'! |
|
5813 |
||
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5814 |
checkPrerequisitesForLoading |
14957 | 5815 |
"check if I can be loaded - i.e. if all classes to be extended are already loaded. |
5816 |
Raise an error if not" |
|
5817 |
||
12264 | 5818 |
|classesAlreadyWarned| |
5819 |
||
5820 |
classesAlreadyWarned := Set new. |
|
5821 |
||
13419 | 5822 |
self extensionMethodNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5823 |
pairWiseDo:[:className :selector | |
14957 | 5824 |
|class errMsg| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5825 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5826 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5827 |
class isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5828 |
(classesAlreadyWarned includes:className) ifFalse:[ |
14957 | 5829 |
(self classNames includes:className) ifTrue:[ |
5830 |
errMsg := 'extension for a class in myself: ',className. |
|
5831 |
] ifFalse:[ |
|
5832 |
errMsg := 'missing class for extension: ',className. |
|
5833 |
]. |
|
5834 |
Transcript showCR:errMsg. |
|
5835 |
self error:errMsg mayProceed:true. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5836 |
classesAlreadyWarned add:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5837 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5838 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5839 |
] |
12263
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
5840 |
|
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
5841 |
"/ todo: more needed here... |
12731 | 5842 |
|
5843 |
" |
|
5844 |
stx_libjavascript checkPrerequisitesForLoading |
|
5845 |
" |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5846 |
! |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5847 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5848 |
executeHooks: hook |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5849 |
"Execute all hooks annotate by given symbol. Currently supported |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5850 |
hooks are: #preLoad, #postLoad, #preUnload." |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5851 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5852 |
| cls | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5853 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5854 |
cls := self. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5855 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5856 |
[ cls notNil ] whileTrue:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5857 |
cls class selectorsAndMethodsDo:[:selector :method| |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5858 |
(method annotationAt: hook) notNil ifTrue:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5859 |
method numArgs == 0 ifTrue:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5860 |
self perform: selector |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5861 |
] ifFalse:[ |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5862 |
self error:'Hook for %1 must have no arguments' mayProceed: true. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5863 |
] |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5864 |
] |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5865 |
]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5866 |
cls := cls superclass. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5867 |
]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5868 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5869 |
"Created: / 20-11-2012 / 23:00:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5870 |
"Modified: / 27-11-2012 / 16:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5871 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
5872 |
|
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5873 |
loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5874 |
self allClasses do:[:cls | cls autoload] |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5875 |
|
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5876 |
"Created: / 21-08-2011 / 17:24:13 / cg" |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5877 |
! |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5878 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5879 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5880 |
"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
|
5881 |
install as autoloaded classes marked to be autoloaded. |
10401 | 5882 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
5883 |
||
5884 |
Answer true, if classes have been loaded" |
|
12028 | 5885 |
|
13411 | 5886 |
^self loadAllClassesAsAutoloaded:asAutoloaded languages: ProgrammingLanguage all |
5887 |
||
5888 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
|
5889 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
5890 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
5891 |
"Modified: / 19-06-2010 / 11:37:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5892 |
! |
|
5893 |
||
5894 |
loadAllClassesAsAutoloaded:asAutoloaded languages: langs |
|
5895 |
"load (fileIn) classes in given languages that should be present - |
|
5896 |
install as autoloaded classes marked to be autoloaded. |
|
5897 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
5898 |
langs should be collection of ProgrammingLanguage available in the system. |
|
5899 |
||
5900 |
Answer true, if classes have been loaded" |
|
5901 |
||
5902 |
|classNamesToLoad classNamesToAutoload classNamesToLangs hasClassesToLoad loadedClasses platformName |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5903 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5904 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5905 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5906 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5907 |
classNamesToAutoload := OrderedCollection new. |
13411 | 5908 |
classNamesToLangs := Dictionary new. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5909 |
|
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
5910 |
hasClassesToLoad := false. |
13419 | 5911 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5912 |
|eachClassnameSym isAutoload clsLangAttr clsLang cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5913 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5914 |
eachClassnameSym := eachClassname asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5915 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5916 |
clsLangAttr := eachAttributes detect:[:a|a isArray and: [a size == 2 and:[a first == #lang]]] ifNone:[nil]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5917 |
clsLang := clsLangAttr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5918 |
ifNil:[SmalltalkLanguage instance] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5919 |
ifNotNil:[ProgrammingLanguage named: clsLangAttr second ifNone:[nil]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5920 |
classNamesToLangs at: eachClassname put: clsLang. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5921 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5922 |
"no need to (re-)load an existing class, but install if should be loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5923 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5924 |
((cls isNil or:[cls isLoaded not and:[isAutoload not]]) and:[clsLang notNil and:[langs includes: clsLang]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5925 |
(eachAttributes isEmpty |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5926 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5927 |
or:[(eachAttributes includes:platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5928 |
or:[eachAttributes contains:[:a|a isArray]]]]) "/FIXME: Hack." |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5929 |
ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5930 |
hasClassesToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5931 |
isAutoload ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5932 |
classNamesToAutoload add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5933 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5934 |
classNamesToLoad add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5935 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5936 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5937 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5938 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5939 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5940 |
hasClassesToLoad ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5941 |
loadedClasses := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5942 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5943 |
self packageDirectory isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5944 |
classNamesToLoad notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5945 |
"required classes are missing. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5946 |
Autoloaded classes are considered as optional..." |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5947 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5948 |
error:(self name,'[error] cannot install because packageDirectory is unknown for missing classes: ', classNamesToLoad printString) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5949 |
mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5950 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5951 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5952 |
(self name,'[info] cannot install autoloaded classes because packageDirectory is unknown') infoPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5953 |
^ true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5954 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5955 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5956 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5957 |
of class name to file name" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5958 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5959 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5960 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5961 |
"install autoloaded classes first, |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5962 |
some others may depend on them" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5963 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5964 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5965 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5966 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5967 |
errorString: 'Autoloading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5968 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5969 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName) . |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5970 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5971 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5972 |
classesWhichFailedToLoad := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5973 |
classNamesToLoad notEmpty ifTrue:[ |
14021 | 5974 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5975 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5976 |
bindWith:self name with:classNamesToLoad size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5977 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5978 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5979 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5980 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5981 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5982 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5983 |
errorString: 'Loading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5984 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5985 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5986 |
"maybe, fileIn failed, because the load order is wrong. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5987 |
Work around this by installing the class as autoloaded and |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5988 |
loading it" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5989 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5990 |
classesWhichFailedToLoad add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5991 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5992 |
] do:[ |
14021 | 5993 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5994 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5995 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5996 |
cls := self loadClass: eachClassName asAutoloaded: false language: (classNamesToLangs at: eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5997 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5998 |
loadedClasses add:cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5999 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6000 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6001 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6002 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6003 |
classesWhichFailedToLoad do:[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6004 |
(Smalltalk at:eachClassName) autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6005 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6006 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6007 |
loadedClasses do:[:eachLoadedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6008 |
"do not initialize, if initialize method is inherited" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6009 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6010 |
eachLoadedClass initialize |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6011 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6012 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6013 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6014 |
]. |
10401 | 6015 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6016 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6017 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
12028 | 6018 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
13411 | 6019 |
"Created: / 19-06-2010 / 11:35:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6020 |
"Modified: / 19-06-2010 / 15:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6021 |
! |
|
6022 |
||
6023 |
loadClass: className asAutoloaded: asAutoloaded language: lang |
|
13592 | 6024 |
| packageDir classFile entry category numClassInstVars cls| |
6025 |
||
6026 |
"Handle smalltalk classes specially to provide backward compatibility" |
|
13411 | 6027 |
lang isSmalltalk ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6028 |
entry := self abbrevs at: className ifAbsent:[nil]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6029 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6030 |
asAutoloaded ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6031 |
category := entry isNil ifTrue:[#autoloaded] ifFalse:[entry category]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6032 |
numClassInstVars := entry isNil ifTrue:[0] ifFalse:[entry numClassInstVars]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6033 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6034 |
installAutoloadedClassNamed: className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6035 |
category: category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6036 |
package: self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6037 |
revision: nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6038 |
numClassInstVars:numClassInstVars. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6039 |
entry notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6040 |
cls setClassFilename:(entry fileName,'.st'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6041 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6042 |
^ cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6043 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6044 |
^ Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6045 |
fileInClass:className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6046 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6047 |
initialize:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6048 |
lazy:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6049 |
silent:true |
13411 | 6050 |
]. |
6051 |
||
6052 |
"For non-smalltalk language do" |
|
6053 |
asAutoloaded ifTrue:[^self error:'Only Smalltalk classes may be autoloaded (yet)']. |
|
6054 |
||
6055 |
packageDir := self packageDirectory asFilename. |
|
6056 |
classFile := packageDir / ((Smalltalk fileNameForClass: className) , '.' , lang sourceFileSuffix). |
|
6057 |
classFile exists ifFalse:[^nil]. |
|
6058 |
lang fileIn: classFile. |
|
6059 |
^nil "FIXME: should return the class" |
|
6060 |
||
6061 |
"Created: / 19-06-2010 / 09:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6062 |
"Modified: / 06-03-2011 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13592 | 6063 |
"Modified: / 18-08-2011 / 14:22:15 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6064 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6065 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6066 |
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
|
6067 |
"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
|
6068 |
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
|
6069 |
|
12295 | 6070 |
|libraryName| |
10430
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
6071 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
6072 |
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
|
6073 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
6074 |
(Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6075 |
"already loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6076 |
^ true |
13419 | 6077 |
]. |
14021 | 6078 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6079 |
Transcript showCR:(' %1: loading classLibrary...' bindWith:self name). |
13419 | 6080 |
]. |
12743 | 6081 |
self activityNotification:'Loading classLibrary'. |
6082 |
||
12295 | 6083 |
^ 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
|
6084 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6085 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6086 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6087 |
"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
|
6088 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6089 |
self hasAllExtensionsLoaded ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6090 |
self breakPoint:#cg. |
14021 | 6091 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6092 |
Transcript showCR:(' %1: filing in extensions...' bindWith:self name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6093 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6094 |
Smalltalk loadExtensionsForPackage:self package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6095 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6096 |
]. |
10401 | 6097 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6098 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6099 |
"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
|
6100 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6101 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6102 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6103 |
"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
|
6104 |
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
|
6105 |
|
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
6106 |
Class withoutUpdatingChangesDo:[ |
14790 | 6107 |
aListOfPackages do:[:eachPackageID | |
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
6108 |
|cls| |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
6109 |
|
14812 | 6110 |
cls := self definitionClassForPackage:eachPackageID. |
6111 |
(cls isNil or:[cls isLoaded not or:[cls projectIsLoaded not]]) ifTrue:[ |
|
15172 | 6112 |
Smalltalk loadPackage:eachPackageID asAutoloaded:asAutoloaded. |
6113 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6114 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6115 |
]. |
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
6116 |
|
13167 | 6117 |
"Modified: / 09-12-2010 / 12:36:17 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6118 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6119 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6120 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6121 |
"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
|
6122 |
|
12743 | 6123 |
|prereq| |
6124 |
||
6125 |
prereq := self effectivePreRequisites. |
|
14843 | 6126 |
prereq notEmpty ifTrue:[ |
14021 | 6127 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6128 |
Transcript showCR:(' %1 loading prerequisites...' bindWith:self name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6129 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6130 |
self loadPackages:prereq asAutoloaded:asAutoloaded |
12743 | 6131 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6132 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6133 |
|
12596 | 6134 |
loadSubProjects |
6135 |
"load other packages (at least the projectDefinitions and their extensions)" |
|
6136 |
||
6137 |
self loadSubProjectsAsAutoloaded:false. |
|
6138 |
self subProjects do:[:p | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6139 |
|subDef| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6140 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6141 |
subDef := self definitionClassForPackage:p. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6142 |
subDef notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6143 |
subDef loadSubProjects |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6144 |
]. |
12596 | 6145 |
]. |
6146 |
! |
|
6147 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6148 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6149 |
"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
|
6150 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6151 |
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
|
6152 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6153 |
"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
|
6154 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6155 |
|
13411 | 6156 |
old_loadAllClassesAsAutoloaded:asAutoloaded |
6157 |
"load (fileIn) classes that should be present - |
|
6158 |
install as autoloaded classes marked to be autoloaded. |
|
6159 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
6160 |
||
6161 |
Answer true, if classes have been loaded" |
|
6162 |
||
6163 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName |
|
6164 |
classesWhichFailedToLoad| |
|
6165 |
||
6166 |
platformName := OperatingSystem platformName. |
|
6167 |
classNamesToLoad := OrderedCollection new. |
|
6168 |
classNamesToAutoload := OrderedCollection new. |
|
6169 |
||
6170 |
hasClassesToLoad := false. |
|
13419 | 6171 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6172 |
|eachClassnameSym isAutoload cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6173 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6174 |
eachClassnameSym := eachClassname asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6175 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6176 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6177 |
"no need to (re-)load an existing class, but install if should be loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6178 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6179 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6180 |
(eachAttributes isEmpty |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6181 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6182 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6183 |
hasClassesToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6184 |
isAutoload ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6185 |
classNamesToAutoload add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6186 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6187 |
classNamesToLoad add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6188 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6189 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6190 |
]. |
13411 | 6191 |
]. |
6192 |
||
6193 |
hasClassesToLoad ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6194 |
loadedClasses := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6195 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6196 |
self packageDirectory isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6197 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6198 |
error:(self name,'[error] cannot install because packageDirectory is unknown') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6199 |
mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6200 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6201 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6202 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6203 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6204 |
of class name to file name" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6205 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6206 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6207 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6208 |
"install autoloaded classes first, |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6209 |
some others may depend on them" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6210 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6211 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6212 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6213 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6214 |
errorString: 'Autoloading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6215 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6216 |
Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6217 |
installAutoloadedClassNamed:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6218 |
category:#autoloaded "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6219 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6220 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6221 |
numClassInstVars:0. "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6222 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6223 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6224 |
classesWhichFailedToLoad := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6225 |
classNamesToLoad notEmpty ifTrue:[ |
14021 | 6226 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6227 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6228 |
bindWith:self name with:classNamesToLoad size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6229 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6230 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6231 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6232 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6233 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6234 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6235 |
errorString: 'Loading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6236 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6237 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6238 |
"maybe, fileIn failed, because the load order is wrong. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6239 |
Work around this by installing the class as autoloaded and |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6240 |
loading it" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6241 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6242 |
classesWhichFailedToLoad add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6243 |
Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6244 |
installAutoloadedClassNamed:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6245 |
category:#autoloaded "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6246 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6247 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6248 |
numClassInstVars:0. "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6249 |
] do:[ |
14021 | 6250 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6251 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6252 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6253 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6254 |
fileInClass:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6255 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6256 |
initialize:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6257 |
lazy:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6258 |
silent:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6259 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6260 |
loadedClasses add:cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6261 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6262 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6263 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6264 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6265 |
classesWhichFailedToLoad do:[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6266 |
(Smalltalk at:eachClassName) autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6267 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6268 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6269 |
loadedClasses do:[:eachLoadedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6270 |
"do not initialize, if initialize method is inherited" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6271 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6272 |
eachLoadedClass initialize |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6273 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6274 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6275 |
^ true. |
13411 | 6276 |
]. |
6277 |
^ false. |
|
6278 |
||
6279 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
6280 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
6281 |
"Created: / 19-06-2010 / 11:36:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6282 |
! |
|
6283 |
||
12624 | 6284 |
unloadAllClasses |
6285 |
Transcript showCR:'unloading not yet fully supported' |
|
6286 |
! |
|
6287 |
||
6288 |
unloadClassLibrary |
|
6289 |
Transcript showCR:'unloading not yet fully supported' |
|
6290 |
! |
|
6291 |
||
6292 |
unloadSubProjects |
|
6293 |
"unload other packages" |
|
6294 |
||
6295 |
self subProjects do:[:p | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6296 |
|subDef| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6297 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6298 |
subDef := self definitionClassForPackage:p. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6299 |
subDef notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6300 |
subDef unloadSubProjects. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6301 |
subDef unloadPackage. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6302 |
]. |
12624 | 6303 |
]. |
6304 |
! |
|
6305 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6306 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6307 |
"when any of my class methods is changed, we mark the project as unloaded. |
12926
620ef12f673c
comment/format in: #update:with:from:
Stefan Vogel <sv@exept.de>
parents:
12856
diff
changeset
|
6308 |
May be some more classes have to be loaded" |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6309 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6310 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6311 |
self projectIsLoaded:false. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
6312 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6313 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6314 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6315 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6316 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6317 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
12371 | 6318 |
"helper for searchForPreRequisites" |
6319 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6320 |
aSetOfClasses |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6321 |
do:[:aClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6322 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6323 |
addReferencesToClassesFromGlobalsInMethods: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6324 |
(aClass theNonMetaclass methodDictionary values |
15366 | 6325 |
reject:[:m | m isExtension]) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6326 |
to:usedClassReasons. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6327 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6328 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6329 |
addReferencesToClassesFromGlobalsInMethods: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6330 |
(aClass theMetaclass methodDictionary values |
15366 | 6331 |
reject:[:m | m isExtension]) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6332 |
to:usedClassReasons. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6333 |
]. |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6334 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6335 |
"Modified: / 10-10-2006 / 23:03:45 / cg" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6336 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6337 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6338 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
12371 | 6339 |
"helper for searchForPreRequisites" |
6340 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6341 |
someMethods do:[:method | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6342 |
|resources| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6343 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6344 |
resources := method resources. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6345 |
(resources isNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6346 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6347 |
and:[(resources includesKey:#'example') not])]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6348 |
ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6349 |
method usedGlobals |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6350 |
do:[:global | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6351 |
|globalsName usedClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6352 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6353 |
globalsName := global asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6354 |
usedClass := Smalltalk at:globalsName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6355 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6356 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6357 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6358 |
add:(usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6359 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6360 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6361 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6362 |
] |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6363 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6364 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6365 |
"Created: / 10-10-2006 / 23:00:07 / cg" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6366 |
"Modified: / 30-05-2007 / 12:48:30 / cg" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6367 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6368 |
|
15066 | 6369 |
addReferencesToExtensionMethodsIn:someClasses to:usedMethodReasons |
6370 |
"helper for searchForPreRequisites: search for sends of a selector which |
|
6371 |
is defined in an extension method (in the set of passed-in methods). |
|
6372 |
If found, add the extension method and a reason string to usedReasons. |
|
6373 |
This should find especially sends to extension methods from libcompat." |
|
6374 |
||
6375 |
|allExtensionMethods allRealExtensions allRealExtensionSelectors| |
|
6376 |
||
6377 |
allExtensionMethods := Smalltalk allExtensions. |
|
6378 |
"/ only care for methods which are not already implemented in an extension methods's superclass |
|
6379 |
allRealExtensions := allExtensionMethods |
|
6380 |
select:[:mthd | |
|
6381 |
|superClass| |
|
6382 |
superClass := mthd mclass superclass. |
|
6383 |
(superClass isNil or:[superClass whichClassIncludesSelector:mthd selector]) isNil |
|
6384 |
]. |
|
6385 |
||
6386 |
allRealExtensionSelectors := allRealExtensions collect:[:m | m selector]. |
|
6387 |
||
6388 |
someClasses do:[:eachClass | |
|
6389 |
eachClass instAndClassMethodsDo:[:method | |
|
6390 |
|resources extensionsSent| |
|
6391 |
||
6392 |
resources := method resources. |
|
6393 |
(resources isNil |
|
6394 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
6395 |
and:[(resources includesKey:#'example') not])]) |
|
6396 |
ifTrue:[ |
|
6397 |
extensionsSent := allRealExtensions select:[:ext | method messagesSent includes:ext selector]. |
|
6398 |
extensionsSent do:[:eachExtensionMethod | |
|
6399 |
(usedMethodReasons at:eachExtensionMethod ifAbsentPut:[Set new]) |
|
6400 |
add:(eachExtensionMethod selector, ' - sent by ', method mclass name,'>>',method selector) |
|
6401 |
] |
|
6402 |
] |
|
6403 |
] |
|
6404 |
] |
|
6405 |
! |
|
6406 |
||
14843 | 6407 |
allPreRequisites |
6408 |
"answer all (recursive) prerequisite project ids of myself - in random order." |
|
6409 |
||
14885 | 6410 |
^ self allPreRequisites:#effectivePreRequisites. |
14843 | 6411 |
|
6412 |
" |
|
6413 |
stx_libbasic allPreRequisites |
|
6414 |
stx_libbasic2 allPreRequisites |
|
6415 |
stx_libview2 allPreRequisites |
|
6416 |
ubs_application allPreRequisites |
|
6417 |
ubs_application allPreRequisitesSorted |
|
6418 |
exept_expecco_application allPreRequisites |
|
6419 |
exept_expeccoNET_application allPreRequisites |
|
6420 |
alspa_batch_application allPreRequisites" |
|
6421 |
"Modified: / 13-04-2011 / 15:30:45 / sr" |
|
6422 |
"Modified (comment): / 06-09-2011 / 08:26:06 / cg" |
|
6423 |
! |
|
6424 |
||
14882 | 6425 |
allPreRequisites:aSelector |
6426 |
"answer all (recursive) prerequisite project ids of myself - in random order." |
|
6427 |
||
6428 |
|result| |
|
6429 |
||
6430 |
result := self |
|
6431 |
allPreRequisites:aSelector withParentDo:[:parent :prereq | |
|
6432 |
prereq = self package ifTrue:[ |
|
6433 |
Transcript showCR:('oops: %1 depends on itself' bindWith:prereq) |
|
6434 |
]. |
|
6435 |
]. |
|
6436 |
result remove:self package ifAbsent:[]. |
|
6437 |
^ result. |
|
6438 |
||
6439 |
" |
|
6440 |
stx_libbasic allPreRequisites |
|
6441 |
stx_libbasic2 allPreRequisites |
|
6442 |
stx_libview2 allPreRequisites |
|
6443 |
ubs_application allPreRequisites |
|
6444 |
ubs_application allPreRequisitesSorted |
|
6445 |
exept_expecco_application allPreRequisites |
|
6446 |
exept_expeccoNET_application allPreRequisites |
|
6447 |
alspa_batch_application allPreRequisites" |
|
6448 |
"Modified: / 13-04-2011 / 15:30:45 / sr" |
|
6449 |
"Modified (comment): / 06-09-2011 / 08:26:06 / cg" |
|
6450 |
! |
|
6451 |
||
6452 |
allPreRequisites:aSelector withParentDo:aBlock |
|
6453 |
"answer all (recursive) prerequisite project ids of myself - in random order. |
|
6454 |
If we exclude a project, but one of our prerequisite projects depends on it, |
|
6455 |
then what ????" |
|
6456 |
||
6457 |
|setOfAllPreRequisites toAdd| |
|
6458 |
||
6459 |
setOfAllPreRequisites := Set new. |
|
6460 |
toAdd := Set withAll:(self perform:aSelector). |
|
6461 |
||
6462 |
"is a subproject really a prerequisite?? |
|
6463 |
No, it works the other way: parent projects are prerequisites of sub projects, |
|
6464 |
so the following line has been deleted. |
|
6465 |
Unfortunately the meaning of 'subproject' has never been well defined. SV." |
|
6466 |
"/ toAdd addAll:self effectiveSubProjects. |
|
6467 |
||
6468 |
[toAdd notEmpty] whileTrue:[ |
|
6469 |
|aPreRequisiteProjectID def| |
|
6470 |
||
6471 |
aPreRequisiteProjectID := toAdd removeFirst. |
|
6472 |
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[ |
|
6473 |
setOfAllPreRequisites add:aPreRequisiteProjectID. |
|
6474 |
||
6475 |
def := self definitionClassForPackage:aPreRequisiteProjectID. |
|
6476 |
def isNil ifTrue:[ |
|
6477 |
Transcript showCR:'ProjectDefinition ', aPreRequisiteProjectID, ' is missing - cannot find its preRequisites.'. |
|
6478 |
] ifFalse:[ |
|
6479 |
(def perform:aSelector) |
|
6480 |
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not] |
|
6481 |
thenDo:[:eachSubPreRequisite | |
|
6482 |
Verbose == true ifTrue:[ |
|
6483 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' requires ', eachSubPreRequisite). |
|
6484 |
]. |
|
6485 |
aBlock value:def value:eachSubPreRequisite. |
|
6486 |
toAdd add:eachSubPreRequisite |
|
6487 |
]. |
|
6488 |
||
6489 |
"but subprojects of our prerequisites are also prerequisites" |
|
14994 | 6490 |
"/ SV: - I don't think so. Either we need them, because they have classes being superclasses |
6491 |
"/ or referenced. Or we include the explicitly. In both cases we do not need thid code. |
|
6492 |
"/ But we do not want them only because there is a subProject with examples or tests!! |
|
6493 |
||
6494 |
"/ def effectiveSubProjects |
|
6495 |
"/ select:[:eachSubSubRequisite | eachSubSubRequisite ~= self package and:[ (setOfAllPreRequisites includes:eachSubSubRequisite) not ]] |
|
6496 |
"/ thenDo:[:eachSubSubRequisite | |
|
6497 |
"/ Verbose == true ifTrue:[ |
|
6498 |
"/ Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' hasSub ', eachSubSubRequisite). |
|
6499 |
"/ ]. |
|
6500 |
"/ aBlock value:def value:eachSubSubRequisite. |
|
6501 |
"/ toAdd add:eachSubSubRequisite |
|
6502 |
"/ ]. |
|
14882 | 6503 |
]. |
6504 |
] |
|
6505 |
]. |
|
6506 |
^ setOfAllPreRequisites. |
|
6507 |
||
6508 |
" |
|
6509 |
stx_libbasic allPreRequisites |
|
6510 |
stx_libbasic2 allPreRequisites |
|
6511 |
stx_libview2 allPreRequisites |
|
6512 |
ubs_application allPreRequisites |
|
6513 |
ubs_application allPreRequisitesSorted |
|
6514 |
exept_expecco_application allPreRequisites |
|
6515 |
exept_expeccoNET_application allPreRequisites |
|
6516 |
alspa_batch_application allPreRequisites |
|
6517 |
" |
|
6518 |
||
6519 |
"Created: / 13-04-2011 / 15:23:21 / sr" |
|
6520 |
"Modified: / 20-07-2012 / 18:29:31 / cg" |
|
6521 |
! |
|
6522 |
||
14843 | 6523 |
allPreRequisitesSorted |
14885 | 6524 |
^ self allPreRequisitesSorted:#effectivePreRequisites |
14843 | 6525 |
! |
6526 |
||
14882 | 6527 |
allPreRequisitesSorted:aSelector |
6528 |
"answer all the prerequisites of this projects sorted in |
|
6529 |
the order they are needed. |
|
6530 |
Use this to e.g. compile packages in the dependency order" |
|
6531 |
||
6532 |
|allPreRequisites orderedTuples sortedPackages| |
|
6533 |
||
6534 |
orderedTuples := OrderedCollection new. |
|
6535 |
allPreRequisites := self allPreRequisites:aSelector. |
|
6536 |
||
6537 |
"/JV@2013-03-13: Added asSortedCollection to make the order of packages |
|
6538 |
"/as stable as possible. Makes merging of makefiles a lot easier. |
|
6539 |
allPreRequisites asSortedCollection do:[:eachPackageID | |
|
6540 |
|def preRequisites| |
|
6541 |
||
6542 |
self assert:(eachPackageID ~= self package). |
|
6543 |
orderedTuples add:(Array with:eachPackageID with:self package). |
|
6544 |
||
6545 |
def := self definitionClassForPackage:eachPackageID. |
|
6546 |
def isNil ifTrue:[ |
|
6547 |
Transcript showCR:'Warning: no definition class for package: ', eachPackageID. |
|
6548 |
((self searchForPreRequisites: eachPackageID) |
|
6549 |
fold:[:d1 :d2| d1 addAll:d2; yourself]) keys |
|
6550 |
] ifFalse:[ |
|
6551 |
preRequisites := def perform:aSelector. |
|
6552 |
preRequisites removeAllFoundIn:def excludedFromPreRequisites. |
|
6553 |
preRequisites do:[:eachPrerequisitePackageID| |
|
6554 |
self assert:(eachPrerequisitePackageID ~= eachPackageID). |
|
6555 |
orderedTuples add:(Array with:eachPrerequisitePackageID with:eachPackageID). |
|
6556 |
]. |
|
6557 |
]. |
|
6558 |
]. |
|
6559 |
||
6560 |
(orderedTuples includes:[:el | el first = el second]) ifTrue:[ |
|
6561 |
self halt |
|
6562 |
]. |
|
6563 |
sortedPackages := orderedTuples topologicalSort. |
|
6564 |
||
6565 |
"packages which only result from extension methods are used for computing the sort order, |
|
6566 |
but they are not added, if not present in the first place" |
|
6567 |
^ sortedPackages select:[:eachProject| allPreRequisites includes:eachProject] |
|
6568 |
||
6569 |
" |
|
6570 |
stx_libbasic allPreRequisitesSorted |
|
6571 |
stx_libbasic2 allPreRequisitesSorted |
|
6572 |
stx_libwidg2 allPreRequisitesSorted |
|
6573 |
exept_expecco allPreRequisitesSorted |
|
6574 |
alspa_batch_application allPreRequisitesSorted |
|
6575 |
ubs_application allPreRequisitesSorted |
|
6576 |
" |
|
6577 |
||
6578 |
"Modified: / 13-04-2011 / 15:19:13 / sr" |
|
6579 |
"Modified (comment): / 13-03-2013 / 00:40:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6580 |
! |
|
6581 |
||
6582 |
allReferences |
|
6583 |
"answer all (recursive) projects to which I refer - in random order." |
|
6584 |
||
6585 |
|result| |
|
6586 |
||
6587 |
result := self |
|
6588 |
allPreRequisites:#referencedPreRequisites withParentDo:[:parent :prereq | |
|
6589 |
prereq = self package ifTrue:[ |
|
6590 |
Transcript showCR:('oops: %1 depends on itself' bindWith:prereq) |
|
6591 |
]. |
|
6592 |
]. |
|
6593 |
result remove:self package ifAbsent:[]. |
|
6594 |
^ result. |
|
6595 |
||
6596 |
" |
|
6597 |
stx_libbasic allReferences |
|
6598 |
stx_libbasic2 allReferences |
|
6599 |
stx_libview2 allReferences |
|
6600 |
ubs_application allReferences |
|
6601 |
ubs_application allReferences |
|
6602 |
exept_expecco_application allReferences |
|
6603 |
exept_expeccoNET_application allReferences |
|
6604 |
alspa_batch_application allReferences |
|
6605 |
" |
|
6606 |
! |
|
6607 |
||
15082 | 6608 |
effectiveMandatoryPreRequisites |
6609 |
"get the preRequisites, that are not excluded" |
|
6610 |
||
6611 |
self mandatoryPreRequisites notEmpty ifTrue:[ |
|
6612 |
"this is a new subclass - avoid overhead" |
|
6613 |
^ OrderedSet new |
|
6614 |
addAll:self mandatoryPreRequisites; |
|
6615 |
addAll:self includedInPreRequisites; |
|
6616 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
6617 |
yourself. |
|
6618 |
]. |
|
6619 |
||
6620 |
"I am an old subclass, where #preRequisites returns a plain array" |
|
6621 |
^ Set new |
|
6622 |
addAll:self preRequisites; |
|
6623 |
addAll:self includedInPreRequisites; |
|
6624 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
6625 |
remove:self package ifAbsent:[]; |
|
6626 |
yourself. |
|
6627 |
! |
|
6628 |
||
14843 | 6629 |
effectivePreRequisites |
6630 |
"get the preRequisites, that are not excluded. |
|
6631 |
This method appears to be obsolete, because its functionality |
|
6632 |
is now included in #preRequisites. |
|
15082 | 6633 |
But is to be kept for backward compatibilty with old |
6634 |
existing subclasses." |
|
14843 | 6635 |
|
6636 |
self mandatoryPreRequisites notEmpty ifTrue:[ |
|
6637 |
"this is a new subclass - avoid overhead" |
|
6638 |
^ self preRequisites. |
|
6639 |
]. |
|
6640 |
||
15082 | 6641 |
"I am an old subclass, where #preRequisites returns a plain array" |
14843 | 6642 |
^ Set new |
6643 |
addAll:self preRequisites; |
|
6644 |
addAll:self includedInPreRequisites; |
|
6645 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
6646 |
remove:self package ifAbsent:[]; |
|
6647 |
yourself. |
|
6648 |
! |
|
6649 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6650 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6651 |
"answer a Dictionary where the keys are the prerequisite package for this package |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6652 |
and the values are a Set of reasons, why each package is required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6653 |
|
15024 | 6654 |
^ self searchForPreRequisites:self package |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6655 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6656 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6657 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6658 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6659 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6660 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6661 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6662 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6663 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6664 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6665 |
"Modified: / 06-09-2011 / 08:30:43 / cg" |
13411 | 6666 |
! |
6667 |
||
6668 |
searchForPreRequisites: packageId |
|
14860 | 6669 |
"answer an array containing two Dictionaries where the keys are the prerequisite package for the given package |
6670 |
and the values are a Set of reasons, why each key package is required. |
|
6671 |
The first entry in the array are the mandatory prereqs (required for compilation), |
|
6672 |
the second entry are the referenced prereqs (required for loading). |
|
6673 |
Referenced prereqs are due to elements accessed at execution time (such as globals)" |
|
13411 | 6674 |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6675 |
^ self searchForPreRequisites: packageId withSubProjects:false |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6676 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6677 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6678 |
self searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6679 |
self searchForPreRequisites:#'stx:libwidg3' |
14860 | 6680 |
self searchForPreRequisites:#'stx:libtool' |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6681 |
bosch_dapasx_Application searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6682 |
bosch_dapasx_pav_browser searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6683 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6684 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6685 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6686 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6687 |
"Modified: / 06-09-2011 / 08:30:20 / cg" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6688 |
! |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6689 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6690 |
searchForPreRequisites:packageId withSubProjects:withSubProjectsBoolean |
14860 | 6691 |
"answer an array containing two Dictionaries where the keys are the prerequisite package for the given package |
6692 |
and the values are a Set of reasons, why each key package is required. |
|
6693 |
The first entry in the array are the mandatory prereqs (required for compilation), |
|
6694 |
the second entry are the referenced prereqs (required for loading). |
|
6695 |
Referenced prereqs are due to elements accessed at execution time (such as globals)" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6696 |
|
14885 | 6697 |
|requiredClasses mandatoryClassesForLoadingWithReasons referencedClassesWithReasons |
15066 | 6698 |
ignoredPackages packageExtractionBlock mandatoryPackageReasons referencedPackageReasons referencedMethodsWithReasons| |
14843 | 6699 |
|
6700 |
mandatoryClassesForLoadingWithReasons := Dictionary new. |
|
6701 |
referencedClassesWithReasons := Dictionary new. |
|
15066 | 6702 |
referencedMethodsWithReasons := Dictionary new. |
13411 | 6703 |
|
6704 |
"my classes are required" |
|
15098 | 6705 |
requiredClasses := self searchForClassesWithProject: packageId. |
13411 | 6706 |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6707 |
withSubProjectsBoolean ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6708 |
"my subproject's classes are required" |
14994 | 6709 |
self effectiveSubProjects do:[:eachProjectName | |
14843 | 6710 |
requiredClasses addAll:(self searchForClassesWithProject:eachProjectName asSymbol) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6711 |
]. |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6712 |
]. |
13411 | 6713 |
|
15098 | 6714 |
"all superclasses of my classes |
6715 |
and my subProject's classes (if required) are mandatory. |
|
6716 |
All shared pools used by my classes are required as well" |
|
13419 | 6717 |
requiredClasses do:[:cls | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6718 |
cls allSuperclassesDo:[:eachSuperclass | |
14843 | 6719 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6720 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
15098 | 6721 |
]. |
6722 |
cls sharedPools do:[:eachSharedPool | |
|
6723 |
(mandatoryClassesForLoadingWithReasons at: eachSharedPool ifAbsentPut:[OrderedSet new]) |
|
6724 |
add: (eachSharedPool name, ' - shared pool used by ', cls name). |
|
6725 |
eachSharedPool allSuperclassesDo:[:eachSuperclass | |
|
6726 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
|
6727 |
add: (eachSuperclass name, ' - superclass of shared pool ', eachSharedPool name). |
|
6728 |
] |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6729 |
] |
13411 | 6730 |
]. |
14843 | 6731 |
"all classes for which I define extensions are mandatory" |
6732 |
self allExtensionClasses do:[:eachExtendedClass | |
|
6733 |
(mandatoryClassesForLoadingWithReasons at:eachExtendedClass ifAbsentPut:[OrderedSet new]) |
|
6734 |
add: (eachExtendedClass name, ' - extended'). |
|
6735 |
eachExtendedClass allSuperclassesDo:[:eachSuperclass | |
|
6736 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
|
6737 |
add: (eachSuperclass name, ' - superclass of extended ', eachExtendedClass name). |
|
6738 |
] |
|
6739 |
]. |
|
13411 | 6740 |
|
6741 |
"all classes referenced by my classes or my subproject's classes |
|
6742 |
are required. But: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6743 |
only search for locals refered to by my methods (assuming that superclasses' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6744 |
prerequisites are specified in their package)." |
13411 | 6745 |
|
14843 | 6746 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:referencedClassesWithReasons. |
6747 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:referencedClassesWithReasons. |
|
15066 | 6748 |
self addReferencesToExtensionMethodsIn:requiredClasses to:referencedMethodsWithReasons. |
14843 | 6749 |
|
13411 | 6750 |
"now map classes to packages and collect the reasons" |
15066 | 6751 |
packageExtractionBlock := |
6752 |
[:classesWithReasons| |
|
14843 | 6753 |
|requiredPackageReasons| |
6754 |
requiredPackageReasons := Dictionary new. |
|
6755 |
classesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass| |
|
15126 | 6756 |
(requiredPackageReasons at:usedClass package ifAbsentPut:[Set new]) |
14885 | 6757 |
addAll:reasonsPerClass. |
14843 | 6758 |
]. |
15126 | 6759 |
"sort, to avoid differences from one generation to the next one" |
14843 | 6760 |
requiredPackageReasons |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6761 |
]. |
14843 | 6762 |
|
15066 | 6763 |
mandatoryPackageReasons := packageExtractionBlock value:mandatoryClassesForLoadingWithReasons. |
15126 | 6764 |
|
15066 | 6765 |
referencedPackageReasons := packageExtractionBlock value:referencedClassesWithReasons. |
6766 |
||
6767 |
"and map extension method invocations to packages and collect the reasons" |
|
6768 |
referencedMethodsWithReasons keysAndValuesDo:[:usedMethod :reasonsPerMethod | |
|
15126 | 6769 |
(referencedPackageReasons at:usedMethod package ifAbsentPut:[Set new]) |
6770 |
addAll:reasonsPerMethod. |
|
15066 | 6771 |
]. |
14885 | 6772 |
|
6773 |
ignoredPackages := Set |
|
6774 |
with:packageId |
|
6775 |
with:PackageId noProjectID. |
|
6776 |
||
15066 | 6777 |
referencedPackageReasons removeAllKeys:ignoredPackages ifAbsent:[]. |
15126 | 6778 |
"sort, to avoid differences from one generation to the next one" |
6779 |
referencedPackageReasons keysAndValuesDo:[:eachPackageId :eachReasons | referencedPackageReasons at:eachPackageId put:eachReasons asSortedCollection]. |
|
14885 | 6780 |
|
6781 |
"don't put classes from subProjects into the required list" |
|
6782 |
ignoredPackages addAll:(self siblingsAreSubProjects |
|
6783 |
ifTrue:[ self searchForSiblingProjects ] |
|
6784 |
ifFalse:[ self searchForSubProjects ]) asSet. |
|
6785 |
||
15066 | 6786 |
mandatoryPackageReasons removeAllKeys:ignoredPackages ifAbsent:[]. |
15126 | 6787 |
"sort, to avoid differences from one generation to the next one" |
6788 |
mandatoryPackageReasons keysAndValuesDo:[:eachPackageId :eachReasons | mandatoryPackageReasons at:eachPackageId put:eachReasons asSortedCollection]. |
|
14843 | 6789 |
|
6790 |
^ Array |
|
15066 | 6791 |
with:mandatoryPackageReasons |
6792 |
with:referencedPackageReasons. |
|
14885 | 6793 |
|
6794 |
" |
|
13411 | 6795 |
self searchForPreRequisites:#'stx:libwidg3' |
6796 |
bosch_dapasx_Application searchForPreRequisites |
|
6797 |
bosch_dapasx_pav_browser searchForPreRequisites |
|
15066 | 6798 |
self searchForPreRequisites:#'stx:goodies/json' withSubProjects:false |
13411 | 6799 |
" |
6800 |
||
6801 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
6802 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6803 |
"Created: / 06-09-2011 / 08:29:37 / cg" |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6804 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6805 |
|
9585 | 6806 |
!ProjectDefinition class methodsFor:'queries'! |
6807 |
||
13419 | 6808 |
allClassNames |
12368 | 6809 |
^ self classNamesForWhich:[:nm :attr | true ]. |
6810 |
! |
|
6811 |
||
13559 | 6812 |
allClasses |
13950 | 6813 |
^ self allClassNames |
6814 |
collect:[:nm | |
|
6815 |
|cls| |
|
6816 |
||
6817 |
cls := Smalltalk classNamed:nm. |
|
6818 |
cls isNil ifTrue:[ |
|
6819 |
Transcript showCR:('%1: failed to autoload class %2' bindWith:self name with:nm) |
|
6820 |
]. |
|
6821 |
cls |
|
6822 |
] |
|
6823 |
thenSelect:[:cls | cls notNil ]. |
|
13559 | 6824 |
|
6825 |
"Created: / 06-08-2011 / 15:47:36 / cg" |
|
6826 |
! |
|
6827 |
||
13636 | 6828 |
allExtensionClasses |
6829 |
"answer the set of classes, which are extended by the package. |
|
6830 |
includes all superclasses of the extended classes" |
|
6831 |
||
6832 |
^ self extensionClassesWithSuperclasses:true |
|
6833 |
||
6834 |
" |
|
6835 |
stx_libboss allExtensionClasses |
|
6836 |
" |
|
6837 |
||
6838 |
"Created: / 06-09-2011 / 10:15:54 / cg" |
|
6839 |
! |
|
6840 |
||
13419 | 6841 |
autoloaded_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6842 |
"the opposite of compiled class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6843 |
|
12368 | 6844 |
^ self classNamesForWhich:[:nm :attr | attr notEmptyOrNil and:[attr includes:#autoload]]. |
6845 |
||
6846 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6847 |
"Created: / 30-08-2007 / 18:48:09 / cg" |
|
6848 |
! |
|
6849 |
||
14978 | 6850 |
canHaveExtensions |
6851 |
"return true, if this class allows extensions from other packages. |
|
6852 |
Private classes, namespaces and projectDefinitions don't allow this" |
|
6853 |
||
6854 |
^ self isAbstract |
|
6855 |
||
6856 |
" |
|
6857 |
Smalltalk allClasses select:[:each | each canHaveExtensions not] |
|
6858 |
" |
|
6859 |
||
6860 |
"Created: / 30-08-2006 / 15:29:49 / cg" |
|
6861 |
! |
|
6862 |
||
13419 | 6863 |
classNames |
12368 | 6864 |
"answer an array containing all the class names of the project's classes" |
6865 |
||
6866 |
^ self classNamesAndAttributesAsSpecArray collect:[:entry | entry first]. |
|
6867 |
||
6868 |
" |
|
6869 |
stx_libhtml classNames |
|
6870 |
stx_libhtml classNamesAndAttributesAsSpecArray |
|
6871 |
" |
|
6872 |
! |
|
6873 |
||
13419 | 6874 |
classNamesForWhich:aBlock |
12368 | 6875 |
"a correponding method with real names is generated in my subclasses" |
6876 |
||
6877 |
|coll| |
|
6878 |
||
6879 |
coll := OrderedCollection new. |
|
6880 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6881 |
(aBlock value:nm value:attributes) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6882 |
coll add:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6883 |
]. |
12368 | 6884 |
]. |
6885 |
^ coll |
|
6886 |
||
6887 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6888 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6889 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
6890 |
! |
|
6891 |
||
6892 |
classes |
|
6893 |
"list my classes. |
|
6894 |
Project must be loaded - otherwise an error is reported here. |
|
6895 |
Use #classNames if you are only interested in the names" |
|
6896 |
||
13728 | 6897 |
^ self classNames collect:[:nm | Smalltalk at:nm ifAbsent:[self error:'Missing class: ',nm]] |
12368 | 6898 |
|
6899 |
" |
|
6900 |
stx_libbasic3 classNames |
|
6901 |
stx_libbasic3 classes |
|
6902 |
" |
|
13728 | 6903 |
|
6904 |
"Modified: / 27-09-2011 / 18:12:33 / cg" |
|
12368 | 6905 |
! |
6906 |
||
13419 | 6907 |
compiled_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6908 |
"the opposite of autoloaded class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6909 |
|
12368 | 6910 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
6911 |
||
6912 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6913 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6914 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6915 |
"Modified (comment): / 05-03-2012 / 12:21:23 / cg" |
12368 | 6916 |
! |
6917 |
||
6918 |
compiled_classNamesForPlatform |
|
6919 |
"answer the classes to be compiled only for the current platformName" |
|
6920 |
||
6921 |
^ self compiled_classNamesForPlatform:OperatingSystem platformName |
|
6922 |
! |
|
6923 |
||
6924 |
compiled_classNamesForPlatform:platformName |
|
6925 |
"answer the classes to be compiled only for platformName |
|
6926 |
platformName is one of #unix, #win32 (OperatingSystem platformName)" |
|
6927 |
||
13419 | 6928 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6929 |
classNamesForWhich:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6930 |
(attr includes:#autoload) not and:[attr includes:platformName] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6931 |
]. |
12368 | 6932 |
|
6933 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6934 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6935 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
|
6936 |
! |
|
6937 |
||
6938 |
compiled_classNames_common |
|
6939 |
"classes to be compiled for any platform" |
|
6940 |
||
13419 | 6941 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6942 |
classNamesForWhich:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6943 |
attr isEmptyOrNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6944 |
]. |
12368 | 6945 |
|
6946 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
6947 |
! |
|
6948 |
||
6949 |
compiled_classNames_unix |
|
6950 |
"class, only to be compiled under unix" |
|
13419 | 6951 |
|
12368 | 6952 |
^ self compiled_classNamesForPlatform:#unix. |
6953 |
||
6954 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
6955 |
! |
|
6956 |
||
6957 |
compiled_classNames_windows |
|
6958 |
"class, only to be compiled under windows" |
|
13419 | 6959 |
|
12368 | 6960 |
^ self compiled_classNamesForPlatform:#win32. |
6961 |
||
6962 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
6963 |
! |
|
6964 |
||
13081 | 6965 |
extensionClasses |
6966 |
"answer the set of classes, which are extended by the package" |
|
6967 |
||
13636 | 6968 |
^ self extensionClassesWithSuperclasses:false |
6969 |
||
6970 |
" |
|
6971 |
stx_libboss extensionClasses |
|
6972 |
" |
|
6973 |
||
6974 |
"Modified: / 06-09-2011 / 10:21:44 / cg" |
|
6975 |
! |
|
6976 |
||
6977 |
extensionClassesWithSuperclasses:withSuperclassesBoolean |
|
6978 |
"answer the set of classes, which are extended by the package" |
|
6979 |
||
13081 | 6980 |
|classes| |
6981 |
||
6982 |
classes := IdentitySet new. |
|
6983 |
||
13419 | 6984 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6985 |
|mthdCls extendedClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6986 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6987 |
mthdCls := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6988 |
(mthdCls notNil and:[mthdCls isLoaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6989 |
extendedClass := mthdCls theNonMetaclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6990 |
(classes includes:extendedClass) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6991 |
withSuperclassesBoolean ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6992 |
extendedClass withAllSuperclassesDo:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6993 |
classes add:eachClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6994 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6995 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6996 |
classes add:extendedClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6997 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6998 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6999 |
]. |
13081 | 7000 |
]. |
7001 |
^ classes. |
|
7002 |
||
7003 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7004 |
stx_libboss extensionClasses |
13636 | 7005 |
" |
7006 |
||
7007 |
"Created: / 06-09-2011 / 10:17:06 / cg" |
|
13081 | 7008 |
! |
7009 |
||
12368 | 7010 |
extensionMethods |
7011 |
"list my extension methods. |
|
7012 |
Project must be loaded - otherwise an error is reported here. |
|
7013 |
Use #extensionMethodsNames if you are only interested in the names" |
|
7014 |
||
13419 | 7015 |
^ self extensionMethodNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7016 |
pairWiseCollect:[:className :selector | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7017 |
(Smalltalk classNamed:className) compiledMethodAt:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7018 |
]. |
12368 | 7019 |
|
7020 |
" |
|
7021 |
stx_libbasic2 extensionMethodNames |
|
7022 |
stx_libbasic2 extensionMethods |
|
7023 |
" |
|
7024 |
! |
|
7025 |
||
13081 | 7026 |
extensionPackages |
7027 |
"answer the set of packages, which are extended by this package" |
|
7028 |
||
13636 | 7029 |
^ self allExtensionClasses collect:[:eachClass| eachClass package] |
7030 |
||
7031 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7032 |
stx_libboss extensionPackages |
13636 | 7033 |
" |
7034 |
||
7035 |
"Modified: / 06-09-2011 / 10:20:47 / cg" |
|
13081 | 7036 |
! |
7037 |
||
10144 | 7038 |
hasAllClassesFullyLoaded |
14957 | 7039 |
"return true, if all classes are present and loaded (not autoloaded)" |
10144 | 7040 |
|
7041 |
^ self hasAllClassesLoaded:true |
|
7042 |
||
7043 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
7044 |
! |
|
7045 |
||
9627 | 7046 |
hasAllClassesLoaded |
10205 | 7047 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 7048 |
|
7049 |
^ self hasAllClassesLoaded:false |
|
7050 |
||
7051 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
7052 |
! |
|
7053 |
||
7054 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
7055 |
"check if all classes for this platform are present. |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
7056 |
If checkIfFullyLoaded is true, they must be fully loaded; that means: not autoloaded" |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
7057 |
|
13419 | 7058 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7059 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7060 |
loaded:checkIfFullyLoaded) |
10154 | 7061 |
and:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7062 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7063 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7064 |
loaded:checkIfFullyLoaded ] |
10154 | 7065 |
|
7066 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
7067 |
! |
|
7068 |
||
7069 |
hasAllCompiledClassesFullyLoaded |
|
7070 |
"return true, if all compiled classes are present and loaded" |
|
7071 |
||
7072 |
^ self hasAllCompiledClassesLoaded:true |
|
7073 |
||
7074 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
7075 |
! |
|
7076 |
||
7077 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
7078 |
"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
|
7079 |
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
|
7080 |
|
13419 | 7081 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7082 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7083 |
loaded:checkIfFullyLoaded) |
10154 | 7084 |
and:[ |
13419 | 7085 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7086 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7087 |
loaded:checkIfFullyLoaded |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
7088 |
] |
9585 | 7089 |
! |
7090 |
||
9627 | 7091 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
7092 |
"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
|
7093 |
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
|
7094 |
|
9627 | 7095 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7096 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7097 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7098 |
cls := Smalltalk loadedClassNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7099 |
cls isNil ifTrue:[ |
14021 | 7100 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7101 |
Transcript showCR:(self name,' missing extension class "',className,'".'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7102 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7103 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7104 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7105 |
"there is no possibility that we installed an extension method in an unloaded class" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7106 |
(cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
14021 | 7107 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7108 |
Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7109 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7110 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7111 |
]. |
9627 | 7112 |
]. |
7113 |
^ true. |
|
7114 |
||
7115 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 7116 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 7117 |
! |
7118 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7119 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7120 |
"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
|
7121 |
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
|
7122 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7123 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7124 |
classNames do:[:eachClassName | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7125 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7126 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7127 |
cls := Smalltalk loadedClassNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7128 |
cls isNil ifTrue:[ |
14021 | 7129 |
Verbose ifTrue:[ |
7130 |
(self name, ' [info]: missing class: ', eachClassName) infoPrintCR. |
|
7131 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7132 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7133 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7134 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
14021 | 7135 |
Verbose ifTrue:[ |
7136 |
(self name,' [info]: unloaded class: ', eachClassName) infoPrintCR. |
|
7137 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7138 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7139 |
]. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7140 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7141 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
7142 |
^ true |
10154 | 7143 |
! |
7144 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
7145 |
hasExtensionMethods |
9850 | 7146 |
^ self extensionMethodNames notEmpty |
7147 |
||
7148 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 7149 |
! |
7150 |
||
12369 | 7151 |
hasPostLoadAction |
7152 |
"/ true if postLoadAction has been redefined |
|
7153 |
^ (self class whichClassIncludesSelector:#postLoadAction) theNonMetaclass isAbstract not |
|
7154 |
! |
|
7155 |
||
7156 |
hasPostUnloadAction |
|
7157 |
"/ true if postUnloadAction has been redefined |
|
7158 |
^ (self class whichClassIncludesSelector:#postUnloadAction) theNonMetaclass isAbstract not |
|
7159 |
! |
|
7160 |
||
7161 |
hasPreLoadAction |
|
7162 |
"/ true if preLoadAction has been redefined |
|
7163 |
^ (self class whichClassIncludesSelector:#preLoadAction) theNonMetaclass isAbstract not |
|
7164 |
! |
|
7165 |
||
7166 |
hasPreUnloadAction |
|
7167 |
"/ true if preUnloadAction has been redefined |
|
7168 |
^ (self class whichClassIncludesSelector:#preUnloadAction) theNonMetaclass isAbstract not |
|
7169 |
! |
|
7170 |
||
13609 | 7171 |
isAbstract |
7172 |
^ self == ProjectDefinition |
|
7173 |
||
7174 |
"Modified (format): / 20-08-2011 / 22:47:46 / cg" |
|
7175 |
! |
|
7176 |
||
10140 | 7177 |
isFullyLoaded |
13419 | 7178 |
^ self hasAllCompiledClassesFullyLoaded |
13167 | 7179 |
and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
10140 | 7180 |
|
7181 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
13609 | 7182 |
"Modified: / 20-08-2011 / 22:47:16 / cg" |
12331 | 7183 |
! |
7184 |
||
7185 |
projectType |
|
7186 |
^ self subclassResponsibility |
|
9585 | 7187 |
! ! |
7188 |
||
10774 | 7189 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
7190 |
||
7191 |
showClassDocumentationOf:aClass |
|
12198
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
7192 |
"used by the HTMLDoc-generator to ask if a classes' protocol is to be documented |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
7193 |
or hidden. |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
7194 |
(used for expecco, to suppress documentation of workflow- and expecco classes |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
7195 |
in the expecco-class browser)" |
10774 | 7196 |
|
7197 |
^ true |
|
7198 |
||
7199 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
7200 |
! ! |
|
7201 |
||
9726 | 7202 |
!ProjectDefinition class methodsFor:'sanity checks'! |
7203 |
||
7204 |
validateDescription |
|
13808 | 7205 |
"perform some consistency checks (set of classes in project same as those listed in description); |
14981 | 7206 |
called before checking in build support files. |
7207 |
Somewhat obsolete: use the ProjectChecker, which does more checks" |
|
13808 | 7208 |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7209 |
|emptyProjects nonProjects emptyOrNonProjects classesInImage |
14510 | 7210 |
classesInDescription onlyInImage onlyInDescription missingPools myPackage| |
9956 | 7211 |
|
7212 |
emptyProjects := Set withAll:self subProjects. |
|
7213 |
Smalltalk allClassesDo:[:cls | |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7214 |
emptyProjects remove:(cls package) ifAbsent:[]. |
9956 | 7215 |
]. |
7216 |
nonProjects := self subProjects select:[:p | |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7217 |
(ProjectDefinition definitionClassForPackage: p) isNil |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7218 |
]. |
9956 | 7219 |
|
7220 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
7221 |
emptyOrNonProjects addAll:nonProjects. |
|
7222 |
||
7223 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7224 |
(Dialog |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7225 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7226 |
, ((emptyOrNonProjects |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7227 |
asSortedCollection |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7228 |
collect:[:p | p allBold]) |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7229 |
asStringWith:'\ ') |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7230 |
, '\\Continue ?') withCRs |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7231 |
yesLabel:'OK' noLabel:'Cancel') |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7232 |
ifFalse:[ |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7233 |
AbortSignal raise |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7234 |
]. |
9956 | 7235 |
]. |
7236 |
||
14510 | 7237 |
myPackage := self package. |
7238 |
classesInImage := Smalltalk allClasses select:[:cls | (cls package == myPackage) and:[cls isPrivate not]]. |
|
13728 | 7239 |
"/ classesInDescription := self classes asIdentitySet. |
7240 |
classesInDescription := IdentitySet new. |
|
7241 |
((self compiled_classNamesForPlatform:(OperatingSystem platformName)) |
|
7242 |
, (self compiled_classNames_common) |
|
7243 |
, (self autoloaded_classNames)) do:[:nm | |
|
7244 |
|cls| |
|
7245 |
||
7246 |
cls := Smalltalk at:nm asSymbol. |
|
7247 |
cls isNil ifTrue:[ |
|
14834 | 7248 |
(self autoloaded_classNames includes:nm) ifTrue:[ |
7249 |
Transcript showCR:'missing autoloaded class: ',nm. |
|
7250 |
] ifFalse:[ |
|
7251 |
self error:('missing class: ',nm) mayProceed:true. |
|
7252 |
] |
|
7253 |
] ifFalse:[ |
|
7254 |
classesInDescription add:cls. |
|
7255 |
] |
|
13728 | 7256 |
]. |
7257 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7258 |
missingPools := Set new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7259 |
classesInDescription do:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7260 |
eachClass sharedPoolNames do:[:eachPoolName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7261 |
|pool| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7262 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7263 |
pool := eachClass nameSpace classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7264 |
pool isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7265 |
eachClass nameSpace ~~ Smalltalk ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7266 |
pool := Smalltalk classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7267 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7268 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7269 |
pool isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7270 |
Transcript showCR:'missing pool: ',eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7271 |
missingPools add:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7272 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7273 |
pool isSharedPool ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7274 |
Transcript showCR:'not a shared pool: ',eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7275 |
missingPools add:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7276 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7277 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7278 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7279 |
]. |
14981 | 7280 |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7281 |
missingPools notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7282 |
(Dialog |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7283 |
confirm:('The following sharedpools are non-existent, or not pools:\\ ' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7284 |
, ((missingPools |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7285 |
asSortedCollection |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7286 |
collect:[:p | p allBold]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7287 |
asStringWith:'\ ') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7288 |
, '\\Continue ?') withCRs |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7289 |
yesLabel:'OK' noLabel:'Cancel') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7290 |
ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7291 |
AbortSignal raise |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7292 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7293 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
7294 |
|
14981 | 7295 |
"/ also found by ProjectChecker... |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7296 |
classesInImage ~= classesInDescription ifTrue:[ |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7297 |
onlyInImage := (classesInImage reject:[:cls | classesInDescription includes:cls]). |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7298 |
onlyInImage notEmpty ifTrue:[ |
13899
d769ad2935e6
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13875
diff
changeset
|
7299 |
Transcript show:self name; show:': only in image: '; showCR:onlyInImage |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7300 |
]. |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7301 |
onlyInDescription := (classesInDescription reject:[:cls | classesInImage includes:cls]). |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7302 |
onlyInDescription notEmpty ifTrue:[ |
13899
d769ad2935e6
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13875
diff
changeset
|
7303 |
Transcript show:self name; show:': only in description: '; showCR:onlyInDescription |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7304 |
]. |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7305 |
(Dialog confirm:'The set of classes in the image is different from the listed classes in the project definition.\\Proceed?' withCRs) ifFalse:[ |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7306 |
AbortSignal raiseRequest |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
7307 |
] |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7308 |
]. |
14981 | 7309 |
|
14045 | 7310 |
"/ self validateOrderOfClasses |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7311 |
|
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7312 |
" |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7313 |
squeak_vmMaker validateDescription |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7314 |
" |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
7315 |
|
14045 | 7316 |
"Modified: / 06-03-2012 / 11:31:37 / cg" |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7317 |
! |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7318 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7319 |
validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7320 |
"check if the project's classes are listed in the correct dependency order in the classList. |
14045 | 7321 |
This would be required, if the generated makefile would compile files in that order, |
7322 |
and superclasses must be compiled before subclasses (for the header files). |
|
7323 |
However, the makefile list is generated by a separate mechanism, so that is not requiered." |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7324 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7325 |
|classesInDescriptionInOrder classesInProject already| |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7326 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7327 |
classesInDescriptionInOrder := OrderedCollection new. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7328 |
classesInDescriptionInOrder := |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7329 |
self compiled_classNames |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7330 |
collect:[:eachName | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7331 |
|cls| |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7332 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7333 |
cls := Smalltalk at:eachName. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7334 |
self assert:cls notNil message:'missing class: ',eachName. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7335 |
cls |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7336 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7337 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7338 |
classesInProject := classesInDescriptionInOrder asSet. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7339 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7340 |
already := Set new. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7341 |
classesInDescriptionInOrder do:[:eachClass | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7342 |
eachClass allSuperclassesDo:[:superclass | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7343 |
(classesInProject includes:superclass) ifTrue:[ |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7344 |
"/ if in the set, it must have been already listed |
14045 | 7345 |
self |
7346 |
assert:(already includes:superclass) |
|
7347 |
message:('superclass "%1" not compiled before "%2"' |
|
7348 |
bindWith:superclass name |
|
7349 |
with:eachClass name). |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7350 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7351 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7352 |
already add:eachClass. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7353 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7354 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7355 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7356 |
stx_goodies_refactoryBrowser_lint validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7357 |
squeak_vmMaker validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7358 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7359 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
7360 |
"Created: / 05-03-2012 / 12:18:45 / cg" |
9726 | 7361 |
! ! |
7362 |
||
9585 | 7363 |
!ProjectDefinition class methodsFor:'testing'! |
7364 |
||
9664 | 7365 |
isApplicationDefinition |
7366 |
^ false |
|
7367 |
||
7368 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 7369 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
7370 |
! |
|
7371 |
||
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7372 |
isConsoleApplication |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7373 |
^ false |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7374 |
|
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7375 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7376 |
! |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
7377 |
|
9983 | 7378 |
isGUIApplication |
7379 |
^ false |
|
7380 |
||
7381 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 7382 |
! |
7383 |
||
7384 |
isLibraryDefinition |
|
7385 |
^ false |
|
7386 |
||
7387 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 7388 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 7389 |
! |
7390 |
||
9627 | 7391 |
isProjectDefinition |
9664 | 7392 |
"concrete i.e. not abstract" |
7393 |
||
14978 | 7394 |
^ self isAbstract not |
9627 | 7395 |
|
7396 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
13285 | 7397 |
"Modified: / 08-02-2011 / 10:03:49 / cg" |
9585 | 7398 |
! ! |
7399 |
||
13592 | 7400 |
!ProjectDefinition::AbbrevEntry methodsFor:'accessing'! |
7401 |
||
7402 |
category |
|
7403 |
^ category |
|
7404 |
! |
|
7405 |
||
7406 |
className |
|
7407 |
^ className |
|
7408 |
! |
|
7409 |
||
13695 | 7410 |
className:classNameArg fileName:fileNameArg category:categoryArg numClassInstVars:numClassInstVarsArg |
13592 | 7411 |
className := classNameArg. |
7412 |
fileName := fileNameArg. |
|
7413 |
category := categoryArg. |
|
7414 |
numClassInstVars := numClassInstVarsArg. |
|
7415 |
||
7416 |
"Created: / 18-08-2011 / 14:18:30 / cg" |
|
7417 |
! |
|
7418 |
||
7419 |
fileName |
|
7420 |
^ fileName |
|
7421 |
! |
|
7422 |
||
7423 |
numClassInstVars |
|
7424 |
^ numClassInstVars |
|
7425 |
||
7426 |
"Created: / 18-08-2011 / 14:18:37 / cg" |
|
7427 |
! ! |
|
7428 |
||
9569 | 7429 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 7430 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
7431 |
version |
15366 | 7432 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.470 2013-06-04 10:47:24 cg Exp $' |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
7433 |
! |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
7434 |
|
12086 | 7435 |
version_CVS |
15366 | 7436 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.470 2013-06-04 10:47:24 cg Exp $' |
13411 | 7437 |
! |
7438 |
||
7439 |
version_SVN |
|
15221 | 7440 |
^ '$ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1 $' |
9536 | 7441 |
! ! |
9714 | 7442 |
|
14642 | 7443 |
|
9714 | 7444 |
ProjectDefinition initialize! |