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