author | Claus Gittinger <cg@exept.de> |
Wed, 16 Sep 2009 17:19:23 +0200 | |
changeset 11940 | cb9e5867b474 |
parent 11937 | 622f2641439d |
child 11979 | d2afd6b5fc01 |
permissions | -rw-r--r-- |
9553 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9536 | 13 |
|
9569 | 14 |
Object subclass:#ProjectDefinition |
11479 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'LibraryType GUIApplicationType NonGUIApplicationType' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Support-Projects' |
|
9536 | 19 |
! |
20 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
21 |
ProjectDefinition class instanceVariableNames:'overwrittenMethods projectIsLoaded' |
9607 | 22 |
|
23 |
" |
|
24 |
No other class instance variables are inherited by this class. |
|
25 |
" |
|
26 |
! |
|
27 |
||
9569 | 28 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 29 |
|
30 |
copyright |
|
31 |
" |
|
32 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
33 |
All Rights Reserved |
|
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
9714 | 42 |
! |
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
redefinable build-file attributes: |
|
47 |
||
48 |
stcOptimizationOptions -> STCLOCALOPT |
|
49 |
stcWarningOptions -> STCLOCALOPT |
|
50 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
|
10306 | 51 |
localIncludes_win32 -> LOCALINCLUDES (bc.mak) |
9714 | 52 |
|
53 |
for applications: |
|
54 |
startupClassName |
|
55 |
startupSelector |
|
56 |
||
57 |
for libraries: |
|
58 |
||
59 |
" |
|
9553 | 60 |
! ! |
9536 | 61 |
|
9569 | 62 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 63 |
|
64 |
newForPackage:packageID |
|
65 |
^ self |
|
66 |
newNamed:(self initialClassNameForDefinitionOf:packageID) |
|
67 |
package:packageID. |
|
68 |
||
69 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
70 |
! |
|
71 |
||
72 |
newNamed:newName package:packageID |
|
73 |
|newClass| |
|
74 |
||
75 |
"/ for now, we are strict. |
|
76 |
self assert:(self initialClassNameForDefinitionOf:packageID) = newName. |
|
9569 | 77 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 78 |
|
79 |
newClass := self |
|
80 |
subclass:(newName asSymbol) |
|
81 |
instanceVariableNames:'' |
|
82 |
classVariableNames:'' |
|
83 |
poolDictionaries:'' |
|
84 |
category:(self defaultCategory). |
|
85 |
||
86 |
newClass package:packageID asSymbol. |
|
87 |
^ newClass |
|
88 |
||
89 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
90 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 91 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 92 |
! ! |
93 |
||
9569 | 94 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 95 |
|
10716 | 96 |
allPreRequisites |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
97 |
"answer all (recursive) prerequisite project ids of myself - in random order. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
98 |
If we exclude a project, but one of our prerequisite projects depends on it, " |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
99 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
100 |
|setOfAllPreRequisites toAdd| |
10716 | 101 |
|
102 |
setOfAllPreRequisites := Set new. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
103 |
toAdd := Set new. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
104 |
toAdd addAll:self effectivePreRequisites. |
10810 | 105 |
|
11752
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
106 |
"is a subproject really a prerequisite?? |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
107 |
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
|
108 |
so the following line has been deleted. |
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
109 |
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
|
110 |
"/ toAdd addAll:self effectiveSubProjects. |
10716 | 111 |
|
112 |
[toAdd notEmpty] whileTrue:[ |
|
113 |
|aPreRequisiteProjectID def| |
|
114 |
||
115 |
aPreRequisiteProjectID := toAdd removeFirst. |
|
116 |
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[ |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
117 |
setOfAllPreRequisites add:aPreRequisiteProjectID. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
118 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
119 |
def := self definitionClassForPackage:aPreRequisiteProjectID. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
120 |
def isNil ifTrue:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
121 |
Transcript showCR:'ProjectDefinition ', aPreRequisiteProjectID, ' is missing - cannot find its preRequisites.'. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
122 |
] ifFalse:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
123 |
def effectivePreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
124 |
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not] |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
125 |
thenDo:[:eachSubPreRequisite | |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
126 |
Transcript showCR:(aPreRequisiteProjectID, ' requires ', eachSubPreRequisite). |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
127 |
toAdd add:eachSubPreRequisite ]. |
11752
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
128 |
|
484d542ad43f
subProjects are no prerequisites
Stefan Vogel <sv@exept.de>
parents:
11713
diff
changeset
|
129 |
"but subprojects of our prerequisites are also prerequisites" |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
130 |
def effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
131 |
select:[:eachSubSubRequisite | (setOfAllPreRequisites includes:eachSubSubRequisite) not] |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
132 |
thenDo:[:eachSubSubRequisite | |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
133 |
Transcript showCR:(aPreRequisiteProjectID, ' hasSub ', eachSubSubRequisite). |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
134 |
toAdd add:eachSubSubRequisite ]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
135 |
]. |
10716 | 136 |
] |
137 |
]. |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
138 |
^ setOfAllPreRequisites. |
10716 | 139 |
|
140 |
" |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
141 |
stx_libbasic allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
142 |
stx_libbasic2 allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
143 |
stx_libview2 allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
144 |
ubs_application allPreRequisites |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
145 |
ubs_application allPreRequisitesSorted |
10716 | 146 |
exept_expeccoNET_application allPreRequisites |
147 |
alspa_batch_application allPreRequisites |
|
148 |
" |
|
149 |
! |
|
150 |
||
10810 | 151 |
allPreRequisitesSorted |
152 |
"answer all the prerequisites of this projects sorted in |
|
153 |
the order they are needed. |
|
154 |
Use this to e.g. compile packages in the dependency order" |
|
155 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
156 |
|allPreRequisites orderedTuples effective| |
10810 | 157 |
|
158 |
orderedTuples := OrderedCollection new. |
|
159 |
||
11070 | 160 |
allPreRequisites := self allPreRequisites. |
161 |
allPreRequisites do:[:eachPackageID | |
|
10810 | 162 |
|def| |
163 |
||
164 |
def := self definitionClassForPackage:eachPackageID. |
|
11173 | 165 |
def isNil ifTrue:[ |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
166 |
Transcript showCR:'Warning: no definition class for package: ', eachPackageID. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
167 |
orderedTuples add:(Array with:eachPackageID). |
11173 | 168 |
] ifFalse:[ |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
169 |
effective := def effectivePreRequisites. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
170 |
effective isEmptyOrNil ifTrue:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
171 |
orderedTuples add:(Array with:eachPackageID). |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
172 |
] ifFalse:[ |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
173 |
effective do:[:eachPrerequisitePackageID| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
174 |
orderedTuples add:(Array with:eachPrerequisitePackageID with:eachPackageID). |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
175 |
]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
176 |
]. |
10810 | 177 |
]. |
178 |
]. |
|
179 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
180 |
^ orderedTuples topologicalSort. |
10810 | 181 |
|
182 |
" |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
183 |
stx_libbasic allPreRequisitesSorted |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
184 |
stx_libbasic2 allPreRequisitesSorted |
10810 | 185 |
stx_libwidg2 allPreRequisitesSorted |
186 |
exept_expecco_application allPreRequisitesSorted |
|
187 |
alspa_batch_application allPreRequisitesSorted |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
188 |
ubs_application allPreRequisitesSorted |
10810 | 189 |
" |
190 |
! |
|
191 |
||
9536 | 192 |
initialClassNameForDefinitionOf:aPackageId |
193 |
|s| |
|
194 |
||
195 |
s := aPackageId asString copy replaceAny:':/' with:$_. |
|
196 |
(s endsWith:$_) ifTrue:[ |
|
197 |
s := s copyWithoutLast:1 |
|
198 |
]. |
|
199 |
^ s |
|
200 |
||
201 |
" |
|
202 |
DapasXProject initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
|
203 |
DapasXProject initialClassNameForDefinitionOf:'stx:libbasic' |
|
204 |
DapasXProject initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
205 |
" |
|
206 |
||
207 |
"Created: / 09-08-2006 / 17:44:47 / fm" |
|
208 |
"Modified: / 11-08-2006 / 14:00:05 / cg" |
|
209 |
! |
|
210 |
||
211 |
libraryName |
|
9575 | 212 |
^ self package asPackageId libraryName |
9536 | 213 |
|
9559 | 214 |
" |
9688 | 215 |
bosch_dapasx_datenbasis libraryName |
9575 | 216 |
stx_libbasic3 libraryName |
9559 | 217 |
" |
9536 | 218 |
|
219 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 220 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 221 |
! |
222 |
||
9559 | 223 |
libraryNameFor:aProjectID |
9575 | 224 |
^ aProjectID asPackageId libraryName |
9536 | 225 |
|
9559 | 226 |
" |
9575 | 227 |
bosch_dapasx_datenbasis libraryName |
228 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
9688 | 229 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 230 |
" |
9536 | 231 |
|
232 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 233 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 234 |
! |
235 |
||
236 |
module |
|
9559 | 237 |
^ self moduleOfClass:self |
9536 | 238 |
|
9559 | 239 |
" |
240 |
bosch_dapasx_datenbasis_Definition module |
|
241 |
DapasX_Datenbasis module |
|
9575 | 242 |
stx_libbasic3 module |
9559 | 243 |
" |
9536 | 244 |
|
245 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
246 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 247 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 248 |
! |
249 |
||
250 |
moduleDirectory |
|
9575 | 251 |
^ (PackageId from:self package) directory |
9536 | 252 |
|
9559 | 253 |
" |
9575 | 254 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
255 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
256 |
stx_libbasic3 moduleDirectory |
|
9559 | 257 |
" |
9536 | 258 |
|
259 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9575 | 260 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
9536 | 261 |
! |
262 |
||
9559 | 263 |
moduleDirectoryFor:aProjectID |
264 |
^ (aProjectID subStrings:$:) last |
|
9536 | 265 |
|
9559 | 266 |
" |
267 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
268 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
269 |
" |
|
9536 | 270 |
|
271 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 272 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 273 |
! |
274 |
||
9891 | 275 |
moduleDirectory_win32 |
276 |
^ (PackageId from:self package) directory copy replaceAll:$/ with:$\ |
|
277 |
||
278 |
" |
|
279 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
280 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
281 |
stx_libbasic3 moduleDirectory_win32 |
|
282 |
" |
|
283 |
||
284 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
285 |
! |
|
286 |
||
10562 | 287 |
moduleDirectory_win32For: projectID |
288 |
||
289 |
^(self moduleDirectoryFor:projectID) copy replaceAll:$/ with:$\ |
|
290 |
||
291 |
" |
|
292 |
self moduleDirectory_win32For: #'bosch:dapasx/pav_vergleich' |
|
293 |
self moduleDirectory_win32For: #'stx:goodies/xml/stx' |
|
294 |
self moduleDirectory_win32For: #'stx:libbasic2' |
|
295 |
" |
|
296 |
! |
|
297 |
||
9559 | 298 |
moduleFor:aProjectID |
299 |
^ (aProjectID subStrings:$:) first |
|
9536 | 300 |
|
9559 | 301 |
" |
302 |
DapasXProject module |
|
303 |
DapasX_Datenbasis module |
|
304 |
" |
|
9536 | 305 |
|
306 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 307 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 308 |
! |
309 |
||
9559 | 310 |
moduleOfClass:aClass |
311 |
^ self moduleFor:aClass package |
|
9536 | 312 |
|
9559 | 313 |
" |
314 |
DapasXProject module |
|
315 |
DapasX_Datenbasis module |
|
316 |
" |
|
9536 | 317 |
|
318 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 319 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 320 |
! |
321 |
||
9559 | 322 |
msdosPathToPackage:toPackageID from:fromPackageID |
323 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
324 |
||
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
|
325 |
|parts1 parts2 common up down| |
9852 | 326 |
|
327 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
328 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
329 |
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
|
330 |
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
|
331 |
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
|
332 |
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
|
333 |
down isEmpty ifTrue:[^ '.']. |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
334 |
^ down. |
9852 | 335 |
]. |
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
|
336 |
down isEmpty ifTrue:[ |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
337 |
^ up. |
9714 | 338 |
]. |
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
|
339 |
^ up, '\', down |
9901 | 340 |
|
9559 | 341 |
" |
342 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
9852 | 343 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
344 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
10976
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
345 |
self msdosPathToPackage:'exept:expecco' from:'exept:expecco/application' |
5696faf1af02
fix #msdosPathToPackage:from: (do not use , since it is relative to the current directory)
Stefan Vogel <sv@exept.de>
parents:
10974
diff
changeset
|
346 |
self msdosPathToPackage:'exept:expecco/application' from:'exept:expecco' |
9559 | 347 |
" |
9536 | 348 |
|
9559 | 349 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 350 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 351 |
! |
352 |
||
9714 | 353 |
msdosPathToTopFor:aProjectID |
9559 | 354 |
"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 | 355 |
|
9852 | 356 |
|parts| |
357 |
||
358 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
359 |
||
360 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
361 |
parts size == 1 ifTrue:[^ '.']. |
|
362 |
^ (((2 to:parts size-1) collect:[:p | '..\']) asStringWith:'') , '..' |
|
363 |
]. |
|
364 |
||
365 |
^ ((parts collect:[:p | '..\']) asStringWith:'') , 'stx' |
|
9536 | 366 |
|
9559 | 367 |
" |
9852 | 368 |
self msdosPathToTopFor: #'bosch' |
369 |
self msdosPathToTopFor: #'bosch:dapasx' |
|
9559 | 370 |
self msdosPathToTopFor: #'bosch:dapasx/datenbasis' |
9852 | 371 |
self msdosPathToTopFor: #'stx' |
372 |
self msdosPathToTopFor: #'stx:libview' |
|
373 |
self msdosPathToTopFor: #'stx:goodies/foo' |
|
9559 | 374 |
" |
9536 | 375 |
|
376 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 377 |
"Modified: / 14-09-2006 / 14:49:17 / cg" |
9559 | 378 |
! |
379 |
||
9536 | 380 |
packageName |
9688 | 381 |
"the last component" |
9536 | 382 |
|
9688 | 383 |
^ self packageNameFor: self package |
9536 | 384 |
|
9688 | 385 |
" |
10810 | 386 |
stx_libwidg2 packageName |
9688 | 387 |
bosch_dapasx_hw_schnittstellen packageName |
388 |
bosch_dapasx_datenbasis packageName |
|
389 |
bosch_dapasx_parameter_system packageName |
|
390 |
" |
|
9536 | 391 |
|
392 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
393 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
394 |
! |
|
395 |
||
396 |
packageNameFor: aProjectID |
|
9688 | 397 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 398 |
|
9688 | 399 |
" |
400 |
bosch_dapasx_hw_schnittstellen packageName |
|
401 |
bosch_dapasx_datenbasis packageName |
|
402 |
bosch_dapasx_parameter_system packageName |
|
403 |
" |
|
9536 | 404 |
|
405 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
406 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
407 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
408 |
! |
|
409 |
||
410 |
parentProject |
|
10306 | 411 |
^ (self parentProjectFor: self package) |
9536 | 412 |
|
413 |
" |
|
414 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
415 |
DapasX_Datenbasis parentProject |
|
416 |
" |
|
417 |
||
418 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
419 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
420 |
! |
|
421 |
||
422 |
parentProjectFor: aProjectID |
|
10306 | 423 |
^ (aProjectID subStrings: $/) first |
9536 | 424 |
|
425 |
" |
|
9664 | 426 |
bosch_dapasx_hw_schnittstellen parentProject |
9536 | 427 |
" |
428 |
||
429 |
"Created: / 07-08-2006 / 20:18:27 / fm" |
|
430 |
"Modified: / 08-08-2006 / 10:47:37 / fm" |
|
9664 | 431 |
"Modified: / 23-08-2006 / 15:07:36 / cg" |
9536 | 432 |
! |
433 |
||
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
434 |
pathSeparator:platformName |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
435 |
platformName == #unix ifTrue:[ |
9850 | 436 |
^ self pathSeparator_unix |
437 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
438 |
platformName == #win32 ifTrue:[ |
9850 | 439 |
^ self pathSeparator_win32 |
440 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
441 |
self error:'unknown operating system platform'. |
9850 | 442 |
|
443 |
"Created: / 14-09-2006 / 13:38:00 / cg" |
|
444 |
! |
|
445 |
||
446 |
pathSeparator_unix |
|
447 |
^ $/ |
|
448 |
||
449 |
"Created: / 14-09-2006 / 13:37:18 / cg" |
|
450 |
! |
|
451 |
||
452 |
pathSeparator_win32 |
|
453 |
^ $\ |
|
454 |
||
455 |
"Created: / 14-09-2006 / 13:37:23 / cg" |
|
456 |
! |
|
457 |
||
458 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
459 |
"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" |
|
460 |
||
461 |
|p| |
|
462 |
||
463 |
arch == #unix ifTrue:[ |
|
464 |
p := (self pathToPackage_unix:aPackageID). |
|
465 |
aBaseFilename isNil ifTrue:[^ p]. |
|
466 |
^ p , '/' , aBaseFilename |
|
467 |
]. |
|
468 |
arch == #win32 ifTrue:[ |
|
469 |
p := self pathToPackage_win32:aPackageID. |
|
470 |
aBaseFilename isNil ifTrue:[^ p]. |
|
471 |
^ p , '\' , aBaseFilename |
|
472 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
473 |
self error:'unknown operating system platform'. |
9850 | 474 |
|
475 |
"Created: / 14-09-2006 / 13:29:20 / cg" |
|
476 |
! |
|
477 |
||
478 |
pathToPackage_unix:aPackageID |
|
479 |
"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" |
|
480 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
481 |
|rel| |
9850 | 482 |
|
9880 | 483 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
484 |
^ self unixPathToPackage:aPackageID from:self package |
|
485 |
]. |
|
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
486 |
rel := self topRelativePathToPackage_unix:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
487 |
(rel startsWith:'stx/') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
488 |
^ '$(TOP)/', (rel copyFrom:'stx/' size + 1). |
9850 | 489 |
] ifFalse:[ |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
490 |
^ '$(TOP)/../', rel |
9850 | 491 |
] |
492 |
||
493 |
" |
|
9880 | 494 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/kernel' |
495 |
bosch_dapasx_kernel pathToPackage_unix:'bosch:dapasx/support' |
|
496 |
stx_libbasic pathToPackage_unix:'bosch:dapasx/kernel' |
|
9850 | 497 |
" |
498 |
||
499 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
500 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 501 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
9850 | 502 |
! |
503 |
||
504 |
pathToPackage_win32:aPackageID |
|
505 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
506 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
507 |
|rel| |
9850 | 508 |
|
9880 | 509 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
510 |
^ self msdosPathToPackage:aPackageID from:self package |
|
511 |
]. |
|
512 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
513 |
rel := self topRelativePathToPackage_win32:aPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
514 |
(rel startsWith:'stx\') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
515 |
^ '$(TOP)\', (rel copyFrom:'stx\' size + 1). |
9850 | 516 |
] ifFalse:[ |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
517 |
^ '$(TOP)\..\', rel |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
518 |
] |
9850 | 519 |
|
520 |
" |
|
9880 | 521 |
self pathToPackage_win32:'bosch:dapasx/kernel' |
522 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/kernel' |
|
523 |
bosch_dapasx_kernel pathToPackage_win32:'bosch:dapasx/support' |
|
524 |
stx_libbasic pathToPackage_win32:'bosch:dapasx/kernel' |
|
9850 | 525 |
" |
526 |
||
527 |
"Created: / 14-09-2006 / 13:22:52 / cg" |
|
9880 | 528 |
"Modified: / 14-09-2006 / 15:28:45 / cg" |
9850 | 529 |
! |
530 |
||
9714 | 531 |
pathToTop_unix |
532 |
"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" |
|
533 |
||
9852 | 534 |
^ self unixPathToTopFor:self package. |
9714 | 535 |
|
536 |
" |
|
9852 | 537 |
bosch_dapasx_kernel pathToTop_unix |
538 |
stx_goodies_xml pathToTop_unix |
|
539 |
stx_libhtml pathToTop_unix |
|
540 |
stx_goodies_refactoryBrowser_changes pathToTop_unix |
|
9714 | 541 |
" |
542 |
||
543 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 544 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 545 |
! |
546 |
||
547 |
pathToTop_win32 |
|
548 |
"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" |
|
549 |
||
550 |
^self msdosPathToTopFor: self package |
|
551 |
||
552 |
" |
|
553 |
bosch_dapasx_datenbasis pathToTop_win32 |
|
554 |
stx_libbasic pathToTop_win32 |
|
555 |
" |
|
556 |
||
557 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9831 | 558 |
"Modified: / 07-09-2006 / 15:51:00 / cg" |
9714 | 559 |
! |
560 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
561 |
projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
562 |
"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
|
563 |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
564 |
projectIsLoaded isNil ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
565 |
projectIsLoaded := false. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
566 |
]. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
567 |
^ projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
568 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
569 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
570 |
stx_libbasic projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
571 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
572 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
573 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
574 |
projectIsLoaded:something |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
575 |
projectIsLoaded := something. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
576 |
something == true ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
577 |
"register myself as dependent - I want to get notified on method changes" |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
578 |
self class addDependent:self. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
579 |
]. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
580 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
581 |
|
9536 | 582 |
requiredProjects |
11479 | 583 |
^ self effectivePreRequisites , self subProjects |
9536 | 584 |
! |
585 |
||
9850 | 586 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
587 |
"Returns the path to stx counting the number of $/ and $: in the package name |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
588 |
and adding for each one '../' to get the ST/X top directory" |
9850 | 589 |
|
590 |
|p| |
|
591 |
||
592 |
arch == #unix ifTrue:[ |
|
593 |
p := (self topRelativePathToPackage_unix:aPackageID). |
|
594 |
aBaseFilename isNil ifTrue:[^ p]. |
|
595 |
^ p , '/' , aBaseFilename |
|
596 |
]. |
|
597 |
arch == #win32 ifTrue:[ |
|
598 |
p := self topRelativePathToPackage_win32:aPackageID. |
|
599 |
aBaseFilename isNil ifTrue:[^ p]. |
|
600 |
^ p , '\' , aBaseFilename |
|
601 |
]. |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
602 |
self error:'unknown operating system platform'. |
9850 | 603 |
|
604 |
"Created: / 14-09-2006 / 13:34:05 / cg" |
|
605 |
! |
|
606 |
||
607 |
topRelativePathToPackage_unix:aPackageID |
|
608 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
|
609 |
||
610 |
^ aPackageID asString copy replaceAny:':/' with:$/ |
|
611 |
||
612 |
" |
|
613 |
self topRelativePathToPackage_unix:'stx:goodies/xml' |
|
614 |
self topRelativePathToPackage_unix:'bosch:dapasx/kernel' |
|
615 |
" |
|
616 |
||
617 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
618 |
! |
|
619 |
||
620 |
topRelativePathToPackage_win32:aPackageID |
|
9559 | 621 |
"Returns the path to the package as specified by aPackageID relative to the top directory" |
622 |
||
623 |
^ aPackageID asString copy replaceAny:':/' with:$\ |
|
624 |
||
625 |
" |
|
9850 | 626 |
self topRelativePathToPackage_win32:'stx:goodies/xml' |
627 |
self topRelativePathToPackage_win32:'bosch:dapasx/kernel' |
|
9559 | 628 |
" |
9536 | 629 |
|
9850 | 630 |
"Created: / 14-09-2006 / 13:20:12 / cg" |
9852 | 631 |
! |
632 |
||
9880 | 633 |
unixPathToPackage:toPackageID from:fromPackageID |
634 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
635 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
636 |
|parts1 parts2 common up down rel| |
9880 | 637 |
|
638 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
639 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
640 |
common := parts1 commonPrefixWith:parts2. |
|
641 |
common notEmpty ifTrue:[ |
|
642 |
up := ((1 to:parts1 size - common size) collect:[:p | '../']) asStringWith:''. |
|
643 |
down := (parts2 copyFrom:common size+1) asStringWith:'/'. |
|
644 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
|
645 |
^ up , down |
|
646 |
]. |
|
647 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
648 |
rel := (self topRelativePathToPackage_unix:toPackageID). |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
649 |
(rel startsWith:'stx/') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
650 |
^ '$(TOP)', (rel copyFrom:'stx/' size) |
9880 | 651 |
]. |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
652 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
653 |
^ '$(TOP)/../', rel. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
654 |
|
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
655 |
"/ pTop := self unixPathToTopFor:fromPackageID. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
656 |
"/ (pTop endsWith:'/stx') ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
657 |
"/ pTop := pTop copyButLast:'stx' size. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
658 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
659 |
"/ pTop isEmpty ifTrue:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
660 |
"/ pTop := '../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
661 |
"/ ] ifFalse:[ |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
662 |
"/ pTop := pTop, '/../'. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
663 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
664 |
"/ ]. |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
665 |
"/ ^ pTop, (self topRelativePathToPackage_unix:toPackageID) |
9880 | 666 |
|
667 |
" |
|
10713 | 668 |
self unixPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
669 |
self unixPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
|
670 |
self unixPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
9880 | 671 |
" |
672 |
||
673 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
674 |
! |
|
675 |
||
9852 | 676 |
unixPathToTopFor:aProjectID |
677 |
"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" |
|
678 |
||
679 |
|parts| |
|
680 |
||
681 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
682 |
||
683 |
aProjectID asPackageId module = 'stx' ifTrue:[ |
|
10872
2c1c439ddab3
Fix unix Make.proto generation
Stefan Vogel <sv@exept.de>
parents:
10869
diff
changeset
|
684 |
parts size == 1 ifTrue:[^ '']. |
9852 | 685 |
^ (((2 to:parts size-1) collect:[:p | '../']) asStringWith:'') , '..' |
686 |
]. |
|
687 |
||
688 |
^ ((parts collect:[:p | '../']) asStringWith:'') , 'stx' |
|
689 |
||
690 |
" |
|
691 |
self unixPathToTopFor: #'bosch' |
|
692 |
self unixPathToTopFor: #'bosch:dapasx' |
|
693 |
self unixPathToTopFor: #'bosch:dapasx/datenbasis' |
|
694 |
self unixPathToTopFor: #'stx' |
|
695 |
self unixPathToTopFor: #'stx:libview' |
|
696 |
self unixPathToTopFor: #'stx:goodies/foo' |
|
697 |
" |
|
698 |
||
699 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
9536 | 700 |
! ! |
701 |
||
9714 | 702 |
!ProjectDefinition class methodsFor:'class initialization'! |
703 |
||
704 |
initialize |
|
705 |
LibraryType := #'Library'. |
|
706 |
GUIApplicationType := #'GUI-Application'. |
|
707 |
NonGUIApplicationType := #'NonGUI-Application'. |
|
708 |
||
10121 | 709 |
" |
710 |
self initialize |
|
711 |
" |
|
712 |
||
713 |
"Modified: / 23-10-2006 / 16:40:58 / cg" |
|
714 |
! |
|
715 |
||
716 |
initializeAllProjectDefinitions |
|
717 |
"needs everything else (especially the compiler etc.) to be initialized. |
|
718 |
Therefore, its not invoked by #initialize, but instead explicitely, |
|
719 |
by Smalltalk" |
|
10119 | 720 |
|
10124 | 721 |
Smalltalk isStandAloneApp ifFalse:[ |
722 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
723 |
eachProjectDefinitionClass installAutoloadedClasses. |
|
724 |
]. |
|
10115 | 725 |
]. |
726 |
||
9714 | 727 |
" |
728 |
self initialize |
|
729 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
730 |
|
10121 | 731 |
"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
|
732 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
733 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
734 |
installAutoloadedClasses |
10114 | 735 |
(self classNamesForWhich:[:nm :attr | (attr includes:#autoload)]) |
736 |
do:[:className | |
|
11241
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
737 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
10114 | 738 |
(Smalltalk classNamed:className) isNil ifTrue:[ |
11241
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
739 |
Error handle:[:ex | |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
740 |
('ProjectDefinition [warning]: failed to install autoloaded: ',className) errorPrintCR |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
741 |
] do:[ |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
742 |
Smalltalk |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
743 |
installAutoloadedClassNamed:className |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
744 |
category:'* as yet unknown category *' |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
745 |
package:self package |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
746 |
revision:nil |
055b598f7c4d
catch error during install-as-autoloaded
Claus Gittinger <cg@exept.de>
parents:
11173
diff
changeset
|
747 |
]. |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
748 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
749 |
]. |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
750 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
751 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
752 |
stx_libbasic installAutoloadedClasses |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
753 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
754 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
755 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
10163 | 756 |
"Modified: / 08-11-2006 / 17:08:06 / cg" |
9714 | 757 |
! ! |
758 |
||
9998 | 759 |
!ProjectDefinition class methodsFor:'code generation'! |
760 |
||
11072 | 761 |
applicationIconFileName_code |
762 |
^ String streamContents:[:s | |
|
763 |
s nextPutLine:'applicationIconFileName'. |
|
764 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon); will be included in the rc-resource file"'. |
|
765 |
s cr; |
|
766 |
nextPutLine:' ^ nil'; |
|
767 |
nextPutLine:' "/ ^ self applicationName'. |
|
768 |
]. |
|
769 |
||
770 |
" |
|
771 |
self legalCopyright_code |
|
772 |
stx_libbasic3 legalCopyright_code |
|
773 |
" |
|
774 |
||
775 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
776 |
! |
|
777 |
||
10393 | 778 |
classNamesAndAttributes_codeFor:aSpecArray |
779 |
"generate method code returning all classes of the project from the given spec." |
|
780 |
||
781 |
^ String streamContents:[:s | |
|
782 |
s nextPutLine:'classNamesAndAttributes'. |
|
783 |
s nextPutLine:' ^ #('. |
|
784 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
|
785 |
||
786 |
(self classNamesAndAttributesFromSpecArray:aSpecArray) do:[:entry | |
|
787 |
s spaces:8. |
|
788 |
entry storeArrayElementOn:s. |
|
789 |
s cr. |
|
790 |
]. |
|
791 |
s nextPutLine:' )' |
|
792 |
]. |
|
793 |
||
794 |
" |
|
795 |
stx_libbasic3 classNamesAndAttributes_codeFor:(stx_libbasic3 classNamesAndAttributes) |
|
796 |
exept_expecco classNamesAndAttributes_codeFor:(exept_expecco classNamesAndAttributes) |
|
797 |
" |
|
798 |
||
799 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
800 |
"Created: / 19-02-2007 / 15:43:27 / cg" |
|
801 |
! |
|
802 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
803 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 804 |
"generate method code returning all classes of the project. |
805 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
806 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
807 |
if false, existing entries are preserved. |
10010 | 808 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
809 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
810 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 811 |
|
10393 | 812 |
|newSpec oldSpec ignored| |
813 |
||
814 |
oldSpec := self classNamesAndAttributesAsSpecArray. |
|
815 |
ignored := self ignoredClassNames asSet. |
|
816 |
newSpec := OrderedCollection new. |
|
817 |
||
818 |
ignoreOldEntries ifFalse:[ |
|
819 |
oldSpec do:[:oldEntry | |
|
820 |
|newEntry className cls| |
|
821 |
||
822 |
newEntry := oldEntry copy. |
|
823 |
className := newEntry first. |
|
824 |
||
825 |
(ignored includes:className) ifFalse:[ |
|
826 |
cls := Smalltalk classNamed:className. |
|
10405
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
827 |
ignoreOldDefinition ifTrue:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
828 |
(cls notNil and:[cls isLoaded not]) ifTrue:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
829 |
(newEntry includes:#autoload) ifFalse:[ |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
830 |
newEntry := newEntry copyWith:#autoload. |
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
831 |
]. |
10188
660aa980d6ae
care for autoload attribute
Claus Gittinger <cg@exept.de>
parents:
10187
diff
changeset
|
832 |
]. |
660aa980d6ae
care for autoload attribute
Claus Gittinger <cg@exept.de>
parents:
10187
diff
changeset
|
833 |
]. |
10393 | 834 |
newSpec add:newEntry. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
835 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
836 |
]. |
10393 | 837 |
]. |
838 |
||
839 |
self searchForClasses do:[:eachClass | |
|
840 |
|className attributes oldSpecEntry oldAttributes newEntry| |
|
841 |
||
842 |
className := eachClass name. |
|
843 |
(ignored includes:className) ifFalse:[ |
|
844 |
oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil. |
|
845 |
||
846 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
|
847 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
|
848 |
(self additionalClassNamesAndAttributes includes:className) ifFalse:[ |
|
849 |
(oldSpecEntry size > 1) ifTrue:[ |
|
850 |
oldAttributes := oldSpecEntry copyFrom:2. |
|
851 |
]. |
|
852 |
||
853 |
ignoreOldDefinition ifTrue:[ |
|
854 |
"take autoload attribute from classes state in the image" |
|
855 |
oldAttributes notNil ifTrue:[ |
|
856 |
attributes := oldAttributes copyWithout:#autoload. |
|
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
857 |
] ifFalse:[ |
10393 | 858 |
attributes := #() |
859 |
]. |
|
860 |
eachClass isLoaded ifFalse:[ |
|
861 |
attributes := attributes copyWith:#autoload. |
|
10074
7f5870c6a152
care to not list a class in both additionalClassNamesAndAttributes
Claus Gittinger <cg@exept.de>
parents:
10073
diff
changeset
|
862 |
]. |
10393 | 863 |
] ifFalse:[ |
864 |
"keep any existing attribute" |
|
865 |
oldAttributes notNil ifTrue:[ |
|
866 |
attributes := oldAttributes. |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
867 |
] ifFalse:[ |
10393 | 868 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
869 |
]. |
10393 | 870 |
]. |
871 |
||
872 |
newEntry := Array with:className. |
|
873 |
attributes notEmptyOrNil ifTrue:[ |
|
874 |
newEntry := newEntry , attributes. |
|
875 |
]. |
|
876 |
newSpec add:newEntry |
|
877 |
] |
|
878 |
] |
|
879 |
] |
|
880 |
] |
|
9998 | 881 |
]. |
10393 | 882 |
^ self classNamesAndAttributes_codeFor:newSpec |
883 |
||
884 |
" |
|
885 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
886 |
exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
887 |
" |
|
9998 | 888 |
|
889 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
890 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
10405
1e4e2f0908e5
update vs. regenerate project definition
Claus Gittinger <cg@exept.de>
parents:
10404
diff
changeset
|
891 |
"Modified: / 22-02-2007 / 15:06:37 / cg" |
9998 | 892 |
! |
893 |
||
894 |
companyName_code |
|
895 |
^ String streamContents:[:s | |
|
896 |
s nextPutLine:'companyName'. |
|
897 |
s nextPutLine:' "Return a companyname which will appear in <lib>.rc"'. |
|
898 |
s cr; nextPutLine:' ^ ',self companyName storeString. |
|
899 |
]. |
|
900 |
||
901 |
" |
|
902 |
self companyName_code |
|
903 |
stx_libbasic3 companyName_code |
|
904 |
" |
|
905 |
||
906 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
907 |
! |
|
908 |
||
909 |
compileDescriptionMethods |
|
910 |
(self isLibraryDefinition |
|
911 |
or:[ self isApplicationDefinition ] ) ifFalse:[ |
|
912 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
|
913 |
]. |
|
914 |
||
915 |
self |
|
916 |
forEachMethodsCodeToCompileDo:[:code :category | |
|
917 |
self compile:code categorized:category |
|
918 |
]. |
|
919 |
||
920 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
921 |
||
922 |
" |
|
923 |
DapasXProject compileDescriptionMethods |
|
924 |
DapasX_Datenbasis compileDescriptionMethods |
|
925 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
926 |
stx_libbasic compileDescriptionMethods |
|
927 |
" |
|
928 |
||
929 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
930 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
931 |
! |
|
932 |
||
933 |
description_code |
|
934 |
^ String streamContents:[:s | |
|
935 |
s nextPutLine:'description'. |
|
10306 | 936 |
s nextPutLine:' "Return a description string which will appear in vc.def / bc.def"'. |
9998 | 937 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
938 |
]. |
|
939 |
||
940 |
" |
|
941 |
self description_code |
|
942 |
stx_libbasic3 description_code |
|
943 |
" |
|
944 |
||
945 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
946 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
947 |
! |
|
948 |
||
10923 | 949 |
effectivePreRequisites |
950 |
"get the preRequisites, that are not excluded" |
|
951 |
||
952 |
|preRequisites| |
|
953 |
||
954 |
preRequisites := self preRequisites asSet. |
|
955 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
|
956 |
preRequisites remove:self package ifAbsent:[]. |
|
957 |
||
958 |
^ preRequisites |
|
959 |
! |
|
960 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
961 |
effectiveSubProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
962 |
"get the subProjects, that are not excluded" |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
963 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
964 |
|subProjects| |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
965 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
966 |
subProjects := self subProjects asSet. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
967 |
subProjects removeAllFoundIn:self excludedFromSubProjects. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
968 |
subProjects remove:self package ifAbsent:[]. |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
969 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
970 |
^ subProjects |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
971 |
! |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
972 |
|
9998 | 973 |
extensionMethodNames_code |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
974 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
975 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
976 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
977 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
978 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
979 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
980 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
981 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
982 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
983 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
984 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 985 |
^ String streamContents:[:s | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
986 |
|oldSpec| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
987 |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
988 |
s nextPutLine:'extensionMethodNames'. |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
989 |
s nextPutLine:' ^ #('. |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
990 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
991 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
992 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
993 |
ignoreOldEntries ifFalse:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
994 |
oldSpec do:[:entry | |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
995 |
|mclassName mselector| |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
996 |
|
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
997 |
mclassName := entry key asSymbol. |
10869 | 998 |
(mclassName endsWith:' class') ifTrue:[ |
999 |
mclassName := mclassName asString. |
|
1000 |
]. |
|
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1001 |
mselector := entry value asSymbol. |
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1002 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1003 |
s spaces:8. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1004 |
mclassName storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1005 |
s space. |
10067
77697f0abbe6
exclude extensionmethods from OTHER packages
Claus Gittinger <cg@exept.de>
parents:
10064
diff
changeset
|
1006 |
mselector storeArrayElementOn:s. |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1007 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1008 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1009 |
]. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1010 |
|
10011 | 1011 |
self searchForExtensions do:[:eachMethod | |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1012 |
|attributes oldSpecEntry mclassName mselector| |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1013 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1014 |
mclassName := eachMethod mclass name. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1015 |
mselector := eachMethod selector. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1016 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1017 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1018 |
s spaces:8. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1019 |
mclassName storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1020 |
s space. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1021 |
mselector storeArrayElementOn:s. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1022 |
s cr. |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1023 |
] |
9998 | 1024 |
]. |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1025 |
|
9998 | 1026 |
s nextPutLine:' )' |
1027 |
]. |
|
1028 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1029 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1030 |
self extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1031 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:false |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1032 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1033 |
" |
9998 | 1034 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1035 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1036 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
9998 | 1037 |
! |
1038 |
||
1039 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
1040 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1041 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
9998 | 1042 |
value:'description - contents'. |
1043 |
||
1044 |
aTwoArgBlock |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1045 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
9998 | 1046 |
value: 'description - contents'. |
1047 |
||
1048 |
aTwoArgBlock |
|
1049 |
value: self preRequisites_code |
|
1050 |
value: 'description'. |
|
1051 |
||
1052 |
"Created: / 15-09-2006 / 16:47:54 / cg" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1053 |
"Modified: / 10-10-2006 / 22:01:28 / cg" |
9998 | 1054 |
! |
1055 |
||
1056 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
|
1057 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
|
1058 |
! |
|
1059 |
||
1060 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1061 |
self |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1062 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1063 |
ignoreOldDefinition:ignoreOldDefinition. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1064 |
|
9998 | 1065 |
(self class implements:#description) ifFalse:[ |
1066 |
aTwoArgBlock |
|
1067 |
value: self description_code |
|
1068 |
value: 'description - project information'. |
|
1069 |
]. |
|
1070 |
(self class implements:#productName) ifFalse:[ |
|
1071 |
aTwoArgBlock |
|
1072 |
value: self productName_code |
|
1073 |
value: 'description - project information'. |
|
1074 |
]. |
|
1075 |
(self class implements:#companyName) ifFalse:[ |
|
1076 |
aTwoArgBlock |
|
1077 |
value: self companyName_code |
|
1078 |
value: 'description - project information'. |
|
1079 |
]. |
|
1080 |
(self class implements:#legalCopyright) ifFalse:[ |
|
1081 |
aTwoArgBlock |
|
1082 |
value: self legalCopyright_code |
|
1083 |
value: 'description - project information'. |
|
1084 |
]. |
|
11072 | 1085 |
(self class implements:#applicationIconFileName) ifFalse:[ |
1086 |
aTwoArgBlock |
|
1087 |
value: self applicationIconFileName_code |
|
1088 |
value: 'description - project information'. |
|
1089 |
]. |
|
9998 | 1090 |
|
1091 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1092 |
"Modified: / 10-10-2006 / 22:02:24 / cg" |
9998 | 1093 |
! |
1094 |
||
1095 |
legalCopyright_code |
|
1096 |
^ String streamContents:[:s | |
|
1097 |
s nextPutLine:'legalCopyright'. |
|
1098 |
s nextPutLine:' "Return a copyright string which will appear in <lib>.rc"'. |
|
10306 | 1099 |
s cr; nextPutLine:' ^ ', self legalCopyright storeString. |
9998 | 1100 |
]. |
1101 |
||
1102 |
" |
|
1103 |
self legalCopyright_code |
|
1104 |
stx_libbasic3 legalCopyright_code |
|
1105 |
" |
|
1106 |
||
1107 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1108 |
! |
|
1109 |
||
1110 |
preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1111 |
"generate the code of the #preRequisites method" |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1112 |
|
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1113 |
|preRequisites searchedPreRequisites importantReason| |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1114 |
|
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1115 |
"maybe, some prerequisites have been added manually - keep them |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1116 |
The drawback of this - a preRequisite will never go away, even if it is no longer used" |
9998 | 1117 |
|
1118 |
preRequisites := self preRequisites asSet. |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1119 |
|
10179 | 1120 |
searchedPreRequisites := self searchForPreRequisites. |
1121 |
preRequisites addAll: (searchedPreRequisites keys). |
|
9998 | 1122 |
|
1123 |
self isApplicationDefinition ifTrue:[ |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1124 |
preRequisites add:#'stx:libcomp'. |
9998 | 1125 |
self isGUIApplication ifTrue:[ |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1126 |
preRequisites add:#'stx:libbasic2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1127 |
preRequisites add:#'stx:libview'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1128 |
preRequisites add:#'stx:libview2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1129 |
preRequisites add:#'stx:libwidg'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1130 |
preRequisites add:#'stx:libwidg2'. |
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1131 |
preRequisites add:#'stx:libui'. |
9998 | 1132 |
]. |
1133 |
]. |
|
1134 |
||
10897
6a20c3e54653
#removeAllFoundIn: excludedFromPrerequisites
Stefan Vogel <sv@exept.de>
parents:
10875
diff
changeset
|
1135 |
preRequisites removeAllFoundIn:self excludedFromPreRequisites. |
10034 | 1136 |
preRequisites remove:self package ifAbsent:[]. |
9998 | 1137 |
|
1138 |
^ String streamContents:[:s | |
|
1139 |
s nextPutLine:'preRequisites'. |
|
1140 |
s nextPutLine:' ^ #('. |
|
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1141 |
preRequisites asSortedCollection do:[:eachPackageID | |
10179 | 1142 |
|reason| |
1143 |
||
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1144 |
s spaces:8. |
11362
6ad1683f52d5
Use symbols for package ids in generated #preRequisites
Stefan Vogel <sv@exept.de>
parents:
11241
diff
changeset
|
1145 |
eachPackageID asSymbol storeOn:s. |
10179 | 1146 |
reason := searchedPreRequisites at:eachPackageID ifAbsent:nil. |
1147 |
reason notEmptyOrNil ifTrue:[ |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1148 |
"superclasses are really important" |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1149 |
importantReason := reason detect:[:eachReasonString| |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1150 |
eachReasonString includesString:' superclass ' |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1151 |
] ifNone:[reason anElement]. |
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1152 |
s nextPutAll:' "'; nextPutAll:importantReason; nextPutAll:' "'. |
10179 | 1153 |
]. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1154 |
s cr. |
9998 | 1155 |
]. |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1156 |
s nextPutLine:' )' |
9998 | 1157 |
]. |
1158 |
||
1159 |
" |
|
1160 |
bosch_dapasx_application preRequisites_code |
|
1161 |
demo_demoApp1 preRequisites_code |
|
10574
b77b673bc36c
Better reason comments in #preRequisites packages
Stefan Vogel <sv@exept.de>
parents:
10570
diff
changeset
|
1162 |
stx_libbasic3 preRequisites_code |
10013
c6cd8f035693
pretty format of generated methods
Stefan Vogel <sv@exept.de>
parents:
10011
diff
changeset
|
1163 |
stx_libtool2 preRequisites_code |
9998 | 1164 |
" |
1165 |
||
1166 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1167 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
10063 | 1168 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
9998 | 1169 |
! |
1170 |
||
1171 |
productName_code |
|
1172 |
^ String streamContents:[:s | |
|
1173 |
s nextPutLine:'productName'. |
|
1174 |
s nextPutLine:' "Return a product name which will appear in <lib>.rc"'. |
|
1175 |
s cr; nextPutLine:' ^ ',self productName storeString. |
|
1176 |
]. |
|
1177 |
||
1178 |
" |
|
1179 |
self productName_code |
|
1180 |
stx_libbasic3 productName_code |
|
1181 |
" |
|
1182 |
||
1183 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
1184 |
! ! |
|
1185 |
||
9569 | 1186 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 1187 |
|
9664 | 1188 |
applicationTypes |
9714 | 1189 |
GUIApplicationType isNil ifTrue:[self initialize]. |
1190 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 1191 |
|
9714 | 1192 |
" |
1193 |
self applicationTypes |
|
1194 |
" |
|
9664 | 1195 |
! |
1196 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1197 |
defaultCategory |
10466 | 1198 |
^'* Projects & Packages *' |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1199 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1200 |
"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
|
1201 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
1202 |
|
9714 | 1203 |
defaultProjectType |
9745 | 1204 |
^ self libraryTypes first |
1205 |
"/ ^ self applicationTypes first |
|
9714 | 1206 |
|
1207 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
1208 |
! |
|
1209 |
||
1210 |
defaultProjectTypeForGUIApplication |
|
1211 |
^ GUIApplicationType |
|
1212 |
! |
|
1213 |
||
1214 |
defaultProjectTypeForNonGUIApplication |
|
1215 |
^ NonGUIApplicationType |
|
1216 |
! |
|
9664 | 1217 |
|
9714 | 1218 |
guiApplicationType |
1219 |
^ GUIApplicationType |
|
1220 |
! |
|
1221 |
||
1222 |
libraryType |
|
1223 |
^ LibraryType |
|
1224 |
! |
|
1225 |
||
1226 |
libraryTypes |
|
1227 |
LibraryType isNil ifTrue:[self initialize]. |
|
1228 |
^ Array with:LibraryType |
|
1229 |
||
1230 |
" |
|
1231 |
self libraryTypes |
|
1232 |
" |
|
1233 |
! |
|
1234 |
||
1235 |
nonGuiApplicationType |
|
1236 |
^ NonGUIApplicationType |
|
9664 | 1237 |
! |
1238 |
||
1239 |
projectTypes |
|
1240 |
^ self libraryTypes , self applicationTypes |
|
1241 |
||
1242 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
9536 | 1243 |
! ! |
1244 |
||
9569 | 1245 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 1246 |
|
9983 | 1247 |
excludedFromPreRequisites |
1248 |
"list packages which are to be explicitely excluded from the automatic constructed |
|
1249 |
prerequisites list. If empty, everything that is found along the inheritance of any of |
|
1250 |
my classes is considered to be a prerequisite package." |
|
1251 |
||
1252 |
^ #() |
|
1253 |
||
1254 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
1255 |
! |
|
1256 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1257 |
excludedFromSubProjects |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1258 |
"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
|
1259 |
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
|
1260 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1261 |
^ #() |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1262 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
1263 |
"Modified: / 17-08-2006 / 19:49:40 / cg" |
10039 | 1264 |
! |
1265 |
||
9575 | 1266 |
postLoadAction |
1267 |
"invoked after loading a project" |
|
1268 |
||
1269 |
"/ intentionally left blank |
|
1270 |
||
1271 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1272 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
1273 |
! |
|
1274 |
||
1275 |
preRequisites |
|
1276 |
"list packages which are required as a prerequisite. This method is generated automatically, |
|
1277 |
by searching along the inheritance chain of all of my classes. |
|
1278 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1279 |
in excludedFromPreRequisites." |
|
1280 |
||
1281 |
^ #() |
|
1282 |
||
1283 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
1284 |
! |
|
1285 |
||
1286 |
preUnloadAction |
|
1287 |
"invoked before unloading a project" |
|
1288 |
||
1289 |
"/ intentionally left blank |
|
1290 |
||
1291 |
"Created: / 08-08-2006 / 11:07:40 / fm" |
|
1292 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
1293 |
! |
|
1294 |
||
9685 | 1295 |
siblingsAreSubProjects |
1296 |
^ false |
|
1297 |
! |
|
1298 |
||
11377 | 1299 |
splashFileName |
1300 |
"answer the base-name of the splash bitmap. |
|
1301 |
||
1302 |
Default is nil, for no splash. If non-nil, it must be a bmp file's name" |
|
1303 |
||
1304 |
^ nil. |
|
1305 |
! |
|
1306 |
||
9575 | 1307 |
subProjects |
1308 |
"list packages which are known as subprojects. This method is generated automatically. |
|
1309 |
However, when generating automatically, packages are only added - never removed, unless listed |
|
1310 |
in excludedFromSubProjects." |
|
1311 |
||
1312 |
^ #() |
|
1313 |
||
1314 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
1315 |
! ! |
|
1316 |
||
1317 |
!ProjectDefinition class methodsFor:'description - classes'! |
|
1318 |
||
9621 | 1319 |
additionalClassNamesAndAttributes |
1320 |
^ #() |
|
1321 |
||
1322 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
1323 |
! |
|
1324 |
||
9607 | 1325 |
allClassNames |
1326 |
^ self classNamesForWhich:[:nm :attr | true ]. |
|
1327 |
! |
|
9536 | 1328 |
|
10691 | 1329 |
autoloaded_classNames |
1330 |
^ self classNamesForWhich:[:nm :attr | attr notEmptyOrNil and:[attr includes:#autoload]]. |
|
1331 |
||
1332 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1333 |
"Created: / 30-08-2007 / 18:48:09 / cg" |
|
1334 |
! |
|
1335 |
||
9607 | 1336 |
classNames |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
1337 |
"answer an array containing all the class names of the project's classes. |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
1338 |
A correponding method with real names is generated in my subclasses" |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
1339 |
|
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
1340 |
^ self subclassResponsibility. |
9536 | 1341 |
! |
1342 |
||
9607 | 1343 |
classNamesAndAttributes |
9575 | 1344 |
"a correponding method with real names is generated in my subclasses" |
1345 |
||
9595 | 1346 |
^ #() |
9536 | 1347 |
|
9575 | 1348 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
1349 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1350 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
1351 |
! |
|
1352 |
||
10393 | 1353 |
classNamesAndAttributesAsSpecArray |
1354 |
"given a classNamesAndAttributes array, make this a spec array (array of arrays). |
|
1355 |
This decompresses class-name entries into a one-element array for easier processing" |
|
1356 |
||
1357 |
^ self classNamesAndAttributes |
|
1358 |
collect:[:entry | |
|
1359 |
entry isArray ifTrue:[ |
|
1360 |
entry first isSymbol ifTrue:[ |
|
1361 |
entry |
|
1362 |
] ifFalse:[ |
|
1363 |
(Array with:entry first asSymbol) , (entry copyFrom:2) |
|
1364 |
]. |
|
1365 |
] ifFalse:[ |
|
1366 |
Array with:entry asSymbol. |
|
1367 |
]]. |
|
1368 |
||
1369 |
"Created: / 19-02-2007 / 16:11:53 / cg" |
|
1370 |
! |
|
1371 |
||
1372 |
classNamesAndAttributesFromSpecArray:aSpecArray |
|
1373 |
"given a spec array (array of arrays), make this a classNamesAndAttributes array |
|
1374 |
as stored literally in the method. |
|
1375 |
This compresses single element array-elements into plain names |
|
1376 |
(to save code in the compiled binaries)" |
|
1377 |
||
1378 |
^ aSpecArray |
|
1379 |
collect:[:entry | |
|
1380 |
(entry isArray and:[entry size == 1]) ifTrue:[ |
|
1381 |
entry first |
|
1382 |
] ifFalse:[ |
|
1383 |
entry |
|
1384 |
]]. |
|
1385 |
||
1386 |
"Created: / 19-02-2007 / 16:12:32 / cg" |
|
1387 |
! |
|
1388 |
||
9607 | 1389 |
classNamesForWhich:aBlock |
1390 |
"a correponding method with real names is generated in my subclasses" |
|
1391 |
||
1392 |
|coll| |
|
1393 |
||
1394 |
coll := OrderedCollection new. |
|
1395 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
1396 |
(aBlock value:nm value:attributes) ifTrue:[ |
|
1397 |
coll add:nm. |
|
1398 |
]. |
|
1399 |
]. |
|
1400 |
^ coll |
|
1401 |
||
1402 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1403 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
1404 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
1405 |
! |
|
1406 |
||
1407 |
compiled_classNames |
|
9615 | 1408 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
9607 | 1409 |
|
1410 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1411 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
9615 | 1412 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
9607 | 1413 |
! |
1414 |
||
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1415 |
compiled_classNamesForPlatform |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1416 |
"answer the classes to be compiled only for the current platformName" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1417 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1418 |
^ self compiled_classNamesForPlatform:OperatingSystem platformName |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1419 |
! |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
1420 |
|
10005 | 1421 |
compiled_classNamesForPlatform:platformName |
1422 |
"answer the classes to be compiled only for platformName |
|
1423 |
platformName is one of #unix, #win32 (OperatingSystem platformName)" |
|
1424 |
||
9607 | 1425 |
^ self |
10005 | 1426 |
classNamesForWhich:[:nm :attr | |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
1427 |
(attr includes:#autoload) not and:[attr includes:platformName] |
9607 | 1428 |
]. |
1429 |
||
1430 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
1431 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
10058
290deec5f493
fixed: platform-specific classes which also have the autoload flag
Claus Gittinger <cg@exept.de>
parents:
10047
diff
changeset
|
1432 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
9607 | 1433 |
! |
1434 |
||
10005 | 1435 |
compiled_classNames_common |
1436 |
"classes to be compiled for any platform" |
|
9607 | 1437 |
|
1438 |
^ self |
|
1439 |
classNamesForWhich:[:nm :attr | |
|
1440 |
attr isEmptyOrNil |
|
1441 |
]. |
|
1442 |
||
1443 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
1444 |
! |
|
1445 |
||
10005 | 1446 |
compiled_classNames_unix |
9584 | 1447 |
"class, only to be compiled under unix" |
10005 | 1448 |
|
1449 |
^ self compiled_classNamesForPlatform:#unix. |
|
9584 | 1450 |
|
1451 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
1452 |
! |
|
1453 |
||
10005 | 1454 |
compiled_classNames_windows |
9584 | 1455 |
"class, only to be compiled under windows" |
10005 | 1456 |
|
1457 |
^ self compiled_classNamesForPlatform:#win32. |
|
9584 | 1458 |
|
1459 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
1460 |
! |
|
1461 |
||
9575 | 1462 |
extensionMethodNames |
1463 |
"list class/selector pairs of extensions. |
|
1464 |
A correponding method with real names is generated in my subclasses" |
|
1465 |
||
9595 | 1466 |
^ #() |
9575 | 1467 |
|
1468 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
10350
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1469 |
! |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1470 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1471 |
ignoredClassNames |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1472 |
"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
|
1473 |
generated classNamesAndAttributes spec" |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1474 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1475 |
^ #() |
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1476 |
|
f70405894961
added optional ignoredClassNames method.
Claus Gittinger <cg@exept.de>
parents:
10331
diff
changeset
|
1477 |
"Created: / 23-01-2007 / 19:08:27 / cg" |
9575 | 1478 |
! ! |
1479 |
||
1480 |
!ProjectDefinition class methodsFor:'description - compilation'! |
|
9536 | 1481 |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1482 |
additionalBaseAddressDefinition_bc_dot_mak |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1483 |
"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
|
1484 |
Subclasses may redefine this to something like |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1485 |
LIB_BASE=$(LIBWIDG_BASE) |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1486 |
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
|
1487 |
" |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1488 |
|
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1489 |
^ nil |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1490 |
! |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
1491 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1492 |
additionalDefinitions |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1493 |
"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
|
1494 |
|
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1495 |
^ '' |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1496 |
! |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1497 |
|
10306 | 1498 |
additionalDefinitions_bc_dot_mak |
1499 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 1500 |
Subclasses may redefine this." |
10306 | 1501 |
|
1502 |
^ self additionalDefinitions_nt_dot_mak |
|
1503 |
||
1504 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1505 |
! |
|
1506 |
||
9625 | 1507 |
additionalDefinitions_make_dot_proto |
1508 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
1509 |
||
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1510 |
^ self additionalDefinitions |
9625 | 1511 |
|
1512 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
1513 |
! |
|
1514 |
||
1515 |
additionalDefinitions_nt_dot_mak |
|
10306 | 1516 |
"obsolete - kept for compatibility with old project files" |
9625 | 1517 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
1518 |
^ self additionalDefinitions |
9625 | 1519 |
|
1520 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1521 |
! |
|
1522 |
||
10306 | 1523 |
additionalLinkLibraries_bc_dot_mak |
1524 |
"allows for additional static libraries to be added to the bc.mak file. |
|
1525 |
Subclasses may redefine this" |
|
1526 |
||
1527 |
"backward compatibilty with old projects" |
|
1528 |
||
1529 |
^ self additionalLinkLibraries_nt_dot_mak |
|
1530 |
||
1531 |
||
1532 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1533 |
! |
|
1534 |
||
9733 | 1535 |
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
|
1536 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 1537 |
|
1538 |
^ '' |
|
1539 |
||
1540 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1541 |
! |
|
1542 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1543 |
additionalLinkLibraries_nt_dot_mak |
10306 | 1544 |
"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
|
1545 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1546 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1547 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1548 |
"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
|
1549 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1550 |
|
10306 | 1551 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1552 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1553 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1554 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1555 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1556 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 1557 |
! |
1558 |
||
9625 | 1559 |
additionalRules_make_dot_proto |
1560 |
"allows for additional rules to be added to the make.proto file." |
|
1561 |
||
1562 |
^ '' |
|
1563 |
||
1564 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
1565 |
! |
|
1566 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1567 |
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
|
1568 |
"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
|
1569 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1570 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1571 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1572 |
|
10306 | 1573 |
additionalTargets_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1574 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1575 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1576 |
^ '' |
10306 | 1577 |
|
1578 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
1579 |
! |
|
1580 |
||
9625 | 1581 |
additionalTargets_make_dot_proto |
1582 |
"allows for additional targets to be added to the make.proto file." |
|
1583 |
||
1584 |
^ '' |
|
1585 |
||
1586 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1587 |
! |
|
1588 |
||
10979 | 1589 |
globalDefines |
1590 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1591 |
an subprojects" |
|
1592 |
||
1593 |
^ '' |
|
1594 |
! |
|
1595 |
||
1596 |
globalDefines_unix |
|
1597 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1598 |
an subprojects" |
|
1599 |
||
1600 |
^ self globalDefines |
|
1601 |
! |
|
1602 |
||
1603 |
globalDefines_win32 |
|
1604 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1605 |
an subprojects" |
|
1606 |
||
1607 |
^ self globalDefines |
|
1608 |
! |
|
1609 |
||
10331 | 1610 |
localDefines |
10979 | 1611 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1612 |
|
1613 |
^ '' |
|
1614 |
! |
|
1615 |
||
1616 |
localDefines_unix |
|
10979 | 1617 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1618 |
|
1619 |
^ self localDefines |
|
1620 |
! |
|
1621 |
||
1622 |
localDefines_win32 |
|
10979 | 1623 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1624 |
|
1625 |
^ self localDefines |
|
1626 |
! |
|
1627 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1628 |
localIncludes |
10979 | 1629 |
"allow for the specification of additional include directories" |
9714 | 1630 |
|
1631 |
^ '' |
|
1632 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1633 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1634 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1635 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1636 |
localIncludes_unix |
10979 | 1637 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1638 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1639 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1640 |
|
9714 | 1641 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1642 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 1643 |
! |
1644 |
||
1645 |
localIncludes_win32 |
|
10979 | 1646 |
"allow for the specification of additional include directories" |
9714 | 1647 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1648 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 1649 |
|
1650 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1651 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 1652 |
! |
1653 |
||
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
|
1654 |
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
|
1655 |
"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
|
1656 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1657 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1658 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1659 |
"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
|
1660 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1661 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1662 |
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
|
1663 |
"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
|
1664 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1665 |
^ 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
|
1666 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1667 |
"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
|
1668 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1669 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1670 |
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
|
1671 |
"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
|
1672 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1673 |
^ 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
|
1674 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1675 |
"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
|
1676 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1677 |
|
9575 | 1678 |
stcOptimizationOptions |
1679 |
"see the stc reference / stc usage for options. |
|
1680 |
For now, the following variants are useful: |
|
1681 |
+optspace3 most compact code |
|
1682 |
- use for all gui, application code. |
|
1683 |
||
9714 | 1684 |
+optinline +optinline2 +inlineNew |
1685 |
fastest code |
|
9575 | 1686 |
- use only for computation-intensive classes" |
1687 |
||
1688 |
^ '+optspace3' |
|
1689 |
||
1690 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 1691 |
! |
1692 |
||
9575 | 1693 |
stcWarningOptions |
1694 |
"see the stc reference / stc usage for options. |
|
1695 |
For now, the following variants are useful: |
|
1696 |
-warn no warnings |
|
1697 |
-warnNonStandard no warnings about non-standard smalltalk features" |
|
1698 |
||
9714 | 1699 |
^ '-warnNonStandard' |
9575 | 1700 |
|
1701 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
1702 |
! ! |
|
9536 | 1703 |
|
9575 | 1704 |
!ProjectDefinition class methodsFor:'description - project information'! |
1705 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1706 |
applicationAdditionalIconFileNames |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1707 |
"Return the icon-filenames for additional icons of the application |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1708 |
(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
|
1709 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1710 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1711 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1712 |
|
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1713 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1714 |
"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
|
1715 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1716 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1717 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1718 |
|
9575 | 1719 |
companyName |
9584 | 1720 |
"Returns a company string which will appear in <lib>.rc. |
1721 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1722 |
|
11172 | 1723 |
( |
1724 |
#( |
|
1725 |
'stx' |
|
1726 |
'exept' |
|
1727 |
) includes:self module) ifTrue:[ |
|
9575 | 1728 |
^ 'eXept Software AG' |
1729 |
]. |
|
1730 |
||
1731 |
^ 'My Company' |
|
1732 |
||
9584 | 1733 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 1734 |
! |
1735 |
||
1736 |
description |
|
10306 | 1737 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 1738 |
|
9803 | 1739 |
^self productName,' ',self packageName |
1740 |
"/ ^ self name |
|
9536 | 1741 |
|
1742 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 1743 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
1744 |
! |
|
1745 |
||
1746 |
fileDescription |
|
10416 | 1747 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 1748 |
|
9803 | 1749 |
^self description |
9575 | 1750 |
|
1751 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
1752 |
! |
|
1753 |
||
1754 |
fileMajorVersionNr |
|
1755 |
"Returns a versionNumber which will appear in libName.rc" |
|
1756 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
1757 |
^ self majorVersionNr |
9575 | 1758 |
|
1759 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 1760 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 1761 |
! |
1762 |
||
1763 |
fileMinorVersionNr |
|
1764 |
"Returns a versionNumber which will appear in libName.rc" |
|
1765 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
1766 |
^ self minorVersionNr |
9575 | 1767 |
|
1768 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 1769 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 1770 |
! |
1771 |
||
1772 |
fileReleaseNr |
|
1773 |
"Returns a releaseNumber which will appear in libName.rc" |
|
1774 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
1775 |
"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
|
1776 |
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
|
1777 |
|
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
1778 |
^ self cvsRevision last upTo:$m |
9575 | 1779 |
|
1780 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
|
9817 | 1781 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
9536 | 1782 |
! |
1783 |
||
9575 | 1784 |
fileRevisionNr |
1785 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 1786 |
|
9817 | 1787 |
"take the default revision from the cvs-version" |
9618 | 1788 |
^ self cvsRevision first |
9575 | 1789 |
|
1790 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
|
9817 | 1791 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
9536 | 1792 |
! |
1793 |
||
9575 | 1794 |
fileVersion |
1795 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1796 |
||
1797 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
1798 |
||
11042 | 1799 |
^ '%1.%2.%3.%4' |
1800 |
bindWith:self fileMajorVersionNr |
|
1801 |
with:self fileMinorVersionNr |
|
1802 |
with:self fileRevisionNr |
|
1803 |
with:self fileReleaseNr. |
|
9575 | 1804 |
|
1805 |
" |
|
1806 |
self fileVersion |
|
1807 |
" |
|
1808 |
||
9817 | 1809 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 1810 |
! |
9536 | 1811 |
|
9575 | 1812 |
fileVersionCommaSeparated |
1813 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1814 |
||
9817 | 1815 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
1816 |
||
11042 | 1817 |
^ '%1,%2,%3,%4' |
1818 |
bindWith:self fileMajorVersionNr |
|
1819 |
with:self fileMinorVersionNr |
|
1820 |
with:self fileRevisionNr |
|
1821 |
with:self fileReleaseNr. |
|
9575 | 1822 |
|
1823 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 1824 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
1825 |
! |
|
1826 |
||
9575 | 1827 |
internalName |
1828 |
"Returns a name string which will appear in libName.rc" |
|
1829 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
1830 |
^ self package |
9575 | 1831 |
|
1832 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 1833 |
! |
1834 |
||
9575 | 1835 |
legalCopyright |
9584 | 1836 |
"Returns a copyright string which will appear in <lib>.rc. |
1837 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1838 |
|
1839 |
self module = 'stx' ifTrue:[ |
|
9817 | 1840 |
"hardwired-default" |
9625 | 1841 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
1842 |
bindWith:(Date today year printString) |
|
9575 | 1843 |
]. |
9817 | 1844 |
self module = 'exept' ifTrue:[ |
1845 |
"hardwired-default" |
|
1846 |
^ 'Copyright eXept Software AG 1998-%1' |
|
1847 |
bindWith:(Date today year printString) |
|
1848 |
]. |
|
9575 | 1849 |
|
1850 |
^ 'My CopyRight or CopyLeft' |
|
1851 |
||
9817 | 1852 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 1853 |
! |
1854 |
||
1855 |
majorVersionNr |
|
1856 |
"Returns a versionNumber which will appear in libName.rc" |
|
1857 |
||
1858 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
1859 |
the default here takes smalltalks version number. |
|
1860 |
But thats probably not good for an end-user-app." |
|
1861 |
||
11042 | 1862 |
^ Smalltalk majorVersionNr |
9575 | 1863 |
|
1864 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 1865 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 1866 |
! |
1867 |
||
1868 |
minorVersionNr |
|
1869 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 1870 |
|
9575 | 1871 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
1872 |
the default here takes smalltalks version number. |
|
1873 |
But thats probably not good for an end-user-app." |
|
1874 |
||
11042 | 1875 |
^ Smalltalk minorVersionNr |
9575 | 1876 |
|
1877 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 1878 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 1879 |
! |
1880 |
||
1881 |
productDate |
|
11043 | 1882 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 1883 |
|
1884 |
"take the current date - by default" |
|
9536 | 1885 |
|
9575 | 1886 |
^ Timestamp now printStringRFC1123Format |
1887 |
||
1888 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
1889 |
! |
|
1890 |
||
10426 | 1891 |
productFilename |
1892 |
"Returns a filename which be used as linkname, product file name etc." |
|
1893 |
||
1894 |
^ self productNameAsValidFilename |
|
1895 |
||
1896 |
" |
|
1897 |
stx_projects_smalltalk productName |
|
1898 |
stx_projects_smalltalk productFilename |
|
1899 |
" |
|
1900 |
||
1901 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
1902 |
! |
|
1903 |
||
9898 | 1904 |
productInstallDir |
1905 |
"Returns a product default installDir which will appear in <app>.nsi." |
|
1906 |
||
1907 |
^ '$PROGRAMFILES\',self module |
|
1908 |
||
1909 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
1910 |
! |
|
1911 |
||
9575 | 1912 |
productName |
9584 | 1913 |
"Returns a product name which will appear in <lib>.rc. |
1914 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1915 |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1916 |
|m| |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1917 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1918 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1919 |
m = 'stx' ifTrue:[ |
9575 | 1920 |
^ 'Smalltalk/X' |
1921 |
]. |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1922 |
m = 'exept' ifTrue:[ |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1923 |
^ 'eXept addOns' |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1924 |
]. |
10296 | 1925 |
Error handle:[:ex | |
1926 |
^ 'ProductName' |
|
1927 |
] do:[ |
|
1928 |
^ self startupClassName |
|
1929 |
]. |
|
1930 |
||
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1931 |
"Modified: / 08-11-2007 / 16:45:14 / cg" |
9536 | 1932 |
! |
1933 |
||
10426 | 1934 |
productNameAsValidFilename |
1935 |
"Returns a product name which will appear in <lib>.rc. |
|
1936 |
Under win32, this is placed into the dlls file-info" |
|
1937 |
||
1938 |
|nm| |
|
1939 |
||
1940 |
nm := self productName. |
|
1941 |
^ nm copy replaceAny:'/\:;.,' with:$_ |
|
1942 |
||
1943 |
" |
|
1944 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
1945 |
" |
|
1946 |
||
1947 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
1948 |
! |
|
1949 |
||
9898 | 1950 |
productPublisher |
1951 |
"Returns a product publisher which will appear in <app>.nsi." |
|
1952 |
||
1953 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
1954 |
^ 'eXept Software AG' |
|
1955 |
]. |
|
1956 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
1957 |
^ self companyName |
9898 | 1958 |
|
1959 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
1960 |
! |
|
1961 |
||
9575 | 1962 |
productVersion |
11043 | 1963 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 1964 |
|
1965 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 1966 |
|
11042 | 1967 |
^ '%1.%2.%3.%4' |
1968 |
bindWith:self majorVersionNr |
|
1969 |
with:self minorVersionNr |
|
1970 |
with:self revisionNr |
|
1971 |
with:self releaseNr. |
|
9536 | 1972 |
|
9575 | 1973 |
" |
1974 |
self productVersion |
|
1975 |
" |
|
1976 |
||
9817 | 1977 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 1978 |
! |
1979 |
||
9575 | 1980 |
productVersionCommaSeparated |
1981 |
"Returns a product version which will appear in libName.rc" |
|
1982 |
||
1983 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 1984 |
|
11042 | 1985 |
^ '%1,%2,%3,%4' |
1986 |
bindWith:self majorVersionNr |
|
1987 |
with:self minorVersionNr |
|
1988 |
with:self revisionNr |
|
1989 |
with:self releaseNr. |
|
1990 |
||
1991 |
" |
|
1992 |
self productVersionCommaSeparated |
|
1993 |
" |
|
9536 | 1994 |
|
9575 | 1995 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 1996 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 1997 |
! |
1998 |
||
9898 | 1999 |
productWebSite |
2000 |
"Returns a product webSite which will appear in <app>.nsi." |
|
2001 |
||
2002 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
2003 |
^ 'http://www.exept.de' |
|
2004 |
]. |
|
2005 |
||
10426 | 2006 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 2007 |
^ 'http://www.yoursite.com' |
2008 |
||
2009 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 2010 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 2011 |
! |
2012 |
||
9575 | 2013 |
releaseNr |
2014 |
"Returns a releaseNr which will appear in libName.rc" |
|
2015 |
||
2016 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2017 |
the default here takes smalltalks version number. |
|
2018 |
But thats probably not good for an end-user-app." |
|
2019 |
||
11042 | 2020 |
^ Smalltalk releaseNr |
9536 | 2021 |
|
9575 | 2022 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 2023 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 2024 |
! |
2025 |
||
2026 |
revisionNr |
|
2027 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 2028 |
|
9575 | 2029 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2030 |
the default here takes smalltalks version number. |
|
2031 |
But thats probably not good for an end-user-app." |
|
2032 |
||
11042 | 2033 |
^ Smalltalk revisionNr |
9575 | 2034 |
|
2035 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 2036 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 2037 |
! |
2038 |
||
2039 |
versionNumber |
|
10306 | 2040 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 2041 |
|
9575 | 2042 |
^'' |
9536 | 2043 |
|
2044 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 2045 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 2046 |
! ! |
2047 |
||
9569 | 2048 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 2049 |
|
9852 | 2050 |
basicFileNamesToGenerate |
11937 | 2051 |
"answer a dictionary (filename -> generator method) with all the files, |
2052 |
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
|
2053 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2054 |
|dict| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2055 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2056 |
dict := Dictionary withKeysAndValues:#( |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2057 |
'Make.spec' #'generate_make_dot_spec' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2058 |
'Make.proto' #'generate_make_dot_proto' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2059 |
'bc.mak' #'generate_bc_dot_mak' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2060 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2061 |
'bmake.bat' #'generate_bmake_dot_mak' |
11937 | 2062 |
'vcmake.bat' #'generate_vcmake_dot_mak' |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2063 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2064 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2065 |
dict |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2066 |
at:self rcFilename put:#'generate_packageName_dot_rc'. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2067 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2068 |
^ dict. |
9852 | 2069 |
! |
2070 |
||
9536 | 2071 |
fileNamesToGenerate |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2072 |
"answer the files that have to be generated" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2073 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2074 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2075 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2076 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2077 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2078 |
" |
9536 | 2079 |
! |
2080 |
||
9544 | 2081 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
2082 |
|pairs| |
|
2083 |
||
2084 |
pairs := OrderedCollection new. |
|
2085 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
|
2086 |
|file| |
|
2087 |
||
2088 |
file := self perform:generator. |
|
2089 |
pairs add:(Array with:fileName with:file) |
|
2090 |
]. |
|
2091 |
||
2092 |
pairs pairsDo:aTwoArgBlock |
|
2093 |
||
2094 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
2095 |
! |
|
2096 |
||
9536 | 2097 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2098 |
self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
9831 | 2099 |
|
9898 | 2100 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 2101 |
! |
2102 |
||
2103 |
generateFile:filename |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2104 |
|action| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2105 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2106 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2107 |
action notNil ifTrue:[ |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2108 |
^ self perform:action |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2109 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2110 |
(filename = 'app.rc' or:[filename = 'lib.rc']) ifTrue:[ |
9817 | 2111 |
^ self generate_packageName_dot_rc |
9607 | 2112 |
]. |
9850 | 2113 |
(filename = 'loadAll') ifTrue:[ |
2114 |
^ self generate_loadAll |
|
2115 |
]. |
|
9621 | 2116 |
self error:('File "%1" not appropriate (not generated) for this type of project.' |
2117 |
bindWith:filename) |
|
9575 | 2118 |
|
9898 | 2119 |
"Modified: / 14-09-2006 / 21:07:49 / cg" |
9536 | 2120 |
! |
2121 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2122 |
generateRemoveShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2123 |
"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
|
2124 |
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
|
2125 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2126 |
|firstLine| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2127 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2128 |
firstLine := true. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2129 |
self searchForClasses do:[:eachClass| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2130 |
firstLine ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2131 |
aStream nextPutAll:'cvs rm -f '. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2132 |
firstLine := false. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2133 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2134 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2135 |
aStream nextPutAll:eachClass classBaseFilename; space. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2136 |
] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2137 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2138 |
firstLine ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2139 |
aStream cr. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2140 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2141 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2142 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2143 |
stx_goodies_webServer_htmlTree generateRemoveShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2144 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2145 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2146 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2147 |
generateRenameShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2148 |
"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
|
2149 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2150 |
self searchForClasses do:[:eachClass| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2151 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2152 |
aStream nextPutAll:'cp '; |
11869
07f3ec995c05
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11868
diff
changeset
|
2153 |
nextPutAll:eachClass classBaseFilename; nextPutAll:'.st,v '; |
07f3ec995c05
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11868
diff
changeset
|
2154 |
nextPutAll:eachClass generateClassFilename; nextPutAll:'.st,v'; cr. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2155 |
] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2156 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2157 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2158 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2159 |
stx_goodies_webServer_htmlTree generateRenameShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2160 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2161 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2162 |
|
9536 | 2163 |
generate_abbrev_dot_stc |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2164 |
self checkIfClassesArePresent. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2165 |
|
9536 | 2166 |
^ String |
2167 |
streamContents:[:s | |
|
9621 | 2168 |
|addEntry| |
2169 |
||
2170 |
addEntry := |
|
2171 |
[:eachClassName | |
|
9681 | 2172 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
9621 | 2173 |
|
2174 |
s nextPutAll:eachClassName. |
|
2175 |
s nextPutAll:' '. |
|
9536 | 2176 |
|
9621 | 2177 |
cls := Smalltalk classNamed:eachClassName. |
2178 |
cls isNil ifTrue:[ |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2179 |
fn := self filenameForClass:eachClassName. |
9678 | 2180 |
s nextPutAll:fn. |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2181 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2182 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
2183 |
s nextPutAll:' '; nextPutAll:'0'. |
|
2184 |
] ifFalse:[ |
|
2185 |
wasLoaded := cls isLoaded. |
|
9714 | 2186 |
wasLoaded ifFalse:[ |
2187 |
failedToLoad := false. |
|
9681 | 2188 |
|
9714 | 2189 |
Error handle:[:ex | |
2190 |
failedToLoad := true. |
|
2191 |
] do:[ |
|
2192 |
ParserFlags |
|
2193 |
withSTCCompilation:#never |
|
2194 |
do:[ |
|
2195 |
cls autoload. |
|
2196 |
] |
|
2197 |
]. |
|
9681 | 2198 |
]. |
9584 | 2199 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2200 |
fn := self filenameForClass:cls. |
9621 | 2201 |
(fn includes:Character space) ifTrue:[ |
2202 |
s nextPutAll:fn storeString. |
|
2203 |
] ifFalse:[ |
|
2204 |
s nextPutAll:fn. |
|
2205 |
]. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2206 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2207 |
s nextPutAll: (cls category asString storeString). |
9681 | 2208 |
failedToLoad ifTrue:[ |
2209 |
s nextPutAll:' 0'. |
|
2210 |
] ifFalse:[ |
|
2211 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
|
2212 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
|
2213 |
]. |
|
9714 | 2214 |
|
9621 | 2215 |
wasLoaded ifFalse:[ |
2216 |
cls unload |
|
2217 |
] |
|
2218 |
]. |
|
2219 |
s cr. |
|
9536 | 2220 |
]. |
9615 | 2221 |
|
9621 | 2222 |
self allClassNames do:addEntry. |
2223 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
2224 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
2225 |
addEntry value:nm |
|
2226 |
]. |
|
2227 |
]. |
|
9536 | 2228 |
] |
2229 |
||
2230 |
" |
|
2231 |
DapasXProject generate_abbrev_dot_stc |
|
2232 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
2233 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
|
2234 |
" |
|
2235 |
||
2236 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2237 |
"Modified: / 20-10-2006 / 16:31:08 / cg" |
9536 | 2238 |
! |
2239 |
||
10306 | 2240 |
generate_bc_dot_mak |
2241 |
^ (self |
|
2242 |
replaceMappings: self bc_dot_mak_mappings |
|
2243 |
in: self bc_dot_mak) asStringCollection withTabs asString |
|
2244 |
||
2245 |
" |
|
2246 |
DapasXProject generate_bc_dot_mak |
|
2247 |
DapasX_Datenbasis generate_bc_dot_mak |
|
2248 |
" |
|
2249 |
||
2250 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
2251 |
! |
|
2252 |
||
9575 | 2253 |
generate_bmake_dot_mak |
2254 |
||
2255 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2256 |
in: self bmake_dot_mak |
|
2257 |
||
2258 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
2259 |
! |
|
2260 |
||
9850 | 2261 |
generate_loadAll |
2262 |
^ String |
|
2263 |
streamContents:[:s | |
|
2264 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
|
2265 |
||
10005 | 2266 |
classNames := self compiled_classNames_common. |
9850 | 2267 |
classesLoaded := classNames |
10010 | 2268 |
collect:[:nm | Smalltalk classNamed:nm] |
9850 | 2269 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
2270 |
classNamesUnloaded := classNames |
|
2271 |
select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]]. |
|
2272 |
||
2273 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
|
10010 | 2274 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
9850 | 2275 |
|
2276 |
||
2277 |
s nextPutAll:'"/ |
|
2278 |
"/ $' , 'Header' , '$ |
|
2279 |
"/ |
|
2280 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
2281 |
"/ |
|
2282 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2283 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 2284 |
"/ |
2285 |
"/ |
|
2286 |
"/ Prerequisites: |
|
2287 |
"/ |
|
2288 |
"/ Smalltalk loadPackage:''module:directory''. |
|
2289 |
"/ Smalltalk loadPackage:''....''. |
|
2290 |
!! |
|
2291 |
||
2292 |
"{ package:''' , self package, ''' }" |
|
2293 |
!! |
|
2294 |
||
2295 |
|files| |
|
2296 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2297 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 2298 |
|
2299 |
files := #( |
|
2300 |
'. |
|
2301 |
||
2302 |
classesSorted do:[:eachClass | |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2303 |
s nextPutLine:' ''' , (self filenameForClass:eachClass), ''''. |
9850 | 2304 |
]. |
2305 |
classNamesUnloaded do:[:nm | |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2306 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
9850 | 2307 |
]. |
2308 |
||
2309 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
|
2310 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2311 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
9850 | 2312 |
]. |
2313 |
]. |
|
2314 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
2315 |
self hasExtensionMethods ifTrue:[ |
9850 | 2316 |
s nextPutLine:' ''extensions.st'''. |
2317 |
]. |
|
2318 |
||
2319 |
s nextPutAll:' |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2320 |
). |
9850 | 2321 |
|
2322 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2323 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 2324 |
|handle loaded| |
2325 |
||
2326 |
handle := ObjectFileLoader loadedObjectHandles |
|
2327 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
|
2328 |
handle ifNotNil:[ |
|
2329 |
loaded := Set new:(handle classes size). |
|
10080 | 2330 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2331 |
files := files \ loaded. |
9850 | 2332 |
]. |
2333 |
]. |
|
2334 |
||
2335 |
"/ 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
|
2336 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2337 |
'''' infoPrintCR. |
9850 | 2338 |
files do:[:f | |
2339 |
''.'' infoPrint. |
|
2340 |
f asFilename exists ifTrue:[ |
|
2341 |
Smalltalk fileIn:f. |
|
2342 |
] ifFalse:[ |
|
2343 |
Smalltalk fileIn:(''source/'' , f) |
|
2344 |
] |
|
2345 |
]. |
|
2346 |
'' '' infoPrintCR. |
|
2347 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2348 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 2349 |
'. |
2350 |
]. |
|
2351 |
||
2352 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 2353 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 2354 |
! |
2355 |
||
9536 | 2356 |
generate_make_dot_proto |
2357 |
||
9733 | 2358 |
^ (self |
2359 |
replaceMappings: self make_dot_proto_mappings |
|
2360 |
in: self make_dot_proto) asStringCollection withTabs asString |
|
9536 | 2361 |
|
9733 | 2362 |
" |
2363 |
stx:libbasic2 generate_make_dot_proto |
|
2364 |
" |
|
9536 | 2365 |
|
2366 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
2367 |
! |
|
2368 |
||
2369 |
generate_make_dot_spec |
|
9733 | 2370 |
^ (self |
2371 |
replaceMappings: self make_dot_spec_mappings |
|
2372 |
in: self make_dot_spec) asStringCollection withTabs asString |
|
9536 | 2373 |
|
9733 | 2374 |
" |
2375 |
DapasXProject generate_make_dot_spec |
|
2376 |
DapasX_Datenbasis generate_make_dot_spec |
|
2377 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
2378 |
" |
|
9536 | 2379 |
|
2380 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
2381 |
! |
|
2382 |
||
2383 |
generate_packageName_dot_rc |
|
2384 |
||
2385 |
^self replaceMappings: self packageName_dot_rc_mappings |
|
2386 |
in: self packageName_dot_rc |
|
2387 |
||
2388 |
" |
|
2389 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
2390 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 2391 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 2392 |
stx_libwidg3 generate_packageName_dot_rc |
2393 |
stx_libwidg3 productVersion |
|
9536 | 2394 |
|
2395 |
" |
|
2396 |
||
2397 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 2398 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 2399 |
! |
2400 |
||
10306 | 2401 |
generate_vc_dot_def |
2402 |
||
2403 |
^self replaceMappings: self vc_dot_def_mappings |
|
2404 |
in: self vc_dot_def |
|
2405 |
||
2406 |
" |
|
2407 |
DapasXProject generate_vc_dot_def |
|
2408 |
DapasX_Datenbasis generate_vc_dot_def |
|
2409 |
||
2410 |
" |
|
2411 |
||
2412 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
2413 |
! |
|
2414 |
||
11937 | 2415 |
generate_vcmake_dot_mak |
2416 |
||
2417 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2418 |
in: self vcmake_dot_mak |
|
2419 |
! |
|
2420 |
||
9852 | 2421 |
protectedFileNames |
2422 |
"names of files which should NOT be generated |
|
2423 |
- redefine this to protect a hand-written Make.proto" |
|
2424 |
||
2425 |
^ #() |
|
2426 |
||
2427 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
2428 |
! |
|
2429 |
||
9831 | 2430 |
rcFilename |
2431 |
^ self packageName,'.rc'. |
|
2432 |
||
2433 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 2434 |
! ! |
2435 |
||
9569 | 2436 |
!ProjectDefinition class methodsFor:'file templates'! |
9536 | 2437 |
|
10306 | 2438 |
bc_dot_mak |
10317
f554c4f5e78f
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10312
diff
changeset
|
2439 |
"answer a template for the bc.mak makefile. |
f554c4f5e78f
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10312
diff
changeset
|
2440 |
Any variable definition %(Variable) will be later replaced by the mapping. |
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2441 |
$% characters have to be duplicated. |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2442 |
Only needed for WIN" |
10306 | 2443 |
|
2444 |
^ self subclassResponsibility |
|
2445 |
! |
|
2446 |
||
9575 | 2447 |
bmake_dot_mak |
2448 |
"the template code for the bmake.bat file" |
|
2449 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2450 |
^ ' |
10306 | 2451 |
make.exe -N -f bc.mak %%1 %%2 |
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2452 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2453 |
%(SUBPROJECT_BMAKE_CALLS) |
9575 | 2454 |
' |
2455 |
||
2456 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
9888 | 2457 |
"Modified: / 14-09-2006 / 19:46:40 / cg" |
9575 | 2458 |
! |
2459 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2460 |
classLine_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2461 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2462 |
^'_%(CLASS)_Init(pass,__pRT__,snd);' |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2463 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2464 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2465 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2466 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2467 |
|
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2468 |
make_dot_proto |
10806
8c8a4683414a
Fix prereq: definition in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10802
diff
changeset
|
2469 |
"the template code for the make.proto file" |
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2470 |
|
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2471 |
^ self subclassResponsibility |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2472 |
! |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2473 |
|
9817 | 2474 |
make_dot_spec |
2475 |
||
2476 |
^ |
|
2477 |
'# $','Header','$ |
|
2478 |
# |
|
2479 |
# DO NOT EDIT |
|
2480 |
# automagically generated from the projectDefinition: ',self name,'. |
|
2481 |
# |
|
2482 |
# Warning: once you modify this file, do not rerun |
|
2483 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
2484 |
# |
|
2485 |
# This file contains specifications which are common to all platforms. |
|
2486 |
# |
|
2487 |
||
2488 |
# Do NOT CHANGE THESE DEFINITIONS |
|
2489 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
2490 |
# to find the source code of a class and to find the library for a package) |
|
2491 |
MODULE=%(MODULE) |
|
2492 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
2493 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2494 |
||
2495 |
||
2496 |
# Argument(s) to the stc compiler (stc --usage). |
|
2497 |
# -H. : create header files locally |
|
2498 |
# (if removed, they will be created as common |
|
2499 |
# -Pxxx : defines the package |
|
2500 |
# -Zxxx : a prefix for variables within the classLib |
|
2501 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2502 |
# -Ixxx : include path passed to CC for inline C-code |
|
2503 |
# +optspace : optimized for space |
|
2504 |
# +optspace2 : optimized more for space |
|
2505 |
# +optspace3 : optimized even more for space |
|
2506 |
# +optinline : generate inline code for some ST constructs |
|
2507 |
# +inlineNew : additionally inline new |
|
2508 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
2509 |
# |
|
2510 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2511 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2512 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2513 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
2514 |
||
2515 |
||
2516 |
# Argument(s) to the stc compiler (stc --usage). |
|
2517 |
# -warn : no warnings |
|
2518 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2519 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2520 |
# -warnPrivacy : no warnings about privateClass extension |
|
2521 |
# |
|
2522 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2523 |
# STCWARNINGS=-warn |
|
2524 |
# STCWARNINGS=-warnNonStandard |
|
2525 |
# STCWARNINGS=-warnEOLComments |
|
2526 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
2527 |
||
2528 |
%(OBJECTS) |
|
2529 |
' |
|
2530 |
||
2531 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2532 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
2533 |
"Modified: / 30-08-2006 / 19:07:26 / cg" |
|
2534 |
! |
|
2535 |
||
2536 |
objectLine_make_dot_spec |
|
2537 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2538 |
^' $(OUTDIR)%(CLASSFILE).$(O) \' |
9817 | 2539 |
|
2540 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
2541 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
2542 |
! |
|
2543 |
||
9627 | 2544 |
packageName_dot_rc |
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2545 |
"the template code for the <libName>.rc file. |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2546 |
Only used for WIN" |
9627 | 2547 |
|
2548 |
^ |
|
2549 |
'// |
|
2550 |
// DO NOT EDIT |
|
2551 |
// automagically generated from the projectDefinition: ',self name,'. |
|
2552 |
// |
|
2553 |
VS_VERSION_INFO VERSIONINFO |
|
2554 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
2555 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
2556 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
2557 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
2558 |
FILEOS VOS_NT_WINDOWS32 |
|
2559 |
FILETYPE %(FILETYPE) |
|
2560 |
FILESUBTYPE VS_USER_DEFINED |
|
2561 |
||
2562 |
BEGIN |
|
2563 |
BLOCK "StringFileInfo" |
|
2564 |
BEGIN |
|
2565 |
BLOCK "040904E4" |
|
2566 |
BEGIN |
|
2567 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
2568 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
2569 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
2570 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
9630 | 2571 |
%(LEGAL_COPYRIGHT_LINE) |
9627 | 2572 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
2573 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
2574 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
2575 |
END |
|
2576 |
||
2577 |
END |
|
2578 |
||
2579 |
BLOCK "VarFileInfo" |
|
2580 |
BEGIN // Language | Translation |
|
2581 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
2582 |
END |
|
2583 |
END |
|
2584 |
' |
|
2585 |
" |
|
2586 |
stx_libbasic3 packageName_dot_rc |
|
2587 |
stx_libbasic3 generate_packageName_dot_rc |
|
2588 |
" |
|
2589 |
||
2590 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2591 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
9630 | 2592 |
"Modified: / 23-08-2006 / 01:32:23 / cg" |
11937 | 2593 |
! |
2594 |
||
2595 |
vcmake_dot_mak |
|
2596 |
"the template code for the vcmake.bat file" |
|
2597 |
||
2598 |
^ ' |
|
2599 |
make.exe -N -f bc.mak %%1 %%2 USEVC=1 |
|
2600 |
||
2601 |
%(SUBPROJECT_VCMAKE_CALLS) |
|
2602 |
' |
|
9536 | 2603 |
! ! |
2604 |
||
9569 | 2605 |
!ProjectDefinition class methodsFor:'loading'! |
9551 | 2606 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2607 |
load |
10401 | 2608 |
"load the project |
2609 |
Answer true, if new classes have been installed for this package, |
|
2610 |
false if the package's classes have been already present." |
|
2611 |
||
2612 |
^ self loadAsAutoloaded:false. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2613 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2614 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2615 |
loadAsAutoloaded:asAutoloaded |
10401 | 2616 |
"load the project. |
2617 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
2618 |
Answer true, if new classes have been installed for this package, |
|
2619 |
false if the package's classes have been already present." |
|
2620 |
||
2621 |
|newStuffHasBeenLoaded| |
|
2622 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2623 |
self projectIsLoaded ifTrue:[^ false]. |
10404 | 2624 |
thisContext isRecursive ifTrue:[^ false]. |
10212 | 2625 |
|
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2626 |
newStuffHasBeenLoaded := false. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2627 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2628 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[ |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2629 |
"/ thisContext fullPrintAll. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2630 |
Transcript show:'loading '. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2631 |
asAutoloaded ifTrue:[ |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2632 |
Transcript show:'as autoloaded '. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2633 |
]. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2634 |
Transcript showCR:self name. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2635 |
]. |
10199 | 2636 |
|
10187 | 2637 |
Class withoutUpdatingChangesDo:[ |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2638 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2639 |
asAutoloaded ifFalse:[ |
10403 | 2640 |
self loadClassLibrary. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2641 |
]. |
10401 | 2642 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | self loadExtensions. |
10412 | 2643 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (self loadAllClassesAsAutoloaded:asAutoloaded). |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2644 |
self loadSubProjectsAsAutoloaded:asAutoloaded. |
10401 | 2645 |
]. |
2646 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2647 |
self projectIsLoaded:true. |
11580 | 2648 |
self postLoadAction. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2649 |
|
10401 | 2650 |
^ newStuffHasBeenLoaded |
9579 | 2651 |
|
9627 | 2652 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
10187 | 2653 |
"Modified: / 21-11-2006 / 15:07:09 / cg" |
9551 | 2654 |
! ! |
2655 |
||
9569 | 2656 |
!ProjectDefinition class methodsFor:'mappings'! |
9536 | 2657 |
|
10306 | 2658 |
bc_dot_mak_mappings |
2659 |
|d| |
|
2660 |
||
2661 |
d := Dictionary new. |
|
2662 |
d |
|
2663 |
at: 'TAB' put: ( Character tab asString ); |
|
2664 |
at: 'TOP' put: ( self pathToTop_win32 ); |
|
2665 |
at: 'MODULE' put: ( self module ); |
|
2666 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2667 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ); |
|
11576
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2668 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2669 |
at: 'ADDITIONAL_BASE_ADDRESS_DEFINITION' put: (self additionalBaseAddressDefinition_bc_dot_mak); |
10979 | 2670 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak); |
2671 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak); |
|
2672 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak); |
|
2673 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak); |
|
2674 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32); |
|
2675 |
at: 'LOCAL_DEFINES' put: self localDefines_win32; |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2676 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32; |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2677 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_bc_dot_mak). |
10306 | 2678 |
^ d |
2679 |
||
2680 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
2681 |
"Modified: / 14-09-2006 / 20:20:19 / cg" |
|
2682 |
! |
|
2683 |
||
9627 | 2684 |
bmake_dot_mak_mappings |
2685 |
^ (Dictionary new) |
|
9887 | 2686 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
11937 | 2687 |
at:'SUBPROJECT_VCMAKE_CALLS' put:(self subProjectVCmakeCalls); |
9627 | 2688 |
yourself |
2689 |
||
2690 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
9887 | 2691 |
"Modified: / 14-09-2006 / 18:55:33 / cg" |
9575 | 2692 |
! |
2693 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2694 |
classLine_mappings: aClassName |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2695 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2696 |
^Dictionary new |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2697 |
at: 'CLASS' put: ( self st2c:aClassName ); |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2698 |
yourself |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2699 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2700 |
"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
|
2701 |
"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
|
2702 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2703 |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2704 |
make_dot_proto_mappings |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2705 |
^ Dictionary new |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2706 |
at: 'TAB' put: ( Character tab asString ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2707 |
at: 'TOP' put: ( self pathToTop_unix ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2708 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2709 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2710 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
10331 | 2711 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
10979 | 2712 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix; |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2713 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2714 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
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
|
2715 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto); |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2716 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2717 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2718 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2719 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2720 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2721 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
2722 |
at: 'MODULE' put: ( self module ); |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
2723 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
2724 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2725 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_make_dot_proto); |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2726 |
yourself |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2727 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2728 |
"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
|
2729 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2730 |
"Modified: / 14-09-2006 / 18:57:52 / cg" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2731 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2732 |
|
9627 | 2733 |
make_dot_spec_mappings |
2734 |
^ Dictionary new |
|
9887 | 2735 |
at: 'TAB' put: ( Character tab asString ); |
2736 |
at: 'MODULE' put: ( self module ); |
|
2737 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2738 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
|
2739 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
|
2740 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
9627 | 2741 |
yourself |
2742 |
||
2743 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
9887 | 2744 |
"Modified: / 14-09-2006 / 18:51:24 / cg" |
9575 | 2745 |
! |
2746 |
||
9627 | 2747 |
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
|
2748 |
|d s resourceCount| |
9627 | 2749 |
|
9630 | 2750 |
d := Dictionary new. |
2751 |
d |
|
9887 | 2752 |
at: 'PRODUCT_NAME' put: (self productName); |
2753 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
2754 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
2755 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
|
2756 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
|
2757 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
|
2758 |
||
2759 |
at: 'COMPANY_NAME' put: (self companyName); |
|
2760 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
|
2761 |
at: 'FILE_VERSION' put: (self fileVersion); |
|
2762 |
at: 'INTERNAL_NAME' put: (self internalName). |
|
11377 | 2763 |
|
9630 | 2764 |
s := self legalCopyright. |
2765 |
s notNil ifTrue:[ |
|
11377 | 2766 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 2767 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2768 |
s := String streamContents:[:stream| |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2769 |
s := self applicationIconFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2770 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2771 |
'IDR_MAINFRAME ICON DISCARDABLE "%1.ico"' |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2772 |
expandPlaceholdersWith:(Array with:s) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2773 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2774 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2775 |
s := self splashFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2776 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2777 |
'IDR_SPLASH BITMAP DISCARDABLE "%1.bmp"' |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2778 |
expandPlaceholdersWith:(Array with:s) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2779 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2780 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2781 |
resourceCount := 2. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2782 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
11613 | 2783 |
'IDR_MAINFRAME+%1 ICON DISCARDABLE "%2"' |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2784 |
expandPlaceholdersWith:(Array with:resourceCount with:eachFilename) on:stream. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2785 |
stream cr. |
11614
700a73103ea1
Wrong increament in additional icons
Stefan Vogel <sv@exept.de>
parents:
11613
diff
changeset
|
2786 |
resourceCount := resourceCount+1. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2787 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2788 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2789 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 2790 |
|
9630 | 2791 |
^ d |
9627 | 2792 |
|
2793 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
9887 | 2794 |
"Modified: / 14-09-2006 / 18:52:37 / cg" |
9536 | 2795 |
! |
2796 |
||
9627 | 2797 |
replaceMappings: mappings in: fileTemplate |
9733 | 2798 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 2799 |
|
9733 | 2800 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 2801 |
|
9733 | 2802 |
" |
2803 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
|
2804 |
" |
|
9627 | 2805 |
|
2806 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
2807 |
"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
|
2808 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2809 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2810 |
st2c:aString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2811 |
^ (aString asString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2812 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2813 |
replaceAny:':' with:$_ |
9536 | 2814 |
! ! |
2815 |
||
9817 | 2816 |
!ProjectDefinition class methodsFor:'mappings support'! |
2817 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2818 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2819 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2820 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2821 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2822 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2823 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2824 |
filenameForClass:classNameOrClass |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2825 |
"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
|
2826 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2827 |
"/ "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
|
2828 |
"/ See also: #generateRemoveShellScriptOn: and #generateRenamShellScriptOn:" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2829 |
"/ classNameOrClass isBehavior ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2830 |
"/ ^ classNameOrClass generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2831 |
"/ ] ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2832 |
"/ |cls| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2833 |
"/ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2834 |
"/ cls := Smalltalk classNamed:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2835 |
"/ cls notNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2836 |
"/ ^ cls generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2837 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2838 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2839 |
"/ "end special code" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2840 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2841 |
^ Smalltalk fileNameForClass:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2842 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2843 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2844 |
self filenameForClass:HTML::Encoder |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2845 |
Smalltalk fileNameForClass:HTML::Encoder |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2846 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2847 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2848 |
"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
|
2849 |
"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
|
2850 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2851 |
|
10005 | 2852 |
generateClassLines:classLineTemplate |
2853 |
^ String |
|
2854 |
streamContents:[:s | |
|
2855 |
|classNames classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
|
2856 |
||
2857 |
putLineForClassName := [:className | |
|
2858 |
|newClassLine mappings| |
|
2859 |
||
2860 |
mappings := self classLine_mappings:className. |
|
2861 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
|
2862 |
s nextPutLine:newClassLine |
|
2863 |
]. |
|
2864 |
classNames := self compiled_classNames_common. |
|
10010 | 2865 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
2866 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
|
10005 | 2867 |
classNamesUnloaded := classNames |
2868 |
select:[:nm | |
|
2869 |
|cls| |
|
2870 |
||
2871 |
cls := Smalltalk classNamed:nm. |
|
2872 |
cls isNil or:[ cls isLoaded not ] |
|
2873 |
]. |
|
10010 | 2874 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
10005 | 2875 |
classNamesSorted do:putLineForClassName. |
2876 |
classNamesUnloaded do:putLineForClassName. |
|
2877 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
2878 |
do:[:nm :attr | |
|
2879 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
2880 |
putLineForClassName value:nm. |
|
2881 |
]. |
|
2882 |
]. |
|
10010 | 2883 |
#( ('UNIX' unix) |
2884 |
('WIN32' win32) |
|
2885 |
('VMS' vms) |
|
2886 |
('BEOS' beos) ) |
|
2887 |
pairsDo:[:ifdef :platformName | |
|
10005 | 2888 |
|archClassNames archClassesLoaded| |
2889 |
||
10010 | 2890 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
10005 | 2891 |
archClassNames notEmpty ifTrue:[ |
2892 |
s nextPutLine:'#ifdef ' , ifdef. |
|
2893 |
archClassNames do:[:clsName | |
|
2894 |
putLineForClassName value:clsName |
|
2895 |
]. |
|
2896 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
|
2897 |
]. |
|
2898 |
]. |
|
2899 |
] |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2900 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2901 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2902 |
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
|
2903 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 2904 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
2905 |
" |
|
2906 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2907 |
"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
|
2908 |
"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
|
2909 |
"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
|
2910 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2911 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2912 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2913 |
^ 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
|
2914 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2915 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2916 |
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
|
2917 |
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
|
2918 |
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
|
2919 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2920 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2921 |
"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
|
2922 |
"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
|
2923 |
"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
|
2924 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2925 |
|
10005 | 2926 |
generateDependencies:whichArchitecture |
2927 |
^ String |
|
2928 |
streamContents:[:s | |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2929 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2930 |
putDependencyForClassBaseNameBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2931 |
archClassNames archClassesPresent archClassesLoaded |
10368 | 2932 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock| |
2933 |
||
2934 |
putSingleClassDependencyEntryBlock := [:cls | |
|
10005 | 2935 |
|sclsBaseName| |
2936 |
||
2937 |
s nextPutAll:' $(INCLUDE_TOP)'. |
|
2938 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2939 |
sclsBaseName := self filenameForClass:cls. |
10005 | 2940 |
s nextPutAll:(self |
2941 |
topRelativePathTo:sclsBaseName |
|
2942 |
inPackage:cls package |
|
2943 |
architecture:whichArchitecture). |
|
2944 |
s nextPutAll:'.$(H)'. |
|
9887 | 2945 |
]. |
10144 | 2946 |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2947 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
10005 | 2948 |
s nextPutAll:'$(OUTDIR)'. |
2949 |
s nextPutAll:clsBaseName. |
|
2950 |
s nextPutAll:'.$(O)'. |
|
2951 |
s nextPutAll:' '. |
|
2952 |
s nextPutAll:clsBaseName. |
|
2953 |
s nextPutAll:'.$(H)'. |
|
2954 |
s nextPutAll:': '. |
|
2955 |
s nextPutAll:clsBaseName. |
|
2956 |
s nextPutAll:'.st'. |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2957 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2958 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2959 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2960 |
putDependencyForClassBlock := [:cls | |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2961 |
|clsBaseName already| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2962 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2963 |
clsBaseName := self filenameForClass:cls. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2964 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
10144 | 2965 |
cls isLoaded ifTrue:[ |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2966 |
already := IdentitySet new. |
10144 | 2967 |
cls |
2968 |
allSuperclassesDo:[:scls | |
|
10368 | 2969 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 2970 |
already add:scls. |
2971 |
]. |
|
2972 |
cls |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
2973 |
allPrivateClassesDo:[:eachPrivateClass | |
10144 | 2974 |
eachPrivateClass |
2975 |
allSuperclassesDo:[:scls | |
|
2976 |
|sclsBaseName| |
|
2977 |
||
2978 |
scls ~~ cls ifTrue:[ |
|
2979 |
scls isPrivate ifFalse:[ |
|
2980 |
(already includes:scls) ifFalse:[ |
|
10368 | 2981 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 2982 |
already add:scls. |
2983 |
]. |
|
10005 | 2984 |
]. |
2985 |
]. |
|
10144 | 2986 |
] |
2987 |
]. |
|
2988 |
]. |
|
2989 |
s nextPutLine:' $(STCHDR)'. |
|
9887 | 2990 |
]. |
10144 | 2991 |
|
10368 | 2992 |
putDependencyForExtensionsBlock := [ |
10005 | 2993 |
|already| |
2994 |
||
2995 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
|
2996 |
already := Set new. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
2997 |
self extensionMethodNames pairWiseDo:[:className :selector | |
10005 | 2998 |
|mthdCls cls| |
2999 |
||
3000 |
((mthdCls := Smalltalk classNamed:className) notNil |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3001 |
and:[ mthdCls isLoaded ]) |
10005 | 3002 |
ifTrue:[ |
3003 |
cls := mthdCls theNonMetaclass. |
|
3004 |
(already includes:cls) ifFalse:[ |
|
3005 |
cls |
|
10063 | 3006 |
withAllSuperclassesDo:[:scls | |
10005 | 3007 |
(already includes:scls) ifFalse:[ |
10368 | 3008 |
putSingleClassDependencyEntryBlock value:scls. |
10005 | 3009 |
already add:scls. |
3010 |
]. |
|
3011 |
]. |
|
3012 |
]. |
|
3013 |
]. |
|
9887 | 3014 |
]. |
10144 | 3015 |
s nextPutLine:' $(STCHDR)'. |
10005 | 3016 |
]. |
10144 | 3017 |
|
10005 | 3018 |
classNames := self compiled_classNames_common. |
10144 | 3019 |
classesPresent := classNames |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3020 |
collect:[:className | Smalltalk classNamed:className] |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3021 |
thenSelect:[:cls | cls notNil]. |
10144 | 3022 |
classesLoaded := classesPresent |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3023 |
select:[:cls | cls isLoaded]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3024 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3025 |
(Class classesSortedByLoadOrder:classesLoaded) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3026 |
do:putDependencyForClassBlock. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3027 |
(classesPresent select:[:cls | cls isLoaded not]) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3028 |
do:putDependencyForClassBlock. |
10144 | 3029 |
|
10005 | 3030 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
3031 |
do:[:className :attr | |
|
3032 |
|cls| |
|
3033 |
||
3034 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
3035 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
10368 | 3036 |
putDependencyForClassBlock value:cls. |
10005 | 3037 |
] |
9887 | 3038 |
]. |
3039 |
]. |
|
10005 | 3040 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3041 |
archClassesPresent := archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3042 |
collect:[:className | Smalltalk classNamed:className] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3043 |
thenSelect:[:cls | cls notNil]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3044 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3045 |
archClassesLoaded := archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3046 |
select:[:cls | cls isLoaded]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3047 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3048 |
(Class classesSortedByLoadOrder:archClassesLoaded) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3049 |
do:putDependencyForClassBlock. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3050 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3051 |
"some classes are not loaded - probably this is the wrong architecture. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3052 |
Sorry, but for these classes, we do not know the superclass chain" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3053 |
archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3054 |
select:[:cls | cls isLoaded not] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3055 |
thenDo:putDependencyForClassBlock. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3056 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3057 |
"for the following classes, we do not know the superclass chain |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3058 |
and neither the real class file name" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3059 |
archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3060 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3061 |
thenDo:[:eachClassName | |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3062 |
putDependencyForClassBaseNameBlock value:(self filenameForClass:eachClassName). |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3063 |
s nextPutLine:' $(STCHDR)'. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3064 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3065 |
|
10368 | 3066 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
10005 | 3067 |
] |
9887 | 3068 |
|
3069 |
" |
|
3070 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 3071 |
stx_libbasic3 generateDependencies:#win32 |
3072 |
" |
|
3073 |
||
9887 | 3074 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
10144 | 3075 |
"Modified: / 25-10-2006 / 16:01:13 / cg" |
9887 | 3076 |
! |
3077 |
||
3078 |
generateDependencies_unix |
|
3079 |
^ self generateDependencies:#unix |
|
3080 |
||
3081 |
" |
|
3082 |
stx_libbasic3 generateDependencies:#unix |
|
3083 |
stx_libbasic3 generateDependencies:#win32 |
|
3084 |
" |
|
3085 |
||
3086 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
3087 |
! |
|
3088 |
||
3089 |
generateDependencies_win32 |
|
3090 |
^ self generateDependencies:#win32 |
|
3091 |
||
3092 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
3093 |
! |
|
3094 |
||
9956 | 3095 |
generateLocalIncludes_unix |
3096 |
^ String streamContents:[:s | |
|
3097 |
s nextPutAll:(self localIncludes_unix). |
|
3098 |
self searchForProjectsWhichProvideHeaderFiles |
|
3099 |
do:[:includeProject | |
|
3100 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
|
3101 |
] |
|
3102 |
] |
|
3103 |
||
3104 |
" |
|
3105 |
bosch_dapasx generateLocalIncludes_unix |
|
3106 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
|
3107 |
stx_libbasic generateLocalIncludes_unix |
|
3108 |
stx_libview generateLocalIncludes_unix |
|
3109 |
stx_libtool2 generateLocalIncludes_unix |
|
3110 |
stx_libui generateLocalIncludes_unix |
|
3111 |
" |
|
3112 |
||
3113 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3114 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
9956 | 3115 |
! |
3116 |
||
9887 | 3117 |
generateLocalIncludes_win32 |
3118 |
^ String streamContents:[:s | |
|
3119 |
s nextPutAll:(self localIncludes_win32). |
|
3120 |
self searchForProjectsWhichProvideHeaderFiles |
|
3121 |
do:[:includeProject | |
|
3122 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
|
3123 |
] |
|
3124 |
] |
|
3125 |
||
3126 |
" |
|
3127 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
3128 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
|
3129 |
stx_libbasic generateLocalIncludes_win32 |
|
3130 |
stx_libview generateLocalIncludes_win32 |
|
3131 |
stx_libtool2 generateLocalIncludes_win32 |
|
3132 |
" |
|
3133 |
||
3134 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3135 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
9887 | 3136 |
! |
3137 |
||
9817 | 3138 |
generateObjects_make_dot_spec |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3139 |
|pivateClassesOf sorter classes| |
9817 | 3140 |
|
3141 |
classes := self compiled_classes_common. |
|
3142 |
pivateClassesOf := IdentityDictionary new. |
|
3143 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
3144 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3145 |
sorter := [:a :b | |
9817 | 3146 |
"/ a must come before b iff: |
3147 |
"/ b is a subclass of a |
|
3148 |
"/ b has a private class which is a subclass of a |
|
3149 |
"/ a is a sharedPool, used by b |
|
3150 |
||
3151 |
|mustComeBefore pivateClassesOfB| |
|
3152 |
||
3153 |
mustComeBefore := false. |
|
3154 |
mustComeBefore := (a isSharedPool and:[(b sharedPools includes: a name)]). |
|
3155 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
3156 |
mustComeBefore ifFalse:[ |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3157 |
pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ]. |
9817 | 3158 |
pivateClassesOfB do:[:eachClassInB | |
3159 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
3160 |
]. |
|
3161 |
]. |
|
3162 |
mustComeBefore |
|
3163 |
]. |
|
3164 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3165 |
classes topologicalSort:sorter. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3166 |
|
9817 | 3167 |
^ String streamContents:[:s | |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3168 |
|putLineForClass putLineForClassName sysDepOrNil| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3169 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3170 |
putLineForClassName := |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3171 |
[:eachClassName | |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3172 |
|mappings newObjectLine| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3173 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3174 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3175 |
s nextPutLine:newObjectLine. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3176 |
]. |
9817 | 3177 |
|
3178 |
putLineForClass := |
|
3179 |
[:eachClass | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3180 |
putLineForClassName value:(eachClass name) |
9817 | 3181 |
]. |
3182 |
||
3183 |
sysDepOrNil := nil. |
|
3184 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3185 |
|define prefix depClasses depClassNames| |
9817 | 3186 |
|
3187 |
define := OperatingSystem platformDefineForPlatformName:platformID. |
|
3188 |
prefix := define copyFrom:('-D' size + 1). |
|
3189 |
depClasses := self compiled_classesForArchitecture:platformID. |
|
3190 |
depClasses notEmpty ifTrue:[ |
|
3191 |
sysDepOrNil := prefix,'_OBJS'. |
|
3192 |
s nextPutLine:sysDepOrNil,'= \'. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3193 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3194 |
(depClasses includes:nil) ifTrue:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3195 |
(Dialog confirm:'Dependencies are not in order (some classes are not present).\\Continue anyway ?' withCRs) |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3196 |
ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3197 |
AbortSignal raise. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3198 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3199 |
depClassNames := self compiled_classNamesForPlatform:platformID. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3200 |
depClassNames do:putLineForClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3201 |
] ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3202 |
depClasses topologicalSort:sorter. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3203 |
depClasses do:putLineForClass. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3204 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3205 |
|
9817 | 3206 |
s cr. |
3207 |
s cr. |
|
3208 |
] |
|
3209 |
]. |
|
3210 |
||
3211 |
s nextPutLine:'COMMON_OBJS= \'. |
|
3212 |
||
3213 |
classes do:putLineForClass. |
|
3214 |
||
3215 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3216 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3217 |
s nextPutLine:(' $(OUTDIR)' , (self filenameForClass:nm) , '.$(O) \'). |
9817 | 3218 |
]. |
3219 |
]. |
|
3220 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
3221 |
self hasExtensionMethods ifTrue:[ |
9850 | 3222 |
s nextPutLine:' $(OUTDIR)extensions.$(O) \'. |
3223 |
]. |
|
9817 | 3224 |
s cr. |
3225 |
] |
|
3226 |
||
3227 |
" |
|
3228 |
bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec |
|
3229 |
DapasXProject generateObjects_make_dot_spec |
|
3230 |
stx_libbasic3 generateObjects_make_dot_spec |
|
3231 |
" |
|
3232 |
||
3233 |
"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
|
3234 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 3235 |
! |
3236 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3237 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3238 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3239 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3240 |
^ String streamContents:[:s | |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3241 |
myProjectId := self package. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3242 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3243 |
is required!! |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3244 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3245 |
'popd' is not needed, since each line is executed in |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3246 |
an own cmd.exe process. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3247 |
'popd' is not desireable, since it masks a possible |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3248 |
error return from the 'bmake'. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3249 |
" |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3250 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:eachProjectId | |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3251 |
s tab; nextPutAll:'pushd '; |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3252 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3253 |
nextPutLine:' & bmake "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3254 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3255 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3256 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3257 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3258 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3259 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3260 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3261 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3262 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3263 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3264 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3265 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3266 |
^ String streamContents:[:s | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3267 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:projectID | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3268 |
libPath := self pathToPackage_unix:projectID. |
11777
000651e1db46
Add GLOBALDEFINE in prereq lines
Stefan Vogel <sv@exept.de>
parents:
11752
diff
changeset
|
3269 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"'. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3270 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3271 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3272 |
s cr. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3273 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3274 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3275 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3276 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3277 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3278 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3279 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3280 |
|
10022 | 3281 |
generateSubDirectories |
3282 |
^ String streamContents:[:s | |
|
3283 |
self subProjects |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3284 |
do:[:eachProjectID | |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3285 |
s space; nextPutAll:(self unixPathToPackage:eachProjectID from:self package) |
10022 | 3286 |
] |
3287 |
] |
|
3288 |
||
3289 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3290 |
exept_expecco generateSubDirectories |
10022 | 3291 |
" |
3292 |
||
3293 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
3294 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
3295 |
! |
|
3296 |
||
3297 |
headerFileOutputArg |
|
3298 |
"/ "all stx stuff goes to the common include directory. |
|
3299 |
"/ Everything else is left locally" |
|
3300 |
"/ |
|
3301 |
"/ ( |
|
3302 |
"/ #( |
|
3303 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
3304 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
3305 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
3306 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
3307 |
"/ 'stx:libboss' 'stx:libdb' |
|
3308 |
"/ ) |
|
3309 |
"/ includes:self package) ifTrue:[ |
|
3310 |
"/ ^ '-H$(INCLUDE)' |
|
3311 |
"/ ]. |
|
3312 |
^ '-H.' |
|
3313 |
||
3314 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
3315 |
"Modified: / 14-09-2006 / 15:38:25 / cg" |
|
3316 |
! |
|
3317 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3318 |
objectLine_make_dot_spec_mappings: aClassName |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3319 |
^ Dictionary new |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3320 |
at: 'CLASSFILE' put:(self filenameForClass:aClassName); |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3321 |
yourself |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3322 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3323 |
"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
|
3324 |
"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
|
3325 |
"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
|
3326 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3327 |
|
9887 | 3328 |
subProjectBmakeCalls |
3329 |
^ String streamContents:[:s | |
|
3330 |
self subProjects do:[:packageID | |
|
3331 |
s nextPutLine:'cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
3332 |
s nextPutLine:'call bmake %1 %2'. |
|
3333 |
s nextPutLine:'cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
9888 | 3334 |
s cr. |
9887 | 3335 |
] |
3336 |
] |
|
3337 |
||
3338 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
9888 | 3339 |
"Modified: / 14-09-2006 / 19:46:57 / cg" |
11937 | 3340 |
! |
3341 |
||
3342 |
subProjectVCmakeCalls |
|
3343 |
^ String streamContents:[:s | |
|
3344 |
self subProjects do:[:packageID | |
|
3345 |
s nextPutLine:'cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
3346 |
s nextPutLine:'call vcmake %1 %2'. |
|
3347 |
s nextPutLine:'cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
3348 |
s cr. |
|
3349 |
] |
|
3350 |
] |
|
9817 | 3351 |
! ! |
3352 |
||
9575 | 3353 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 3354 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3355 |
checkIfClassesArePresent |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3356 |
"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
|
3357 |
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
|
3358 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3359 |
|check nonExistantClasses| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3360 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3361 |
nonExistantClasses := Set new. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3362 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3363 |
check := |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3364 |
[:eachClassName | |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3365 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3366 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3367 |
cls := Smalltalk classNamed:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3368 |
cls isNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3369 |
Transcript showCR:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3370 |
nonExistantClasses add:eachClassName. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3371 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3372 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3373 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3374 |
self allClassNames do:check. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3375 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3376 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3377 |
check value:nm |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3378 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3379 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3380 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3381 |
nonExistantClasses notEmpty ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3382 |
(Dialog confirm:(Dialog classResources |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3383 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3384 |
with:nonExistantClasses anElement allBold)) |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3385 |
ifFalse:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3386 |
AbortOperationRequest raise. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3387 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3388 |
^ false. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3389 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3390 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3391 |
^ true |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3392 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3393 |
|
9627 | 3394 |
classNamesAndAttributesDo: aBlock |
3395 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
3396 |
||
3397 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 3398 |
! |
3399 |
||
9664 | 3400 |
compile:someCode categorized:category |
3401 |
Class packageQuerySignal |
|
3402 |
answer:self package |
|
3403 |
do:[ |
|
3404 |
self theMetaclass compilerClass |
|
3405 |
compile:someCode |
|
3406 |
forClass:self theMetaclass |
|
3407 |
inCategory:category |
|
3408 |
notifying:nil |
|
3409 |
install:true |
|
3410 |
skipIfSame:true |
|
3411 |
silent:true. |
|
3412 |
] |
|
3413 |
||
3414 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
3415 |
! |
|
3416 |
||
9627 | 3417 |
compiled_classes |
10073 | 3418 |
^ self compiled_classNames |
3419 |
collect: |
|
3420 |
[:eachName| |
|
3421 |
|cls| |
|
3422 |
||
3423 |
cls := (Smalltalk at:eachName asSymbol). |
|
3424 |
cls isNil ifTrue:[ |
|
10404 | 3425 |
Transcript showCR:('ProjectDefinition: missing class: ', eachName). |
10073 | 3426 |
]. |
3427 |
cls. |
|
3428 |
] |
|
10251 | 3429 |
thenSelect:[:cls | cls notNil] |
9627 | 3430 |
|
3431 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3432 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 3433 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 3434 |
! |
3435 |
||
9627 | 3436 |
compiled_classesDo:aBlock |
3437 |
self compiled_classes do:aBlock. |
|
3438 |
||
3439 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3440 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
3441 |
! |
|
3442 |
||
10005 | 3443 |
compiled_classesForArchitecture:arch |
3444 |
^ (self compiled_classNamesForPlatform:arch) |
|
3445 |
collect:[:eachName | (Smalltalk at:eachName asSymbol) ] |
|
9627 | 3446 |
|
10251 | 3447 |
" |
3448 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
3449 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
3450 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
3451 |
" |
|
3452 |
||
9627 | 3453 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
3454 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 3455 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 3456 |
! |
3457 |
||
3458 |
compiled_classes_common |
|
10788 | 3459 |
^ self |
3460 |
compiled_classNames_common |
|
11562 | 3461 |
collect:[:eachName | |
3462 |
|cls| |
|
3463 |
||
3464 |
cls := (Smalltalk at:eachName asSymbol). |
|
3465 |
cls isNil ifTrue:[ |
|
3466 |
self warn:'Missing class: ',eachName. |
|
3467 |
]. |
|
3468 |
cls |
|
3469 |
] |
|
3470 |
thenSelect:[:cls| cls notNil "isBehavior"] |
|
9627 | 3471 |
|
3472 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3473 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10788 | 3474 |
"Modified: / 09-11-2007 / 17:37:39 / cg" |
9607 | 3475 |
! |
3476 |
||
9627 | 3477 |
cvsRevision |
3478 |
|rev| |
|
3479 |
||
3480 |
rev := self revision. |
|
3481 |
rev isNil ifTrue:[ |
|
3482 |
"not yet pubplished" |
|
3483 |
^ #( '0' '1' ) |
|
3484 |
]. |
|
3485 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
3486 |
||
3487 |
" |
|
3488 |
self cvsRevision |
|
3489 |
stx_libbasic3 cvsRevision |
|
3490 |
" |
|
3491 |
||
3492 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 3493 |
! |
3494 |
||
9627 | 3495 |
inconsistency:message |
3496 |
Dialog warn:message |
|
9536 | 3497 |
|
9627 | 3498 |
" |
3499 |
self searchForNeverCompiledSuperclasses |
|
3500 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
3501 |
" |
|
3502 |
||
3503 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 3504 |
! |
3505 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3506 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3507 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3508 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3509 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3510 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3511 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3512 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3513 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3514 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3515 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3516 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3517 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3518 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3519 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3520 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3521 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3522 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3523 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3524 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3525 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3526 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3527 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3528 |
|
9627 | 3529 |
namesAndAttributesIn:aCollection do: aBlock |
3530 |
aCollection do:[:entry | |
|
3531 |
|className attributes| |
|
3532 |
||
3533 |
entry isArray ifFalse:[ |
|
3534 |
className := entry. |
|
3535 |
attributes := #(). |
|
3536 |
] ifTrue:[ |
|
3537 |
className := entry first. |
|
3538 |
attributes := entry copyFrom:2. |
|
3539 |
]. |
|
3540 |
aBlock value: className value: attributes |
|
3541 |
]. |
|
3542 |
||
3543 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 3544 |
! |
3545 |
||
9627 | 3546 |
searchForClasses |
10010 | 3547 |
"answer all non-private classes that belong to this project. |
10005 | 3548 |
They are sorted in load order" |
3549 |
||
3550 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
|
9627 | 3551 |
|
3552 |
" |
|
10010 | 3553 |
stx_libbasic3 searchForClasses |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3554 |
stx_goodies_webServer_htmlTree searchForClasses |
9627 | 3555 |
" |
3556 |
||
3557 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3558 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 3559 |
! |
3560 |
||
9627 | 3561 |
searchForClassesWithProject: aProjectID |
3562 |
||
3563 |
^ Smalltalk allClasses |
|
9829 | 3564 |
select:[:cls | (cls package = aProjectID) ]. |
9627 | 3565 |
|
3566 |
" |
|
3567 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
3568 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
3569 |
self searchForClassesWithProject: #'bosch:dapasx/kernel' |
|
3570 |
" |
|
3571 |
||
3572 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3573 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3574 |
"Modified: / 16-08-2006 / 18:50:48 / User" |
|
9536 | 3575 |
! |
3576 |
||
9627 | 3577 |
searchForExtensions |
3578 |
^ self searchForExtensionsWithProject:self package |
|
3579 |
||
3580 |
" |
|
3581 |
self searchForExtensions |
|
3582 |
DapasXProject searchForExtensions |
|
3583 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3584 |
stx_libtool searchForExtensions |
9627 | 3585 |
" |
3586 |
||
3587 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
3588 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3589 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 3590 |
! |
3591 |
||
9627 | 3592 |
searchForExtensionsWithProject:aProjectID |
3593 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3594 |
Return the extension-methods sorted by classname-selector" |
9627 | 3595 |
|
3596 |
|methods| |
|
3597 |
||
11152 | 3598 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3599 |
methods |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3600 |
sort:[:m1 :m2 | |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3601 |
|c1 c2| |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3602 |
|
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3603 |
c1 := m1 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3604 |
c2 := m2 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3605 |
c1 == c2 ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3606 |
m1 selector < m2 selector |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3607 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3608 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3609 |
true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3610 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3611 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3612 |
false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3613 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3614 |
c1 name < c2 name |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3615 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3616 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3617 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3618 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3619 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3620 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3621 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3622 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3623 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3624 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3625 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3626 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3627 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3628 |
]. |
9627 | 3629 |
^ methods |
3630 |
||
3631 |
" |
|
3632 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
3633 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3634 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 3635 |
" |
3636 |
||
3637 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3638 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 3639 |
! |
3640 |
||
9627 | 3641 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3642 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3643 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3644 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3645 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3646 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3647 |
addPackage := |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3648 |
[:package | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3649 |
(package ~= myPackageID) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3650 |
true "(package startsWith:'stx:') not" ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3651 |
package ~= Project noProjectID ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3652 |
requiredPackages add:package. |
9627 | 3653 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3654 |
] |
9627 | 3655 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3656 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3657 |
|
10788 | 3658 |
self compiled_classesDo:[:cls | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3659 |
cls allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3660 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3661 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3662 |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
3663 |
cls allPrivateClassesDo:[:eachPrivateClass | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3664 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3665 |
eachSuperClass isPrivate ifFalse:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3666 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3667 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3668 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3669 |
]. |
9956 | 3670 |
|
3671 |
cls sharedPools do:[:eachPoolName | |
|
3672 |
|eachPoolClass| |
|
3673 |
||
3674 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
|
3675 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
|
3676 |
addPackage value:(eachPoolSuperClass package) |
|
3677 |
] |
|
3678 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3679 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3680 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3681 |
self extensionMethodNames pairWiseDo:[:className :selector | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3682 |
|cls| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3683 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3684 |
addPackage value:(cls package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3685 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3686 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3687 |
^ requiredPackages |
9627 | 3688 |
|
9880 | 3689 |
" |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3690 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
9880 | 3691 |
" |
9627 | 3692 |
|
10251 | 3693 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
10788 | 3694 |
"Modified: / 09-11-2007 / 17:38:02 / cg" |
9664 | 3695 |
! |
3696 |
||
9667 | 3697 |
searchForSiblingProjects |
10132 | 3698 |
"answer all the packages (package names) having the my parent package" |
3699 |
||
9667 | 3700 |
|myPackage myParentPackage| |
3701 |
||
3702 |
myPackage := self package asPackageId. |
|
3703 |
myParentPackage := myPackage parentPackage. |
|
3704 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
3705 |
||
3706 |
^ Smalltalk allProjectIDs |
|
3707 |
select:[:projectID | |
|
3708 |
|thisPackage| |
|
3709 |
thisPackage := projectID asPackageId. |
|
3710 |
(thisPackage parentPackage = myParentPackage) |
|
3711 |
and:[ thisPackage ~= myPackage ]. |
|
3712 |
] |
|
3713 |
||
3714 |
" |
|
3715 |
self searchForSiblingProjects |
|
3716 |
bosch_dapasx_Application searchForSiblingProjects |
|
3717 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
3718 |
" |
|
3719 |
||
3720 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3721 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
3722 |
! |
|
3723 |
||
9664 | 3724 |
searchForSubProjects |
10132 | 3725 |
"answer all packages (package names), that are my subProjects" |
3726 |
||
9664 | 3727 |
|myPackage| |
3728 |
||
3729 |
myPackage := self package. |
|
10215 | 3730 |
^ Smalltalk allProjectIDs |
3731 |
select:[:projectID | |
|
3732 |
projectID ~= Project noProjectID |
|
3733 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
|
9664 | 3734 |
|
3735 |
" |
|
3736 |
self searchForSubProjects |
|
3737 |
bosch_dapasx_Application searchForSubProjects |
|
3738 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
3739 |
" |
|
3740 |
||
3741 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3742 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 3743 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 3744 |
! |
3745 |
||
3746 |
setupForType:typeOrNil |
|
9714 | 3747 |
typeOrNil = GUIApplicationType ifTrue:[ |
9664 | 3748 |
self compile:'isGUIApplication\ ^ true' withCRs |
3749 |
categorized:'description'. |
|
3750 |
^ self |
|
3751 |
]. |
|
9714 | 3752 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
9664 | 3753 |
self compile:'isGUIApplication\ ^ false' withCRs |
3754 |
categorized:'description'. |
|
3755 |
^ self |
|
3756 |
]. |
|
3757 |
^ self. |
|
3758 |
||
3759 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
9536 | 3760 |
! ! |
3761 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3762 |
!ProjectDefinition class methodsFor:'private loading'! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3763 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3764 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3765 |
"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
|
3766 |
install as autoloaded classes marked to be autoloaded. |
10401 | 3767 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
3768 |
||
3769 |
Answer true, if classes have been loaded" |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3770 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3771 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3772 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3773 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3774 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3775 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3776 |
classNamesToAutoload := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3777 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3778 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |eachClassnameSym isAutoload cls| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3779 |
eachClassnameSym := eachClassname asSymbol. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3780 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3781 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3782 |
"no need to (re-)load an existing class, but install if should be loaded" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3783 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3784 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3785 |
(eachAttributes isEmpty |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3786 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3787 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3788 |
hasClassesToLoad := true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3789 |
isAutoload ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3790 |
classNamesToAutoload add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3791 |
] ifFalse:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3792 |
classNamesToLoad add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3793 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3794 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3795 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3796 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3797 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3798 |
hasClassesToLoad ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3799 |
loadedClasses := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3800 |
|
11532 | 3801 |
self packageDirectory isNil ifTrue:[ |
3802 |
self |
|
11533 | 3803 |
error:(self name,'[error] cannot install because packageDirectory is unknown') |
11532 | 3804 |
mayProceed:true. |
3805 |
^ false. |
|
3806 |
]. |
|
3807 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3808 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3809 |
of class name to file name" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3810 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3811 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3812 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3813 |
"install autoloaded classes first, |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3814 |
some others may depend on them" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3815 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3816 |
classNamesToAutoload do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3817 |
Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3818 |
installAutoloadedClassNamed:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3819 |
category:#autoloaded "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3820 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3821 |
revision:nil |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3822 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3823 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3824 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3825 |
classesWhichFailedToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3826 |
classNamesToLoad do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3827 |
|cls| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3828 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3829 |
Error handle:[:ex | |
10401 | 3830 |
"maybe, fileIn failed, because the load order is wrong. |
3831 |
Work around this by installing the class as autoloaded and |
|
3832 |
loading it" |
|
3833 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3834 |
classesWhichFailedToLoad add:eachClassName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3835 |
Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3836 |
installAutoloadedClassNamed:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3837 |
category:#autoloaded "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3838 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3839 |
revision:nil |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3840 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3841 |
] do:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3842 |
cls := Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3843 |
fileInClass:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3844 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3845 |
initialize:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3846 |
lazy:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3847 |
silent:true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3848 |
cls notNil ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3849 |
loadedClasses add:cls |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3850 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3851 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3852 |
]. |
10401 | 3853 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3854 |
classesWhichFailedToLoad do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3855 |
(Smalltalk at:eachClassName) autoload. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3856 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3857 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3858 |
loadedClasses do:[:eachLoadedClass | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3859 |
"do not initialize, if initialize method is inherited" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3860 |
(eachLoadedClass theMetaclass implements:#initialize) ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3861 |
eachLoadedClass initialize |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3862 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3863 |
]. |
10401 | 3864 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3865 |
]. |
10401 | 3866 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3867 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3868 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3869 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3870 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3871 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3872 |
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
|
3873 |
"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
|
3874 |
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
|
3875 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3876 |
|libraryName| |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3877 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3878 |
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
|
3879 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3880 |
(Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[ |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3881 |
"already loaded" |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3882 |
^ true |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3883 |
]. |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3884 |
^ 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
|
3885 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3886 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3887 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3888 |
"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
|
3889 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3890 |
self hasAllExtensionsLoaded ifFalse:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3891 |
Smalltalk loadExtensionsForPackage:self package. |
10401 | 3892 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3893 |
]. |
10401 | 3894 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3895 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3896 |
"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
|
3897 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3898 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3899 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3900 |
"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
|
3901 |
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
|
3902 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3903 |
Class withoutUpdatingChangesDo:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3904 |
aListOfPackages do:[:aPackage | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3905 |
Smalltalk loadPackageWithId:aPackage asAutoloaded:asAutoloaded. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3906 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3907 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3908 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3909 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3910 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3911 |
"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
|
3912 |
|
11479 | 3913 |
self loadPackages:(self effectivePreRequisites) asAutoloaded:asAutoloaded |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3914 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3915 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3916 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3917 |
"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
|
3918 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3919 |
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
|
3920 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3921 |
"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
|
3922 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3923 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3924 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3925 |
"when any of my class methods is changed, we mark the project as unloaded. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3926 |
May be some mor classes have to be loaded" |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3927 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3928 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3929 |
self projectIsLoaded:false. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3930 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3931 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3932 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3933 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3934 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3935 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3936 |
aSetOfClasses |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3937 |
do:[:aClass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3938 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3939 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3940 |
(aClass theNonMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3941 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3942 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3943 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3944 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3945 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3946 |
(aClass theMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3947 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3948 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3949 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3950 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3951 |
"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
|
3952 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3953 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3954 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3955 |
someMethods do:[:method | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3956 |
|resources| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3957 |
|
11149 | 3958 |
resources := method resources. |
3959 |
(resources isNil |
|
3960 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
3961 |
and:[(resources includesKey:#'example') not])]) |
|
3962 |
ifTrue:[ |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3963 |
method usedGlobals |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3964 |
do:[:global | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3965 |
|globalsName usedClass| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3966 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3967 |
globalsName := global asSymbol. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3968 |
usedClass := Smalltalk at:globalsName. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3969 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) ifTrue:[ |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3970 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3971 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3972 |
add:(usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3973 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3974 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3975 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3976 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3977 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3978 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3979 |
"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
|
3980 |
"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
|
3981 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3982 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3983 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3984 |
"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
|
3985 |
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
|
3986 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3987 |
|requiredClasses requiredPackageReasons usedClassesWithReasons ignoredPackages| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3988 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3989 |
usedClassesWithReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3990 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3991 |
"my classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3992 |
requiredClasses := (self searchForClassesWithProject:self package) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3993 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3994 |
"my subproject's classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3995 |
self subProjects do:[:eachProjectName | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3996 |
requiredClasses addAll: (self searchForClassesWithProject:eachProjectName asSymbol) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3997 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3998 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3999 |
"all superclasses of my classes and my subProject's classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4000 |
requiredClasses do:[:cls | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4001 |
cls allSuperclassesDo:[:eachSuperclass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4002 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4003 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4004 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4005 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4006 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4007 |
"all classes referenced by my classes or my subproject's classes |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4008 |
are required. But: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4009 |
only search for locals refered to by my methods (assuming that superclasses' |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4010 |
prerequisites are specified in their package)." |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4011 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4012 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:usedClassesWithReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4013 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:usedClassesWithReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4014 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4015 |
"don't put classes from subProjects into the required list" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4016 |
ignoredPackages := (self siblingsAreSubProjects |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4017 |
ifTrue:[ self searchForSiblingProjects ] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4018 |
ifFalse:[ self searchForSubProjects ]) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4019 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4020 |
ignoredPackages add:self package. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4021 |
ignoredPackages add:Project noProjectID. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4022 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4023 |
"now map classes to packages and collect the reasons" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4024 |
requiredPackageReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4025 |
usedClassesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass | |usedClassPackage| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4026 |
usedClassPackage := usedClass package. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4027 |
(ignoredPackages includes:usedClassPackage) ifFalse:[ |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4028 |
(requiredPackageReasons at:usedClassPackage ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4029 |
addAll:reasonsPerClass. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4030 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4031 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4032 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4033 |
^ requiredPackageReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4034 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4035 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4036 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4037 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4038 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4039 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4040 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4041 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4042 |
"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
|
4043 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4044 |
"Modified: / 20-09-2006 / 17:29:59 / cg" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4045 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
4046 |
|
9585 | 4047 |
!ProjectDefinition class methodsFor:'queries'! |
4048 |
||
9627 | 4049 |
definitionClassForPackage: aPackageID |
4050 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
4051 |
||
4052 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
9585 | 4053 |
! |
4054 |
||
9664 | 4055 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
4056 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
4057 |
||
4058 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
4059 |
! |
|
4060 |
||
4061 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
9627 | 4062 |
|packageDefinitionClassName class| |
4063 |
||
4064 |
packageDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageID. |
|
4065 |
class := Smalltalk classNamed:packageDefinitionClassName. |
|
4066 |
class isNil ifTrue:[ |
|
4067 |
doCreateIfAbsent ifTrue:[ |
|
4068 |
class := self newForPackage:aPackageID. |
|
9664 | 4069 |
"setup before prerequisites are defined" |
4070 |
class setupForType:typeOrNil. |
|
9627 | 4071 |
]. |
9664 | 4072 |
] ifFalse:[ |
4073 |
typeOrNil notNil ifTrue:[ |
|
4074 |
class setupForType:typeOrNil. |
|
4075 |
]. |
|
9627 | 4076 |
]. |
4077 |
^ class |
|
4078 |
||
9664 | 4079 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
4080 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
9585 | 4081 |
! |
4082 |
||
9664 | 4083 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
4084 |
^ (self definitionClassForType:typeOrNil) |
|
4085 |
definitionClassForPackage:newProjectID |
|
4086 |
createIfAbsent:createIfAbsent |
|
4087 |
projectType:typeOrNil |
|
9627 | 4088 |
|
9664 | 4089 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
9627 | 4090 |
! |
4091 |
||
4092 |
definitionClassForType: type |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4093 |
"answer the class that describes a give project type" |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4094 |
|
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4095 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
9714 | 4096 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
4097 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
9627 | 4098 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4099 |
self error:'unknown project type'. |
9627 | 4100 |
|
4101 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
9664 | 4102 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
9585 | 4103 |
! |
4104 |
||
10144 | 4105 |
hasAllClassesFullyLoaded |
4106 |
"return true, if all classes are present and loaded" |
|
4107 |
||
4108 |
^ self hasAllClassesLoaded:true |
|
4109 |
||
4110 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
4111 |
! |
|
4112 |
||
9627 | 4113 |
hasAllClassesLoaded |
10205 | 4114 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 4115 |
|
4116 |
^ self hasAllClassesLoaded:false |
|
4117 |
||
4118 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
4119 |
! |
|
4120 |
||
4121 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4122 |
"check if all classes for this platform are present. |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4123 |
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
|
4124 |
|
10154 | 4125 |
^ (self |
4126 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
|
4127 |
loaded:checkIfFullyLoaded) |
|
4128 |
and:[ |
|
4129 |
self |
|
4130 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
4131 |
loaded:checkIfFullyLoaded ] |
|
4132 |
||
4133 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
4134 |
! |
|
4135 |
||
4136 |
hasAllCompiledClassesFullyLoaded |
|
4137 |
"return true, if all compiled classes are present and loaded" |
|
4138 |
||
4139 |
^ self hasAllCompiledClassesLoaded:true |
|
4140 |
||
4141 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
4142 |
! |
|
4143 |
||
4144 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4145 |
"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
|
4146 |
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
|
4147 |
|
10154 | 4148 |
^ (self |
10206 | 4149 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
10154 | 4150 |
loaded:checkIfFullyLoaded) |
4151 |
and:[ |
|
4152 |
self |
|
4153 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4154 |
loaded:checkIfFullyLoaded |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4155 |
] |
9585 | 4156 |
! |
4157 |
||
9627 | 4158 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
4159 |
"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
|
4160 |
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
|
4161 |
|
9627 | 4162 |
self extensionMethodNames pairWiseDo:[:className :selector | |
4163 |
|cls| |
|
9585 | 4164 |
|
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4165 |
cls := Smalltalk loadedClassNamed:className. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4166 |
cls isNil ifTrue:[ |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4167 |
"/ Transcript showCR:(self name,' missing extension class "',className,'".'). |
10140 | 4168 |
^ false |
4169 |
]. |
|
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
4170 |
"there is no possibility that we installed an extension method in an unloaded class" |
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
4171 |
(cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4172 |
"/ Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
10140 | 4173 |
^ false |
4174 |
]. |
|
9627 | 4175 |
]. |
4176 |
^ true. |
|
4177 |
||
4178 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 4179 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 4180 |
! |
4181 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4182 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4183 |
"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
|
4184 |
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
|
4185 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4186 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4187 |
classNames do:[:eachClassName | |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4188 |
|cls| |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4189 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4190 |
cls := Smalltalk loadedClassNamed:eachClassName. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4191 |
cls isNil ifTrue:[ |
10414 | 4192 |
Transcript showCR:(self name,' missing: ',eachClassName). |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4193 |
^ false |
10154 | 4194 |
]. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4195 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
10414 | 4196 |
Transcript showCR:(self name,' unloaded: ',eachClassName). |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4197 |
^ false. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4198 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4199 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4200 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4201 |
^ true |
10154 | 4202 |
! |
4203 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
4204 |
hasExtensionMethods |
9850 | 4205 |
^ self extensionMethodNames notEmpty |
4206 |
||
4207 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 4208 |
! |
4209 |
||
10140 | 4210 |
isFullyLoaded |
10205 | 4211 |
^ self hasAllCompiledClassesFullyLoaded and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
10140 | 4212 |
|
4213 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
9585 | 4214 |
! ! |
4215 |
||
10774 | 4216 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
4217 |
||
4218 |
showClassDocumentationOf:aClass |
|
4219 |
"used by the HTMLDoc-generator to ask if a classes' protocol is to be documented. |
|
4220 |
(used by expecco, to suppress documentation of workflow- and expecco classes" |
|
4221 |
||
4222 |
^ true |
|
4223 |
||
4224 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
4225 |
! ! |
|
4226 |
||
9726 | 4227 |
!ProjectDefinition class methodsFor:'sanity checks'! |
4228 |
||
4229 |
validateDescription |
|
9956 | 4230 |
|emptyProjects nonProjects emptyOrNonProjects| |
4231 |
||
4232 |
emptyProjects := Set withAll:self subProjects. |
|
4233 |
Smalltalk allClassesDo:[:cls | |
|
4234 |
emptyProjects remove:(cls package) ifAbsent:[]. |
|
4235 |
]. |
|
4236 |
nonProjects := self subProjects select:[:p | |
|
4237 |
(ProjectDefinition definitionClassForPackage: p) isNil |
|
4238 |
]. |
|
4239 |
||
4240 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
4241 |
emptyOrNonProjects addAll:nonProjects. |
|
4242 |
||
4243 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
4244 |
(Dialog |
|
4245 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
|
4246 |
, ((emptyOrNonProjects |
|
4247 |
asSortedCollection |
|
4248 |
collect:[:p | p allBold]) |
|
4249 |
asStringWith:'\ ') |
|
4250 |
, '\\Continue ?') withCRs |
|
4251 |
yesLabel:'OK' noLabel:'Cancel') |
|
4252 |
ifFalse:[ |
|
4253 |
AbortSignal raise |
|
4254 |
]. |
|
4255 |
]. |
|
4256 |
||
4257 |
"Modified: / 19-09-2006 / 20:30:39 / cg" |
|
9726 | 4258 |
! ! |
4259 |
||
9585 | 4260 |
!ProjectDefinition class methodsFor:'testing'! |
4261 |
||
9664 | 4262 |
isApplicationDefinition |
4263 |
^ false |
|
4264 |
||
4265 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 4266 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
4267 |
! |
|
4268 |
||
4269 |
isGUIApplication |
|
4270 |
^ false |
|
4271 |
||
4272 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 4273 |
! |
4274 |
||
4275 |
isLibraryDefinition |
|
4276 |
^ false |
|
4277 |
||
4278 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 4279 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 4280 |
! |
4281 |
||
9627 | 4282 |
isProjectDefinition |
9664 | 4283 |
"concrete i.e. not abstract" |
4284 |
||
9627 | 4285 |
^ self ~~ ProjectDefinition |
4286 |
||
4287 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
9664 | 4288 |
"Modified: / 23-08-2006 / 14:24:38 / cg" |
9585 | 4289 |
! ! |
4290 |
||
9569 | 4291 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 4292 |
|
4293 |
version |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
4294 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.227 2009-09-16 15:19:23 cg Exp $' |
9536 | 4295 |
! ! |
9714 | 4296 |
|
4297 |
ProjectDefinition initialize! |