author | Stefan Vogel <sv@exept.de> |
Wed, 01 Jul 2009 12:44:03 +0200 | |
changeset 11789 | 8d56dc5fa8a8 |
parent 11777 | 000651e1db46 |
child 11829 | 2d880f341cfc |
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 |
|
10306 | 1482 |
additionalDefinitions_bc_dot_mak |
1483 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 1484 |
Subclasses may redefine this." |
10306 | 1485 |
|
1486 |
^ self additionalDefinitions_nt_dot_mak |
|
1487 |
||
1488 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1489 |
! |
|
1490 |
||
9625 | 1491 |
additionalDefinitions_make_dot_proto |
1492 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
1493 |
||
1494 |
^ '' |
|
1495 |
||
1496 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
1497 |
! |
|
1498 |
||
1499 |
additionalDefinitions_nt_dot_mak |
|
10306 | 1500 |
"obsolete - kept for compatibility with old project files" |
9625 | 1501 |
|
1502 |
^ '' |
|
1503 |
||
1504 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
1505 |
! |
|
1506 |
||
10306 | 1507 |
additionalLinkLibraries_bc_dot_mak |
1508 |
"allows for additional static libraries to be added to the bc.mak file. |
|
1509 |
Subclasses may redefine this" |
|
1510 |
||
1511 |
"backward compatibilty with old projects" |
|
1512 |
||
1513 |
^ self additionalLinkLibraries_nt_dot_mak |
|
1514 |
||
1515 |
||
1516 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1517 |
! |
|
1518 |
||
9733 | 1519 |
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
|
1520 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 1521 |
|
1522 |
^ '' |
|
1523 |
||
1524 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1525 |
! |
|
1526 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1527 |
additionalLinkLibraries_nt_dot_mak |
10306 | 1528 |
"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
|
1529 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1530 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1531 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1532 |
"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
|
1533 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
1534 |
|
10306 | 1535 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1536 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1537 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1538 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1539 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1540 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 1541 |
! |
1542 |
||
9625 | 1543 |
additionalRules_make_dot_proto |
1544 |
"allows for additional rules to be added to the make.proto file." |
|
1545 |
||
1546 |
^ '' |
|
1547 |
||
1548 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
1549 |
! |
|
1550 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1551 |
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
|
1552 |
"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
|
1553 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1554 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1555 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
1556 |
|
10306 | 1557 |
additionalTargets_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1558 |
"obsolete - kept for compatibility with old project files" |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1559 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
1560 |
^ '' |
10306 | 1561 |
|
1562 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
1563 |
! |
|
1564 |
||
9625 | 1565 |
additionalTargets_make_dot_proto |
1566 |
"allows for additional targets to be added to the make.proto file." |
|
1567 |
||
1568 |
^ '' |
|
1569 |
||
1570 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
1571 |
! |
|
1572 |
||
10979 | 1573 |
globalDefines |
1574 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1575 |
an subprojects" |
|
1576 |
||
1577 |
^ '' |
|
1578 |
! |
|
1579 |
||
1580 |
globalDefines_unix |
|
1581 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1582 |
an subprojects" |
|
1583 |
||
1584 |
^ self globalDefines |
|
1585 |
! |
|
1586 |
||
1587 |
globalDefines_win32 |
|
1588 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
1589 |
an subprojects" |
|
1590 |
||
1591 |
^ self globalDefines |
|
1592 |
! |
|
1593 |
||
10331 | 1594 |
localDefines |
10979 | 1595 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1596 |
|
1597 |
^ '' |
|
1598 |
! |
|
1599 |
||
1600 |
localDefines_unix |
|
10979 | 1601 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1602 |
|
1603 |
^ self localDefines |
|
1604 |
! |
|
1605 |
||
1606 |
localDefines_win32 |
|
10979 | 1607 |
"allow for the specification of additional defines for stc compilation" |
10331 | 1608 |
|
1609 |
^ self localDefines |
|
1610 |
! |
|
1611 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1612 |
localIncludes |
10979 | 1613 |
"allow for the specification of additional include directories" |
9714 | 1614 |
|
1615 |
^ '' |
|
1616 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1617 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1618 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1619 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1620 |
localIncludes_unix |
10979 | 1621 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1622 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1623 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1624 |
|
9714 | 1625 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1626 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 1627 |
! |
1628 |
||
1629 |
localIncludes_win32 |
|
10979 | 1630 |
"allow for the specification of additional include directories" |
9714 | 1631 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1632 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 1633 |
|
1634 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
1635 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 1636 |
! |
1637 |
||
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
|
1638 |
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
|
1639 |
"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
|
1640 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1641 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1642 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1643 |
"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
|
1644 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1645 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1646 |
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
|
1647 |
"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
|
1648 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1649 |
^ 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
|
1650 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1651 |
"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
|
1652 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
1653 |
|
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_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
|
1655 |
"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
|
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 |
^ 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
|
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 |
|
9575 | 1662 |
stcOptimizationOptions |
1663 |
"see the stc reference / stc usage for options. |
|
1664 |
For now, the following variants are useful: |
|
1665 |
+optspace3 most compact code |
|
1666 |
- use for all gui, application code. |
|
1667 |
||
9714 | 1668 |
+optinline +optinline2 +inlineNew |
1669 |
fastest code |
|
9575 | 1670 |
- use only for computation-intensive classes" |
1671 |
||
1672 |
^ '+optspace3' |
|
1673 |
||
1674 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 1675 |
! |
1676 |
||
9575 | 1677 |
stcWarningOptions |
1678 |
"see the stc reference / stc usage for options. |
|
1679 |
For now, the following variants are useful: |
|
1680 |
-warn no warnings |
|
1681 |
-warnNonStandard no warnings about non-standard smalltalk features" |
|
1682 |
||
9714 | 1683 |
^ '-warnNonStandard' |
9575 | 1684 |
|
1685 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
1686 |
! ! |
|
9536 | 1687 |
|
9575 | 1688 |
!ProjectDefinition class methodsFor:'description - project information'! |
1689 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1690 |
applicationAdditionalIconFileNames |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1691 |
"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
|
1692 |
(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
|
1693 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1694 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1695 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
1696 |
|
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1697 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1698 |
"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
|
1699 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1700 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1701 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
1702 |
|
9575 | 1703 |
companyName |
9584 | 1704 |
"Returns a company string which will appear in <lib>.rc. |
1705 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1706 |
|
11172 | 1707 |
( |
1708 |
#( |
|
1709 |
'stx' |
|
1710 |
'exept' |
|
1711 |
) includes:self module) ifTrue:[ |
|
9575 | 1712 |
^ 'eXept Software AG' |
1713 |
]. |
|
1714 |
||
1715 |
^ 'My Company' |
|
1716 |
||
9584 | 1717 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 1718 |
! |
1719 |
||
1720 |
description |
|
10306 | 1721 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 1722 |
|
9803 | 1723 |
^self productName,' ',self packageName |
1724 |
"/ ^ self name |
|
9536 | 1725 |
|
1726 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 1727 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
1728 |
! |
|
1729 |
||
1730 |
fileDescription |
|
10416 | 1731 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 1732 |
|
9803 | 1733 |
^self description |
9575 | 1734 |
|
1735 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
1736 |
! |
|
1737 |
||
1738 |
fileMajorVersionNr |
|
1739 |
"Returns a versionNumber which will appear in libName.rc" |
|
1740 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
1741 |
^ self majorVersionNr |
9575 | 1742 |
|
1743 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 1744 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 1745 |
! |
1746 |
||
1747 |
fileMinorVersionNr |
|
1748 |
"Returns a versionNumber which will appear in libName.rc" |
|
1749 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
1750 |
^ self minorVersionNr |
9575 | 1751 |
|
1752 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 1753 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 1754 |
! |
1755 |
||
1756 |
fileReleaseNr |
|
1757 |
"Returns a releaseNumber which will appear in libName.rc" |
|
1758 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
1759 |
"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
|
1760 |
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
|
1761 |
|
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
1762 |
^ self cvsRevision last upTo:$m |
9575 | 1763 |
|
1764 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
|
9817 | 1765 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
9536 | 1766 |
! |
1767 |
||
9575 | 1768 |
fileRevisionNr |
1769 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 1770 |
|
9817 | 1771 |
"take the default revision from the cvs-version" |
9618 | 1772 |
^ self cvsRevision first |
9575 | 1773 |
|
1774 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
|
9817 | 1775 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
9536 | 1776 |
! |
1777 |
||
9575 | 1778 |
fileVersion |
1779 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1780 |
||
1781 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
1782 |
||
11042 | 1783 |
^ '%1.%2.%3.%4' |
1784 |
bindWith:self fileMajorVersionNr |
|
1785 |
with:self fileMinorVersionNr |
|
1786 |
with:self fileRevisionNr |
|
1787 |
with:self fileReleaseNr. |
|
9575 | 1788 |
|
1789 |
" |
|
1790 |
self fileVersion |
|
1791 |
" |
|
1792 |
||
9817 | 1793 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 1794 |
! |
9536 | 1795 |
|
9575 | 1796 |
fileVersionCommaSeparated |
1797 |
"Returns a fileVersion string which will appear in libName.rc" |
|
1798 |
||
9817 | 1799 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
1800 |
||
11042 | 1801 |
^ '%1,%2,%3,%4' |
1802 |
bindWith:self fileMajorVersionNr |
|
1803 |
with:self fileMinorVersionNr |
|
1804 |
with:self fileRevisionNr |
|
1805 |
with:self fileReleaseNr. |
|
9575 | 1806 |
|
1807 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 1808 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
1809 |
! |
|
1810 |
||
9575 | 1811 |
internalName |
1812 |
"Returns a name string which will appear in libName.rc" |
|
1813 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
1814 |
^ self package |
9575 | 1815 |
|
1816 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 1817 |
! |
1818 |
||
9575 | 1819 |
legalCopyright |
9584 | 1820 |
"Returns a copyright string which will appear in <lib>.rc. |
1821 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1822 |
|
1823 |
self module = 'stx' ifTrue:[ |
|
9817 | 1824 |
"hardwired-default" |
9625 | 1825 |
^ 'Copyright Claus Gittinger 1988-%1\nCopyright eXept Software AG 1998-%1' |
1826 |
bindWith:(Date today year printString) |
|
9575 | 1827 |
]. |
9817 | 1828 |
self module = 'exept' ifTrue:[ |
1829 |
"hardwired-default" |
|
1830 |
^ 'Copyright eXept Software AG 1998-%1' |
|
1831 |
bindWith:(Date today year printString) |
|
1832 |
]. |
|
9575 | 1833 |
|
1834 |
^ 'My CopyRight or CopyLeft' |
|
1835 |
||
9817 | 1836 |
"Modified: / 30-08-2006 / 18:53:36 / cg" |
9575 | 1837 |
! |
1838 |
||
1839 |
majorVersionNr |
|
1840 |
"Returns a versionNumber which will appear in libName.rc" |
|
1841 |
||
1842 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
1843 |
the default here takes smalltalks version number. |
|
1844 |
But thats probably not good for an end-user-app." |
|
1845 |
||
11042 | 1846 |
^ Smalltalk majorVersionNr |
9575 | 1847 |
|
1848 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 1849 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 1850 |
! |
1851 |
||
1852 |
minorVersionNr |
|
1853 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 1854 |
|
9575 | 1855 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
1856 |
the default here takes smalltalks version number. |
|
1857 |
But thats probably not good for an end-user-app." |
|
1858 |
||
11042 | 1859 |
^ Smalltalk minorVersionNr |
9575 | 1860 |
|
1861 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 1862 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 1863 |
! |
1864 |
||
1865 |
productDate |
|
11043 | 1866 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 1867 |
|
1868 |
"take the current date - by default" |
|
9536 | 1869 |
|
9575 | 1870 |
^ Timestamp now printStringRFC1123Format |
1871 |
||
1872 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
1873 |
! |
|
1874 |
||
10426 | 1875 |
productFilename |
1876 |
"Returns a filename which be used as linkname, product file name etc." |
|
1877 |
||
1878 |
^ self productNameAsValidFilename |
|
1879 |
||
1880 |
" |
|
1881 |
stx_projects_smalltalk productName |
|
1882 |
stx_projects_smalltalk productFilename |
|
1883 |
" |
|
1884 |
||
1885 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
1886 |
! |
|
1887 |
||
9898 | 1888 |
productInstallDir |
1889 |
"Returns a product default installDir which will appear in <app>.nsi." |
|
1890 |
||
1891 |
^ '$PROGRAMFILES\',self module |
|
1892 |
||
1893 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
1894 |
! |
|
1895 |
||
9575 | 1896 |
productName |
9584 | 1897 |
"Returns a product name which will appear in <lib>.rc. |
1898 |
Under win32, this is placed into the dlls file-info" |
|
9575 | 1899 |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1900 |
|m| |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1901 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1902 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1903 |
m = 'stx' ifTrue:[ |
9575 | 1904 |
^ 'Smalltalk/X' |
1905 |
]. |
|
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1906 |
m = 'exept' ifTrue:[ |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1907 |
^ 'eXept addOns' |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1908 |
]. |
10296 | 1909 |
Error handle:[:ex | |
1910 |
^ 'ProductName' |
|
1911 |
] do:[ |
|
1912 |
^ self startupClassName |
|
1913 |
]. |
|
1914 |
||
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
1915 |
"Modified: / 08-11-2007 / 16:45:14 / cg" |
9536 | 1916 |
! |
1917 |
||
10426 | 1918 |
productNameAsValidFilename |
1919 |
"Returns a product name which will appear in <lib>.rc. |
|
1920 |
Under win32, this is placed into the dlls file-info" |
|
1921 |
||
1922 |
|nm| |
|
1923 |
||
1924 |
nm := self productName. |
|
1925 |
^ nm copy replaceAny:'/\:;.,' with:$_ |
|
1926 |
||
1927 |
" |
|
1928 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
1929 |
" |
|
1930 |
||
1931 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
1932 |
! |
|
1933 |
||
9898 | 1934 |
productPublisher |
1935 |
"Returns a product publisher which will appear in <app>.nsi." |
|
1936 |
||
1937 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
1938 |
^ 'eXept Software AG' |
|
1939 |
]. |
|
1940 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
1941 |
^ self companyName |
9898 | 1942 |
|
1943 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
1944 |
! |
|
1945 |
||
9575 | 1946 |
productVersion |
11043 | 1947 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 1948 |
|
1949 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 1950 |
|
11042 | 1951 |
^ '%1.%2.%3.%4' |
1952 |
bindWith:self majorVersionNr |
|
1953 |
with:self minorVersionNr |
|
1954 |
with:self revisionNr |
|
1955 |
with:self releaseNr. |
|
9536 | 1956 |
|
9575 | 1957 |
" |
1958 |
self productVersion |
|
1959 |
" |
|
1960 |
||
9817 | 1961 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 1962 |
! |
1963 |
||
9575 | 1964 |
productVersionCommaSeparated |
1965 |
"Returns a product version which will appear in libName.rc" |
|
1966 |
||
1967 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 1968 |
|
11042 | 1969 |
^ '%1,%2,%3,%4' |
1970 |
bindWith:self majorVersionNr |
|
1971 |
with:self minorVersionNr |
|
1972 |
with:self revisionNr |
|
1973 |
with:self releaseNr. |
|
1974 |
||
1975 |
" |
|
1976 |
self productVersionCommaSeparated |
|
1977 |
" |
|
9536 | 1978 |
|
9575 | 1979 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 1980 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 1981 |
! |
1982 |
||
9898 | 1983 |
productWebSite |
1984 |
"Returns a product webSite which will appear in <app>.nsi." |
|
1985 |
||
1986 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
1987 |
^ 'http://www.exept.de' |
|
1988 |
]. |
|
1989 |
||
10426 | 1990 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 1991 |
^ 'http://www.yoursite.com' |
1992 |
||
1993 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 1994 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 1995 |
! |
1996 |
||
9575 | 1997 |
releaseNr |
1998 |
"Returns a releaseNr which will appear in libName.rc" |
|
1999 |
||
2000 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
2001 |
the default here takes smalltalks version number. |
|
2002 |
But thats probably not good for an end-user-app." |
|
2003 |
||
11042 | 2004 |
^ Smalltalk releaseNr |
9536 | 2005 |
|
9575 | 2006 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 2007 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 2008 |
! |
2009 |
||
2010 |
revisionNr |
|
2011 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 2012 |
|
9575 | 2013 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
2014 |
the default here takes smalltalks version number. |
|
2015 |
But thats probably not good for an end-user-app." |
|
2016 |
||
11042 | 2017 |
^ Smalltalk revisionNr |
9575 | 2018 |
|
2019 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 2020 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 2021 |
! |
2022 |
||
2023 |
versionNumber |
|
10306 | 2024 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 2025 |
|
9575 | 2026 |
^'' |
9536 | 2027 |
|
2028 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 2029 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 2030 |
! ! |
2031 |
||
9569 | 2032 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 2033 |
|
9852 | 2034 |
basicFileNamesToGenerate |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2035 |
"answer a dictionary (filename -> generator method) with all the files, that have to be generated for this |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2036 |
package" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2037 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2038 |
|dict| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2039 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2040 |
dict := Dictionary withKeysAndValues:#( |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2041 |
'Make.spec' #'generate_make_dot_spec' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2042 |
'Make.proto' #'generate_make_dot_proto' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2043 |
'bc.mak' #'generate_bc_dot_mak' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2044 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2045 |
'bmake.bat' #'generate_bmake_dot_mak' |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2046 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2047 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2048 |
dict |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2049 |
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
|
2050 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2051 |
^ dict. |
9852 | 2052 |
! |
2053 |
||
9536 | 2054 |
fileNamesToGenerate |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2055 |
"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
|
2056 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2057 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2058 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2059 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2060 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2061 |
" |
9536 | 2062 |
! |
2063 |
||
9544 | 2064 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
2065 |
|pairs| |
|
2066 |
||
2067 |
pairs := OrderedCollection new. |
|
2068 |
self forEachFileNameAndGeneratorMethodDo:[:fileName :generator | |
|
2069 |
|file| |
|
2070 |
||
2071 |
file := self perform:generator. |
|
2072 |
pairs add:(Array with:fileName with:file) |
|
2073 |
]. |
|
2074 |
||
2075 |
pairs pairsDo:aTwoArgBlock |
|
2076 |
||
2077 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
2078 |
! |
|
2079 |
||
9536 | 2080 |
forEachFileNameAndGeneratorMethodDo:aTwoArgBlock |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2081 |
self fileNamesToGenerate keysAndValuesDo:aTwoArgBlock |
9831 | 2082 |
|
9898 | 2083 |
"Modified: / 14-09-2006 / 21:02:37 / cg" |
9536 | 2084 |
! |
2085 |
||
2086 |
generateFile:filename |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2087 |
|action| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2088 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2089 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2090 |
action notNil ifTrue:[ |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2091 |
^ self perform:action |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2092 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2093 |
(filename = 'app.rc' or:[filename = 'lib.rc']) ifTrue:[ |
9817 | 2094 |
^ self generate_packageName_dot_rc |
9607 | 2095 |
]. |
9850 | 2096 |
(filename = 'loadAll') ifTrue:[ |
2097 |
^ self generate_loadAll |
|
2098 |
]. |
|
9621 | 2099 |
self error:('File "%1" not appropriate (not generated) for this type of project.' |
2100 |
bindWith:filename) |
|
9575 | 2101 |
|
9898 | 2102 |
"Modified: / 14-09-2006 / 21:07:49 / cg" |
9536 | 2103 |
! |
2104 |
||
2105 |
generate_abbrev_dot_stc |
|
10745
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2106 |
|someNilClassesName check| |
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2107 |
|
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2108 |
check := |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2109 |
[:eachClassName | |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2110 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2111 |
|
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2112 |
cls := Smalltalk classNamed:eachClassName. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2113 |
cls isNil ifTrue:[ |
10745
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2114 |
Transcript showCR:eachClassName. |
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2115 |
someNilClassesName := eachClassName. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2116 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2117 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2118 |
|
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2119 |
self allClassNames do:check. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2120 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2121 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2122 |
check value:nm |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2123 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2124 |
]. |
10745
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2125 |
someNilClassesName notNil ifTrue:[ |
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2126 |
(Dialog confirm:(Dialog classResources |
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2127 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
4ac84a1c1516
better error dialog message
Claus Gittinger <cg@exept.de>
parents:
10716
diff
changeset
|
2128 |
with:someNilClassesName allBold)) |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2129 |
ifFalse:[ |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2130 |
AbortSignal raise. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2131 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2132 |
]. |
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
2133 |
|
9536 | 2134 |
^ String |
2135 |
streamContents:[:s | |
|
9621 | 2136 |
|addEntry| |
2137 |
||
2138 |
addEntry := |
|
2139 |
[:eachClassName | |
|
9681 | 2140 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
9621 | 2141 |
|
2142 |
s nextPutAll:eachClassName. |
|
2143 |
s nextPutAll:' '. |
|
9536 | 2144 |
|
9621 | 2145 |
cls := Smalltalk classNamed:eachClassName. |
2146 |
cls isNil ifTrue:[ |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2147 |
fn := (self filenameForClassNamed:eachClassName) asFilename withoutSuffix. |
9678 | 2148 |
fn suffix notEmptyOrNil ifTrue:[ |
2149 |
fn := fn withoutSuffix |
|
2150 |
]. |
|
2151 |
fn := fn baseName. |
|
2152 |
s nextPutAll:fn. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2153 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2154 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
2155 |
s nextPutAll:' '; nextPutAll:'0'. |
|
2156 |
] ifFalse:[ |
|
2157 |
wasLoaded := cls isLoaded. |
|
9714 | 2158 |
wasLoaded ifFalse:[ |
2159 |
failedToLoad := false. |
|
9681 | 2160 |
|
9714 | 2161 |
Error handle:[:ex | |
2162 |
failedToLoad := true. |
|
2163 |
] do:[ |
|
2164 |
ParserFlags |
|
2165 |
withSTCCompilation:#never |
|
2166 |
do:[ |
|
2167 |
cls autoload. |
|
2168 |
] |
|
2169 |
]. |
|
9681 | 2170 |
]. |
9584 | 2171 |
|
9678 | 2172 |
fn := cls classFilename asFilename withoutSuffix. |
2173 |
fn suffix notEmptyOrNil ifTrue:[ |
|
2174 |
fn := fn withoutSuffix |
|
2175 |
]. |
|
2176 |
fn := fn baseName. |
|
9621 | 2177 |
(fn includes:Character space) ifTrue:[ |
2178 |
s nextPutAll:fn storeString. |
|
2179 |
] ifFalse:[ |
|
2180 |
s nextPutAll:fn. |
|
2181 |
]. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2182 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
9621 | 2183 |
s nextPutAll: (cls category asString storeString). |
9681 | 2184 |
failedToLoad ifTrue:[ |
2185 |
s nextPutAll:' 0'. |
|
2186 |
] ifFalse:[ |
|
2187 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
|
2188 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
|
2189 |
]. |
|
9714 | 2190 |
|
9621 | 2191 |
wasLoaded ifFalse:[ |
2192 |
cls unload |
|
2193 |
] |
|
2194 |
]. |
|
2195 |
s cr. |
|
9536 | 2196 |
]. |
9615 | 2197 |
|
9621 | 2198 |
self allClassNames do:addEntry. |
2199 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
2200 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
2201 |
addEntry value:nm |
|
2202 |
]. |
|
2203 |
]. |
|
9536 | 2204 |
] |
2205 |
||
2206 |
" |
|
2207 |
DapasXProject generate_abbrev_dot_stc |
|
2208 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
2209 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
|
2210 |
" |
|
2211 |
||
2212 |
"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
|
2213 |
"Modified: / 20-10-2006 / 16:31:08 / cg" |
9536 | 2214 |
! |
2215 |
||
10306 | 2216 |
generate_bc_dot_mak |
2217 |
^ (self |
|
2218 |
replaceMappings: self bc_dot_mak_mappings |
|
2219 |
in: self bc_dot_mak) asStringCollection withTabs asString |
|
2220 |
||
2221 |
" |
|
2222 |
DapasXProject generate_bc_dot_mak |
|
2223 |
DapasX_Datenbasis generate_bc_dot_mak |
|
2224 |
" |
|
2225 |
||
2226 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
2227 |
! |
|
2228 |
||
9575 | 2229 |
generate_bmake_dot_mak |
2230 |
||
2231 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
2232 |
in: self bmake_dot_mak |
|
2233 |
||
2234 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
2235 |
! |
|
2236 |
||
9850 | 2237 |
generate_loadAll |
2238 |
^ String |
|
2239 |
streamContents:[:s | |
|
2240 |
|classNames classesLoaded classNamesUnloaded classesSorted classNamesSorted| |
|
2241 |
||
10005 | 2242 |
classNames := self compiled_classNames_common. |
9850 | 2243 |
classesLoaded := classNames |
10010 | 2244 |
collect:[:nm | Smalltalk classNamed:nm] |
9850 | 2245 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
2246 |
classNamesUnloaded := classNames |
|
2247 |
select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]]. |
|
2248 |
||
2249 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
|
10010 | 2250 |
classNamesSorted := classesSorted collect:[:cls | cls name]. |
9850 | 2251 |
|
2252 |
||
2253 |
s nextPutAll:'"/ |
|
2254 |
"/ $' , 'Header' , '$ |
|
2255 |
"/ |
|
2256 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
2257 |
"/ |
|
2258 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2259 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 2260 |
"/ |
2261 |
"/ |
|
2262 |
"/ Prerequisites: |
|
2263 |
"/ |
|
2264 |
"/ Smalltalk loadPackage:''module:directory''. |
|
2265 |
"/ Smalltalk loadPackage:''....''. |
|
2266 |
!! |
|
2267 |
||
2268 |
"{ package:''' , self package, ''' }" |
|
2269 |
!! |
|
2270 |
||
2271 |
|files| |
|
2272 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2273 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 2274 |
|
2275 |
files := #( |
|
2276 |
'. |
|
2277 |
||
2278 |
classesSorted do:[:eachClass | |
|
10080 | 2279 |
s nextPutLine:' ''' , eachClass classBaseFilename, ''''. |
9850 | 2280 |
]. |
2281 |
classNamesUnloaded do:[:nm | |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2282 |
s nextPutLine:' ''' , (self filenameForClassNamed:nm) asFilename baseName, ''''. |
9850 | 2283 |
]. |
2284 |
||
2285 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
|
2286 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2287 |
s nextPutLine:' ''' , (self filenameForClassNamed:nm) asFilename baseName, ''''. |
9850 | 2288 |
]. |
2289 |
]. |
|
2290 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
2291 |
self hasExtensionMethods ifTrue:[ |
9850 | 2292 |
s nextPutLine:' ''extensions.st'''. |
2293 |
]. |
|
2294 |
||
2295 |
s nextPutAll:' |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2296 |
). |
9850 | 2297 |
|
2298 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2299 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 2300 |
|handle loaded| |
2301 |
||
2302 |
handle := ObjectFileLoader loadedObjectHandles |
|
2303 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
|
2304 |
handle ifNotNil:[ |
|
2305 |
loaded := Set new:(handle classes size). |
|
10080 | 2306 |
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
|
2307 |
files := files \ loaded. |
9850 | 2308 |
]. |
2309 |
]. |
|
2310 |
||
2311 |
"/ 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
|
2312 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2313 |
'''' infoPrintCR. |
9850 | 2314 |
files do:[:f | |
2315 |
''.'' infoPrint. |
|
2316 |
f asFilename exists ifTrue:[ |
|
2317 |
Smalltalk fileIn:f. |
|
2318 |
] ifFalse:[ |
|
2319 |
Smalltalk fileIn:(''source/'' , f) |
|
2320 |
] |
|
2321 |
]. |
|
2322 |
'' '' infoPrintCR. |
|
2323 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
2324 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 2325 |
'. |
2326 |
]. |
|
2327 |
||
2328 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 2329 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 2330 |
! |
2331 |
||
9536 | 2332 |
generate_make_dot_proto |
2333 |
||
9733 | 2334 |
^ (self |
2335 |
replaceMappings: self make_dot_proto_mappings |
|
2336 |
in: self make_dot_proto) asStringCollection withTabs asString |
|
9536 | 2337 |
|
9733 | 2338 |
" |
2339 |
stx:libbasic2 generate_make_dot_proto |
|
2340 |
" |
|
9536 | 2341 |
|
2342 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
2343 |
! |
|
2344 |
||
2345 |
generate_make_dot_spec |
|
9733 | 2346 |
^ (self |
2347 |
replaceMappings: self make_dot_spec_mappings |
|
2348 |
in: self make_dot_spec) asStringCollection withTabs asString |
|
9536 | 2349 |
|
9733 | 2350 |
" |
2351 |
DapasXProject generate_make_dot_spec |
|
2352 |
DapasX_Datenbasis generate_make_dot_spec |
|
2353 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
2354 |
" |
|
9536 | 2355 |
|
2356 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
2357 |
! |
|
2358 |
||
2359 |
generate_packageName_dot_rc |
|
2360 |
||
2361 |
^self replaceMappings: self packageName_dot_rc_mappings |
|
2362 |
in: self packageName_dot_rc |
|
2363 |
||
2364 |
" |
|
2365 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
2366 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 2367 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 2368 |
stx_libwidg3 generate_packageName_dot_rc |
2369 |
stx_libwidg3 productVersion |
|
9536 | 2370 |
|
2371 |
" |
|
2372 |
||
2373 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 2374 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 2375 |
! |
2376 |
||
10306 | 2377 |
generate_vc_dot_def |
2378 |
||
2379 |
^self replaceMappings: self vc_dot_def_mappings |
|
2380 |
in: self vc_dot_def |
|
2381 |
||
2382 |
" |
|
2383 |
DapasXProject generate_vc_dot_def |
|
2384 |
DapasX_Datenbasis generate_vc_dot_def |
|
2385 |
||
2386 |
" |
|
2387 |
||
2388 |
"Modified: / 09-08-2006 / 11:31:21 / fm" |
|
2389 |
! |
|
2390 |
||
9852 | 2391 |
protectedFileNames |
2392 |
"names of files which should NOT be generated |
|
2393 |
- redefine this to protect a hand-written Make.proto" |
|
2394 |
||
2395 |
^ #() |
|
2396 |
||
2397 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
2398 |
! |
|
2399 |
||
9831 | 2400 |
rcFilename |
2401 |
^ self packageName,'.rc'. |
|
2402 |
||
2403 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
9536 | 2404 |
! ! |
2405 |
||
9569 | 2406 |
!ProjectDefinition class methodsFor:'file templates'! |
9536 | 2407 |
|
10306 | 2408 |
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
|
2409 |
"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
|
2410 |
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
|
2411 |
$% characters have to be duplicated. |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2412 |
Only needed for WIN" |
10306 | 2413 |
|
2414 |
^ self subclassResponsibility |
|
2415 |
! |
|
2416 |
||
9575 | 2417 |
bmake_dot_mak |
2418 |
"the template code for the bmake.bat file" |
|
2419 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2420 |
^ ' |
10306 | 2421 |
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
|
2422 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2423 |
%(SUBPROJECT_BMAKE_CALLS) |
9575 | 2424 |
' |
2425 |
||
2426 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
9888 | 2427 |
"Modified: / 14-09-2006 / 19:46:40 / cg" |
9575 | 2428 |
! |
2429 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2430 |
classLine_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2431 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2432 |
^'_%(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
|
2433 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2434 |
"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
|
2435 |
"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
|
2436 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2437 |
|
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2438 |
make_dot_proto |
10806
8c8a4683414a
Fix prereq: definition in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10802
diff
changeset
|
2439 |
"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
|
2440 |
|
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2441 |
^ self subclassResponsibility |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2442 |
! |
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2443 |
|
9817 | 2444 |
make_dot_spec |
2445 |
||
2446 |
^ |
|
2447 |
'# $','Header','$ |
|
2448 |
# |
|
2449 |
# DO NOT EDIT |
|
2450 |
# automagically generated from the projectDefinition: ',self name,'. |
|
2451 |
# |
|
2452 |
# Warning: once you modify this file, do not rerun |
|
2453 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
2454 |
# |
|
2455 |
# This file contains specifications which are common to all platforms. |
|
2456 |
# |
|
2457 |
||
2458 |
# Do NOT CHANGE THESE DEFINITIONS |
|
2459 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
2460 |
# to find the source code of a class and to find the library for a package) |
|
2461 |
MODULE=%(MODULE) |
|
2462 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
2463 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
2464 |
||
2465 |
||
2466 |
# Argument(s) to the stc compiler (stc --usage). |
|
2467 |
# -H. : create header files locally |
|
2468 |
# (if removed, they will be created as common |
|
2469 |
# -Pxxx : defines the package |
|
2470 |
# -Zxxx : a prefix for variables within the classLib |
|
2471 |
# -Dxxx : defines passed to to CC for inline C-code |
|
2472 |
# -Ixxx : include path passed to CC for inline C-code |
|
2473 |
# +optspace : optimized for space |
|
2474 |
# +optspace2 : optimized more for space |
|
2475 |
# +optspace3 : optimized even more for space |
|
2476 |
# +optinline : generate inline code for some ST constructs |
|
2477 |
# +inlineNew : additionally inline new |
|
2478 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
2479 |
# |
|
2480 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2481 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
2482 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
2483 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
2484 |
||
2485 |
||
2486 |
# Argument(s) to the stc compiler (stc --usage). |
|
2487 |
# -warn : no warnings |
|
2488 |
# -warnNonStandard : no warnings about ST/X extensions |
|
2489 |
# -warnEOLComments : no warnings about EOL comment extension |
|
2490 |
# -warnPrivacy : no warnings about privateClass extension |
|
2491 |
# |
|
2492 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
2493 |
# STCWARNINGS=-warn |
|
2494 |
# STCWARNINGS=-warnNonStandard |
|
2495 |
# STCWARNINGS=-warnEOLComments |
|
2496 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
2497 |
||
2498 |
%(OBJECTS) |
|
2499 |
' |
|
2500 |
||
2501 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2502 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
2503 |
"Modified: / 30-08-2006 / 19:07:26 / cg" |
|
2504 |
! |
|
2505 |
||
2506 |
objectLine_make_dot_spec |
|
2507 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2508 |
^' $(OUTDIR)%(CLASSFILE).$(O) \' |
9817 | 2509 |
|
2510 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
2511 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
2512 |
! |
|
2513 |
||
9627 | 2514 |
packageName_dot_rc |
10802
cc9d2f1d820e
Try to fix Make.proto for UNIX
Stefan Vogel <sv@exept.de>
parents:
10788
diff
changeset
|
2515 |
"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
|
2516 |
Only used for WIN" |
9627 | 2517 |
|
2518 |
^ |
|
2519 |
'// |
|
2520 |
// DO NOT EDIT |
|
2521 |
// automagically generated from the projectDefinition: ',self name,'. |
|
2522 |
// |
|
2523 |
VS_VERSION_INFO VERSIONINFO |
|
2524 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
2525 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
2526 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
2527 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
2528 |
FILEOS VOS_NT_WINDOWS32 |
|
2529 |
FILETYPE %(FILETYPE) |
|
2530 |
FILESUBTYPE VS_USER_DEFINED |
|
2531 |
||
2532 |
BEGIN |
|
2533 |
BLOCK "StringFileInfo" |
|
2534 |
BEGIN |
|
2535 |
BLOCK "040904E4" |
|
2536 |
BEGIN |
|
2537 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
2538 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
2539 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
2540 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
9630 | 2541 |
%(LEGAL_COPYRIGHT_LINE) |
9627 | 2542 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
2543 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
2544 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
2545 |
END |
|
2546 |
||
2547 |
END |
|
2548 |
||
2549 |
BLOCK "VarFileInfo" |
|
2550 |
BEGIN // Language | Translation |
|
2551 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
2552 |
END |
|
2553 |
END |
|
2554 |
' |
|
2555 |
" |
|
2556 |
stx_libbasic3 packageName_dot_rc |
|
2557 |
stx_libbasic3 generate_packageName_dot_rc |
|
2558 |
" |
|
2559 |
||
2560 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
2561 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
9630 | 2562 |
"Modified: / 23-08-2006 / 01:32:23 / cg" |
9536 | 2563 |
! ! |
2564 |
||
9569 | 2565 |
!ProjectDefinition class methodsFor:'loading'! |
9551 | 2566 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2567 |
load |
10401 | 2568 |
"load the project |
2569 |
Answer true, if new classes have been installed for this package, |
|
2570 |
false if the package's classes have been already present." |
|
2571 |
||
2572 |
^ self loadAsAutoloaded:false. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2573 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2574 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2575 |
loadAsAutoloaded:asAutoloaded |
10401 | 2576 |
"load the project. |
2577 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
2578 |
Answer true, if new classes have been installed for this package, |
|
2579 |
false if the package's classes have been already present." |
|
2580 |
||
2581 |
|newStuffHasBeenLoaded| |
|
2582 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2583 |
self projectIsLoaded ifTrue:[^ false]. |
10404 | 2584 |
thisContext isRecursive ifTrue:[^ false]. |
10212 | 2585 |
|
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2586 |
newStuffHasBeenLoaded := false. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2587 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2588 |
(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
|
2589 |
"/ thisContext fullPrintAll. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2590 |
Transcript show:'loading '. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2591 |
asAutoloaded ifTrue:[ |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2592 |
Transcript show:'as autoloaded '. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2593 |
]. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2594 |
Transcript showCR:self name. |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2595 |
]. |
10199 | 2596 |
|
10187 | 2597 |
Class withoutUpdatingChangesDo:[ |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2598 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2599 |
asAutoloaded ifFalse:[ |
10403 | 2600 |
self loadClassLibrary. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
2601 |
]. |
10401 | 2602 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | self loadExtensions. |
10412 | 2603 |
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
|
2604 |
self loadSubProjectsAsAutoloaded:asAutoloaded. |
10401 | 2605 |
]. |
2606 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2607 |
self projectIsLoaded:true. |
11580 | 2608 |
self postLoadAction. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
2609 |
|
10401 | 2610 |
^ newStuffHasBeenLoaded |
9579 | 2611 |
|
9627 | 2612 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
10187 | 2613 |
"Modified: / 21-11-2006 / 15:07:09 / cg" |
9551 | 2614 |
! ! |
2615 |
||
9569 | 2616 |
!ProjectDefinition class methodsFor:'mappings'! |
9536 | 2617 |
|
10306 | 2618 |
bc_dot_mak_mappings |
2619 |
|d| |
|
2620 |
||
2621 |
d := Dictionary new. |
|
2622 |
d |
|
2623 |
at: 'TAB' put: ( Character tab asString ); |
|
2624 |
at: 'TOP' put: ( self pathToTop_win32 ); |
|
2625 |
at: 'MODULE' put: ( self module ); |
|
2626 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2627 |
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
|
2628 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
10979 | 2629 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak); |
2630 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak); |
|
2631 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak); |
|
2632 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak); |
|
2633 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32); |
|
2634 |
at: 'LOCAL_DEFINES' put: self localDefines_win32; |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2635 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32; |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2636 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_bc_dot_mak). |
10306 | 2637 |
^ d |
2638 |
||
2639 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
2640 |
"Modified: / 14-09-2006 / 20:20:19 / cg" |
|
2641 |
! |
|
2642 |
||
9627 | 2643 |
bmake_dot_mak_mappings |
2644 |
^ (Dictionary new) |
|
9887 | 2645 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
9627 | 2646 |
yourself |
2647 |
||
2648 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
9887 | 2649 |
"Modified: / 14-09-2006 / 18:55:33 / cg" |
9575 | 2650 |
! |
2651 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2652 |
classLine_mappings: aClassName |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2653 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2654 |
^Dictionary new |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2655 |
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
|
2656 |
yourself |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2657 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2658 |
"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
|
2659 |
"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
|
2660 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2661 |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2662 |
filenameForClassNamed:className |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2663 |
|class| |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2664 |
|
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2665 |
class := Smalltalk classNamed:className. |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2666 |
class notNil ifTrue:[ |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2667 |
"/ the actual name |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2668 |
^ class classFilename asFilename withoutSuffix baseName |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2669 |
] ifFalse:[ |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2670 |
"/ the expected name |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2671 |
^ Smalltalk fileNameForClass:className |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2672 |
]. |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2673 |
|
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2674 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2675 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2676 |
"Modified: / 20-10-2006 / 16:22:58 / cg" |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2677 |
! |
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2678 |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2679 |
make_dot_proto_mappings |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2680 |
^ Dictionary new |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2681 |
at: 'TAB' put: ( Character tab asString ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2682 |
at: 'TOP' put: ( self pathToTop_unix ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2683 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2684 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2685 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
10331 | 2686 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
10979 | 2687 |
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
|
2688 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2689 |
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
|
2690 |
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
|
2691 |
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
|
2692 |
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
|
2693 |
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
|
2694 |
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
|
2695 |
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
|
2696 |
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
|
2697 |
at: 'MODULE' put: ( self module ); |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
2698 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
2699 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
2700 |
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
|
2701 |
yourself |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2702 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2703 |
"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
|
2704 |
"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
|
2705 |
"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
|
2706 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2707 |
|
9627 | 2708 |
make_dot_spec_mappings |
2709 |
^ Dictionary new |
|
9887 | 2710 |
at: 'TAB' put: ( Character tab asString ); |
2711 |
at: 'MODULE' put: ( self module ); |
|
2712 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
2713 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
|
2714 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
|
2715 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
9627 | 2716 |
yourself |
2717 |
||
2718 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
9887 | 2719 |
"Modified: / 14-09-2006 / 18:51:24 / cg" |
9575 | 2720 |
! |
2721 |
||
9817 | 2722 |
objectLine_make_dot_spec_mappings: aClassName |
2723 |
^ Dictionary new |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
2724 |
at: 'CLASSFILE' put:(self filenameForClassNamed:aClassName); |
9817 | 2725 |
yourself |
2726 |
||
2727 |
"Created: / 08-08-2006 / 20:17:28 / fm" |
|
2728 |
"Modified: / 09-08-2006 / 18:26:52 / fm" |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
2729 |
"Modified: / 20-10-2006 / 16:22:58 / cg" |
9817 | 2730 |
! |
2731 |
||
9627 | 2732 |
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
|
2733 |
|d s resourceCount| |
9627 | 2734 |
|
9630 | 2735 |
d := Dictionary new. |
2736 |
d |
|
9887 | 2737 |
at: 'PRODUCT_NAME' put: (self productName); |
2738 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
2739 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
2740 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
|
2741 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
|
2742 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
|
2743 |
||
2744 |
at: 'COMPANY_NAME' put: (self companyName); |
|
2745 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
|
2746 |
at: 'FILE_VERSION' put: (self fileVersion); |
|
2747 |
at: 'INTERNAL_NAME' put: (self internalName). |
|
11377 | 2748 |
|
9630 | 2749 |
s := self legalCopyright. |
2750 |
s notNil ifTrue:[ |
|
11377 | 2751 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 2752 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2753 |
s := String streamContents:[:stream| |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2754 |
s := self applicationIconFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2755 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2756 |
'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
|
2757 |
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
|
2758 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2759 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2760 |
s := self splashFileName. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2761 |
s notNil ifTrue:[ |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2762 |
'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
|
2763 |
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
|
2764 |
stream cr. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2765 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2766 |
resourceCount := 2. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2767 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
11613 | 2768 |
'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
|
2769 |
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
|
2770 |
stream cr. |
11614
700a73103ea1
Wrong increament in additional icons
Stefan Vogel <sv@exept.de>
parents:
11613
diff
changeset
|
2771 |
resourceCount := resourceCount+1. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2772 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2773 |
]. |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
2774 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 2775 |
|
9630 | 2776 |
^ d |
9627 | 2777 |
|
2778 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
9887 | 2779 |
"Modified: / 14-09-2006 / 18:52:37 / cg" |
9536 | 2780 |
! |
2781 |
||
9627 | 2782 |
replaceMappings: mappings in: fileTemplate |
9733 | 2783 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 2784 |
|
9733 | 2785 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 2786 |
|
9733 | 2787 |
" |
2788 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
|
2789 |
" |
|
9627 | 2790 |
|
2791 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
2792 |
"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
|
2793 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2794 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2795 |
st2c:aString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2796 |
^ (aString asString |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2797 |
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
|
2798 |
replaceAny:':' with:$_ |
9536 | 2799 |
! ! |
2800 |
||
9817 | 2801 |
!ProjectDefinition class methodsFor:'mappings support'! |
2802 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2803 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2804 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2805 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2806 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2807 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2808 |
|
10005 | 2809 |
generateClassLines:classLineTemplate |
2810 |
^ String |
|
2811 |
streamContents:[:s | |
|
2812 |
|classNames classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
|
2813 |
||
2814 |
putLineForClassName := [:className | |
|
2815 |
|newClassLine mappings| |
|
2816 |
||
2817 |
mappings := self classLine_mappings:className. |
|
2818 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
|
2819 |
s nextPutLine:newClassLine |
|
2820 |
]. |
|
2821 |
classNames := self compiled_classNames_common. |
|
10010 | 2822 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
2823 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
|
10005 | 2824 |
classNamesUnloaded := classNames |
2825 |
select:[:nm | |
|
2826 |
|cls| |
|
2827 |
||
2828 |
cls := Smalltalk classNamed:nm. |
|
2829 |
cls isNil or:[ cls isLoaded not ] |
|
2830 |
]. |
|
10010 | 2831 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
10005 | 2832 |
classNamesSorted do:putLineForClassName. |
2833 |
classNamesUnloaded do:putLineForClassName. |
|
2834 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
2835 |
do:[:nm :attr | |
|
2836 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
2837 |
putLineForClassName value:nm. |
|
2838 |
]. |
|
2839 |
]. |
|
10010 | 2840 |
#( ('UNIX' unix) |
2841 |
('WIN32' win32) |
|
2842 |
('VMS' vms) |
|
2843 |
('BEOS' beos) ) |
|
2844 |
pairsDo:[:ifdef :platformName | |
|
10005 | 2845 |
|archClassNames archClassesLoaded| |
2846 |
||
10010 | 2847 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
10005 | 2848 |
archClassNames notEmpty ifTrue:[ |
2849 |
s nextPutLine:'#ifdef ' , ifdef. |
|
2850 |
archClassNames do:[:clsName | |
|
2851 |
putLineForClassName value:clsName |
|
2852 |
]. |
|
2853 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
|
2854 |
]. |
|
2855 |
]. |
|
2856 |
] |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2857 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2858 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2859 |
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
|
2860 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 2861 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
2862 |
" |
|
2863 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2864 |
"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
|
2865 |
"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
|
2866 |
"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
|
2867 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2868 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2869 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2870 |
^ 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
|
2871 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2872 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2873 |
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
|
2874 |
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
|
2875 |
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
|
2876 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2877 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2878 |
"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
|
2879 |
"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
|
2880 |
"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
|
2881 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
2882 |
|
10005 | 2883 |
generateDependencies:whichArchitecture |
2884 |
^ String |
|
2885 |
streamContents:[:s | |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2886 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2887 |
putDependencyForClassBaseNameBlock |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2888 |
archClassNames archClassesPresent archClassesLoaded |
10368 | 2889 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock| |
2890 |
||
2891 |
putSingleClassDependencyEntryBlock := [:cls | |
|
10005 | 2892 |
|sclsBaseName| |
2893 |
||
2894 |
s nextPutAll:' $(INCLUDE_TOP)'. |
|
2895 |
s nextPutAll:(self pathSeparator:whichArchitecture) asString. |
|
2896 |
sclsBaseName := cls classFilename asFilename withoutSuffix baseName. |
|
2897 |
s nextPutAll:(self |
|
2898 |
topRelativePathTo:sclsBaseName |
|
2899 |
inPackage:cls package |
|
2900 |
architecture:whichArchitecture). |
|
2901 |
s nextPutAll:'.$(H)'. |
|
9887 | 2902 |
]. |
10144 | 2903 |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2904 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
11532 | 2905 |
|
10005 | 2906 |
s nextPutAll:'$(OUTDIR)'. |
2907 |
s nextPutAll:clsBaseName. |
|
2908 |
s nextPutAll:'.$(O)'. |
|
2909 |
s nextPutAll:' '. |
|
2910 |
s nextPutAll:clsBaseName. |
|
2911 |
s nextPutAll:'.$(H)'. |
|
2912 |
s nextPutAll:': '. |
|
2913 |
s nextPutAll:clsBaseName. |
|
2914 |
s nextPutAll:'.st'. |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2915 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2916 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2917 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2918 |
putDependencyForClassBlock := [:cls | |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2919 |
|clsBaseName already| |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2920 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2921 |
clsBaseName := cls classFilename asFilename withoutSuffix baseName. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2922 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
10144 | 2923 |
cls isLoaded ifTrue:[ |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2924 |
already := IdentitySet new. |
10144 | 2925 |
cls |
2926 |
allSuperclassesDo:[:scls | |
|
10368 | 2927 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 2928 |
already add:scls. |
2929 |
]. |
|
2930 |
cls |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
2931 |
allPrivateClassesDo:[:eachPrivateClass | |
10144 | 2932 |
eachPrivateClass |
2933 |
allSuperclassesDo:[:scls | |
|
2934 |
|sclsBaseName| |
|
2935 |
||
2936 |
scls ~~ cls ifTrue:[ |
|
2937 |
scls isPrivate ifFalse:[ |
|
2938 |
(already includes:scls) ifFalse:[ |
|
10368 | 2939 |
putSingleClassDependencyEntryBlock value:scls. |
10144 | 2940 |
already add:scls. |
2941 |
]. |
|
10005 | 2942 |
]. |
2943 |
]. |
|
10144 | 2944 |
] |
2945 |
]. |
|
2946 |
]. |
|
2947 |
s nextPutLine:' $(STCHDR)'. |
|
9887 | 2948 |
]. |
10144 | 2949 |
|
10368 | 2950 |
putDependencyForExtensionsBlock := [ |
10005 | 2951 |
|already| |
2952 |
||
2953 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
|
2954 |
already := Set new. |
|
2955 |
self extensionMethodNames |
|
2956 |
pairWiseDo:[:className :selector | |
|
2957 |
|mthdCls cls| |
|
2958 |
||
2959 |
((mthdCls := Smalltalk classNamed:className) notNil |
|
2960 |
and:[ mthdCls isLoaded ]) |
|
2961 |
ifTrue:[ |
|
2962 |
cls := mthdCls theNonMetaclass. |
|
2963 |
(already includes:cls) ifFalse:[ |
|
2964 |
cls |
|
10063 | 2965 |
withAllSuperclassesDo:[:scls | |
10005 | 2966 |
(already includes:scls) ifFalse:[ |
10368 | 2967 |
putSingleClassDependencyEntryBlock value:scls. |
10005 | 2968 |
already add:scls. |
2969 |
]. |
|
2970 |
]. |
|
2971 |
]. |
|
2972 |
]. |
|
9887 | 2973 |
]. |
10144 | 2974 |
s nextPutLine:' $(STCHDR)'. |
10005 | 2975 |
]. |
10144 | 2976 |
|
10005 | 2977 |
classNames := self compiled_classNames_common. |
10144 | 2978 |
classesPresent := classNames |
10010 | 2979 |
collect:[:className | Smalltalk classNamed:className] |
10144 | 2980 |
thenSelect:[:cls | cls notNil]. |
2981 |
classesLoaded := classesPresent |
|
2982 |
select:[:cls | cls isLoaded]. |
|
10010 | 2983 |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2984 |
(Class classesSortedByLoadOrder:classesLoaded) do:putDependencyForClassBlock. |
10368 | 2985 |
(classesPresent select:[:cls | cls isLoaded not]) do:putDependencyForClassBlock. |
10144 | 2986 |
|
10005 | 2987 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
2988 |
do:[:className :attr | |
|
2989 |
|cls| |
|
2990 |
||
2991 |
(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
|
2992 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
10368 | 2993 |
putDependencyForClassBlock value:cls. |
10005 | 2994 |
] |
9887 | 2995 |
]. |
2996 |
]. |
|
10005 | 2997 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2998 |
archClassesPresent := archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
2999 |
collect:[:className | Smalltalk classNamed:className] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3000 |
thenSelect:[:cls | cls notNil]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3001 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3002 |
archClassesLoaded := archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3003 |
select:[:cls | cls isLoaded]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3004 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3005 |
(Class classesSortedByLoadOrder:archClassesLoaded) do:putDependencyForClassBlock. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3006 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3007 |
"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
|
3008 |
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
|
3009 |
archClassesPresent |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3010 |
select:[:cls | cls isLoaded not] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3011 |
thenDo:putDependencyForClassBlock. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3012 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3013 |
"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
|
3014 |
and neither the real class file name" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3015 |
archClassNames |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3016 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3017 |
thenDo:[:eachClassName | |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3018 |
putDependencyForClassBaseNameBlock value:(eachClassName copyReplaceAll:$: with:$_). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3019 |
s nextPutLine:' $(STCHDR)'. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3020 |
]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3021 |
|
10368 | 3022 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
10005 | 3023 |
] |
9887 | 3024 |
|
3025 |
" |
|
3026 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 3027 |
stx_libbasic3 generateDependencies:#win32 |
3028 |
" |
|
3029 |
||
9887 | 3030 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
10144 | 3031 |
"Modified: / 25-10-2006 / 16:01:13 / cg" |
9887 | 3032 |
! |
3033 |
||
3034 |
generateDependencies_unix |
|
3035 |
^ self generateDependencies:#unix |
|
3036 |
||
3037 |
" |
|
3038 |
stx_libbasic3 generateDependencies:#unix |
|
3039 |
stx_libbasic3 generateDependencies:#win32 |
|
3040 |
" |
|
3041 |
||
3042 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
3043 |
! |
|
3044 |
||
3045 |
generateDependencies_win32 |
|
3046 |
^ self generateDependencies:#win32 |
|
3047 |
||
3048 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
3049 |
! |
|
3050 |
||
9956 | 3051 |
generateLocalIncludes_unix |
3052 |
^ String streamContents:[:s | |
|
3053 |
s nextPutAll:(self localIncludes_unix). |
|
3054 |
self searchForProjectsWhichProvideHeaderFiles |
|
3055 |
do:[:includeProject | |
|
3056 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) |
|
3057 |
] |
|
3058 |
] |
|
3059 |
||
3060 |
" |
|
3061 |
bosch_dapasx generateLocalIncludes_unix |
|
3062 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
|
3063 |
stx_libbasic generateLocalIncludes_unix |
|
3064 |
stx_libview generateLocalIncludes_unix |
|
3065 |
stx_libtool2 generateLocalIncludes_unix |
|
3066 |
stx_libui generateLocalIncludes_unix |
|
3067 |
" |
|
3068 |
||
3069 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3070 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
9956 | 3071 |
! |
3072 |
||
9887 | 3073 |
generateLocalIncludes_win32 |
3074 |
^ String streamContents:[:s | |
|
3075 |
s nextPutAll:(self localIncludes_win32). |
|
3076 |
self searchForProjectsWhichProvideHeaderFiles |
|
3077 |
do:[:includeProject | |
|
3078 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage_win32: includeProject) |
|
3079 |
] |
|
3080 |
] |
|
3081 |
||
3082 |
" |
|
3083 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
3084 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
|
3085 |
stx_libbasic generateLocalIncludes_win32 |
|
3086 |
stx_libview generateLocalIncludes_win32 |
|
3087 |
stx_libtool2 generateLocalIncludes_win32 |
|
3088 |
" |
|
3089 |
||
3090 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 3091 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
9887 | 3092 |
! |
3093 |
||
9817 | 3094 |
generateObjects_make_dot_spec |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3095 |
|pivateClassesOf sorter classes| |
9817 | 3096 |
|
3097 |
classes := self compiled_classes_common. |
|
3098 |
pivateClassesOf := IdentityDictionary new. |
|
3099 |
classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)]. |
|
3100 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3101 |
sorter := [:a :b | |
9817 | 3102 |
"/ a must come before b iff: |
3103 |
"/ b is a subclass of a |
|
3104 |
"/ b has a private class which is a subclass of a |
|
3105 |
"/ a is a sharedPool, used by b |
|
3106 |
||
3107 |
|mustComeBefore pivateClassesOfB| |
|
3108 |
||
3109 |
mustComeBefore := false. |
|
3110 |
mustComeBefore := (a isSharedPool and:[(b sharedPools includes: a name)]). |
|
3111 |
mustComeBefore := mustComeBefore or:[b isSubclassOf:a]. |
|
3112 |
mustComeBefore ifFalse:[ |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3113 |
pivateClassesOfB := pivateClassesOf at:b ifAbsent:[ #() ]. |
9817 | 3114 |
pivateClassesOfB do:[:eachClassInB | |
3115 |
mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a] |
|
3116 |
]. |
|
3117 |
]. |
|
3118 |
mustComeBefore |
|
3119 |
]. |
|
3120 |
||
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3121 |
classes topologicalSort:sorter. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3122 |
|
9817 | 3123 |
^ String streamContents:[:s | |
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3124 |
|putLineForClass putLineForClassName sysDepOrNil| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3125 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3126 |
putLineForClassName := |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3127 |
[:eachClassName | |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3128 |
|mappings newObjectLine| |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3129 |
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
|
3130 |
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
|
3131 |
s nextPutLine:newObjectLine. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3132 |
]. |
9817 | 3133 |
|
3134 |
putLineForClass := |
|
3135 |
[:eachClass | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3136 |
putLineForClassName value:(eachClass name) |
9817 | 3137 |
]. |
3138 |
||
3139 |
sysDepOrNil := nil. |
|
3140 |
OperatingSystem knownPlatformNames do:[:platformID | |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3141 |
|define prefix depClasses depClassNames| |
9817 | 3142 |
|
3143 |
define := OperatingSystem platformDefineForPlatformName:platformID. |
|
3144 |
prefix := define copyFrom:('-D' size + 1). |
|
3145 |
depClasses := self compiled_classesForArchitecture:platformID. |
|
3146 |
depClasses notEmpty ifTrue:[ |
|
3147 |
sysDepOrNil := prefix,'_OBJS'. |
|
3148 |
s nextPutLine:sysDepOrNil,'= \'. |
|
10103
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3149 |
|
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3150 |
(depClasses includes:nil) ifTrue:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3151 |
(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
|
3152 |
ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3153 |
AbortSignal raise. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3154 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3155 |
depClassNames := self compiled_classNamesForPlatform:platformID. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3156 |
depClassNames do:putLineForClassName. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3157 |
] ifFalse:[ |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3158 |
depClasses topologicalSort:sorter. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3159 |
depClasses do:putLineForClass. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3160 |
]. |
f63f419f9e27
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10086
diff
changeset
|
3161 |
|
9817 | 3162 |
s cr. |
3163 |
s cr. |
|
3164 |
] |
|
3165 |
]. |
|
3166 |
||
3167 |
s nextPutLine:'COMMON_OBJS= \'. |
|
3168 |
||
3169 |
classes do:putLineForClass. |
|
3170 |
||
3171 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3172 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
10970
13a0fb6641ee
confusion between actual classname and expected className fixed.
Claus Gittinger <cg@exept.de>
parents:
10937
diff
changeset
|
3173 |
s nextPutLine:(' $(OUTDIR)',(self filenameForClassNamed:nm),'.$(O) \'). |
9817 | 3174 |
]. |
3175 |
]. |
|
3176 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
3177 |
self hasExtensionMethods ifTrue:[ |
9850 | 3178 |
s nextPutLine:' $(OUTDIR)extensions.$(O) \'. |
3179 |
]. |
|
9817 | 3180 |
s cr. |
3181 |
] |
|
3182 |
||
3183 |
" |
|
3184 |
bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec |
|
3185 |
DapasXProject generateObjects_make_dot_spec |
|
3186 |
stx_libbasic3 generateObjects_make_dot_spec |
|
3187 |
" |
|
3188 |
||
3189 |
"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
|
3190 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 3191 |
! |
3192 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3193 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3194 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3195 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3196 |
^ String streamContents:[:s | |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3197 |
myProjectId := self package. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3198 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3199 |
is required!! |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3200 |
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
|
3201 |
'popd' is not needed, since each line is executed in |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3202 |
an own cmd.exe process. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3203 |
'popd' is not desireable, since it masks a possible |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3204 |
error return from the 'bmake'. |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3205 |
" |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3206 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:eachProjectId | |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3207 |
s tab; nextPutAll:'pushd '; |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3208 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
3209 |
nextPutLine:' & bmake "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3210 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3211 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3212 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3213 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3214 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3215 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3216 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3217 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3218 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3219 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3220 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3221 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3222 |
^ String streamContents:[:s | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3223 |
(self allPreRequisitesSorted copyWith:'stx:librun') do:[:projectID | |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3224 |
libPath := self pathToPackage_unix:projectID. |
11777
000651e1db46
Add GLOBALDEFINE in prereq lines
Stefan Vogel <sv@exept.de>
parents:
11752
diff
changeset
|
3225 |
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
|
3226 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3227 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3228 |
s cr. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3229 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3230 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3231 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3232 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3233 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3234 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3235 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
3236 |
|
10022 | 3237 |
generateSubDirectories |
3238 |
^ String streamContents:[:s | |
|
3239 |
self subProjects |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3240 |
do:[:eachProjectID | |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3241 |
s space; nextPutAll:(self unixPathToPackage:eachProjectID from:self package) |
10022 | 3242 |
] |
3243 |
] |
|
3244 |
||
3245 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
3246 |
exept_expecco generateSubDirectories |
10022 | 3247 |
" |
3248 |
||
3249 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
3250 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
3251 |
! |
|
3252 |
||
3253 |
headerFileOutputArg |
|
3254 |
"/ "all stx stuff goes to the common include directory. |
|
3255 |
"/ Everything else is left locally" |
|
3256 |
"/ |
|
3257 |
"/ ( |
|
3258 |
"/ #( |
|
3259 |
"/ 'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
3260 |
"/ 'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
3261 |
"/ 'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
3262 |
"/ 'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
3263 |
"/ 'stx:libboss' 'stx:libdb' |
|
3264 |
"/ ) |
|
3265 |
"/ includes:self package) ifTrue:[ |
|
3266 |
"/ ^ '-H$(INCLUDE)' |
|
3267 |
"/ ]. |
|
3268 |
^ '-H.' |
|
3269 |
||
3270 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
3271 |
"Modified: / 14-09-2006 / 15:38:25 / cg" |
|
3272 |
! |
|
3273 |
||
9887 | 3274 |
subProjectBmakeCalls |
3275 |
^ String streamContents:[:s | |
|
3276 |
self subProjects do:[:packageID | |
|
3277 |
s nextPutLine:'cd ', (self msdosPathToPackage:packageID from:(self package)). |
|
3278 |
s nextPutLine:'call bmake %1 %2'. |
|
3279 |
s nextPutLine:'cd ', (self msdosPathToPackage:(self package) from:packageID). |
|
9888 | 3280 |
s cr. |
9887 | 3281 |
] |
3282 |
] |
|
3283 |
||
3284 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
9888 | 3285 |
"Modified: / 14-09-2006 / 19:46:57 / cg" |
9817 | 3286 |
! ! |
3287 |
||
9575 | 3288 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 3289 |
|
9627 | 3290 |
classNamesAndAttributesDo: aBlock |
3291 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
3292 |
||
3293 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 3294 |
! |
3295 |
||
9664 | 3296 |
compile:someCode categorized:category |
3297 |
Class packageQuerySignal |
|
3298 |
answer:self package |
|
3299 |
do:[ |
|
3300 |
self theMetaclass compilerClass |
|
3301 |
compile:someCode |
|
3302 |
forClass:self theMetaclass |
|
3303 |
inCategory:category |
|
3304 |
notifying:nil |
|
3305 |
install:true |
|
3306 |
skipIfSame:true |
|
3307 |
silent:true. |
|
3308 |
] |
|
3309 |
||
3310 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
3311 |
! |
|
3312 |
||
9627 | 3313 |
compiled_classes |
10073 | 3314 |
^ self compiled_classNames |
3315 |
collect: |
|
3316 |
[:eachName| |
|
3317 |
|cls| |
|
3318 |
||
3319 |
cls := (Smalltalk at:eachName asSymbol). |
|
3320 |
cls isNil ifTrue:[ |
|
10404 | 3321 |
Transcript showCR:('ProjectDefinition: missing class: ', eachName). |
10073 | 3322 |
]. |
3323 |
cls. |
|
3324 |
] |
|
10251 | 3325 |
thenSelect:[:cls | cls notNil] |
9627 | 3326 |
|
3327 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3328 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 3329 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 3330 |
! |
3331 |
||
9627 | 3332 |
compiled_classesDo:aBlock |
3333 |
self compiled_classes do:aBlock. |
|
3334 |
||
3335 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3336 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
3337 |
! |
|
3338 |
||
10005 | 3339 |
compiled_classesForArchitecture:arch |
3340 |
^ (self compiled_classNamesForPlatform:arch) |
|
3341 |
collect:[:eachName | (Smalltalk at:eachName asSymbol) ] |
|
9627 | 3342 |
|
10251 | 3343 |
" |
3344 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
3345 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
3346 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
3347 |
" |
|
3348 |
||
9627 | 3349 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
3350 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 3351 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 3352 |
! |
3353 |
||
3354 |
compiled_classes_common |
|
10788 | 3355 |
^ self |
3356 |
compiled_classNames_common |
|
11562 | 3357 |
collect:[:eachName | |
3358 |
|cls| |
|
3359 |
||
3360 |
cls := (Smalltalk at:eachName asSymbol). |
|
3361 |
cls isNil ifTrue:[ |
|
3362 |
self warn:'Missing class: ',eachName. |
|
3363 |
]. |
|
3364 |
cls |
|
3365 |
] |
|
3366 |
thenSelect:[:cls| cls notNil "isBehavior"] |
|
9627 | 3367 |
|
3368 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
3369 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10788 | 3370 |
"Modified: / 09-11-2007 / 17:37:39 / cg" |
9607 | 3371 |
! |
3372 |
||
9627 | 3373 |
cvsRevision |
3374 |
|rev| |
|
3375 |
||
3376 |
rev := self revision. |
|
3377 |
rev isNil ifTrue:[ |
|
3378 |
"not yet pubplished" |
|
3379 |
^ #( '0' '1' ) |
|
3380 |
]. |
|
3381 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
3382 |
||
3383 |
" |
|
3384 |
self cvsRevision |
|
3385 |
stx_libbasic3 cvsRevision |
|
3386 |
" |
|
3387 |
||
3388 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 3389 |
! |
3390 |
||
9627 | 3391 |
inconsistency:message |
3392 |
Dialog warn:message |
|
9536 | 3393 |
|
9627 | 3394 |
" |
3395 |
self searchForNeverCompiledSuperclasses |
|
3396 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
|
3397 |
" |
|
3398 |
||
3399 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 3400 |
! |
3401 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3402 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3403 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3404 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3405 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3406 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3407 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3408 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3409 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3410 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3411 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3412 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3413 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3414 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3415 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3416 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3417 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3418 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3419 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3420 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3421 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3422 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3423 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
3424 |
|
9627 | 3425 |
namesAndAttributesIn:aCollection do: aBlock |
3426 |
aCollection do:[:entry | |
|
3427 |
|className attributes| |
|
3428 |
||
3429 |
entry isArray ifFalse:[ |
|
3430 |
className := entry. |
|
3431 |
attributes := #(). |
|
3432 |
] ifTrue:[ |
|
3433 |
className := entry first. |
|
3434 |
attributes := entry copyFrom:2. |
|
3435 |
]. |
|
3436 |
aBlock value: className value: attributes |
|
3437 |
]. |
|
3438 |
||
3439 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 3440 |
! |
3441 |
||
9627 | 3442 |
searchForClasses |
10010 | 3443 |
"answer all non-private classes that belong to this project. |
10005 | 3444 |
They are sorted in load order" |
3445 |
||
3446 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
|
9627 | 3447 |
|
3448 |
" |
|
10010 | 3449 |
stx_libbasic3 searchForClasses |
9627 | 3450 |
" |
3451 |
||
3452 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3453 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 3454 |
! |
3455 |
||
9627 | 3456 |
searchForClassesWithProject: aProjectID |
3457 |
||
3458 |
^ Smalltalk allClasses |
|
9829 | 3459 |
select:[:cls | (cls package = aProjectID) ]. |
9627 | 3460 |
|
3461 |
" |
|
3462 |
self searchForClassesWithProject: #'bosch:dapasx' |
|
3463 |
self searchForClassesWithProject: #'bosch:dapasx/datenbasis' |
|
3464 |
self searchForClassesWithProject: #'bosch:dapasx/kernel' |
|
3465 |
" |
|
3466 |
||
3467 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3468 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3469 |
"Modified: / 16-08-2006 / 18:50:48 / User" |
|
9536 | 3470 |
! |
3471 |
||
9627 | 3472 |
searchForExtensions |
3473 |
^ self searchForExtensionsWithProject:self package |
|
3474 |
||
3475 |
" |
|
3476 |
self searchForExtensions |
|
3477 |
DapasXProject searchForExtensions |
|
3478 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3479 |
stx_libtool searchForExtensions |
9627 | 3480 |
" |
3481 |
||
3482 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
3483 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
3484 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 3485 |
! |
3486 |
||
9627 | 3487 |
searchForExtensionsWithProject:aProjectID |
3488 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3489 |
Return the extension-methods sorted by classname-selector" |
9627 | 3490 |
|
3491 |
|methods| |
|
3492 |
||
11152 | 3493 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3494 |
methods |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3495 |
sort:[:m1 :m2 | |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3496 |
|c1 c2| |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3497 |
|
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3498 |
c1 := m1 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3499 |
c2 := m2 mclass. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3500 |
c1 == c2 ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3501 |
m1 selector < m2 selector |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3502 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3503 |
(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
|
3504 |
true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3505 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3506 |
(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
|
3507 |
false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3508 |
] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3509 |
c1 name < c2 name |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3510 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3511 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3512 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3513 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3514 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3515 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3516 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3517 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3518 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3519 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3520 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3521 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3522 |
]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
3523 |
]. |
9627 | 3524 |
^ methods |
3525 |
||
3526 |
" |
|
3527 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
3528 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3529 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 3530 |
" |
3531 |
||
3532 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
3533 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 3534 |
! |
3535 |
||
9627 | 3536 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3537 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3538 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3539 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3540 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3541 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3542 |
addPackage := |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3543 |
[:package | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3544 |
(package ~= myPackageID) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3545 |
true "(package startsWith:'stx:') not" ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3546 |
package ~= Project noProjectID ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3547 |
requiredPackages add:package. |
9627 | 3548 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3549 |
] |
9627 | 3550 |
] |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3551 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3552 |
|
10788 | 3553 |
self compiled_classesDo:[:cls | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3554 |
cls allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3555 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3556 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3557 |
|
10937
cd8a6dae2b4e
Take private classes of private classes into account when generating dependencies
Stefan Vogel <sv@exept.de>
parents:
10923
diff
changeset
|
3558 |
cls allPrivateClassesDo:[:eachPrivateClass | |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3559 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3560 |
eachSuperClass isPrivate ifFalse:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3561 |
addPackage value:(eachSuperClass package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3562 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3563 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3564 |
]. |
9956 | 3565 |
|
3566 |
cls sharedPools do:[:eachPoolName | |
|
3567 |
|eachPoolClass| |
|
3568 |
||
3569 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
|
3570 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
|
3571 |
addPackage value:(eachPoolSuperClass package) |
|
3572 |
] |
|
3573 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3574 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3575 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3576 |
self extensionMethodNames pairWiseDo:[:className :selector | |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3577 |
|cls| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3578 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3579 |
addPackage value:(cls package) |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3580 |
] |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3581 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3582 |
^ requiredPackages |
9627 | 3583 |
|
9880 | 3584 |
" |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
3585 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
9880 | 3586 |
" |
9627 | 3587 |
|
10251 | 3588 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
10788 | 3589 |
"Modified: / 09-11-2007 / 17:38:02 / cg" |
9664 | 3590 |
! |
3591 |
||
9667 | 3592 |
searchForSiblingProjects |
10132 | 3593 |
"answer all the packages (package names) having the my parent package" |
3594 |
||
9667 | 3595 |
|myPackage myParentPackage| |
3596 |
||
3597 |
myPackage := self package asPackageId. |
|
3598 |
myParentPackage := myPackage parentPackage. |
|
3599 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
3600 |
||
3601 |
^ Smalltalk allProjectIDs |
|
3602 |
select:[:projectID | |
|
3603 |
|thisPackage| |
|
3604 |
thisPackage := projectID asPackageId. |
|
3605 |
(thisPackage parentPackage = myParentPackage) |
|
3606 |
and:[ thisPackage ~= myPackage ]. |
|
3607 |
] |
|
3608 |
||
3609 |
" |
|
3610 |
self searchForSiblingProjects |
|
3611 |
bosch_dapasx_Application searchForSiblingProjects |
|
3612 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
3613 |
" |
|
3614 |
||
3615 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
3616 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
3617 |
! |
|
3618 |
||
9664 | 3619 |
searchForSubProjects |
10132 | 3620 |
"answer all packages (package names), that are my subProjects" |
3621 |
||
9664 | 3622 |
|myPackage| |
3623 |
||
3624 |
myPackage := self package. |
|
10215 | 3625 |
^ Smalltalk allProjectIDs |
3626 |
select:[:projectID | |
|
3627 |
projectID ~= Project noProjectID |
|
3628 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
|
9664 | 3629 |
|
3630 |
" |
|
3631 |
self searchForSubProjects |
|
3632 |
bosch_dapasx_Application searchForSubProjects |
|
3633 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
3634 |
" |
|
3635 |
||
3636 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
3637 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 3638 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 3639 |
! |
3640 |
||
3641 |
setupForType:typeOrNil |
|
9714 | 3642 |
typeOrNil = GUIApplicationType ifTrue:[ |
9664 | 3643 |
self compile:'isGUIApplication\ ^ true' withCRs |
3644 |
categorized:'description'. |
|
3645 |
^ self |
|
3646 |
]. |
|
9714 | 3647 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
9664 | 3648 |
self compile:'isGUIApplication\ ^ false' withCRs |
3649 |
categorized:'description'. |
|
3650 |
^ self |
|
3651 |
]. |
|
3652 |
^ self. |
|
3653 |
||
3654 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
9536 | 3655 |
! ! |
3656 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3657 |
!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
|
3658 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3659 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3660 |
"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
|
3661 |
install as autoloaded classes marked to be autoloaded. |
10401 | 3662 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
3663 |
||
3664 |
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
|
3665 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3666 |
|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
|
3667 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3668 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3669 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3670 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3671 |
classNamesToAutoload := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3672 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3673 |
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
|
3674 |
eachClassnameSym := eachClassname asSymbol. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3675 |
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
|
3676 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3677 |
"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
|
3678 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3679 |
(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
|
3680 |
(eachAttributes isEmpty |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3681 |
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
|
3682 |
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
|
3683 |
hasClassesToLoad := true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3684 |
isAutoload ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3685 |
classNamesToAutoload add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3686 |
] ifFalse:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3687 |
classNamesToLoad add:eachClassnameSym. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3688 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3689 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3690 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3691 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3692 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3693 |
hasClassesToLoad ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3694 |
loadedClasses := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3695 |
|
11532 | 3696 |
self packageDirectory isNil ifTrue:[ |
3697 |
self |
|
11533 | 3698 |
error:(self name,'[error] cannot install because packageDirectory is unknown') |
11532 | 3699 |
mayProceed:true. |
3700 |
^ false. |
|
3701 |
]. |
|
3702 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3703 |
"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
|
3704 |
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
|
3705 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3706 |
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
|
3707 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3708 |
"install autoloaded classes first, |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3709 |
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
|
3710 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3711 |
classNamesToAutoload do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3712 |
Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3713 |
installAutoloadedClassNamed:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3714 |
category:#autoloaded "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3715 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3716 |
revision:nil |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3717 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3718 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3719 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3720 |
classesWhichFailedToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3721 |
classNamesToLoad do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3722 |
|cls| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3723 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3724 |
Error handle:[:ex | |
10401 | 3725 |
"maybe, fileIn failed, because the load order is wrong. |
3726 |
Work around this by installing the class as autoloaded and |
|
3727 |
loading it" |
|
3728 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3729 |
classesWhichFailedToLoad add:eachClassName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3730 |
Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3731 |
installAutoloadedClassNamed:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3732 |
category:#autoloaded "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3733 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3734 |
revision:nil |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3735 |
numClassInstVars:0. "FIXME" |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3736 |
] do:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3737 |
cls := Smalltalk |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3738 |
fileInClass:eachClassName |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3739 |
package:self package |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3740 |
initialize:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3741 |
lazy:false |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3742 |
silent:true. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3743 |
cls notNil ifTrue:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3744 |
loadedClasses add:cls |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3745 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3746 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3747 |
]. |
10401 | 3748 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3749 |
classesWhichFailedToLoad do:[:eachClassName | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3750 |
(Smalltalk at:eachClassName) autoload. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3751 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3752 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3753 |
loadedClasses do:[:eachLoadedClass | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3754 |
"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
|
3755 |
(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
|
3756 |
eachLoadedClass initialize |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3757 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3758 |
]. |
10401 | 3759 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3760 |
]. |
10401 | 3761 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3762 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3763 |
"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
|
3764 |
"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
|
3765 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3766 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3767 |
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
|
3768 |
"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
|
3769 |
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
|
3770 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3771 |
|libraryName| |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3772 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3773 |
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
|
3774 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3775 |
(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
|
3776 |
"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
|
3777 |
^ true |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3778 |
]. |
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
3779 |
^ 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
|
3780 |
! |
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 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3783 |
"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
|
3784 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3785 |
self hasAllExtensionsLoaded ifFalse:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3786 |
Smalltalk loadExtensionsForPackage:self package. |
10401 | 3787 |
^ true. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3788 |
]. |
10401 | 3789 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3790 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3791 |
"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
|
3792 |
! |
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 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3795 |
"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
|
3796 |
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
|
3797 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3798 |
Class withoutUpdatingChangesDo:[ |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3799 |
aListOfPackages do:[:aPackage | |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3800 |
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
|
3801 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3802 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3803 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3804 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3805 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3806 |
"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
|
3807 |
|
11479 | 3808 |
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
|
3809 |
! |
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 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3812 |
"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
|
3813 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3814 |
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
|
3815 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3816 |
"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
|
3817 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3818 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3819 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3820 |
"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
|
3821 |
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
|
3822 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3823 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3824 |
self projectIsLoaded:false. |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
3825 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3826 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
3827 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3828 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3829 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3830 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3831 |
aSetOfClasses |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3832 |
do:[:aClass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3833 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3834 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3835 |
(aClass theNonMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3836 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3837 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3838 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3839 |
self |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3840 |
addReferencesToClassesFromGlobalsInMethods: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3841 |
(aClass theMetaclass methodDictionary values |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3842 |
select:[:m | m package = aClass package]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3843 |
to:usedClassReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3844 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3845 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3846 |
"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
|
3847 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3848 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3849 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3850 |
someMethods do:[:method | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3851 |
|resources| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3852 |
|
11149 | 3853 |
resources := method resources. |
3854 |
(resources isNil |
|
3855 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
3856 |
and:[(resources includesKey:#'example') not])]) |
|
3857 |
ifTrue:[ |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3858 |
method usedGlobals |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3859 |
do:[:global | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3860 |
|globalsName usedClass| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3861 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3862 |
globalsName := global asSymbol. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3863 |
usedClass := Smalltalk at:globalsName. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3864 |
(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
|
3865 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3866 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3867 |
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
|
3868 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3869 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3870 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3871 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3872 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3873 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3874 |
"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
|
3875 |
"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
|
3876 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3877 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3878 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3879 |
"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
|
3880 |
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
|
3881 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3882 |
|requiredClasses requiredPackageReasons usedClassesWithReasons ignoredPackages| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3883 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3884 |
usedClassesWithReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3885 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3886 |
"my classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3887 |
requiredClasses := (self searchForClassesWithProject:self package) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3888 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3889 |
"my subproject's classes are required" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3890 |
self subProjects do:[:eachProjectName | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3891 |
requiredClasses addAll: (self searchForClassesWithProject:eachProjectName asSymbol) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3892 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3893 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3894 |
"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
|
3895 |
requiredClasses do:[:cls | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3896 |
cls allSuperclassesDo:[:eachSuperclass | |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3897 |
(usedClassesWithReasons at: eachSuperclass ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3898 |
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
|
3899 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3900 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3901 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3902 |
"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
|
3903 |
are required. But: |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3904 |
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
|
3905 |
prerequisites are specified in their package)." |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3906 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3907 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:usedClassesWithReasons. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3908 |
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
|
3909 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3910 |
"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
|
3911 |
ignoredPackages := (self siblingsAreSubProjects |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3912 |
ifTrue:[ self searchForSiblingProjects ] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3913 |
ifFalse:[ self searchForSubProjects ]) asSet. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3914 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3915 |
ignoredPackages add:self package. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3916 |
ignoredPackages add:Project noProjectID. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3917 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3918 |
"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
|
3919 |
requiredPackageReasons := Dictionary new. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3920 |
usedClassesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass | |usedClassPackage| |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3921 |
usedClassPackage := usedClass package. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3922 |
(ignoredPackages includes:usedClassPackage) ifFalse:[ |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3923 |
(requiredPackageReasons at:usedClassPackage ifAbsentPut:[Set new]) |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3924 |
addAll:reasonsPerClass. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3925 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3926 |
]. |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3927 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3928 |
^ requiredPackageReasons |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3929 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3930 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3931 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3932 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3933 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3934 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3935 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3936 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3937 |
"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
|
3938 |
"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
|
3939 |
"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
|
3940 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
3941 |
|
9585 | 3942 |
!ProjectDefinition class methodsFor:'queries'! |
3943 |
||
9627 | 3944 |
definitionClassForPackage: aPackageID |
3945 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
|
3946 |
||
3947 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
|
9585 | 3948 |
! |
3949 |
||
9664 | 3950 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
3951 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
3952 |
||
3953 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
3954 |
! |
|
3955 |
||
3956 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
9627 | 3957 |
|packageDefinitionClassName class| |
3958 |
||
3959 |
packageDefinitionClassName := ProjectDefinition initialClassNameForDefinitionOf:aPackageID. |
|
3960 |
class := Smalltalk classNamed:packageDefinitionClassName. |
|
3961 |
class isNil ifTrue:[ |
|
3962 |
doCreateIfAbsent ifTrue:[ |
|
3963 |
class := self newForPackage:aPackageID. |
|
9664 | 3964 |
"setup before prerequisites are defined" |
3965 |
class setupForType:typeOrNil. |
|
9627 | 3966 |
]. |
9664 | 3967 |
] ifFalse:[ |
3968 |
typeOrNil notNil ifTrue:[ |
|
3969 |
class setupForType:typeOrNil. |
|
3970 |
]. |
|
9627 | 3971 |
]. |
3972 |
^ class |
|
3973 |
||
9664 | 3974 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
3975 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
9585 | 3976 |
! |
3977 |
||
9664 | 3978 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
3979 |
^ (self definitionClassForType:typeOrNil) |
|
3980 |
definitionClassForPackage:newProjectID |
|
3981 |
createIfAbsent:createIfAbsent |
|
3982 |
projectType:typeOrNil |
|
9627 | 3983 |
|
9664 | 3984 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
9627 | 3985 |
! |
3986 |
||
3987 |
definitionClassForType: type |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
3988 |
"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
|
3989 |
|
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
3990 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
9714 | 3991 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
3992 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
9627 | 3993 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
3994 |
self error:'unknown project type'. |
9627 | 3995 |
|
3996 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
9664 | 3997 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
9585 | 3998 |
! |
3999 |
||
10144 | 4000 |
hasAllClassesFullyLoaded |
4001 |
"return true, if all classes are present and loaded" |
|
4002 |
||
4003 |
^ self hasAllClassesLoaded:true |
|
4004 |
||
4005 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
4006 |
! |
|
4007 |
||
9627 | 4008 |
hasAllClassesLoaded |
10205 | 4009 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 4010 |
|
4011 |
^ self hasAllClassesLoaded:false |
|
4012 |
||
4013 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
4014 |
! |
|
4015 |
||
4016 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4017 |
"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
|
4018 |
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
|
4019 |
|
10154 | 4020 |
^ (self |
4021 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
|
4022 |
loaded:checkIfFullyLoaded) |
|
4023 |
and:[ |
|
4024 |
self |
|
4025 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
4026 |
loaded:checkIfFullyLoaded ] |
|
4027 |
||
4028 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
4029 |
! |
|
4030 |
||
4031 |
hasAllCompiledClassesFullyLoaded |
|
4032 |
"return true, if all compiled classes are present and loaded" |
|
4033 |
||
4034 |
^ self hasAllCompiledClassesLoaded:true |
|
4035 |
||
4036 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
4037 |
! |
|
4038 |
||
4039 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4040 |
"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
|
4041 |
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
|
4042 |
|
10154 | 4043 |
^ (self |
10206 | 4044 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
10154 | 4045 |
loaded:checkIfFullyLoaded) |
4046 |
and:[ |
|
4047 |
self |
|
4048 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4049 |
loaded:checkIfFullyLoaded |
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
4050 |
] |
9585 | 4051 |
! |
4052 |
||
9627 | 4053 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
4054 |
"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
|
4055 |
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
|
4056 |
|
9627 | 4057 |
self extensionMethodNames pairWiseDo:[:className :selector | |
4058 |
|cls| |
|
9585 | 4059 |
|
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4060 |
cls := Smalltalk loadedClassNamed:className. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4061 |
cls isNil ifTrue:[ |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4062 |
"/ Transcript showCR:(self name,' missing extension class "',className,'".'). |
10140 | 4063 |
^ false |
4064 |
]. |
|
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
4065 |
"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
|
4066 |
(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
|
4067 |
"/ Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
10140 | 4068 |
^ false |
4069 |
]. |
|
9627 | 4070 |
]. |
4071 |
^ true. |
|
4072 |
||
4073 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 4074 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 4075 |
! |
4076 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4077 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4078 |
"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
|
4079 |
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
|
4080 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4081 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4082 |
classNames do:[:eachClassName | |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4083 |
|cls| |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4084 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4085 |
cls := Smalltalk loadedClassNamed:eachClassName. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4086 |
cls isNil ifTrue:[ |
10414 | 4087 |
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
|
4088 |
^ false |
10154 | 4089 |
]. |
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4090 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
10414 | 4091 |
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
|
4092 |
^ false. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4093 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4094 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4095 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
4096 |
^ true |
10154 | 4097 |
! |
4098 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
4099 |
hasExtensionMethods |
9850 | 4100 |
^ self extensionMethodNames notEmpty |
4101 |
||
4102 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 4103 |
! |
4104 |
||
10140 | 4105 |
isFullyLoaded |
10205 | 4106 |
^ self hasAllCompiledClassesFullyLoaded and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
10140 | 4107 |
|
4108 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
9585 | 4109 |
! ! |
4110 |
||
10774 | 4111 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
4112 |
||
4113 |
showClassDocumentationOf:aClass |
|
4114 |
"used by the HTMLDoc-generator to ask if a classes' protocol is to be documented. |
|
4115 |
(used by expecco, to suppress documentation of workflow- and expecco classes" |
|
4116 |
||
4117 |
^ true |
|
4118 |
||
4119 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
4120 |
! ! |
|
4121 |
||
9726 | 4122 |
!ProjectDefinition class methodsFor:'sanity checks'! |
4123 |
||
4124 |
validateDescription |
|
9956 | 4125 |
|emptyProjects nonProjects emptyOrNonProjects| |
4126 |
||
4127 |
emptyProjects := Set withAll:self subProjects. |
|
4128 |
Smalltalk allClassesDo:[:cls | |
|
4129 |
emptyProjects remove:(cls package) ifAbsent:[]. |
|
4130 |
]. |
|
4131 |
nonProjects := self subProjects select:[:p | |
|
4132 |
(ProjectDefinition definitionClassForPackage: p) isNil |
|
4133 |
]. |
|
4134 |
||
4135 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
4136 |
emptyOrNonProjects addAll:nonProjects. |
|
4137 |
||
4138 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
4139 |
(Dialog |
|
4140 |
confirm:('The following projects are non-existent, empty or without description:\\ ' |
|
4141 |
, ((emptyOrNonProjects |
|
4142 |
asSortedCollection |
|
4143 |
collect:[:p | p allBold]) |
|
4144 |
asStringWith:'\ ') |
|
4145 |
, '\\Continue ?') withCRs |
|
4146 |
yesLabel:'OK' noLabel:'Cancel') |
|
4147 |
ifFalse:[ |
|
4148 |
AbortSignal raise |
|
4149 |
]. |
|
4150 |
]. |
|
4151 |
||
4152 |
"Modified: / 19-09-2006 / 20:30:39 / cg" |
|
9726 | 4153 |
! ! |
4154 |
||
9585 | 4155 |
!ProjectDefinition class methodsFor:'testing'! |
4156 |
||
9664 | 4157 |
isApplicationDefinition |
4158 |
^ false |
|
4159 |
||
4160 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 4161 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
4162 |
! |
|
4163 |
||
4164 |
isGUIApplication |
|
4165 |
^ false |
|
4166 |
||
4167 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 4168 |
! |
4169 |
||
4170 |
isLibraryDefinition |
|
4171 |
^ false |
|
4172 |
||
4173 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 4174 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 4175 |
! |
4176 |
||
9627 | 4177 |
isProjectDefinition |
9664 | 4178 |
"concrete i.e. not abstract" |
4179 |
||
9627 | 4180 |
^ self ~~ ProjectDefinition |
4181 |
||
4182 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
9664 | 4183 |
"Modified: / 23-08-2006 / 14:24:38 / cg" |
9585 | 4184 |
! ! |
4185 |
||
9569 | 4186 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 4187 |
|
4188 |
version |
|
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
4189 |
^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.222 2009-07-01 10:44:03 stefan Exp $' |
9536 | 4190 |
! ! |
9714 | 4191 |
|
4192 |
ProjectDefinition initialize! |