author | Stefan Vogel <sv@exept.de> |
Thu, 28 Feb 2013 21:42:21 +0100 | |
changeset 14809 | 73b14aa528a3 |
parent 14808 | 9b6499b3ca93 |
child 14812 | bdbf34a42482 |
permissions | -rw-r--r-- |
9553 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3 |
All Rights Reserved |
9553 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9536 | 13 |
|
9569 | 14 |
Object subclass:#ProjectDefinition |
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
15 |
instanceVariableNames:'' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
16 |
classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
17 |
PackagesBeingLoaded Verbose AbbrevDictionary AccessLock' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
18 |
poolDictionaries:'' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
19 |
category:'System-Support-Projects' |
9536 | 20 |
! |
21 |
||
14580 | 22 |
ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded' |
9607 | 23 |
|
24 |
" |
|
25 |
No other class instance variables are inherited by this class. |
|
26 |
" |
|
27 |
! |
|
28 |
||
13592 | 29 |
Object subclass:#AbbrevEntry |
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
30 |
instanceVariableNames:'className fileName category numClassInstVars' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
31 |
classVariableNames:'' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
32 |
poolDictionaries:'' |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
33 |
privateIn:ProjectDefinition |
13592 | 34 |
! |
35 |
||
9569 | 36 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 37 |
|
12210 | 38 |
buildingMakefiles |
39 |
" |
|
40 |
You can define additional rules and flag settings for use in the makeFile generation: |
|
41 |
||
42 |
redefinable build-file attributes: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
43 |
stcOptimizationOptions -> STCLOCALOPT |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
44 |
stcWarningOptions -> STCLOCALOPT |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
45 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
46 |
localIncludes_win32 -> LOCALINCLUDES (bc.mak) |
13419 | 47 |
|
48 |
for applications: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
49 |
startupClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
50 |
startupSelector |
13419 | 51 |
|
52 |
for libraries: |
|
12210 | 53 |
|
54 |
" |
|
55 |
! |
|
56 |
||
9553 | 57 |
copyright |
58 |
" |
|
59 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
60 |
All Rights Reserved |
9553 | 61 |
|
62 |
This software is furnished under a license and may be used |
|
63 |
only in accordance with the terms of that license and with the |
|
64 |
inclusion of the above copyright notice. This software may not |
|
65 |
be provided or otherwise made available to, or used by, any |
|
66 |
other person. No title to or ownership of the software is |
|
67 |
hereby transferred. |
|
68 |
" |
|
9714 | 69 |
! |
70 |
||
71 |
documentation |
|
72 |
" |
|
12210 | 73 |
As ST/X is (still) very tightly bound with stc, we keep the package and project information |
74 |
in a class-object (instead of some Project-object). This has the advantage, that it can be |
|
75 |
compiled and included in a compiled class library just like any other class. |
|
76 |
Every package includes an subclass of me (an instance of my meta), which provides useful |
|
77 |
information about the versioning and packaging. Me myself, I know how to generate dependency |
|
78 |
information and can generate makefiles and other build-support files for compilation. |
|
79 |
||
80 |
Some special notes about extension methods: |
|
81 |
if a package is loaded (Smalltalk loadPackage:'foo:bar/baz'), any already loaded package of which |
|
82 |
methods are overwritten by an extension of this package, the other package is asked to safe those |
|
83 |
methods in its safe(ForOverwrittenMethods). Thus, if the other package or any of its classes is asked |
|
84 |
to file itself out, it can do so using the safe (otherwise, you'D not be able to checkin a class while |
|
85 |
it has an overriding extension loaded). |
|
86 |
Also, the information about which other package was in charge when a method is overwritten is recorded in |
|
87 |
extensionOverwriteInfo. This is used to correctly reinstall an overwritten method, whenever a package is |
|
88 |
unloaded. |
|
9714 | 89 |
|
90 |
" |
|
9553 | 91 |
! ! |
9536 | 92 |
|
9569 | 93 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 94 |
|
12371 | 95 |
definitionClassForMonticelloPackage:aMonicelloPackagename |
96 |
^ self definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:false |
|
97 |
||
98 |
" |
|
99 |
self definitionClassForMonticelloPackage:'foobar' |
|
100 |
" |
|
101 |
! |
|
102 |
||
103 |
definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:createIfAbsent |
|
13419 | 104 |
^ self allSubclasses |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
105 |
detect:[:eachProjectDefinition | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
106 |
eachProjectDefinition monticelloPackageName = aMonicelloPackagename ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
107 |
ifNone:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
108 |
|dfn squeakPackageInfo| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
109 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
110 |
createIfAbsent ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
111 |
dfn := ApplicationDefinition |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
112 |
definitionClassForPackage:'mc:',aMonicelloPackagename createIfAbsent:true projectType:GUIApplicationType. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
113 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
114 |
"/ if the squeak-stuff is loaded, use it. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
115 |
PackageInfo notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
116 |
squeakPackageInfo := PackageInfo allSubclasses |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
117 |
detect:[:pi | pi new packageName = aMonicelloPackagename] ifNone:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
118 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
119 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
120 |
squeakPackageInfo notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
121 |
dfn classNames:(squeakPackageInfo new classes collect:[:each | each name]). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
122 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
123 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
124 |
nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
125 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
126 |
] |
12371 | 127 |
|
128 |
" |
|
129 |
self definitionClassForMonticelloPackage:'foobar' |
|
130 |
self definitionClassForMonticelloPackage:'foobar' createIfAbsent:true |
|
131 |
" |
|
13118
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
132 |
|
06c6d0c09bb2
changed: #definitionClassForMonticelloPackage:createIfAbsent:
Claus Gittinger <cg@exept.de>
parents:
13090
diff
changeset
|
133 |
"Modified: / 30-10-2010 / 00:26:07 / cg" |
12371 | 134 |
! |
135 |
||
136 |
definitionClassForPackage:aPackageID |
|
137 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
138 |
||
139 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
140 |
! |
|
141 |
||
142 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
143 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
144 |
||
145 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
146 |
! |
|
147 |
||
148 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
149 |
|packageDefinitionClassName class| |
|
150 |
||
151 |
packageDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageID. |
|
152 |
class := Smalltalk classNamed:packageDefinitionClassName. |
|
153 |
class isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
154 |
doCreateIfAbsent ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
155 |
class := self newForPackage:aPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
156 |
"setup before prerequisites are defined" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
157 |
class setupForType:typeOrNil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
158 |
"/ look what is there and include it; is this ok ? |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
159 |
class compileDescriptionMethods |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
160 |
]. |
12371 | 161 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
162 |
typeOrNil notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
163 |
class projectType == typeOrNil ifFalse: [ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
164 |
class setupForType:typeOrNil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
165 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
166 |
]. |
12371 | 167 |
]. |
168 |
^ class |
|
169 |
||
170 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
|
171 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
172 |
! |
|
173 |
||
174 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
|
175 |
^ (self definitionClassForType:typeOrNil) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
176 |
definitionClassForPackage:newProjectID |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
177 |
createIfAbsent:createIfAbsent |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
178 |
projectType:typeOrNil |
12371 | 179 |
|
180 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
|
181 |
! |
|
182 |
||
183 |
definitionClassForType: type |
|
184 |
"answer the class that describes a give project type" |
|
185 |
||
186 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
|
187 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
188 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
189 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. "/ temporary - for backward compat. |
|
190 |
self error:'unknown project type'. |
|
191 |
||
192 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
193 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
|
194 |
! |
|
195 |
||
9559 | 196 |
newForPackage:packageID |
13419 | 197 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
198 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
199 |
package:packageID. |
9559 | 200 |
|
201 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
202 |
! |
|
203 |
||
204 |
newNamed:newName package:packageID |
|
205 |
|newClass| |
|
206 |
||
207 |
"/ for now, we are strict. |
|
208 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9569 | 209 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 210 |
|
211 |
newClass := self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
212 |
subclass:(newName asSymbol) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
213 |
instanceVariableNames:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
214 |
classVariableNames:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
215 |
poolDictionaries:'' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
216 |
category:(self defaultCategory). |
9559 | 217 |
|
218 |
newClass package:packageID asSymbol. |
|
219 |
^ newClass |
|
220 |
||
221 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
222 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 223 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 224 |
! ! |
225 |
||
9569 | 226 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 227 |
|
10716 | 228 |
allPreRequisites |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
229 |
"answer all (recursive) prerequisite project ids of myself - in random order." |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
230 |
|
13336 | 231 |
^ self allPreRequisitesWithParentDo:[:parent :prereq | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
232 |
prereq = self package ifTrue:[ Transcript showCR:('oops: %1 depends on itself' bindWith:prereq) ]. |
13336 | 233 |
] |
234 |
||
235 |
" |
|
236 |
stx_libbasic allPreRequisites |
|
237 |
stx_libbasic2 allPreRequisites |
|
238 |
stx_libview2 allPreRequisites |
|
13419 | 239 |
ubs_application allPreRequisites |
240 |
ubs_application allPreRequisitesSorted |
|
241 |
exept_expecco_application allPreRequisites |
|
242 |
exept_expeccoNET_application allPreRequisites |
|
13336 | 243 |
alspa_batch_application allPreRequisites |
244 |
" |
|
245 |
||
246 |
"Modified: / 13-04-2011 / 15:30:45 / sr" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
247 |
"Modified (comment): / 06-09-2011 / 08:26:06 / cg" |
13336 | 248 |
! |
249 |
||
250 |
allPreRequisitesSorted |
|
251 |
"answer all the prerequisites of this projects sorted in |
|
252 |
the order they are needed. |
|
253 |
Use this to e.g. compile packages in the dependency order" |
|
13419 | 254 |
|
13336 | 255 |
|allPreRequisites orderedTuples effective allPreRequisitesWithExtensions sortedPackages| |
256 |
||
257 |
orderedTuples := OrderedCollection new. |
|
258 |
||
259 |
allPreRequisites := self allPreRequisites. |
|
260 |
allPreRequisitesWithExtensions := allPreRequisites union:self extensionPackages. |
|
261 |
||
262 |
allPreRequisites do:[:eachPackageID | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
263 |
|def| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
264 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
265 |
self assert:(eachPackageID ~= self package). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
266 |
orderedTuples add:(Array with:eachPackageID with:self package). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
267 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
268 |
def := self definitionClassForPackage:eachPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
269 |
def isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
270 |
Transcript showCR:'Warning: no definition class for package: ', eachPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
271 |
effective := (self searchForPreRequisites: eachPackageID) keys. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
272 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
273 |
effective := def effectivePreRequisites union:def extensionPackages. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
274 |
effective notEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
275 |
effective do:[:eachPrerequisitePackageID| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
276 |
self assert:(eachPrerequisitePackageID ~= eachPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
277 |
orderedTuples add:(Array with:eachPrerequisitePackageID with:eachPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
278 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
279 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
280 |
]. |
13336 | 281 |
]. |
282 |
||
283 |
(orderedTuples detect:[:el | el first = el second] ifNone:nil) notNil ifTrue:[self halt]. |
|
284 |
sortedPackages := orderedTuples topologicalSort. |
|
285 |
||
286 |
"packages which only result from extension methods are used for computing the sort order, |
|
287 |
but they are not added, if not present in the first place" |
|
288 |
^ sortedPackages select:[:eachProject| allPreRequisites includes:eachProject] |
|
289 |
||
290 |
" |
|
291 |
stx_libbasic allPreRequisitesSorted |
|
292 |
stx_libbasic2 allPreRequisitesSorted |
|
293 |
stx_libwidg2 allPreRequisitesSorted |
|
294 |
exept_expecco_application allPreRequisitesSorted |
|
295 |
alspa_batch_application allPreRequisitesSorted |
|
296 |
ubs_application allPreRequisitesSorted |
|
297 |
" |
|
298 |
||
299 |
"Modified: / 13-04-2011 / 15:19:13 / sr" |
|
13411 | 300 |
"Modified: / 28-06-2011 / 14:04:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13336 | 301 |
! |
302 |
||
303 |
allPreRequisitesWithParentDo:aBlock |
|
304 |
"answer all (recursive) prerequisite project ids of myself - in random order. |
|
13695 | 305 |
If we exclude a project, but one of our prerequisite projects depends on it, |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
306 |
then what ????" |
13336 | 307 |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
308 |
|setOfAllPreRequisites toAdd| |
10716 | 309 |
|
310 |
setOfAllPreRequisites := Set new. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
311 |
toAdd := Set new. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
312 |
toAdd addAll:self effectivePreRequisites. |
10810 | 313 |
|
11752
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
314 |
"is a subproject really a prerequisite?? |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
315 |
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
|
316 |
so the following line has been deleted. |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
317 |
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
|
318 |
"/ toAdd addAll:self effectiveSubProjects. |
10716 | 319 |
|
320 |
[toAdd notEmpty] whileTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
321 |
|aPreRequisiteProjectID def| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
322 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
323 |
aPreRequisiteProjectID := toAdd removeFirst. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
324 |
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
325 |
setOfAllPreRequisites add:aPreRequisiteProjectID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
326 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
327 |
def := self definitionClassForPackage:aPreRequisiteProjectID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
328 |
def isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
329 |
Transcript showCR:'ProjectDefinition ', aPreRequisiteProjectID, ' is missing - cannot find its preRequisites.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
330 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
331 |
def effectivePreRequisites |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
332 |
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
333 |
thenDo:[:eachSubPreRequisite | |
14233
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
334 |
Verbose == true ifTrue:[ |
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
335 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' requires ', eachSubPreRequisite). |
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
336 |
]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
337 |
aBlock value:def value:eachSubPreRequisite. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
338 |
toAdd add:eachSubPreRequisite |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
339 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
340 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
341 |
"but subprojects of our prerequisites are also prerequisites" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
342 |
def effectiveSubProjects |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
343 |
select:[:eachSubSubRequisite | eachSubSubRequisite ~= self package and:[ (setOfAllPreRequisites includes:eachSubSubRequisite) not ]] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
344 |
thenDo:[:eachSubSubRequisite | |
14233
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
345 |
Verbose == true ifTrue:[ |
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
346 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' hasSub ', eachSubSubRequisite). |
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
347 |
]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
348 |
aBlock value:def value:eachSubSubRequisite. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
349 |
toAdd add:eachSubSubRequisite |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
350 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
351 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
352 |
] |
10716 | 353 |
]. |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
354 |
^ setOfAllPreRequisites. |
10716 | 355 |
|
356 |
" |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
357 |
stx_libbasic allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
358 |
stx_libbasic2 allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
359 |
stx_libview2 allPreRequisites |
13419 | 360 |
ubs_application allPreRequisites |
361 |
ubs_application allPreRequisitesSorted |
|
362 |
exept_expecco_application allPreRequisites |
|
363 |
exept_expeccoNET_application allPreRequisites |
|
10716 | 364 |
alspa_batch_application allPreRequisites |
365 |
" |
|
13336 | 366 |
|
367 |
"Created: / 13-04-2011 / 15:23:21 / sr" |
|
14233
e4ef9164b628
changed: #allPreRequisitesWithParentDo:
Claus Gittinger <cg@exept.de>
parents:
14060
diff
changeset
|
368 |
"Modified: / 20-07-2012 / 18:29:31 / cg" |
10810 | 369 |
! |
370 |
||
12575 | 371 |
directory |
372 |
"for packageId compatibility" |
|
373 |
||
374 |
^ self moduleDirectory |
|
375 |
||
376 |
" |
|
377 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
378 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 379 |
stx_libbasic3 moduleDirectory |
380 |
cg_croquet moduleDirectory |
|
381 |
cg_croquet package asPackageId module |
|
382 |
cg_croquet moduleDirectory |
|
383 |
stx_goodies_xml_vw moduleDirectory |
|
12575 | 384 |
" |
385 |
||
386 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
387 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
|
388 |
! |
|
389 |
||
13823 | 390 |
extensionsRevisionInfoForManager:managerOrNil |
391 |
"return the revisionInfo object for my extensions for a particular source code manager. |
|
392 |
Return nil, if there is either no manager, or I have no extensions" |
|
393 |
||
394 |
|mgr versionMethod revString| |
|
395 |
||
396 |
(mgr := managerOrNil) isNil ifTrue:[ |
|
397 |
mgr := SourceCodeManagerUtilities default sourceCodeManagerFor:self. |
|
398 |
mgr isNil ifTrue:[ |
|
399 |
^ nil |
|
400 |
]. |
|
401 |
]. |
|
402 |
||
403 |
versionMethod := mgr nameOfVersionMethodForExtensions. |
|
404 |
(self class implements:versionMethod) ifFalse:[^ nil]. |
|
405 |
||
406 |
revString := self perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
|
407 |
revString isNil ifTrue:[ |
|
408 |
^ nil. |
|
409 |
]. |
|
410 |
^ mgr revisionInfoFromString:revString. |
|
411 |
||
412 |
" |
|
413 |
(stx_libcomp extensionsRevisionInfoForManager:nil) revision |
|
414 |
(stx_libbasic extensionsRevisionInfoForManager:nil) |
|
415 |
" |
|
416 |
||
417 |
"Created: / 25-11-2011 / 14:34:01 / cg" |
|
418 |
! |
|
419 |
||
9536 | 420 |
initialClassNameForDefinitionOf:aPackageId |
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
421 |
"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
|
422 |
|
9536 | 423 |
|s| |
424 |
||
425 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
|
426 |
(s endsWith:$_) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
427 |
s := s copyWithoutLast:1 |
9536 | 428 |
]. |
429 |
^ s |
|
430 |
||
12186 | 431 |
" |
13419 | 432 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
433 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic' |
|
434 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
12186 | 435 |
" |
9536 | 436 |
|
437 |
"Created: / 09-08-2006 / 17:44:47 / fm" |
|
438 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
|
439 |
! |
|
440 |
||
441 |
libraryName |
|
9575 | 442 |
^ self package asPackageId libraryName |
9536 | 443 |
|
9559 | 444 |
" |
9688 | 445 |
bosch_dapasx_datenbasis libraryName |
9575 | 446 |
stx_libbasic3 libraryName |
9559 | 447 |
" |
9536 | 448 |
|
449 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 450 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 451 |
! |
452 |
||
13419 | 453 |
libraryNameFor:aProjectID |
9575 | 454 |
^ aProjectID asPackageId libraryName |
9536 | 455 |
|
9559 | 456 |
" |
9575 | 457 |
bosch_dapasx_datenbasis libraryName |
458 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
13419 | 459 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 460 |
" |
9536 | 461 |
|
462 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 463 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 464 |
! |
465 |
||
14577 | 466 |
loadDirectory |
467 |
"if I was loaded from a directory (as oposed to loaded via a dll or from a scm), |
|
468 |
return that directory. Otherwise return nil." |
|
469 |
||
14583 | 470 |
^ self getAttribute:#projectDirectory |
14577 | 471 |
! |
472 |
||
473 |
loadDirectory:aDirectory |
|
474 |
"remember the directory from which I was loaded from" |
|
475 |
||
14583 | 476 |
self setAttribute:#projectDirectory to:aDirectory |
14577 | 477 |
! |
478 |
||
9536 | 479 |
module |
9559 | 480 |
^ self moduleOfClass:self |
9536 | 481 |
|
9559 | 482 |
" |
483 |
bosch_dapasx_datenbasis_Definition module |
|
484 |
DapasX_Datenbasis module |
|
13419 | 485 |
stx_libbasic3 module |
486 |
stx_libbasic3 directory |
|
9559 | 487 |
" |
9536 | 488 |
|
489 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
490 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 491 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 492 |
! |
493 |
||
494 |
moduleDirectory |
|
9575 | 495 |
^ (PackageId from:self package) directory |
9536 | 496 |
|
9559 | 497 |
" |
9575 | 498 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
499 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 500 |
stx_libbasic3 moduleDirectory |
501 |
cg_croquet moduleDirectory |
|
502 |
cg_croquet package asPackageId module |
|
503 |
cg_croquet moduleDirectory |
|
504 |
stx_goodies_xml_vw moduleDirectory |
|
14339 | 505 |
cg_demos_demo1 moduleDirectory |
9559 | 506 |
" |
9536 | 507 |
|
508 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
14339 | 509 |
"Modified (comment): / 05-09-2012 / 10:07:18 / cg" |
9536 | 510 |
! |
511 |
||
13419 | 512 |
moduleDirectoryFor:aProjectID |
9559 | 513 |
^ (aProjectID subStrings:$:) last |
9536 | 514 |
|
9559 | 515 |
" |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
516 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
517 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
9559 | 518 |
" |
9536 | 519 |
|
520 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 521 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 522 |
! |
523 |
||
9891 | 524 |
moduleDirectory_win32 |
525 |
^ (PackageId from:self package) directory copy replaceAll:$/ with:$\ |
|
526 |
||
527 |
" |
|
528 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
529 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
13419 | 530 |
stx_libbasic3 moduleDirectory_win32 |
9891 | 531 |
" |
532 |
||
533 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
534 |
! |
|
535 |
||
10562 | 536 |
moduleDirectory_win32For: projectID |
537 |
||
538 |
^(self moduleDirectoryFor:projectID) copy replaceAll:$/ with:$\ |
|
539 |
||
540 |
" |
|
541 |
self moduleDirectory_win32For: #'bosch:dapasx/pav_vergleich' |
|
542 |
self moduleDirectory_win32For: #'stx:goodies/xml/stx' |
|
543 |
self moduleDirectory_win32For: #'stx:libbasic2' |
|
544 |
" |
|
545 |
! |
|
546 |
||
13419 | 547 |
moduleFor:aProjectID |
9559 | 548 |
^ (aProjectID subStrings:$:) first |
9536 | 549 |
|
9559 | 550 |
" |
551 |
DapasXProject module |
|
552 |
DapasX_Datenbasis module |
|
553 |
" |
|
9536 | 554 |
|
555 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 556 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 557 |
! |
558 |
||
13419 | 559 |
moduleOfClass:aClass |
9559 | 560 |
^ self moduleFor:aClass package |
9536 | 561 |
|
9559 | 562 |
" |
563 |
DapasXProject module |
|
564 |
DapasX_Datenbasis module |
|
565 |
" |
|
9536 | 566 |
|
567 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 568 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 569 |
! |
570 |
||
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
571 |
monticelloPackageName |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
572 |
"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
|
573 |
|
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
574 |
^ nil |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
575 |
! |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
576 |
|
9559 | 577 |
msdosPathToPackage:toPackageID from:fromPackageID |
578 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
13419 | 579 |
|
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
|
580 |
|parts1 parts2 common up down| |
9852 | 581 |
|
582 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
583 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
584 |
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
|
585 |
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
|
586 |
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
|
587 |
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
|
588 |
down isEmpty ifTrue:[^ '.']. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
589 |
^ down. |
9852 | 590 |
]. |
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
|
591 |
down isEmpty ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
592 |
^ up. |
9714 | 593 |
]. |
13419 | 594 |
^ up, '\', down |
9901 | 595 |
|
9559 | 596 |
" |
597 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
13419 | 598 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
599 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
600 |
self msdosPathToPackage:'exept:expecco' from:'exept:expecco/application' |
|
601 |
self msdosPathToPackage:'exept:expecco/application' from:'exept:expecco' |
|
9559 | 602 |
" |
9536 | 603 |
|
9559 | 604 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 605 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 606 |
! |
607 |
||
9714 | 608 |
msdosPathToTopFor:aProjectID |
9559 | 609 |
"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 | 610 |
|
9852 | 611 |
|parts| |
612 |
||
613 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
614 |
||
615 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
616 |
parts size == 1 ifTrue:[^ '.']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
617 |
^ (((2 to:parts size-1) collect:[:p | '..\']) asStringWith:'') , '..' |
9852 | 618 |
]. |
619 |
||
13419 | 620 |
^ ((parts collect:[:p | '..\']) asStringWith:'') , 'stx' |
621 |
||
622 |
" |
|
623 |
self msdosPathToTopFor: #'bosch' |
|
624 |
self msdosPathToTopFor: #'bosch:dapasx' |
|
625 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
|
626 |
self msdosPathToTopFor: #'stx' |
|
627 |
self msdosPathToTopFor: #'stx:libview' |
|
628 |
self msdosPathToTopFor: #'stx:goodies/foo' |
|
9559 | 629 |
" |
9536 | 630 |
|
631 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 632 |
"Modified: / 14-09-2006 / 14:49:17 / cg" |
9559 | 633 |
! |
634 |
||
12028 | 635 |
packageDirectory |
14577 | 636 |
"if I was loaded from a directory (as oposed to loaded via a dll or from a scm), |
637 |
return that directory. |
|
638 |
Otherwise ask Smalltalk for my package directory a long the package path." |
|
639 |
||
14580 | 640 |
|loadDirectory| |
641 |
||
14586 | 642 |
(loadDirectory := self loadDirectory) ifNotNil:[ ^ loadDirectory ]. |
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
643 |
^ Smalltalk packageDirectoryForPackageId: self package |
12028 | 644 |
|
645 |
"Created: / 15-06-2009 / 12:01:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
646 |
! |
|
647 |
||
9536 | 648 |
packageName |
9688 | 649 |
"the last component" |
9536 | 650 |
|
9688 | 651 |
^ self packageNameFor: self package |
9536 | 652 |
|
9688 | 653 |
" |
10810 | 654 |
stx_libwidg2 packageName |
9688 | 655 |
bosch_dapasx_hw_schnittstellen packageName |
656 |
bosch_dapasx_datenbasis packageName |
|
13419 | 657 |
bosch_dapasx_parameter_system packageName |
9688 | 658 |
" |
9536 | 659 |
|
660 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
661 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
662 |
! |
|
663 |
||
664 |
packageNameFor: aProjectID |
|
9688 | 665 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 666 |
|
9688 | 667 |
" |
668 |
bosch_dapasx_hw_schnittstellen packageName |
|
669 |
bosch_dapasx_datenbasis packageName |
|
13419 | 670 |
bosch_dapasx_parameter_system packageName |
671 |
cg_croquet packageName |
|
672 |
stx_goodies_xml_vw packageName |
|
673 |
stx_goodies_xml_vw packageDirectory |
|
9688 | 674 |
" |
9536 | 675 |
|
676 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
677 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
678 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
679 |
! |
|
680 |
||
681 |
parentProject |
|
10306 | 682 |
^ (self parentProjectFor: self package) |
9536 | 683 |
|
684 |
" |
|
685 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
686 |
DapasX_Datenbasis parentProject |
|
687 |
" |
|
688 |
||
689 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
690 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
691 |
! |
|
692 |
||
693 |
parentProjectFor: aProjectID |
|
10306 | 694 |
^ (aProjectID subStrings: $/) first |
9536 | 695 |
|
696 |
" |
|
9664 | 697 |
bosch_dapasx_hw_schnittstellen parentProject |
9536 | 698 |
" |
699 |
||
700 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
701 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9664 | 702 |
"Modified: / 23-08-2006 / 15:07:36 / cg" |
9536 | 703 |
! |
704 |
||
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
705 |
pathSeparator:platformName |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
706 |
platformName == #unix ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
707 |
^ self pathSeparator_unix |
9850 | 708 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
709 |
platformName == #win32 ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
710 |
^ self pathSeparator_win32 |
9850 | 711 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
712 |
self error:'unknown operating system platform'. |
9850 | 713 |
|
714 |
"Created: / 14-09-2006 / 13:38:00 / cg" |
|
715 |
! |
|
716 |
||
717 |
pathSeparator_unix |
|
718 |
^ $/ |
|
719 |
||
720 |
"Created: / 14-09-2006 / 13:37:18 / cg" |
|
721 |
! |
|
722 |
||
723 |
pathSeparator_win32 |
|
724 |
^ $\ |
|
725 |
||
726 |
"Created: / 14-09-2006 / 13:37:23 / cg" |
|
727 |
! |
|
728 |
||
729 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
730 |
"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" |
|
731 |
||
732 |
|p| |
|
733 |
||
734 |
arch == #unix ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
735 |
p := (self pathToPackage_unix:aPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
736 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
737 |
^ p , '/' , aBaseFilename |
9850 | 738 |
]. |
739 |
arch == #win32 ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
740 |
p := self pathToPackage_win32:aPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
741 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
742 |
^ p , '\' , aBaseFilename |
9850 | 743 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
744 |
self error:'unknown operating system platform'. |
9850 | 745 |
|
746 |
"Created: / 14-09-2006 / 13:29:20 / cg" |
|
747 |
! |
|
748 |
||
749 |
pathToPackage_unix:aPackageID |
|
750 |
"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" |
|
751 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
752 |
|rel| |
9850 | 753 |
|
9880 | 754 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
755 |
^ self unixPathToPackage:aPackageID from:self package |
9880 | 756 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
757 |
rel := self topRelativePathToPackage_unix:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
758 |
(rel startsWith:'stx/') ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
759 |
^ '$(TOP)/', (rel copyFrom:'stx/' size + 1). |
9850 | 760 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
761 |
^ '$(TOP)/../', rel |
9850 | 762 |
] |
763 |
||
764 |
" |
|
13419 | 765 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/kernel' |
766 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/support' |
|
767 |
stx_libbasic pathToPackage_unix:'bosch:dapasx/kernel' |
|
9850 | 768 |
" |
769 |
||
770 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
771 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 772 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
9850 | 773 |
! |
774 |
||
13419 | 775 |
pathToPackage_win32:aPackageID |
9850 | 776 |
"Returns the path to the package defined by aPackageID relative to my path" |
13419 | 777 |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
778 |
|rel| |
9850 | 779 |
|
9880 | 780 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
781 |
^ self msdosPathToPackage:aPackageID from:self package |
9880 | 782 |
]. |
783 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
784 |
rel := self topRelativePathToPackage_win32:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
785 |
(rel startsWith:'stx\') ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
786 |
^ '$(TOP)\', (rel copyFrom:'stx\' size + 1). |
9850 | 787 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
788 |
^ '$(TOP)\..\', rel |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
789 |
] |
9850 | 790 |
|
791 |
" |
|
13419 | 792 |
self pathToPackage_win32:'bosch:dapasx/kernel' |
793 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/kernel' |
|
794 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/support' |
|
795 |
stx_libbasic pathToPackage_win32:'bosch:dapasx/kernel' |
|
9850 | 796 |
" |
797 |
||
798 |
"Created: / 14-09-2006 / 13:22:52 / cg" |
|
9880 | 799 |
"Modified: / 14-09-2006 / 15:28:45 / cg" |
9850 | 800 |
! |
801 |
||
9714 | 802 |
pathToTop_unix |
803 |
"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" |
|
804 |
||
9852 | 805 |
^ self unixPathToTopFor:self package. |
9714 | 806 |
|
807 |
" |
|
13419 | 808 |
bosch_dapasx_kernel pathToTop_unix |
809 |
stx_goodies_xml pathToTop_unix |
|
810 |
stx_libhtml pathToTop_unix |
|
811 |
stx_goodies_refactoryBrowser_changes pathToTop_unix |
|
9714 | 812 |
" |
813 |
||
814 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 815 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 816 |
! |
817 |
||
818 |
pathToTop_win32 |
|
819 |
"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" |
|
820 |
||
13419 | 821 |
^self msdosPathToTopFor: self package |
822 |
||
823 |
" |
|
824 |
bosch_dapasx_datenbasis pathToTop_win32 |
|
825 |
stx_libbasic pathToTop_win32 |
|
9714 | 826 |
" |
827 |
||
828 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9831 | 829 |
"Modified: / 07-09-2006 / 15:51:00 / cg" |
9714 | 830 |
! |
831 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
832 |
projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
833 |
"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
|
834 |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
835 |
projectIsLoaded isNil ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
836 |
projectIsLoaded := false. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
837 |
]. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
838 |
^ projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
839 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
840 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
841 |
stx_libbasic projectIsLoaded |
13251 | 842 |
(ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
843 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
844 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
845 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
846 |
projectIsLoaded:something |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
847 |
projectIsLoaded := something. |
13251 | 848 |
something ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
849 |
"register myself as dependent - I want to get notified on method changes" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
850 |
self class addDependent:self. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
851 |
]. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
852 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
853 |
|
9536 | 854 |
requiredProjects |
11479 | 855 |
^ self effectivePreRequisites , self subProjects |
9536 | 856 |
! |
857 |
||
9850 | 858 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
13419 | 859 |
"Returns the path to stx counting the number of $/ and $: in the package name |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
860 |
and adding for each one '../' to get the ST/X top directory" |
9850 | 861 |
|
862 |
|p| |
|
863 |
||
864 |
arch == #unix ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
865 |
p := (self topRelativePathToPackage_unix:aPackageID). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
866 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
867 |
^ p , '/' , aBaseFilename |
9850 | 868 |
]. |
869 |
arch == #win32 ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
870 |
p := self topRelativePathToPackage_win32:aPackageID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
871 |
aBaseFilename isNil ifTrue:[^ p]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
872 |
^ p , '\' , aBaseFilename |
9850 | 873 |
]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
874 |
self error:'unknown operating system platform'. |
9850 | 875 |
|
876 |
"Created: / 14-09-2006 / 13:34:05 / cg" |
|
877 |
! |
|
878 |
||
13419 | 879 |
topRelativePathToPackage_unix:aPackageID |
9850 | 880 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
13419 | 881 |
|
9850 | 882 |
^ aPackageID asString copy replaceAny:':/' with:$/ |
883 |
||
884 |
" |
|
885 |
self topRelativePathToPackage_unix:'stx:goodies/xml' |
|
886 |
self topRelativePathToPackage_unix:'bosch:dapasx/kernel' |
|
887 |
" |
|
888 |
||
889 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
890 |
! |
|
891 |
||
13419 | 892 |
topRelativePathToPackage_win32:aPackageID |
9559 | 893 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
13419 | 894 |
|
9559 | 895 |
^ aPackageID asString copy replaceAny:':/' with:$\ |
896 |
||
897 |
" |
|
9850 | 898 |
self topRelativePathToPackage_win32:'stx:goodies/xml' |
899 |
self topRelativePathToPackage_win32:'bosch:dapasx/kernel' |
|
9559 | 900 |
" |
9536 | 901 |
|
9850 | 902 |
"Created: / 14-09-2006 / 13:20:12 / cg" |
9852 | 903 |
! |
904 |
||
9880 | 905 |
unixPathToPackage:toPackageID from:fromPackageID |
906 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
13419 | 907 |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
908 |
|parts1 parts2 common up down rel| |
9880 | 909 |
|
910 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
911 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
912 |
common := parts1 commonPrefixWith:parts2. |
|
913 |
common notEmpty ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
914 |
up := ((1 to:parts1 size - common size) collect:[:p | '../']) asStringWith:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
915 |
down := (parts2 copyFrom:common size+1) asStringWith:'/'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
916 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
917 |
^ up , down |
9880 | 918 |
]. |
919 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
920 |
rel := (self topRelativePathToPackage_unix:toPackageID). |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
921 |
(rel startsWith:'stx/') ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
922 |
^ '$(TOP)', (rel copyFrom:'stx/' size) |
9880 | 923 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
924 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
925 |
^ '$(TOP)/../', rel. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
926 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
927 |
"/ pTop := self unixPathToTopFor:fromPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
928 |
"/ (pTop endsWith:'/stx') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
929 |
"/ pTop := pTop copyButLast:'stx' size. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
930 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
931 |
"/ pTop isEmpty ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
932 |
"/ pTop := '../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
933 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
934 |
"/ pTop := pTop, '/../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
935 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
936 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
937 |
"/ ^ pTop, (self topRelativePathToPackage_unix:toPackageID) |
9880 | 938 |
|
939 |
" |
|
10713 | 940 |
self unixPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
13419 | 941 |
self unixPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
942 |
self unixPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
9880 | 943 |
" |
944 |
||
945 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
946 |
! |
|
947 |
||
9852 | 948 |
unixPathToTopFor:aProjectID |
949 |
"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" |
|
950 |
||
951 |
|parts| |
|
952 |
||
953 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
954 |
||
955 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
956 |
parts size == 1 ifTrue:[^ '']. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
957 |
^ (((2 to:parts size-1) collect:[:p | '../']) asStringWith:'') , '..' |
9852 | 958 |
]. |
959 |
||
13419 | 960 |
^ ((parts collect:[:p | '../']) asStringWith:'') , 'stx' |
961 |
||
962 |
" |
|
963 |
self unixPathToTopFor: #'bosch' |
|
964 |
self unixPathToTopFor: #'bosch:dapasx' |
|
965 |
self unixPathToTopFor: #'bosch:dapasx/datenbasis' |
|
966 |
self unixPathToTopFor: #'stx' |
|
967 |
self unixPathToTopFor: #'stx:libview' |
|
968 |
self unixPathToTopFor: #'stx:goodies/foo' |
|
9852 | 969 |
" |
970 |
||
971 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
9536 | 972 |
! ! |
973 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
974 |
!ProjectDefinition class methodsFor:'accessing - packaging'! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
975 |
|
12371 | 976 |
classNames:aCollectionOfClassNames |
977 |
"set the set of classes" |
|
978 |
||
979 |
self classNamesAndAttributes:aCollectionOfClassNames usingCompiler:nil |
|
980 |
! |
|
981 |
||
982 |
classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
|
13419 | 983 |
"set the set of classes. and attributes |
984 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12371 | 985 |
which has to do the job. |
986 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
987 |
||
988 |
|oldSpec newCode| |
|
989 |
||
990 |
oldSpec := self classNamesAndAttributes. |
|
991 |
newSpec = oldSpec ifTrue: [^ self]. |
|
992 |
||
993 |
newCode := self classNamesAndAttributes_codeFor:newSpec. |
|
994 |
||
995 |
(compilerOrNil ? self compilerClass) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
996 |
compile:newCode |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
997 |
forClass:self theMetaclass |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
998 |
inCategory:'description - contents'. |
12371 | 999 |
! |
1000 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1001 |
excludeClasses:toExclude usingCompiler:compilerOrNil |
13419 | 1002 |
"exclude (remove from classList) a number of classes. |
1003 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1004 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1005 |
(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
|
1006 |
|
12371 | 1007 |
|newSpec| |
1008 |
||
1009 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1010 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1011 |
toExclude do:[:eachClassToExclude | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1012 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1013 |
className := eachClassToExclude theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1014 |
(self allClassNames includes:className) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1015 |
|idx| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1016 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1017 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1018 |
idx ~~ 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1019 |
newSpec := newSpec copyWithoutIndex:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1020 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1021 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1022 |
]. |
12371 | 1023 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1024 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1025 |
"Created: / 30-08-2007 / 18:28:28 / cg" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1026 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1027 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1028 |
includeClasses:toInclude usingCompiler:compilerOrNil |
13419 | 1029 |
"include (add to classList) a number of classes. |
1030 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1031 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1032 |
(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
|
1033 |
|
12371 | 1034 |
|oldSpec newSpec| |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1035 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1036 |
oldSpec := self classNamesAndAttributes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1037 |
newSpec := oldSpec copy. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1038 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1039 |
toInclude do:[:eachClassToInclude | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1040 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1041 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1042 |
className := eachClassToInclude theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1043 |
(self compiled_classNames includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1044 |
| idx entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1045 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1046 |
idx := oldSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1047 |
idx == 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1048 |
newSpec := newSpec copyWith:(Array with:className) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1049 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1050 |
entry := newSpec at:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1051 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1052 |
entry := entry copyWithout:#autoload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1053 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1054 |
newSpec at:idx put:entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1055 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1056 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1057 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1058 |
|
12371 | 1059 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1060 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1061 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1062 |
makeClassesAutoloaded:toMakeAutoloaded usingCompiler:compilerOrNil |
13419 | 1063 |
"include as autoloaded (add to classList) a number of classes. |
1064 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1065 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1066 |
(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
|
1067 |
|
12371 | 1068 |
|newSpec| |
1069 |
||
1070 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1071 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1072 |
toMakeAutoloaded do:[:eachClassToMakeAutoloaded | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1073 |
|className| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1074 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1075 |
className := eachClassToMakeAutoloaded theNonMetaclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1076 |
(self autoloaded_classNames includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1077 |
|idx entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1078 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1079 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1080 |
idx == 0 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1081 |
newSpec := newSpec copyWith:(Array with:className with:#autoload) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1082 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1083 |
entry := newSpec at:idx. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1084 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1085 |
entry := (entry copyWithout:#autoload) copyWith:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1086 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1087 |
entry := Array with:entry with:#autoload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1088 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1089 |
newSpec at:idx put:entry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1090 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1091 |
]. |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1092 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1093 |
|
12371 | 1094 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1095 |
! ! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1096 |
|
13411 | 1097 |
!ProjectDefinition class methodsFor:'accessing - tests'! |
1098 |
||
13419 | 1099 |
excludedFromTestSuite |
13411 | 1100 |
"List of testcases and/or tests excluded from testsuite. |
1101 |
Entries maybe ClassName or #(ClassName testName) |
|
1102 |
" |
|
1103 |
^ #() |
|
1104 |
||
1105 |
"Created: / 03-06-2011 / 16:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1106 |
! |
|
1107 |
||
1108 |
testSuite |
|
13544 | 1109 |
"generate and return a testSuite containing all of my test-classes" |
13411 | 1110 |
|
1111 |
|suite classes| |
|
1112 |
||
1113 |
suite := TestSuite named:self package. |
|
13695 | 1114 |
classes := self classes |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1115 |
select:[:each | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1116 |
each isLoaded ifFalse:[each autoload]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1117 |
(each isTestCaseLike) and:[ each isAbstract not ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1118 |
]. |
13544 | 1119 |
|
13411 | 1120 |
classes := classes asSortedCollection:[:a :b | a name <= b name ]. |
13695 | 1121 |
classes do: [:eachClass | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1122 |
| tests | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1123 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1124 |
tests := eachClass suite tests. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1125 |
tests := tests reject:[:test|self shouldExcludeTest: test]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1126 |
suite addTests: tests |
13544 | 1127 |
]. |
1128 |
^ suite |
|
13411 | 1129 |
|
1130 |
"Created: / 01-04-2011 / 15:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1131 |
"Modified: / 03-06-2011 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13568 | 1132 |
"Modified: / 08-08-2011 / 14:59:45 / cg" |
12028 | 1133 |
! ! |
1134 |
||
9714 | 1135 |
!ProjectDefinition class methodsFor:'class initialization'! |
1136 |
||
1137 |
initialize |
|
14776
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1138 |
AccessLock isNil ifTrue:[ |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1139 |
LibraryType := #Library. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1140 |
GUIApplicationType := #'GUI-Application'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1141 |
NonGUIApplicationType := #'NonGUI-Application'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1142 |
AccessLock := Semaphore forMutualExclusion name:'ProjectDefinition Lock'. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1143 |
Verbose := false. |
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1144 |
]. |
9714 | 1145 |
|
10121 | 1146 |
" |
1147 |
self initialize |
|
1148 |
" |
|
1149 |
||
13592 | 1150 |
"Modified: / 18-08-2011 / 13:48:31 / cg" |
10121 | 1151 |
! |
1152 |
||
1153 |
initializeAllProjectDefinitions |
|
1154 |
"needs everything else (especially the compiler etc.) to be initialized. |
|
1155 |
Therefore, its not invoked by #initialize, but instead explicitely, |
|
1156 |
by Smalltalk" |
|
13695 | 1157 |
|
13609 | 1158 |
|isStandAloneApp| |
1159 |
||
1160 |
isStandAloneApp := Smalltalk isStandAloneApp. |
|
1161 |
||
1162 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1163 |
eachProjectDefinitionClass isAbstract ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1164 |
isStandAloneApp ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1165 |
eachProjectDefinitionClass installAutoloadedClasses. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1166 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1167 |
eachProjectDefinitionClass projectIsLoaded:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1168 |
] |
13609 | 1169 |
]. |
10115 | 1170 |
|
9714 | 1171 |
" |
1172 |
self initialize |
|
1173 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1174 |
|
10121 | 1175 |
"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
|
1176 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1177 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1178 |
installAutoloadedClasses |
12372 | 1179 |
"install all of my autoloaded classes (if any)" |
1180 |
||
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1181 |
|classesToFixClassFileName| |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1182 |
|
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1183 |
classesToFixClassFileName := OrderedCollection new. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1184 |
|
13592 | 1185 |
self autoloaded_classNames do:[:className | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1186 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1187 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1188 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1189 |
(cls := Smalltalk classNamed:className) isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1190 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1191 |
(self name,' [warning]: failed to install autoloaded: ',className) errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1192 |
(self name,' [info]: reason: ',ex description) errorPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1193 |
"/ thisContext fullPrintAll. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1194 |
] do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1195 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1196 |
installAutoloadedClassNamed:className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1197 |
category:'* as yet unknown category *' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1198 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1199 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1200 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1201 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1202 |
classesToFixClassFileName add:cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1203 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1204 |
]. |
13592 | 1205 |
]. |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1206 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1207 |
Smalltalk addStartBlock:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1208 |
|abbrevs| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1209 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1210 |
abbrevs := self abbrevs. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1211 |
"/ patch the classFileNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1212 |
classesToFixClassFileName do:[:cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1213 |
|entry classFilenameFromAbbreviations| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1214 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1215 |
entry := abbrevs at:cls name ifAbsent:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1216 |
entry notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1217 |
classFilenameFromAbbreviations := entry fileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1218 |
classFilenameFromAbbreviations notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1219 |
classFilenameFromAbbreviations := classFilenameFromAbbreviations,'.st'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1220 |
(classFilenameFromAbbreviations ~= cls getClassFilename) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1221 |
cls setClassFilename:classFilenameFromAbbreviations |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1222 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1223 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1224 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1225 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1226 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1227 |
"/ patch the categories |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1228 |
Class withoutUpdatingChangesDo:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1229 |
|entry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1230 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1231 |
self classNames do:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1232 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1233 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1234 |
((cls := Smalltalk at: nm) notNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1235 |
and:[ cls isLoaded not |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1236 |
and:[ (entry := abbrevs at:cls name ifAbsent:[nil]) notNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1237 |
]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1238 |
cls category: (entry category) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1239 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1240 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1241 |
] |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1242 |
]. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1243 |
|
13411 | 1244 |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1245 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1246 |
stx_libbasic installAutoloadedClasses |
12268
b3cd2af642f2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12264
diff
changeset
|
1247 |
stx_libhtml installAutoloadedClasses |
13592 | 1248 |
stx_libtool2 installAutoloadedClasses |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1249 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1250 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1251 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
13411 | 1252 |
"Modified: / 06-03-2011 / 18:26:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1253 |
"Modified: / 20-08-2011 / 23:32:32 / cg" |
9714 | 1254 |
! ! |
1255 |
||
9998 | 1256 |
!ProjectDefinition class methodsFor:'code generation'! |
1257 |
||
11072 | 1258 |
applicationIconFileName_code |
1259 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1260 |
s nextPutLine:'applicationIconFileName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1261 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon); will be included in the rc-resource file"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1262 |
s cr; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1263 |
nextPutLine:' ^ nil'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1264 |
nextPutLine:' "/ ^ self applicationName'. |
11072 | 1265 |
]. |
1266 |
||
1267 |
" |
|
13873 | 1268 |
self applicationIconFileName_code |
1269 |
stx_libbasic3 applicationIconFileName_code |
|
11072 | 1270 |
" |
1271 |
||
1272 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1273 |
! |
|
1274 |
||
10393 | 1275 |
classNamesAndAttributes_codeFor:aSpecArray |
1276 |
"generate method code returning all classes of the project from the given spec." |
|
1277 |
||
1278 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1279 |
s nextPutLine:'classNamesAndAttributes'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1280 |
s nextPutLine:' "lists the classes which are to be included in the project.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1281 |
s nextPutLine:' Each entry in the list may be: a single class-name (symbol),'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1282 |
s nextPutLine:' or an array-literal consisting of class name and attributes.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1283 |
s nextPutLine:' Attributes are: #autoload or #<os> where os is one of win32, unix,..."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1284 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1285 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1286 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1287 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1288 |
(self classNamesAndAttributesFromSpecArray:aSpecArray) do:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1289 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1290 |
entry storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1291 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1292 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1293 |
s nextPutLine:' )' |
10393 | 1294 |
]. |
1295 |
||
1296 |
" |
|
1297 |
stx_libbasic3 classNamesAndAttributes_codeFor:(stx_libbasic3 classNamesAndAttributes) |
|
1298 |
exept_expecco classNamesAndAttributes_codeFor:(exept_expecco classNamesAndAttributes) |
|
1299 |
" |
|
1300 |
||
1301 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1302 |
"Created: / 19-02-2007 / 15:43:27 / cg" |
|
1303 |
! |
|
1304 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1305 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 1306 |
"generate method code returning all classes of the project. |
1307 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1308 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1309 |
if false, existing entries are preserved. |
10010 | 1310 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
13419 | 1311 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1312 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 1313 |
|
10393 | 1314 |
|newSpec oldSpec ignored| |
1315 |
||
1316 |
oldSpec := self classNamesAndAttributesAsSpecArray. |
|
1317 |
ignored := self ignoredClassNames asSet. |
|
1318 |
newSpec := OrderedCollection new. |
|
1319 |
||
1320 |
ignoreOldEntries ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1321 |
oldSpec do:[:oldEntry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1322 |
|newEntry className cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1323 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1324 |
newEntry := oldEntry copy. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1325 |
className := newEntry first. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1326 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1327 |
(ignored includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1328 |
cls := Smalltalk classNamed:className. |
14354
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1329 |
cls notNil ifTrue:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1330 |
ignoreOldDefinition ifTrue:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1331 |
cls isLoaded ifFalse:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1332 |
(newEntry includes:#autoload) ifFalse:[ |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1333 |
newEntry := newEntry copyWith:#autoload. |
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1334 |
]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1335 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1336 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1337 |
"JV @ 2010-06-19 |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1338 |
Force merge default class attributes with existing ones" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1339 |
newEntry := self mergeDefaultClassAttributesFor: cls with: newEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1340 |
newSpec add:newEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1341 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1342 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1343 |
]. |
10393 | 1344 |
]. |
1345 |
||
1346 |
self searchForClasses do:[:eachClass | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1347 |
|className attributes oldSpecEntry oldAttributes newEntry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1348 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1349 |
className := eachClass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1350 |
(ignored includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1351 |
oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1352 |
|
14354
4a571b9eb43c
changed: #classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition:
Stefan Vogel <sv@exept.de>
parents:
14351
diff
changeset
|
1353 |
(ignoreOldEntries or:[oldSpecEntry isNil]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1354 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1355 |
(self additionalClassNamesAndAttributes includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1356 |
(oldSpecEntry size > 1) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1357 |
oldAttributes := oldSpecEntry copyFrom:2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1358 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1359 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1360 |
ignoreOldDefinition ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1361 |
"take autoload attribute from classes state in the image" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1362 |
oldAttributes notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1363 |
attributes := oldAttributes copyWithout:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1364 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1365 |
attributes := #() |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1366 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1367 |
eachClass isLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1368 |
attributes := attributes copyWith:#autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1369 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1370 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1371 |
"keep any existing attribute" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1372 |
oldAttributes notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1373 |
attributes := oldAttributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1374 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1375 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1376 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1377 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1378 |
"JV @ 2010-06-19 |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1379 |
Support fo additional class attributes and programming language attribute" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1380 |
attributes := self mergeDefaultClassAttributesFor: eachClass with: attributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1381 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1382 |
newEntry := Array with:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1383 |
attributes notEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1384 |
newEntry := newEntry , attributes. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1385 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1386 |
newSpec add:newEntry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1387 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1388 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1389 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1390 |
] |
9998 | 1391 |
]. |
10393 | 1392 |
^ self classNamesAndAttributes_codeFor:newSpec |
1393 |
||
13419 | 1394 |
" |
10393 | 1395 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
1396 |
exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
1397 |
" |
|
9998 | 1398 |
|
1399 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1400 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
13411 | 1401 |
"Modified: / 19-06-2010 / 10:56:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
1402 |
"Modified: / 06-09-2011 / 07:48:52 / cg" |
9998 | 1403 |
! |
1404 |
||
1405 |
companyName_code |
|
12541 | 1406 |
^ self companyName_codeFor:self companyName |
1407 |
||
1408 |
" |
|
1409 |
self companyName_code |
|
1410 |
stx_libbasic3 companyName_code |
|
1411 |
" |
|
1412 |
||
1413 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1414 |
! |
|
1415 |
||
1416 |
companyName_codeFor:aString |
|
9998 | 1417 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1418 |
s nextPutLine:'companyName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1419 |
s nextPutLine:' "Return a companyname which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1420 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1421 |
]. |
1422 |
||
1423 |
" |
|
1424 |
self companyName_code |
|
1425 |
stx_libbasic3 companyName_code |
|
1426 |
" |
|
1427 |
||
1428 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1429 |
! |
|
1430 |
||
1431 |
compileDescriptionMethods |
|
1432 |
(self isLibraryDefinition |
|
1433 |
or:[ self isApplicationDefinition ] ) ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1434 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
9998 | 1435 |
]. |
1436 |
||
13419 | 1437 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1438 |
forEachMethodsCodeToCompileDo:[:code :category | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1439 |
self compile:code categorized:category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1440 |
]. |
9998 | 1441 |
|
1442 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
1443 |
||
1444 |
" |
|
1445 |
DapasXProject compileDescriptionMethods |
|
1446 |
DapasX_Datenbasis compileDescriptionMethods |
|
1447 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
1448 |
stx_libbasic compileDescriptionMethods |
|
1449 |
" |
|
1450 |
||
1451 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
1452 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
1453 |
! |
|
1454 |
||
1455 |
description_code |
|
1456 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1457 |
s nextPutLine:'description'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1458 |
s nextPutLine:' "Return a description string which will appear in vc.def / bc.def"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1459 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
9998 | 1460 |
]. |
1461 |
||
1462 |
" |
|
13419 | 1463 |
self description_code |
1464 |
stx_libbasic3 description_code |
|
9998 | 1465 |
" |
1466 |
||
1467 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
1468 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
1469 |
! |
|
1470 |
||
10923 | 1471 |
effectivePreRequisites |
1472 |
"get the preRequisites, that are not excluded" |
|
1473 |
||
1474 |
|preRequisites| |
|
1475 |
||
14809 | 1476 |
preRequisites := self preRequisites asOrderedSet. "prerequisite order matters" |
10923 | 1477 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
1478 |
preRequisites remove:self package ifAbsent:[]. |
|
1479 |
||
1480 |
^ preRequisites |
|
1481 |
! |
|
1482 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1483 |
effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1484 |
"get the subProjects, that are not excluded" |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1485 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1486 |
|subProjects| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1487 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1488 |
subProjects := self subProjects asSet. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1489 |
subProjects removeAllFoundIn:self excludedFromSubProjects. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1490 |
subProjects remove:self package ifAbsent:[]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1491 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1492 |
^ subProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1493 |
! |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1494 |
|
12425 | 1495 |
excludedFromPreRequisites_code |
1496 |
"generate the code of the #excludedFromPreRequisites method" |
|
1497 |
||
1498 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1499 |
s nextPutLine:'excludedFromPreRequisites'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1500 |
s nextPutLine:' "list all packages which should be ignored in the automatic'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1501 |
s nextPutLine:' preRequisites scan. See #preRequisites for more."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1502 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1503 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1504 |
s nextPutLine:' )' |
12425 | 1505 |
]. |
1506 |
! |
|
1507 |
||
9998 | 1508 |
extensionMethodNames_code |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1509 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1510 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1511 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1512 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1513 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1514 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1515 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1516 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1517 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1518 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1519 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 1520 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1521 |
|oldSpec| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1522 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1523 |
s nextPutLine:'extensionMethodNames'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1524 |
s nextPutLine:' "lists the extension methods which are to be included in the project.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1525 |
s nextPutLine:' Entries are 2-element array literals, consisting of class-name and selector."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1526 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1527 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1528 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1529 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1530 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1531 |
ignoreOldEntries ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1532 |
oldSpec do:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1533 |
|mclassName mselector| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1534 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1535 |
mclassName := entry key asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1536 |
(mclassName endsWith:' class') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1537 |
mclassName := mclassName asString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1538 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1539 |
mselector := entry value asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1540 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1541 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1542 |
mclassName storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1543 |
s space. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1544 |
mselector storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1545 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1546 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1547 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1548 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1549 |
self searchForExtensions do:[:eachMethod | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1550 |
|attributes oldSpecEntry mclassName mselector| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1551 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1552 |
mclassName := eachMethod mclass name. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1553 |
mselector := eachMethod selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1554 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1555 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1556 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1557 |
mclassName storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1558 |
s space. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1559 |
mselector storeArrayElementOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1560 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1561 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1562 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1563 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1564 |
s nextPutLine:' )' |
9998 | 1565 |
]. |
1566 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1567 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1568 |
self extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1569 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1570 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1571 |
" |
9998 | 1572 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1573 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1574 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
9998 | 1575 |
! |
1576 |
||
1577 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
13419 | 1578 |
aTwoArgBlock |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1579 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1580 |
value:'description - contents'. |
13419 | 1581 |
|
1582 |
aTwoArgBlock |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1583 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1584 |
value: 'description - contents'. |
13419 | 1585 |
|
1586 |
aTwoArgBlock |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1587 |
value: self preRequisites_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1588 |
value: 'description'. |
13419 | 1589 |
|
1590 |
aTwoArgBlock |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1591 |
value: self excludedFromPreRequisites_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1592 |
value: 'description'. |
13411 | 1593 |
|
1594 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1595 |
aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1596 |
value: self monticelloTimestamps_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1597 |
value: 'description - monticello'. |
13411 | 1598 |
]. |
1599 |
||
1600 |
"Modified: / 09-11-2010 / 18:41:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1601 |
! |
|
1602 |
||
9998 | 1603 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
1604 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
|
1605 |
! |
|
1606 |
||
1607 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
13419 | 1608 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1609 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1610 |
ignoreOldDefinition:ignoreOldDefinition. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1611 |
|
13873 | 1612 |
"/ code like: |
1613 |
"/ |
|
1614 |
"/ (self class includesSelector:#productName) ifFalse:[ |
|
1615 |
"/ aTwoArgBlock |
|
1616 |
"/ value: self productName_code |
|
1617 |
"/ value: 'description - project information'. |
|
1618 |
"/ ]. |
|
1619 |
||
1620 |
#( |
|
1621 |
(productName productName_code) |
|
1622 |
(description description_code) |
|
1623 |
(companyName companyName_code) |
|
1624 |
(legalCopyright legalCopyright_code) |
|
1625 |
(applicationIconFileName applicationIconFileName_code) |
|
1626 |
(productInstallDirBaseName productInstallDirBaseName_code) |
|
1627 |
) pairsDo:[:selector :codeMethodSelector | |
|
1628 |
(self class includesSelector:selector) ifFalse:[ |
|
1629 |
aTwoArgBlock |
|
1630 |
value: (self perform:codeMethodSelector) |
|
1631 |
value: 'description - project information'. |
|
1632 |
]. |
|
11072 | 1633 |
]. |
9998 | 1634 |
|
13411 | 1635 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1636 |
aTwoArgBlock |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1637 |
value: self monticelloTimestamps_code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1638 |
value: 'description - monticello'. |
13411 | 1639 |
]. |
1640 |
||
9998 | 1641 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
13411 | 1642 |
"Modified: / 09-11-2010 / 18:41:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13873 | 1643 |
"Modified: / 21-12-2011 / 16:42:41 / cg" |
9998 | 1644 |
! |
1645 |
||
1646 |
legalCopyright_code |
|
1647 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1648 |
s nextPutLine:'legalCopyright'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1649 |
s nextPutLine:' "Return a copyright string which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1650 |
s cr; nextPutLine:' ^ ', self legalCopyright storeString. |
9998 | 1651 |
]. |
1652 |
||
1653 |
" |
|
13419 | 1654 |
self legalCopyright_code |
1655 |
stx_libbasic3 legalCopyright_code |
|
9998 | 1656 |
" |
1657 |
||
1658 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1659 |
! |
|
1660 |
||
1661 |
preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1662 |
"generate the code of the #preRequisites method" |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1663 |
|
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1664 |
|preRequisites searchedPreRequisites importantReason| |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1665 |
|
14808 | 1666 |
preRequisites := Set new. |
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1667 |
|
10179 | 1668 |
searchedPreRequisites := self searchForPreRequisites. |
1669 |
preRequisites addAll: (searchedPreRequisites keys). |
|
14808 | 1670 |
preRequisites addAll: (self includedInPreRequisites). |
9998 | 1671 |
|
10897
6a20c3e54653
#removeAllFoundIn: excludedFromPrerequisites
Stefan Vogel <sv@exept.de>
parents:
10875
diff
changeset
|
1672 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
10034 | 1673 |
preRequisites remove:self package ifAbsent:[]. |
9998 | 1674 |
|
1675 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1676 |
s nextPutLine:'preRequisites'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1677 |
s nextPutLine:' "list all required packages.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1678 |
s nextPutLine:' This list can be maintained manually or (better) generated and'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1679 |
s nextPutLine:' updated by scanning the superclass hierarchies and looking for'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1680 |
s nextPutLine:' global variable accesses. (the browser has a menu function for that)'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1681 |
s nextPutLine:' Howevery, often too much is found, and you may want to explicitely'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1682 |
s nextPutLine:' exclude individual packages in the #excludedFromPrerequisites method."'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1683 |
s nextPutLine:''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1684 |
s nextPutLine:' ^ #('. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1685 |
preRequisites asSortedCollection do:[:eachPackageID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1686 |
|reason| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1687 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1688 |
s spaces:8. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1689 |
eachPackageID asSymbol storeOn:s. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1690 |
reason := searchedPreRequisites at:eachPackageID ifAbsent:nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1691 |
reason notEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1692 |
"superclasses are really important" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1693 |
importantReason := reason detect:[:eachReasonString| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1694 |
eachReasonString includesString:' superclass ' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1695 |
] ifNone:[reason anElement]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1696 |
s nextPutAll:' "'; nextPutAll:importantReason; nextPutAll:' "'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1697 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1698 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1699 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1700 |
s nextPutLine:' )' |
9998 | 1701 |
]. |
1702 |
||
1703 |
" |
|
1704 |
bosch_dapasx_application preRequisites_code |
|
1705 |
demo_demoApp1 preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1706 |
stx_libbasic3 preRequisites_code |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1707 |
stx_libtool2 preRequisites_code |
9998 | 1708 |
" |
1709 |
||
1710 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1711 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
10063 | 1712 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
9998 | 1713 |
! |
1714 |
||
13873 | 1715 |
productInstallDirBaseName_code |
1716 |
^ String streamContents:[:s | |
|
1717 |
s nextPutLine:'productInstallDirBaseName'. |
|
1718 |
s nextPutLine:' "Returns a default installDir which will appear in <app>.nsi.'. |
|
1719 |
s nextPutLine:' This is usually not the one you want to keep"'. |
|
1720 |
s cr; |
|
1721 |
nextPutLine:' ^ (self package asCollectionOfSubstringsSeparatedByAny:'':/'') last'. |
|
1722 |
]. |
|
1723 |
||
1724 |
" |
|
1725 |
self productInstallDirBaseName_code |
|
1726 |
stx_libbasic3 productInstallDirBaseName_code |
|
1727 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDirBaseName_code |
|
1728 |
" |
|
1729 |
||
1730 |
"Created: / 21-12-2011 / 16:38:11 / cg" |
|
1731 |
! |
|
1732 |
||
9998 | 1733 |
productName_code |
12541 | 1734 |
^ self productName_codeFor:(self productName) |
1735 |
||
1736 |
" |
|
1737 |
self productName_code |
|
1738 |
stx_libbasic3 productName_code |
|
1739 |
" |
|
1740 |
||
1741 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
1742 |
! |
|
1743 |
||
1744 |
productName_codeFor:aString |
|
9998 | 1745 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1746 |
s nextPutLine:'productName'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1747 |
s nextPutLine:' "Return a product name which will appear in <lib>.rc"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1748 |
s cr; nextPutLine:' ^ ',aString storeString. |
9998 | 1749 |
]. |
1750 |
||
1751 |
" |
|
1752 |
self productName_code |
|
1753 |
stx_libbasic3 productName_code |
|
1754 |
" |
|
1755 |
||
1756 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
12028 | 1757 |
! |
1758 |
||
1759 |
svnRevisionNr_code: revisionNrOrNil |
|
1760 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1761 |
s nextPutLine:'svnRevisionNr'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1762 |
s nextPutLine:' "Return a SVN revision number of myself.'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1763 |
s nextPutLine:' This number is updated after a commit"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1764 |
s cr; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1765 |
nextPutLine:' ^ "$SVN-Revision:"''', revisionNrOrNil printString , '''"$"'. |
12028 | 1766 |
]. |
1767 |
||
1768 |
" |
|
1769 |
self svnRevisionNr_code |
|
1770 |
stx_libbasic3 svnRevisionNr_code |
|
1771 |
" |
|
1772 |
||
1773 |
"Created: / 16-06-2009 / 12:12:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1774 |
"Modified: / 22-08-2009 / 09:05:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
9998 | 1775 |
! ! |
1776 |
||
9569 | 1777 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 1778 |
|
9664 | 1779 |
applicationTypes |
9714 | 1780 |
GUIApplicationType isNil ifTrue:[self initialize]. |
1781 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 1782 |
|
9714 | 1783 |
" |
13419 | 1784 |
self applicationTypes |
9714 | 1785 |
" |
9664 | 1786 |
! |
1787 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1788 |
defaultCategory |
10466 | 1789 |
^'* Projects & Packages *' |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1790 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1791 |
"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
|
1792 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1793 |
|
9714 | 1794 |
defaultProjectType |
9745 | 1795 |
^ self libraryTypes first |
1796 |
"/ ^ self applicationTypes first |
|
9714 | 1797 |
|
1798 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1799 |
! |
|
1800 |
||
1801 |
defaultProjectTypeForGUIApplication |
|
1802 |
^ GUIApplicationType |
|
1803 |
! |
|
1804 |
||
1805 |
defaultProjectTypeForNonGUIApplication |
|
1806 |
^ NonGUIApplicationType |
|
1807 |
! |
|
9664 | 1808 |
|
9714 | 1809 |
guiApplicationType |
1810 |
^ GUIApplicationType |
|
1811 |
! |
|
1812 |
||
1813 |
libraryType |
|
1814 |
^ LibraryType |
|
1815 |
! |
|
1816 |
||
13419 | 1817 |
libraryTypes |
9714 | 1818 |
LibraryType isNil ifTrue:[self initialize]. |
1819 |
^ Array with:LibraryType |
|
1820 |
||
1821 |
" |
|
13419 | 1822 |
self libraryTypes |
9714 | 1823 |
" |
1824 |
! |
|
1825 |
||
1826 |
nonGuiApplicationType |
|
1827 |
^ NonGUIApplicationType |
|
9664 | 1828 |
! |
1829 |
||
12331 | 1830 |
projectTypeSelectors |
1831 |
"a list of possible project type selectors" |
|
1832 |
||
1833 |
^ #( libraryType guiApplicationType nonGuiApplicationType ) |
|
1834 |
||
1835 |
" |
|
1836 |
self libraryType |
|
1837 |
self guiApplicationType |
|
1838 |
self nonGuiApplicationType |
|
1839 |
" |
|
1840 |
||
1841 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1842 |
! |
|
1843 |
||
9664 | 1844 |
projectTypes |
12331 | 1845 |
"a list of possible project types" |
1846 |
||
9664 | 1847 |
^ self libraryTypes , self applicationTypes |
1848 |
||
12331 | 1849 |
" |
1850 |
self projectTypes |
|
1851 |
" |
|
1852 |
||
9664 | 1853 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
9536 | 1854 |
! ! |
1855 |
||
9569 | 1856 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 1857 |
|
13419 | 1858 |
excludedFromPreRequisites |
9983 | 1859 |
"list packages which are to be explicitely excluded from the automatic constructed |
1860 |
prerequisites list. If empty, everything that is found along the inheritance of any of |
|
1861 |
my classes is considered to be a prerequisite package." |
|
1862 |
||
1863 |
^ #() |
|
1864 |
||
1865 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
1866 |
! |
|
1867 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1868 |
excludedFromSubProjects |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1869 |
"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
|
1870 |
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
|
1871 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1872 |
^ #() |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1873 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1874 |
"Modified: / 17-08-2006 / 19:49:40 / cg" |
10039 | 1875 |
! |
1876 |
||
14808 | 1877 |
includedInPreRequisites |
1878 |
"list packages which are to be explicitely included in the prerequisites list, |
|
1879 |
even if not found by the automatic search. |
|
1880 |
Redefine this, if classes from other packages are referred to via reflection |
|
1881 |
or by constructing names dynamically (i.e. the search cannot find it)" |
|
1882 |
||
1883 |
self isApplicationDefinition ifTrue:[ |
|
1884 |
self isGUIApplication ifTrue:[ |
|
1885 |
^ #( |
|
1886 |
'stx:libcomp' "/ to read the rc file |
|
1887 |
'stx:libbasic2' "/ UI framework |
|
1888 |
'stx:libview' "/ UI framework |
|
1889 |
'stx:libview2' "/ UI framework |
|
1890 |
'stx:libwidg' "/ UI framework |
|
1891 |
'stx:libwidg2' "/ UI framework |
|
1892 |
'stx:libui' "/ UI framework |
|
1893 |
) |
|
1894 |
] ifFalse:[ |
|
1895 |
^ #( |
|
1896 |
'stx:libcomp' "/ to read the rc file |
|
1897 |
) |
|
1898 |
] |
|
1899 |
]. |
|
1900 |
||
1901 |
^ #() |
|
1902 |
! |
|
1903 |
||
9575 | 1904 |
preRequisites |
1905 |
"list packages which are required as a prerequisite. This method is generated automatically, |
|
1906 |
by searching along the inheritance chain of all of my classes. |
|
1907 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1908 |
in excludedFromPreRequisites." |
|
1909 |
||
1910 |
^ #() |
|
1911 |
||
1912 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
1913 |
! |
|
1914 |
||
13411 | 1915 |
preRequisitesFor: packageId |
1916 |
| def | |
|
1917 |
||
1918 |
def := self definitionClassForPackage:packageId. |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1919 |
def isNil ifTrue:[ |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1920 |
"Maybe the package is not loaded? Try to load it..." |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1921 |
(Smalltalk loadPackage: packageId) ifTrue: |
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1922 |
[def := self definitionClassForPackage:packageId] |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1923 |
]. |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1924 |
^ def isNil |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1925 |
ifTrue: |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1926 |
["Still no project definition - maybe does not exists?" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1927 |
(ProjectDefinition searchForPreRequisites: packageId) keys] |
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1928 |
ifFalse: |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
1929 |
[def effectivePreRequisites] |
13411 | 1930 |
|
1931 |
"Created: / 24-02-2011 / 22:47:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1932 |
"Modified: / 18-11-2011 / 14:52:43 / cg" |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
1933 |
"Modified (format): / 19-11-2011 / 11:25:36 / cg" |
13411 | 1934 |
! |
1935 |
||
12186 | 1936 |
preRequisitesForBuilding |
1937 |
"for now, there is only one list of prerequisites present; |
|
1938 |
will be changed in the (near?) future" |
|
1939 |
||
1940 |
^ self preRequisites |
|
1941 |
! |
|
1942 |
||
1943 |
preRequisitesForLoading |
|
1944 |
"for now, there is only one list of prerequisites present; |
|
1945 |
will be changed in the (near?) future" |
|
1946 |
||
1947 |
^ self preRequisites |
|
1948 |
! |
|
1949 |
||
9685 | 1950 |
siblingsAreSubProjects |
1951 |
^ false |
|
1952 |
! |
|
1953 |
||
11377 | 1954 |
splashFileName |
1955 |
"answer the base-name of the splash bitmap. |
|
1956 |
||
1957 |
Default is nil, for no splash. If non-nil, it must be a bmp file's name" |
|
1958 |
||
1959 |
^ nil. |
|
1960 |
! |
|
1961 |
||
9575 | 1962 |
subProjects |
12748 | 1963 |
<resource: #obsolete> |
1964 |
||
1965 |
"OBSOLETE. |
|
1966 |
list packages which are known as subprojects. This method is generated automatically. |
|
9575 | 1967 |
However, when generating automatically, packages are only added - never removed, unless listed |
1968 |
in excludedFromSubProjects." |
|
1969 |
||
1970 |
^ #() |
|
1971 |
||
1972 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
1973 |
! ! |
|
1974 |
||
12372 | 1975 |
!ProjectDefinition class methodsFor:'description - actions'! |
1976 |
||
1977 |
postLoadAction |
|
1978 |
"invoked after loading a project" |
|
1979 |
||
1980 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1981 |
||
1982 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
1983 |
! |
|
1984 |
||
1985 |
preLoadAction |
|
1986 |
"invoked before loading a project" |
|
1987 |
||
1988 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1989 |
! |
|
1990 |
||
1991 |
preUnloadAction |
|
1992 |
"invoked before unloading a project" |
|
1993 |
||
1994 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
1995 |
||
1996 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
1997 |
! ! |
|
1998 |
||
9575 | 1999 |
!ProjectDefinition class methodsFor:'description - classes'! |
2000 |
||
9621 | 2001 |
additionalClassNamesAndAttributes |
2002 |
^ #() |
|
2003 |
||
2004 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
2005 |
! |
|
2006 |
||
9607 | 2007 |
classNamesAndAttributes |
12368 | 2008 |
"a correponding method with real names must be present in my concrete subclasses" |
9575 | 2009 |
|
12202 | 2010 |
"/ should this be a subclassResponsibility here ? |
9595 | 2011 |
^ #() |
9536 | 2012 |
|
9575 | 2013 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
2014 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
2015 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
2016 |
! |
|
2017 |
||
2018 |
extensionMethodNames |
|
2019 |
"list class/selector pairs of extensions. |
|
12368 | 2020 |
A correponding method with real names must be present in my concrete subclasses" |
2021 |
||
2022 |
"/ should this be a subclassResponsibility here ? |
|
9595 | 2023 |
^ #() |
9575 | 2024 |
|
2025 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2026 |
! |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2027 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2028 |
ignoredClassNames |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2029 |
"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
|
2030 |
generated classNamesAndAttributes spec" |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2031 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2032 |
^ #() |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2033 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
2034 |
"Created: / 23-01-2007 / 19:08:27 / cg" |
9575 | 2035 |
! ! |
2036 |
||
2037 |
!ProjectDefinition class methodsFor:'description - compilation'! |
|
9536 | 2038 |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2039 |
additionalBaseAddressDefinition_bc_dot_mak |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2040 |
"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
|
2041 |
Subclasses may redefine this to something like |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2042 |
LIB_BASE=$(LIBWIDG_BASE) |
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2043 |
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
|
2044 |
" |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2045 |
|
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2046 |
^ nil |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2047 |
! |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2048 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2049 |
additionalDefinitions |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2050 |
"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
|
2051 |
|
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2052 |
^ '' |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2053 |
! |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2054 |
|
10306 | 2055 |
additionalDefinitions_bc_dot_mak |
2056 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 2057 |
Subclasses may redefine this." |
10306 | 2058 |
|
2059 |
^ self additionalDefinitions_nt_dot_mak |
|
2060 |
||
2061 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2062 |
! |
|
2063 |
||
9625 | 2064 |
additionalDefinitions_make_dot_proto |
2065 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
2066 |
||
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2067 |
^ self additionalDefinitions |
9625 | 2068 |
|
2069 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
2070 |
! |
|
2071 |
||
2072 |
additionalDefinitions_nt_dot_mak |
|
10306 | 2073 |
"obsolete - kept for compatibility with old project files" |
9625 | 2074 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2075 |
^ self additionalDefinitions |
9625 | 2076 |
|
2077 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2078 |
! |
|
2079 |
||
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2080 |
additionalHeaderRulesUsingTemplate:template pathConverter:pathConverter |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2081 |
"rules for header files (of autoloaded classes). |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2082 |
For each extended class, which is autoloaded (and therefore, we will not find a header file for it), |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2083 |
generate a rule to create the header file only." |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2084 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2085 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2086 |
(self extensionClassesWithSuperclasses:true) do:[:eachExtendedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2087 |
|headerFileDirPath baseFilename| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2088 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2089 |
(eachExtendedClass isLoaded not or:[eachExtendedClass wasAutoloaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2090 |
headerFileDirPath := self perform:pathConverter with:eachExtendedClass package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2091 |
baseFilename := self filenameForClass:eachExtendedClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2092 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2093 |
s nextPutAll:(template |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2094 |
bindWith:headerFileDirPath |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2095 |
with:baseFilename). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2096 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2097 |
]. |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2098 |
]. |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2099 |
|
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2100 |
"Created: / 12-09-2011 / 16:23:52 / cg" |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2101 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2102 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2103 |
additionalHeaderRules_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2104 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2105 |
|
13695 | 2106 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2107 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_bc_dot_mak) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2108 |
pathConverter:#pathToPackage_win32: |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2109 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2110 |
"Created: / 12-09-2011 / 15:44:09 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2111 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2112 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2113 |
additionalHeaderRules_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2114 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2115 |
|
13695 | 2116 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2117 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_make_dot_proto) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2118 |
pathConverter:#pathToPackage_unix: |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2119 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2120 |
"Created: / 12-09-2011 / 15:44:28 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2121 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2122 |
|
10306 | 2123 |
additionalLinkLibraries_bc_dot_mak |
2124 |
"allows for additional static libraries to be added to the bc.mak file. |
|
2125 |
Subclasses may redefine this" |
|
2126 |
||
2127 |
"backward compatibilty with old projects" |
|
2128 |
||
2129 |
^ self additionalLinkLibraries_nt_dot_mak |
|
2130 |
||
2131 |
||
2132 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2133 |
! |
|
2134 |
||
9733 | 2135 |
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
|
2136 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 2137 |
|
2138 |
^ '' |
|
2139 |
||
2140 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2141 |
! |
|
2142 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2143 |
additionalLinkLibraries_nt_dot_mak |
10306 | 2144 |
"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
|
2145 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2146 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2147 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2148 |
"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
|
2149 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2150 |
|
12028 | 2151 |
additionalRulesSvn_make_dot_proto |
2152 |
||
2153 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
2154 |
||
2155 |
^ String streamContents: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2156 |
[:s|s |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2157 |
nextPutLine:'update-svn-revision:'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2158 |
tab; nextPutLine: 'if [ !! -r .svnversion -o "$(shell svnversion -n)" !!= "$(shell cat .svnversion)" ]; then \'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2159 |
tab; tab; nextPutLine: 'svnversion -n > .svnversion; \'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2160 |
tab; tab; nextPutLine: 'sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"''$(shell svnversion -n)''\"\$$\"/g" \'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2161 |
tab; tab; tab; nextPutLine: (self name , '.st; \'); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2162 |
tab; nextPutLine: 'fi'; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2163 |
nextPutLine: '.PHONY: update-svn-revision'] |
12028 | 2164 |
|
2165 |
"Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
13411 | 2166 |
"Modified: / 07-05-2011 / 13:49:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2167 |
! |
2168 |
||
10306 | 2169 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2170 |
"obsolete - kept for compatibility with old project files" |
13419 | 2171 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2172 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2173 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2174 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 2175 |
! |
2176 |
||
9625 | 2177 |
additionalRules_make_dot_proto |
2178 |
"allows for additional rules to be added to the make.proto file." |
|
2179 |
||
2180 |
^ '' |
|
2181 |
||
2182 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
2183 |
! |
|
2184 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2185 |
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
|
2186 |
"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
|
2187 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2188 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2189 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2190 |
|
12028 | 2191 |
additionalTargetsSvn_make_dot_proto |
2192 |
||
2193 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
2194 |
||
2195 |
^ 'update-svn-revision' |
|
2196 |
||
2197 |
"Created: / 24-06-2009 / 21:35:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
2198 |
! |
|
2199 |
||
10306 | 2200 |
additionalTargets_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2201 |
"obsolete - kept for compatibility with old project files" |
13419 | 2202 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2203 |
^ '' |
10306 | 2204 |
|
2205 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
2206 |
! |
|
2207 |
||
9625 | 2208 |
additionalTargets_make_dot_proto |
2209 |
"allows for additional targets to be added to the make.proto file." |
|
2210 |
||
2211 |
^ '' |
|
2212 |
||
2213 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2214 |
! |
|
2215 |
||
10979 | 2216 |
globalDefines |
2217 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2218 |
an subprojects" |
|
2219 |
||
2220 |
^ '' |
|
2221 |
! |
|
2222 |
||
2223 |
globalDefines_unix |
|
2224 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2225 |
an subprojects" |
|
2226 |
||
2227 |
^ self globalDefines |
|
2228 |
! |
|
2229 |
||
2230 |
globalDefines_win32 |
|
2231 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2232 |
an subprojects" |
|
2233 |
||
2234 |
^ self globalDefines |
|
2235 |
! |
|
2236 |
||
10331 | 2237 |
localDefines |
10979 | 2238 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2239 |
|
2240 |
^ '' |
|
2241 |
! |
|
2242 |
||
2243 |
localDefines_unix |
|
10979 | 2244 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2245 |
|
2246 |
^ self localDefines |
|
2247 |
! |
|
2248 |
||
2249 |
localDefines_win32 |
|
10979 | 2250 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2251 |
|
2252 |
^ self localDefines |
|
2253 |
! |
|
2254 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2255 |
localIncludes |
10979 | 2256 |
"allow for the specification of additional include directories" |
9714 | 2257 |
|
2258 |
^ '' |
|
2259 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2260 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2261 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2262 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2263 |
localIncludes_unix |
10979 | 2264 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2265 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2266 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2267 |
|
9714 | 2268 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2269 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 2270 |
! |
2271 |
||
2272 |
localIncludes_win32 |
|
10979 | 2273 |
"allow for the specification of additional include directories" |
9714 | 2274 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2275 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 2276 |
|
2277 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2278 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 2279 |
! |
2280 |
||
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
|
2281 |
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
|
2282 |
"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
|
2283 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2284 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2285 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2286 |
"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
|
2287 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2288 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2289 |
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
|
2290 |
"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
|
2291 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2292 |
^ 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
|
2293 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2294 |
"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
|
2295 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2296 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2297 |
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
|
2298 |
"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
|
2299 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2300 |
^ 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
|
2301 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2302 |
"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
|
2303 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2304 |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2305 |
singleHeaderRuleTemplate_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2306 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2307 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2308 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2309 |
%1\%2.$(H): |
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2310 |
pushd %1 \ |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2311 |
& $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2312 |
& popd |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2313 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2314 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2315 |
"Created: / 12-09-2011 / 15:55:49 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2316 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2317 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2318 |
singleHeaderRuleTemplate_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2319 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2320 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2321 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2322 |
%1/%2.$(H): |
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2323 |
pushd %1 \ |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2324 |
& $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2325 |
& popd |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2326 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2327 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2328 |
"Created: / 12-09-2011 / 15:55:57 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2329 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2330 |
|
9575 | 2331 |
stcOptimizationOptions |
2332 |
"see the stc reference / stc usage for options. |
|
2333 |
For now, the following variants are useful: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2334 |
+optspace3 most compact code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2335 |
- use for all gui, application code. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2336 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2337 |
+optinline +optinline2 +inlineNew |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2338 |
fastest code |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2339 |
- use only for computation-intensive classes" |
9575 | 2340 |
|
2341 |
^ '+optspace3' |
|
2342 |
||
2343 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 2344 |
! |
2345 |
||
9575 | 2346 |
stcWarningOptions |
2347 |
"see the stc reference / stc usage for options. |
|
2348 |
For now, the following variants are useful: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2349 |
-warn no warnings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2350 |
-warnNonStandard no warnings about non-standard smalltalk features" |
9575 | 2351 |
|
9714 | 2352 |
^ '-warnNonStandard' |
9575 | 2353 |
|
2354 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
2355 |
! ! |
|
9536 | 2356 |
|
9575 | 2357 |
!ProjectDefinition class methodsFor:'description - project information'! |
2358 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2359 |
applicationAdditionalIconFileNames |
13419 | 2360 |
"Return the icon-filenames for additional icons of the application |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2361 |
(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
|
2362 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2363 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2364 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2365 |
|
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2366 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2367 |
"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
|
2368 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2369 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2370 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
2371 |
|
9575 | 2372 |
companyName |
9584 | 2373 |
"Returns a company string which will appear in <lib>.rc. |
2374 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2375 |
|
13419 | 2376 |
( |
11172 | 2377 |
#( |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2378 |
'stx' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2379 |
'exept' |
11172 | 2380 |
) includes:self module) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2381 |
^ 'eXept Software AG' |
9575 | 2382 |
]. |
2383 |
||
2384 |
^ 'My Company' |
|
2385 |
||
9584 | 2386 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 2387 |
! |
2388 |
||
2389 |
description |
|
10306 | 2390 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 2391 |
|
9803 | 2392 |
^self productName,' ',self packageName |
2393 |
"/ ^ self name |
|
9536 | 2394 |
|
2395 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 2396 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
2397 |
! |
|
2398 |
||
2399 |
fileDescription |
|
10416 | 2400 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 2401 |
|
9803 | 2402 |
^self description |
9575 | 2403 |
|
2404 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
2405 |
! |
|
2406 |
||
2407 |
fileMajorVersionNr |
|
2408 |
"Returns a versionNumber which will appear in libName.rc" |
|
2409 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2410 |
^ self majorVersionNr |
9575 | 2411 |
|
2412 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 2413 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 2414 |
! |
2415 |
||
2416 |
fileMinorVersionNr |
|
2417 |
"Returns a versionNumber which will appear in libName.rc" |
|
2418 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
2419 |
^ self minorVersionNr |
9575 | 2420 |
|
2421 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 2422 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 2423 |
! |
2424 |
||
2425 |
fileReleaseNr |
|
2426 |
"Returns a releaseNumber which will appear in libName.rc" |
|
2427 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2428 |
"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
|
2429 |
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
|
2430 |
|
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
2431 |
^ self cvsRevision last upTo:$m |
9575 | 2432 |
|
2433 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
|
9817 | 2434 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
9536 | 2435 |
! |
2436 |
||
9575 | 2437 |
fileRevisionNr |
2438 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 2439 |
|
9817 | 2440 |
"take the default revision from the cvs-version" |
9618 | 2441 |
^ self cvsRevision first |
9575 | 2442 |
|
2443 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
|
9817 | 2444 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
9536 | 2445 |
! |
2446 |
||
9575 | 2447 |
fileVersion |
2448 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2449 |
||
2450 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
2451 |
||
13419 | 2452 |
^ '%1.%2.%3.%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2453 |
bindWith:self fileMajorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2454 |
with:self fileMinorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2455 |
with:self fileRevisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2456 |
with:self fileReleaseNr. |
9575 | 2457 |
|
2458 |
" |
|
2459 |
self fileVersion |
|
2460 |
" |
|
2461 |
||
9817 | 2462 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 2463 |
! |
9536 | 2464 |
|
9575 | 2465 |
fileVersionCommaSeparated |
2466 |
"Returns a fileVersion string which will appear in libName.rc" |
|
2467 |
||
9817 | 2468 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
2469 |
||
13419 | 2470 |
^ '%1,%2,%3,%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2471 |
bindWith:self fileMajorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2472 |
with:self fileMinorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2473 |
with:self fileRevisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2474 |
with:self fileReleaseNr. |
9575 | 2475 |
|
2476 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 2477 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
2478 |
! |
|
2479 |
||
9575 | 2480 |
internalName |
2481 |
"Returns a name string which will appear in libName.rc" |
|
2482 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
2483 |
^ self package |
9575 | 2484 |
|
2485 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 2486 |
! |
2487 |
||
9575 | 2488 |
legalCopyright |
9584 | 2489 |
"Returns a copyright string which will appear in <lib>.rc. |
2490 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2491 |
|
2492 |
self module = 'stx' ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2493 |
"hardwired-default" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2494 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2495 |
bindWith:(Date today year printString) |
9575 | 2496 |
]. |
9817 | 2497 |
self module = 'exept' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2498 |
"hardwired-default" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2499 |
^ 'Copyright eXept Software AG 1998-%1' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2500 |
bindWith:(Date today year printString) |
9817 | 2501 |
]. |
9575 | 2502 |
|
2503 |
^ 'My CopyRight or CopyLeft' |
|
2504 |
||
9817 | 2505 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 2506 |
! |
2507 |
||
2508 |
majorVersionNr |
|
2509 |
"Returns a versionNumber which will appear in libName.rc" |
|
2510 |
||
2511 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2512 |
the default here takes smalltalks version number. |
|
2513 |
But thats probably not good for an end-user-app." |
|
2514 |
||
11042 | 2515 |
^ Smalltalk majorVersionNr |
9575 | 2516 |
|
2517 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 2518 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 2519 |
! |
2520 |
||
2521 |
minorVersionNr |
|
2522 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 2523 |
|
9575 | 2524 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2525 |
the default here takes smalltalks version number. |
|
2526 |
But thats probably not good for an end-user-app." |
|
2527 |
||
11042 | 2528 |
^ Smalltalk minorVersionNr |
9575 | 2529 |
|
2530 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 2531 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 2532 |
! |
2533 |
||
2534 |
productDate |
|
11043 | 2535 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 2536 |
|
2537 |
"take the current date - by default" |
|
9536 | 2538 |
|
9575 | 2539 |
^ Timestamp now printStringRFC1123Format |
2540 |
||
2541 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
2542 |
! |
|
2543 |
||
13177 | 2544 |
productDescription |
2545 |
"Returns a description (for autopackage)" |
|
2546 |
||
2547 |
^ self description |
|
2548 |
||
2549 |
"Created: / 21-12-2010 / 09:32:16 / cg" |
|
2550 |
! |
|
2551 |
||
10426 | 2552 |
productFilename |
2553 |
"Returns a filename which be used as linkname, product file name etc." |
|
2554 |
||
2555 |
^ self productNameAsValidFilename |
|
2556 |
||
2557 |
" |
|
13419 | 2558 |
stx_projects_smalltalk productName |
10426 | 2559 |
stx_projects_smalltalk productFilename |
2560 |
" |
|
2561 |
||
2562 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
2563 |
! |
|
2564 |
||
9898 | 2565 |
productInstallDir |
13873 | 2566 |
"Returns a default installDir which will appear in <app>.nsi." |
2567 |
||
2568 |
^ '$PROGRAMFILES\',(self productInstallDirBaseName). |
|
2569 |
||
2570 |
" |
|
2571 |
stx_projects_smalltalk productInstallDir |
|
2572 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDir |
|
2573 |
" |
|
9898 | 2574 |
|
2575 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
2576 |
! |
|
2577 |
||
13873 | 2578 |
productInstallDirBaseName |
2579 |
"Returns a default installDir which will appear in <app>.nsi. |
|
2580 |
This is usually not the one you want to keep" |
|
2581 |
||
2582 |
^ self module |
|
2583 |
||
2584 |
"Created: / 21-12-2011 / 16:31:38 / cg" |
|
2585 |
! |
|
2586 |
||
13177 | 2587 |
productLicense |
2588 |
"Returns the license (for autopackage)" |
|
2589 |
||
2590 |
^ 'Commercial' |
|
2591 |
||
2592 |
"Created: / 21-12-2010 / 09:31:25 / cg" |
|
2593 |
! |
|
2594 |
||
2595 |
productMaintainer |
|
2596 |
"Returns the maintainer (for autopackage)" |
|
2597 |
||
2598 |
^ self companyName |
|
2599 |
||
2600 |
"Created: / 21-12-2010 / 09:26:16 / cg" |
|
2601 |
! |
|
2602 |
||
9575 | 2603 |
productName |
9584 | 2604 |
"Returns a product name which will appear in <lib>.rc. |
2605 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 2606 |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2607 |
|m| |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2608 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2609 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2610 |
m = 'stx' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2611 |
^ 'Smalltalk/X' |
9575 | 2612 |
]. |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2613 |
m = 'exept' ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2614 |
^ 'eXept addOns' |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2615 |
]. |
10296 | 2616 |
Error handle:[:ex | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2617 |
^ 'ProductName' |
10296 | 2618 |
] do:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2619 |
^ self startupClassName |
10296 | 2620 |
]. |
2621 |
||
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
2622 |
"Modified: / 08-11-2007 / 16:45:14 / cg" |
9536 | 2623 |
! |
2624 |
||
10426 | 2625 |
productNameAsValidFilename |
2626 |
"Returns a product name which will appear in <lib>.rc. |
|
2627 |
Under win32, this is placed into the dlls file-info" |
|
2628 |
||
2629 |
|nm| |
|
2630 |
||
2631 |
nm := self productName. |
|
2632 |
^ nm copy replaceAny:'/\:;.,' with:$_ |
|
2633 |
||
2634 |
" |
|
2635 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
2636 |
" |
|
2637 |
||
2638 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
2639 |
! |
|
2640 |
||
9898 | 2641 |
productPublisher |
2642 |
"Returns a product publisher which will appear in <app>.nsi." |
|
2643 |
||
2644 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2645 |
^ 'eXept Software AG' |
9898 | 2646 |
]. |
2647 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
2648 |
^ self companyName |
9898 | 2649 |
|
2650 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
2651 |
! |
|
2652 |
||
13177 | 2653 |
productType |
2654 |
"Returns the product type for autopackage" |
|
2655 |
||
2656 |
^ 'Application' |
|
2657 |
||
2658 |
"Created: / 21-12-2010 / 09:28:48 / cg" |
|
2659 |
! |
|
2660 |
||
9575 | 2661 |
productVersion |
11043 | 2662 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 2663 |
|
2664 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 2665 |
|
13419 | 2666 |
^ '%1.%2.%3.%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2667 |
bindWith:self majorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2668 |
with:self minorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2669 |
with:self revisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2670 |
with:self releaseNr. |
9536 | 2671 |
|
9575 | 2672 |
" |
2673 |
self productVersion |
|
2674 |
" |
|
2675 |
||
9817 | 2676 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 2677 |
! |
2678 |
||
9575 | 2679 |
productVersionCommaSeparated |
2680 |
"Returns a product version which will appear in libName.rc" |
|
2681 |
||
2682 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 2683 |
|
13419 | 2684 |
^ '%1,%2,%3,%4' |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2685 |
bindWith:self majorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2686 |
with:self minorVersionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2687 |
with:self revisionNr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2688 |
with:self releaseNr. |
11042 | 2689 |
|
2690 |
" |
|
2691 |
self productVersionCommaSeparated |
|
2692 |
" |
|
9536 | 2693 |
|
9575 | 2694 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 2695 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 2696 |
! |
2697 |
||
9898 | 2698 |
productWebSite |
2699 |
"Returns a product webSite which will appear in <app>.nsi." |
|
2700 |
||
2701 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2702 |
^ 'http://www.exept.de' |
9898 | 2703 |
]. |
2704 |
||
10426 | 2705 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 2706 |
^ 'http://www.yoursite.com' |
2707 |
||
2708 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 2709 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 2710 |
! |
2711 |
||
9575 | 2712 |
releaseNr |
2713 |
"Returns a releaseNr which will appear in libName.rc" |
|
2714 |
||
2715 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2716 |
the default here takes smalltalks version number. |
|
2717 |
But thats probably not good for an end-user-app." |
|
2718 |
||
11042 | 2719 |
^ Smalltalk releaseNr |
9536 | 2720 |
|
9575 | 2721 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 2722 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 2723 |
! |
2724 |
||
2725 |
revisionNr |
|
2726 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 2727 |
|
9575 | 2728 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2729 |
the default here takes smalltalks version number. |
|
2730 |
But thats probably not good for an end-user-app." |
|
2731 |
||
11042 | 2732 |
^ Smalltalk revisionNr |
9575 | 2733 |
|
2734 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 2735 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 2736 |
! |
2737 |
||
2738 |
versionNumber |
|
10306 | 2739 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 2740 |
|
9575 | 2741 |
^'' |
9536 | 2742 |
|
2743 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 2744 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 2745 |
! ! |
2746 |
||
9569 | 2747 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 2748 |
|
13177 | 2749 |
apspecFilename |
13968 | 2750 |
"/ for linux |
13177 | 2751 |
^ 'autopackage/default.apspec' |
2752 |
||
2753 |
"Created: / 21-12-2010 / 09:43:13 / cg" |
|
2754 |
! |
|
2755 |
||
9852 | 2756 |
basicFileNamesToGenerate |
13419 | 2757 |
"answer a dictionary (filename -> generator method) with all the files, |
11937 | 2758 |
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
|
2759 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2760 |
|dict| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2761 |
|
13419 | 2762 |
dict := OrderedDictionary withKeysAndValues:#( |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2763 |
'Make.spec' #'generate_make_dot_spec' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2764 |
'Make.proto' #'generate_make_dot_proto' |
13968 | 2765 |
'Makefile' #'generate_makefile' "/ for unix |
2766 |
'bc.mak' #'generate_bc_dot_mak' "/ for windows |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2767 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
13968 | 2768 |
'bmake.bat' #'generate_bmake_dot_mak' "/ for bcc32 |
2769 |
'vcmake.bat' #'generate_vcmake_dot_mak' "/ for msvc |
|
14334 | 2770 |
'lccmake.bat' #'generate_lccmake_dot_mak' "/ for lcc |
14345 | 2771 |
"/ 'tccmake.bat' #'generate_tccmake_dot_mak' "/ for tcc - cannot link at the moment |
2772 |
'mingwmake.bat' #'generate_mingwmake_dot_mak' "/ for mingw |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2773 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2774 |
|
13419 | 2775 |
dict |
14060 | 2776 |
at:self rcFilename put:#'generate_packageName_dot_rc'. "/ for windows |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2777 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2778 |
^ dict. |
13154
bac0fcd8a888
make sure that the makefiles are generated before the libInit file
Claus Gittinger <cg@exept.de>
parents:
13148
diff
changeset
|
2779 |
|
14345 | 2780 |
"Modified (comment): / 05-09-2012 / 19:43:07 / cg" |
9852 | 2781 |
! |
2782 |
||
9536 | 2783 |
fileNamesToGenerate |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
2784 |
"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
|
2785 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2786 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2787 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2788 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2789 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2790 |
" |
9536 | 2791 |
! |
2792 |
||
13419 | 2793 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
9544 | 2794 |
|pairs| |
2795 |
||
2796 |
pairs := OrderedCollection new. |
|
13419 | 2797 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2798 |
|file| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2799 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2800 |
file := self perform:generator. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2801 |
pairs add:(Array with:fileName with:file) |
9544 | 2802 |
]. |
2803 |
||
2804 |
pairs pairsDo:aTwoArgBlock |
|
2805 |
||
2806 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
2807 |
! |
|
2808 |
||
13419 | 2809 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2810 |
self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
9831 | 2811 |
|
9898 | 2812 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 2813 |
! |
2814 |
||
2815 |
generateFile:filename |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2816 |
|action| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2817 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2818 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2819 |
action notNil ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2820 |
^ self perform:action |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2821 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2822 |
(filename = 'app.rc' or:[filename = 'lib.rc']) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2823 |
^ self generate_packageName_dot_rc |
9607 | 2824 |
]. |
9850 | 2825 |
(filename = 'loadAll') ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2826 |
^ self generate_loadAll |
9850 | 2827 |
]. |
13177 | 2828 |
self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
2829 |
||
2830 |
"Modified: / 21-12-2010 / 11:01:10 / cg" |
|
13968 | 2831 |
"Modified (format): / 21-01-2012 / 12:31:40 / cg" |
9536 | 2832 |
! |
2833 |
||
13411 | 2834 |
generateFile:filename in: directory |
2835 |
||
2836 |
| dir s | |
|
2837 |
dir := directory asFilename. |
|
2838 |
dir exists ifFalse:[self error:'Directory does not exist']. |
|
2839 |
[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2840 |
s := ( dir / (filename asFilename baseName) ) writeStream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2841 |
s nextPutAll: (self generateFile: filename). |
13411 | 2842 |
] ensure:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2843 |
s ifNotNil:[s close] |
13411 | 2844 |
] |
2845 |
||
2846 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2847 |
stx_projects_smalltalk generateFile:'package.deps.rake' in: '/tmp' |
13411 | 2848 |
" |
2849 |
||
2850 |
"Created: / 26-02-2011 / 10:42:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2851 |
"Modified: / 09-06-2011 / 14:53:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2852 |
! |
|
2853 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2854 |
generateRemoveShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2855 |
"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
|
2856 |
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
|
2857 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2858 |
|firstLine| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2859 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2860 |
firstLine := true. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2861 |
self searchForClasses do:[:eachClass| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2862 |
firstLine ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2863 |
aStream nextPutAll:'cvs rm -f '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2864 |
firstLine := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2865 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2866 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2867 |
aStream nextPutAll:eachClass classBaseFilename; space. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2868 |
] |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2869 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2870 |
firstLine ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2871 |
aStream cr. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2872 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2873 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2874 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2875 |
stx_goodies_webServer_htmlTree generateRemoveShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2876 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2877 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2878 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2879 |
generateRenameShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2880 |
"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
|
2881 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2882 |
self searchForClasses do:[:eachClass| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2883 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2884 |
aStream nextPutAll:'cp '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2885 |
nextPutAll:eachClass classBaseFilename; nextPutAll:',v '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2886 |
nextPutAll:eachClass generateClassFilename; nextPutAll:'.st,v'; cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2887 |
] |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2888 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2889 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2890 |
" |
11981
e479249ba36e
Fix #generateRenameShellScriptOn:
Stefan Vogel <sv@exept.de>
parents:
11980
diff
changeset
|
2891 |
stx_libdb generateRemoveShellScriptOn:Transcript |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2892 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2893 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2894 |
|
9536 | 2895 |
generate_abbrev_dot_stc |
13968 | 2896 |
"/ for stc: provides abbreviations and namespace information |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2897 |
self checkIfClassesArePresent. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2898 |
|
13419 | 2899 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2900 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2901 |
|addEntry| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2902 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2903 |
addEntry := |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2904 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2905 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2906 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2907 |
s nextPutAll:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2908 |
s nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2909 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2910 |
cls := Smalltalk classNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2911 |
cls isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2912 |
fn := self filenameForClass:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2913 |
s nextPutAll:fn. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2914 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2915 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2916 |
s nextPutAll:' '; nextPutAll:'0'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2917 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2918 |
wasLoaded := cls isLoaded. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2919 |
wasLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2920 |
failedToLoad := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2921 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2922 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2923 |
failedToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2924 |
] do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2925 |
ParserFlags |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2926 |
withSTCCompilation:#never |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2927 |
do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2928 |
cls autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2929 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2930 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2931 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2932 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2933 |
fn := self filenameForClass:cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2934 |
(fn includes:Character space) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2935 |
s nextPutAll:fn storeString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2936 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2937 |
s nextPutAll:fn. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2938 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2939 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2940 |
s nextPutAll: (cls category asString storeString). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2941 |
failedToLoad ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2942 |
s nextPutAll:' 0'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2943 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2944 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2945 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2946 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2947 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2948 |
wasLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2949 |
cls unload |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2950 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2951 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2952 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2953 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2954 |
|
13968 | 2955 |
s nextPutLine:'# automagically generated by the project definition'. |
2956 |
s nextPutLine:'# this file is needed for stc to be able to compile modules independently.'. |
|
2957 |
s nextPutLine:'# it provides information about a classes filename, category and especially namespace.'. |
|
2958 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2959 |
self allClassNames do:addEntry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2960 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2961 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2962 |
addEntry value:nm |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2963 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2964 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2965 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2966 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2967 |
" |
13968 | 2968 |
stx_libbasic generate_abbrev_dot_stc |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2969 |
DapasXProject generate_abbrev_dot_stc |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2970 |
DapasX_Datenbasis generate_abbrev_dot_stc |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2971 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
9536 | 2972 |
" |
2973 |
||
2974 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
13968 | 2975 |
"Modified: / 21-01-2012 / 12:42:57 / cg" |
9536 | 2976 |
! |
2977 |
||
13177 | 2978 |
generate_autopackage_default_dot_apspec |
2979 |
||
13419 | 2980 |
^self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2981 |
replaceMappings: self autopackage_default_dot_apspec_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2982 |
in: self autopackage_default_dot_apspec |
13177 | 2983 |
|
2984 |
" |
|
2985 |
stx_projects_smalltalk generate_autopackage_default_dot_apspec |
|
2986 |
" |
|
2987 |
||
2988 |
"Created: / 21-12-2010 / 09:40:04 / cg" |
|
2989 |
! |
|
2990 |
||
13419 | 2991 |
generate_bc_dot_mak |
2992 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2993 |
replaceMappings: self bc_dot_mak_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
2994 |
in: self bc_dot_mak) asStringCollection withTabs asString |
10306 | 2995 |
|
2996 |
" |
|
2997 |
DapasXProject generate_bc_dot_mak |
|
2998 |
DapasX_Datenbasis generate_bc_dot_mak |
|
2999 |
" |
|
3000 |
||
3001 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
3002 |
! |
|
3003 |
||
13419 | 3004 |
generate_bmake_dot_mak |
3005 |
||
3006 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3007 |
in: self bmake_dot_mak |
9575 | 3008 |
|
3009 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
3010 |
! |
|
3011 |
||
13411 | 3012 |
generate_builder_baseline_dot_rbspec |
3013 |
^ self replaceMappings:self builder_baseline_dot_rbspec_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3014 |
in:self builder_baseline_dot_rbspec |
13411 | 3015 |
|
3016 |
" |
|
3017 |
stx_projects_smalltalk generate_builder_baseline_dot_rbspec |
|
3018 |
||
3019 |
" |
|
3020 |
||
3021 |
"Created: / 24-02-2011 / 11:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3022 |
! |
|
3023 |
||
14334 | 3024 |
generate_lccmake_dot_mak |
13419 | 3025 |
|
3026 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
14334 | 3027 |
in: self lccmake_dot_mak |
3028 |
||
3029 |
"Created: / 03-09-2012 / 19:49:56 / cg" |
|
11979 | 3030 |
! |
3031 |
||
9850 | 3032 |
generate_loadAll |
13419 | 3033 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3034 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3035 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3036 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3037 |
classNames := self compiled_classNames_common. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3038 |
classesLoaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3039 |
collect:[:nm | Smalltalk classNamed:nm] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3040 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3041 |
classNamesUnloaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3042 |
select:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3043 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3044 |
cls := Smalltalk classNamed:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3045 |
cls isNil or:[cls isLoaded not] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3046 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3047 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3048 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3049 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3050 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3051 |
s nextPutAll:'"/ |
9850 | 3052 |
"/ $' , 'Header' , '$ |
3053 |
"/ |
|
3054 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
3055 |
"/ |
|
3056 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3057 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 3058 |
"/ |
3059 |
"/ |
|
3060 |
"/ Prerequisites: |
|
3061 |
"/ |
|
3062 |
"/ Smalltalk loadPackage:''module:directory''. |
|
3063 |
"/ Smalltalk loadPackage:''....''. |
|
3064 |
!! |
|
3065 |
||
3066 |
"{ package:''' , self package, ''' }" |
|
3067 |
!! |
|
3068 |
||
3069 |
|files| |
|
3070 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3071 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 3072 |
|
3073 |
files := #( |
|
3074 |
'. |
|
3075 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3076 |
classesSorted do:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3077 |
s nextPutLine:' ''' , (self filenameForClass:eachClass), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3078 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3079 |
classNamesUnloaded do:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3080 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3081 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3082 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3083 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3084 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3085 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3086 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3087 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3088 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3089 |
self hasExtensionMethods ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3090 |
s nextPutLine:' ''extensions.st'''. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3091 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3092 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3093 |
s nextPutAll:' |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3094 |
). |
9850 | 3095 |
|
3096 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3097 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 3098 |
|handle loaded| |
3099 |
||
13419 | 3100 |
handle := ObjectFileLoader loadedObjectHandles |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3101 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
9850 | 3102 |
handle ifNotNil:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3103 |
loaded := Set new:(handle classes size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3104 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3105 |
files := files \ loaded. |
9850 | 3106 |
]. |
3107 |
]. |
|
3108 |
||
3109 |
"/ 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
|
3110 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3111 |
'''' infoPrintCR. |
9850 | 3112 |
files do:[:f | |
3113 |
''.'' infoPrint. |
|
3114 |
f asFilename exists ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3115 |
Smalltalk fileIn:f. |
9850 | 3116 |
] ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3117 |
Smalltalk fileIn:(''source/'' , f) |
9850 | 3118 |
] |
3119 |
]. |
|
3120 |
'' '' infoPrintCR. |
|
3121 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3122 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 3123 |
'. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3124 |
]. |
9850 | 3125 |
|
3126 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 3127 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 3128 |
! |
3129 |
||
13419 | 3130 |
generate_make_dot_proto |
3131 |
||
3132 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3133 |
replaceMappings: self make_dot_proto_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3134 |
in: self make_dot_proto) asStringCollection withTabs asString |
9536 | 3135 |
|
9733 | 3136 |
" |
12428 | 3137 |
stx_libbasic2 generate_make_dot_proto |
9733 | 3138 |
" |
9536 | 3139 |
|
3140 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
3141 |
! |
|
3142 |
||
3143 |
generate_make_dot_spec |
|
13419 | 3144 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3145 |
replaceMappings: self make_dot_spec_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3146 |
in: self make_dot_spec) asStringCollection withTabs asString |
9536 | 3147 |
|
9733 | 3148 |
" |
3149 |
DapasXProject generate_make_dot_spec |
|
3150 |
DapasX_Datenbasis generate_make_dot_spec |
|
3151 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
3152 |
" |
|
9536 | 3153 |
|
3154 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
3155 |
! |
|
3156 |
||
13419 | 3157 |
generate_makefile |
3158 |
||
3159 |
^ (self |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3160 |
replaceMappings: self makefile_mappings |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3161 |
in: self makefile) asStringCollection withTabs asString |
12428 | 3162 |
|
3163 |
" |
|
3164 |
stx_libbasic2 generate_makefile |
|
3165 |
" |
|
3166 |
! |
|
3167 |
||
14345 | 3168 |
generate_mingwmake_dot_mak |
3169 |
||
3170 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
3171 |
in: self mingwmake_dot_mak |
|
3172 |
||
3173 |
"Created: / 05-09-2012 / 19:44:07 / cg" |
|
3174 |
! |
|
3175 |
||
9536 | 3176 |
generate_packageName_dot_rc |
3177 |
||
13419 | 3178 |
^self replaceMappings: self packageName_dot_rc_mappings |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3179 |
in: self packageName_dot_rc |
9536 | 3180 |
|
3181 |
" |
|
3182 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
3183 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 3184 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 3185 |
stx_libwidg3 generate_packageName_dot_rc |
13419 | 3186 |
stx_libwidg3 productVersion |
9536 | 3187 |
|
3188 |
" |
|
3189 |
||
3190 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 3191 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 3192 |
! |
3193 |
||
13411 | 3194 |
generate_package_dot_deps_dot_rake |
3195 |
^ (self replaceMappings:self package_dot_deps_dot_rake_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3196 |
in:self package_dot_deps_dot_rake) asStringCollection |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3197 |
withTabs asString |
13411 | 3198 |
|
3199 |
" |
|
3200 |
stx_libjava generate_dependencies_dot_rake" |
|
3201 |
||
3202 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3203 |
! |
|
3204 |
||
14334 | 3205 |
generate_tccmake_dot_mak |
3206 |
||
3207 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
3208 |
in: self tccmake_dot_mak |
|
3209 |
||
3210 |
"Created: / 03-09-2012 / 19:50:25 / cg" |
|
3211 |
! |
|
3212 |
||
13419 | 3213 |
generate_vc_dot_def |
3214 |
||
3215 |
^self replaceMappings: self vc_dot_def_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3216 |
in: self vc_dot_def |
10306 | 3217 |
|
3218 |
" |
|
3219 |
DapasXProject generate_vc_dot_def |
|
3220 |
DapasX_Datenbasis generate_vc_dot_def |
|
3221 |
||
3222 |
" |
|
3223 |
||
3224 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
3225 |
! |
|
3226 |
||
13419 | 3227 |
generate_vcmake_dot_mak |
3228 |
||
3229 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3230 |
in: self vcmake_dot_mak |
11937 | 3231 |
! |
3232 |
||
9852 | 3233 |
protectedFileNames |
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
3234 |
"names of files which should NOT be generated (because they are hand-maintained) |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
3235 |
- redefine this to protect a hand-written Make.proto or other handwritten support files" |
9852 | 3236 |
|
3237 |
^ #() |
|
3238 |
||
3239 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
3240 |
"Modified: / 21-12-2010 / 11:36:46 / cg" |
9852 | 3241 |
! |
3242 |
||
9831 | 3243 |
rcFilename |
3244 |
^ self packageName,'.rc'. |
|
3245 |
||
3246 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 3247 |
! ! |
3248 |
||
12364 | 3249 |
!ProjectDefinition class methodsFor:'file mappings'! |
9536 | 3250 |
|
13177 | 3251 |
autopackage_default_dot_apspec_mappings |
3252 |
|mappings| |
|
3253 |
||
3254 |
mappings := Dictionary new. |
|
3255 |
mappings |
|
14339 | 3256 |
at: 'TOP' put: ( self pathToTop_unix ); "/ unix here |
3257 |
"/ at: 'MODULE_PATH' put: ( self moduleDirectory ); "/ unix here |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3258 |
at: 'DESCRIPTION' put: (self description); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3259 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3260 |
at: 'PRODUCT_DATE' put: (self productDate); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3261 |
at: 'PRODUCT_PUBLISHER' put: (self productPublisher); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3262 |
at: 'PRODUCT_WEBSITE' put: (self productWebSite); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3263 |
at: 'PRODUCT_INSTALLDIR' put: (self productInstallDir); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3264 |
at: 'PRODUCT_TYPE' put: (self productType); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3265 |
at: 'PRODUCT_LICENSE' put: (self productLicense); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3266 |
at: 'PRODUCT_DESCRIPTION' put: (self productDescription); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3267 |
at: 'MAINTAINER' put: (self productMaintainer); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3268 |
at: 'PACKAGER' put: (self productPublisher); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3269 |
yourself. |
13419 | 3270 |
|
13177 | 3271 |
^ mappings |
3272 |
||
3273 |
"Created: / 21-12-2010 / 09:00:49 / cg" |
|
14339 | 3274 |
"Modified: / 05-09-2012 / 10:09:06 / cg" |
13177 | 3275 |
! |
3276 |
||
10306 | 3277 |
bc_dot_mak_mappings |
3278 |
|d| |
|
3279 |
||
14337 | 3280 |
d := self common_mappings. |
13419 | 3281 |
d |
14339 | 3282 |
at: 'TOP' put: ( self pathToTop_win32 ); "/ win32 here |
3283 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ); "/ win32 here |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3284 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3285 |
at: 'ADDITIONAL_BASE_ADDRESS_DEFINITION' put: (self additionalBaseAddressDefinition_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3286 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3287 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_bc_dot_mak); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3288 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3289 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3290 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3291 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32 ? ''); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3292 |
at: 'LOCAL_DEFINES' put: self localDefines_win32 ? ''; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3293 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32 ? ''; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3294 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_bc_dot_mak ? ''). |
10306 | 3295 |
^ d |
3296 |
||
3297 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
14339 | 3298 |
"Modified: / 05-09-2012 / 10:02:51 / cg" |
10306 | 3299 |
! |
3300 |
||
9627 | 3301 |
bmake_dot_mak_mappings |
14337 | 3302 |
^ self common_mappings |
14344
b06bca5c82fa
changed: #bmake_dot_mak_mappings
Claus Gittinger <cg@exept.de>
parents:
14339
diff
changeset
|
3303 |
at:'TOP' put: ( self pathToTop_win32 ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3304 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3305 |
at:'SUBPROJECT_VCMAKE_CALLS' put:(self subProjectVCmakeCalls); |
14334 | 3306 |
at:'SUBPROJECT_LCCMAKE_CALLS' put:(self subProjectLCCmakeCalls); |
3307 |
at:'SUBPROJECT_TCCMAKE_CALLS' put:(self subProjectTCCmakeCalls); |
|
14345 | 3308 |
at:'SUBPROJECT_MINGWMAKE_CALLS' put:(self subProjectMingwmakeCalls); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3309 |
yourself |
9627 | 3310 |
|
3311 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
14345 | 3312 |
"Modified: / 05-09-2012 / 19:45:36 / cg" |
9575 | 3313 |
! |
3314 |
||
13411 | 3315 |
builder_baseline_dot_rbspec_mappings |
3316 |
|mappings| |
|
3317 |
||
3318 |
mappings := Dictionary new. |
|
3319 |
mappings |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3320 |
at:'APPLICATION' put:(self perform:#applicationName ifNotUnderstood:[self packageName]); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3321 |
at:'APPLICATION_PACKAGE' put:self package printString; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3322 |
at:'PREAMBLE' put:self builder_baseline_dot_rbspec_preamble; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3323 |
at:'POSTAMBLE' put:self builder_baseline_dot_rbspec_postamble; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3324 |
at:'PACKAGES' put:self builder_baseline_dot_rbspec_packages; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3325 |
yourself. |
13411 | 3326 |
^ mappings |
3327 |
||
3328 |
"Modified: / 21-12-2010 / 11:00:22 / cg" |
|
3329 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3330 |
"Modified: / 09-06-2011 / 14:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3331 |
! |
|
3332 |
||
3333 |
builder_baseline_dot_rbspec_packages |
|
3334 |
^ String streamContents: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3335 |
[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3336 |
self allPreRequisitesSorted do: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3337 |
[:packageId | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3338 |
s |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3339 |
nextPutAll:(' package "%1"' bindWith:packageId); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3340 |
cr ] ]. |
13411 | 3341 |
|
3342 |
"Created: / 24-02-2011 / 11:59:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3343 |
! |
|
3344 |
||
13419 | 3345 |
classLine_mappings:aClassName |
12545 | 3346 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3347 |
at:'CLASS' put:(self st2c:aClassName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3348 |
yourself |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3349 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3350 |
"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
|
3351 |
"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
|
3352 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3353 |
|
14337 | 3354 |
common_mappings |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3355 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3356 |
at: 'TAB' put: ( Character tab asString ); |
14339 | 3357 |
at: 'TOP' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3358 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3359 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
14337 | 3360 |
at: 'MODULE' put: ( self module ); |
14339 | 3361 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); "/ always unix format |
3362 |
at: 'MODULE_PATH' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
|
14337 | 3363 |
yourself |
3364 |
||
3365 |
"Created: / 04-09-2012 / 13:04:26 / cg" |
|
3366 |
! |
|
3367 |
||
3368 |
make_dot_proto_mappings |
|
3369 |
^ self common_mappings |
|
14339 | 3370 |
at: 'MODULE' put: ( self module ); |
3371 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
3372 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
|
3373 |
at: 'TOP' put: ( self pathToTop_unix ); |
|
3374 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
|
14337 | 3375 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3376 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3377 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3378 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3379 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3380 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3381 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3382 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3383 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3384 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3385 |
at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3386 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3387 |
at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3388 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3389 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3390 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3391 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_make_dot_proto); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3392 |
yourself |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3393 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3394 |
"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
|
3395 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
12028 | 3396 |
"Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
3397 |
"Modified: / 22-08-2009 / 12:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14339 | 3398 |
"Modified: / 05-09-2012 / 10:10:40 / cg" |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3399 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3400 |
|
9627 | 3401 |
make_dot_spec_mappings |
14337 | 3402 |
^ self common_mappings |
14339 | 3403 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3404 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3405 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3406 |
at: 'CLASSES' put: [self generateClasses_make_dot_spec]; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3407 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3408 |
yourself |
9627 | 3409 |
|
3410 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
14339 | 3411 |
"Modified: / 05-09-2012 / 10:11:02 / cg" |
9575 | 3412 |
! |
3413 |
||
12428 | 3414 |
makefile_mappings |
3415 |
^ Dictionary new |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3416 |
yourself |
12428 | 3417 |
! |
3418 |
||
9627 | 3419 |
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
|
3420 |
|d s resourceCount| |
9627 | 3421 |
|
9630 | 3422 |
d := Dictionary new. |
3423 |
d |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3424 |
at: 'PRODUCT_NAME' put: (self productName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3425 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3426 |
at: 'PRODUCT_DATE' put: (self productDate); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3427 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3428 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3429 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3430 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3431 |
at: 'COMPANY_NAME' put: (self companyName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3432 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3433 |
at: 'FILE_VERSION' put: (self fileVersion); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3434 |
at: 'INTERNAL_NAME' put: (self internalName). |
11377 | 3435 |
|
9630 | 3436 |
s := self legalCopyright. |
3437 |
s notNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3438 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 3439 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3440 |
s := String streamContents:[:stream| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3441 |
|suff| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3442 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3443 |
s := self applicationIconFileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3444 |
s notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3445 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3446 |
suff := '.ico' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3447 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3448 |
suff := '' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3449 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3450 |
'IDR_MAINFRAME ICON DISCARDABLE "%1%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3451 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3452 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3453 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3454 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3455 |
s := self splashFileName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3456 |
s notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3457 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3458 |
suff := '.bmp' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3459 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3460 |
suff := '' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3461 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3462 |
'IDR_SPLASH BITMAP DISCARDABLE "%1%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3463 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3464 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3465 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3466 |
resourceCount := 2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3467 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3468 |
'IDR_MAINFRAME+%1 ICON DISCARDABLE "%2"' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3469 |
expandPlaceholdersWith:(Array with:resourceCount with:eachFilename) on:stream. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3470 |
stream cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3471 |
resourceCount := resourceCount+1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3472 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3473 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3474 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 3475 |
|
9630 | 3476 |
^ d |
9627 | 3477 |
|
3478 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
13309
27f463f6c0cb
changed: #packageName_dot_rc_mappings
Claus Gittinger <cg@exept.de>
parents:
13285
diff
changeset
|
3479 |
"Modified: / 22-02-2011 / 11:30:36 / cg" |
9536 | 3480 |
! |
3481 |
||
13411 | 3482 |
package_dot_deps_dot_rake_mappings |
3483 |
| dependencies | |
|
3484 |
||
3485 |
dependencies := String streamContents: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3486 |
[:s| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3487 |
self allPreRequisites do: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3488 |
[:package| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3489 |
(self preRequisitesFor: package) do: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3490 |
[:prereq| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3491 |
s nextPutAll: ('task "%1" => "%2"' bindWith: package with: prereq); cr]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3492 |
s cr]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3493 |
self effectivePreRequisites do: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3494 |
[:prereq| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3495 |
s nextPutAll: ('task "%1" => "%2"' bindWith: self package with: prereq); cr]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3496 |
]. |
13411 | 3497 |
|
3498 |
^ (Dictionary new) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3499 |
at:'DEPENDENCIES' put:dependencies; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3500 |
yourself |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3501 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3502 |
" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3503 |
stx_libjava generate_package_dot_deps_dot_rake |
13411 | 3504 |
" |
3505 |
||
3506 |
"Created: / 24-02-2011 / 22:32:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3507 |
! |
|
3508 |
||
9627 | 3509 |
replaceMappings: mappings in: fileTemplate |
9733 | 3510 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 3511 |
|
9733 | 3512 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 3513 |
|
9733 | 3514 |
" |
13419 | 3515 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
9733 | 3516 |
" |
9627 | 3517 |
|
3518 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
3519 |
"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
|
3520 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3521 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3522 |
st2c:aString |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3523 |
^ (aString asString |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3524 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3525 |
replaceAny:':' with:$_ |
9536 | 3526 |
! ! |
3527 |
||
12364 | 3528 |
!ProjectDefinition class methodsFor:'file mappings support'! |
9817 | 3529 |
|
12545 | 3530 |
classNamesByCategory |
3531 |
"answer a dictionary |
|
13728 | 3532 |
category -> classNames topological sorted" |
12545 | 3533 |
|
3534 |
|pivateClassesOf sorter classes classNames mapping| |
|
3535 |
||
3536 |
mapping := Dictionary new. |
|
3537 |
||
3538 |
classes := self compiled_classes_common. |
|
3539 |
pivateClassesOf := IdentityDictionary new. |
|
3540 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
3541 |
||
3542 |
sorter := [:a :b | |
|
13728 | 3543 |
"/ a must come before b iff: |
3544 |
"/ b is a subclass of a |
|
3545 |
"/ b has a private class which is a subclass of a |
|
3546 |
"/ a is a sharedPool, used by b |
|
3547 |
||
3548 |
|mustComeBefore pivateClassesOfB| |
|
3549 |
||
3550 |
mustComeBefore := false. |
|
3551 |
mustComeBefore := (a isSharedPool and:[(b sharedPoolNames includes: a name)]). |
|
3552 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
3553 |
mustComeBefore ifFalse:[ |
|
3554 |
pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ]. |
|
3555 |
pivateClassesOfB do:[:eachClassInB | |
|
3556 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
3557 |
]. |
|
3558 |
]. |
|
3559 |
mustComeBefore |
|
12545 | 3560 |
]. |
3561 |
||
3562 |
classes topologicalSort:sorter. |
|
3563 |
||
3564 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
13728 | 3565 |
|prefix depClasses depClassNames| |
3566 |
||
3567 |
prefix := platformID asUppercase. |
|
3568 |
depClasses := self compiled_classesForArchitecture:platformID. |
|
3569 |
depClasses notEmpty ifTrue:[ |
|
3570 |
(self compiled_classNamesForPlatform:platformID) |
|
3571 |
select:[:nm | (Smalltalk at:nm ifAbsent:nil) isNil] |
|
3572 |
thenDo:[:nm | Transcript showCR:nm]. |
|
3573 |
(depClasses includes:nil) ifTrue:[ |
|
13836
97abd31bbd13
changed: #classNamesByCategory
Claus Gittinger <cg@exept.de>
parents:
13823
diff
changeset
|
3574 |
(Dialog confirm:'Dependencies (and therefore build-order) might be incorrect\(some classes are not present; see Transcript).\\Continue anyway ?' withCRs) |
13728 | 3575 |
ifFalse:[ |
3576 |
AbortOperationRequest raise. |
|
3577 |
]. |
|
3578 |
depClassNames := self compiled_classNamesForPlatform:platformID. |
|
3579 |
] ifFalse:[ |
|
3580 |
depClasses topologicalSort:sorter. |
|
3581 |
depClassNames := depClasses collect:[:eachClass| eachClass name]. |
|
3582 |
]. |
|
3583 |
mapping at:prefix put:depClassNames. |
|
3584 |
]. |
|
3585 |
||
3586 |
classNames := classes collect:[:eachClass| eachClass name]. |
|
3587 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3588 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
3589 |
classNames add:nm. |
|
3590 |
]. |
|
3591 |
]. |
|
3592 |
||
3593 |
mapping at:'COMMON' put:classNames. |
|
12545 | 3594 |
]. |
3595 |
^ mapping |
|
3596 |
||
3597 |
" |
|
3598 |
stx_libbasic classNamesByCategory |
|
3599 |
stx_libbasic3 classNamesByCategory |
|
3600 |
stx_libview classNamesByCategory |
|
3601 |
" |
|
3602 |
||
3603 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
13836
97abd31bbd13
changed: #classNamesByCategory
Claus Gittinger <cg@exept.de>
parents:
13823
diff
changeset
|
3604 |
"Modified: / 25-11-2011 / 16:41:47 / cg" |
12545 | 3605 |
! |
3606 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3607 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3608 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3609 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3610 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3611 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3612 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3613 |
filenameForClass:classNameOrClass |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3614 |
"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
|
3615 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3616 |
"/ "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
|
3617 |
"/ See also: #generateRemoveShellScriptOn: and #generateRenamShellScriptOn:" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3618 |
"/ classNameOrClass isBehavior ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3619 |
"/ ^ classNameOrClass generateClassFilename. |
13419 | 3620 |
"/ ] ifFalse:[ |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3621 |
"/ |cls| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3622 |
"/ |
13419 | 3623 |
"/ cls := Smalltalk classNamed:classNameOrClass. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3624 |
"/ cls notNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3625 |
"/ ^ cls generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3626 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3627 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3628 |
"/ "end special code" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3629 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3630 |
^ Smalltalk fileNameForClass:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3631 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3632 |
" |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3633 |
self filenameForClass:HTML::Encoder |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3634 |
Smalltalk fileNameForClass:HTML::Encoder |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3635 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3636 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3637 |
"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
|
3638 |
"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
|
3639 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3640 |
|
13419 | 3641 |
generateClassLines:classLineTemplate |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3642 |
"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
|
3643 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3644 |
^ 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
|
3645 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3646 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3647 |
generateClassLines:classLineTemplate forClasses:classNames |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
3648 |
"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
|
3649 |
|
13419 | 3650 |
^ self generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:true |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3651 |
! |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3652 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3653 |
generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:includeAdditionalClasses |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3654 |
"for the init-file: generate class-init-lines for a collection of classes" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
3655 |
|
13419 | 3656 |
^ String |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3657 |
streamContents:[:s | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3658 |
|classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3659 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3660 |
putLineForClassName := [:className | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3661 |
|newClassLine mappings| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3662 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3663 |
mappings := self classLine_mappings:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3664 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3665 |
s nextPutLine:newClassLine |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3666 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3667 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3668 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3669 |
classNamesUnloaded := classNames |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3670 |
select:[:nm | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3671 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3672 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3673 |
cls := Smalltalk classNamed:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3674 |
cls isNil or:[ cls isLoaded not ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3675 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3676 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3677 |
classNamesSorted do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3678 |
classNamesUnloaded do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3679 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3680 |
includeAdditionalClasses ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3681 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3682 |
do:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3683 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3684 |
putLineForClassName value:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3685 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3686 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3687 |
#( ('UNIX' unix) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3688 |
('WIN32' win32) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3689 |
('VMS' vms) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3690 |
('BEOS' beos) ) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3691 |
pairsDo:[:ifdef :platformName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3692 |
|archClassNames archClassesLoaded| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3693 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3694 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3695 |
archClassNames notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3696 |
s nextPutLine:'#ifdef ' , ifdef. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3697 |
archClassNames do:[:clsName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3698 |
putLineForClassName value:clsName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3699 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3700 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3701 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3702 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3703 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3704 |
] |
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3705 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3706 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3707 |
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
|
3708 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 3709 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
3710 |
" |
|
3711 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3712 |
"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
|
3713 |
"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
|
3714 |
"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
|
3715 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3716 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3717 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3718 |
^ 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
|
3719 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3720 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3721 |
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
|
3722 |
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
|
3723 |
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
|
3724 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3725 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3726 |
"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
|
3727 |
"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
|
3728 |
"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
|
3729 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
3730 |
|
13419 | 3731 |
generateClasses_make_dot_spec |
12545 | 3732 |
|classNamesDict| |
3733 |
||
3734 |
classNamesDict := self classNamesByCategory. |
|
3735 |
||
3736 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3737 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3738 |
s nextPutLine:eachCategory,'_CLASSES= \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3739 |
classNames do:[:eachClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3740 |
s tab; nextPutAll:eachClassName; nextPutLine:' \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3741 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3742 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3743 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3744 |
s cr. |
12545 | 3745 |
]. |
3746 |
||
3747 |
" |
|
3748 |
stx_libbasic generateClasses_make_dot_spec |
|
3749 |
stx_libbasic3 generateClasses_make_dot_spec |
|
3750 |
stx_libview generateClasses_make_dot_spec |
|
3751 |
stx_libboss generateClasses_make_dot_spec |
|
3752 |
" |
|
3753 |
||
3754 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
3755 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
|
3756 |
! |
|
3757 |
||
13419 | 3758 |
generateDependencies:whichArchitecture |
3759 |
^ String |
|
13763
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3760 |
streamContents:[:s | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3761 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3762 |
putDependencyForClassBaseNameBlock |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3763 |
archClassNames archClassesPresent archClassesLoaded |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3764 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3765 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3766 |
putSingleClassDependencyEntryBlock := [:cls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3767 |
|sclsBaseName| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3768 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3769 |
s nextPutAll:' $(INCLUDE_TOP)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3770 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3771 |
sclsBaseName := self filenameForClass:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3772 |
s nextPutAll:(self |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3773 |
topRelativePathTo:sclsBaseName |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3774 |
inPackage:cls package |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3775 |
architecture:whichArchitecture). |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3776 |
s nextPutAll:'.$(H)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3777 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3778 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3779 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3780 |
s nextPutAll:'$(OUTDIR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3781 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3782 |
s nextPutAll:'.$(O)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3783 |
s nextPutAll:' '. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3784 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3785 |
s nextPutAll:'.$(H)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3786 |
s nextPutAll:': '. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3787 |
s nextPutAll:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3788 |
s nextPutAll:'.st'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3789 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3790 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3791 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3792 |
putDependencyForClassBlock := [:cls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3793 |
|clsBaseName already| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3794 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3795 |
clsBaseName := self filenameForClass:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3796 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3797 |
cls isLoaded ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3798 |
already := IdentitySet new. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3799 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3800 |
sharedPools do:[:poolClass | |
13798
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3801 |
poolClass isNil ifTrue:[ |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3802 |
Dialog warn:'At least one pool class is missing.\\Dependencies are incomplete.' withCRs |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3803 |
] ifFalse:[ |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3804 |
putSingleClassDependencyEntryBlock value:poolClass. |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3805 |
already add:poolClass. |
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3806 |
] |
13763
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3807 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3808 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3809 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3810 |
allSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3811 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3812 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3813 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3814 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3815 |
allPrivateClassesDo:[:eachPrivateClass | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3816 |
eachPrivateClass |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3817 |
allSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3818 |
|sclsBaseName| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3819 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3820 |
scls ~~ cls ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3821 |
scls isPrivate ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3822 |
(already includes:scls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3823 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3824 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3825 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3826 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3827 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3828 |
] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3829 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3830 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3831 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3832 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3833 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3834 |
putDependencyForExtensionsBlock := [ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3835 |
|already| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3836 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3837 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3838 |
already := Set new. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3839 |
self extensionMethodNames pairWiseDo:[:className :selector | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3840 |
|mthdCls cls| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3841 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3842 |
((mthdCls := Smalltalk classNamed:className) notNil |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3843 |
and:[ mthdCls isLoaded ]) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3844 |
ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3845 |
cls := mthdCls theNonMetaclass. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3846 |
(already includes:cls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3847 |
cls |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3848 |
withAllSuperclassesDo:[:scls | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3849 |
(already includes:scls) ifFalse:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3850 |
putSingleClassDependencyEntryBlock value:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3851 |
already add:scls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3852 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3853 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3854 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3855 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3856 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3857 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3858 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3859 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3860 |
classNames := self compiled_classNames_common. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3861 |
classesPresent := classNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3862 |
collect:[:className | Smalltalk classNamed:className] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3863 |
thenSelect:[:cls | cls notNil]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3864 |
classesLoaded := classesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3865 |
select:[:cls | cls isLoaded]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3866 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3867 |
(Class classesSortedByLoadOrder:classesLoaded) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3868 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3869 |
(classesPresent select:[:cls | cls isLoaded not]) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3870 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3871 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3872 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3873 |
do:[:className :attr | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3874 |
|cls| |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3875 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3876 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3877 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3878 |
putDependencyForClassBlock value:cls. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3879 |
] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3880 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3881 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3882 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3883 |
archClassesPresent := archClassNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3884 |
collect:[:className | Smalltalk classNamed:className] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3885 |
thenSelect:[:cls | cls notNil]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3886 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3887 |
archClassesLoaded := archClassesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3888 |
select:[:cls | cls isLoaded]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3889 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3890 |
(Class classesSortedByLoadOrder:archClassesLoaded) |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3891 |
do:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3892 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3893 |
"some classes are not loaded - probably this is the wrong architecture. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3894 |
Sorry, but for these classes, we do not know the superclass chain" |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3895 |
archClassesPresent |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3896 |
select:[:cls | cls isLoaded not] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3897 |
thenDo:putDependencyForClassBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3898 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3899 |
"for the following classes, we do not know the superclass chain |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3900 |
and neither the real class file name" |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3901 |
archClassNames |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3902 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3903 |
thenDo:[:eachClassName | |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3904 |
putDependencyForClassBaseNameBlock value:(self filenameForClass:eachClassName). |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3905 |
s nextPutLine:' $(STCHDR)'. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3906 |
]. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3907 |
|
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3908 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
560aef322c65
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13734
diff
changeset
|
3909 |
] |
9887 | 3910 |
|
3911 |
" |
|
3912 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 3913 |
stx_libbasic3 generateDependencies:#win32 |
3914 |
" |
|
3915 |
||
9887 | 3916 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
13798
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
3917 |
"Modified: / 27-10-2011 / 16:35:59 / cg" |
9887 | 3918 |
! |
3919 |
||
3920 |
generateDependencies_unix |
|
3921 |
^ self generateDependencies:#unix |
|
3922 |
||
3923 |
" |
|
3924 |
stx_libbasic3 generateDependencies:#unix |
|
3925 |
stx_libbasic3 generateDependencies:#win32 |
|
3926 |
" |
|
3927 |
||
3928 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
3929 |
! |
|
3930 |
||
3931 |
generateDependencies_win32 |
|
3932 |
^ self generateDependencies:#win32 |
|
3933 |
||
3934 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
3935 |
! |
|
3936 |
||
9956 | 3937 |
generateLocalIncludes_unix |
3938 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3939 |
s nextPutAll:(self localIncludes_unix). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3940 |
self searchForProjectsWhichProvideHeaderFiles |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3941 |
do:[:includeProject | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3942 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3943 |
] |
9956 | 3944 |
] |
3945 |
||
3946 |
" |
|
3947 |
bosch_dapasx generateLocalIncludes_unix |
|
13419 | 3948 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
3949 |
stx_libbasic generateLocalIncludes_unix |
|
3950 |
stx_libview generateLocalIncludes_unix |
|
3951 |
stx_libtool2 generateLocalIncludes_unix |
|
3952 |
stx_libui generateLocalIncludes_unix |
|
9956 | 3953 |
" |
3954 |
||
3955 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3956 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
9956 | 3957 |
! |
3958 |
||
9887 | 3959 |
generateLocalIncludes_win32 |
3960 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3961 |
s nextPutAll:(self localIncludes_win32). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3962 |
self searchForProjectsWhichProvideHeaderFiles |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3963 |
do:[:includeProject | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3964 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3965 |
] |
9887 | 3966 |
] |
3967 |
||
3968 |
" |
|
3969 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
13419 | 3970 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
3971 |
stx_libbasic generateLocalIncludes_win32 |
|
3972 |
stx_libview generateLocalIncludes_win32 |
|
3973 |
stx_libtool2 generateLocalIncludes_win32 |
|
9887 | 3974 |
" |
3975 |
||
3976 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3977 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
9887 | 3978 |
! |
3979 |
||
13419 | 3980 |
generateObjects_make_dot_spec |
12545 | 3981 |
|classNamesDict| |
3982 |
||
3983 |
classNamesDict := self classNamesByCategory. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3984 |
|
9817 | 3985 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3986 |
|putLineForClassName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3987 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3988 |
putLineForClassName := |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3989 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3990 |
|mappings newObjectLine| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3991 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3992 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3993 |
s nextPutLine:newObjectLine. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3994 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3995 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3996 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3997 |
s nextPutLine:eachCategory,'_OBJS= \'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3998 |
classNames do:putLineForClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
3999 |
(eachCategory = 'COMMON' and:[self hasExtensionMethods]) ifTrue:[ |
14643 | 4000 |
s nextPutLine:' $(OUTDIR_SLASH)extensions.$(O) \'. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4001 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4002 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4003 |
s cr. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4004 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4005 |
s cr. |
12545 | 4006 |
]. |
9817 | 4007 |
|
4008 |
" |
|
12545 | 4009 |
stx_libbasic generateObjects_make_dot_spec |
9817 | 4010 |
stx_libbasic3 generateObjects_make_dot_spec |
12545 | 4011 |
stx_libview generateObjects_make_dot_spec |
4012 |
stx_libboss generateObjects_make_dot_spec |
|
9817 | 4013 |
" |
4014 |
||
4015 |
"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
|
4016 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 4017 |
! |
4018 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4019 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
4020 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4021 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4022 |
^ String streamContents:[:s | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4023 |
myProjectId := self package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4024 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4025 |
is required!! |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4026 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4027 |
'popd' is not needed, since each line is executed in |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4028 |
an own cmd.exe process. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4029 |
'popd' is not desireable, since it masks a possible |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4030 |
error return from the 'bmake'. |
14547 | 4031 |
" |
4032 |
||
4033 |
"cg: changed to not go and remake librun" |
|
4034 |
(self allPreRequisitesSorted "copyWith:'stx:librun'") do:[:eachProjectId | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4035 |
s tab; nextPutAll:'pushd '; |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4036 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4037 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4038 |
]. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4039 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4040 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4041 |
" |
13419 | 4042 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
4043 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4044 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4045 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4046 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4047 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4048 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4049 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4050 |
^ String streamContents:[:s | |
14547 | 4051 |
"cg: changed to not go and remake librun" |
4052 |
(self allPreRequisitesSorted "copyWith:'stx:librun'") do:[:projectID | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4053 |
libPath := self pathToPackage_unix:projectID. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4054 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4055 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4056 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4057 |
s cr. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4058 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4059 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4060 |
" |
13419 | 4061 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
4062 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4063 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4064 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
4065 |
|
10022 | 4066 |
generateSubDirectories |
4067 |
^ String streamContents:[:s | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4068 |
self subProjects |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4069 |
do:[:eachProjectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4070 |
s space; nextPutAll:(self unixPathToPackage:eachProjectID from:self package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4071 |
] |
10022 | 4072 |
] |
4073 |
||
4074 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
4075 |
exept_expecco generateSubDirectories |
10022 | 4076 |
" |
4077 |
||
4078 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
4079 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
4080 |
! |
|
4081 |
||
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4082 |
generate_definitionClassLine_libInit_dot_cc |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4083 |
"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
|
4084 |
|
13419 | 4085 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4086 |
generateClassLines:(self classLine_libInit_dot_cc) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4087 |
forClasses:(Array with:self name) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4088 |
includeAdditionalClasses:false |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4089 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4090 |
" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4091 |
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
|
4092 |
" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4093 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4094 |
|
10022 | 4095 |
headerFileOutputArg |
4096 |
"/ "all stx stuff goes to the common include directory. |
|
4097 |
"/ Everything else is left locally" |
|
4098 |
"/ |
|
4099 |
"/ ( |
|
4100 |
"/ #( |
|
13419 | 4101 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
10022 | 4102 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
4103 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
4104 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
4105 |
"/ 'stx:libboss' 'stx:libdb' |
|
4106 |
"/ ) |
|
4107 |
"/ includes:self package) ifTrue:[ |
|
4108 |
"/ ^ '-H$(INCLUDE)' |
|
4109 |
"/ ]. |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4110 |
^ '-headerDir=.' |
10022 | 4111 |
|
4112 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4113 |
"Modified: / 23-12-2011 / 15:07:27 / cg" |
10022 | 4114 |
! |
4115 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4116 |
objectLine_make_dot_spec_mappings: aClassName |
13419 | 4117 |
^ Dictionary new |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4118 |
at: 'CLASSFILE' put:(self filenameForClass:aClassName); |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4119 |
yourself |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4120 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4121 |
"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
|
4122 |
"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
|
4123 |
"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
|
4124 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4125 |
|
9887 | 4126 |
subProjectBmakeCalls |
12439 | 4127 |
"generate submake-calls for borland bcc" |
4128 |
||
13419 | 4129 |
^ self subProjectMakeCallsUsing:'call bmake %1 %2'. |
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4130 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4131 |
|
14334 | 4132 |
subProjectLCCmakeCalls |
4133 |
"generate submake-calls for lcc" |
|
4134 |
||
4135 |
^ self subProjectMakeCallsUsing:'call lccmake %1 %2'. |
|
4136 |
||
4137 |
"Created: / 03-09-2012 / 19:49:08 / cg" |
|
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4138 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4139 |
|
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
4140 |
subProjectMakeCallsUsing:callString |
9887 | 4141 |
^ String streamContents:[:s | |
13734 | 4142 |
self subProjects do:[:packageID | |
4143 |
s nextPutLine:'@echo "***********************************"'. |
|
4144 |
s nextPutLine:'@echo "Buildung ',(packageID copyReplaceAll:$: with:$/). |
|
4145 |
s nextPutLine:'@echo "***********************************"'. |
|
4146 |
s nextPutLine:'@cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
4147 |
s nextPutAll:'@'; nextPutLine:callString. |
|
4148 |
s nextPutLine:'@cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
4149 |
s cr. |
|
4150 |
] |
|
9887 | 4151 |
] |
4152 |
||
4153 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
13734 | 4154 |
"Modified: / 27-09-2011 / 19:36:12 / cg" |
11937 | 4155 |
! |
4156 |
||
14345 | 4157 |
subProjectMingwmakeCalls |
4158 |
"generate submake-calls for mingw" |
|
4159 |
||
4160 |
^ self subProjectMakeCallsUsing:'call mingwmake %1 %2'. |
|
4161 |
||
4162 |
"Created: / 05-09-2012 / 19:45:53 / cg" |
|
4163 |
! |
|
4164 |
||
14334 | 4165 |
subProjectTCCmakeCalls |
4166 |
"generate submake-calls for tcc" |
|
4167 |
||
4168 |
^ self subProjectMakeCallsUsing:'call tccmake %1 %2'. |
|
4169 |
||
4170 |
"Created: / 03-09-2012 / 19:50:53 / cg" |
|
4171 |
! |
|
4172 |
||
11937 | 4173 |
subProjectVCmakeCalls |
12439 | 4174 |
"generate submake-calls for visual-C" |
4175 |
||
13419 | 4176 |
^ self subProjectMakeCallsUsing:'call vcmake %1 %2'. |
9817 | 4177 |
! ! |
4178 |
||
12364 | 4179 |
!ProjectDefinition class methodsFor:'file templates'! |
4180 |
||
13177 | 4181 |
autopackage_default_dot_apspec |
4182 |
"for linux's autopackage" |
|
4183 |
||
4184 |
^ |
|
4185 |
'# -*- shell-script -*- |
|
4186 |
[Meta] |
|
4187 |
ShortName: %(APPLICATION) |
|
4188 |
SoftwareVersion: %(PRODUCT_VERSION) |
|
4189 |
DisplayName: %(DESCRIPTION) |
|
4190 |
RootName: @exept.de/expecco:$SOFTWAREVERSION |
|
4191 |
Summary: %(DESCRIPTION) |
|
4192 |
Maintainer: %(MAINTAINER) |
|
4193 |
Packager: %(PACKAGER) |
|
4194 |
PackageVersion: 1 |
|
4195 |
CPUArchitectures: x86 |
|
4196 |
AutopackageTarget: 1.0 |
|
4197 |
Type: %(PRODUCT_TYPE) |
|
13419 | 4198 |
License: %(PRODUCT_LICENSE) |
13177 | 4199 |
|
4200 |
[Description] |
|
4201 |
%(PRODUCT_DESCRIPTION) |
|
4202 |
||
4203 |
[BuildPrepare] |
|
4204 |
# If you''re using autotools, the default should be enough. |
|
4205 |
# prepareBuild will set up apbuild and run configure for you. If you |
|
4206 |
# need to pass arguments to configure, just add them to prepareBuild: |
|
4207 |
# prepareBuild --enable-foo --disable-bar |
|
4208 |
#prepareBuild |
|
4209 |
||
4210 |
[BuildUnprepare] |
|
4211 |
# If you''re using prepareBuild above, there is no need to change this!! |
|
4212 |
#unprepareBuild |
|
4213 |
||
4214 |
[Globals] |
|
4215 |
# Variables declared in this section will be available in all other sections |
|
4216 |
export APKG_BUILD_SKIP_CONFIGURE=1 |
|
4217 |
export APKG_BUILD_SKIP_MAKE=1 |
|
4218 |
export MYPREFIX=/opt/%(APPLICATION) |
|
4219 |
||
4220 |
[Prepare] |
|
4221 |
#recommend ''@autopackage.org/autopackage-gtk'' 1 |
|
4222 |
||
4223 |
[Imports] |
|
4224 |
import <<EOF |
|
4225 |
$source_dir/%(APPLICATION) |
|
4226 |
$source_dir/resources |
|
4227 |
$source_dir/keyboard.rc |
|
4228 |
$source_dir/display.rc |
|
4229 |
$source_dir/../doc |
|
4230 |
$source_dir/../testsuites/webedition |
|
4231 |
$source_dir/../projects/libraries |
|
4232 |
$source_dir/../reportGenerator/tools |
|
4233 |
$source_dir/../../pdf/afm |
|
4234 |
$source_dir/../plugin/selenium/libexept_expecco_plugin_selenium.so |
|
4235 |
$source_dir/../externalTools |
|
4236 |
EOF |
|
4237 |
||
4238 |
for i in $source_dir/*.so |
|
4239 |
do |
|
4240 |
echo $source_dir/$(readlink $i) |
|
4241 |
done | import |
|
4242 |
||
4243 |
[Install] |
|
4244 |
if [ "$PREFIX" !!= "/usr" ] |
|
4245 |
then |
|
4246 |
export MYPREFIX=$PREFIX |
|
4247 |
fi |
|
4248 |
||
4249 |
find . -type d \( -name CVS -or -name ''not_*'' \) -print | xargs rm -rf |
|
4250 |
mkdir -p $MYPREFIX |
|
4251 |
copyFiles expecco *.rc resources $MYPREFIX/bin |
|
4252 |
copyFiles *.so $MYPREFIX/lib |
|
4253 |
copyFiles doc externalTools $MYPREFIX/packages/exept/expecco |
|
4254 |
copyFiles webedition/projects libraries $MYPREFIX/testsuites |
|
4255 |
copyFiles tools $MYPREFIX/packages/exept/expecco/reportGenerator |
|
4256 |
copyFiles afm $MYPREFIX/packages/exept/pdf |
|
4257 |
copyFiles libexept_expecco_plugin_selenium.so $MYPREFIX/plugin |
|
4258 |
||
4259 |
#installExe expecco |
|
4260 |
#installLib *.so |
|
4261 |
#installData resources |
|
4262 |
#installData keyboard.rc |
|
4263 |
#installData doc |
|
4264 |
||
4265 |
[Uninstall] |
|
4266 |
# Leaving this at the default is safe unless you use custom commands in |
|
4267 |
# "Install" to create files. All autopackage API functions |
|
4268 |
# that installs files are logged. |
|
4269 |
uninstallFromLog |
|
4270 |
' |
|
4271 |
||
4272 |
"Created: / 21-12-2010 / 09:06:21 / cg" |
|
4273 |
! |
|
4274 |
||
12364 | 4275 |
bc_dot_mak |
4276 |
"answer a template for the bc.mak makefile. |
|
4277 |
Any variable definition %(Variable) will be later replaced by the mapping. |
|
4278 |
$% characters have to be duplicated. |
|
4279 |
Only needed for WIN" |
|
4280 |
||
4281 |
^ self subclassResponsibility |
|
4282 |
! |
|
4283 |
||
4284 |
bmake_dot_mak |
|
4285 |
"the template code for the bmake.bat file" |
|
4286 |
||
13419 | 4287 |
^ |
12364 | 4288 |
'@REM ------- |
14336 | 4289 |
@REM make using Borland bcc32 |
12364 | 4290 |
@REM type bmake, and wait... |
4291 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4292 |
@REM ------- |
|
13797 | 4293 |
make.exe -N -f bc.mak %%* |
12364 | 4294 |
|
4295 |
%(SUBPROJECT_BMAKE_CALLS) |
|
4296 |
' |
|
4297 |
||
4298 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
14336 | 4299 |
"Modified: / 04-09-2012 / 11:46:22 / cg" |
12364 | 4300 |
! |
4301 |
||
13411 | 4302 |
builder_baseline_dot_rbspec |
4303 |
"For rake-base automatic builder" |
|
13419 | 4304 |
|
13411 | 4305 |
^ ' |
4306 |
# generated from project definition |
|
4307 |
||
4308 |
# load package dependencies |
|
4309 |
load ''package.deps.rake'' |
|
4310 |
||
4311 |
# kludge: clear some invalid dependencies of libwidg |
|
4312 |
# (should be fixed in baseline) |
|
4313 |
clear "stx:libwidg" => "stx:libui" |
|
4314 |
clear "stx:libwidg2" => "stx:libui" |
|
4315 |
||
4316 |
project :''%(APPLICATION):baseline'' do |
|
4317 |
# preamble |
|
4318 |
%(PREAMBLE) |
|
4319 |
# -------- |
|
4320 |
||
4321 |
%(PACKAGES) |
|
4322 |
||
4323 |
application "%(APPLICATION_PACKAGE)" |
|
4324 |
||
4325 |
# postamble |
|
4326 |
%(POSTABLE) |
|
4327 |
# --------- |
|
4328 |
||
4329 |
end |
|
4330 |
' |
|
4331 |
||
4332 |
"Created: / 24-02-2011 / 11:39:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4333 |
"Modified: / 27-02-2011 / 12:42:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4334 |
! |
|
4335 |
||
4336 |
builder_baseline_dot_rbspec_postamble |
|
4337 |
^ '' |
|
4338 |
||
4339 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4340 |
! |
|
4341 |
||
4342 |
builder_baseline_dot_rbspec_preamble |
|
4343 |
^ '' |
|
4344 |
||
4345 |
"Created: / 24-02-2011 / 11:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4346 |
! |
|
4347 |
||
12364 | 4348 |
classLine_libInit_dot_cc |
4349 |
||
4350 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
|
4351 |
||
4352 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
4353 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
4354 |
! |
|
4355 |
||
14334 | 4356 |
lccmake_dot_mak |
4357 |
"the template code for the lccmake.bat file" |
|
12364 | 4358 |
|
13419 | 4359 |
^ |
12364 | 4360 |
'@REM ------- |
4361 |
@REM make using lcc compiler |
|
14334 | 4362 |
@REM type lccmake, and wait... |
12364 | 4363 |
@REM do not edit - automatically generated from ProjectDefinition |
4364 |
@REM ------- |
|
14361 | 4365 |
make.exe -N -f bc.mak -DUSELCC=1 %%* |
12364 | 4366 |
|
4367 |
%(SUBPROJECT_LCCMAKE_CALLS) |
|
4368 |
' |
|
14334 | 4369 |
|
4370 |
"Created: / 03-09-2012 / 19:49:23 / cg" |
|
12364 | 4371 |
! |
4372 |
||
4373 |
make_dot_proto |
|
4374 |
"the template code for the make.proto file" |
|
4375 |
||
4376 |
^ self subclassResponsibility |
|
4377 |
! |
|
4378 |
||
4379 |
make_dot_spec |
|
4380 |
||
13419 | 4381 |
^ |
12364 | 4382 |
'# $','Header','$ |
4383 |
# |
|
13419 | 4384 |
# DO NOT EDIT |
14248 | 4385 |
# automagically generated from the projectDefinition: ',self name,"' at ',Timestamp now printString,"'. |
12364 | 4386 |
# |
4387 |
# Warning: once you modify this file, do not rerun |
|
4388 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
4389 |
# |
|
4390 |
# This file contains specifications which are common to all platforms. |
|
4391 |
# |
|
4392 |
||
4393 |
# Do NOT CHANGE THESE DEFINITIONS |
|
4394 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
4395 |
# to find the source code of a class and to find the library for a package) |
|
4396 |
MODULE=%(MODULE) |
|
4397 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
4398 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
4399 |
||
4400 |
||
4401 |
# Argument(s) to the stc compiler (stc --usage). |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
4402 |
# -headerDir=. : create header files locally |
12364 | 4403 |
# (if removed, they will be created as common |
4404 |
# -Pxxx : defines the package |
|
4405 |
# -Zxxx : a prefix for variables within the classLib |
|
4406 |
# -Dxxx : defines passed to to CC for inline C-code |
|
4407 |
# -Ixxx : include path passed to CC for inline C-code |
|
4408 |
# +optspace : optimized for space |
|
4409 |
# +optspace2 : optimized more for space |
|
4410 |
# +optspace3 : optimized even more for space |
|
4411 |
# +optinline : generate inline code for some ST constructs |
|
4412 |
# +inlineNew : additionally inline new |
|
4413 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
4414 |
# |
|
4415 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
4416 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
4417 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
4418 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
4419 |
||
4420 |
||
4421 |
# Argument(s) to the stc compiler (stc --usage). |
|
4422 |
# -warn : no warnings |
|
4423 |
# -warnNonStandard : no warnings about ST/X extensions |
|
4424 |
# -warnEOLComments : no warnings about EOL comment extension |
|
4425 |
# -warnPrivacy : no warnings about privateClass extension |
|
4426 |
# |
|
4427 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
4428 |
# STCWARNINGS=-warn |
|
4429 |
# STCWARNINGS=-warnNonStandard |
|
4430 |
# STCWARNINGS=-warnEOLComments |
|
4431 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
4432 |
||
12545 | 4433 |
%(CLASSES) |
4434 |
||
12364 | 4435 |
%(OBJECTS) |
4436 |
' |
|
4437 |
||
4438 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
4439 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
14248 | 4440 |
"Modified: / 26-07-2012 / 00:56:03 / cg" |
12364 | 4441 |
! |
4442 |
||
12428 | 4443 |
makefile |
13419 | 4444 |
^ |
12428 | 4445 |
'# |
13419 | 4446 |
# DO NOT EDIT |
12428 | 4447 |
# |
13419 | 4448 |
# make uses this file (Makefile) only, if there is no |
12428 | 4449 |
# file named "makefile" (lower-case m) in the same directory. |
4450 |
# My only task is to generate the real makefile and call make again. |
|
4451 |
# Thereafter, I am no longer used and needed. |
|
4452 |
# |
|
4453 |
||
4454 |
.PHONY: run |
|
4455 |
||
4456 |
run: makefile |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4457 |
$(MAKE) -f makefile |
12428 | 4458 |
|
4459 |
#only needed for the definition of $(TOP) |
|
4460 |
include Make.proto |
|
4461 |
||
14665 | 4462 |
makefile: mf |
4463 |
||
4464 |
mf: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4465 |
$(TOP)/rules/stmkmf |
12428 | 4466 |
' |
4467 |
! |
|
4468 |
||
14345 | 4469 |
mingwmake_dot_mak |
4470 |
"the template code for the mingwmake.bat file" |
|
4471 |
||
4472 |
^ |
|
4473 |
'@REM ------- |
|
4474 |
@REM make using mingw gnu compiler |
|
4475 |
@REM type mingwmake, and wait... |
|
4476 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4477 |
@REM ------- |
|
14642 | 4478 |
|
14738 | 4479 |
@call %(TOP)\rules\find_mingw.bat |
14748 | 4480 |
make.exe -N -f bc.mak %%USEMINGW_ARG%% %%* |
14345 | 4481 |
|
4482 |
%(SUBPROJECT_MINGWMAKE_CALLS) |
|
4483 |
' |
|
4484 |
||
4485 |
"Created: / 05-09-2012 / 19:44:51 / cg" |
|
4486 |
! |
|
4487 |
||
12364 | 4488 |
objectLine_make_dot_spec |
4489 |
||
14643 | 4490 |
^' $(OUTDIR_SLASH)%(CLASSFILE).$(O) \' |
12364 | 4491 |
|
4492 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
4493 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
4494 |
! |
|
4495 |
||
4496 |
packageName_dot_rc |
|
4497 |
"the template code for the <libName>.rc file. |
|
4498 |
Only used for WIN" |
|
4499 |
||
13419 | 4500 |
^ |
12364 | 4501 |
'// |
13419 | 4502 |
// DO NOT EDIT |
12364 | 4503 |
// automagically generated from the projectDefinition: ',self name,'. |
4504 |
// |
|
4505 |
VS_VERSION_INFO VERSIONINFO |
|
4506 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
4507 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4508 |
#if (__BORLANDC__) |
12364 | 4509 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
4510 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
4511 |
FILEOS VOS_NT_WINDOWS32 |
|
4512 |
FILETYPE %(FILETYPE) |
|
4513 |
FILESUBTYPE VS_USER_DEFINED |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4514 |
#endif |
12364 | 4515 |
|
4516 |
BEGIN |
|
4517 |
BLOCK "StringFileInfo" |
|
4518 |
BEGIN |
|
4519 |
BLOCK "040904E4" |
|
4520 |
BEGIN |
|
4521 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
4522 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
4523 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
4524 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
4525 |
%(LEGAL_COPYRIGHT_LINE) |
|
4526 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
|
4527 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
4528 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
4529 |
END |
|
4530 |
||
4531 |
END |
|
4532 |
||
4533 |
BLOCK "VarFileInfo" |
|
4534 |
BEGIN // Language | Translation |
|
4535 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
4536 |
END |
|
4537 |
END |
|
4538 |
' |
|
4539 |
" |
|
4540 |
stx_libbasic3 packageName_dot_rc |
|
4541 |
stx_libbasic3 generate_packageName_dot_rc |
|
4542 |
" |
|
4543 |
||
4544 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
4545 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
4546 |
"Modified: / 07-10-2011 / 10:51:34 / cg" |
12364 | 4547 |
! |
4548 |
||
13411 | 4549 |
package_dot_deps_dot_rake |
4550 |
^ ' |
|
4551 |
# Package dependencies. |
|
4552 |
# Automatically generated by project defintion. |
|
4553 |
||
4554 |
%(DEPENDENCIES) |
|
4555 |
||
4556 |
' |
|
4557 |
||
4558 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4559 |
! |
|
4560 |
||
14334 | 4561 |
tccmake_dot_mak |
4562 |
"the template code for the tccmake.bat file" |
|
4563 |
||
4564 |
^ |
|
4565 |
'@REM ------- |
|
14336 | 4566 |
@REM make using tcc compiler (Tiny-C) |
14334 | 4567 |
@REM type tccmake, and wait... |
4568 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4569 |
@REM ------- |
|
14361 | 4570 |
make.exe -N -f bc.mak -DUSETCC=1 %%* |
14334 | 4571 |
|
4572 |
%(SUBPROJECT_TCCMAKE_CALLS) |
|
4573 |
' |
|
4574 |
||
4575 |
"Created: / 03-09-2012 / 19:50:41 / cg" |
|
4576 |
! |
|
4577 |
||
12364 | 4578 |
vcmake_dot_mak |
4579 |
"the template code for the vcmake.bat file" |
|
4580 |
||
13419 | 4581 |
^ |
12364 | 4582 |
'@REM ------- |
14336 | 4583 |
@REM make using Microsoft Visual C compiler |
12364 | 4584 |
@REM type vcmake, and wait... |
4585 |
@REM do not edit - automatically generated from ProjectDefinition |
|
4586 |
@REM ------- |
|
13789 | 4587 |
|
4588 |
@if not defined VSINSTALLDIR ( |
|
14336 | 4589 |
call %(TOP)\rules\vcsetup.bat |
13789 | 4590 |
) |
13797 | 4591 |
make.exe -N -f bc.mak -DUSEVC %%* |
12364 | 4592 |
|
4593 |
%(SUBPROJECT_VCMAKE_CALLS) |
|
4594 |
' |
|
12966 | 4595 |
|
14336 | 4596 |
"Modified: / 04-09-2012 / 11:45:49 / cg" |
12364 | 4597 |
! ! |
4598 |
||
4599 |
!ProjectDefinition class methodsFor:'loading'! |
|
4600 |
||
12397 | 4601 |
ensureFullyLoaded |
4602 |
"ensure that all classes and extensions are loaded properly. |
|
4603 |
This is normally no problem for compiled classLibs - however, if a package |
|
4604 |
has only be installedAsAutoloaded, some classes might want to ensure that |
|
4605 |
when being loaded themself." |
|
4606 |
||
4607 |
self hasAllExtensionsLoaded ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4608 |
self breakPoint:#cg. |
12397 | 4609 |
]. |
4610 |
self hasAllClassesFullyLoaded ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4611 |
self hasAllClassesLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4612 |
self breakPoint:#cg. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4613 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4614 |
self installAutoloadedClasses. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4615 |
self classes do:[:cls | cls autoload ]. |
12397 | 4616 |
]. |
4617 |
||
4618 |
" |
|
4619 |
stx_libbasic ensureFullyLoaded |
|
4620 |
" |
|
12731 | 4621 |
"Verbose := true |
4622 |
stx_libjavascript hasAllExtensionsLoaded |
|
4623 |
" |
|
12735
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4624 |
"Verbose := true |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4625 |
stx_goodies_soap_xe hasAllExtensionsLoaded |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
4626 |
" |
13689
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
4627 |
|
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
4628 |
"Modified: / 12-09-2011 / 16:57:53 / cg" |
12397 | 4629 |
! |
4630 |
||
12364 | 4631 |
load |
4632 |
"load the project |
|
13419 | 4633 |
Answer true, if new classes have been installed for this package, |
12364 | 4634 |
false if the package's classes have been already present." |
4635 |
||
4636 |
^ self loadAsAutoloaded:false. |
|
4637 |
! |
|
4638 |
||
4639 |
loadAsAutoloaded:asAutoloaded |
|
4640 |
"load the project. |
|
4641 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
4642 |
Answer true, if new classes have been installed for this package, |
|
4643 |
false if the package's classes have been already present." |
|
4644 |
||
4645 |
|newStuffHasBeenLoaded meOrMySecondIncarnation| |
|
4646 |
||
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4647 |
self projectIsLoaded ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4648 |
asAutoloaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4649 |
"/ to be considered !! |
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4650 |
"/ self isFullyLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4651 |
"/ self hasAllExtensionsLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4652 |
"/ self loadExtensions. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4653 |
"/ ]. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4654 |
"/ self loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4655 |
"/ ]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4656 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4657 |
^ false |
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
4658 |
]. |
12749 | 4659 |
thisContext isRecursive ifTrue:[self breakPoint:#cg. ^ false]. "/ avoid endless loops |
12364 | 4660 |
|
4661 |
newStuffHasBeenLoaded := false. |
|
4662 |
||
4663 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4664 |
"/ thisContext fullPrintAll. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4665 |
Transcript showCR:('loading %1%2...' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4666 |
bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:['']) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4667 |
with:self name). |
12364 | 4668 |
]. |
4669 |
||
4670 |
self rememberOverwrittenExtensionMethods. |
|
4671 |
||
4672 |
self activityNotification:'Executing pre-load action'. |
|
4673 |
self preLoadAction. |
|
4674 |
||
4675 |
meOrMySecondIncarnation := self. |
|
4676 |
||
4677 |
Class withoutUpdatingChangesDo:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4678 |
self activityNotification:'Loading prerequisities'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4679 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4680 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4681 |
self checkPrerequisitesForLoading. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4682 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4683 |
asAutoloaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4684 |
self loadClassLibrary. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4685 |
"/ could have overloaded my first incarnation |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4686 |
meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4687 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4688 |
meOrMySecondIncarnation fetchSlotsFrom:self. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4689 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4690 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4691 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4692 |
self hasAllExtensionsLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4693 |
self activityNotification:'Loading extensions'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4694 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4695 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4696 |
self hasAllClassesLoaded ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4697 |
self activityNotification:'Loading classes'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4698 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4699 |
]. |
12743 | 4700 |
"/ no, don't load subProjects here - will lead to a recursion, which leads |
4701 |
"/ to some classes being loaded from source (soap) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4702 |
self activityNotification:'Loading sub projects'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4703 |
meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded. |
12364 | 4704 |
]. |
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
4705 |
self activityNotification:('Executing post-load action for %1' bindWith:self package). |
12372 | 4706 |
|
4707 |
"/ mhmh - already done for dll-loaded packages |
|
4708 |
"/ meOrMySecondIncarnation initializeAllClasses. |
|
12364 | 4709 |
meOrMySecondIncarnation postLoadAction. |
4710 |
||
4711 |
meOrMySecondIncarnation projectIsLoaded:true. |
|
12736
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
4712 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4713 |
self projectIsLoaded:true. |
12736
e18f8f352186
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
12735
diff
changeset
|
4714 |
]. |
12364 | 4715 |
|
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
4716 |
self activityNotification:('Done (%1).' bindWith:self package). |
12364 | 4717 |
^ newStuffHasBeenLoaded |
4718 |
||
4719 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
|
4720 |
"Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
4721 |
"Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13623
46625f58d8ee
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13614
diff
changeset
|
4722 |
"Modified: / 04-09-2011 / 10:01:53 / cg" |
12364 | 4723 |
! |
4724 |
||
4725 |
unloadPackage |
|
4726 |
"unload the project. |
|
4727 |
Fails if there are still instances of any of my classes in the system" |
|
4728 |
||
4729 |
self projectIsLoaded ifFalse:[^ false]. |
|
4730 |
thisContext isRecursive ifTrue:[^ false]. |
|
4731 |
||
4732 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4733 |
"/ thisContext fullPrintAll. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4734 |
Transcript show:'unloading '; showCR:self name. |
12364 | 4735 |
]. |
4736 |
||
4737 |
self activityNotification:'Executing pre-unload action'. |
|
4738 |
self preUnloadAction. |
|
4739 |
||
4740 |
self activityNotification:'Restoring original methods'. |
|
4741 |
self restoreOverwrittenExtensionMethods. |
|
4742 |
||
4743 |
Class withoutUpdatingChangesDo:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4744 |
self activityNotification:'Unloading sunprojects'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4745 |
self unloadSubProjects. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4746 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4747 |
self activityNotification:'Unloading classes'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4748 |
self unloadClassLibrary. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4749 |
self unloadAllClasses. |
12364 | 4750 |
]. |
4751 |
self projectIsLoaded:false. |
|
4752 |
^ true |
|
4753 |
! ! |
|
4754 |
||
12086 | 4755 |
!ProjectDefinition class methodsFor:'misc ui support'! |
4756 |
||
4757 |
iconInBrowserSymbol |
|
4758 |
<resource: #programImage> |
|
4759 |
||
4760 |
self theNonMetaclass isApplicationDefinition ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4761 |
self theNonMetaclass isGUIApplication ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4762 |
^ #guiApplicationDefinitionClassIcon |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4763 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4764 |
^ #applicationDefinitionClassIcon |
12086 | 4765 |
]. |
4766 |
^ super iconInBrowserSymbol |
|
4767 |
! ! |
|
4768 |
||
9575 | 4769 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 4770 |
|
13411 | 4771 |
abbrevs |
13592 | 4772 |
"return a dictionary containing my abbreviations; |
4773 |
this dictionary is read from my project-directory's abbrev.stc file, |
|
4774 |
and cached for future use" |
|
4775 |
||
4776 |
|abbrevs| |
|
4777 |
||
4778 |
AccessLock critical:[ |
|
13959 | 4779 |
|mustRead file myPackageDirectory| |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4780 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4781 |
AbbrevDictionary isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4782 |
AbbrevDictionary := WeakIdentityDictionary new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4783 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4784 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4785 |
mustRead := false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4786 |
abbrevs := AbbrevDictionary at:self ifAbsent:[ mustRead := true. Dictionary new ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4787 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4788 |
mustRead ifTrue:[ |
13959 | 4789 |
myPackageDirectory := self packageDirectory. |
4790 |
myPackageDirectory isNil ifTrue:[ |
|
4791 |
] ifFalse:[ |
|
4792 |
file := myPackageDirectory / 'abbrev.stc'. |
|
4793 |
file exists ifTrue: [ |
|
4794 |
file readingFileDo:[:stream | |
|
4795 |
Smalltalk |
|
4796 |
withAbbreviationsFromStream:stream |
|
4797 |
do:[:nm :fn :pkg :cat :sz| |
|
4798 |
abbrevs at: nm put: (AbbrevEntry new className:nm fileName:fn category:cat numClassInstVars:sz) |
|
4799 |
] |
|
4800 |
] |
|
4801 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4802 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4803 |
]. |
13419 | 4804 |
]. |
13695 | 4805 |
|
13411 | 4806 |
^abbrevs |
4807 |
||
4808 |
"Created: / 06-03-2011 / 18:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13959 | 4809 |
"Modified: / 20-01-2012 / 15:42:47 / cg" |
13411 | 4810 |
! |
4811 |
||
12368 | 4812 |
additionalClassAttributesFor: aClass |
4813 |
"Answers additional set of class attributes for given class |
|
4814 |
Individual project definitions may override this method, but |
|
4815 |
overriding method should always merge its attributes with result |
|
4816 |
of 'super additionalClassAttributesFor: aClass'. |
|
4817 |
||
4818 |
Here, we add #autoload attributes to all test cases and |
|
4819 |
test resources, as they are not neccessary for the package |
|
4820 |
and should not be compiled (because of unwanted dependency |
|
4821 |
on stx:goodies/sunit package) |
|
4822 |
" |
|
4823 |
||
4824 |
(aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)]. |
|
4825 |
(aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)]. |
|
4826 |
||
4827 |
"No additional attributes" |
|
4828 |
^#() |
|
4829 |
||
4830 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4831 |
stx_libbasic additionalClassAttributesFor: Object |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4832 |
stx_libtool additionalClassAttributesFor: Tools::NavigationHistoryTests |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4833 |
stx_goodies_sunit additionalClassAttributesFor: TestCase |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4834 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4835 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4836 |
stx_libtool classNamesAndAttributes_code_ignoreOldEntries:true ignoreOldDefinition: true |
12368 | 4837 |
|
4838 |
" |
|
4839 |
||
4840 |
"Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4841 |
! |
|
4842 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4843 |
checkIfClassesArePresent |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4844 |
"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
|
4845 |
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
|
4846 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4847 |
|check nonExistantClasses| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4848 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4849 |
nonExistantClasses := Set new. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4850 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4851 |
check := |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4852 |
[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4853 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4854 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4855 |
cls := Smalltalk classNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4856 |
cls isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4857 |
Transcript showCR:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4858 |
nonExistantClasses add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4859 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4860 |
]. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4861 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4862 |
self allClassNames do:check. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4863 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4864 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4865 |
check value:nm |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4866 |
]. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4867 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4868 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4869 |
nonExistantClasses notEmpty ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4870 |
(Dialog confirm:(Dialog classResources |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4871 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4872 |
with:nonExistantClasses anElement allBold)) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4873 |
ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4874 |
AbortOperationRequest raise. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4875 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4876 |
^ false. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4877 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4878 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4879 |
^ true |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4880 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4881 |
|
12368 | 4882 |
classNamesAndAttributesAsSpecArray |
13419 | 4883 |
"given a classNamesAndAttributes array, make this a spec array (array of arrays). |
12368 | 4884 |
This decompresses class-name entries into a one-element array for easier processing" |
4885 |
||
4886 |
^ self classNamesAndAttributes |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4887 |
collect:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4888 |
entry isArray ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4889 |
entry first isSymbol ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4890 |
entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4891 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4892 |
(Array with:entry first asSymbol) , (entry copyFrom:2) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4893 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4894 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4895 |
Array with:entry asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4896 |
]]. |
12368 | 4897 |
|
4898 |
"Created: / 19-02-2007 / 16:11:53 / cg" |
|
4899 |
! |
|
4900 |
||
9627 | 4901 |
classNamesAndAttributesDo: aBlock |
4902 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
4903 |
||
4904 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 4905 |
! |
4906 |
||
12368 | 4907 |
classNamesAndAttributesFromSpecArray:aSpecArray |
4908 |
"given a spec array (array of arrays), make this a classNamesAndAttributes array |
|
4909 |
as stored literally in the method. |
|
4910 |
This compresses single element array-elements into plain names |
|
4911 |
(to save code in the compiled binaries)" |
|
4912 |
||
4913 |
^ aSpecArray |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4914 |
collect:[:entry | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4915 |
(entry isArray and:[entry size == 1]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4916 |
entry first |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4917 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4918 |
entry |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4919 |
]]. |
12368 | 4920 |
|
4921 |
"Created: / 19-02-2007 / 16:12:32 / cg" |
|
4922 |
! |
|
4923 |
||
9664 | 4924 |
compile:someCode categorized:category |
13419 | 4925 |
Class packageQuerySignal |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4926 |
answer:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4927 |
do:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4928 |
self theMetaclass compilerClass |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4929 |
compile:someCode |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4930 |
forClass:self theMetaclass |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4931 |
inCategory:category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4932 |
notifying:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4933 |
install:true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4934 |
skipIfSame:true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4935 |
silent:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4936 |
] |
9664 | 4937 |
|
4938 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
4939 |
! |
|
4940 |
||
9627 | 4941 |
compiled_classes |
13419 | 4942 |
^ self compiled_classNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4943 |
collect: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4944 |
[:eachName| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4945 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4946 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4947 |
cls := (Smalltalk at:eachName asSymbol). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4948 |
(cls isNil or:[cls isBehavior not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4949 |
Transcript showCR:('ProjectDefinition: missing/invalid class: ', eachName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4950 |
cls := nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4951 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4952 |
cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4953 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4954 |
thenSelect:[:cls | cls notNil] |
9627 | 4955 |
|
4956 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
4957 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 4958 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 4959 |
! |
4960 |
||
9627 | 4961 |
compiled_classesDo:aBlock |
4962 |
self compiled_classes do:aBlock. |
|
4963 |
||
4964 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
4965 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
4966 |
! |
|
4967 |
||
13419 | 4968 |
compiled_classesForArchitecture:arch |
4969 |
^ (self compiled_classNamesForPlatform:arch) |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4970 |
collect:[:eachName | (Smalltalk at:eachName asSymbol) ] |
9627 | 4971 |
|
10251 | 4972 |
" |
4973 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
4974 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
4975 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
4976 |
" |
|
4977 |
||
9627 | 4978 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
4979 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 4980 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 4981 |
! |
4982 |
||
4983 |
compiled_classes_common |
|
13419 | 4984 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4985 |
compiled_classNames_common |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4986 |
collect:[:eachName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4987 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4988 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4989 |
cls := (Smalltalk at:eachName asSymbol). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4990 |
cls isBehavior ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4991 |
self warn:('Missing/invalid class: %1\\%2' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4992 |
bindWith:eachName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4993 |
with:('Warning: The class is skipped in the list of compiled classes.' allBold)) withCRs. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4994 |
cls := nil. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4995 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4996 |
cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4997 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
4998 |
thenSelect:[:cls| cls notNil "isBehavior"] |
9627 | 4999 |
|
5000 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
5001 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
13090
827d5322948f
changed: #compiled_classes_common
Claus Gittinger <cg@exept.de>
parents:
13088
diff
changeset
|
5002 |
"Modified: / 11-10-2010 / 12:11:06 / cg" |
9607 | 5003 |
! |
5004 |
||
9627 | 5005 |
cvsRevision |
5006 |
|rev| |
|
5007 |
||
5008 |
rev := self revision. |
|
5009 |
rev isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5010 |
"not yet pubplished" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5011 |
^ #( '0' '1' ) |
9627 | 5012 |
]. |
5013 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
5014 |
||
5015 |
" |
|
5016 |
self cvsRevision |
|
13419 | 5017 |
stx_libbasic3 cvsRevision |
9627 | 5018 |
" |
5019 |
||
5020 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 5021 |
! |
5022 |
||
13411 | 5023 |
defaultClassAttributesFor: aClass |
5024 |
"Answers default set of class attributes for given class. |
|
5025 |
This is internal method only, to per-project customization |
|
5026 |
please override either #additionalClassAttributes or |
|
5027 |
#additional classAttributesFor:" |
|
5028 |
||
5029 |
| attrs | |
|
5030 |
||
5031 |
"JV @ 2010-06-19 |
|
5032 |
Add a programming language attribute for non-smalltalk classes. |
|
5033 |
Used by multi-lang enabled loading mechanism" |
|
13419 | 5034 |
attrs := aClass programmingLanguage isSmalltalk |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5035 |
ifTrue:[#()] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5036 |
ifFalse:[Array with: (Array with: #lang with: aClass programmingLanguage name asSymbol)]. |
13419 | 5037 |
|
13411 | 5038 |
|
5039 |
"JV @ 2009-10-26 |
|
5040 |
Give a project definition to specify additional attributes for given class." |
|
5041 |
attrs := attrs , (self additionalClassAttributesFor: aClass). |
|
5042 |
||
5043 |
^attrs |
|
5044 |
||
5045 |
"Created: / 19-06-2010 / 10:44:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5046 |
! |
|
5047 |
||
9627 | 5048 |
inconsistency:message |
5049 |
Dialog warn:message |
|
9536 | 5050 |
|
9627 | 5051 |
" |
5052 |
self searchForNeverCompiledSuperclasses |
|
13419 | 5053 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
9627 | 5054 |
" |
5055 |
||
5056 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 5057 |
! |
5058 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5059 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5060 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5061 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5062 |
" |
13419 | 5063 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
5064 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5065 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5066 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5067 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5068 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5069 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5070 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5071 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5072 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5073 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5074 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5075 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5076 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5077 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5078 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5079 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5080 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
5081 |
|
13411 | 5082 |
mergeClassAttributes: attr1 with: attr2 |
5083 |
||
5084 |
^attr1 , (attr2 reject:[:each|attr1 includes: each]) |
|
5085 |
||
5086 |
"Created: / 19-06-2010 / 10:50:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5087 |
! |
|
5088 |
||
5089 |
mergeDefaultClassAttributesFor: aClass with: attributes |
|
5090 |
||
5091 |
^self mergeClassAttributes: attributes with: (self defaultClassAttributesFor: aClass) |
|
5092 |
||
5093 |
"Created: / 19-06-2010 / 10:51:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5094 |
! |
|
5095 |
||
9627 | 5096 |
namesAndAttributesIn:aCollection do: aBlock |
5097 |
aCollection do:[:entry | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5098 |
|className attributes| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5099 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5100 |
entry isArray ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5101 |
className := entry. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5102 |
attributes := #(). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5103 |
] ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5104 |
className := entry first. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5105 |
attributes := entry copyFrom:2. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5106 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5107 |
aBlock value: className value: attributes |
9627 | 5108 |
]. |
5109 |
||
5110 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 5111 |
! |
5112 |
||
9627 | 5113 |
searchForClasses |
10010 | 5114 |
"answer all non-private classes that belong to this project. |
10005 | 5115 |
They are sorted in load order" |
5116 |
||
13419 | 5117 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
9627 | 5118 |
|
5119 |
" |
|
10010 | 5120 |
stx_libbasic3 searchForClasses |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5121 |
stx_goodies_webServer_htmlTree searchForClasses |
9627 | 5122 |
" |
5123 |
||
5124 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
5125 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 5126 |
! |
5127 |
||
9627 | 5128 |
searchForClassesWithProject: aProjectID |
5129 |
||
13419 | 5130 |
^ Smalltalk allClasses |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5131 |
select:[:cls | (cls package = aProjectID) ]. |
9627 | 5132 |
|
5133 |
" |
|
5134 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
5135 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
5136 |
self searchForClassesWithProject: #'bosch:dapasx/kernel' |
|
5137 |
" |
|
5138 |
||
5139 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
5140 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
5141 |
"Modified: / 16-08-2006 / 18:50:48 / User" |
|
9536 | 5142 |
! |
5143 |
||
9627 | 5144 |
searchForExtensions |
5145 |
^ self searchForExtensionsWithProject:self package |
|
5146 |
||
5147 |
" |
|
13419 | 5148 |
self searchForExtensions |
9627 | 5149 |
DapasXProject searchForExtensions |
5150 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
5151 |
stx_libtool searchForExtensions |
9627 | 5152 |
" |
5153 |
||
5154 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
5155 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
5156 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 5157 |
! |
5158 |
||
9627 | 5159 |
searchForExtensionsWithProject:aProjectID |
5160 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5161 |
Return the extension-methods sorted by classname-selector" |
9627 | 5162 |
|
5163 |
|methods| |
|
5164 |
||
11152 | 5165 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
13419 | 5166 |
methods |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5167 |
sort:[:m1 :m2 | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5168 |
|c1 c2| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5169 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5170 |
c1 := m1 mclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5171 |
c2 := m2 mclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5172 |
c1 == c2 ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5173 |
m1 selector < m2 selector |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5174 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5175 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5176 |
true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5177 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5178 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5179 |
false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5180 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5181 |
c1 name < c2 name |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5182 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5183 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5184 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5185 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5186 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5187 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5188 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5189 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5190 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
5191 |
"/ ]. |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5192 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5193 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5194 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5195 |
]. |
9627 | 5196 |
^ methods |
5197 |
||
5198 |
" |
|
5199 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
5200 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5201 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 5202 |
" |
5203 |
||
5204 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
5205 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 5206 |
! |
5207 |
||
9627 | 5208 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5209 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5210 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5211 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5212 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5213 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5214 |
addPackage := |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5215 |
[:package | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5216 |
(package ~= myPackageID) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5217 |
true "(package startsWith:'stx:') not" ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5218 |
package ~= PackageId noProjectID ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5219 |
requiredPackages add:package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5220 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5221 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5222 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5223 |
]. |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5224 |
|
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5225 |
"/ need them also... |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5226 |
self preRequisites do:[:eachPreRequisitePackage | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5227 |
addPackage value:eachPreRequisitePackage |
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5228 |
]. |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
5229 |
|
10788 | 5230 |
self compiled_classesDo:[:cls | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5231 |
cls allSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5232 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5233 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5234 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5235 |
cls allPrivateClassesDo:[:eachPrivateClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5236 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5237 |
eachSuperClass isPrivate ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5238 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5239 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5240 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5241 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5242 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5243 |
cls sharedPoolNames do:[:eachPoolName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5244 |
|eachPoolClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5245 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5246 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5247 |
eachPoolClass isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5248 |
Transcript showCR:('Warning: missing pool: %1 (required by %2)' bindWith:eachPoolName with:cls name) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5249 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5250 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5251 |
addPackage value:(eachPoolSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5252 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5253 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5254 |
]. |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5255 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5256 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5257 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5258 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5259 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5260 |
cls withAllSuperclassesDo:[:eachSuperClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5261 |
addPackage value:(eachSuperClass package) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5262 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5263 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5264 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
5265 |
^ requiredPackages |
9627 | 5266 |
|
9880 | 5267 |
" |
13419 | 5268 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
9880 | 5269 |
" |
9627 | 5270 |
|
10251 | 5271 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
13216 | 5272 |
"Modified: / 18-01-2011 / 17:58:33 / cg" |
9664 | 5273 |
! |
5274 |
||
9667 | 5275 |
searchForSiblingProjects |
10132 | 5276 |
"answer all the packages (package names) having the my parent package" |
5277 |
||
9667 | 5278 |
|myPackage myParentPackage| |
5279 |
||
5280 |
myPackage := self package asPackageId. |
|
5281 |
myParentPackage := myPackage parentPackage. |
|
5282 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
5283 |
||
13419 | 5284 |
^ Smalltalk allProjectIDs |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5285 |
select:[:projectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5286 |
|thisPackage| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5287 |
thisPackage := projectID asPackageId. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5288 |
(thisPackage parentPackage = myParentPackage) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5289 |
and:[ thisPackage ~= myPackage ]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5290 |
] |
9667 | 5291 |
|
5292 |
" |
|
5293 |
self searchForSiblingProjects |
|
5294 |
bosch_dapasx_Application searchForSiblingProjects |
|
5295 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
5296 |
" |
|
5297 |
||
5298 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
5299 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
5300 |
! |
|
5301 |
||
9664 | 5302 |
searchForSubProjects |
10132 | 5303 |
"answer all packages (package names), that are my subProjects" |
5304 |
||
9664 | 5305 |
|myPackage| |
5306 |
||
5307 |
myPackage := self package. |
|
13419 | 5308 |
^ Smalltalk allProjectIDs |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5309 |
select:[:projectID | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5310 |
projectID ~= PackageId noProjectID |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5311 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
13419 | 5312 |
|
5313 |
" |
|
5314 |
self searchForSubProjects |
|
9664 | 5315 |
bosch_dapasx_Application searchForSubProjects |
5316 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
5317 |
" |
|
5318 |
||
5319 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
5320 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 5321 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 5322 |
! |
5323 |
||
5324 |
setupForType:typeOrNil |
|
9714 | 5325 |
typeOrNil = GUIApplicationType ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5326 |
self compile: |
12425 | 5327 |
'isGUIApplication |
5328 |
"return true, if this is a GUI application. |
|
5329 |
(these need more libraries and use a different startup procedure)" |
|
5330 |
||
5331 |
^ true |
|
5332 |
' |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5333 |
categorized:'description'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5334 |
self superclass: ApplicationDefinition. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5335 |
^ self |
9664 | 5336 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
5337 |
|
9714 | 5338 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5339 |
self compile: |
12425 | 5340 |
'isGUIApplication |
5341 |
"return true, if this is a GUI application. |
|
5342 |
(these need more libraries and use a different startup procedure)" |
|
5343 |
||
5344 |
^ false |
|
5345 |
' |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5346 |
categorized:'description'. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5347 |
self superclass: ApplicationDefinition. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5348 |
^ self |
13419 | 5349 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
5350 |
|
12349 | 5351 |
self theMetaclass removeSelector: #isGUIApplication. |
12353 | 5352 |
self superclass: LibraryDefinition. |
9664 | 5353 |
^ self. |
5354 |
||
5355 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
13411 | 5356 |
! |
5357 |
||
5358 |
shouldExcludeTest: test |
|
5359 |
||
5360 |
self excludedFromTestSuite do: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5361 |
[:spec| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5362 |
(spec isSymbol and:[test class name == spec]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5363 |
ifTrue:[^true]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5364 |
(spec isArray and:[test class name == spec first and:[test selector == spec second]]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5365 |
ifTrue:[^true]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5366 |
]. |
13411 | 5367 |
^false |
5368 |
||
5369 |
"Created: / 03-06-2011 / 17:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
9536 | 5370 |
! ! |
5371 |
||
12210 | 5372 |
!ProjectDefinition class methodsFor:'private-extension handling'! |
5373 |
||
5374 |
hasSavedOverwrittenMethods |
|
5375 |
"true, if any of my methods was overwritten by another loaded package. |
|
5376 |
These methods are now in my safe" |
|
5377 |
||
12208
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5378 |
^ safeForOverwrittenMethods notEmptyOrNil |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5379 |
! |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
5380 |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5381 |
methodOverwrittenBy:aMethod |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5382 |
"return the (hidden) original method, which was located in another package |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5383 |
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
|
5384 |
|
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5385 |
|mclass selector oldPackage| |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5386 |
|
12218
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
5387 |
extensionOverwriteInfo isNil ifTrue:[^ nil]. |
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
5388 |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5389 |
mclass := aMethod mclass. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5390 |
selector := aMethod selector. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5391 |
oldPackage := extensionOverwriteInfo at:(mclass name,'>>',selector) ifAbsent:nil. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5392 |
oldPackage isNil ifTrue:[^ nil]. |
13419 | 5393 |
^ oldPackage asPackageId projectDefinitionClass |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5394 |
savedOverwrittenMethodForClass:mclass selector:selector. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5395 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5396 |
|
12210 | 5397 |
rememberOverwrittenExtensionMethods |
5398 |
"before loading, tell other packages to keep a safe reference to any method |
|
5399 |
which gets overloaded by me, and also remember here, whome I have overloaded. |
|
5400 |
This allows for two things: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5401 |
a) correct fileout of the other base-package (for example, when checking in any of its class) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5402 |
b) correct unloading of myself" |
12210 | 5403 |
|
5404 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5405 |
|class oldMethod oldPackage defClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5406 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5407 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5408 |
class notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5409 |
oldMethod := class compiledMethodAt:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5410 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5411 |
oldMethod notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5412 |
oldPackage := oldMethod package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5413 |
oldPackage ~= PackageId noProjectID ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5414 |
defClass := oldPackage asPackageId projectDefinitionClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5415 |
defClass notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5416 |
defClass rememberOverwrittenMethod:oldMethod inClass:class. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5417 |
extensionOverwriteInfo isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5418 |
extensionOverwriteInfo := Dictionary new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5419 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5420 |
extensionOverwriteInfo at:(className,'>>',selector) put:oldPackage. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5421 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5422 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5423 |
]. |
12210 | 5424 |
]. |
5425 |
! |
|
5426 |
||
5427 |
rememberOverwrittenMethod:oldMethod inClass:aClass |
|
5428 |
"invoked from another projectDefinition, when that package is about to be loaded |
|
13419 | 5429 |
and about to overwrite one of my methods. |
5430 |
I will save the method locally, to allow for correct fileout of this class/project or |
|
12210 | 5431 |
to correctly reestablish my methods when the other package is unloaded later." |
5432 |
||
5433 |
|thisIsOneOfMyMethods selector| |
|
5434 |
||
5435 |
selector := oldMethod selector. |
|
5436 |
||
12293
983b9555f6e8
changed: #rememberOverwrittenMethod:inClass:
Claus Gittinger <cg@exept.de>
parents:
12286
diff
changeset
|
5437 |
thisIsOneOfMyMethods := (self classNames includes:aClass theNonMetaclass name) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5438 |
or:[ aClass isPrivate and:[ self classNames includes: aClass topOwningClass theNonMetaclass name ]]. |
12210 | 5439 |
thisIsOneOfMyMethods ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5440 |
self extensionMethodNames pairWiseDo:[:extClassName :extSelector | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5441 |
extClassName = aClass name ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5442 |
selector = extSelector ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5443 |
thisIsOneOfMyMethods := true |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5444 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5445 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5446 |
] |
12210 | 5447 |
]. |
5448 |
thisIsOneOfMyMethods ifFalse:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5449 |
self error:'oops - this is not one of my methods' mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5450 |
^ self |
12210 | 5451 |
]. |
5452 |
||
5453 |
safeForOverwrittenMethods isNil ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5454 |
safeForOverwrittenMethods := Dictionary new. |
12210 | 5455 |
]. |
5456 |
safeForOverwrittenMethods at:(aClass name -> selector) put:oldMethod. |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5457 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5458 |
|
12624 | 5459 |
restoreOverwrittenExtensionMethods |
5460 |
"after unloading, tell other packages to restore any safed reference to any method |
|
5461 |
which got overloaded by me." |
|
5462 |
||
5463 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5464 |
|class oldMethod oldPackage| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5465 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5466 |
oldPackage := extensionOverwriteInfo at:(className,'>>',selector). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5467 |
oldPackage notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5468 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5469 |
class notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5470 |
oldMethod := oldPackage savedOverwrittenMethodForClass:class selector:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5471 |
oldMethod notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5472 |
self breakPoint:#cg. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5473 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5474 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5475 |
]. |
12624 | 5476 |
]. |
5477 |
! |
|
5478 |
||
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5479 |
savedOverwrittenMethodForClass:aClass selector:aSelector |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5480 |
"return one of my saved original methods" |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
5481 |
|
13692
2dffef08a4ac
changed: #savedOverwrittenMethodForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
13689
diff
changeset
|
5482 |
safeForOverwrittenMethods isNil ifTrue:[^ nil]. |
12274 | 5483 |
^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil |
12210 | 5484 |
! ! |
5485 |
||
5486 |
!ProjectDefinition class methodsFor:'private-loading'! |
|
5487 |
||
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5488 |
checkPrerequisitesForLoading |
12264 | 5489 |
|classesAlreadyWarned| |
5490 |
||
5491 |
classesAlreadyWarned := Set new. |
|
5492 |
||
13419 | 5493 |
self extensionMethodNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5494 |
pairWiseDo:[:className :selector | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5495 |
|class | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5496 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5497 |
class := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5498 |
class isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5499 |
(classesAlreadyWarned includes:className) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5500 |
self error:'missing class for extension: ', className mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5501 |
classesAlreadyWarned add:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5502 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5503 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5504 |
] |
12263
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
5505 |
|
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
5506 |
"/ todo: more needed here... |
12731 | 5507 |
|
5508 |
" |
|
5509 |
stx_libjavascript checkPrerequisitesForLoading |
|
5510 |
" |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5511 |
! |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
5512 |
|
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
|
5513 |
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
|
5514 |
^ 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
|
5515 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5516 |
|
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5517 |
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
|
5518 |
"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
|
5519 |
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
|
5520 |
|
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5521 |
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
|
5522 |
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
|
5523 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5524 |
|
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5525 |
loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5526 |
self allClasses do:[:cls | cls autoload] |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5527 |
|
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5528 |
"Created: / 21-08-2011 / 17:24:13 / cg" |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5529 |
! |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5530 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5531 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5532 |
"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
|
5533 |
install as autoloaded classes marked to be autoloaded. |
10401 | 5534 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
5535 |
||
5536 |
Answer true, if classes have been loaded" |
|
12028 | 5537 |
|
13411 | 5538 |
^self loadAllClassesAsAutoloaded:asAutoloaded languages: ProgrammingLanguage all |
5539 |
||
5540 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
|
5541 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
5542 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
5543 |
"Modified: / 19-06-2010 / 11:37:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5544 |
! |
|
5545 |
||
5546 |
loadAllClassesAsAutoloaded:asAutoloaded languages: langs |
|
5547 |
"load (fileIn) classes in given languages that should be present - |
|
5548 |
install as autoloaded classes marked to be autoloaded. |
|
5549 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
5550 |
langs should be collection of ProgrammingLanguage available in the system. |
|
5551 |
||
5552 |
Answer true, if classes have been loaded" |
|
5553 |
||
5554 |
|classNamesToLoad classNamesToAutoload classNamesToLangs hasClassesToLoad loadedClasses platformName |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5555 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5556 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5557 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5558 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5559 |
classNamesToAutoload := OrderedCollection new. |
13411 | 5560 |
classNamesToLangs := Dictionary new. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5561 |
|
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
5562 |
hasClassesToLoad := false. |
13419 | 5563 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5564 |
|eachClassnameSym isAutoload clsLangAttr clsLang cls | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5565 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5566 |
eachClassnameSym := eachClassname asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5567 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5568 |
clsLangAttr := eachAttributes detect:[:a|a isArray and: [a size == 2 and:[a first == #lang]]] ifNone:[nil]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5569 |
clsLang := clsLangAttr |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5570 |
ifNil:[SmalltalkLanguage instance] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5571 |
ifNotNil:[ProgrammingLanguage named: clsLangAttr second ifNone:[nil]]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5572 |
classNamesToLangs at: eachClassname put: clsLang. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5573 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5574 |
"no need to (re-)load an existing class, but install if should be loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5575 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5576 |
((cls isNil or:[cls isLoaded not and:[isAutoload not]]) and:[clsLang notNil and:[langs includes: clsLang]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5577 |
(eachAttributes isEmpty |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5578 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5579 |
or:[(eachAttributes includes:platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5580 |
or:[eachAttributes contains:[:a|a isArray]]]]) "/FIXME: Hack." |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5581 |
ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5582 |
hasClassesToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5583 |
isAutoload ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5584 |
classNamesToAutoload add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5585 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5586 |
classNamesToLoad add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5587 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5588 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5589 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5590 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5591 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5592 |
hasClassesToLoad ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5593 |
loadedClasses := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5594 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5595 |
self packageDirectory isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5596 |
classNamesToLoad notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5597 |
"required classes are missing. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5598 |
Autoloaded classes are considered as optional..." |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5599 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5600 |
error:(self name,'[error] cannot install because packageDirectory is unknown for missing classes: ', classNamesToLoad printString) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5601 |
mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5602 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5603 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5604 |
(self name,'[info] cannot install autoloaded classes because packageDirectory is unknown') infoPrintCR. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5605 |
^ true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5606 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5607 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5608 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5609 |
of class name to file name" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5610 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5611 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5612 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5613 |
"install autoloaded classes first, |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5614 |
some others may depend on them" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5615 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5616 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5617 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5618 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5619 |
errorString: 'Autoloading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5620 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5621 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName) . |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5622 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5623 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5624 |
classesWhichFailedToLoad := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5625 |
classNamesToLoad notEmpty ifTrue:[ |
14021 | 5626 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5627 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5628 |
bindWith:self name with:classNamesToLoad size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5629 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5630 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5631 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5632 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5633 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5634 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5635 |
errorString: 'Loading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5636 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5637 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5638 |
"maybe, fileIn failed, because the load order is wrong. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5639 |
Work around this by installing the class as autoloaded and |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5640 |
loading it" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5641 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5642 |
classesWhichFailedToLoad add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5643 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5644 |
] do:[ |
14021 | 5645 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5646 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5647 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5648 |
cls := self loadClass: eachClassName asAutoloaded: false language: (classNamesToLangs at: eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5649 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5650 |
loadedClasses add:cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5651 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5652 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5653 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5654 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5655 |
classesWhichFailedToLoad do:[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5656 |
(Smalltalk at:eachClassName) autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5657 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5658 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5659 |
loadedClasses do:[:eachLoadedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5660 |
"do not initialize, if initialize method is inherited" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5661 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5662 |
eachLoadedClass initialize |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5663 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5664 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5665 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5666 |
]. |
10401 | 5667 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5668 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5669 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
12028 | 5670 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
13411 | 5671 |
"Created: / 19-06-2010 / 11:35:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5672 |
"Modified: / 19-06-2010 / 15:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5673 |
! |
|
5674 |
||
5675 |
loadClass: className asAutoloaded: asAutoloaded language: lang |
|
13592 | 5676 |
| packageDir classFile entry category numClassInstVars cls| |
5677 |
||
5678 |
"Handle smalltalk classes specially to provide backward compatibility" |
|
13411 | 5679 |
lang isSmalltalk ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5680 |
entry := self abbrevs at: className ifAbsent:[nil]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5681 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5682 |
asAutoloaded ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5683 |
category := entry isNil ifTrue:[#autoloaded] ifFalse:[entry category]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5684 |
numClassInstVars := entry isNil ifTrue:[0] ifFalse:[entry numClassInstVars]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5685 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5686 |
installAutoloadedClassNamed: className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5687 |
category: category |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5688 |
package: self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5689 |
revision: nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5690 |
numClassInstVars:numClassInstVars. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5691 |
entry notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5692 |
cls setClassFilename:(entry fileName,'.st'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5693 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5694 |
^ cls. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5695 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5696 |
^ Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5697 |
fileInClass:className |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5698 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5699 |
initialize:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5700 |
lazy:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5701 |
silent:true |
13411 | 5702 |
]. |
5703 |
||
5704 |
"For non-smalltalk language do" |
|
5705 |
asAutoloaded ifTrue:[^self error:'Only Smalltalk classes may be autoloaded (yet)']. |
|
5706 |
||
5707 |
packageDir := self packageDirectory asFilename. |
|
5708 |
classFile := packageDir / ((Smalltalk fileNameForClass: className) , '.' , lang sourceFileSuffix). |
|
5709 |
classFile exists ifFalse:[^nil]. |
|
5710 |
lang fileIn: classFile. |
|
5711 |
^nil "FIXME: should return the class" |
|
5712 |
||
5713 |
"Created: / 19-06-2010 / 09:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5714 |
"Modified: / 06-03-2011 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13592 | 5715 |
"Modified: / 18-08-2011 / 14:22:15 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5716 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5717 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5718 |
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
|
5719 |
"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
|
5720 |
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
|
5721 |
|
12295 | 5722 |
|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
|
5723 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5724 |
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
|
5725 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
5726 |
(Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5727 |
"already loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5728 |
^ true |
13419 | 5729 |
]. |
14021 | 5730 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5731 |
Transcript showCR:(' %1: loading classLibrary...' bindWith:self name). |
13419 | 5732 |
]. |
12743 | 5733 |
self activityNotification:'Loading classLibrary'. |
5734 |
||
12295 | 5735 |
^ 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
|
5736 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5737 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5738 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5739 |
"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
|
5740 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5741 |
self hasAllExtensionsLoaded ifFalse:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5742 |
self breakPoint:#cg. |
14021 | 5743 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5744 |
Transcript showCR:(' %1: filing in extensions...' bindWith:self name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5745 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5746 |
Smalltalk loadExtensionsForPackage:self package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5747 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5748 |
]. |
10401 | 5749 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5750 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5751 |
"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
|
5752 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5753 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5754 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5755 |
"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
|
5756 |
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
|
5757 |
|
12558 | 5758 |
PackagesBeingLoaded isNil ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5759 |
PackagesBeingLoaded := Set new |
12558 | 5760 |
]. |
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5761 |
Class withoutUpdatingChangesDo:[ |
14790 | 5762 |
aListOfPackages do:[:eachPackageID | |
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5763 |
|cls| |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5764 |
|
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5765 |
cls := ProjectDefinition definitionClassForPackage:eachPackageID. |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5766 |
(cls isNil or:[cls projectIsLoaded not]) ifTrue:[ |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5767 |
(PackagesBeingLoaded includes:eachPackageID) ifFalse:[ |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5768 |
PackagesBeingLoaded add:eachPackageID. |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5769 |
[ |
14521 | 5770 |
Smalltalk loadPackage:eachPackageID asAutoloaded:asAutoloaded. |
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5771 |
] ensure:[ |
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5772 |
PackagesBeingLoaded remove:eachPackageID ifAbsent:[]. |
14521 | 5773 |
] |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5774 |
] |
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
5775 |
] |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5776 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5777 |
]. |
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
5778 |
|
13167 | 5779 |
"Modified: / 09-12-2010 / 12:36:17 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5780 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5781 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5782 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5783 |
"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
|
5784 |
|
12743 | 5785 |
|prereq| |
5786 |
||
5787 |
prereq := self effectivePreRequisites. |
|
5788 |
prereq notEmptyOrNil ifTrue:[ |
|
14021 | 5789 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5790 |
Transcript showCR:(' %1 loading prerequisites...' bindWith:self name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5791 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5792 |
self loadPackages:prereq asAutoloaded:asAutoloaded |
12743 | 5793 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5794 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5795 |
|
12596 | 5796 |
loadSubProjects |
5797 |
"load other packages (at least the projectDefinitions and their extensions)" |
|
5798 |
||
5799 |
self loadSubProjectsAsAutoloaded:false. |
|
5800 |
self subProjects do:[:p | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5801 |
|subDef| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5802 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5803 |
subDef := self definitionClassForPackage:p. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5804 |
subDef notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5805 |
subDef loadSubProjects |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5806 |
]. |
12596 | 5807 |
]. |
5808 |
! |
|
5809 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5810 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5811 |
"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
|
5812 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5813 |
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
|
5814 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5815 |
"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
|
5816 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5817 |
|
13411 | 5818 |
old_loadAllClassesAsAutoloaded:asAutoloaded |
5819 |
"load (fileIn) classes that should be present - |
|
5820 |
install as autoloaded classes marked to be autoloaded. |
|
5821 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
5822 |
||
5823 |
Answer true, if classes have been loaded" |
|
5824 |
||
5825 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName |
|
5826 |
classesWhichFailedToLoad| |
|
5827 |
||
5828 |
platformName := OperatingSystem platformName. |
|
5829 |
classNamesToLoad := OrderedCollection new. |
|
5830 |
classNamesToAutoload := OrderedCollection new. |
|
5831 |
||
5832 |
hasClassesToLoad := false. |
|
13419 | 5833 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5834 |
|eachClassnameSym isAutoload cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5835 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5836 |
eachClassnameSym := eachClassname asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5837 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5838 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5839 |
"no need to (re-)load an existing class, but install if should be loaded" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5840 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5841 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5842 |
(eachAttributes isEmpty |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5843 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5844 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5845 |
hasClassesToLoad := true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5846 |
isAutoload ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5847 |
classNamesToAutoload add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5848 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5849 |
classNamesToLoad add:eachClassnameSym. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5850 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5851 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5852 |
]. |
13411 | 5853 |
]. |
5854 |
||
5855 |
hasClassesToLoad ifTrue:[ |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5856 |
loadedClasses := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5857 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5858 |
self packageDirectory isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5859 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5860 |
error:(self name,'[error] cannot install because packageDirectory is unknown') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5861 |
mayProceed:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5862 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5863 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5864 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5865 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5866 |
of class name to file name" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5867 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5868 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5869 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5870 |
"install autoloaded classes first, |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5871 |
some others may depend on them" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5872 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5873 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5874 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5875 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5876 |
errorString: 'Autoloading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5877 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5878 |
Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5879 |
installAutoloadedClassNamed:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5880 |
category:#autoloaded "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5881 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5882 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5883 |
numClassInstVars:0. "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5884 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5885 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5886 |
classesWhichFailedToLoad := OrderedCollection new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5887 |
classNamesToLoad notEmpty ifTrue:[ |
14021 | 5888 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5889 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5890 |
bindWith:self name with:classNamesToLoad size). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5891 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5892 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5893 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5894 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5895 |
ActivityNotification |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5896 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5897 |
errorString: 'Loading class ', eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5898 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5899 |
Error handle:[:ex | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5900 |
"maybe, fileIn failed, because the load order is wrong. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5901 |
Work around this by installing the class as autoloaded and |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5902 |
loading it" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5903 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5904 |
classesWhichFailedToLoad add:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5905 |
Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5906 |
installAutoloadedClassNamed:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5907 |
category:#autoloaded "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5908 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5909 |
revision:nil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5910 |
numClassInstVars:0. "FIXME" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5911 |
] do:[ |
14021 | 5912 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5913 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5914 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5915 |
cls := Smalltalk |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5916 |
fileInClass:eachClassName |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5917 |
package:self package |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5918 |
initialize:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5919 |
lazy:false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5920 |
silent:true. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5921 |
cls notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5922 |
loadedClasses add:cls |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5923 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5924 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5925 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5926 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5927 |
classesWhichFailedToLoad do:[:eachClassName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5928 |
(Smalltalk at:eachClassName) autoload. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5929 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5930 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5931 |
loadedClasses do:[:eachLoadedClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5932 |
"do not initialize, if initialize method is inherited" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5933 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5934 |
eachLoadedClass initialize |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5935 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5936 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5937 |
^ true. |
13411 | 5938 |
]. |
5939 |
^ false. |
|
5940 |
||
5941 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
5942 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
5943 |
"Created: / 19-06-2010 / 11:36:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5944 |
! |
|
5945 |
||
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
|
5946 |
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
|
5947 |
^ 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
|
5948 |
! |
c46be62dee24
when loading a class, the original definition's state is lost; move it over
Claus Gittinger <cg@exept.de>
parents:
12293
diff
changeset
|
5949 |
|
12624 | 5950 |
unloadAllClasses |
5951 |
Transcript showCR:'unloading not yet fully supported' |
|
5952 |
! |
|
5953 |
||
5954 |
unloadClassLibrary |
|
5955 |
Transcript showCR:'unloading not yet fully supported' |
|
5956 |
! |
|
5957 |
||
5958 |
unloadSubProjects |
|
5959 |
"unload other packages" |
|
5960 |
||
5961 |
self subProjects do:[:p | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5962 |
|subDef| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5963 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5964 |
subDef := self definitionClassForPackage:p. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5965 |
subDef notNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5966 |
subDef unloadSubProjects. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5967 |
subDef unloadPackage. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5968 |
]. |
12624 | 5969 |
]. |
5970 |
! |
|
5971 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5972 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5973 |
"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
|
5974 |
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
|
5975 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5976 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5977 |
self projectIsLoaded:false. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
5978 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5979 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
5980 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5981 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5982 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5983 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
12371 | 5984 |
"helper for searchForPreRequisites" |
5985 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
5986 |
aSetOfClasses |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5987 |
do:[:aClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5988 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5989 |
addReferencesToClassesFromGlobalsInMethods: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5990 |
(aClass theNonMetaclass methodDictionary values |
14510 | 5991 |
select:[:m | m isExtension not]) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5992 |
to:usedClassReasons. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5993 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5994 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5995 |
addReferencesToClassesFromGlobalsInMethods: |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5996 |
(aClass theMetaclass methodDictionary values |
14510 | 5997 |
select:[:m | m isExtension not]) |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5998 |
to:usedClassReasons. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
5999 |
]. |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6000 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6001 |
"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
|
6002 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6003 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6004 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
12371 | 6005 |
"helper for searchForPreRequisites" |
6006 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6007 |
someMethods do:[:method | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6008 |
|resources| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6009 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6010 |
resources := method resources. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6011 |
(resources isNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6012 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6013 |
and:[(resources includesKey:#'example') not])]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6014 |
ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6015 |
method usedGlobals |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6016 |
do:[:global | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6017 |
|globalsName usedClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6018 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6019 |
globalsName := global asSymbol. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6020 |
usedClass := Smalltalk at:globalsName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6021 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6022 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6023 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6024 |
add:(usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6025 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6026 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6027 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6028 |
] |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6029 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6030 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6031 |
"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
|
6032 |
"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
|
6033 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6034 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6035 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6036 |
"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
|
6037 |
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
|
6038 |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6039 |
^ self searchForPreRequisites:self package withSubProjects:true |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6040 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6041 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6042 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6043 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6044 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6045 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6046 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6047 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6048 |
"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
|
6049 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6050 |
"Modified: / 06-09-2011 / 08:30:43 / cg" |
13411 | 6051 |
! |
6052 |
||
6053 |
searchForPreRequisites: packageId |
|
6054 |
"answer a Dictionary where the keys are the prerequisite package for this package |
|
6055 |
and the values are a Set of reasons, why each package is required" |
|
6056 |
||
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6057 |
^ self searchForPreRequisites: packageId withSubProjects:false |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6058 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6059 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6060 |
self searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6061 |
self searchForPreRequisites:#'stx:libwidg3' |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6062 |
bosch_dapasx_Application searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6063 |
bosch_dapasx_pav_browser searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6064 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6065 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6066 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6067 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6068 |
"Modified: / 06-09-2011 / 08:30:20 / cg" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6069 |
! |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6070 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6071 |
searchForPreRequisites:packageId withSubProjects:withSubProjectsBoolean |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6072 |
"answer a Dictionary where the keys are the prerequisite package for this package |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6073 |
and the values are a Set of reasons, why each package is required" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6074 |
|
13411 | 6075 |
|requiredClasses requiredPackageReasons usedClassesWithReasons ignoredPackages| |
6076 |
||
6077 |
usedClassesWithReasons := Dictionary new. |
|
6078 |
||
6079 |
"my classes are required" |
|
6080 |
requiredClasses := (self searchForClassesWithProject: packageId) asSet. |
|
6081 |
||
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6082 |
withSubProjectsBoolean ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6083 |
"my subproject's classes are required" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6084 |
self subProjects do:[:eachProjectName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6085 |
requiredClasses addAll: (self searchForClassesWithProject:eachProjectName asSymbol) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6086 |
]. |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6087 |
]. |
13411 | 6088 |
|
6089 |
"all superclasses of my classes and my subProject's classes are required" |
|
13419 | 6090 |
requiredClasses do:[:cls | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6091 |
cls allSuperclassesDo:[:eachSuperclass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6092 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6093 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6094 |
] |
13411 | 6095 |
]. |
6096 |
||
6097 |
"all classes referenced by my classes or my subproject's classes |
|
6098 |
are required. But: |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6099 |
only search for locals refered to by my methods (assuming that superclasses' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6100 |
prerequisites are specified in their package)." |
13411 | 6101 |
|
6102 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:usedClassesWithReasons. |
|
6103 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:usedClassesWithReasons. |
|
6104 |
||
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6105 |
"all classes for which I define extensions are required" |
13637
d2ca7b303301
changed: #searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13636
diff
changeset
|
6106 |
self allExtensionClasses do:[:eachExtendedClass | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6107 |
(usedClassesWithReasons at:eachExtendedClass ifAbsentPut:[OrderedSet new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6108 |
add: (eachExtendedClass name, ' - extended'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6109 |
eachExtendedClass allSuperclassesDo:[:eachSuperclass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6110 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6111 |
add: (eachSuperclass name, ' - superclass of extended ', eachExtendedClass name). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6112 |
] |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6113 |
]. |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6114 |
|
13411 | 6115 |
"don't put classes from subProjects into the required list" |
6116 |
ignoredPackages := (self siblingsAreSubProjects |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6117 |
ifTrue:[ self searchForSiblingProjects ] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6118 |
ifFalse:[ self searchForSubProjects ]) asSet. |
13411 | 6119 |
|
6120 |
ignoredPackages add:self package. |
|
6121 |
ignoredPackages add:PackageId noProjectID. |
|
6122 |
||
6123 |
"now map classes to packages and collect the reasons" |
|
6124 |
requiredPackageReasons := Dictionary new. |
|
6125 |
usedClassesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass | |usedClassPackage| |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6126 |
usedClassPackage := usedClass package. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6127 |
(ignoredPackages includes:usedClassPackage) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6128 |
(requiredPackageReasons at:usedClassPackage ifAbsentPut:[OrderedSet new]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6129 |
addAll:reasonsPerClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6130 |
]. |
13411 | 6131 |
]. |
6132 |
||
6133 |
^ requiredPackageReasons |
|
6134 |
||
6135 |
" |
|
6136 |
self searchForPreRequisites |
|
6137 |
self searchForPreRequisites:#'stx:libwidg3' |
|
6138 |
bosch_dapasx_Application searchForPreRequisites |
|
6139 |
bosch_dapasx_pav_browser searchForPreRequisites |
|
6140 |
" |
|
6141 |
||
6142 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
6143 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
6144 |
"Created: / 06-09-2011 / 08:29:37 / cg" |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6145 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
6146 |
|
9585 | 6147 |
!ProjectDefinition class methodsFor:'queries'! |
6148 |
||
13419 | 6149 |
allClassNames |
12368 | 6150 |
^ self classNamesForWhich:[:nm :attr | true ]. |
6151 |
! |
|
6152 |
||
13559 | 6153 |
allClasses |
13950 | 6154 |
^ self allClassNames |
6155 |
collect:[:nm | |
|
6156 |
|cls| |
|
6157 |
||
6158 |
cls := Smalltalk classNamed:nm. |
|
6159 |
cls isNil ifTrue:[ |
|
6160 |
Transcript showCR:('%1: failed to autoload class %2' bindWith:self name with:nm) |
|
6161 |
]. |
|
6162 |
cls |
|
6163 |
] |
|
6164 |
thenSelect:[:cls | cls notNil ]. |
|
13559 | 6165 |
|
6166 |
"Created: / 06-08-2011 / 15:47:36 / cg" |
|
6167 |
! |
|
6168 |
||
13636 | 6169 |
allExtensionClasses |
6170 |
"answer the set of classes, which are extended by the package. |
|
6171 |
includes all superclasses of the extended classes" |
|
6172 |
||
6173 |
^ self extensionClassesWithSuperclasses:true |
|
6174 |
||
6175 |
" |
|
6176 |
stx_libboss allExtensionClasses |
|
6177 |
" |
|
6178 |
||
6179 |
"Created: / 06-09-2011 / 10:15:54 / cg" |
|
6180 |
! |
|
6181 |
||
13419 | 6182 |
autoloaded_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6183 |
"the opposite of compiled class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6184 |
|
12368 | 6185 |
^ self classNamesForWhich:[:nm :attr | attr notEmptyOrNil and:[attr includes:#autoload]]. |
6186 |
||
6187 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6188 |
"Created: / 30-08-2007 / 18:48:09 / cg" |
|
6189 |
! |
|
6190 |
||
13419 | 6191 |
classNames |
12368 | 6192 |
"answer an array containing all the class names of the project's classes" |
6193 |
||
6194 |
^ self classNamesAndAttributesAsSpecArray collect:[:entry | entry first]. |
|
6195 |
||
6196 |
" |
|
6197 |
stx_libhtml classNames |
|
6198 |
stx_libhtml classNamesAndAttributesAsSpecArray |
|
6199 |
" |
|
6200 |
! |
|
6201 |
||
13419 | 6202 |
classNamesForWhich:aBlock |
12368 | 6203 |
"a correponding method with real names is generated in my subclasses" |
6204 |
||
6205 |
|coll| |
|
6206 |
||
6207 |
coll := OrderedCollection new. |
|
6208 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6209 |
(aBlock value:nm value:attributes) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6210 |
coll add:nm. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6211 |
]. |
12368 | 6212 |
]. |
6213 |
^ coll |
|
6214 |
||
6215 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6216 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6217 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
6218 |
! |
|
6219 |
||
6220 |
classes |
|
6221 |
"list my classes. |
|
6222 |
Project must be loaded - otherwise an error is reported here. |
|
6223 |
Use #classNames if you are only interested in the names" |
|
6224 |
||
13728 | 6225 |
^ self classNames collect:[:nm | Smalltalk at:nm ifAbsent:[self error:'Missing class: ',nm]] |
12368 | 6226 |
|
6227 |
" |
|
6228 |
stx_libbasic3 classNames |
|
6229 |
stx_libbasic3 classes |
|
6230 |
" |
|
13728 | 6231 |
|
6232 |
"Modified: / 27-09-2011 / 18:12:33 / cg" |
|
12368 | 6233 |
! |
6234 |
||
13419 | 6235 |
compiled_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6236 |
"the opposite of autoloaded class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6237 |
|
12368 | 6238 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
6239 |
||
6240 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6241 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6242 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6243 |
"Modified (comment): / 05-03-2012 / 12:21:23 / cg" |
12368 | 6244 |
! |
6245 |
||
6246 |
compiled_classNamesForPlatform |
|
6247 |
"answer the classes to be compiled only for the current platformName" |
|
6248 |
||
6249 |
^ self compiled_classNamesForPlatform:OperatingSystem platformName |
|
6250 |
! |
|
6251 |
||
6252 |
compiled_classNamesForPlatform:platformName |
|
6253 |
"answer the classes to be compiled only for platformName |
|
6254 |
platformName is one of #unix, #win32 (OperatingSystem platformName)" |
|
6255 |
||
13419 | 6256 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6257 |
classNamesForWhich:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6258 |
(attr includes:#autoload) not and:[attr includes:platformName] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6259 |
]. |
12368 | 6260 |
|
6261 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
6262 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
6263 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
|
6264 |
! |
|
6265 |
||
6266 |
compiled_classNames_common |
|
6267 |
"classes to be compiled for any platform" |
|
6268 |
||
13419 | 6269 |
^ self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6270 |
classNamesForWhich:[:nm :attr | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6271 |
attr isEmptyOrNil |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6272 |
]. |
12368 | 6273 |
|
6274 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
6275 |
! |
|
6276 |
||
6277 |
compiled_classNames_unix |
|
6278 |
"class, only to be compiled under unix" |
|
13419 | 6279 |
|
12368 | 6280 |
^ self compiled_classNamesForPlatform:#unix. |
6281 |
||
6282 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
6283 |
! |
|
6284 |
||
6285 |
compiled_classNames_windows |
|
6286 |
"class, only to be compiled under windows" |
|
13419 | 6287 |
|
12368 | 6288 |
^ self compiled_classNamesForPlatform:#win32. |
6289 |
||
6290 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
6291 |
! |
|
6292 |
||
13081 | 6293 |
extensionClasses |
6294 |
"answer the set of classes, which are extended by the package" |
|
6295 |
||
13636 | 6296 |
^ self extensionClassesWithSuperclasses:false |
6297 |
||
6298 |
" |
|
6299 |
stx_libboss extensionClasses |
|
6300 |
" |
|
6301 |
||
6302 |
"Modified: / 06-09-2011 / 10:21:44 / cg" |
|
6303 |
! |
|
6304 |
||
6305 |
extensionClassesWithSuperclasses:withSuperclassesBoolean |
|
6306 |
"answer the set of classes, which are extended by the package" |
|
6307 |
||
13081 | 6308 |
|classes| |
6309 |
||
6310 |
classes := IdentitySet new. |
|
6311 |
||
13419 | 6312 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6313 |
|mthdCls extendedClass| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6314 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6315 |
mthdCls := Smalltalk classNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6316 |
(mthdCls notNil and:[mthdCls isLoaded]) ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6317 |
extendedClass := mthdCls theNonMetaclass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6318 |
(classes includes:extendedClass) ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6319 |
withSuperclassesBoolean ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6320 |
extendedClass withAllSuperclassesDo:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6321 |
classes add:eachClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6322 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6323 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6324 |
classes add:extendedClass. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6325 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6326 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6327 |
]. |
13081 | 6328 |
]. |
6329 |
^ classes. |
|
6330 |
||
6331 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6332 |
stx_libboss extensionClasses |
13636 | 6333 |
" |
6334 |
||
6335 |
"Created: / 06-09-2011 / 10:17:06 / cg" |
|
13081 | 6336 |
! |
6337 |
||
12368 | 6338 |
extensionMethods |
6339 |
"list my extension methods. |
|
6340 |
Project must be loaded - otherwise an error is reported here. |
|
6341 |
Use #extensionMethodsNames if you are only interested in the names" |
|
6342 |
||
13419 | 6343 |
^ self extensionMethodNames |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6344 |
pairWiseCollect:[:className :selector | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6345 |
(Smalltalk classNamed:className) compiledMethodAt:selector. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6346 |
]. |
12368 | 6347 |
|
6348 |
" |
|
6349 |
stx_libbasic2 extensionMethodNames |
|
6350 |
stx_libbasic2 extensionMethods |
|
6351 |
" |
|
6352 |
! |
|
6353 |
||
13081 | 6354 |
extensionPackages |
6355 |
"answer the set of packages, which are extended by this package" |
|
6356 |
||
13636 | 6357 |
^ self allExtensionClasses collect:[:eachClass| eachClass package] |
6358 |
||
6359 |
" |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6360 |
stx_libboss extensionPackages |
13636 | 6361 |
" |
6362 |
||
6363 |
"Modified: / 06-09-2011 / 10:20:47 / cg" |
|
13081 | 6364 |
! |
6365 |
||
10144 | 6366 |
hasAllClassesFullyLoaded |
6367 |
"return true, if all classes are present and loaded" |
|
6368 |
||
6369 |
^ self hasAllClassesLoaded:true |
|
6370 |
||
6371 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
6372 |
! |
|
6373 |
||
9627 | 6374 |
hasAllClassesLoaded |
10205 | 6375 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 6376 |
|
6377 |
^ self hasAllClassesLoaded:false |
|
6378 |
||
6379 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
6380 |
! |
|
6381 |
||
6382 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
6383 |
"check if all classes for this platform are present. |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
6384 |
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
|
6385 |
|
13419 | 6386 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6387 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6388 |
loaded:checkIfFullyLoaded) |
10154 | 6389 |
and:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6390 |
self |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6391 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6392 |
loaded:checkIfFullyLoaded ] |
10154 | 6393 |
|
6394 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
6395 |
! |
|
6396 |
||
6397 |
hasAllCompiledClassesFullyLoaded |
|
6398 |
"return true, if all compiled classes are present and loaded" |
|
6399 |
||
6400 |
^ self hasAllCompiledClassesLoaded:true |
|
6401 |
||
6402 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
6403 |
! |
|
6404 |
||
6405 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
6406 |
"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
|
6407 |
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
|
6408 |
|
13419 | 6409 |
^ (self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6410 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6411 |
loaded:checkIfFullyLoaded) |
10154 | 6412 |
and:[ |
13419 | 6413 |
self |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6414 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6415 |
loaded:checkIfFullyLoaded |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
6416 |
] |
9585 | 6417 |
! |
6418 |
||
9627 | 6419 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
6420 |
"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
|
6421 |
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
|
6422 |
|
9627 | 6423 |
self extensionMethodNames pairWiseDo:[:className :selector | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6424 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6425 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6426 |
cls := Smalltalk loadedClassNamed:className. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6427 |
cls isNil ifTrue:[ |
14021 | 6428 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6429 |
Transcript showCR:(self name,' missing extension class "',className,'".'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6430 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6431 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6432 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6433 |
"there is no possibility that we installed an extension method in an unloaded class" |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6434 |
(cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
14021 | 6435 |
Verbose ifTrue:[ |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6436 |
Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6437 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6438 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6439 |
]. |
9627 | 6440 |
]. |
6441 |
^ true. |
|
6442 |
||
6443 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 6444 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 6445 |
! |
6446 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6447 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6448 |
"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
|
6449 |
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
|
6450 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6451 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6452 |
classNames do:[:eachClassName | |
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6453 |
|cls| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6454 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6455 |
cls := Smalltalk loadedClassNamed:eachClassName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6456 |
cls isNil ifTrue:[ |
14021 | 6457 |
Verbose ifTrue:[ |
6458 |
(self name, ' [info]: missing class: ', eachClassName) infoPrintCR. |
|
6459 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6460 |
^ false |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6461 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6462 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
14021 | 6463 |
Verbose ifTrue:[ |
6464 |
(self name,' [info]: unloaded class: ', eachClassName) infoPrintCR. |
|
6465 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6466 |
^ false. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6467 |
]. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6468 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6469 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
6470 |
^ true |
10154 | 6471 |
! |
6472 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
6473 |
hasExtensionMethods |
9850 | 6474 |
^ self extensionMethodNames notEmpty |
6475 |
||
6476 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 6477 |
! |
6478 |
||
12369 | 6479 |
hasPostLoadAction |
6480 |
"/ true if postLoadAction has been redefined |
|
6481 |
^ (self class whichClassIncludesSelector:#postLoadAction) theNonMetaclass isAbstract not |
|
6482 |
! |
|
6483 |
||
6484 |
hasPostUnloadAction |
|
6485 |
"/ true if postUnloadAction has been redefined |
|
6486 |
^ (self class whichClassIncludesSelector:#postUnloadAction) theNonMetaclass isAbstract not |
|
6487 |
! |
|
6488 |
||
6489 |
hasPreLoadAction |
|
6490 |
"/ true if preLoadAction has been redefined |
|
6491 |
^ (self class whichClassIncludesSelector:#preLoadAction) theNonMetaclass isAbstract not |
|
6492 |
! |
|
6493 |
||
6494 |
hasPreUnloadAction |
|
6495 |
"/ true if preUnloadAction has been redefined |
|
6496 |
^ (self class whichClassIncludesSelector:#preUnloadAction) theNonMetaclass isAbstract not |
|
6497 |
! |
|
6498 |
||
13609 | 6499 |
isAbstract |
6500 |
^ self == ProjectDefinition |
|
6501 |
||
6502 |
"Modified (format): / 20-08-2011 / 22:47:46 / cg" |
|
6503 |
! |
|
6504 |
||
10140 | 6505 |
isFullyLoaded |
13419 | 6506 |
^ self hasAllCompiledClassesFullyLoaded |
13167 | 6507 |
and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
10140 | 6508 |
|
6509 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
13609 | 6510 |
"Modified: / 20-08-2011 / 22:47:16 / cg" |
12331 | 6511 |
! |
6512 |
||
6513 |
projectType |
|
6514 |
^ self subclassResponsibility |
|
9585 | 6515 |
! ! |
6516 |
||
10774 | 6517 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
6518 |
||
6519 |
showClassDocumentationOf:aClass |
|
12198
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
6520 |
"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
|
6521 |
or hidden. |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
6522 |
(used for expecco, to suppress documentation of workflow- and expecco classes |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
6523 |
in the expecco-class browser)" |
10774 | 6524 |
|
6525 |
^ true |
|
6526 |
||
6527 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
6528 |
! ! |
|
6529 |
||
9726 | 6530 |
!ProjectDefinition class methodsFor:'sanity checks'! |
6531 |
||
6532 |
validateDescription |
|
13808 | 6533 |
"perform some consistency checks (set of classes in project same as those listed in description); |
6534 |
called before checking in build support files" |
|
6535 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6536 |
|emptyProjects nonProjects emptyOrNonProjects classesInImage |
14510 | 6537 |
classesInDescription onlyInImage onlyInDescription missingPools myPackage| |
9956 | 6538 |
|
6539 |
emptyProjects := Set withAll:self subProjects. |
|
6540 |
Smalltalk allClassesDo:[:cls | |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6541 |
emptyProjects remove:(cls package) ifAbsent:[]. |
9956 | 6542 |
]. |
6543 |
nonProjects := self subProjects select:[:p | |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6544 |
(ProjectDefinition definitionClassForPackage: p) isNil |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6545 |
]. |
9956 | 6546 |
|
6547 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
6548 |
emptyOrNonProjects addAll:nonProjects. |
|
6549 |
||
6550 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6551 |
(Dialog |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6552 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6553 |
, ((emptyOrNonProjects |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6554 |
asSortedCollection |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6555 |
collect:[:p | p allBold]) |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6556 |
asStringWith:'\ ') |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6557 |
, '\\Continue ?') withCRs |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6558 |
yesLabel:'OK' noLabel:'Cancel') |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6559 |
ifFalse:[ |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6560 |
AbortSignal raise |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6561 |
]. |
9956 | 6562 |
]. |
6563 |
||
14510 | 6564 |
myPackage := self package. |
6565 |
classesInImage := Smalltalk allClasses select:[:cls | (cls package == myPackage) and:[cls isPrivate not]]. |
|
13728 | 6566 |
"/ classesInDescription := self classes asIdentitySet. |
6567 |
classesInDescription := IdentitySet new. |
|
6568 |
((self compiled_classNamesForPlatform:(OperatingSystem platformName)) |
|
6569 |
, (self compiled_classNames_common) |
|
6570 |
, (self autoloaded_classNames)) do:[:nm | |
|
6571 |
|cls| |
|
6572 |
||
6573 |
cls := Smalltalk at:nm asSymbol. |
|
6574 |
cls isNil ifTrue:[ |
|
6575 |
self error:'oops: missing class: ',nm. |
|
6576 |
]. |
|
6577 |
classesInDescription add:cls. |
|
6578 |
]. |
|
6579 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6580 |
missingPools := Set new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6581 |
classesInDescription do:[:eachClass | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6582 |
eachClass sharedPoolNames do:[:eachPoolName | |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6583 |
|pool| |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6584 |
|
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6585 |
pool := eachClass nameSpace classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6586 |
pool isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6587 |
eachClass nameSpace ~~ Smalltalk ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6588 |
pool := Smalltalk classNamed:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6589 |
] |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6590 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6591 |
pool isNil ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6592 |
Transcript showCR:'missing pool: ',eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6593 |
missingPools add:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6594 |
] ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6595 |
pool isSharedPool ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6596 |
Transcript showCR:'not a shared pool: ',eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6597 |
missingPools add:eachPoolName. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6598 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6599 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6600 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6601 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6602 |
missingPools notEmpty ifTrue:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6603 |
(Dialog |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6604 |
confirm:('The following sharedpools are non-existent, or not pools:\\ ' |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6605 |
, ((missingPools |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6606 |
asSortedCollection |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6607 |
collect:[:p | p allBold]) |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6608 |
asStringWith:'\ ') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6609 |
, '\\Continue ?') withCRs |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6610 |
yesLabel:'OK' noLabel:'Cancel') |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6611 |
ifFalse:[ |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6612 |
AbortSignal raise |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6613 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6614 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
6615 |
|
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6616 |
classesInImage ~= classesInDescription ifTrue:[ |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6617 |
onlyInImage := (classesInImage reject:[:cls | classesInDescription includes:cls]). |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6618 |
onlyInImage notEmpty ifTrue:[ |
13899
d769ad2935e6
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13875
diff
changeset
|
6619 |
Transcript show:self name; show:': only in image: '; showCR:onlyInImage |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6620 |
]. |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6621 |
onlyInDescription := (classesInDescription reject:[:cls | classesInImage includes:cls]). |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6622 |
onlyInDescription notEmpty ifTrue:[ |
13899
d769ad2935e6
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13875
diff
changeset
|
6623 |
Transcript show:self name; show:': only in description: '; showCR:onlyInDescription |
13711
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6624 |
]. |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6625 |
(Dialog confirm:'The set of classes in the image is different from the listed classes in the project definition.\\Proceed?' withCRs) ifFalse:[ |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6626 |
AbortSignal raiseRequest |
d3fe511856fc
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13702
diff
changeset
|
6627 |
] |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6628 |
]. |
14045 | 6629 |
"/ self validateOrderOfClasses |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6630 |
|
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6631 |
" |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6632 |
squeak_vmMaker validateDescription |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6633 |
" |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
6634 |
|
14045 | 6635 |
"Modified: / 06-03-2012 / 11:31:37 / cg" |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6636 |
! |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6637 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6638 |
validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6639 |
"check if the project's classes are listed in the correct dependency order in the classList. |
14045 | 6640 |
This would be required, if the generated makefile would compile files in that order, |
6641 |
and superclasses must be compiled before subclasses (for the header files). |
|
6642 |
However, the makefile list is generated by a separate mechanism, so that is not requiered." |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6643 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6644 |
|classesInDescriptionInOrder classesInProject already| |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6645 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6646 |
classesInDescriptionInOrder := OrderedCollection new. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6647 |
classesInDescriptionInOrder := |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6648 |
self compiled_classNames |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6649 |
collect:[:eachName | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6650 |
|cls| |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6651 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6652 |
cls := Smalltalk at:eachName. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6653 |
self assert:cls notNil message:'missing class: ',eachName. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6654 |
cls |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6655 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6656 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6657 |
classesInProject := classesInDescriptionInOrder asSet. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6658 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6659 |
already := Set new. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6660 |
classesInDescriptionInOrder do:[:eachClass | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6661 |
eachClass allSuperclassesDo:[:superclass | |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6662 |
(classesInProject includes:superclass) ifTrue:[ |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6663 |
"/ if in the set, it must have been already listed |
14045 | 6664 |
self |
6665 |
assert:(already includes:superclass) |
|
6666 |
message:('superclass "%1" not compiled before "%2"' |
|
6667 |
bindWith:superclass name |
|
6668 |
with:eachClass name). |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6669 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6670 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6671 |
already add:eachClass. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6672 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6673 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6674 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6675 |
stx_goodies_refactoryBrowser_lint validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6676 |
squeak_vmMaker validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6677 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6678 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
6679 |
"Created: / 05-03-2012 / 12:18:45 / cg" |
9726 | 6680 |
! ! |
6681 |
||
9585 | 6682 |
!ProjectDefinition class methodsFor:'testing'! |
6683 |
||
9664 | 6684 |
isApplicationDefinition |
6685 |
^ false |
|
6686 |
||
6687 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 6688 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
6689 |
! |
|
6690 |
||
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6691 |
isConsoleApplication |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6692 |
^ false |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6693 |
|
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6694 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6695 |
! |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
6696 |
|
9983 | 6697 |
isGUIApplication |
6698 |
^ false |
|
6699 |
||
6700 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 6701 |
! |
6702 |
||
6703 |
isLibraryDefinition |
|
6704 |
^ false |
|
6705 |
||
6706 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 6707 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 6708 |
! |
6709 |
||
9627 | 6710 |
isProjectDefinition |
9664 | 6711 |
"concrete i.e. not abstract" |
6712 |
||
13285 | 6713 |
^ self ~~ ProjectDefinition "/ skip myself - I am abstract |
9627 | 6714 |
|
6715 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
13285 | 6716 |
"Modified: / 08-02-2011 / 10:03:49 / cg" |
9585 | 6717 |
! ! |
6718 |
||
13592 | 6719 |
!ProjectDefinition::AbbrevEntry methodsFor:'accessing'! |
6720 |
||
6721 |
category |
|
6722 |
^ category |
|
6723 |
! |
|
6724 |
||
6725 |
className |
|
6726 |
^ className |
|
6727 |
! |
|
6728 |
||
13695 | 6729 |
className:classNameArg fileName:fileNameArg category:categoryArg numClassInstVars:numClassInstVarsArg |
13592 | 6730 |
className := classNameArg. |
6731 |
fileName := fileNameArg. |
|
6732 |
category := categoryArg. |
|
6733 |
numClassInstVars := numClassInstVarsArg. |
|
6734 |
||
6735 |
"Created: / 18-08-2011 / 14:18:30 / cg" |
|
6736 |
! |
|
6737 |
||
6738 |
fileName |
|
6739 |
^ fileName |
|
6740 |
! |
|
6741 |
||
6742 |
numClassInstVars |
|
6743 |
^ numClassInstVars |
|
6744 |
||
6745 |
"Created: / 18-08-2011 / 14:18:37 / cg" |
|
6746 |
! ! |
|
6747 |
||
9569 | 6748 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 6749 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
6750 |
version |
14809 | 6751 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.415 2013-02-28 20:42:21 stefan Exp $' |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
6752 |
! |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
6753 |
|
12086 | 6754 |
version_CVS |
14809 | 6755 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.415 2013-02-28 20:42:21 stefan Exp $' |
13411 | 6756 |
! |
6757 |
||
6758 |
version_SVN |
|
13485
60df70976373
changed: #classNamesByCategory
Claus Gittinger <cg@exept.de>
parents:
13419
diff
changeset
|
6759 |
^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1 §' |
9536 | 6760 |
! ! |
9714 | 6761 |
|
14642 | 6762 |
|
9714 | 6763 |
ProjectDefinition initialize! |