author | Claus Gittinger <cg@exept.de> |
Tue, 08 Feb 2011 10:04:01 +0100 | |
changeset 13285 | bd6b2a49c8af |
parent 13251 | a7dbdfdc87e6 |
child 13309 | 27f463f6c0cb |
permissions | -rw-r--r-- |
9553 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9536 | 13 |
|
9569 | 14 |
Object subclass:#ProjectDefinition |
12741
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
15 |
instanceVariableNames:'' |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
16 |
classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
17 |
PackagesBeingLoaded Verbose' |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
18 |
poolDictionaries:'' |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
19 |
category:'System-Support-Projects' |
9536 | 20 |
! |
21 |
||
12210 | 22 |
ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded' |
9607 | 23 |
|
24 |
" |
|
25 |
No other class instance variables are inherited by this class. |
|
26 |
" |
|
27 |
! |
|
28 |
||
9569 | 29 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 30 |
|
12210 | 31 |
buildingMakefiles |
32 |
" |
|
33 |
You can define additional rules and flag settings for use in the makeFile generation: |
|
34 |
||
35 |
redefinable build-file attributes: |
|
36 |
stcOptimizationOptions -> STCLOCALOPT |
|
37 |
stcWarningOptions -> STCLOCALOPT |
|
38 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
|
39 |
localIncludes_win32 -> LOCALINCLUDES (bc.mak) |
|
40 |
||
41 |
for applications: |
|
42 |
startupClassName |
|
43 |
startupSelector |
|
44 |
||
45 |
for libraries: |
|
46 |
||
47 |
" |
|
48 |
! |
|
49 |
||
9553 | 50 |
copyright |
51 |
" |
|
52 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
53 |
All Rights Reserved |
|
54 |
||
55 |
This software is furnished under a license and may be used |
|
56 |
only in accordance with the terms of that license and with the |
|
57 |
inclusion of the above copyright notice. This software may not |
|
58 |
be provided or otherwise made available to, or used by, any |
|
59 |
other person. No title to or ownership of the software is |
|
60 |
hereby transferred. |
|
61 |
" |
|
9714 | 62 |
! |
63 |
||
64 |
documentation |
|
65 |
" |
|
12210 | 66 |
As ST/X is (still) very tightly bound with stc, we keep the package and project information |
67 |
in a class-object (instead of some Project-object). This has the advantage, that it can be |
|
68 |
compiled and included in a compiled class library just like any other class. |
|
69 |
Every package includes an subclass of me (an instance of my meta), which provides useful |
|
70 |
information about the versioning and packaging. Me myself, I know how to generate dependency |
|
71 |
information and can generate makefiles and other build-support files for compilation. |
|
72 |
||
73 |
Some special notes about extension methods: |
|
74 |
if a package is loaded (Smalltalk loadPackage:'foo:bar/baz'), any already loaded package of which |
|
75 |
methods are overwritten by an extension of this package, the other package is asked to safe those |
|
76 |
methods in its safe(ForOverwrittenMethods). Thus, if the other package or any of its classes is asked |
|
77 |
to file itself out, it can do so using the safe (otherwise, you'D not be able to checkin a class while |
|
78 |
it has an overriding extension loaded). |
|
79 |
Also, the information about which other package was in charge when a method is overwritten is recorded in |
|
80 |
extensionOverwriteInfo. This is used to correctly reinstall an overwritten method, whenever a package is |
|
81 |
unloaded. |
|
9714 | 82 |
|
83 |
" |
|
9553 | 84 |
! ! |
9536 | 85 |
|
9569 | 86 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 87 |
|
12371 | 88 |
definitionClassForMonticelloPackage:aMonicelloPackagename |
89 |
^ self definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:false |
|
90 |
||
91 |
" |
|
92 |
self definitionClassForMonticelloPackage:'foobar' |
|
93 |
" |
|
94 |
! |
|
95 |
||
96 |
definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:createIfAbsent |
|
97 |
^ self allSubclasses |
|
98 |
detect:[:eachProjectDefinition | |
|
99 |
eachProjectDefinition monticelloPackageName = aMonicelloPackagename ] |
|
100 |
ifNone:[ |
|
101 |
|dfn squeakPackageInfo| |
|
102 |
||
103 |
createIfAbsent ifTrue:[ |
|
104 |
dfn := ApplicationDefinition |
|
105 |
definitionClassForPackage:'mc:',aMonicelloPackagename createIfAbsent:true projectType:GUIApplicationType. |
|
106 |
||
107 |
"/ if the squeak-stuff is loaded, use it. |
|
13118
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
108 |
PackageInfo notNil ifTrue:[ |
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
109 |
squeakPackageInfo := PackageInfo allSubclasses |
12371 | 110 |
detect:[:pi | pi new packageName = aMonicelloPackagename] ifNone:nil. |
13118
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
111 |
]. |
12371 | 112 |
|
113 |
squeakPackageInfo notNil ifTrue:[ |
|
114 |
dfn classNames:(squeakPackageInfo new classes collect:[:each | each name]). |
|
115 |
]. |
|
116 |
] ifFalse:[ |
|
117 |
nil |
|
118 |
] |
|
119 |
] |
|
120 |
||
121 |
" |
|
122 |
self definitionClassForMonticelloPackage:'foobar' |
|
123 |
self definitionClassForMonticelloPackage:'foobar' createIfAbsent:true |
|
124 |
" |
|
13118
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
125 |
|
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
126 |
"Modified: / 30-10-2010 / 00:26:07 / cg" |
12371 | 127 |
! |
128 |
||
129 |
definitionClassForPackage:aPackageID |
|
130 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
131 |
||
132 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
133 |
! |
|
134 |
||
135 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
136 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
137 |
||
138 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
139 |
! |
|
140 |
||
141 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
142 |
|packageDefinitionClassName class| |
|
143 |
||
144 |
packageDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageID. |
|
145 |
class := Smalltalk classNamed:packageDefinitionClassName. |
|
146 |
class isNil ifTrue:[ |
|
147 |
doCreateIfAbsent ifTrue:[ |
|
148 |
class := self newForPackage:aPackageID. |
|
149 |
"setup before prerequisites are defined" |
|
150 |
class setupForType:typeOrNil. |
|
151 |
"/ look what is there and include it; is this ok ? |
|
152 |
class compileDescriptionMethods |
|
153 |
]. |
|
154 |
] ifFalse:[ |
|
155 |
typeOrNil notNil ifTrue:[ |
|
156 |
class projectType == typeOrNil ifFalse: [ |
|
157 |
class setupForType:typeOrNil. |
|
158 |
]. |
|
159 |
]. |
|
160 |
]. |
|
161 |
^ class |
|
162 |
||
163 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
|
164 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
165 |
! |
|
166 |
||
167 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
|
168 |
^ (self definitionClassForType:typeOrNil) |
|
169 |
definitionClassForPackage:newProjectID |
|
170 |
createIfAbsent:createIfAbsent |
|
171 |
projectType:typeOrNil |
|
172 |
||
173 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
|
174 |
! |
|
175 |
||
176 |
definitionClassForType: type |
|
177 |
"answer the class that describes a give project type" |
|
178 |
||
179 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
|
180 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
181 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
182 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. "/ temporary - for backward compat. |
|
183 |
self error:'unknown project type'. |
|
184 |
||
185 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
186 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
|
187 |
! |
|
188 |
||
9559 | 189 |
newForPackage:packageID |
190 |
^ self |
|
191 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
|
192 |
package:packageID. |
|
193 |
||
194 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
195 |
! |
|
196 |
||
197 |
newNamed:newName package:packageID |
|
198 |
|newClass| |
|
199 |
||
200 |
"/ for now, we are strict. |
|
201 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9569 | 202 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 203 |
|
204 |
newClass := self |
|
205 |
subclass:(newName asSymbol) |
|
206 |
instanceVariableNames:'' |
|
207 |
classVariableNames:'' |
|
208 |
poolDictionaries:'' |
|
209 |
category:(self defaultCategory). |
|
210 |
||
211 |
newClass package:packageID asSymbol. |
|
212 |
^ newClass |
|
213 |
||
214 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
215 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 216 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 217 |
! ! |
218 |
||
9569 | 219 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 220 |
|
10716 | 221 |
allPreRequisites |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
222 |
"answer all (recursive) prerequisite project ids of myself - in random order. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
223 |
If we exclude a project, but one of our prerequisite projects depends on it, " |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
224 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
225 |
|setOfAllPreRequisites toAdd| |
10716 | 226 |
|
227 |
setOfAllPreRequisites := Set new. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
228 |
toAdd := Set new. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
229 |
toAdd addAll:self effectivePreRequisites. |
10810 | 230 |
|
11752
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
231 |
"is a subproject really a prerequisite?? |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
232 |
No, it works the other way: parent projects are prerequisites of sub projects, |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
233 |
so the following line has been deleted. |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
234 |
Unfortunately the meaning of 'subproject' has never been well defined. SV." |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
235 |
"/ toAdd addAll:self effectiveSubProjects. |
10716 | 236 |
|
237 |
[toAdd notEmpty] whileTrue:[ |
|
238 |
|aPreRequisiteProjectID def| |
|
239 |
||
240 |
aPreRequisiteProjectID := toAdd removeFirst. |
|
241 |
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[ |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
242 |
setOfAllPreRequisites add:aPreRequisiteProjectID. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
243 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
244 |
def := self definitionClassForPackage:aPreRequisiteProjectID. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
245 |
def isNil ifTrue:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
246 |
Transcript showCR:'ProjectDefinition ', aPreRequisiteProjectID, ' is missing - cannot find its preRequisites.'. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
247 |
] ifFalse:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
248 |
def effectivePreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
249 |
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not] |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
250 |
thenDo:[:eachSubPreRequisite | |
12554 | 251 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' requires ', eachSubPreRequisite). |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
252 |
toAdd add:eachSubPreRequisite ]. |
11752
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
253 |
|
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
254 |
"but subprojects of our prerequisites are also prerequisites" |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
255 |
def effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
256 |
select:[:eachSubSubRequisite | (setOfAllPreRequisites includes:eachSubSubRequisite) not] |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
257 |
thenDo:[:eachSubSubRequisite | |
12554 | 258 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' hasSub ', eachSubSubRequisite). |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
259 |
toAdd add:eachSubSubRequisite ]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
260 |
]. |
10716 | 261 |
] |
262 |
]. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
263 |
^ setOfAllPreRequisites. |
10716 | 264 |
|
265 |
" |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
266 |
stx_libbasic allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
267 |
stx_libbasic2 allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
268 |
stx_libview2 allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
269 |
ubs_application allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
270 |
ubs_application allPreRequisitesSorted |
12994
1254ff239542
comment/format in: #allPreRequisites
Stefan Vogel <sv@exept.de>
parents:
12966
diff
changeset
|
271 |
exept_expecco_application allPreRequisites |
10716 | 272 |
exept_expeccoNET_application allPreRequisites |
273 |
alspa_batch_application allPreRequisites |
|
274 |
" |
|
275 |
! |
|
276 |
||
10810 | 277 |
allPreRequisitesSorted |
278 |
"answer all the prerequisites of this projects sorted in |
|
279 |
the order they are needed. |
|
280 |
Use this to e.g. compile packages in the dependency order" |
|
281 |
||
13081 | 282 |
|allPreRequisites orderedTuples effective allPreRequisitesWithExtensions sortedPackages| |
10810 | 283 |
|
284 |
orderedTuples := OrderedCollection new. |
|
285 |
||
11070 | 286 |
allPreRequisites := self allPreRequisites. |
13081 | 287 |
allPreRequisitesWithExtensions := allPreRequisites union:self extensionPackages. |
288 |
||
11070 | 289 |
allPreRequisites do:[:eachPackageID | |
10810 | 290 |
|def| |
291 |
||
13081 | 292 |
orderedTuples add:(Array with:eachPackageID with:self package). |
293 |
||
10810 | 294 |
def := self definitionClassForPackage:eachPackageID. |
11173 | 295 |
def isNil ifTrue:[ |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
296 |
Transcript showCR:'Warning: no definition class for package: ', eachPackageID. |
11173 | 297 |
] ifFalse:[ |
13081 | 298 |
effective := def effectivePreRequisites union:def extensionPackages. |
299 |
effective notEmptyOrNil ifTrue:[ |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
300 |
effective do:[:eachPrerequisitePackageID| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
301 |
orderedTuples add:(Array with:eachPrerequisitePackageID with:eachPackageID). |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
302 |
]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
303 |
]. |
10810 | 304 |
]. |
305 |
]. |
|
306 |
||
13081 | 307 |
sortedPackages := orderedTuples topologicalSort. |
308 |
||
309 |
"packages which only result from extension methods are used for computing the sort order, |
|
310 |
but they are not added, if not present in the first place" |
|
311 |
^ sortedPackages select:[:eachProject| allPreRequisites includes:eachProject] |
|
10810 | 312 |
|
313 |
" |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
314 |
stx_libbasic allPreRequisitesSorted |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
315 |
stx_libbasic2 allPreRequisitesSorted |
10810 | 316 |
stx_libwidg2 allPreRequisitesSorted |
317 |
exept_expecco_application allPreRequisitesSorted |
|
318 |
alspa_batch_application allPreRequisitesSorted |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
319 |
ubs_application allPreRequisitesSorted |
10810 | 320 |
" |
321 |
! |
|
322 |
||
12575 | 323 |
directory |
324 |
"for packageId compatibility" |
|
325 |
||
326 |
^ self moduleDirectory |
|
327 |
||
328 |
" |
|
329 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
330 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
331 |
stx_libbasic3 moduleDirectory |
|
332 |
cg_croquet moduleDirectory |
|
333 |
cg_croquet package asPackageId module |
|
334 |
cg_croquet moduleDirectory |
|
335 |
stx_goodies_xml_vw moduleDirectory |
|
336 |
" |
|
337 |
||
338 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
339 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
|
340 |
! |
|
341 |
||
9536 | 342 |
initialClassNameForDefinitionOf:aPackageId |
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
343 |
"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
|
344 |
|
9536 | 345 |
|s| |
346 |
||
347 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
|
348 |
(s endsWith:$_) ifTrue:[ |
|
349 |
s := s copyWithoutLast:1 |
|
350 |
]. |
|
351 |
^ s |
|
352 |
||
12186 | 353 |
" |
354 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
|
355 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic' |
|
356 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
357 |
" |
|
9536 | 358 |
|
359 |
"Created: / 09-08-2006 / 17:44:47 / fm" |
|
360 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
|
361 |
! |
|
362 |
||
363 |
libraryName |
|
9575 | 364 |
^ self package asPackageId libraryName |
9536 | 365 |
|
9559 | 366 |
" |
9688 | 367 |
bosch_dapasx_datenbasis libraryName |
9575 | 368 |
stx_libbasic3 libraryName |
9559 | 369 |
" |
9536 | 370 |
|
371 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 372 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 373 |
! |
374 |
||
9559 | 375 |
libraryNameFor:aProjectID |
9575 | 376 |
^ aProjectID asPackageId libraryName |
9536 | 377 |
|
9559 | 378 |
" |
9575 | 379 |
bosch_dapasx_datenbasis libraryName |
380 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
9688 | 381 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 382 |
" |
9536 | 383 |
|
384 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 385 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 386 |
! |
387 |
||
388 |
module |
|
9559 | 389 |
^ self moduleOfClass:self |
9536 | 390 |
|
9559 | 391 |
" |
392 |
bosch_dapasx_datenbasis_Definition module |
|
393 |
DapasX_Datenbasis module |
|
12575 | 394 |
stx_libbasic3 module |
395 |
stx_libbasic3 directory |
|
9559 | 396 |
" |
9536 | 397 |
|
398 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
399 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 400 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 401 |
! |
402 |
||
403 |
moduleDirectory |
|
9575 | 404 |
^ (PackageId from:self package) directory |
9536 | 405 |
|
9559 | 406 |
" |
9575 | 407 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
408 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
409 |
stx_libbasic3 moduleDirectory |
|
12575 | 410 |
cg_croquet moduleDirectory |
411 |
cg_croquet package asPackageId module |
|
412 |
cg_croquet moduleDirectory |
|
413 |
stx_goodies_xml_vw moduleDirectory |
|
9559 | 414 |
" |
9536 | 415 |
|
416 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9575 | 417 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
9536 | 418 |
! |
419 |
||
9559 | 420 |
moduleDirectoryFor:aProjectID |
421 |
^ (aProjectID subStrings:$:) last |
|
9536 | 422 |
|
9559 | 423 |
" |
424 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
425 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
426 |
" |
|
9536 | 427 |
|
428 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 429 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 430 |
! |
431 |
||
9891 | 432 |
moduleDirectory_win32 |
433 |
^ (PackageId from:self package) directory copy replaceAll:$/ with:$\ |
|
434 |
||
435 |
" |
|
436 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
437 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
438 |
stx_libbasic3 moduleDirectory_win32 |
|
439 |
" |
|
440 |
||
441 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
442 |
! |
|
443 |
||
10562 | 444 |
moduleDirectory_win32For: projectID |
445 |
||
446 |
^(self moduleDirectoryFor:projectID) copy replaceAll:$/ with:$\ |
|
447 |
||
448 |
" |
|
449 |
self moduleDirectory_win32For: #'bosch:dapasx/pav_vergleich' |
|
450 |
self moduleDirectory_win32For: #'stx:goodies/xml/stx' |
|
451 |
self moduleDirectory_win32For: #'stx:libbasic2' |
|
452 |
" |
|
453 |
! |
|
454 |
||
9559 | 455 |
moduleFor:aProjectID |
456 |
^ (aProjectID subStrings:$:) first |
|
9536 | 457 |
|
9559 | 458 |
" |
459 |
DapasXProject module |
|
460 |
DapasX_Datenbasis module |
|
461 |
" |
|
9536 | 462 |
|
463 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 464 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 465 |
! |
466 |
||
9559 | 467 |
moduleOfClass:aClass |
468 |
^ self moduleFor:aClass package |
|
9536 | 469 |
|
9559 | 470 |
" |
471 |
DapasXProject module |
|
472 |
DapasX_Datenbasis module |
|
473 |
" |
|
9536 | 474 |
|
475 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 476 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 477 |
! |
478 |
||
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
479 |
monticelloPackageName |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
480 |
"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
|
481 |
|
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
482 |
^ nil |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
483 |
! |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
484 |
|
9559 | 485 |
msdosPathToPackage:toPackageID from:fromPackageID |
486 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
487 |
||
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
|
488 |
|parts1 parts2 common up down| |
9852 | 489 |
|
490 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
491 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
492 |
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
|
493 |
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
|
494 |
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
|
495 |
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
|
496 |
down 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
|
497 |
^ down. |
9852 | 498 |
]. |
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
|
499 |
down 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
|
500 |
^ up. |
9714 | 501 |
]. |
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
|
502 |
^ up, '\', down |
9901 | 503 |
|
9559 | 504 |
" |
505 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
9852 | 506 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
507 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
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
|
508 |
self msdosPathToPackage:'exept:expecco' from:'exept:expecco/application' |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
509 |
self msdosPathToPackage:'exept:expecco/application' from:'exept:expecco' |
9559 | 510 |
" |
9536 | 511 |
|
9559 | 512 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 513 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 514 |
! |
515 |
||
9714 | 516 |
msdosPathToTopFor:aProjectID |
9559 | 517 |
"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 | 518 |
|
9852 | 519 |
|parts| |
520 |
||
521 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
522 |
||
523 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
524 |
parts size == 1 ifTrue:[^ '.']. |
|
525 |
^ (((2 to:parts size-1) collect:[:p | '..\']) asStringWith:'') , '..' |
|
526 |
]. |
|
527 |
||
528 |
^ ((parts collect:[:p | '..\']) asStringWith:'') , 'stx' |
|
9536 | 529 |
|
9559 | 530 |
" |
9852 | 531 |
self msdosPathToTopFor: #'bosch' |
532 |
self msdosPathToTopFor: #'bosch:dapasx' |
|
9559 | 533 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
9852 | 534 |
self msdosPathToTopFor: #'stx' |
535 |
self msdosPathToTopFor: #'stx:libview' |
|
536 |
self msdosPathToTopFor: #'stx:goodies/foo' |
|
9559 | 537 |
" |
9536 | 538 |
|
539 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 540 |
"Modified: / 14-09-2006 / 14:49:17 / cg" |
9559 | 541 |
! |
542 |
||
12028 | 543 |
packageDirectory |
544 |
||
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
545 |
^ Smalltalk packageDirectoryForPackageId: self package |
12028 | 546 |
|
547 |
"Created: / 15-06-2009 / 12:01:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
548 |
! |
|
549 |
||
9536 | 550 |
packageName |
9688 | 551 |
"the last component" |
9536 | 552 |
|
9688 | 553 |
^ self packageNameFor: self package |
9536 | 554 |
|
9688 | 555 |
" |
10810 | 556 |
stx_libwidg2 packageName |
9688 | 557 |
bosch_dapasx_hw_schnittstellen packageName |
558 |
bosch_dapasx_datenbasis packageName |
|
559 |
bosch_dapasx_parameter_system packageName |
|
560 |
" |
|
9536 | 561 |
|
562 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
563 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
564 |
! |
|
565 |
||
566 |
packageNameFor: aProjectID |
|
9688 | 567 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 568 |
|
9688 | 569 |
" |
570 |
bosch_dapasx_hw_schnittstellen packageName |
|
571 |
bosch_dapasx_datenbasis packageName |
|
572 |
bosch_dapasx_parameter_system packageName |
|
12575 | 573 |
cg_croquet packageName |
574 |
stx_goodies_xml_vw packageName |
|
575 |
stx_goodies_xml_vw packageDirectory |
|
9688 | 576 |
" |
9536 | 577 |
|
578 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
579 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
580 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
581 |
! |
|
582 |
||
583 |
parentProject |
|
10306 | 584 |
^ (self parentProjectFor: self package) |
9536 | 585 |
|
586 |
" |
|
587 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
588 |
DapasX_Datenbasis parentProject |
|
589 |
" |
|
590 |
||
591 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
592 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
593 |
! |
|
594 |
||
595 |
parentProjectFor: aProjectID |
|
10306 | 596 |
^ (aProjectID subStrings: $/) first |
9536 | 597 |
|
598 |
" |
|
9664 | 599 |
bosch_dapasx_hw_schnittstellen parentProject |
9536 | 600 |
" |
601 |
||
602 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
603 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9664 | 604 |
"Modified: / 23-08-2006 / 15:07:36 / cg" |
9536 | 605 |
! |
606 |
||
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
607 |
pathSeparator:platformName |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
608 |
platformName == #unix ifTrue:[ |
9850 | 609 |
^ self pathSeparator_unix |
610 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
611 |
platformName == #win32 ifTrue:[ |
9850 | 612 |
^ self pathSeparator_win32 |
613 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
614 |
self error:'unknown operating system platform'. |
9850 | 615 |
|
616 |
"Created: / 14-09-2006 / 13:38:00 / cg" |
|
617 |
! |
|
618 |
||
619 |
pathSeparator_unix |
|
620 |
^ $/ |
|
621 |
||
622 |
"Created: / 14-09-2006 / 13:37:18 / cg" |
|
623 |
! |
|
624 |
||
625 |
pathSeparator_win32 |
|
626 |
^ $\ |
|
627 |
||
628 |
"Created: / 14-09-2006 / 13:37:23 / cg" |
|
629 |
! |
|
630 |
||
631 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
632 |
"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" |
|
633 |
||
634 |
|p| |
|
635 |
||
636 |
arch == #unix ifTrue:[ |
|
637 |
p := (self pathToPackage_unix:aPackageID). |
|
638 |
aBaseFilename isNil ifTrue:[^ p]. |
|
639 |
^ p , '/' , aBaseFilename |
|
640 |
]. |
|
641 |
arch == #win32 ifTrue:[ |
|
642 |
p := self pathToPackage_win32:aPackageID. |
|
643 |
aBaseFilename isNil ifTrue:[^ p]. |
|
644 |
^ p , '\' , aBaseFilename |
|
645 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
646 |
self error:'unknown operating system platform'. |
9850 | 647 |
|
648 |
"Created: / 14-09-2006 / 13:29:20 / cg" |
|
649 |
! |
|
650 |
||
651 |
pathToPackage_unix:aPackageID |
|
652 |
"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" |
|
653 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
654 |
|rel| |
9850 | 655 |
|
9880 | 656 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
657 |
^ self unixPathToPackage:aPackageID from:self package |
|
658 |
]. |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
659 |
rel := self topRelativePathToPackage_unix:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
660 |
(rel startsWith:'stx/') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
661 |
^ '$(TOP)/', (rel copyFrom:'stx/' size + 1). |
9850 | 662 |
] ifFalse:[ |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
663 |
^ '$(TOP)/../', rel |
9850 | 664 |
] |
665 |
||
666 |
" |
|
9880 | 667 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/kernel' |
668 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/support' |
|
669 |
stx_libbasic pathToPackage_unix:'bosch:dapasx/kernel' |
|
9850 | 670 |
" |
671 |
||
672 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
673 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 674 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
9850 | 675 |
! |
676 |
||
677 |
pathToPackage_win32:aPackageID |
|
678 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
679 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
680 |
|rel| |
9850 | 681 |
|
9880 | 682 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
683 |
^ self msdosPathToPackage:aPackageID from:self package |
|
684 |
]. |
|
685 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
686 |
rel := self topRelativePathToPackage_win32:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
687 |
(rel startsWith:'stx\') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
688 |
^ '$(TOP)\', (rel copyFrom:'stx\' size + 1). |
9850 | 689 |
] ifFalse:[ |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
690 |
^ '$(TOP)\..\', rel |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
691 |
] |
9850 | 692 |
|
693 |
" |
|
9880 | 694 |
self pathToPackage_win32:'bosch:dapasx/kernel' |
695 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/kernel' |
|
696 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/support' |
|
697 |
stx_libbasic pathToPackage_win32:'bosch:dapasx/kernel' |
|
9850 | 698 |
" |
699 |
||
700 |
"Created: / 14-09-2006 / 13:22:52 / cg" |
|
9880 | 701 |
"Modified: / 14-09-2006 / 15:28:45 / cg" |
9850 | 702 |
! |
703 |
||
9714 | 704 |
pathToTop_unix |
705 |
"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" |
|
706 |
||
9852 | 707 |
^ self unixPathToTopFor:self package. |
9714 | 708 |
|
709 |
" |
|
9852 | 710 |
bosch_dapasx_kernel pathToTop_unix |
711 |
stx_goodies_xml pathToTop_unix |
|
712 |
stx_libhtml pathToTop_unix |
|
713 |
stx_goodies_refactoryBrowser_changes pathToTop_unix |
|
9714 | 714 |
" |
715 |
||
716 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 717 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 718 |
! |
719 |
||
720 |
pathToTop_win32 |
|
721 |
"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" |
|
722 |
||
723 |
^self msdosPathToTopFor: self package |
|
724 |
||
725 |
" |
|
726 |
bosch_dapasx_datenbasis pathToTop_win32 |
|
727 |
stx_libbasic pathToTop_win32 |
|
728 |
" |
|
729 |
||
730 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9831 | 731 |
"Modified: / 07-09-2006 / 15:51:00 / cg" |
9714 | 732 |
! |
733 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
734 |
projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
735 |
"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
|
736 |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
737 |
projectIsLoaded isNil ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
738 |
projectIsLoaded := false. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
739 |
]. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
740 |
^ projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
741 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
742 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
743 |
stx_libbasic projectIsLoaded |
13251 | 744 |
(ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
745 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
746 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
747 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
748 |
projectIsLoaded:something |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
749 |
projectIsLoaded := something. |
13251 | 750 |
something ifTrue:[ |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
751 |
"register myself as dependent - I want to get notified on method changes" |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
752 |
self class addDependent:self. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
753 |
]. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
754 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
755 |
|
9536 | 756 |
requiredProjects |
11479 | 757 |
^ self effectivePreRequisites , self subProjects |
9536 | 758 |
! |
759 |
||
9850 | 760 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
761 |
"Returns the path to stx counting the number of $/ and $: in the package name |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
762 |
and adding for each one '../' to get the ST/X top directory" |
9850 | 763 |
|
764 |
|p| |
|
765 |
||
766 |
arch == #unix ifTrue:[ |
|
767 |
p := (self topRelativePathToPackage_unix:aPackageID). |
|
768 |
aBaseFilename isNil ifTrue:[^ p]. |
|
769 |
^ p , '/' , aBaseFilename |
|
770 |
]. |
|
771 |
arch == #win32 ifTrue:[ |
|
772 |
p := self topRelativePathToPackage_win32:aPackageID. |
|
773 |
aBaseFilename isNil ifTrue:[^ p]. |
|
774 |
^ p , '\' , aBaseFilename |
|
775 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
776 |
self error:'unknown operating system platform'. |
9850 | 777 |
|
778 |
"Created: / 14-09-2006 / 13:34:05 / cg" |
|
779 |
! |
|
780 |
||
781 |
topRelativePathToPackage_unix:aPackageID |
|
782 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
|
783 |
||
784 |
^ aPackageID asString copy replaceAny:':/' with:$/ |
|
785 |
||
786 |
" |
|
787 |
self topRelativePathToPackage_unix:'stx:goodies/xml' |
|
788 |
self topRelativePathToPackage_unix:'bosch:dapasx/kernel' |
|
789 |
" |
|
790 |
||
791 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
792 |
! |
|
793 |
||
794 |
topRelativePathToPackage_win32:aPackageID |
|
9559 | 795 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
796 |
||
797 |
^ aPackageID asString copy replaceAny:':/' with:$\ |
|
798 |
||
799 |
" |
|
9850 | 800 |
self topRelativePathToPackage_win32:'stx:goodies/xml' |
801 |
self topRelativePathToPackage_win32:'bosch:dapasx/kernel' |
|
9559 | 802 |
" |
9536 | 803 |
|
9850 | 804 |
"Created: / 14-09-2006 / 13:20:12 / cg" |
9852 | 805 |
! |
806 |
||
9880 | 807 |
unixPathToPackage:toPackageID from:fromPackageID |
808 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
809 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
810 |
|parts1 parts2 common up down rel| |
9880 | 811 |
|
812 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
813 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
814 |
common := parts1 commonPrefixWith:parts2. |
|
815 |
common notEmpty ifTrue:[ |
|
816 |
up := ((1 to:parts1 size - common size) collect:[:p | '../']) asStringWith:''. |
|
817 |
down := (parts2 copyFrom:common size+1) asStringWith:'/'. |
|
818 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
|
819 |
^ up , down |
|
820 |
]. |
|
821 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
822 |
rel := (self topRelativePathToPackage_unix:toPackageID). |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
823 |
(rel startsWith:'stx/') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
824 |
^ '$(TOP)', (rel copyFrom:'stx/' size) |
9880 | 825 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
826 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
827 |
^ '$(TOP)/../', rel. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
828 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
829 |
"/ pTop := self unixPathToTopFor:fromPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
830 |
"/ (pTop endsWith:'/stx') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
831 |
"/ pTop := pTop copyButLast:'stx' size. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
832 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
833 |
"/ pTop isEmpty ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
834 |
"/ pTop := '../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
835 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
836 |
"/ pTop := pTop, '/../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
837 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
838 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
839 |
"/ ^ pTop, (self topRelativePathToPackage_unix:toPackageID) |
9880 | 840 |
|
841 |
" |
|
10713 | 842 |
self unixPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
843 |
self unixPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
|
844 |
self unixPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
9880 | 845 |
" |
846 |
||
847 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
848 |
! |
|
849 |
||
9852 | 850 |
unixPathToTopFor:aProjectID |
851 |
"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" |
|
852 |
||
853 |
|parts| |
|
854 |
||
855 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
856 |
||
857 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
10872
2c1c439ddab3
Fix unix Make.proto generation
Stefan Vogel <sv@exept.de>
parents:
10869
diff
changeset
|
858 |
parts size == 1 ifTrue:[^ '']. |
9852 | 859 |
^ (((2 to:parts size-1) collect:[:p | '../']) asStringWith:'') , '..' |
860 |
]. |
|
861 |
||
862 |
^ ((parts collect:[:p | '../']) asStringWith:'') , 'stx' |
|
863 |
||
864 |
" |
|
865 |
self unixPathToTopFor: #'bosch' |
|
866 |
self unixPathToTopFor: #'bosch:dapasx' |
|
867 |
self unixPathToTopFor: #'bosch:dapasx/datenbasis' |
|
868 |
self unixPathToTopFor: #'stx' |
|
869 |
self unixPathToTopFor: #'stx:libview' |
|
870 |
self unixPathToTopFor: #'stx:goodies/foo' |
|
871 |
" |
|
872 |
||
873 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
9536 | 874 |
! ! |
875 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
876 |
!ProjectDefinition class methodsFor:'accessing - packaging'! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
877 |
|
12371 | 878 |
classNames:aCollectionOfClassNames |
879 |
"set the set of classes" |
|
880 |
||
881 |
self classNamesAndAttributes:aCollectionOfClassNames usingCompiler:nil |
|
882 |
! |
|
883 |
||
884 |
classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
|
885 |
"set the set of classes. and attributes |
|
886 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
887 |
which has to do the job. |
|
888 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
889 |
||
890 |
|oldSpec newCode| |
|
891 |
||
892 |
oldSpec := self classNamesAndAttributes. |
|
893 |
newSpec = oldSpec ifTrue: [^ self]. |
|
894 |
||
895 |
newCode := self classNamesAndAttributes_codeFor:newSpec. |
|
896 |
||
897 |
(compilerOrNil ? self compilerClass) |
|
898 |
compile:newCode |
|
899 |
forClass:self theMetaclass |
|
900 |
inCategory:'description - contents'. |
|
901 |
! |
|
902 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
903 |
excludeClasses:toExclude usingCompiler:compilerOrNil |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
904 |
"exclude (remove from classList) a number of classes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
905 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
906 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
907 |
(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
|
908 |
|
12371 | 909 |
|newSpec| |
910 |
||
911 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
912 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
913 |
toExclude do:[:eachClassToExclude | |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
914 |
|className| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
915 |
className := eachClassToExclude theNonMetaclass name. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
916 |
(self allClassNames includes:className) ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
917 |
|idx| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
918 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
919 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
920 |
idx ~~ 0 ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
921 |
newSpec := newSpec copyWithoutIndex:idx. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
922 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
923 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
924 |
]. |
12371 | 925 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
926 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
927 |
"Created: / 30-08-2007 / 18:28:28 / cg" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
928 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
929 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
930 |
includeClasses:toInclude usingCompiler:compilerOrNil |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
931 |
"include (add to classList) a number of classes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
932 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
933 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
934 |
(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
|
935 |
|
12371 | 936 |
|oldSpec newSpec| |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
937 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
938 |
oldSpec := self classNamesAndAttributes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
939 |
newSpec := oldSpec copy. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
940 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
941 |
toInclude do:[:eachClassToInclude | |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
942 |
|className| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
943 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
944 |
className := eachClassToInclude theNonMetaclass name. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
945 |
(self compiled_classNames includes:className) ifFalse:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
946 |
| idx entry| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
947 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
948 |
idx := oldSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
949 |
idx == 0 ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
950 |
newSpec := newSpec copyWith:(Array with:className) |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
951 |
] ifFalse:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
952 |
entry := newSpec at:idx. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
953 |
entry isArray ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
954 |
entry := entry copyWithout:#autoload |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
955 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
956 |
newSpec at:idx put:entry |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
957 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
958 |
]. |
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 |
|
12371 | 961 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
962 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
963 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
964 |
makeClassesAutoloaded:toMakeAutoloaded usingCompiler:compilerOrNil |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
965 |
"include as autoloaded (add to classList) a number of classes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
966 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
967 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
968 |
(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
|
969 |
|
12371 | 970 |
|newSpec| |
971 |
||
972 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
973 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
974 |
toMakeAutoloaded do:[:eachClassToMakeAutoloaded | |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
975 |
|className| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
976 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
977 |
className := eachClassToMakeAutoloaded theNonMetaclass name. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
978 |
(self autoloaded_classNames includes:className) ifFalse:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
979 |
|idx entry| |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
980 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
981 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
982 |
idx == 0 ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
983 |
newSpec := newSpec copyWith:(Array with:className with:#autoload) |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
984 |
] ifFalse:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
985 |
entry := newSpec at:idx. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
986 |
entry isArray ifTrue:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
987 |
entry := (entry copyWithout:#autoload) copyWith:#autoload. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
988 |
] ifFalse:[ |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
989 |
entry := Array with:entry with:#autoload |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
990 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
991 |
newSpec at:idx put:entry. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
992 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
993 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
994 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
995 |
|
12371 | 996 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
997 |
! ! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
998 |
|
12028 | 999 |
!ProjectDefinition class methodsFor:'accessing - svn'! |
1000 |
||
1001 |
svnRevision |
|
1002 |
||
1003 |
" |
|
12740 | 1004 |
Answers SVN revision of given package. The revision is computed |
1005 |
as follows: |
|
1006 |
1) Look at package directory if there is .svn administration |
|
1007 |
directory. If so, uses SVN to obtain SVN revision & return |
|
1008 |
2) If svnRevisionNr return non-nil, use that as SVN revision & return |
|
1009 |
3) If everything fails, compute maximum from all revision of all |
|
1010 |
classes & extensions |
|
12028 | 1011 |
" |
1012 |
| pkgDir revNr | |
|
1013 |
||
1014 |
"1)" |
|
1015 |
pkgDir := self packageDirectory. |
|
1016 |
(pkgDir notNil and: [pkgDir exists and: [(pkgDir / '.svn') exists]]) ifTrue: |
|
12740 | 1017 |
[[revNr := (SVN::InfoCommand new |
1018 |
workingCopy: (SVN::WorkingCopy branch: (SVN::Branch new) path: pkgDir); |
|
1019 |
execute) anyOne revision] |
|
1020 |
value |
|
1021 |
"/on: Error do: [revNr := nil] |
|
1022 |
]. |
|
12028 | 1023 |
revNr ifNotNil:[^SVN::Revision number:revNr]. |
1024 |
"2)" |
|
1025 |
"We have to explicitly check for existence of svnRevisionNr, |
|
1026 |
because we don't want to invoke inherited method" |
|
1027 |
(self class methodDictionary includesKey: #svnRevisionNr) |
|
12740 | 1028 |
ifTrue:[revNr := self perform:#svnRevisionNr]. |
12028 | 1029 |
revNr ifNotNil:[^SVN::Revision number:(revNr asString select:[:e|e isDigit])]. |
1030 |
||
1031 |
"3)" |
|
1032 |
revNr := (self searchForClassesWithProject: self package) |
|
12740 | 1033 |
inject: 0 |
1034 |
into: |
|
1035 |
[:rev :cls| |
|
1036 |
rev max: (cls revision ? '0') asNumber]. |
|
12028 | 1037 |
^revNr ~= 0 |
12740 | 1038 |
ifTrue: [SVN::Revision number:revNr] |
1039 |
ifFalse:[SVN::Revision head] |
|
1040 |
||
1041 |
" |
|
1042 |
stx_libbasic svnRevision |
|
1043 |
stx_goodies_libsvn svnRevision |
|
1044 |
stx_goodies_libsvn revision |
|
12028 | 1045 |
|
1046 |
" |
|
1047 |
||
1048 |
"Created: / 15-06-2009 / 11:54:33 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1049 |
"Modified: / 22-08-2009 / 09:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1050 |
! ! |
|
1051 |
||
9714 | 1052 |
!ProjectDefinition class methodsFor:'class initialization'! |
1053 |
||
1054 |
initialize |
|
1055 |
LibraryType := #'Library'. |
|
1056 |
GUIApplicationType := #'GUI-Application'. |
|
1057 |
NonGUIApplicationType := #'NonGUI-Application'. |
|
1058 |
||
10121 | 1059 |
" |
1060 |
self initialize |
|
1061 |
" |
|
1062 |
||
1063 |
"Modified: / 23-10-2006 / 16:40:58 / cg" |
|
1064 |
! |
|
1065 |
||
1066 |
initializeAllProjectDefinitions |
|
1067 |
"needs everything else (especially the compiler etc.) to be initialized. |
|
1068 |
Therefore, its not invoked by #initialize, but instead explicitely, |
|
1069 |
by Smalltalk" |
|
10119 | 1070 |
|
10124 | 1071 |
Smalltalk isStandAloneApp ifFalse:[ |
1072 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
1073 |
eachProjectDefinitionClass installAutoloadedClasses. |
|
12296
71887e4be68b
changed: #initializeAllProjectDefinitions
Claus Gittinger <cg@exept.de>
parents:
12295
diff
changeset
|
1074 |
eachProjectDefinitionClass projectIsLoaded:true. |
10124 | 1075 |
]. |
10115 | 1076 |
]. |
1077 |
||
9714 | 1078 |
" |
1079 |
self initialize |
|
1080 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1081 |
|
10121 | 1082 |
"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
|
1083 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1084 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1085 |
installAutoloadedClasses |
12372 | 1086 |
"install all of my autoloaded classes (if any)" |
1087 |
||
10114 | 1088 |
(self classNamesForWhich:[:nm :attr | (attr includes:#autoload)]) |
1089 |
do:[:className | |
|
11241
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1090 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
10114 | 1091 |
(Smalltalk classNamed:className) isNil ifTrue:[ |
11241
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1092 |
Error handle:[:ex | |
12269
0b8299ee8530
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12268
diff
changeset
|
1093 |
(self name,' [warning]: failed to install autoloaded: ',className) errorPrintCR. |
12271
8d974650b1d2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12269
diff
changeset
|
1094 |
(self name,' [info]: reason: ',ex description) errorPrintCR. |
8d974650b1d2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12269
diff
changeset
|
1095 |
"/ thisContext fullPrintAll. |
11241
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1096 |
] do:[ |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1097 |
Smalltalk |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1098 |
installAutoloadedClassNamed:className |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1099 |
category:'* as yet unknown category *' |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1100 |
package:self package |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1101 |
revision:nil |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
1102 |
]. |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1103 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1104 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1105 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1106 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1107 |
stx_libbasic installAutoloadedClasses |
12268
b3cd2af642f2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12264
diff
changeset
|
1108 |
stx_libhtml installAutoloadedClasses |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1109 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1110 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1111 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
10163 | 1112 |
"Modified: / 08-11-2006 / 17:08:06 / cg" |
9714 | 1113 |
! ! |
1114 |
||
9998 | 1115 |
!ProjectDefinition class methodsFor:'code generation'! |
1116 |
||
11072 | 1117 |
applicationIconFileName_code |
1118 |
^ String streamContents:[:s | |
|
1119 |
s nextPutLine:'applicationIconFileName'. |
|
1120 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon); will be included in the rc-resource file"'. |
|
1121 |
s cr; |
|
1122 |
nextPutLine:' ^ nil'; |
|
1123 |
nextPutLine:' "/ ^ self applicationName'. |
|
1124 |
]. |
|
1125 |
||
1126 |
" |
|
1127 |
self legalCopyright_code |
|
1128 |
stx_libbasic3 legalCopyright_code |
|
1129 |
" |
|
1130 |
||
1131 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1132 |
! |
|
1133 |
||
10393 | 1134 |
classNamesAndAttributes_codeFor:aSpecArray |
1135 |
"generate method code returning all classes of the project from the given spec." |
|
1136 |
||
1137 |
^ String streamContents:[:s | |
|
1138 |
s nextPutLine:'classNamesAndAttributes'. |
|
12425 | 1139 |
s nextPutLine:' "lists the classes which are to be included in the project.'. |
1140 |
s nextPutLine:' Each entry in the list may be: a single class-name (symbol),'. |
|
1141 |
s nextPutLine:' or an array-literal consisting of class name and attributes.'. |
|
1142 |
s nextPutLine:' Attributes are: #autoload or #<os> where os is one of win32, unix,..."'. |
|
1143 |
s nextPutLine:''. |
|
10393 | 1144 |
s nextPutLine:' ^ #('. |
1145 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
|
1146 |
||
1147 |
(self classNamesAndAttributesFromSpecArray:aSpecArray) do:[:entry | |
|
1148 |
s spaces:8. |
|
1149 |
entry storeArrayElementOn:s. |
|
1150 |
s cr. |
|
1151 |
]. |
|
1152 |
s nextPutLine:' )' |
|
1153 |
]. |
|
1154 |
||
1155 |
" |
|
1156 |
stx_libbasic3 classNamesAndAttributes_codeFor:(stx_libbasic3 classNamesAndAttributes) |
|
1157 |
exept_expecco classNamesAndAttributes_codeFor:(exept_expecco classNamesAndAttributes) |
|
1158 |
" |
|
1159 |
||
1160 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1161 |
"Created: / 19-02-2007 / 15:43:27 / cg" |
|
1162 |
! |
|
1163 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1164 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 1165 |
"generate method code returning all classes of the project. |
1166 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1167 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1168 |
if false, existing entries are preserved. |
10010 | 1169 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1170 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1171 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 1172 |
|
10393 | 1173 |
|newSpec oldSpec ignored| |
1174 |
||
1175 |
oldSpec := self classNamesAndAttributesAsSpecArray. |
|
1176 |
ignored := self ignoredClassNames asSet. |
|
1177 |
newSpec := OrderedCollection new. |
|
1178 |
||
1179 |
ignoreOldEntries ifFalse:[ |
|
1180 |
oldSpec do:[:oldEntry | |
|
1181 |
|newEntry className cls| |
|
1182 |
||
1183 |
newEntry := oldEntry copy. |
|
1184 |
className := newEntry first. |
|
1185 |
||
1186 |
(ignored includes:className) ifFalse:[ |
|
1187 |
cls := Smalltalk classNamed:className. |
|
10405
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1188 |
ignoreOldDefinition ifTrue:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1189 |
(cls notNil and:[cls isLoaded not]) ifTrue:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1190 |
(newEntry includes:#autoload) ifFalse:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1191 |
newEntry := newEntry copyWith:#autoload. |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1192 |
]. |
10188
660aa980d6ae
care for autoload attribute
Claus Gittinger <cg@exept.de>
parents:
10187
diff
changeset
|
1193 |
]. |
660aa980d6ae
care for autoload attribute
Claus Gittinger <cg@exept.de>
parents:
10187
diff
changeset
|
1194 |
]. |
10393 | 1195 |
newSpec add:newEntry. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1196 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1197 |
]. |
10393 | 1198 |
]. |
1199 |
||
1200 |
self searchForClasses do:[:eachClass | |
|
1201 |
|className attributes oldSpecEntry oldAttributes newEntry| |
|
1202 |
||
1203 |
className := eachClass name. |
|
1204 |
(ignored includes:className) ifFalse:[ |
|
1205 |
oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil. |
|
1206 |
||
1207 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
|
1208 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
|
1209 |
(self additionalClassNamesAndAttributes includes:className) ifFalse:[ |
|
1210 |
(oldSpecEntry size > 1) ifTrue:[ |
|
1211 |
oldAttributes := oldSpecEntry copyFrom:2. |
|
1212 |
]. |
|
1213 |
||
1214 |
ignoreOldDefinition ifTrue:[ |
|
1215 |
"take autoload attribute from classes state in the image" |
|
1216 |
oldAttributes notNil ifTrue:[ |
|
1217 |
attributes := oldAttributes copyWithout:#autoload. |
|
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
1218 |
] ifFalse:[ |
10393 | 1219 |
attributes := #() |
1220 |
]. |
|
1221 |
eachClass isLoaded ifFalse:[ |
|
1222 |
attributes := attributes copyWith:#autoload. |
|
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
1223 |
]. |
10393 | 1224 |
] ifFalse:[ |
1225 |
"keep any existing attribute" |
|
1226 |
oldAttributes notNil ifTrue:[ |
|
1227 |
attributes := oldAttributes. |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1228 |
] ifFalse:[ |
10393 | 1229 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1230 |
]. |
10393 | 1231 |
]. |
12357 | 1232 |
"JV @ 2009-10-26 |
1233 |
Give a project definition to specify additional attributes for given class." |
|
1234 |
(self additionalClassAttributesFor: eachClass) do:[:attr| |
|
1235 |
(attributes includes: attr) ifFalse:[ |
|
1236 |
attributes := attributes copyWith: attr |
|
1237 |
] |
|
1238 |
]. |
|
10393 | 1239 |
newEntry := Array with:className. |
1240 |
attributes notEmptyOrNil ifTrue:[ |
|
1241 |
newEntry := newEntry , attributes. |
|
1242 |
]. |
|
1243 |
newSpec add:newEntry |
|
1244 |
] |
|
1245 |
] |
|
1246 |
] |
|
1247 |
] |
|
9998 | 1248 |
]. |
10393 | 1249 |
^ self classNamesAndAttributes_codeFor:newSpec |
1250 |
||
1251 |
" |
|
1252 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
1253 |
exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
1254 |
" |
|
9998 | 1255 |
|
1256 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1257 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
10405
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
1258 |
"Modified: / 22-02-2007 / 15:06:37 / cg" |
12357 | 1259 |
"Modified: / 26-10-2009 / 13:02:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1260 |
! |
1261 |
||
1262 |
companyName_code |
|
12541 | 1263 |
^ self companyName_codeFor:self companyName |
1264 |
||
1265 |
" |
|
1266 |
self companyName_code |
|
1267 |
stx_libbasic3 companyName_code |
|
1268 |
" |
|
1269 |
||
1270 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1271 |
! |
|
1272 |
||
1273 |
companyName_codeFor:aString |
|
9998 | 1274 |
^ String streamContents:[:s | |
1275 |
s nextPutLine:'companyName'. |
|
1276 |
s nextPutLine:' "Return a companyname which will appear in <lib>.rc"'. |
|
12541 | 1277 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1278 |
]. |
1279 |
||
1280 |
" |
|
1281 |
self companyName_code |
|
1282 |
stx_libbasic3 companyName_code |
|
1283 |
" |
|
1284 |
||
1285 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1286 |
! |
|
1287 |
||
1288 |
compileDescriptionMethods |
|
1289 |
(self isLibraryDefinition |
|
1290 |
or:[ self isApplicationDefinition ] ) ifFalse:[ |
|
1291 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
|
1292 |
]. |
|
1293 |
||
1294 |
self |
|
1295 |
forEachMethodsCodeToCompileDo:[:code :category | |
|
1296 |
self compile:code categorized:category |
|
1297 |
]. |
|
1298 |
||
1299 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
1300 |
||
1301 |
" |
|
1302 |
DapasXProject compileDescriptionMethods |
|
1303 |
DapasX_Datenbasis compileDescriptionMethods |
|
1304 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
1305 |
stx_libbasic compileDescriptionMethods |
|
1306 |
" |
|
1307 |
||
1308 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
1309 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
1310 |
! |
|
1311 |
||
1312 |
description_code |
|
1313 |
^ String streamContents:[:s | |
|
1314 |
s nextPutLine:'description'. |
|
10306 | 1315 |
s nextPutLine:' "Return a description string which will appear in vc.def / bc.def"'. |
9998 | 1316 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
1317 |
]. |
|
1318 |
||
1319 |
" |
|
1320 |
self description_code |
|
1321 |
stx_libbasic3 description_code |
|
1322 |
" |
|
1323 |
||
1324 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
1325 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
1326 |
! |
|
1327 |
||
10923 | 1328 |
effectivePreRequisites |
1329 |
"get the preRequisites, that are not excluded" |
|
1330 |
||
1331 |
|preRequisites| |
|
1332 |
||
1333 |
preRequisites := self preRequisites asSet. |
|
1334 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
|
1335 |
preRequisites remove:self package ifAbsent:[]. |
|
1336 |
||
1337 |
^ preRequisites |
|
1338 |
! |
|
1339 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1340 |
effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1341 |
"get the subProjects, that are not excluded" |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1342 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1343 |
|subProjects| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1344 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1345 |
subProjects := self subProjects asSet. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1346 |
subProjects removeAllFoundIn:self excludedFromSubProjects. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1347 |
subProjects remove:self package ifAbsent:[]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1348 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1349 |
^ subProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1350 |
! |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1351 |
|
12425 | 1352 |
excludedFromPreRequisites_code |
1353 |
"generate the code of the #excludedFromPreRequisites method" |
|
1354 |
||
1355 |
^ String streamContents:[:s | |
|
1356 |
s nextPutLine:'excludedFromPreRequisites'. |
|
1357 |
s nextPutLine:' "list all packages which should be ignored in the automatic'. |
|
1358 |
s nextPutLine:' preRequisites scan. See #preRequisites for more."'. |
|
1359 |
s nextPutLine:''. |
|
1360 |
s nextPutLine:' ^ #('. |
|
1361 |
s nextPutLine:' )' |
|
1362 |
]. |
|
1363 |
! |
|
1364 |
||
9998 | 1365 |
extensionMethodNames_code |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1366 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1367 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1368 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1369 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1370 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1371 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1372 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1373 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1374 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1375 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1376 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 1377 |
^ String streamContents:[:s | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1378 |
|oldSpec| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1379 |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1380 |
s nextPutLine:'extensionMethodNames'. |
12425 | 1381 |
s nextPutLine:' "lists the extension methods which are to be included in the project.'. |
1382 |
s nextPutLine:' Entries are 2-element array literals, consisting of class-name and selector."'. |
|
1383 |
s nextPutLine:''. |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1384 |
s nextPutLine:' ^ #('. |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1385 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1386 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1387 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1388 |
ignoreOldEntries ifFalse:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1389 |
oldSpec do:[:entry | |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1390 |
|mclassName mselector| |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1391 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1392 |
mclassName := entry key asSymbol. |
10869 | 1393 |
(mclassName endsWith:' class') ifTrue:[ |
1394 |
mclassName := mclassName asString. |
|
1395 |
]. |
|
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1396 |
mselector := entry value asSymbol. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1397 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1398 |
s spaces:8. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1399 |
mclassName storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1400 |
s space. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1401 |
mselector storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1402 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1403 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1404 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1405 |
|
10011 | 1406 |
self searchForExtensions do:[:eachMethod | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1407 |
|attributes oldSpecEntry mclassName mselector| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1408 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1409 |
mclassName := eachMethod mclass name. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1410 |
mselector := eachMethod selector. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1411 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1412 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1413 |
s spaces:8. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1414 |
mclassName storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1415 |
s space. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1416 |
mselector storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1417 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1418 |
] |
9998 | 1419 |
]. |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1420 |
|
9998 | 1421 |
s nextPutLine:' )' |
1422 |
]. |
|
1423 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1424 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1425 |
self extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1426 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1427 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1428 |
" |
9998 | 1429 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1430 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1431 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
9998 | 1432 |
! |
1433 |
||
1434 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
1435 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1436 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
9998 | 1437 |
value:'description - contents'. |
1438 |
||
1439 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1440 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
9998 | 1441 |
value: 'description - contents'. |
1442 |
||
1443 |
aTwoArgBlock |
|
1444 |
value: self preRequisites_code |
|
1445 |
value: 'description'. |
|
1446 |
||
12425 | 1447 |
aTwoArgBlock |
1448 |
value: self excludedFromPreRequisites_code |
|
1449 |
value: 'description'. |
|
9998 | 1450 |
! |
1451 |
||
1452 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
|
1453 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
|
1454 |
! |
|
1455 |
||
1456 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1457 |
self |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1458 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1459 |
ignoreOldDefinition:ignoreOldDefinition. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1460 |
|
12305 | 1461 |
(self class includesSelector:#description) ifFalse:[ |
9998 | 1462 |
aTwoArgBlock |
1463 |
value: self description_code |
|
1464 |
value: 'description - project information'. |
|
1465 |
]. |
|
12305 | 1466 |
(self class includesSelector:#productName) ifFalse:[ |
9998 | 1467 |
aTwoArgBlock |
1468 |
value: self productName_code |
|
1469 |
value: 'description - project information'. |
|
1470 |
]. |
|
12305 | 1471 |
(self class includesSelector:#companyName) ifFalse:[ |
9998 | 1472 |
aTwoArgBlock |
1473 |
value: self companyName_code |
|
1474 |
value: 'description - project information'. |
|
1475 |
]. |
|
12305 | 1476 |
(self class includesSelector:#legalCopyright) ifFalse:[ |
9998 | 1477 |
aTwoArgBlock |
1478 |
value: self legalCopyright_code |
|
1479 |
value: 'description - project information'. |
|
1480 |
]. |
|
12305 | 1481 |
(self class includesSelector:#applicationIconFileName) ifFalse:[ |
11072 | 1482 |
aTwoArgBlock |
1483 |
value: self applicationIconFileName_code |
|
1484 |
value: 'description - project information'. |
|
1485 |
]. |
|
9998 | 1486 |
|
1487 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1488 |
"Modified: / 10-10-2006 / 22:02:24 / cg" |
9998 | 1489 |
! |
1490 |
||
1491 |
legalCopyright_code |
|
1492 |
^ String streamContents:[:s | |
|
1493 |
s nextPutLine:'legalCopyright'. |
|
1494 |
s nextPutLine:' "Return a copyright string which will appear in <lib>.rc"'. |
|
10306 | 1495 |
s cr; nextPutLine:' ^ ', self legalCopyright storeString. |
9998 | 1496 |
]. |
1497 |
||
1498 |
" |
|
1499 |
self legalCopyright_code |
|
1500 |
stx_libbasic3 legalCopyright_code |
|
1501 |
" |
|
1502 |
||
1503 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1504 |
! |
|
1505 |
||
1506 |
preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1507 |
"generate the code of the #preRequisites method" |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1508 |
|
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1509 |
|preRequisites searchedPreRequisites importantReason| |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1510 |
|
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1511 |
"maybe, some prerequisites have been added manually - keep them |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1512 |
The drawback of this - a preRequisite will never go away, even if it is no longer used" |
9998 | 1513 |
|
1514 |
preRequisites := self preRequisites asSet. |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1515 |
|
10179 | 1516 |
searchedPreRequisites := self searchForPreRequisites. |
1517 |
preRequisites addAll: (searchedPreRequisites keys). |
|
9998 | 1518 |
|
1519 |
self isApplicationDefinition ifTrue:[ |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1520 |
preRequisites add:#'stx:libcomp'. |
9998 | 1521 |
self isGUIApplication ifTrue:[ |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1522 |
preRequisites add:#'stx:libbasic2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1523 |
preRequisites add:#'stx:libview'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1524 |
preRequisites add:#'stx:libview2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1525 |
preRequisites add:#'stx:libwidg'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1526 |
preRequisites add:#'stx:libwidg2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1527 |
preRequisites add:#'stx:libui'. |
9998 | 1528 |
]. |
1529 |
]. |
|
1530 |
||
10897
6a20c3e54653
#removeAllFoundIn: excludedFromPrerequisites
Stefan Vogel <sv@exept.de>
parents:
10875
diff
changeset
|
1531 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
10034 | 1532 |
preRequisites remove:self package ifAbsent:[]. |
9998 | 1533 |
|
1534 |
^ String streamContents:[:s | |
|
1535 |
s nextPutLine:'preRequisites'. |
|
12425 | 1536 |
s nextPutLine:' "list all required packages.'. |
1537 |
s nextPutLine:' This list can be maintained manually or (better) generated and'. |
|
1538 |
s nextPutLine:' updated by scanning the superclass hierarchies and looking for'. |
|
1539 |
s nextPutLine:' global variable accesses. (the browser has a menu function for that)'. |
|
1540 |
s nextPutLine:' Howevery, often too much is found, and you may want to explicitely'. |
|
1541 |
s nextPutLine:' exclude individual packages in the #excludedFromPrerequisites method."'. |
|
1542 |
s nextPutLine:''. |
|
9998 | 1543 |
s nextPutLine:' ^ #('. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1544 |
preRequisites asSortedCollection do:[:eachPackageID | |
10179 | 1545 |
|reason| |
1546 |
||
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1547 |
s spaces:8. |
11362
6ad1683f52d5
Use symbols for package ids in generated #preRequisites
Stefan Vogel <sv@exept.de>
parents:
11241
diff
changeset
|
1548 |
eachPackageID asSymbol storeOn:s. |
10179 | 1549 |
reason := searchedPreRequisites at:eachPackageID ifAbsent:nil. |
1550 |
reason notEmptyOrNil ifTrue:[ |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1551 |
"superclasses are really important" |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1552 |
importantReason := reason detect:[:eachReasonString| |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1553 |
eachReasonString includesString:' superclass ' |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1554 |
] ifNone:[reason anElement]. |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1555 |
s nextPutAll:' "'; nextPutAll:importantReason; nextPutAll:' "'. |
10179 | 1556 |
]. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1557 |
s cr. |
9998 | 1558 |
]. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1559 |
s nextPutLine:' )' |
9998 | 1560 |
]. |
1561 |
||
1562 |
" |
|
1563 |
bosch_dapasx_application preRequisites_code |
|
1564 |
demo_demoApp1 preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1565 |
stx_libbasic3 preRequisites_code |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1566 |
stx_libtool2 preRequisites_code |
9998 | 1567 |
" |
1568 |
||
1569 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1570 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
10063 | 1571 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
9998 | 1572 |
! |
1573 |
||
1574 |
productName_code |
|
12541 | 1575 |
^ self productName_codeFor:(self productName) |
1576 |
||
1577 |
" |
|
1578 |
self productName_code |
|
1579 |
stx_libbasic3 productName_code |
|
1580 |
" |
|
1581 |
||
1582 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
1583 |
! |
|
1584 |
||
1585 |
productName_codeFor:aString |
|
9998 | 1586 |
^ String streamContents:[:s | |
1587 |
s nextPutLine:'productName'. |
|
1588 |
s nextPutLine:' "Return a product name which will appear in <lib>.rc"'. |
|
12541 | 1589 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1590 |
]. |
1591 |
||
1592 |
" |
|
1593 |
self productName_code |
|
1594 |
stx_libbasic3 productName_code |
|
1595 |
" |
|
1596 |
||
1597 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
12028 | 1598 |
! |
1599 |
||
1600 |
svnRevisionNr_code: revisionNrOrNil |
|
1601 |
^ String streamContents:[:s | |
|
12740 | 1602 |
s nextPutLine:'svnRevisionNr'. |
1603 |
s nextPutLine:' "Return a SVN revision number of myself.'. |
|
1604 |
s nextPutLine:' This number is updated after a commit"'. |
|
1605 |
s cr; |
|
1606 |
nextPutLine:' ^ "$SVN-Revision:"''', revisionNrOrNil printString , '''"$"'. |
|
12028 | 1607 |
]. |
1608 |
||
1609 |
" |
|
1610 |
self svnRevisionNr_code |
|
1611 |
stx_libbasic3 svnRevisionNr_code |
|
1612 |
" |
|
1613 |
||
1614 |
"Created: / 16-06-2009 / 12:12:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1615 |
"Modified: / 22-08-2009 / 09:05:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
9998 | 1616 |
! ! |
1617 |
||
9569 | 1618 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 1619 |
|
9664 | 1620 |
applicationTypes |
9714 | 1621 |
GUIApplicationType isNil ifTrue:[self initialize]. |
1622 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 1623 |
|
9714 | 1624 |
" |
1625 |
self applicationTypes |
|
1626 |
" |
|
9664 | 1627 |
! |
1628 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1629 |
defaultCategory |
10466 | 1630 |
^'* Projects & Packages *' |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1631 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1632 |
"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
|
1633 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1634 |
|
9714 | 1635 |
defaultProjectType |
9745 | 1636 |
^ self libraryTypes first |
1637 |
"/ ^ self applicationTypes first |
|
9714 | 1638 |
|
1639 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1640 |
! |
|
1641 |
||
1642 |
defaultProjectTypeForGUIApplication |
|
1643 |
^ GUIApplicationType |
|
1644 |
! |
|
1645 |
||
1646 |
defaultProjectTypeForNonGUIApplication |
|
1647 |
^ NonGUIApplicationType |
|
1648 |
! |
|
9664 | 1649 |
|
9714 | 1650 |
guiApplicationType |
1651 |
^ GUIApplicationType |
|
1652 |
! |
|
1653 |
||
1654 |
libraryType |
|
1655 |
^ LibraryType |
|
1656 |
! |
|
1657 |
||
1658 |
libraryTypes |
|
1659 |
LibraryType isNil ifTrue:[self initialize]. |
|
1660 |
^ Array with:LibraryType |
|
1661 |
||
1662 |
" |
|
1663 |
self libraryTypes |
|
1664 |
" |
|
1665 |
! |
|
1666 |
||
1667 |
nonGuiApplicationType |
|
1668 |
^ NonGUIApplicationType |
|
9664 | 1669 |
! |
1670 |
||
12331 | 1671 |
projectTypeSelectors |
1672 |
"a list of possible project type selectors" |
|
1673 |
||
1674 |
^ #( libraryType guiApplicationType nonGuiApplicationType ) |
|
1675 |
||
1676 |
" |
|
1677 |
self libraryType |
|
1678 |
self guiApplicationType |
|
1679 |
self nonGuiApplicationType |
|
1680 |
" |
|
1681 |
||
1682 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1683 |
! |
|
1684 |
||
9664 | 1685 |
projectTypes |
12331 | 1686 |
"a list of possible project types" |
1687 |
||
9664 | 1688 |
^ self libraryTypes , self applicationTypes |
1689 |
||
12331 | 1690 |
" |
1691 |
self projectTypes |
|
1692 |
" |
|
1693 |
||
9664 | 1694 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
9536 | 1695 |
! ! |
1696 |
||
9569 | 1697 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 1698 |
|
9983 | 1699 |
excludedFromPreRequisites |
1700 |
"list packages which are to be explicitely excluded from the automatic constructed |
|
1701 |
prerequisites list. If empty, everything that is found along the inheritance of any of |
|
1702 |
my classes is considered to be a prerequisite package." |
|
1703 |
||
1704 |
^ #() |
|
1705 |
||
1706 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
1707 |
! |
|
1708 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1709 |
excludedFromSubProjects |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1710 |
"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
|
1711 |
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
|
1712 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1713 |
^ #() |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1714 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1715 |
"Modified: / 17-08-2006 / 19:49:40 / cg" |
10039 | 1716 |
! |
1717 |
||
9575 | 1718 |
preRequisites |
1719 |
"list packages which are required as a prerequisite. This method is generated automatically, |
|
1720 |
by searching along the inheritance chain of all of my classes. |
|
1721 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1722 |
in excludedFromPreRequisites." |
|
1723 |
||
1724 |
^ #() |
|
1725 |
||
1726 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
1727 |
! |
|
1728 |
||
12186 | 1729 |
preRequisitesForBuilding |
1730 |
"for now, there is only one list of prerequisites present; |
|
1731 |
will be changed in the (near?) future" |
|
1732 |
||
1733 |
^ self preRequisites |
|
1734 |
! |
|
1735 |
||
1736 |
preRequisitesForLoading |
|
1737 |
"for now, there is only one list of prerequisites present; |
|
1738 |
will be changed in the (near?) future" |
|
1739 |
||
1740 |
^ self preRequisites |
|
1741 |
! |
|
1742 |
||
9685 | 1743 |
siblingsAreSubProjects |
1744 |
^ false |
|
1745 |
! |
|
1746 |
||
11377 | 1747 |
splashFileName |
1748 |
"answer the base-name of the splash bitmap. |
|
1749 |
||
1750 |
Default is nil, for no splash. If non-nil, it must be a bmp file's name" |
|
1751 |
||
1752 |
^ nil. |
|
1753 |
! |
|
1754 |
||
9575 | 1755 |
subProjects |
12748 | 1756 |
<resource: #obsolete> |
1757 |
||
1758 |
"OBSOLETE. |
|
1759 |
list packages which are known as subprojects. This method is generated automatically. |
|
9575 | 1760 |
However, when generating automatically, packages are only added - never removed, unless listed |
1761 |
in excludedFromSubProjects." |
|
1762 |
||
1763 |
^ #() |
|
1764 |
||
1765 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
1766 |
! ! |
|
1767 |
||
12372 | 1768 |
!ProjectDefinition class methodsFor:'description - actions'! |
1769 |
||
1770 |
postLoadAction |
|
1771 |
"invoked after loading a project" |
|
1772 |
||
1773 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1774 |
||
1775 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
1776 |
! |
|
1777 |
||
1778 |
preLoadAction |
|
1779 |
"invoked before loading a project" |
|
1780 |
||
1781 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1782 |
! |
|
1783 |
||
1784 |
preUnloadAction |
|
1785 |
"invoked before unloading a project" |
|
1786 |
||
1787 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1788 |
||
1789 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
1790 |
! ! |
|
1791 |
||
9575 | 1792 |
!ProjectDefinition class methodsFor:'description - classes'! |
1793 |
||
9621 | 1794 |
additionalClassNamesAndAttributes |
1795 |
^ #() |
|
1796 |
||
1797 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
1798 |
! |
|
1799 |
||
9607 | 1800 |
classNamesAndAttributes |
12368 | 1801 |
"a correponding method with real names must be present in my concrete subclasses" |
9575 | 1802 |
|
12202 | 1803 |
"/ should this be a subclassResponsibility here ? |
9595 | 1804 |
^ #() |
9536 | 1805 |
|
9575 | 1806 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
1807 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1808 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
1809 |
! |
|
1810 |
||
1811 |
extensionMethodNames |
|
1812 |
"list class/selector pairs of extensions. |
|
12368 | 1813 |
A correponding method with real names must be present in my concrete subclasses" |
1814 |
||
1815 |
"/ should this be a subclassResponsibility here ? |
|
9595 | 1816 |
^ #() |
9575 | 1817 |
|
1818 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1819 |
! |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1820 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1821 |
ignoredClassNames |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1822 |
"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
|
1823 |
generated classNamesAndAttributes spec" |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1824 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1825 |
^ #() |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1826 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1827 |
"Created: / 23-01-2007 / 19:08:27 / cg" |
9575 | 1828 |
! ! |
1829 |
||
1830 |
!ProjectDefinition class methodsFor:'description - compilation'! |
|
9536 | 1831 |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1832 |
additionalBaseAddressDefinition_bc_dot_mak |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1833 |
"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
|
1834 |
Subclasses may redefine this to something like |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1835 |
LIB_BASE=$(LIBWIDG_BASE) |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1836 |
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
|
1837 |
" |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1838 |
|
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1839 |
^ nil |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1840 |
! |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1841 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1842 |
additionalDefinitions |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1843 |
"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
|
1844 |
|
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1845 |
^ '' |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1846 |
! |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1847 |
|
10306 | 1848 |
additionalDefinitions_bc_dot_mak |
1849 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 1850 |
Subclasses may redefine this." |
10306 | 1851 |
|
1852 |
^ self additionalDefinitions_nt_dot_mak |
|
1853 |
||
1854 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1855 |
! |
|
1856 |
||
9625 | 1857 |
additionalDefinitions_make_dot_proto |
1858 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
1859 |
||
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1860 |
^ self additionalDefinitions |
9625 | 1861 |
|
1862 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
1863 |
! |
|
1864 |
||
1865 |
additionalDefinitions_nt_dot_mak |
|
10306 | 1866 |
"obsolete - kept for compatibility with old project files" |
9625 | 1867 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1868 |
^ self additionalDefinitions |
9625 | 1869 |
|
1870 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1871 |
! |
|
1872 |
||
10306 | 1873 |
additionalLinkLibraries_bc_dot_mak |
1874 |
"allows for additional static libraries to be added to the bc.mak file. |
|
1875 |
Subclasses may redefine this" |
|
1876 |
||
1877 |
"backward compatibilty with old projects" |
|
1878 |
||
1879 |
^ self additionalLinkLibraries_nt_dot_mak |
|
1880 |
||
1881 |
||
1882 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1883 |
! |
|
1884 |
||
9733 | 1885 |
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
|
1886 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 1887 |
|
1888 |
^ '' |
|
1889 |
||
1890 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1891 |
! |
|
1892 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1893 |
additionalLinkLibraries_nt_dot_mak |
10306 | 1894 |
"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
|
1895 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1896 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1897 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1898 |
"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
|
1899 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1900 |
|
12028 | 1901 |
additionalRulesSvn_make_dot_proto |
1902 |
||
1903 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
1904 |
||
1905 |
^ String streamContents: |
|
12740 | 1906 |
[:s|s |
1907 |
nextPutLine:'update-svn-revision:'; |
|
1908 |
tab; nextPutLine: 'sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"''$(shell svnversion -n)''\"\$$\"/g" \'; |
|
1909 |
tab; tab; nextPutLine: (self name , '.st'); |
|
1910 |
nextPutLine: '.PHONY: update-svn-revision'] |
|
12028 | 1911 |
|
1912 |
"Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1913 |
! |
|
1914 |
||
10306 | 1915 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1916 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1917 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1918 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1919 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1920 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 1921 |
! |
1922 |
||
9625 | 1923 |
additionalRules_make_dot_proto |
1924 |
"allows for additional rules to be added to the make.proto file." |
|
1925 |
||
1926 |
^ '' |
|
1927 |
||
1928 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
1929 |
! |
|
1930 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1931 |
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
|
1932 |
"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
|
1933 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1934 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1935 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1936 |
|
12028 | 1937 |
additionalTargetsSvn_make_dot_proto |
1938 |
||
1939 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
1940 |
||
1941 |
^ 'update-svn-revision' |
|
1942 |
||
1943 |
"Created: / 24-06-2009 / 21:35:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1944 |
! |
|
1945 |
||
10306 | 1946 |
additionalTargets_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1947 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1948 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1949 |
^ '' |
10306 | 1950 |
|
1951 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
1952 |
! |
|
1953 |
||
9625 | 1954 |
additionalTargets_make_dot_proto |
1955 |
"allows for additional targets to be added to the make.proto file." |
|
1956 |
||
1957 |
^ '' |
|
1958 |
||
1959 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1960 |
! |
|
1961 |
||
10979 | 1962 |
globalDefines |
1963 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1964 |
an subprojects" |
|
1965 |
||
1966 |
^ '' |
|
1967 |
! |
|
1968 |
||
1969 |
globalDefines_unix |
|
1970 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1971 |
an subprojects" |
|
1972 |
||
1973 |
^ self globalDefines |
|
1974 |
! |
|
1975 |
||
1976 |
globalDefines_win32 |
|
1977 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1978 |
an subprojects" |
|
1979 |
||
1980 |
^ self globalDefines |
|
1981 |
! |
|
1982 |
||
10331 | 1983 |
localDefines |
10979 | 1984 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1985 |
|
1986 |
^ '' |
|
1987 |
! |
|
1988 |
||
1989 |
localDefines_unix |
|
10979 | 1990 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1991 |
|
1992 |
^ self localDefines |
|
1993 |
! |
|
1994 |
||
1995 |
localDefines_win32 |
|
10979 | 1996 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1997 |
|
1998 |
^ self localDefines |
|
1999 |
! |
|
2000 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2001 |
localIncludes |
10979 | 2002 |
"allow for the specification of additional include directories" |
9714 | 2003 |
|
2004 |
^ '' |
|
2005 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2006 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2007 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2008 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2009 |
localIncludes_unix |
10979 | 2010 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2011 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2012 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2013 |
|
9714 | 2014 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2015 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 2016 |
! |
2017 |
||
2018 |
localIncludes_win32 |
|
10979 | 2019 |
"allow for the specification of additional include directories" |
9714 | 2020 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2021 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 2022 |
|
2023 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2024 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 2025 |
! |
2026 |
||
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
|
2027 |
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
|
2028 |
"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
|
2029 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2030 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2031 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2032 |
"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
|
2033 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2034 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2035 |
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
|
2036 |
"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
|
2037 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2038 |
^ 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
|
2039 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2040 |
"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
|
2041 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2042 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2043 |
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
|
2044 |
"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
|
2045 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2046 |
^ 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
|
2047 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2048 |
"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
|
2049 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2050 |
|
9575 | 2051 |
stcOptimizationOptions |
2052 |
"see the stc reference / stc usage for options. |
|
2053 |
For now, the following variants are useful: |
|
2054 |
+optspace3 most compact code |
|
2055 |
- use for all gui, application code. |
|
2056 |
||
9714 | 2057 |
+optinline +optinline2 +inlineNew |
2058 |
fastest code |
|
9575 | 2059 |
- use only for computation-intensive classes" |
2060 |
||
2061 |
^ '+optspace3' |
|
2062 |
||
2063 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 2064 |
! |
2065 |
||
9575 | 2066 |
stcWarningOptions |
2067 |
"see the stc reference / stc usage for options. |
|
2068 |
For now, the following variants are useful: |
|
2069 |
-warn no warnings |
|
2070 |
-warnNonStandard no warnings about non-standard smalltalk features" |
|
2071 |
||
9714 | 2072 |
^ '-warnNonStandard' |
9575 | 2073 |
|
2074 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
2075 |
! ! |
|
9536 | 2076 |
|
9575 | 2077 |
!ProjectDefinition class methodsFor:'description - project information'! |
2078 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2079 |
applicationAdditionalIconFileNames |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2080 |
"Return the icon-filenames for additional icons of the application |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2081 |
(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
|
2082 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2083 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2084 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2085 |
|
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2086 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2087 |
"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
|
2088 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2089 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2090 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2091 |
|
9575 | 2092 |
companyName |
9584 | 2093 |
"Returns a company string which will appear in <lib>.rc. |
2094 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2095 |
|
11172 | 2096 |
( |
2097 |
#( |
|
2098 |
'stx' |
|
2099 |
'exept' |
|
2100 |
) includes:self module) ifTrue:[ |
|
9575 | 2101 |
^ 'eXept Software AG' |
2102 |
]. |
|
2103 |
||
2104 |
^ 'My Company' |
|
2105 |
||
9584 | 2106 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 2107 |
! |
2108 |
||
2109 |
description |
|
10306 | 2110 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 2111 |
|
9803 | 2112 |
^self productName,' ',self packageName |
2113 |
"/ ^ self name |
|
9536 | 2114 |
|
2115 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 2116 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
2117 |
! |
|
2118 |
||
2119 |
fileDescription |
|
10416 | 2120 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 2121 |
|
9803 | 2122 |
^self description |
9575 | 2123 |
|
2124 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
2125 |
! |
|
2126 |
||
2127 |
fileMajorVersionNr |
|
2128 |
"Returns a versionNumber which will appear in libName.rc" |
|
2129 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2130 |
^ self majorVersionNr |
9575 | 2131 |
|
2132 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 2133 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 2134 |
! |
2135 |
||
2136 |
fileMinorVersionNr |
|
2137 |
"Returns a versionNumber which will appear in libName.rc" |
|
2138 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2139 |
^ self minorVersionNr |
9575 | 2140 |
|
2141 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 2142 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 2143 |
! |
2144 |
||
2145 |
fileReleaseNr |
|
2146 |
"Returns a releaseNumber which will appear in libName.rc" |
|
2147 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2148 |
"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
|
2149 |
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
|
2150 |
|
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2151 |
^ self cvsRevision last upTo:$m |
9575 | 2152 |
|
2153 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
|
9817 | 2154 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
9536 | 2155 |
! |
2156 |
||
9575 | 2157 |
fileRevisionNr |
2158 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 2159 |
|
9817 | 2160 |
"take the default revision from the cvs-version" |
9618 | 2161 |
^ self cvsRevision first |
9575 | 2162 |
|
2163 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
|
9817 | 2164 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
9536 | 2165 |
! |
2166 |
||
9575 | 2167 |
fileVersion |
2168 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2169 |
||
2170 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
2171 |
||
11042 | 2172 |
^ '%1.%2.%3.%4' |
2173 |
bindWith:self fileMajorVersionNr |
|
2174 |
with:self fileMinorVersionNr |
|
2175 |
with:self fileRevisionNr |
|
2176 |
with:self fileReleaseNr. |
|
9575 | 2177 |
|
2178 |
" |
|
2179 |
self fileVersion |
|
2180 |
" |
|
2181 |
||
9817 | 2182 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 2183 |
! |
9536 | 2184 |
|
9575 | 2185 |
fileVersionCommaSeparated |
2186 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2187 |
||
9817 | 2188 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
2189 |
||
11042 | 2190 |
^ '%1,%2,%3,%4' |
2191 |
bindWith:self fileMajorVersionNr |
|
2192 |
with:self fileMinorVersionNr |
|
2193 |
with:self fileRevisionNr |
|
2194 |
with:self fileReleaseNr. |
|
9575 | 2195 |
|
2196 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 2197 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
2198 |
! |
|
2199 |
||
9575 | 2200 |
internalName |
2201 |
"Returns a name string which will appear in libName.rc" |
|
2202 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
2203 |
^ self package |
9575 | 2204 |
|
2205 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 2206 |
! |
2207 |
||
9575 | 2208 |
legalCopyright |
9584 | 2209 |
"Returns a copyright string which will appear in <lib>.rc. |
2210 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2211 |
|
2212 |
self module = 'stx' ifTrue:[ |
|
9817 | 2213 |
"hardwired-default" |
9625 | 2214 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
2215 |
bindWith:(Date today year printString) |
|
9575 | 2216 |
]. |
9817 | 2217 |
self module = 'exept' ifTrue:[ |
2218 |
"hardwired-default" |
|
2219 |
^ 'Copyright eXept Software AG 1998-%1' |
|
2220 |
bindWith:(Date today year printString) |
|
2221 |
]. |
|
9575 | 2222 |
|
2223 |
^ 'My CopyRight or CopyLeft' |
|
2224 |
||
9817 | 2225 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 2226 |
! |
2227 |
||
2228 |
majorVersionNr |
|
2229 |
"Returns a versionNumber which will appear in libName.rc" |
|
2230 |
||
2231 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2232 |
the default here takes smalltalks version number. |
|
2233 |
But thats probably not good for an end-user-app." |
|
2234 |
||
11042 | 2235 |
^ Smalltalk majorVersionNr |
9575 | 2236 |
|
2237 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 2238 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 2239 |
! |
2240 |
||
2241 |
minorVersionNr |
|
2242 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 2243 |
|
9575 | 2244 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2245 |
the default here takes smalltalks version number. |
|
2246 |
But thats probably not good for an end-user-app." |
|
2247 |
||
11042 | 2248 |
^ Smalltalk minorVersionNr |
9575 | 2249 |
|
2250 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 2251 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 2252 |
! |
2253 |
||
2254 |
productDate |
|
11043 | 2255 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 2256 |
|
2257 |
"take the current date - by default" |
|
9536 | 2258 |
|
9575 | 2259 |
^ Timestamp now printStringRFC1123Format |
2260 |
||
2261 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
2262 |
! |
|
2263 |
||
13177 | 2264 |
productDescription |
2265 |
"Returns a description (for autopackage)" |
|
2266 |
||
2267 |
^ self description |
|
2268 |
||
2269 |
"Created: / 21-12-2010 / 09:32:16 / cg" |
|
2270 |
! |
|
2271 |
||
10426 | 2272 |
productFilename |
2273 |
"Returns a filename which be used as linkname, product file name etc." |
|
2274 |
||
2275 |
^ self productNameAsValidFilename |
|
2276 |
||
2277 |
" |
|
2278 |
stx_projects_smalltalk productName |
|
2279 |
stx_projects_smalltalk productFilename |
|
2280 |
" |
|
2281 |
||
2282 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
2283 |
! |
|
2284 |
||
9898 | 2285 |
productInstallDir |
2286 |
"Returns a product default installDir which will appear in <app>.nsi." |
|
2287 |
||
2288 |
^ '$PROGRAMFILES\',self module |
|
2289 |
||
2290 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
2291 |
! |
|
2292 |
||
13177 | 2293 |
productLicense |
2294 |
"Returns the license (for autopackage)" |
|
2295 |
||
2296 |
^ 'Commercial' |
|
2297 |
||
2298 |
"Created: / 21-12-2010 / 09:31:25 / cg" |
|
2299 |
! |
|
2300 |
||
2301 |
productMaintainer |
|
2302 |
"Returns the maintainer (for autopackage)" |
|
2303 |
||
2304 |
^ self companyName |
|
2305 |
||
2306 |
"Created: / 21-12-2010 / 09:26:16 / cg" |
|
2307 |
! |
|
2308 |
||
9575 | 2309 |
productName |
9584 | 2310 |
"Returns a product name which will appear in <lib>.rc. |
2311 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2312 |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2313 |
|m| |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2314 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2315 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2316 |
m = 'stx' ifTrue:[ |
9575 | 2317 |
^ 'Smalltalk/X' |
2318 |
]. |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2319 |
m = 'exept' ifTrue:[ |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2320 |
^ 'eXept addOns' |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2321 |
]. |
10296 | 2322 |
Error handle:[:ex | |
2323 |
^ 'ProductName' |
|
2324 |
] do:[ |
|
2325 |
^ self startupClassName |
|
2326 |
]. |
|
2327 |
||
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2328 |
"Modified: / 08-11-2007 / 16:45:14 / cg" |
9536 | 2329 |
! |
2330 |
||
10426 | 2331 |
productNameAsValidFilename |
2332 |
"Returns a product name which will appear in <lib>.rc. |
|
2333 |
Under win32, this is placed into the dlls file-info" |
|
2334 |
||
2335 |
|nm| |
|
2336 |
||
2337 |
nm := self productName. |
|
2338 |
^ nm copy replaceAny:'/\:;.,' with:$_ |
|
2339 |
||
2340 |
" |
|
2341 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
2342 |
" |
|
2343 |
||
2344 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
2345 |
! |
|
2346 |
||
9898 | 2347 |
productPublisher |
2348 |
"Returns a product publisher which will appear in <app>.nsi." |
|
2349 |
||
2350 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
2351 |
^ 'eXept Software AG' |
|
2352 |
]. |
|
2353 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
2354 |
^ self companyName |
9898 | 2355 |
|
2356 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
2357 |
! |
|
2358 |
||
13177 | 2359 |
productType |
2360 |
"Returns the product type for autopackage" |
|
2361 |
||
2362 |
^ 'Application' |
|
2363 |
||
2364 |
"Created: / 21-12-2010 / 09:28:48 / cg" |
|
2365 |
! |
|
2366 |
||
9575 | 2367 |
productVersion |
11043 | 2368 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 2369 |
|
2370 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 2371 |
|
11042 | 2372 |
^ '%1.%2.%3.%4' |
2373 |
bindWith:self majorVersionNr |
|
2374 |
with:self minorVersionNr |
|
2375 |
with:self revisionNr |
|
2376 |
with:self releaseNr. |
|
9536 | 2377 |
|
9575 | 2378 |
" |
2379 |
self productVersion |
|
2380 |
" |
|
2381 |
||
9817 | 2382 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 2383 |
! |
2384 |
||
9575 | 2385 |
productVersionCommaSeparated |
2386 |
"Returns a product version which will appear in libName.rc" |
|
2387 |
||
2388 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 2389 |
|
11042 | 2390 |
^ '%1,%2,%3,%4' |
2391 |
bindWith:self majorVersionNr |
|
2392 |
with:self minorVersionNr |
|
2393 |
with:self revisionNr |
|
2394 |
with:self releaseNr. |
|
2395 |
||
2396 |
" |
|
2397 |
self productVersionCommaSeparated |
|
2398 |
" |
|
9536 | 2399 |
|
9575 | 2400 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 2401 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 2402 |
! |
2403 |
||
9898 | 2404 |
productWebSite |
2405 |
"Returns a product webSite which will appear in <app>.nsi." |
|
2406 |
||
2407 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
2408 |
^ 'http://www.exept.de' |
|
2409 |
]. |
|
2410 |
||
10426 | 2411 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 2412 |
^ 'http://www.yoursite.com' |
2413 |
||
2414 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 2415 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 2416 |
! |
2417 |
||
9575 | 2418 |
releaseNr |
2419 |
"Returns a releaseNr which will appear in libName.rc" |
|
2420 |
||
2421 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2422 |
the default here takes smalltalks version number. |
|
2423 |
But thats probably not good for an end-user-app." |
|
2424 |
||
11042 | 2425 |
^ Smalltalk releaseNr |
9536 | 2426 |
|
9575 | 2427 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 2428 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 2429 |
! |
2430 |
||
2431 |
revisionNr |
|
2432 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 2433 |
|
9575 | 2434 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2435 |
the default here takes smalltalks version number. |
|
2436 |
But thats probably not good for an end-user-app." |
|
2437 |
||
11042 | 2438 |
^ Smalltalk revisionNr |
9575 | 2439 |
|
2440 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 2441 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 2442 |
! |
2443 |
||
2444 |
versionNumber |
|
10306 | 2445 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 2446 |
|
9575 | 2447 |
^'' |
9536 | 2448 |
|
2449 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 2450 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 2451 |
! ! |
2452 |
||
9569 | 2453 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 2454 |
|
13177 | 2455 |
apspecFilename |
2456 |
^ 'autopackage/default.apspec' |
|
2457 |
||
2458 |
"Created: / 21-12-2010 / 09:43:13 / cg" |
|
2459 |
! |
|
2460 |
||
9852 | 2461 |
basicFileNamesToGenerate |
11937 | 2462 |
"answer a dictionary (filename -> generator method) with all the files, |
2463 |
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
|
2464 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2465 |
|dict| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2466 |
|
13154
bac0fcd8a888
make sure that the makefiles are generated before the libInit file
Claus Gittinger <cg@exept.de>
parents:
13148
diff
changeset
|
2467 |
dict := OrderedDictionary withKeysAndValues:#( |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2468 |
'Make.spec' #'generate_make_dot_spec' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2469 |
'Make.proto' #'generate_make_dot_proto' |
12428 | 2470 |
'Makefile' #'generate_makefile' |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2471 |
'bc.mak' #'generate_bc_dot_mak' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2472 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2473 |
'bmake.bat' #'generate_bmake_dot_mak' |
11937 | 2474 |
'vcmake.bat' #'generate_vcmake_dot_mak' |
11979 | 2475 |
'lcmake.bat' #'generate_lcmake_dot_mak' |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2476 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2477 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2478 |
dict |
13177 | 2479 |
at:self rcFilename put:#'generate_packageName_dot_rc'; |
2480 |
at:self apspecFilename put:#'generate_autopackage_default_dot_apspec'. |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2481 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2482 |
^ dict. |
13154
bac0fcd8a888
make sure that the makefiles are generated before the libInit file
Claus Gittinger <cg@exept.de>
parents:
13148
diff
changeset
|
2483 |
|
13177 | 2484 |
"Modified: / 21-12-2010 / 11:02:02 / cg" |
9852 | 2485 |
! |
2486 |
||
9536 | 2487 |
fileNamesToGenerate |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
2488 |
"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
|
2489 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2490 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2491 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2492 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2493 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2494 |
" |
9536 | 2495 |
! |
2496 |
||
9544 | 2497 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
2498 |
|pairs| |
|
2499 |
||
2500 |
pairs := OrderedCollection new. |
|
2501 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
|
2502 |
|file| |
|
2503 |
||
2504 |
file := self perform:generator. |
|
2505 |
pairs add:(Array with:fileName with:file) |
|
2506 |
]. |
|
2507 |
||
2508 |
pairs pairsDo:aTwoArgBlock |
|
2509 |
||
2510 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
2511 |
! |
|
2512 |
||
9536 | 2513 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2514 |
self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
9831 | 2515 |
|
9898 | 2516 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 2517 |
! |
2518 |
||
2519 |
generateFile:filename |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2520 |
|action| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2521 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2522 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2523 |
action notNil ifTrue:[ |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2524 |
^ self perform:action |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2525 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2526 |
(filename = 'app.rc' or:[filename = 'lib.rc']) ifTrue:[ |
9817 | 2527 |
^ self generate_packageName_dot_rc |
9607 | 2528 |
]. |
9850 | 2529 |
(filename = 'loadAll') ifTrue:[ |
2530 |
^ self generate_loadAll |
|
2531 |
]. |
|
13177 | 2532 |
(filename = 'autopackage/default.apspec' or:[filename = self apspecFilename]) ifTrue:[ |
2533 |
^ self generate_autopackage_default_dot_apspec |
|
2534 |
]. |
|
2535 |
self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
|
2536 |
||
2537 |
"Modified: / 21-12-2010 / 11:01:10 / cg" |
|
9536 | 2538 |
! |
2539 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2540 |
generateRemoveShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2541 |
"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
|
2542 |
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
|
2543 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2544 |
|firstLine| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2545 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2546 |
firstLine := true. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2547 |
self searchForClasses do:[:eachClass| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2548 |
firstLine ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2549 |
aStream nextPutAll:'cvs rm -f '. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2550 |
firstLine := false. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2551 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2552 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2553 |
aStream nextPutAll:eachClass classBaseFilename; space. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2554 |
] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2555 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2556 |
firstLine ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2557 |
aStream cr. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2558 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2559 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2560 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2561 |
stx_goodies_webServer_htmlTree generateRemoveShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2562 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2563 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2564 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2565 |
generateRenameShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2566 |
"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
|
2567 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2568 |
self searchForClasses do:[:eachClass| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2569 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2570 |
aStream nextPutAll:'cp '; |
11981
e479249ba36e
Fix #generateRenameShellScriptOn:
Stefan Vogel <sv@exept.de>
parents:
11980
diff
changeset
|
2571 |
nextPutAll:eachClass classBaseFilename; nextPutAll:',v '; |
11869
07f3ec995c05
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11868
diff
changeset
|
2572 |
nextPutAll:eachClass generateClassFilename; nextPutAll:'.st,v'; cr. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2573 |
] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2574 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2575 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2576 |
" |
11981
e479249ba36e
Fix #generateRenameShellScriptOn:
Stefan Vogel <sv@exept.de>
parents:
11980
diff
changeset
|
2577 |
stx_libdb generateRemoveShellScriptOn:Transcript |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2578 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2579 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2580 |
|
9536 | 2581 |
generate_abbrev_dot_stc |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2582 |
self checkIfClassesArePresent. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2583 |
|
9536 | 2584 |
^ String |
2585 |
streamContents:[:s | |
|
9621 | 2586 |
|addEntry| |
2587 |
||
2588 |
addEntry := |
|
2589 |
[:eachClassName | |
|
9681 | 2590 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
9621 | 2591 |
|
2592 |
s nextPutAll:eachClassName. |
|
2593 |
s nextPutAll:' '. |
|
9536 | 2594 |
|
9621 | 2595 |
cls := Smalltalk classNamed:eachClassName. |
2596 |
cls isNil ifTrue:[ |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2597 |
fn := self filenameForClass:eachClassName. |
9678 | 2598 |
s nextPutAll:fn. |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2599 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2600 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
2601 |
s nextPutAll:' '; nextPutAll:'0'. |
|
2602 |
] ifFalse:[ |
|
2603 |
wasLoaded := cls isLoaded. |
|
9714 | 2604 |
wasLoaded ifFalse:[ |
2605 |
failedToLoad := false. |
|
9681 | 2606 |
|
9714 | 2607 |
Error handle:[:ex | |
2608 |
failedToLoad := true. |
|
2609 |
] do:[ |
|
2610 |
ParserFlags |
|
2611 |
withSTCCompilation:#never |
|
2612 |
do:[ |
|
2613 |
cls autoload. |
|
2614 |
] |
|
2615 |
]. |
|
9681 | 2616 |
]. |
9584 | 2617 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2618 |
fn := self filenameForClass:cls. |
9621 | 2619 |
(fn includes:Character space) ifTrue:[ |
2620 |
s nextPutAll:fn storeString. |
|
2621 |
] ifFalse:[ |
|
2622 |
s nextPutAll:fn. |
|
2623 |
]. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2624 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2625 |
s nextPutAll: (cls category asString storeString). |
9681 | 2626 |
failedToLoad ifTrue:[ |
2627 |
s nextPutAll:' 0'. |
|
2628 |
] ifFalse:[ |
|
2629 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
|
2630 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
|
2631 |
]. |
|
9714 | 2632 |
|
9621 | 2633 |
wasLoaded ifFalse:[ |
2634 |
cls unload |
|
2635 |
] |
|
2636 |
]. |
|
2637 |
s cr. |
|
9536 | 2638 |
]. |
9615 | 2639 |
|
9621 | 2640 |
self allClassNames do:addEntry. |
2641 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
2642 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
2643 |
addEntry value:nm |
|
2644 |
]. |
|
2645 |
]. |
|
9536 | 2646 |
] |
2647 |
||
2648 |
" |
|
2649 |
DapasXProject generate_abbrev_dot_stc |
|
2650 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
2651 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
|
2652 |
" |
|
2653 |
||
2654 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2655 |
"Modified: / 20-10-2006 / 16:31:08 / cg" |
9536 | 2656 |
! |
2657 |
||
13177 | 2658 |
generate_autopackage_default_dot_apspec |
2659 |
||
2660 |
^self |
|
2661 |
replaceMappings: self autopackage_default_dot_apspec_mappings |
|
2662 |
in: self autopackage_default_dot_apspec |
|
2663 |
||
2664 |
" |
|
2665 |
stx_projects_smalltalk generate_autopackage_default_dot_apspec |
|
2666 |
" |
|
2667 |
||
2668 |
"Created: / 21-12-2010 / 09:40:04 / cg" |
|
2669 |
! |
|
2670 |
||
10306 | 2671 |
generate_bc_dot_mak |
2672 |
^ (self |
|
2673 |
replaceMappings: self bc_dot_mak_mappings |
|
2674 |
in: self bc_dot_mak) asStringCollection withTabs asString |
|
2675 |
||
2676 |
" |
|
2677 |
DapasXProject generate_bc_dot_mak |
|
2678 |
DapasX_Datenbasis generate_bc_dot_mak |
|
2679 |
" |
|
2680 |
||
2681 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
2682 |
! |
|
2683 |
||
9575 | 2684 |
generate_bmake_dot_mak |
2685 |
||
2686 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2687 |
in: self bmake_dot_mak |
|
2688 |
||
2689 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
2690 |
! |
|
2691 |
||
11979 | 2692 |
generate_lcmake_dot_mak |
2693 |
||
2694 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2695 |
in: self lcmake_dot_mak |
|
2696 |
! |
|
2697 |
||
9850 | 2698 |
generate_loadAll |
2699 |
^ String |
|
2700 |
streamContents:[:s | |
|
2701 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
|
2702 |
||
10005 | 2703 |
classNames := self compiled_classNames_common. |
9850 | 2704 |
classesLoaded := classNames |
10010 | 2705 |
collect:[:nm | Smalltalk classNamed:nm] |
9850 | 2706 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
2707 |
classNamesUnloaded := classNames |
|
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
2708 |
select:[:nm | |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
2709 |
|cls| |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
2710 |
cls := Smalltalk classNamed:nm. |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
2711 |
cls isNil or:[cls isLoaded not] |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
2712 |
]. |
9850 | 2713 |
|
2714 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
|
10010 | 2715 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
9850 | 2716 |
|
2717 |
s nextPutAll:'"/ |
|
2718 |
"/ $' , 'Header' , '$ |
|
2719 |
"/ |
|
2720 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
2721 |
"/ |
|
2722 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2723 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 2724 |
"/ |
2725 |
"/ |
|
2726 |
"/ Prerequisites: |
|
2727 |
"/ |
|
2728 |
"/ Smalltalk loadPackage:''module:directory''. |
|
2729 |
"/ Smalltalk loadPackage:''....''. |
|
2730 |
!! |
|
2731 |
||
2732 |
"{ package:''' , self package, ''' }" |
|
2733 |
!! |
|
2734 |
||
2735 |
|files| |
|
2736 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2737 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 2738 |
|
2739 |
files := #( |
|
2740 |
'. |
|
2741 |
||
2742 |
classesSorted do:[:eachClass | |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2743 |
s nextPutLine:' ''' , (self filenameForClass:eachClass), ''''. |
9850 | 2744 |
]. |
2745 |
classNamesUnloaded do:[:nm | |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2746 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
9850 | 2747 |
]. |
2748 |
||
2749 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
|
2750 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2751 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
9850 | 2752 |
]. |
2753 |
]. |
|
2754 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
2755 |
self hasExtensionMethods ifTrue:[ |
9850 | 2756 |
s nextPutLine:' ''extensions.st'''. |
2757 |
]. |
|
2758 |
||
2759 |
s nextPutAll:' |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2760 |
). |
9850 | 2761 |
|
2762 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2763 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 2764 |
|handle loaded| |
2765 |
||
2766 |
handle := ObjectFileLoader loadedObjectHandles |
|
2767 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
|
2768 |
handle ifNotNil:[ |
|
2769 |
loaded := Set new:(handle classes size). |
|
10080 | 2770 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2771 |
files := files \ loaded. |
9850 | 2772 |
]. |
2773 |
]. |
|
2774 |
||
2775 |
"/ 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
|
2776 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2777 |
'''' infoPrintCR. |
9850 | 2778 |
files do:[:f | |
2779 |
''.'' infoPrint. |
|
2780 |
f asFilename exists ifTrue:[ |
|
2781 |
Smalltalk fileIn:f. |
|
2782 |
] ifFalse:[ |
|
2783 |
Smalltalk fileIn:(''source/'' , f) |
|
2784 |
] |
|
2785 |
]. |
|
2786 |
'' '' infoPrintCR. |
|
2787 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2788 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 2789 |
'. |
2790 |
]. |
|
2791 |
||
2792 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 2793 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 2794 |
! |
2795 |
||
9536 | 2796 |
generate_make_dot_proto |
2797 |
||
9733 | 2798 |
^ (self |
2799 |
replaceMappings: self make_dot_proto_mappings |
|
2800 |
in: self make_dot_proto) asStringCollection withTabs asString |
|
9536 | 2801 |
|
9733 | 2802 |
" |
12428 | 2803 |
stx_libbasic2 generate_make_dot_proto |
9733 | 2804 |
" |
9536 | 2805 |
|
2806 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
2807 |
! |
|
2808 |
||
2809 |
generate_make_dot_spec |
|
9733 | 2810 |
^ (self |
2811 |
replaceMappings: self make_dot_spec_mappings |
|
2812 |
in: self make_dot_spec) asStringCollection withTabs asString |
|
9536 | 2813 |
|
9733 | 2814 |
" |
2815 |
DapasXProject generate_make_dot_spec |
|
2816 |
DapasX_Datenbasis generate_make_dot_spec |
|
2817 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
2818 |
" |
|
9536 | 2819 |
|
2820 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
2821 |
! |
|
2822 |
||
12428 | 2823 |
generate_makefile |
2824 |
||
2825 |
^ (self |
|
2826 |
replaceMappings: self makefile_mappings |
|
2827 |
in: self makefile) asStringCollection withTabs asString |
|
2828 |
||
2829 |
" |
|
2830 |
stx_libbasic2 generate_makefile |
|
2831 |
" |
|
2832 |
! |
|
2833 |
||
9536 | 2834 |
generate_packageName_dot_rc |
2835 |
||
2836 |
^self replaceMappings: self packageName_dot_rc_mappings |
|
2837 |
in: self packageName_dot_rc |
|
2838 |
||
2839 |
" |
|
2840 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
2841 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 2842 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 2843 |
stx_libwidg3 generate_packageName_dot_rc |
2844 |
stx_libwidg3 productVersion |
|
9536 | 2845 |
|
2846 |
" |
|
2847 |
||
2848 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 2849 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 2850 |
! |
2851 |
||
10306 | 2852 |
generate_vc_dot_def |
2853 |
||
2854 |
^self replaceMappings: self vc_dot_def_mappings |
|
2855 |
in: self vc_dot_def |
|
2856 |
||
2857 |
" |
|
2858 |
DapasXProject generate_vc_dot_def |
|
2859 |
DapasX_Datenbasis generate_vc_dot_def |
|
2860 |
||
2861 |
" |
|
2862 |
||
2863 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
2864 |
! |
|
2865 |
||
11937 | 2866 |
generate_vcmake_dot_mak |
2867 |
||
2868 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2869 |
in: self vcmake_dot_mak |
|
2870 |
! |
|
2871 |
||
9852 | 2872 |
protectedFileNames |
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
2873 |
"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
|
2874 |
- redefine this to protect a hand-written Make.proto or other handwritten support files" |
9852 | 2875 |
|
2876 |
^ #() |
|
2877 |
||
2878 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
2879 |
"Modified: / 21-12-2010 / 11:36:46 / cg" |
9852 | 2880 |
! |
2881 |
||
9831 | 2882 |
rcFilename |
2883 |
^ self packageName,'.rc'. |
|
2884 |
||
2885 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 2886 |
! ! |
2887 |
||
12364 | 2888 |
!ProjectDefinition class methodsFor:'file mappings'! |
9536 | 2889 |
|
13177 | 2890 |
autopackage_default_dot_apspec_mappings |
2891 |
|mappings| |
|
2892 |
||
2893 |
mappings := Dictionary new. |
|
2894 |
||
2895 |
mappings |
|
2896 |
"/ at: 'TOP' put: ( self pathToTop_unix ); |
|
2897 |
"/ at: 'NSI_FILENAME' put: self nsiFilename ; |
|
2898 |
at: 'DESCRIPTION' put: (self description); |
|
2899 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
2900 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
2901 |
at: 'PRODUCT_PUBLISHER' put: (self productPublisher); |
|
2902 |
at: 'PRODUCT_WEBSITE' put: (self productWebSite); |
|
2903 |
at: 'PRODUCT_INSTALLDIR' put: (self productInstallDir); |
|
2904 |
at: 'PRODUCT_TYPE' put: (self productType); |
|
2905 |
at: 'PRODUCT_LICENSE' put: (self productLicense); |
|
2906 |
at: 'PRODUCT_DESCRIPTION' put: (self productDescription); |
|
2907 |
at: 'MAINTAINER' put: (self productMaintainer); |
|
2908 |
at: 'PACKAGER' put: (self productPublisher); |
|
2909 |
"/ at: 'STARTUP_CLASS' put: (self startupClassName); |
|
2910 |
"/ at: 'STARTUP_SELECTOR' put: (self startupSelector); |
|
2911 |
"/ at: 'MAIN_DEFINES' put: (self mainDefines); |
|
2912 |
"/ at: 'REQUIRED_LIBS' put: (self generateRequiredLibs_make_dot_proto); |
|
2913 |
"/ at: 'PREREQUISITES_LIBS' put: (self generatePreRequisiteLines_make_dot_proto); |
|
2914 |
"/ at: 'SUBPROJECTS_LIBS' put: (self generateSubProjectLines_make_dot_proto); |
|
2915 |
"/ at: 'REQUIRED_LIBOBJS' put: (self generateRequiredLibobjs_make_dot_proto); |
|
2916 |
"/ at: 'REQUIRED_LINK_LIBOBJS' put: (self generateRequiredLinkLibobjs_make_dot_proto); |
|
2917 |
"/ at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
|
2918 |
"/ at: 'SUBPROJECTS_LIBS' put: (self generateSubProjectLines_make_dot_proto ); |
|
2919 |
"/ at: 'BUILD_TARGET' put: (self buildTarget ); |
|
2920 |
yourself. |
|
2921 |
||
2922 |
"/ self offerSmalltalkSourceCode ifTrue:[ |
|
2923 |
"/ mappings |
|
2924 |
"/ at: 'STX_SOURCE_RULES' put: ( self replaceMappings: mappings |
|
2925 |
"/ in: self make_dot_proto_stx_source_rules). |
|
2926 |
"/ ]. |
|
2927 |
||
2928 |
"/ self offerApplicationSourceCode ifTrue:[ |
|
2929 |
"/ mappings |
|
2930 |
"/ at: 'SOURCE_RULES' put:( self replaceMappings: mappings |
|
2931 |
"/ in: self make_dot_proto_app_source_rules ). |
|
2932 |
"/ ]. |
|
2933 |
||
2934 |
"/ self needResources ifTrue:[ |
|
2935 |
"/ mappings |
|
2936 |
"/ at: 'REQUIRED_SUPPORT_DIRS' put: 'RESOURCEFILES'; |
|
2937 |
"/ at: 'RESOURCE_RULES' put:( self replaceMappings: mappings |
|
2938 |
"/ in: self make_dot_proto_resource_rules ); |
|
2939 |
"/ at: 'STX_RESOURCE_RULES' put: ( self replaceMappings: mappings |
|
2940 |
"/ in: self make_dot_proto_stx_resource_rules); |
|
2941 |
"/ at: 'ADDITIONAL_RESOURCE_TARGETS' put:( self additionalResourceTargets asStringWith:' '); |
|
2942 |
"/ yourself. |
|
2943 |
"/ ]. |
|
2944 |
||
2945 |
^ mappings |
|
2946 |
||
2947 |
"Created: / 21-12-2010 / 09:00:49 / cg" |
|
2948 |
"Modified: / 21-12-2010 / 11:14:41 / cg" |
|
2949 |
! |
|
2950 |
||
10306 | 2951 |
bc_dot_mak_mappings |
2952 |
|d| |
|
2953 |
||
2954 |
d := Dictionary new. |
|
2955 |
d |
|
2956 |
at: 'TAB' put: ( Character tab asString ); |
|
2957 |
at: 'TOP' put: ( self pathToTop_win32 ); |
|
2958 |
at: 'MODULE' put: ( self module ); |
|
2959 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2960 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ); |
|
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
|
2961 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
13148
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2962 |
at: 'ADDITIONAL_BASE_ADDRESS_DEFINITION' put: (self additionalBaseAddressDefinition_bc_dot_mak ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2963 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2964 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2965 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2966 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2967 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32 ? ''); |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2968 |
at: 'LOCAL_DEFINES' put: self localDefines_win32 ? ''; |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2969 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32 ? ''; |
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2970 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_bc_dot_mak ? ''). |
10306 | 2971 |
^ d |
2972 |
||
2973 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
13148
5057819fd8aa
changed: #bc_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
13118
diff
changeset
|
2974 |
"Modified: / 24-11-2010 / 20:15:05 / cg" |
10306 | 2975 |
! |
2976 |
||
9627 | 2977 |
bmake_dot_mak_mappings |
2978 |
^ (Dictionary new) |
|
9887 | 2979 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
11937 | 2980 |
at:'SUBPROJECT_VCMAKE_CALLS' put:(self subProjectVCmakeCalls); |
11979 | 2981 |
at:'SUBPROJECT_LCMAKE_CALLS' put:(self subProjectLCmakeCalls); |
9627 | 2982 |
yourself |
2983 |
||
2984 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
9887 | 2985 |
"Modified: / 14-09-2006 / 18:55:33 / cg" |
9575 | 2986 |
! |
2987 |
||
12545 | 2988 |
classLine_mappings:aClassName |
2989 |
^ Dictionary new |
|
2990 |
at:'CLASS' put:(self st2c:aClassName); |
|
2991 |
yourself |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2992 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2993 |
"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
|
2994 |
"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
|
2995 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2996 |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2997 |
make_dot_proto_mappings |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2998 |
^ Dictionary new |
12740 | 2999 |
at: 'TAB' put: ( Character tab asString ); |
3000 |
at: 'TOP' put: ( self pathToTop_unix ); |
|
3001 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
|
3002 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
|
3003 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
|
3004 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
|
3005 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix; |
|
3006 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
|
3007 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
|
3008 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto); |
|
3009 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto); |
|
3010 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto); |
|
3011 |
at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto); |
|
3012 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto); |
|
3013 |
at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto); |
|
3014 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto); |
|
3015 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto); |
|
3016 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
|
3017 |
at: 'MODULE' put: ( self module ); |
|
3018 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
3019 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
|
3020 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_make_dot_proto); |
|
3021 |
yourself |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3022 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3023 |
"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
|
3024 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3025 |
"Modified: / 14-09-2006 / 18:57:52 / cg" |
12028 | 3026 |
"Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
3027 |
"Modified: / 22-08-2009 / 12:03:25 / 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
|
3028 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3029 |
|
9627 | 3030 |
make_dot_spec_mappings |
3031 |
^ Dictionary new |
|
9887 | 3032 |
at: 'TAB' put: ( Character tab asString ); |
3033 |
at: 'MODULE' put: ( self module ); |
|
3034 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
3035 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
|
3036 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
|
12545 | 3037 |
at: 'CLASSES' put: [self generateClasses_make_dot_spec]; |
9887 | 3038 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
9627 | 3039 |
yourself |
3040 |
||
3041 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
9887 | 3042 |
"Modified: / 14-09-2006 / 18:51:24 / cg" |
9575 | 3043 |
! |
3044 |
||
12428 | 3045 |
makefile_mappings |
3046 |
^ Dictionary new |
|
3047 |
yourself |
|
3048 |
! |
|
3049 |
||
9627 | 3050 |
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
|
3051 |
|d s resourceCount| |
9627 | 3052 |
|
9630 | 3053 |
d := Dictionary new. |
3054 |
d |
|
9887 | 3055 |
at: 'PRODUCT_NAME' put: (self productName); |
3056 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
3057 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
3058 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
|
3059 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
|
3060 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
|
3061 |
||
3062 |
at: 'COMPANY_NAME' put: (self companyName); |
|
3063 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
|
3064 |
at: 'FILE_VERSION' put: (self fileVersion); |
|
3065 |
at: 'INTERNAL_NAME' put: (self internalName). |
|
11377 | 3066 |
|
9630 | 3067 |
s := self legalCopyright. |
3068 |
s notNil ifTrue:[ |
|
11377 | 3069 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 3070 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3071 |
s := String streamContents:[:stream| |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3072 |
s := self applicationIconFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3073 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3074 |
'IDR_MAINFRAME ICON DISCARDABLE "%1.ico"' |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3075 |
expandPlaceholdersWith:(Array with:s) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3076 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3077 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3078 |
s := self splashFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3079 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3080 |
'IDR_SPLASH BITMAP DISCARDABLE "%1.bmp"' |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3081 |
expandPlaceholdersWith:(Array with:s) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3082 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3083 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3084 |
resourceCount := 2. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3085 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
11613 | 3086 |
'IDR_MAINFRAME+%1 ICON DISCARDABLE "%2"' |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3087 |
expandPlaceholdersWith:(Array with:resourceCount with:eachFilename) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3088 |
stream cr. |
11614
700a73103ea1
Wrong increament in additional icons
Stefan Vogel <sv@exept.de>
parents:
11613
diff
changeset
|
3089 |
resourceCount := resourceCount+1. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3090 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3091 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3092 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 3093 |
|
9630 | 3094 |
^ d |
9627 | 3095 |
|
3096 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
9887 | 3097 |
"Modified: / 14-09-2006 / 18:52:37 / cg" |
9536 | 3098 |
! |
3099 |
||
9627 | 3100 |
replaceMappings: mappings in: fileTemplate |
9733 | 3101 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 3102 |
|
9733 | 3103 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 3104 |
|
9733 | 3105 |
" |
3106 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
|
3107 |
" |
|
9627 | 3108 |
|
3109 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
3110 |
"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
|
3111 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3112 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3113 |
st2c:aString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3114 |
^ (aString asString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3115 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3116 |
replaceAny:':' with:$_ |
9536 | 3117 |
! ! |
3118 |
||
12364 | 3119 |
!ProjectDefinition class methodsFor:'file mappings support'! |
9817 | 3120 |
|
12545 | 3121 |
classNamesByCategory |
3122 |
"answer a dictionary |
|
3123 |
category -> classNames topological sorted" |
|
3124 |
||
3125 |
|pivateClassesOf sorter classes classNames mapping| |
|
3126 |
||
3127 |
mapping := Dictionary new. |
|
3128 |
||
3129 |
classes := self compiled_classes_common. |
|
3130 |
pivateClassesOf := IdentityDictionary new. |
|
3131 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
3132 |
||
3133 |
sorter := [:a :b | |
|
3134 |
"/ a must come before b iff: |
|
3135 |
"/ b is a subclass of a |
|
3136 |
"/ b has a private class which is a subclass of a |
|
3137 |
"/ a is a sharedPool, used by b |
|
3138 |
||
3139 |
|mustComeBefore pivateClassesOfB| |
|
3140 |
||
3141 |
mustComeBefore := false. |
|
13216 | 3142 |
mustComeBefore := (a isSharedPool and:[(b sharedPoolNames includes: a name)]). |
12545 | 3143 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
3144 |
mustComeBefore ifFalse:[ |
|
3145 |
pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ]. |
|
3146 |
pivateClassesOfB do:[:eachClassInB | |
|
3147 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
3148 |
]. |
|
3149 |
]. |
|
3150 |
mustComeBefore |
|
3151 |
]. |
|
3152 |
||
3153 |
classes topologicalSort:sorter. |
|
3154 |
||
3155 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
3156 |
|prefix depClasses depClassNames| |
|
3157 |
||
3158 |
prefix := platformID asUppercase. |
|
3159 |
depClasses := self compiled_classesForArchitecture:platformID. |
|
3160 |
depClasses notEmpty ifTrue:[ |
|
3161 |
(depClasses includes:nil) ifTrue:[ |
|
3162 |
(Dialog confirm:'Dependencies are not in order (some classes are not present).\\Continue anyway ?' withCRs) |
|
3163 |
ifFalse:[ |
|
3164 |
AbortOperationRequest raise. |
|
3165 |
]. |
|
3166 |
depClassNames := self compiled_classNamesForPlatform:platformID. |
|
3167 |
] ifFalse:[ |
|
3168 |
depClasses topologicalSort:sorter. |
|
3169 |
depClassNames := depClasses collect:[:eachClass| eachClass name]. |
|
3170 |
]. |
|
3171 |
mapping at:prefix put:depClassNames. |
|
3172 |
]. |
|
3173 |
||
3174 |
classNames := classes collect:[:eachClass| eachClass name]. |
|
3175 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3176 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
3177 |
classNames add:nm. |
|
3178 |
]. |
|
3179 |
]. |
|
3180 |
||
3181 |
mapping at:'COMMON' put:classNames. |
|
3182 |
]. |
|
3183 |
^ mapping |
|
3184 |
||
3185 |
" |
|
3186 |
stx_libbasic classNamesByCategory |
|
3187 |
stx_libbasic3 classNamesByCategory |
|
3188 |
stx_libview classNamesByCategory |
|
3189 |
" |
|
3190 |
||
3191 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
13216 | 3192 |
"Modified: / 18-01-2011 / 17:58:29 / cg" |
12545 | 3193 |
! |
3194 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3195 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3196 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3197 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3198 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3199 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3200 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3201 |
filenameForClass:classNameOrClass |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3202 |
"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
|
3203 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3204 |
"/ "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
|
3205 |
"/ See also: #generateRemoveShellScriptOn: and #generateRenamShellScriptOn:" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3206 |
"/ classNameOrClass isBehavior ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3207 |
"/ ^ classNameOrClass generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3208 |
"/ ] ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3209 |
"/ |cls| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3210 |
"/ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3211 |
"/ cls := Smalltalk classNamed:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3212 |
"/ cls notNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3213 |
"/ ^ cls generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3214 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3215 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3216 |
"/ "end special code" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3217 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3218 |
^ Smalltalk fileNameForClass:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3219 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3220 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3221 |
self filenameForClass:HTML::Encoder |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3222 |
Smalltalk fileNameForClass:HTML::Encoder |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3223 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3224 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3225 |
"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
|
3226 |
"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
|
3227 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3228 |
|
10005 | 3229 |
generateClassLines:classLineTemplate |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3230 |
"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
|
3231 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3232 |
^ 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
|
3233 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3234 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3235 |
generateClassLines:classLineTemplate forClasses:classNames |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3236 |
"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
|
3237 |
|
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3238 |
^ self generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:true |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3239 |
! |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3240 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3241 |
generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:includeAdditionalClasses |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3242 |
"for the init-file: generate class-init-lines for a collection of classes" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3243 |
|
10005 | 3244 |
^ String |
3245 |
streamContents:[:s | |
|
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3246 |
|classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
10005 | 3247 |
|
3248 |
putLineForClassName := [:className | |
|
3249 |
|newClassLine mappings| |
|
3250 |
||
3251 |
mappings := self classLine_mappings:className. |
|
3252 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
|
3253 |
s nextPutLine:newClassLine |
|
3254 |
]. |
|
10010 | 3255 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
3256 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
|
10005 | 3257 |
classNamesUnloaded := classNames |
3258 |
select:[:nm | |
|
3259 |
|cls| |
|
3260 |
||
3261 |
cls := Smalltalk classNamed:nm. |
|
3262 |
cls isNil or:[ cls isLoaded not ] |
|
3263 |
]. |
|
10010 | 3264 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
10005 | 3265 |
classNamesSorted do:putLineForClassName. |
3266 |
classNamesUnloaded do:putLineForClassName. |
|
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3267 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3268 |
includeAdditionalClasses ifTrue:[ |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3269 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3270 |
do:[:nm :attr | |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3271 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3272 |
putLineForClassName value:nm. |
10005 | 3273 |
]. |
3274 |
]. |
|
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3275 |
#( ('UNIX' unix) |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3276 |
('WIN32' win32) |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3277 |
('VMS' vms) |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3278 |
('BEOS' beos) ) |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3279 |
pairsDo:[:ifdef :platformName | |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3280 |
|archClassNames archClassesLoaded| |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3281 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3282 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3283 |
archClassNames notEmpty ifTrue:[ |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3284 |
s nextPutLine:'#ifdef ' , ifdef. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3285 |
archClassNames do:[:clsName | |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3286 |
putLineForClassName value:clsName |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3287 |
]. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3288 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3289 |
]. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3290 |
]. |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3291 |
] |
10005 | 3292 |
] |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3293 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3294 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3295 |
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
|
3296 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 3297 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
3298 |
" |
|
3299 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3300 |
"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
|
3301 |
"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
|
3302 |
"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
|
3303 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3304 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3305 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3306 |
^ 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
|
3307 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3308 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3309 |
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
|
3310 |
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
|
3311 |
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
|
3312 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3313 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3314 |
"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
|
3315 |
"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
|
3316 |
"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
|
3317 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3318 |
|
12545 | 3319 |
generateClasses_make_dot_spec |
3320 |
|classNamesDict| |
|
3321 |
||
3322 |
classNamesDict := self classNamesByCategory. |
|
3323 |
||
3324 |
^ String streamContents:[:s | |
|
3325 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
|
3326 |
s nextPutLine:eachCategory,'_CLASSES= \'. |
|
3327 |
classNames do:[:eachClassName| |
|
3328 |
s tab; nextPutAll:eachClassName; nextPutLine:' \'. |
|
3329 |
]. |
|
3330 |
s cr. |
|
3331 |
]. |
|
3332 |
s cr. |
|
3333 |
]. |
|
3334 |
||
3335 |
" |
|
3336 |
stx_libbasic generateClasses_make_dot_spec |
|
3337 |
stx_libbasic3 generateClasses_make_dot_spec |
|
3338 |
stx_libview generateClasses_make_dot_spec |
|
3339 |
stx_libboss generateClasses_make_dot_spec |
|
3340 |
" |
|
3341 |
||
3342 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
3343 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
|
3344 |
! |
|
3345 |
||
10005 | 3346 |
generateDependencies:whichArchitecture |
3347 |
^ String |
|
3348 |
streamContents:[:s | |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3349 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3350 |
putDependencyForClassBaseNameBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3351 |
archClassNames archClassesPresent archClassesLoaded |
10368 | 3352 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock| |
3353 |
||
3354 |
putSingleClassDependencyEntryBlock := [:cls | |
|
10005 | 3355 |
|sclsBaseName| |
3356 |
||
3357 |
s nextPutAll:' $(INCLUDE_TOP)'. |
|
3358 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3359 |
sclsBaseName := self filenameForClass:cls. |
10005 | 3360 |
s nextPutAll:(self |
3361 |
topRelativePathTo:sclsBaseName |
|
3362 |
inPackage:cls package |
|
3363 |
architecture:whichArchitecture). |
|
3364 |
s nextPutAll:'.$(H)'. |
|
9887 | 3365 |
]. |
10144 | 3366 |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3367 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
10005 | 3368 |
s nextPutAll:'$(OUTDIR)'. |
3369 |
s nextPutAll:clsBaseName. |
|
3370 |
s nextPutAll:'.$(O)'. |
|
3371 |
s nextPutAll:' '. |
|
3372 |
s nextPutAll:clsBaseName. |
|
3373 |
s nextPutAll:'.$(H)'. |
|
3374 |
s nextPutAll:': '. |
|
3375 |
s nextPutAll:clsBaseName. |
|
3376 |
s nextPutAll:'.st'. |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3377 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3378 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3379 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3380 |
putDependencyForClassBlock := [:cls | |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3381 |
|clsBaseName already| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3382 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3383 |
clsBaseName := self filenameForClass:cls. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3384 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
10144 | 3385 |
cls isLoaded ifTrue:[ |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3386 |
already := IdentitySet new. |
10144 | 3387 |
cls |
3388 |
allSuperclassesDo:[:scls | |
|
10368 | 3389 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 3390 |
already add:scls. |
3391 |
]. |
|
3392 |
cls |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
3393 |
allPrivateClassesDo:[:eachPrivateClass | |
10144 | 3394 |
eachPrivateClass |
3395 |
allSuperclassesDo:[:scls | |
|
3396 |
|sclsBaseName| |
|
3397 |
||
3398 |
scls ~~ cls ifTrue:[ |
|
3399 |
scls isPrivate ifFalse:[ |
|
3400 |
(already includes:scls) ifFalse:[ |
|
10368 | 3401 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 3402 |
already add:scls. |
3403 |
]. |
|
10005 | 3404 |
]. |
3405 |
]. |
|
10144 | 3406 |
] |
3407 |
]. |
|
3408 |
]. |
|
3409 |
s nextPutLine:' $(STCHDR)'. |
|
9887 | 3410 |
]. |
10144 | 3411 |
|
10368 | 3412 |
putDependencyForExtensionsBlock := [ |
10005 | 3413 |
|already| |
3414 |
||
3415 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
|
3416 |
already := Set new. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3417 |
self extensionMethodNames pairWiseDo:[:className :selector | |
10005 | 3418 |
|mthdCls cls| |
3419 |
||
3420 |
((mthdCls := Smalltalk classNamed:className) notNil |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3421 |
and:[ mthdCls isLoaded ]) |
10005 | 3422 |
ifTrue:[ |
3423 |
cls := mthdCls theNonMetaclass. |
|
3424 |
(already includes:cls) ifFalse:[ |
|
3425 |
cls |
|
10063 | 3426 |
withAllSuperclassesDo:[:scls | |
10005 | 3427 |
(already includes:scls) ifFalse:[ |
10368 | 3428 |
putSingleClassDependencyEntryBlock value:scls. |
10005 | 3429 |
already add:scls. |
3430 |
]. |
|
3431 |
]. |
|
3432 |
]. |
|
3433 |
]. |
|
9887 | 3434 |
]. |
10144 | 3435 |
s nextPutLine:' $(STCHDR)'. |
10005 | 3436 |
]. |
10144 | 3437 |
|
10005 | 3438 |
classNames := self compiled_classNames_common. |
10144 | 3439 |
classesPresent := classNames |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3440 |
collect:[:className | Smalltalk classNamed:className] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3441 |
thenSelect:[:cls | cls notNil]. |
10144 | 3442 |
classesLoaded := classesPresent |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3443 |
select:[:cls | cls isLoaded]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3444 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3445 |
(Class classesSortedByLoadOrder:classesLoaded) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3446 |
do:putDependencyForClassBlock. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3447 |
(classesPresent select:[:cls | cls isLoaded not]) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3448 |
do:putDependencyForClassBlock. |
10144 | 3449 |
|
10005 | 3450 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
3451 |
do:[:className :attr | |
|
3452 |
|cls| |
|
3453 |
||
3454 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3455 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
10368 | 3456 |
putDependencyForClassBlock value:cls. |
10005 | 3457 |
] |
9887 | 3458 |
]. |
3459 |
]. |
|
10005 | 3460 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3461 |
archClassesPresent := archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3462 |
collect:[:className | Smalltalk classNamed:className] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3463 |
thenSelect:[:cls | cls notNil]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3464 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3465 |
archClassesLoaded := archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3466 |
select:[:cls | cls isLoaded]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3467 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3468 |
(Class classesSortedByLoadOrder:archClassesLoaded) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3469 |
do:putDependencyForClassBlock. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3470 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3471 |
"some classes are not loaded - probably this is the wrong architecture. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3472 |
Sorry, but for these classes, we do not know the superclass chain" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3473 |
archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3474 |
select:[:cls | cls isLoaded not] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3475 |
thenDo:putDependencyForClassBlock. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3476 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3477 |
"for the following classes, we do not know the superclass chain |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3478 |
and neither the real class file name" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3479 |
archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3480 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3481 |
thenDo:[:eachClassName | |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3482 |
putDependencyForClassBaseNameBlock value:(self filenameForClass:eachClassName). |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3483 |
s nextPutLine:' $(STCHDR)'. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3484 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3485 |
|
10368 | 3486 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
10005 | 3487 |
] |
9887 | 3488 |
|
3489 |
" |
|
3490 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 3491 |
stx_libbasic3 generateDependencies:#win32 |
3492 |
" |
|
3493 |
||
9887 | 3494 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
10144 | 3495 |
"Modified: / 25-10-2006 / 16:01:13 / cg" |
9887 | 3496 |
! |
3497 |
||
3498 |
generateDependencies_unix |
|
3499 |
^ self generateDependencies:#unix |
|
3500 |
||
3501 |
" |
|
3502 |
stx_libbasic3 generateDependencies:#unix |
|
3503 |
stx_libbasic3 generateDependencies:#win32 |
|
3504 |
" |
|
3505 |
||
3506 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
3507 |
! |
|
3508 |
||
3509 |
generateDependencies_win32 |
|
3510 |
^ self generateDependencies:#win32 |
|
3511 |
||
3512 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
3513 |
! |
|
3514 |
||
9956 | 3515 |
generateLocalIncludes_unix |
3516 |
^ String streamContents:[:s | |
|
3517 |
s nextPutAll:(self localIncludes_unix). |
|
3518 |
self searchForProjectsWhichProvideHeaderFiles |
|
3519 |
do:[:includeProject | |
|
3520 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
|
3521 |
] |
|
3522 |
] |
|
3523 |
||
3524 |
" |
|
3525 |
bosch_dapasx generateLocalIncludes_unix |
|
3526 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
|
3527 |
stx_libbasic generateLocalIncludes_unix |
|
3528 |
stx_libview generateLocalIncludes_unix |
|
3529 |
stx_libtool2 generateLocalIncludes_unix |
|
3530 |
stx_libui generateLocalIncludes_unix |
|
3531 |
" |
|
3532 |
||
3533 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3534 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
9956 | 3535 |
! |
3536 |
||
9887 | 3537 |
generateLocalIncludes_win32 |
3538 |
^ String streamContents:[:s | |
|
3539 |
s nextPutAll:(self localIncludes_win32). |
|
3540 |
self searchForProjectsWhichProvideHeaderFiles |
|
3541 |
do:[:includeProject | |
|
3542 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
|
3543 |
] |
|
3544 |
] |
|
3545 |
||
3546 |
" |
|
3547 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
3548 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
|
3549 |
stx_libbasic generateLocalIncludes_win32 |
|
3550 |
stx_libview generateLocalIncludes_win32 |
|
3551 |
stx_libtool2 generateLocalIncludes_win32 |
|
3552 |
" |
|
3553 |
||
3554 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3555 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
9887 | 3556 |
! |
3557 |
||
9817 | 3558 |
generateObjects_make_dot_spec |
12545 | 3559 |
|classNamesDict| |
3560 |
||
3561 |
classNamesDict := self classNamesByCategory. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3562 |
|
9817 | 3563 |
^ String streamContents:[:s | |
12545 | 3564 |
|putLineForClassName| |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3565 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3566 |
putLineForClassName := |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3567 |
[:eachClassName | |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3568 |
|mappings newObjectLine| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3569 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3570 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3571 |
s nextPutLine:newObjectLine. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3572 |
]. |
9817 | 3573 |
|
12545 | 3574 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
3575 |
s nextPutLine:eachCategory,'_OBJS= \'. |
|
3576 |
classNames do:putLineForClassName. |
|
3577 |
(eachCategory = 'COMMON' and:[self hasExtensionMethods]) ifTrue:[ |
|
3578 |
s nextPutLine:' $(OUTDIR)extensions.$(O) \'. |
|
9817 | 3579 |
]. |
3580 |
||
12545 | 3581 |
s cr. |
9850 | 3582 |
]. |
9817 | 3583 |
s cr. |
12545 | 3584 |
]. |
9817 | 3585 |
|
3586 |
" |
|
12545 | 3587 |
stx_libbasic generateObjects_make_dot_spec |
9817 | 3588 |
stx_libbasic3 generateObjects_make_dot_spec |
12545 | 3589 |
stx_libview generateObjects_make_dot_spec |
3590 |
stx_libboss generateObjects_make_dot_spec |
|
9817 | 3591 |
" |
3592 |
||
3593 |
"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
|
3594 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 3595 |
! |
3596 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3597 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3598 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3599 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3600 |
^ String streamContents:[:s | |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3601 |
myProjectId := self package. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3602 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3603 |
is required!! |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3604 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3605 |
'popd' is not needed, since each line is executed in |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3606 |
an own cmd.exe process. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3607 |
'popd' is not desireable, since it masks a possible |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3608 |
error return from the 'bmake'. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3609 |
" |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3610 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:eachProjectId | |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3611 |
s tab; nextPutAll:'pushd '; |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3612 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
12039 | 3613 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3614 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3615 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3616 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3617 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3618 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3619 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3620 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3621 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3622 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3623 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3624 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3625 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3626 |
^ String streamContents:[:s | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3627 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:projectID | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3628 |
libPath := self pathToPackage_unix:projectID. |
11777
000651e1db46
Add GLOBALDEFINE in prereq lines
Stefan Vogel <sv@exept.de>
parents:
11752
diff
changeset
|
3629 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"'. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3630 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3631 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3632 |
s cr. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3633 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3634 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3635 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3636 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3637 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3638 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3639 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3640 |
|
10022 | 3641 |
generateSubDirectories |
3642 |
^ String streamContents:[:s | |
|
3643 |
self subProjects |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3644 |
do:[:eachProjectID | |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3645 |
s space; nextPutAll:(self unixPathToPackage:eachProjectID from:self package) |
10022 | 3646 |
] |
3647 |
] |
|
3648 |
||
3649 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3650 |
exept_expecco generateSubDirectories |
10022 | 3651 |
" |
3652 |
||
3653 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
3654 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
3655 |
! |
|
3656 |
||
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3657 |
generate_definitionClassLine_libInit_dot_cc |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3658 |
"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
|
3659 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3660 |
^ self |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3661 |
generateClassLines:(self classLine_libInit_dot_cc) |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3662 |
forClasses:(Array with:self name) |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3663 |
includeAdditionalClasses:false |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3664 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3665 |
" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3666 |
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
|
3667 |
" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3668 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3669 |
|
10022 | 3670 |
headerFileOutputArg |
3671 |
"/ "all stx stuff goes to the common include directory. |
|
3672 |
"/ Everything else is left locally" |
|
3673 |
"/ |
|
3674 |
"/ ( |
|
3675 |
"/ #( |
|
3676 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
3677 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
3678 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
3679 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
3680 |
"/ 'stx:libboss' 'stx:libdb' |
|
3681 |
"/ ) |
|
3682 |
"/ includes:self package) ifTrue:[ |
|
3683 |
"/ ^ '-H$(INCLUDE)' |
|
3684 |
"/ ]. |
|
3685 |
^ '-H.' |
|
3686 |
||
3687 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
3688 |
"Modified: / 14-09-2006 / 15:38:25 / cg" |
|
3689 |
! |
|
3690 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3691 |
objectLine_make_dot_spec_mappings: aClassName |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3692 |
^ Dictionary new |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3693 |
at: 'CLASSFILE' put:(self filenameForClass:aClassName); |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3694 |
yourself |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3695 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3696 |
"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
|
3697 |
"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
|
3698 |
"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
|
3699 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3700 |
|
9887 | 3701 |
subProjectBmakeCalls |
12439 | 3702 |
"generate submake-calls for borland bcc" |
3703 |
||
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3704 |
^ self subProjectMakeCallsUsing:'call bmake %1 %2'. |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3705 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3706 |
|
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3707 |
subProjectLCmakeCalls |
12439 | 3708 |
"generate submake-calls for lc" |
3709 |
||
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3710 |
^ self subProjectMakeCallsUsing:'call lcmake %1 %2'. |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3711 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3712 |
|
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3713 |
subProjectMakeCallsUsing:callString |
9887 | 3714 |
^ String streamContents:[:s | |
3715 |
self subProjects do:[:packageID | |
|
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3716 |
s nextPutLine:'@echo "***********************************"'. |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3717 |
s nextPutLine:'@echo "Buildung ',(packageID copyReplaceAll:$: with:$/). |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3718 |
s nextPutLine:'@echo "***********************************"'. |
9887 | 3719 |
s nextPutLine:'cd ', (self msdosPathToPackage:packageID from:(self package)). |
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3720 |
s nextPutLine:callString. |
9887 | 3721 |
s nextPutLine:'cd ', (self msdosPathToPackage:(self package) from:packageID). |
9888 | 3722 |
s cr. |
9887 | 3723 |
] |
3724 |
] |
|
3725 |
||
3726 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
9888 | 3727 |
"Modified: / 14-09-2006 / 19:46:57 / cg" |
11937 | 3728 |
! |
3729 |
||
3730 |
subProjectVCmakeCalls |
|
12439 | 3731 |
"generate submake-calls for visual-C" |
3732 |
||
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
3733 |
^ self subProjectMakeCallsUsing:'call vcmake %1 %2'. |
9817 | 3734 |
! ! |
3735 |
||
12364 | 3736 |
!ProjectDefinition class methodsFor:'file templates'! |
3737 |
||
13177 | 3738 |
autopackage_default_dot_apspec |
3739 |
"for linux's autopackage" |
|
3740 |
||
3741 |
^ |
|
3742 |
'# -*- shell-script -*- |
|
3743 |
[Meta] |
|
3744 |
ShortName: %(APPLICATION) |
|
3745 |
SoftwareVersion: %(PRODUCT_VERSION) |
|
3746 |
DisplayName: %(DESCRIPTION) |
|
3747 |
RootName: @exept.de/expecco:$SOFTWAREVERSION |
|
3748 |
Summary: %(DESCRIPTION) |
|
3749 |
Maintainer: %(MAINTAINER) |
|
3750 |
Packager: %(PACKAGER) |
|
3751 |
PackageVersion: 1 |
|
3752 |
CPUArchitectures: x86 |
|
3753 |
AutopackageTarget: 1.0 |
|
3754 |
Type: %(PRODUCT_TYPE) |
|
3755 |
License: %(PRODUCT_LICENSE) |
|
3756 |
||
3757 |
[Description] |
|
3758 |
%(PRODUCT_DESCRIPTION) |
|
3759 |
||
3760 |
[BuildPrepare] |
|
3761 |
# If you''re using autotools, the default should be enough. |
|
3762 |
# prepareBuild will set up apbuild and run configure for you. If you |
|
3763 |
# need to pass arguments to configure, just add them to prepareBuild: |
|
3764 |
# prepareBuild --enable-foo --disable-bar |
|
3765 |
#prepareBuild |
|
3766 |
||
3767 |
[BuildUnprepare] |
|
3768 |
# If you''re using prepareBuild above, there is no need to change this!! |
|
3769 |
#unprepareBuild |
|
3770 |
||
3771 |
[Globals] |
|
3772 |
# Variables declared in this section will be available in all other sections |
|
3773 |
export APKG_BUILD_SKIP_CONFIGURE=1 |
|
3774 |
export APKG_BUILD_SKIP_MAKE=1 |
|
3775 |
export MYPREFIX=/opt/%(APPLICATION) |
|
3776 |
||
3777 |
[Prepare] |
|
3778 |
#recommend ''@autopackage.org/autopackage-gtk'' 1 |
|
3779 |
||
3780 |
[Imports] |
|
3781 |
import <<EOF |
|
3782 |
$source_dir/%(APPLICATION) |
|
3783 |
$source_dir/resources |
|
3784 |
$source_dir/keyboard.rc |
|
3785 |
$source_dir/display.rc |
|
3786 |
$source_dir/../doc |
|
3787 |
$source_dir/../testsuites/webedition |
|
3788 |
$source_dir/../projects/libraries |
|
3789 |
$source_dir/../reportGenerator/tools |
|
3790 |
$source_dir/../../pdf/afm |
|
3791 |
$source_dir/../plugin/selenium/libexept_expecco_plugin_selenium.so |
|
3792 |
$source_dir/../externalTools |
|
3793 |
EOF |
|
3794 |
||
3795 |
for i in $source_dir/*.so |
|
3796 |
do |
|
3797 |
echo $source_dir/$(readlink $i) |
|
3798 |
done | import |
|
3799 |
||
3800 |
[Install] |
|
3801 |
if [ "$PREFIX" !!= "/usr" ] |
|
3802 |
then |
|
3803 |
export MYPREFIX=$PREFIX |
|
3804 |
fi |
|
3805 |
||
3806 |
find . -type d \( -name CVS -or -name ''not_*'' \) -print | xargs rm -rf |
|
3807 |
mkdir -p $MYPREFIX |
|
3808 |
copyFiles expecco *.rc resources $MYPREFIX/bin |
|
3809 |
copyFiles *.so $MYPREFIX/lib |
|
3810 |
copyFiles doc externalTools $MYPREFIX/packages/exept/expecco |
|
3811 |
copyFiles webedition/projects libraries $MYPREFIX/testsuites |
|
3812 |
copyFiles tools $MYPREFIX/packages/exept/expecco/reportGenerator |
|
3813 |
copyFiles afm $MYPREFIX/packages/exept/pdf |
|
3814 |
copyFiles libexept_expecco_plugin_selenium.so $MYPREFIX/plugin |
|
3815 |
||
3816 |
#installExe expecco |
|
3817 |
#installLib *.so |
|
3818 |
#installData resources |
|
3819 |
#installData keyboard.rc |
|
3820 |
#installData doc |
|
3821 |
||
3822 |
[Uninstall] |
|
3823 |
# Leaving this at the default is safe unless you use custom commands in |
|
3824 |
# "Install" to create files. All autopackage API functions |
|
3825 |
# that installs files are logged. |
|
3826 |
uninstallFromLog |
|
3827 |
' |
|
3828 |
||
3829 |
"Created: / 21-12-2010 / 09:06:21 / cg" |
|
3830 |
! |
|
3831 |
||
12364 | 3832 |
bc_dot_mak |
3833 |
"answer a template for the bc.mak makefile. |
|
3834 |
Any variable definition %(Variable) will be later replaced by the mapping. |
|
3835 |
$% characters have to be duplicated. |
|
3836 |
Only needed for WIN" |
|
3837 |
||
3838 |
^ self subclassResponsibility |
|
3839 |
! |
|
3840 |
||
3841 |
bmake_dot_mak |
|
3842 |
"the template code for the bmake.bat file" |
|
3843 |
||
3844 |
^ |
|
3845 |
'@REM ------- |
|
3846 |
@REM make using borland bcc |
|
3847 |
@REM type bmake, and wait... |
|
3848 |
@REM do not edit - automatically generated from ProjectDefinition |
|
3849 |
@REM ------- |
|
3850 |
make.exe -N -f bc.mak %%1 %%2 |
|
3851 |
||
3852 |
%(SUBPROJECT_BMAKE_CALLS) |
|
3853 |
' |
|
3854 |
||
3855 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
3856 |
"Modified: / 14-09-2006 / 19:46:40 / cg" |
|
3857 |
! |
|
3858 |
||
3859 |
classLine_libInit_dot_cc |
|
3860 |
||
3861 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
|
3862 |
||
3863 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
3864 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
3865 |
! |
|
3866 |
||
3867 |
lcmake_dot_mak |
|
3868 |
"the template code for the lcmake.bat file" |
|
3869 |
||
3870 |
^ |
|
3871 |
'@REM ------- |
|
3872 |
@REM make using lcc compiler |
|
3873 |
@REM type lcmake, and wait... |
|
3874 |
@REM do not edit - automatically generated from ProjectDefinition |
|
3875 |
@REM ------- |
|
3876 |
make.exe -N -f bc.mak USELCC=1 %%1 %%2 |
|
3877 |
||
3878 |
%(SUBPROJECT_LCCMAKE_CALLS) |
|
3879 |
' |
|
3880 |
! |
|
3881 |
||
3882 |
make_dot_proto |
|
3883 |
"the template code for the make.proto file" |
|
3884 |
||
3885 |
^ self subclassResponsibility |
|
3886 |
! |
|
3887 |
||
3888 |
make_dot_spec |
|
3889 |
||
3890 |
^ |
|
3891 |
'# $','Header','$ |
|
3892 |
# |
|
3893 |
# DO NOT EDIT |
|
3894 |
# automagically generated from the projectDefinition: ',self name,'. |
|
3895 |
# |
|
3896 |
# Warning: once you modify this file, do not rerun |
|
3897 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
3898 |
# |
|
3899 |
# This file contains specifications which are common to all platforms. |
|
3900 |
# |
|
3901 |
||
3902 |
# Do NOT CHANGE THESE DEFINITIONS |
|
3903 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
3904 |
# to find the source code of a class and to find the library for a package) |
|
3905 |
MODULE=%(MODULE) |
|
3906 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
3907 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
3908 |
||
3909 |
||
3910 |
# Argument(s) to the stc compiler (stc --usage). |
|
3911 |
# -H. : create header files locally |
|
3912 |
# (if removed, they will be created as common |
|
3913 |
# -Pxxx : defines the package |
|
3914 |
# -Zxxx : a prefix for variables within the classLib |
|
3915 |
# -Dxxx : defines passed to to CC for inline C-code |
|
3916 |
# -Ixxx : include path passed to CC for inline C-code |
|
3917 |
# +optspace : optimized for space |
|
3918 |
# +optspace2 : optimized more for space |
|
3919 |
# +optspace3 : optimized even more for space |
|
3920 |
# +optinline : generate inline code for some ST constructs |
|
3921 |
# +inlineNew : additionally inline new |
|
3922 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
3923 |
# |
|
3924 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
3925 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
3926 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
3927 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
3928 |
||
3929 |
||
3930 |
# Argument(s) to the stc compiler (stc --usage). |
|
3931 |
# -warn : no warnings |
|
3932 |
# -warnNonStandard : no warnings about ST/X extensions |
|
3933 |
# -warnEOLComments : no warnings about EOL comment extension |
|
3934 |
# -warnPrivacy : no warnings about privateClass extension |
|
3935 |
# |
|
3936 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
3937 |
# STCWARNINGS=-warn |
|
3938 |
# STCWARNINGS=-warnNonStandard |
|
3939 |
# STCWARNINGS=-warnEOLComments |
|
3940 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
3941 |
||
12545 | 3942 |
%(CLASSES) |
3943 |
||
12364 | 3944 |
%(OBJECTS) |
3945 |
' |
|
3946 |
||
3947 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
3948 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
3949 |
"Modified: / 30-08-2006 / 19:07:26 / cg" |
|
3950 |
! |
|
3951 |
||
12428 | 3952 |
makefile |
3953 |
^ |
|
3954 |
'# |
|
3955 |
# DO NOT EDIT |
|
3956 |
# |
|
3957 |
# make uses this file (Makefile) only, if there is no |
|
3958 |
# file named "makefile" (lower-case m) in the same directory. |
|
3959 |
# My only task is to generate the real makefile and call make again. |
|
3960 |
# Thereafter, I am no longer used and needed. |
|
3961 |
# |
|
3962 |
||
3963 |
.PHONY: run |
|
3964 |
||
3965 |
run: makefile |
|
3966 |
$(MAKE) -f makefile |
|
3967 |
||
3968 |
#only needed for the definition of $(TOP) |
|
3969 |
include Make.proto |
|
3970 |
||
3971 |
makefile: |
|
3972 |
$(TOP)/rules/stmkmf |
|
3973 |
' |
|
3974 |
! |
|
3975 |
||
12364 | 3976 |
objectLine_make_dot_spec |
3977 |
||
3978 |
^' $(OUTDIR)%(CLASSFILE).$(O) \' |
|
3979 |
||
3980 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
3981 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
3982 |
! |
|
3983 |
||
3984 |
packageName_dot_rc |
|
3985 |
"the template code for the <libName>.rc file. |
|
3986 |
Only used for WIN" |
|
3987 |
||
3988 |
^ |
|
3989 |
'// |
|
3990 |
// DO NOT EDIT |
|
3991 |
// automagically generated from the projectDefinition: ',self name,'. |
|
3992 |
// |
|
3993 |
VS_VERSION_INFO VERSIONINFO |
|
3994 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
3995 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
3996 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
3997 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
3998 |
FILEOS VOS_NT_WINDOWS32 |
|
3999 |
FILETYPE %(FILETYPE) |
|
4000 |
FILESUBTYPE VS_USER_DEFINED |
|
4001 |
||
4002 |
BEGIN |
|
4003 |
BLOCK "StringFileInfo" |
|
4004 |
BEGIN |
|
4005 |
BLOCK "040904E4" |
|
4006 |
BEGIN |
|
4007 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
4008 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
4009 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
4010 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
4011 |
%(LEGAL_COPYRIGHT_LINE) |
|
4012 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
|
4013 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
4014 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
4015 |
END |
|
4016 |
||
4017 |
END |
|
4018 |
||
4019 |
BLOCK "VarFileInfo" |
|
4020 |
BEGIN // Language | Translation |
|
4021 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
4022 |
END |
|
4023 |
END |
|
4024 |
' |
|
4025 |
" |
|
4026 |
stx_libbasic3 packageName_dot_rc |
|
4027 |
stx_libbasic3 generate_packageName_dot_rc |
|
4028 |
" |
|
4029 |
||
4030 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
4031 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
4032 |
"Modified: / 23-08-2006 / 01:32:23 / cg" |
|
4033 |
! |
|
4034 |
||
4035 |
vcmake_dot_mak |
|
4036 |
"the template code for the vcmake.bat file" |
|
4037 |
||
4038 |
^ |
|
4039 |
'@REM ------- |
|
4040 |
@REM make using microsoft visual c |
|
4041 |
@REM type vcmake, and wait... |
|
4042 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4043 |
@REM ------- |
|
12966 | 4044 |
make.exe -N -f bc.mak -DUSEVC %%1 %%2 |
12364 | 4045 |
|
4046 |
%(SUBPROJECT_VCMAKE_CALLS) |
|
4047 |
' |
|
12966 | 4048 |
|
4049 |
"Modified: / 26-07-2010 / 12:25:44 / cg" |
|
12364 | 4050 |
! ! |
4051 |
||
4052 |
!ProjectDefinition class methodsFor:'loading'! |
|
4053 |
||
12397 | 4054 |
ensureFullyLoaded |
4055 |
"ensure that all classes and extensions are loaded properly. |
|
4056 |
This is normally no problem for compiled classLibs - however, if a package |
|
4057 |
has only be installedAsAutoloaded, some classes might want to ensure that |
|
4058 |
when being loaded themself." |
|
4059 |
||
4060 |
self hasAllExtensionsLoaded ifFalse:[ |
|
12526 | 4061 |
self breakPoint:#cg. |
12397 | 4062 |
]. |
4063 |
self hasAllClassesFullyLoaded ifFalse:[ |
|
4064 |
self hasAllClassesLoaded ifFalse:[ |
|
12526 | 4065 |
self breakPoint:#cg. |
12397 | 4066 |
]. |
12416 | 4067 |
self classes do:[:cls | cls autoload ]. |
12397 | 4068 |
]. |
4069 |
||
4070 |
" |
|
4071 |
stx_libbasic ensureFullyLoaded |
|
4072 |
" |
|
12731 | 4073 |
"Verbose := true |
4074 |
stx_libjavascript hasAllExtensionsLoaded |
|
4075 |
" |
|
12735
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4076 |
"Verbose := true |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4077 |
stx_goodies_soap_xe hasAllExtensionsLoaded |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4078 |
" |
12397 | 4079 |
! |
4080 |
||
12364 | 4081 |
load |
4082 |
"load the project |
|
4083 |
Answer true, if new classes have been installed for this package, |
|
4084 |
false if the package's classes have been already present." |
|
4085 |
||
4086 |
^ self loadAsAutoloaded:false. |
|
4087 |
! |
|
4088 |
||
4089 |
loadAsAutoloaded:asAutoloaded |
|
4090 |
"load the project. |
|
4091 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
4092 |
Answer true, if new classes have been installed for this package, |
|
4093 |
false if the package's classes have been already present." |
|
4094 |
||
4095 |
|newStuffHasBeenLoaded meOrMySecondIncarnation| |
|
4096 |
||
4097 |
self projectIsLoaded ifTrue:[^ false]. |
|
12749 | 4098 |
thisContext isRecursive ifTrue:[self breakPoint:#cg. ^ false]. "/ avoid endless loops |
12364 | 4099 |
|
4100 |
newStuffHasBeenLoaded := false. |
|
4101 |
||
4102 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
4103 |
"/ thisContext fullPrintAll. |
|
12742
853d25401c13
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12741
diff
changeset
|
4104 |
Transcript showCR:('loading %1%2...' |
853d25401c13
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12741
diff
changeset
|
4105 |
bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:['']) |
853d25401c13
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12741
diff
changeset
|
4106 |
with:self name). |
12364 | 4107 |
]. |
4108 |
||
4109 |
self rememberOverwrittenExtensionMethods. |
|
4110 |
||
4111 |
self activityNotification:'Executing pre-load action'. |
|
4112 |
self preLoadAction. |
|
4113 |
||
4114 |
meOrMySecondIncarnation := self. |
|
4115 |
||
4116 |
Class withoutUpdatingChangesDo:[ |
|
4117 |
self activityNotification:'Loading prerequisities'. |
|
4118 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
|
12574
2247be7b9e54
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12570
diff
changeset
|
4119 |
|
2247be7b9e54
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12570
diff
changeset
|
4120 |
self checkPrerequisitesForLoading. |
2247be7b9e54
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12570
diff
changeset
|
4121 |
|
12364 | 4122 |
asAutoloaded ifFalse:[ |
4123 |
self loadClassLibrary. |
|
4124 |
"/ could have overloaded my first incarnation |
|
4125 |
meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self. |
|
4126 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
|
4127 |
meOrMySecondIncarnation fetchSlotsFrom:self. |
|
4128 |
]. |
|
4129 |
]. |
|
4130 |
||
4131 |
self activityNotification:'Loading extensions'. |
|
4132 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions. |
|
4133 |
self activityNotification:'Loading classes'. |
|
4134 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded). |
|
12743 | 4135 |
"/ no, don't load subProjects here - will lead to a recursion, which leads |
4136 |
"/ to some classes being loaded from source (soap) |
|
12748 | 4137 |
self activityNotification:'Loading sub projects'. |
4138 |
meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded. |
|
12364 | 4139 |
]. |
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
4140 |
self activityNotification:('Executing post-load action for %1' bindWith:self package). |
12372 | 4141 |
|
4142 |
"/ mhmh - already done for dll-loaded packages |
|
4143 |
"/ meOrMySecondIncarnation initializeAllClasses. |
|
12364 | 4144 |
meOrMySecondIncarnation postLoadAction. |
4145 |
||
4146 |
meOrMySecondIncarnation projectIsLoaded:true. |
|
12736
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
4147 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
4148 |
self projectIsLoaded:true. |
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
4149 |
]. |
12364 | 4150 |
|
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
4151 |
self activityNotification:('Done (%1).' bindWith:self package). |
12364 | 4152 |
^ newStuffHasBeenLoaded |
4153 |
||
4154 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
|
4155 |
"Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
4156 |
"Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
4157 |
"Modified: / 29-12-2010 / 10:09:34 / cg" |
12364 | 4158 |
! |
4159 |
||
4160 |
unloadPackage |
|
4161 |
"unload the project. |
|
4162 |
Fails if there are still instances of any of my classes in the system" |
|
4163 |
||
4164 |
self projectIsLoaded ifFalse:[^ false]. |
|
4165 |
thisContext isRecursive ifTrue:[^ false]. |
|
4166 |
||
4167 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
4168 |
"/ thisContext fullPrintAll. |
|
4169 |
Transcript show:'unloading '; showCR:self name. |
|
4170 |
]. |
|
4171 |
||
4172 |
self activityNotification:'Executing pre-unload action'. |
|
4173 |
self preUnloadAction. |
|
4174 |
||
4175 |
self activityNotification:'Restoring original methods'. |
|
4176 |
self restoreOverwrittenExtensionMethods. |
|
4177 |
||
4178 |
Class withoutUpdatingChangesDo:[ |
|
4179 |
self activityNotification:'Unloading sunprojects'. |
|
4180 |
self unloadSubProjects. |
|
4181 |
||
4182 |
self activityNotification:'Unloading classes'. |
|
4183 |
self unloadClassLibrary. |
|
4184 |
self unloadAllClasses. |
|
4185 |
]. |
|
4186 |
self projectIsLoaded:false. |
|
4187 |
^ true |
|
4188 |
! ! |
|
4189 |
||
12086 | 4190 |
!ProjectDefinition class methodsFor:'misc ui support'! |
4191 |
||
4192 |
iconInBrowserSymbol |
|
4193 |
<resource: #programImage> |
|
4194 |
||
4195 |
self theNonMetaclass isApplicationDefinition ifTrue:[ |
|
4196 |
self theNonMetaclass isGUIApplication ifTrue:[ |
|
4197 |
^ #guiApplicationDefinitionClassIcon |
|
4198 |
]. |
|
4199 |
^ #applicationDefinitionClassIcon |
|
4200 |
]. |
|
4201 |
^ super iconInBrowserSymbol |
|
4202 |
! ! |
|
4203 |
||
9575 | 4204 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 4205 |
|
12368 | 4206 |
additionalClassAttributesFor: aClass |
4207 |
"Answers additional set of class attributes for given class |
|
4208 |
Individual project definitions may override this method, but |
|
4209 |
overriding method should always merge its attributes with result |
|
4210 |
of 'super additionalClassAttributesFor: aClass'. |
|
4211 |
||
4212 |
Here, we add #autoload attributes to all test cases and |
|
4213 |
test resources, as they are not neccessary for the package |
|
4214 |
and should not be compiled (because of unwanted dependency |
|
4215 |
on stx:goodies/sunit package) |
|
4216 |
" |
|
4217 |
||
4218 |
(aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)]. |
|
4219 |
(aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)]. |
|
4220 |
||
4221 |
"No additional attributes" |
|
4222 |
^#() |
|
4223 |
||
4224 |
" |
|
4225 |
stx_libbasic additionalClassAttributesFor: Object |
|
4226 |
stx_libtool additionalClassAttributesFor: Tools::NavigationHistoryTests |
|
4227 |
stx_goodies_sunit additionalClassAttributesFor: TestCase |
|
4228 |
||
4229 |
||
4230 |
stx_libtool classNamesAndAttributes_code_ignoreOldEntries:true ignoreOldDefinition: true |
|
4231 |
||
4232 |
" |
|
4233 |
||
4234 |
"Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4235 |
! |
|
4236 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4237 |
checkIfClassesArePresent |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4238 |
"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
|
4239 |
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
|
4240 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4241 |
|check nonExistantClasses| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4242 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4243 |
nonExistantClasses := Set new. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4244 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4245 |
check := |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4246 |
[:eachClassName | |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4247 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4248 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4249 |
cls := Smalltalk classNamed:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4250 |
cls isNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4251 |
Transcript showCR:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4252 |
nonExistantClasses add:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4253 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4254 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4255 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4256 |
self allClassNames do:check. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4257 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4258 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4259 |
check value:nm |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4260 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4261 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4262 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4263 |
nonExistantClasses notEmpty ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4264 |
(Dialog confirm:(Dialog classResources |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4265 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4266 |
with:nonExistantClasses anElement allBold)) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4267 |
ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4268 |
AbortOperationRequest raise. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4269 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4270 |
^ false. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4271 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4272 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4273 |
^ true |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4274 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4275 |
|
12368 | 4276 |
classNamesAndAttributesAsSpecArray |
4277 |
"given a classNamesAndAttributes array, make this a spec array (array of arrays). |
|
4278 |
This decompresses class-name entries into a one-element array for easier processing" |
|
4279 |
||
4280 |
^ self classNamesAndAttributes |
|
4281 |
collect:[:entry | |
|
4282 |
entry isArray ifTrue:[ |
|
4283 |
entry first isSymbol ifTrue:[ |
|
4284 |
entry |
|
4285 |
] ifFalse:[ |
|
4286 |
(Array with:entry first asSymbol) , (entry copyFrom:2) |
|
4287 |
]. |
|
4288 |
] ifFalse:[ |
|
4289 |
Array with:entry asSymbol. |
|
4290 |
]]. |
|
4291 |
||
4292 |
"Created: / 19-02-2007 / 16:11:53 / cg" |
|
4293 |
! |
|
4294 |
||
9627 | 4295 |
classNamesAndAttributesDo: aBlock |
4296 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
4297 |
||
4298 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 4299 |
! |
4300 |
||
12368 | 4301 |
classNamesAndAttributesFromSpecArray:aSpecArray |
4302 |
"given a spec array (array of arrays), make this a classNamesAndAttributes array |
|
4303 |
as stored literally in the method. |
|
4304 |
This compresses single element array-elements into plain names |
|
4305 |
(to save code in the compiled binaries)" |
|
4306 |
||
4307 |
^ aSpecArray |
|
4308 |
collect:[:entry | |
|
4309 |
(entry isArray and:[entry size == 1]) ifTrue:[ |
|
4310 |
entry first |
|
4311 |
] ifFalse:[ |
|
4312 |
entry |
|
4313 |
]]. |
|
4314 |
||
4315 |
"Created: / 19-02-2007 / 16:12:32 / cg" |
|
4316 |
! |
|
4317 |
||
9664 | 4318 |
compile:someCode categorized:category |
4319 |
Class packageQuerySignal |
|
4320 |
answer:self package |
|
4321 |
do:[ |
|
4322 |
self theMetaclass compilerClass |
|
4323 |
compile:someCode |
|
4324 |
forClass:self theMetaclass |
|
4325 |
inCategory:category |
|
4326 |
notifying:nil |
|
4327 |
install:true |
|
4328 |
skipIfSame:true |
|
4329 |
silent:true. |
|
4330 |
] |
|
4331 |
||
4332 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
4333 |
! |
|
4334 |
||
9627 | 4335 |
compiled_classes |
10073 | 4336 |
^ self compiled_classNames |
4337 |
collect: |
|
4338 |
[:eachName| |
|
4339 |
|cls| |
|
4340 |
||
4341 |
cls := (Smalltalk at:eachName asSymbol). |
|
12635 | 4342 |
(cls isNil or:[cls isBehavior not]) ifTrue:[ |
4343 |
Transcript showCR:('ProjectDefinition: missing/invalid class: ', eachName). |
|
4344 |
cls := nil. |
|
10073 | 4345 |
]. |
4346 |
cls. |
|
4347 |
] |
|
10251 | 4348 |
thenSelect:[:cls | cls notNil] |
9627 | 4349 |
|
4350 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
4351 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 4352 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 4353 |
! |
4354 |
||
9627 | 4355 |
compiled_classesDo:aBlock |
4356 |
self compiled_classes do:aBlock. |
|
4357 |
||
4358 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
4359 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
4360 |
! |
|
4361 |
||
10005 | 4362 |
compiled_classesForArchitecture:arch |
4363 |
^ (self compiled_classNamesForPlatform:arch) |
|
4364 |
collect:[:eachName | (Smalltalk at:eachName asSymbol) ] |
|
9627 | 4365 |
|
10251 | 4366 |
" |
4367 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
4368 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
4369 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
4370 |
" |
|
4371 |
||
9627 | 4372 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
4373 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 4374 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 4375 |
! |
4376 |
||
4377 |
compiled_classes_common |
|
10788 | 4378 |
^ self |
4379 |
compiled_classNames_common |
|
11562 | 4380 |
collect:[:eachName | |
4381 |
|cls| |
|
4382 |
||
4383 |
cls := (Smalltalk at:eachName asSymbol). |
|
12635 | 4384 |
cls isBehavior ifFalse:[ |
12964
e2cdf4d638e7
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
12926
diff
changeset
|
4385 |
self warn:('Missing/invalid class: %1\\%2' |
e2cdf4d638e7
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
12926
diff
changeset
|
4386 |
bindWith:eachName |
13090
827d5322948f
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
13088
diff
changeset
|
4387 |
with:('Warning: The class is skipped in the list of compiled classes.' allBold)) withCRs. |
12635 | 4388 |
cls := nil. |
11562 | 4389 |
]. |
4390 |
cls |
|
4391 |
] |
|
4392 |
thenSelect:[:cls| cls notNil "isBehavior"] |
|
9627 | 4393 |
|
4394 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
4395 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
13090
827d5322948f
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
13088
diff
changeset
|
4396 |
"Modified: / 11-10-2010 / 12:11:06 / cg" |
9607 | 4397 |
! |
4398 |
||
9627 | 4399 |
cvsRevision |
4400 |
|rev| |
|
4401 |
||
4402 |
rev := self revision. |
|
4403 |
rev isNil ifTrue:[ |
|
4404 |
"not yet pubplished" |
|
4405 |
^ #( '0' '1' ) |
|
4406 |
]. |
|
4407 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
4408 |
||
4409 |
" |
|
4410 |
self cvsRevision |
|
4411 |
stx_libbasic3 cvsRevision |
|
4412 |
" |
|
4413 |
||
4414 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 4415 |
! |
4416 |
||
9627 | 4417 |
inconsistency:message |
4418 |
Dialog warn:message |
|
9536 | 4419 |
|
9627 | 4420 |
" |
4421 |
self searchForNeverCompiledSuperclasses |
|
4422 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
4423 |
" |
|
4424 |
||
4425 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 4426 |
! |
4427 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4428 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4429 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4430 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4431 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4432 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4433 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4434 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4435 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4436 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4437 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4438 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4439 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4440 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4441 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4442 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4443 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4444 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4445 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4446 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4447 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4448 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4449 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
4450 |
|
9627 | 4451 |
namesAndAttributesIn:aCollection do: aBlock |
4452 |
aCollection do:[:entry | |
|
4453 |
|className attributes| |
|
4454 |
||
4455 |
entry isArray ifFalse:[ |
|
4456 |
className := entry. |
|
4457 |
attributes := #(). |
|
4458 |
] ifTrue:[ |
|
4459 |
className := entry first. |
|
4460 |
attributes := entry copyFrom:2. |
|
4461 |
]. |
|
4462 |
aBlock value: className value: attributes |
|
4463 |
]. |
|
4464 |
||
4465 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 4466 |
! |
4467 |
||
9627 | 4468 |
searchForClasses |
10010 | 4469 |
"answer all non-private classes that belong to this project. |
10005 | 4470 |
They are sorted in load order" |
4471 |
||
4472 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
|
9627 | 4473 |
|
4474 |
" |
|
10010 | 4475 |
stx_libbasic3 searchForClasses |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4476 |
stx_goodies_webServer_htmlTree searchForClasses |
9627 | 4477 |
" |
4478 |
||
4479 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
4480 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 4481 |
! |
4482 |
||
9627 | 4483 |
searchForClassesWithProject: aProjectID |
4484 |
||
4485 |
^ Smalltalk allClasses |
|
9829 | 4486 |
select:[:cls | (cls package = aProjectID) ]. |
9627 | 4487 |
|
4488 |
" |
|
4489 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
4490 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
4491 |
self searchForClassesWithProject: #'bosch:dapasx/kernel' |
|
4492 |
" |
|
4493 |
||
4494 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
4495 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
4496 |
"Modified: / 16-08-2006 / 18:50:48 / User" |
|
9536 | 4497 |
! |
4498 |
||
9627 | 4499 |
searchForExtensions |
4500 |
^ self searchForExtensionsWithProject:self package |
|
4501 |
||
4502 |
" |
|
4503 |
self searchForExtensions |
|
4504 |
DapasXProject searchForExtensions |
|
4505 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
4506 |
stx_libtool searchForExtensions |
9627 | 4507 |
" |
4508 |
||
4509 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
4510 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
4511 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 4512 |
! |
4513 |
||
9627 | 4514 |
searchForExtensionsWithProject:aProjectID |
4515 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
4516 |
Return the extension-methods sorted by classname-selector" |
9627 | 4517 |
|
4518 |
|methods| |
|
4519 |
||
11152 | 4520 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4521 |
methods |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4522 |
sort:[:m1 :m2 | |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4523 |
|c1 c2| |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4524 |
|
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4525 |
c1 := m1 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4526 |
c2 := m2 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4527 |
c1 == c2 ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4528 |
m1 selector < m2 selector |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4529 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4530 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4531 |
true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4532 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4533 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4534 |
false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4535 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4536 |
c1 name < c2 name |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4537 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4538 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4539 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4540 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4541 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4542 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4543 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4544 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4545 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4546 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4547 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4548 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4549 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
4550 |
]. |
9627 | 4551 |
^ methods |
4552 |
||
4553 |
" |
|
4554 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
4555 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
4556 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 4557 |
" |
4558 |
||
4559 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
4560 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 4561 |
! |
4562 |
||
9627 | 4563 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4564 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4565 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4566 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4567 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4568 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4569 |
addPackage := |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4570 |
[:package | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4571 |
(package ~= myPackageID) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4572 |
true "(package startsWith:'stx:') not" ifTrue:[ |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4573 |
package ~= PackageId noProjectID ifTrue:[ |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4574 |
requiredPackages add:package. |
9627 | 4575 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4576 |
] |
9627 | 4577 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4578 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4579 |
|
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
4580 |
"/ need them also... |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
4581 |
self preRequisites do:[:eachPreRequisitePackage | |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
4582 |
addPackage value:eachPreRequisitePackage |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
4583 |
]. |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
4584 |
|
10788 | 4585 |
self compiled_classesDo:[:cls | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4586 |
cls allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4587 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4588 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4589 |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
4590 |
cls allPrivateClassesDo:[:eachPrivateClass | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4591 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4592 |
eachSuperClass isPrivate ifFalse:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4593 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4594 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4595 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4596 |
]. |
9956 | 4597 |
|
13216 | 4598 |
cls sharedPoolNames do:[:eachPoolName | |
9956 | 4599 |
|eachPoolClass| |
4600 |
||
4601 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
|
12570
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4602 |
eachPoolClass isNil ifTrue:[ |
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4603 |
Transcript showCR:('Warning: missing pool: %1 (required by %2)' bindWith:eachPoolName with:cls name) |
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4604 |
] ifFalse:[ |
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4605 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4606 |
addPackage value:(eachPoolSuperClass package) |
6587a05b5cd4
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12558
diff
changeset
|
4607 |
] |
9956 | 4608 |
] |
4609 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4610 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4611 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4612 |
self extensionMethodNames pairWiseDo:[:className :selector | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4613 |
|cls| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4614 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
12143
7efadbce6b32
add superClasses from extended classes in #searchForProjectsWhichProvideHeaderFiles
fm
parents:
12086
diff
changeset
|
4615 |
cls withAllSuperclassesDo:[:eachSuperClass | |
7efadbce6b32
add superClasses from extended classes in #searchForProjectsWhichProvideHeaderFiles
fm
parents:
12086
diff
changeset
|
4616 |
addPackage value:(eachSuperClass package) |
7efadbce6b32
add superClasses from extended classes in #searchForProjectsWhichProvideHeaderFiles
fm
parents:
12086
diff
changeset
|
4617 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4618 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4619 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4620 |
^ requiredPackages |
9627 | 4621 |
|
9880 | 4622 |
" |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4623 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
9880 | 4624 |
" |
9627 | 4625 |
|
10251 | 4626 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
13216 | 4627 |
"Modified: / 18-01-2011 / 17:58:33 / cg" |
9664 | 4628 |
! |
4629 |
||
9667 | 4630 |
searchForSiblingProjects |
10132 | 4631 |
"answer all the packages (package names) having the my parent package" |
4632 |
||
9667 | 4633 |
|myPackage myParentPackage| |
4634 |
||
4635 |
myPackage := self package asPackageId. |
|
4636 |
myParentPackage := myPackage parentPackage. |
|
4637 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
4638 |
||
4639 |
^ Smalltalk allProjectIDs |
|
4640 |
select:[:projectID | |
|
4641 |
|thisPackage| |
|
4642 |
thisPackage := projectID asPackageId. |
|
4643 |
(thisPackage parentPackage = myParentPackage) |
|
4644 |
and:[ thisPackage ~= myPackage ]. |
|
4645 |
] |
|
4646 |
||
4647 |
" |
|
4648 |
self searchForSiblingProjects |
|
4649 |
bosch_dapasx_Application searchForSiblingProjects |
|
4650 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
4651 |
" |
|
4652 |
||
4653 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
4654 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
4655 |
! |
|
4656 |
||
9664 | 4657 |
searchForSubProjects |
10132 | 4658 |
"answer all packages (package names), that are my subProjects" |
4659 |
||
9664 | 4660 |
|myPackage| |
4661 |
||
4662 |
myPackage := self package. |
|
10215 | 4663 |
^ Smalltalk allProjectIDs |
4664 |
select:[:projectID | |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4665 |
projectID ~= PackageId noProjectID |
10215 | 4666 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
9664 | 4667 |
|
4668 |
" |
|
4669 |
self searchForSubProjects |
|
4670 |
bosch_dapasx_Application searchForSubProjects |
|
4671 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
4672 |
" |
|
4673 |
||
4674 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
4675 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 4676 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 4677 |
! |
4678 |
||
4679 |
setupForType:typeOrNil |
|
9714 | 4680 |
typeOrNil = GUIApplicationType ifTrue:[ |
12425 | 4681 |
self compile: |
4682 |
'isGUIApplication |
|
4683 |
"return true, if this is a GUI application. |
|
4684 |
(these need more libraries and use a different startup procedure)" |
|
4685 |
||
4686 |
^ true |
|
4687 |
' |
|
9664 | 4688 |
categorized:'description'. |
12356 | 4689 |
self superclass: ApplicationDefinition. |
9664 | 4690 |
^ self |
4691 |
]. |
|
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
4692 |
|
9714 | 4693 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
12425 | 4694 |
self compile: |
4695 |
'isGUIApplication |
|
4696 |
"return true, if this is a GUI application. |
|
4697 |
(these need more libraries and use a different startup procedure)" |
|
4698 |
||
4699 |
^ false |
|
4700 |
' |
|
9664 | 4701 |
categorized:'description'. |
12356 | 4702 |
self superclass: ApplicationDefinition. |
9664 | 4703 |
^ self |
12356 | 4704 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
4705 |
|
12349 | 4706 |
self theMetaclass removeSelector: #isGUIApplication. |
12353 | 4707 |
self superclass: LibraryDefinition. |
9664 | 4708 |
^ self. |
4709 |
||
4710 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
9536 | 4711 |
! ! |
4712 |
||
12210 | 4713 |
!ProjectDefinition class methodsFor:'private-extension handling'! |
4714 |
||
4715 |
hasSavedOverwrittenMethods |
|
4716 |
"true, if any of my methods was overwritten by another loaded package. |
|
4717 |
These methods are now in my safe" |
|
4718 |
||
12208
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
4719 |
^ safeForOverwrittenMethods notEmptyOrNil |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
4720 |
! |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
4721 |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4722 |
methodOverwrittenBy:aMethod |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4723 |
"return the (hidden) original method, which was located in another package |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4724 |
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
|
4725 |
|
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4726 |
|mclass selector oldPackage| |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4727 |
|
12218
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
4728 |
extensionOverwriteInfo isNil ifTrue:[^ nil]. |
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
4729 |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4730 |
mclass := aMethod mclass. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4731 |
selector := aMethod selector. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4732 |
oldPackage := extensionOverwriteInfo at:(mclass name,'>>',selector) ifAbsent:nil. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4733 |
oldPackage isNil ifTrue:[^ nil]. |
12274 | 4734 |
^ oldPackage asPackageId projectDefinitionClass |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4735 |
savedOverwrittenMethodForClass:mclass selector:selector. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4736 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4737 |
|
12210 | 4738 |
rememberOverwrittenExtensionMethods |
4739 |
"before loading, tell other packages to keep a safe reference to any method |
|
4740 |
which gets overloaded by me, and also remember here, whome I have overloaded. |
|
4741 |
This allows for two things: |
|
4742 |
a) correct fileout of the other base-package (for example, when checking in any of its class) |
|
4743 |
b) correct unloading of myself" |
|
4744 |
||
4745 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4746 |
|class oldMethod oldPackage defClass| |
12210 | 4747 |
|
4748 |
class := Smalltalk classNamed:className. |
|
12264 | 4749 |
class notNil ifTrue:[ |
4750 |
oldMethod := class compiledMethodAt:selector. |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4751 |
]. |
12210 | 4752 |
oldMethod notNil ifTrue:[ |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4753 |
oldPackage := oldMethod package. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4754 |
oldPackage ~= PackageId noProjectID ifTrue:[ |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4755 |
defClass := oldPackage asPackageId projectDefinitionClass. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4756 |
defClass notNil ifTrue:[ |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4757 |
defClass rememberOverwrittenMethod:oldMethod inClass:class. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4758 |
extensionOverwriteInfo isNil ifTrue:[ |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4759 |
extensionOverwriteInfo := Dictionary new. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4760 |
]. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4761 |
extensionOverwriteInfo at:(className,'>>',selector) put:oldPackage. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4762 |
] |
12210 | 4763 |
]. |
4764 |
]. |
|
4765 |
]. |
|
4766 |
! |
|
4767 |
||
4768 |
rememberOverwrittenMethod:oldMethod inClass:aClass |
|
4769 |
"invoked from another projectDefinition, when that package is about to be loaded |
|
4770 |
and about to overwrite one of my methods. |
|
4771 |
I will save the method locally, to allow for correct fileout of this class/project or |
|
4772 |
to correctly reestablish my methods when the other package is unloaded later." |
|
4773 |
||
4774 |
|thisIsOneOfMyMethods selector| |
|
4775 |
||
4776 |
selector := oldMethod selector. |
|
4777 |
||
12293
983b9555f6e8
changed: #rememberOverwrittenMethod:inClass:
Claus Gittinger <cg@exept.de>
parents:
12286
diff
changeset
|
4778 |
thisIsOneOfMyMethods := (self classNames includes:aClass theNonMetaclass name) |
983b9555f6e8
changed: #rememberOverwrittenMethod:inClass:
Claus Gittinger <cg@exept.de>
parents:
12286
diff
changeset
|
4779 |
or:[ aClass isPrivate and:[ self classNames includes: aClass topOwningClass theNonMetaclass name ]]. |
12210 | 4780 |
thisIsOneOfMyMethods ifFalse:[ |
4781 |
self extensionMethodNames pairWiseDo:[:extClassName :extSelector | |
|
4782 |
extClassName = aClass name ifTrue:[ |
|
4783 |
selector = extSelector ifTrue:[ |
|
4784 |
thisIsOneOfMyMethods := true |
|
4785 |
]. |
|
4786 |
]. |
|
4787 |
] |
|
4788 |
]. |
|
4789 |
thisIsOneOfMyMethods ifFalse:[ |
|
4790 |
self error:'oops - this is not one of my methods' mayProceed:true. |
|
4791 |
^ self |
|
4792 |
]. |
|
4793 |
||
4794 |
safeForOverwrittenMethods isNil ifTrue:[ |
|
4795 |
safeForOverwrittenMethods := Dictionary new. |
|
4796 |
]. |
|
4797 |
safeForOverwrittenMethods at:(aClass name -> selector) put:oldMethod. |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4798 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4799 |
|
12624 | 4800 |
restoreOverwrittenExtensionMethods |
4801 |
"after unloading, tell other packages to restore any safed reference to any method |
|
4802 |
which got overloaded by me." |
|
4803 |
||
4804 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
4805 |
|class oldMethod oldPackage| |
|
4806 |
||
4807 |
oldPackage := extensionOverwriteInfo at:(className,'>>',selector). |
|
4808 |
oldPackage notNil ifTrue:[ |
|
4809 |
class := Smalltalk classNamed:className. |
|
4810 |
class notNil ifTrue:[ |
|
4811 |
oldMethod := oldPackage savedOverwrittenMethodForClass:class selector:selector. |
|
4812 |
oldMethod notNil ifTrue:[ |
|
12749 | 4813 |
self breakPoint:#cg. |
12624 | 4814 |
]. |
4815 |
] |
|
4816 |
]. |
|
4817 |
]. |
|
4818 |
! |
|
4819 |
||
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4820 |
savedOverwrittenMethodForClass:aClass selector:aSelector |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4821 |
"return one of my saved original methods" |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
4822 |
|
12274 | 4823 |
^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil |
12210 | 4824 |
! ! |
4825 |
||
4826 |
!ProjectDefinition class methodsFor:'private-loading'! |
|
4827 |
||
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4828 |
checkPrerequisitesForLoading |
12264 | 4829 |
|classesAlreadyWarned| |
4830 |
||
4831 |
classesAlreadyWarned := Set new. |
|
4832 |
||
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4833 |
self extensionMethodNames |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4834 |
pairWiseDo:[:className :selector | |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4835 |
|class | |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4836 |
|
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4837 |
class := Smalltalk classNamed:className. |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4838 |
class isNil ifTrue:[ |
12264 | 4839 |
(classesAlreadyWarned includes:className) ifFalse:[ |
4840 |
self error:'missing class for extension: ', className mayProceed:true. |
|
4841 |
classesAlreadyWarned add:className. |
|
4842 |
]. |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4843 |
]. |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4844 |
] |
12263
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
4845 |
|
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
4846 |
"/ todo: more needed here... |
12731 | 4847 |
|
4848 |
" |
|
4849 |
stx_libjavascript checkPrerequisitesForLoading |
|
4850 |
" |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4851 |
! |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
4852 |
|
12294
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4853 |
extensionOverwriteInfo |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4854 |
^ extensionOverwriteInfo |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4855 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4856 |
|
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4857 |
fetchSlotsFrom:myFirstIncarnation |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4858 |
"this is invoked in a just loaded instance of myself, |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4859 |
to fetch the safe and extensionInfo from my first incarnation" |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4860 |
|
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4861 |
safeForOverwrittenMethods := myFirstIncarnation safeForOverwrittenMethods. |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4862 |
extensionOverwriteInfo := myFirstIncarnation extensionOverwriteInfo. |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4863 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
4864 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4865 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4866 |
"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
|
4867 |
install as autoloaded classes marked to be autoloaded. |
10401 | 4868 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
4869 |
||
4870 |
Answer true, if classes have been loaded" |
|
12028 | 4871 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4872 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4873 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4874 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4875 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4876 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4877 |
classNamesToAutoload := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4878 |
|
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
4879 |
hasClassesToLoad := false. |
12741
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
4880 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
4881 |
|eachClassnameSym isAutoload cls| |
2e5f250f5426
changed: #loadAllClassesAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12740
diff
changeset
|
4882 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4883 |
eachClassnameSym := eachClassname asSymbol. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4884 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4885 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4886 |
"no need to (re-)load an existing class, but install if should be loaded" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4887 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4888 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[ |
12028 | 4889 |
(eachAttributes isEmpty |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4890 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4891 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4892 |
hasClassesToLoad := true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4893 |
isAutoload ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4894 |
classNamesToAutoload add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4895 |
] ifFalse:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4896 |
classNamesToLoad add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4897 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4898 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4899 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4900 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4901 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4902 |
hasClassesToLoad ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4903 |
loadedClasses := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4904 |
|
11532 | 4905 |
self packageDirectory isNil ifTrue:[ |
13087
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4906 |
classNamesToLoad notEmpty ifTrue:[ |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4907 |
"required classes are missing. |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4908 |
Autoloaded classes are considered as optional..." |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4909 |
self |
13088
fd588a4030f2
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13087
diff
changeset
|
4910 |
error:(self name,'[error] cannot install because packageDirectory is unknown for missing classes: ', classNamesToLoad printString) |
13087
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4911 |
mayProceed:true. |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4912 |
^ false. |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4913 |
]. |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4914 |
(self name,'[info] cannot install autoloaded classes because packageDirectory is unknown') infoPrintCR. |
57fd77bae775
changed: #loadAllClassesAsAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13086
diff
changeset
|
4915 |
^ true. |
11532 | 4916 |
]. |
4917 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4918 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4919 |
of class name to file name" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4920 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4921 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4922 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4923 |
"install autoloaded classes first, |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4924 |
some others may depend on them" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4925 |
|
12028 | 4926 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
4927 |
ActivityNotification |
|
4928 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
|
4929 |
errorString: 'Autoloading class ', eachClassName. |
|
4930 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4931 |
Smalltalk |
12028 | 4932 |
installAutoloadedClassNamed:eachClassName |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4933 |
category:#autoloaded "FIXME" |
12028 | 4934 |
package:self package |
4935 |
revision:nil |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4936 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4937 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4938 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4939 |
classesWhichFailedToLoad := OrderedCollection new. |
12743 | 4940 |
classNamesToLoad notEmpty ifTrue:[ |
4941 |
Verbose == true ifTrue:[ |
|
4942 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
|
4943 |
bindWith:self name with:classNamesToLoad size). |
|
4944 |
] |
|
4945 |
]. |
|
12028 | 4946 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4947 |
|cls| |
12028 | 4948 |
ActivityNotification |
4949 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
|
4950 |
errorString: 'Loading class ', eachClassName. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4951 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4952 |
Error handle:[:ex | |
10401 | 4953 |
"maybe, fileIn failed, because the load order is wrong. |
4954 |
Work around this by installing the class as autoloaded and |
|
4955 |
loading it" |
|
4956 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4957 |
classesWhichFailedToLoad add:eachClassName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4958 |
Smalltalk |
12028 | 4959 |
installAutoloadedClassNamed:eachClassName |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4960 |
category:#autoloaded "FIXME" |
12028 | 4961 |
package:self package |
4962 |
revision:nil |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4963 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4964 |
] do:[ |
12743 | 4965 |
Verbose == true ifTrue:[ |
4966 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
|
4967 |
]. |
|
12028 | 4968 |
cls := Smalltalk |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4969 |
fileInClass:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4970 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4971 |
initialize:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4972 |
lazy:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4973 |
silent:true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4974 |
cls notNil ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4975 |
loadedClasses add:cls |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4976 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4977 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4978 |
]. |
10401 | 4979 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4980 |
classesWhichFailedToLoad do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4981 |
(Smalltalk at:eachClassName) autoload. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4982 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4983 |
|
12028 | 4984 |
loadedClasses do:[:eachLoadedClass | |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4985 |
"do not initialize, if initialize method is inherited" |
12305 | 4986 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4987 |
eachLoadedClass initialize |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4988 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4989 |
]. |
10401 | 4990 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4991 |
]. |
10401 | 4992 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4993 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4994 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4995 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
12028 | 4996 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
4997 |
"Modified: / 22-08-2009 / 12:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4998 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
4999 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5000 |
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
|
5001 |
"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
|
5002 |
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
|
5003 |
|
12295 | 5004 |
|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
|
5005 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5006 |
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
|
5007 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5008 |
(Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[ |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5009 |
"already loaded" |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5010 |
^ true |
12294
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5011 |
]. |
12743 | 5012 |
Verbose == true ifTrue:[ |
5013 |
Transcript showCR:(' %1: loading classLibrary...' bindWith:self name). |
|
5014 |
]. |
|
5015 |
self activityNotification:'Loading classLibrary'. |
|
5016 |
||
12295 | 5017 |
^ 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
|
5018 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5019 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5020 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5021 |
"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
|
5022 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5023 |
self hasAllExtensionsLoaded ifFalse:[ |
12749 | 5024 |
self breakPoint:#cg. |
12743 | 5025 |
Verbose == true ifTrue:[ |
5026 |
Transcript showCR:(' %1: filing in extensions...' bindWith:self name). |
|
5027 |
]. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5028 |
Smalltalk loadExtensionsForPackage:self package. |
10401 | 5029 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5030 |
]. |
10401 | 5031 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5032 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5033 |
"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
|
5034 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5035 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5036 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5037 |
"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
|
5038 |
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
|
5039 |
|
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5040 |
|packagesToLoad packagesBefore| |
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5041 |
|
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5042 |
packagesToLoad := aListOfPackages |
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5043 |
reject:[:packageID | |
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5044 |
|cls| |
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5045 |
|
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5046 |
cls := ProjectDefinition definitionClassForPackage:packageID. |
13171
a81a33376695
changed: #loadPackages:asAutoloaded:
Stefan Vogel <sv@exept.de>
parents:
13167
diff
changeset
|
5047 |
cls notNil and:[cls projectIsLoaded] |
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5048 |
]. |
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5049 |
packagesToLoad isEmpty ifTrue:[^ self]. |
12558 | 5050 |
|
5051 |
packagesBefore := PackagesBeingLoaded copy. |
|
5052 |
PackagesBeingLoaded isNil ifTrue:[ |
|
5053 |
PackagesBeingLoaded := Set new |
|
5054 |
]. |
|
5055 |
[ |
|
5056 |
Class withoutUpdatingChangesDo:[ |
|
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5057 |
packagesToLoad do:[:aPackage | |
12558 | 5058 |
(PackagesBeingLoaded includes:aPackage) ifFalse:[ |
5059 |
PackagesBeingLoaded add:aPackage. |
|
13251 | 5060 |
Smalltalk loadPackage:aPackage asAutoloaded:asAutoloaded. |
12558 | 5061 |
] |
5062 |
]. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5063 |
]. |
12558 | 5064 |
] ensure:[ |
5065 |
PackagesBeingLoaded := packagesBefore. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5066 |
]. |
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5067 |
|
13167 | 5068 |
"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
|
5069 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5070 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5071 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5072 |
"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
|
5073 |
|
12743 | 5074 |
|prereq| |
5075 |
||
5076 |
prereq := self effectivePreRequisites. |
|
5077 |
prereq notEmptyOrNil ifTrue:[ |
|
5078 |
Verbose == true ifTrue:[ |
|
5079 |
Transcript showCR:(' %1 loading prerequisites...' bindWith:self name). |
|
5080 |
]. |
|
5081 |
self loadPackages:prereq asAutoloaded:asAutoloaded |
|
5082 |
]. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5083 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5084 |
|
12596 | 5085 |
loadSubProjects |
5086 |
"load other packages (at least the projectDefinitions and their extensions)" |
|
5087 |
||
5088 |
self loadSubProjectsAsAutoloaded:false. |
|
5089 |
self subProjects do:[:p | |
|
5090 |
|subDef| |
|
5091 |
||
5092 |
subDef := self definitionClassForPackage:p. |
|
5093 |
subDef notNil ifTrue:[ |
|
5094 |
subDef loadSubProjects |
|
5095 |
]. |
|
5096 |
]. |
|
5097 |
! |
|
5098 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5099 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5100 |
"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
|
5101 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5102 |
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
|
5103 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5104 |
"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
|
5105 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5106 |
|
12294
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5107 |
safeForOverwrittenMethods |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5108 |
^ safeForOverwrittenMethods |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5109 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5110 |
|
12624 | 5111 |
unloadAllClasses |
5112 |
Transcript showCR:'unloading not yet fully supported' |
|
5113 |
! |
|
5114 |
||
5115 |
unloadClassLibrary |
|
5116 |
Transcript showCR:'unloading not yet fully supported' |
|
5117 |
! |
|
5118 |
||
5119 |
unloadSubProjects |
|
5120 |
"unload other packages" |
|
5121 |
||
5122 |
self subProjects do:[:p | |
|
5123 |
|subDef| |
|
5124 |
||
5125 |
subDef := self definitionClassForPackage:p. |
|
5126 |
subDef notNil ifTrue:[ |
|
5127 |
subDef unloadSubProjects. |
|
5128 |
subDef unloadPackage. |
|
5129 |
]. |
|
5130 |
]. |
|
5131 |
! |
|
5132 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5133 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5134 |
"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
|
5135 |
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
|
5136 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5137 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5138 |
self projectIsLoaded:false. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5139 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5140 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5141 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5142 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5143 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5144 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
12371 | 5145 |
"helper for searchForPreRequisites" |
5146 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5147 |
aSetOfClasses |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5148 |
do:[:aClass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5149 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5150 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5151 |
(aClass theNonMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5152 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5153 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5154 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5155 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5156 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5157 |
(aClass theMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5158 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5159 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5160 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5161 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5162 |
"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
|
5163 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5164 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5165 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
12371 | 5166 |
"helper for searchForPreRequisites" |
5167 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5168 |
someMethods do:[:method | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5169 |
|resources| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5170 |
|
11149 | 5171 |
resources := method resources. |
5172 |
(resources isNil |
|
5173 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
5174 |
and:[(resources includesKey:#'example') not])]) |
|
5175 |
ifTrue:[ |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5176 |
method usedGlobals |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5177 |
do:[:global | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5178 |
|globalsName usedClass| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5179 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5180 |
globalsName := global asSymbol. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5181 |
usedClass := Smalltalk at:globalsName. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5182 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) ifTrue:[ |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5183 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5184 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5185 |
add:(usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5186 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5187 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5188 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5189 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5190 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5191 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5192 |
"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
|
5193 |
"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
|
5194 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5195 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5196 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5197 |
"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
|
5198 |
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
|
5199 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5200 |
|requiredClasses requiredPackageReasons usedClassesWithReasons ignoredPackages| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5201 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5202 |
usedClassesWithReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5203 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5204 |
"my classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5205 |
requiredClasses := (self searchForClassesWithProject:self package) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5206 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5207 |
"my subproject's classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5208 |
self subProjects do:[:eachProjectName | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5209 |
requiredClasses addAll: (self searchForClassesWithProject:eachProjectName asSymbol) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5210 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5211 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5212 |
"all superclasses of my classes and my subProject's classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5213 |
requiredClasses do:[:cls | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5214 |
cls allSuperclassesDo:[:eachSuperclass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5215 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5216 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5217 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5218 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5219 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5220 |
"all classes referenced by my classes or my subproject's classes |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5221 |
are required. But: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5222 |
only search for locals refered to by my methods (assuming that superclasses' |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5223 |
prerequisites are specified in their package)." |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5224 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5225 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:usedClassesWithReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5226 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:usedClassesWithReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5227 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5228 |
"don't put classes from subProjects into the required list" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5229 |
ignoredPackages := (self siblingsAreSubProjects |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5230 |
ifTrue:[ self searchForSiblingProjects ] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5231 |
ifFalse:[ self searchForSubProjects ]) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5232 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5233 |
ignoredPackages add:self package. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5234 |
ignoredPackages add:PackageId noProjectID. |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5235 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5236 |
"now map classes to packages and collect the reasons" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5237 |
requiredPackageReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5238 |
usedClassesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass | |usedClassPackage| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5239 |
usedClassPackage := usedClass package. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5240 |
(ignoredPackages includes:usedClassPackage) ifFalse:[ |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5241 |
(requiredPackageReasons at:usedClassPackage ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5242 |
addAll:reasonsPerClass. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5243 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5244 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5245 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5246 |
^ requiredPackageReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5247 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5248 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5249 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5250 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5251 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5252 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5253 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5254 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5255 |
"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
|
5256 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5257 |
"Modified: / 20-09-2006 / 17:29:59 / cg" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5258 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5259 |
|
9585 | 5260 |
!ProjectDefinition class methodsFor:'queries'! |
5261 |
||
12368 | 5262 |
allClassNames |
5263 |
^ self classNamesForWhich:[:nm :attr | true ]. |
|
5264 |
! |
|
5265 |
||
5266 |
autoloaded_classNames |
|
5267 |
^ self classNamesForWhich:[:nm :attr | attr notEmptyOrNil and:[attr includes:#autoload]]. |
|
5268 |
||
5269 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
5270 |
"Created: / 30-08-2007 / 18:48:09 / cg" |
|
5271 |
! |
|
5272 |
||
5273 |
classNames |
|
5274 |
"answer an array containing all the class names of the project's classes" |
|
5275 |
||
5276 |
^ self classNamesAndAttributesAsSpecArray collect:[:entry | entry first]. |
|
5277 |
||
5278 |
" |
|
5279 |
stx_libhtml classNames |
|
5280 |
stx_libhtml classNamesAndAttributesAsSpecArray |
|
5281 |
" |
|
5282 |
! |
|
5283 |
||
5284 |
classNamesForWhich:aBlock |
|
5285 |
"a correponding method with real names is generated in my subclasses" |
|
5286 |
||
5287 |
|coll| |
|
5288 |
||
5289 |
coll := OrderedCollection new. |
|
5290 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
5291 |
(aBlock value:nm value:attributes) ifTrue:[ |
|
5292 |
coll add:nm. |
|
5293 |
]. |
|
5294 |
]. |
|
5295 |
^ coll |
|
5296 |
||
5297 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
5298 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
5299 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
5300 |
! |
|
5301 |
||
5302 |
classes |
|
5303 |
"list my classes. |
|
5304 |
Project must be loaded - otherwise an error is reported here. |
|
5305 |
Use #classNames if you are only interested in the names" |
|
5306 |
||
5307 |
^ self classNames collect:[:nm | Smalltalk at:nm ifAbsent:[self error:'Missing class']] |
|
5308 |
||
5309 |
" |
|
5310 |
stx_libbasic3 classNames |
|
5311 |
stx_libbasic3 classes |
|
5312 |
" |
|
5313 |
! |
|
5314 |
||
5315 |
compiled_classNames |
|
5316 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
|
5317 |
||
5318 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
5319 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
5320 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
|
5321 |
! |
|
5322 |
||
5323 |
compiled_classNamesForPlatform |
|
5324 |
"answer the classes to be compiled only for the current platformName" |
|
5325 |
||
5326 |
^ self compiled_classNamesForPlatform:OperatingSystem platformName |
|
5327 |
! |
|
5328 |
||
5329 |
compiled_classNamesForPlatform:platformName |
|
5330 |
"answer the classes to be compiled only for platformName |
|
5331 |
platformName is one of #unix, #win32 (OperatingSystem platformName)" |
|
5332 |
||
5333 |
^ self |
|
5334 |
classNamesForWhich:[:nm :attr | |
|
5335 |
(attr includes:#autoload) not and:[attr includes:platformName] |
|
5336 |
]. |
|
5337 |
||
5338 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
5339 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
5340 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
|
5341 |
! |
|
5342 |
||
5343 |
compiled_classNames_common |
|
5344 |
"classes to be compiled for any platform" |
|
5345 |
||
5346 |
^ self |
|
5347 |
classNamesForWhich:[:nm :attr | |
|
5348 |
attr isEmptyOrNil |
|
5349 |
]. |
|
5350 |
||
5351 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
5352 |
! |
|
5353 |
||
5354 |
compiled_classNames_unix |
|
5355 |
"class, only to be compiled under unix" |
|
5356 |
||
5357 |
^ self compiled_classNamesForPlatform:#unix. |
|
5358 |
||
5359 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
5360 |
! |
|
5361 |
||
5362 |
compiled_classNames_windows |
|
5363 |
"class, only to be compiled under windows" |
|
5364 |
||
5365 |
^ self compiled_classNamesForPlatform:#win32. |
|
5366 |
||
5367 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
5368 |
! |
|
5369 |
||
13081 | 5370 |
extensionClasses |
5371 |
"answer the set of classes, which are extended by the package" |
|
5372 |
||
5373 |
|classes| |
|
5374 |
||
5375 |
classes := IdentitySet new. |
|
5376 |
||
5377 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
5378 |
|mthdCls cls| |
|
5379 |
||
5380 |
mthdCls := Smalltalk classNamed:className. |
|
5381 |
(mthdCls notNil and:[mthdCls isLoaded]) ifTrue:[ |
|
5382 |
cls := mthdCls theNonMetaclass. |
|
5383 |
(classes includes:cls) ifFalse:[ |
|
5384 |
cls withAllSuperclassesDo:[:eachClass | |
|
5385 |
classes add:eachClass. |
|
5386 |
]. |
|
5387 |
]. |
|
5388 |
]. |
|
5389 |
]. |
|
5390 |
^ classes. |
|
5391 |
||
5392 |
" |
|
5393 |
stx_libboss extensionClasses |
|
5394 |
" |
|
5395 |
! |
|
5396 |
||
12368 | 5397 |
extensionMethods |
5398 |
"list my extension methods. |
|
5399 |
Project must be loaded - otherwise an error is reported here. |
|
5400 |
Use #extensionMethodsNames if you are only interested in the names" |
|
5401 |
||
5402 |
^ self extensionMethodNames |
|
5403 |
pairWiseCollect:[:className :selector | |
|
5404 |
(Smalltalk classNamed:className) compiledMethodAt:selector. |
|
5405 |
]. |
|
5406 |
||
5407 |
" |
|
5408 |
stx_libbasic2 extensionMethodNames |
|
5409 |
stx_libbasic2 extensionMethods |
|
5410 |
" |
|
5411 |
! |
|
5412 |
||
13081 | 5413 |
extensionPackages |
5414 |
"answer the set of packages, which are extended by this package" |
|
5415 |
||
5416 |
^ self extensionClasses collect:[:eachClass| eachClass package] |
|
5417 |
||
5418 |
" |
|
5419 |
stx_libboss extensionPackages |
|
5420 |
" |
|
5421 |
! |
|
5422 |
||
10144 | 5423 |
hasAllClassesFullyLoaded |
5424 |
"return true, if all classes are present and loaded" |
|
5425 |
||
5426 |
^ self hasAllClassesLoaded:true |
|
5427 |
||
5428 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
5429 |
! |
|
5430 |
||
9627 | 5431 |
hasAllClassesLoaded |
10205 | 5432 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 5433 |
|
5434 |
^ self hasAllClassesLoaded:false |
|
5435 |
||
5436 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
5437 |
! |
|
5438 |
||
5439 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
5440 |
"check if all classes for this platform are present. |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
5441 |
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
|
5442 |
|
10154 | 5443 |
^ (self |
5444 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
|
5445 |
loaded:checkIfFullyLoaded) |
|
5446 |
and:[ |
|
5447 |
self |
|
5448 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
5449 |
loaded:checkIfFullyLoaded ] |
|
5450 |
||
5451 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
5452 |
! |
|
5453 |
||
5454 |
hasAllCompiledClassesFullyLoaded |
|
5455 |
"return true, if all compiled classes are present and loaded" |
|
5456 |
||
5457 |
^ self hasAllCompiledClassesLoaded:true |
|
5458 |
||
5459 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
5460 |
! |
|
5461 |
||
5462 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
5463 |
"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
|
5464 |
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
|
5465 |
|
10154 | 5466 |
^ (self |
10206 | 5467 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
10154 | 5468 |
loaded:checkIfFullyLoaded) |
5469 |
and:[ |
|
5470 |
self |
|
5471 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
5472 |
loaded:checkIfFullyLoaded |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
5473 |
] |
9585 | 5474 |
! |
5475 |
||
9627 | 5476 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
5477 |
"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
|
5478 |
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
|
5479 |
|
9627 | 5480 |
self extensionMethodNames pairWiseDo:[:className :selector | |
5481 |
|cls| |
|
9585 | 5482 |
|
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5483 |
cls := Smalltalk loadedClassNamed:className. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5484 |
cls isNil ifTrue:[ |
12731 | 5485 |
Verbose == true ifTrue:[ |
5486 |
Transcript showCR:(self name,' missing extension class "',className,'".'). |
|
5487 |
]. |
|
10140 | 5488 |
^ false |
5489 |
]. |
|
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
5490 |
"there is no possibility that we installed an extension method in an unloaded class" |
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
5491 |
(cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
12731 | 5492 |
Verbose == true ifTrue:[ |
5493 |
Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
|
5494 |
]. |
|
10140 | 5495 |
^ false |
5496 |
]. |
|
9627 | 5497 |
]. |
5498 |
^ true. |
|
5499 |
||
5500 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 5501 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 5502 |
! |
5503 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5504 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5505 |
"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
|
5506 |
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
|
5507 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5508 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5509 |
classNames do:[:eachClassName | |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5510 |
|cls| |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5511 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5512 |
cls := Smalltalk loadedClassNamed:eachClassName. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5513 |
cls isNil ifTrue:[ |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
5514 |
(self name,' [info]: missing class: ',eachClassName) infoPrintCR. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5515 |
^ false |
10154 | 5516 |
]. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5517 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
5518 |
(self name,' [info]: unloaded class: ',eachClassName) infoPrintCR. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5519 |
^ false. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5520 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5521 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5522 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
5523 |
^ true |
10154 | 5524 |
! |
5525 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
5526 |
hasExtensionMethods |
9850 | 5527 |
^ self extensionMethodNames notEmpty |
5528 |
||
5529 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 5530 |
! |
5531 |
||
12369 | 5532 |
hasPostLoadAction |
5533 |
"/ true if postLoadAction has been redefined |
|
5534 |
^ (self class whichClassIncludesSelector:#postLoadAction) theNonMetaclass isAbstract not |
|
5535 |
! |
|
5536 |
||
5537 |
hasPostUnloadAction |
|
5538 |
"/ true if postUnloadAction has been redefined |
|
5539 |
^ (self class whichClassIncludesSelector:#postUnloadAction) theNonMetaclass isAbstract not |
|
5540 |
! |
|
5541 |
||
5542 |
hasPreLoadAction |
|
5543 |
"/ true if preLoadAction has been redefined |
|
5544 |
^ (self class whichClassIncludesSelector:#preLoadAction) theNonMetaclass isAbstract not |
|
5545 |
! |
|
5546 |
||
5547 |
hasPreUnloadAction |
|
5548 |
"/ true if preUnloadAction has been redefined |
|
5549 |
^ (self class whichClassIncludesSelector:#preUnloadAction) theNonMetaclass isAbstract not |
|
5550 |
! |
|
5551 |
||
10140 | 5552 |
isFullyLoaded |
13167 | 5553 |
^ self hasAllCompiledClassesFullyLoaded |
5554 |
and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
|
10140 | 5555 |
|
5556 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
13167 | 5557 |
"Modified: / 09-12-2010 / 12:32:31 / cg" |
12331 | 5558 |
! |
5559 |
||
5560 |
projectType |
|
5561 |
^ self subclassResponsibility |
|
9585 | 5562 |
! ! |
5563 |
||
10774 | 5564 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
5565 |
||
5566 |
showClassDocumentationOf:aClass |
|
12198
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
5567 |
"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
|
5568 |
or hidden. |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
5569 |
(used for expecco, to suppress documentation of workflow- and expecco classes |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
5570 |
in the expecco-class browser)" |
10774 | 5571 |
|
5572 |
^ true |
|
5573 |
||
5574 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
5575 |
! ! |
|
5576 |
||
9726 | 5577 |
!ProjectDefinition class methodsFor:'sanity checks'! |
5578 |
||
5579 |
validateDescription |
|
9956 | 5580 |
|emptyProjects nonProjects emptyOrNonProjects| |
5581 |
||
5582 |
emptyProjects := Set withAll:self subProjects. |
|
5583 |
Smalltalk allClassesDo:[:cls | |
|
5584 |
emptyProjects remove:(cls package) ifAbsent:[]. |
|
5585 |
]. |
|
5586 |
nonProjects := self subProjects select:[:p | |
|
5587 |
(ProjectDefinition definitionClassForPackage: p) isNil |
|
5588 |
]. |
|
5589 |
||
5590 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
5591 |
emptyOrNonProjects addAll:nonProjects. |
|
5592 |
||
5593 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
5594 |
(Dialog |
|
5595 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
|
5596 |
, ((emptyOrNonProjects |
|
5597 |
asSortedCollection |
|
5598 |
collect:[:p | p allBold]) |
|
5599 |
asStringWith:'\ ') |
|
5600 |
, '\\Continue ?') withCRs |
|
5601 |
yesLabel:'OK' noLabel:'Cancel') |
|
5602 |
ifFalse:[ |
|
5603 |
AbortSignal raise |
|
5604 |
]. |
|
5605 |
]. |
|
5606 |
||
5607 |
"Modified: / 19-09-2006 / 20:30:39 / cg" |
|
9726 | 5608 |
! ! |
5609 |
||
9585 | 5610 |
!ProjectDefinition class methodsFor:'testing'! |
5611 |
||
12312
b7911695c261
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12309
diff
changeset
|
5612 |
isAbstract |
b7911695c261
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12309
diff
changeset
|
5613 |
^ self == ProjectDefinition |
b7911695c261
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12309
diff
changeset
|
5614 |
! |
b7911695c261
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12309
diff
changeset
|
5615 |
|
9664 | 5616 |
isApplicationDefinition |
5617 |
^ false |
|
5618 |
||
5619 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 5620 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
5621 |
! |
|
5622 |
||
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5623 |
isConsoleApplication |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5624 |
^ false |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5625 |
|
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5626 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5627 |
! |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
5628 |
|
9983 | 5629 |
isGUIApplication |
5630 |
^ false |
|
5631 |
||
5632 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 5633 |
! |
5634 |
||
5635 |
isLibraryDefinition |
|
5636 |
^ false |
|
5637 |
||
5638 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 5639 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 5640 |
! |
5641 |
||
9627 | 5642 |
isProjectDefinition |
9664 | 5643 |
"concrete i.e. not abstract" |
5644 |
||
13285 | 5645 |
^ self ~~ ProjectDefinition "/ skip myself - I am abstract |
9627 | 5646 |
|
5647 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
13285 | 5648 |
"Modified: / 08-02-2011 / 10:03:49 / cg" |
9585 | 5649 |
! ! |
5650 |
||
9569 | 5651 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 5652 |
|
5653 |
version |
|
13285 | 5654 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.333 2011-02-08 09:04:01 cg Exp $' |
12086 | 5655 |
! |
5656 |
||
5657 |
version_CVS |
|
13285 | 5658 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.333 2011-02-08 09:04:01 cg Exp $' |
9536 | 5659 |
! ! |
9714 | 5660 |
|
5661 |
ProjectDefinition initialize! |