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