author | Claus Gittinger <cg@exept.de> |
Thu, 27 Jun 2019 16:34:40 +0200 | |
changeset 24379 | 852be153b0ec |
parent 24342 | e1077b14f110 |
child 24416 | d9502594f66f |
permissions | -rw-r--r-- |
24342 | 1 |
"{ Encoding: utf8 }" |
2 |
||
9553 | 3 |
" |
4 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
23124 | 5 |
All Rights Reserved |
9553 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
9671 | 14 |
"{ Package: 'stx:libbasic' }" |
9536 | 15 |
|
17289 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
9569 | 18 |
Object subclass:#ProjectDefinition |
17289 | 19 |
instanceVariableNames:'' |
20546 | 20 |
classVariableNames:'AbbrevDictionary AccessLock FolderForSubApplicationsType |
21 |
GUIApplicationType LibraryType NonGUIApplicationType |
|
22 |
PackagesBeingLoaded Verbose' |
|
17289 | 23 |
poolDictionaries:'' |
24 |
category:'System-Support-Projects' |
|
9536 | 25 |
! |
26 |
||
14580 | 27 |
ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded' |
9607 | 28 |
|
29 |
" |
|
30 |
No other class instance variables are inherited by this class. |
|
31 |
" |
|
32 |
! |
|
33 |
||
13592 | 34 |
Object subclass:#AbbrevEntry |
17289 | 35 |
instanceVariableNames:'className fileName category numClassInstVars' |
36 |
classVariableNames:'' |
|
37 |
poolDictionaries:'' |
|
38 |
privateIn:ProjectDefinition |
|
13592 | 39 |
! |
40 |
||
20567 | 41 |
Object subclass:#ApplicationDocumentTypeDescription |
42 |
instanceVariableNames:'extension iconFileOSX mimeType typeName iconFileWindows |
|
43 |
iconFileLinux roleOSX' |
|
44 |
classVariableNames:'' |
|
45 |
poolDictionaries:'' |
|
46 |
privateIn:ProjectDefinition |
|
47 |
! |
|
48 |
||
9569 | 49 |
!ProjectDefinition class methodsFor:'documentation'! |
9553 | 50 |
|
12210 | 51 |
buildingMakefiles |
52 |
" |
|
53 |
You can define additional rules and flag settings for use in the makeFile generation: |
|
54 |
||
55 |
redefinable build-file attributes: |
|
23124 | 56 |
stcOptimizationOptions -> STCLOCALOPT |
57 |
stcWarningOptions -> STCLOCALOPT |
|
58 |
localIncludes_unix -> LOCALINCLUDES (Make.proto) |
|
59 |
localIncludes_win32 -> LOCALINCLUDES (bc.mak) |
|
13419 | 60 |
|
61 |
for applications: |
|
23124 | 62 |
startupClassName |
63 |
startupSelector |
|
13419 | 64 |
|
65 |
for libraries: |
|
12210 | 66 |
|
67 |
" |
|
68 |
! |
|
69 |
||
9553 | 70 |
copyright |
71 |
" |
|
72 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
23124 | 73 |
All Rights Reserved |
9553 | 74 |
|
75 |
This software is furnished under a license and may be used |
|
76 |
only in accordance with the terms of that license and with the |
|
77 |
inclusion of the above copyright notice. This software may not |
|
78 |
be provided or otherwise made available to, or used by, any |
|
79 |
other person. No title to or ownership of the software is |
|
80 |
hereby transferred. |
|
81 |
" |
|
9714 | 82 |
! |
83 |
||
84 |
documentation |
|
85 |
" |
|
12210 | 86 |
As ST/X is (still) very tightly bound with stc, we keep the package and project information |
23124 | 87 |
in a class-object (instead of some project object) and all queries about package contents and |
88 |
attributes are implemented as class methods. |
|
21562 | 89 |
(after all: a class is an object, which can be asked by sending it messages... |
90 |
... so why would one want extra meta-descriptions with extra syntax?) |
|
23124 | 91 |
|
17025 | 92 |
This has the advantage, that it can be compiled and included in a compiled class library just like any other class. |
21562 | 93 |
|
17025 | 94 |
Every package includes a subclass of me (an instance of my meta), which provides useful |
23124 | 95 |
information about the versioning and packaging. |
96 |
Me myself, I know how to generate dependency information and can generate makefiles and other build-support |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
97 |
files for compilation (see the browser's 'Checkin Build Support File' menu item. For more details, see |
21562 | 98 |
section 'Build Support Files' below). |
17025 | 99 |
|
100 |
When a package is loaded from a binary shared class lib (i.e. a compiled class library is loaded |
|
101 |
via 'Smalltalk loadPackage:'), the loading is done in multiple phases: |
|
23124 | 102 |
1) the shared object is loaded, but not installed (registered) in Smalltalk |
103 |
2) the ProjectDefinition class is registered and initialized. |
|
104 |
3) the ProjectDefinition class is asked to load its prerequisites. |
|
105 |
This may recursively lead to other packages to be loaded |
|
106 |
- either as binary class libraries, as bytecode or from source; whichever is found. |
|
107 |
4) the remaining classes and extensions of the package are registered |
|
12210 | 108 |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
109 |
## Some special notes about extension methods: |
17025 | 110 |
if a package is loaded (Smalltalk loadPackage:'foo:bar/baz'), any already loaded package of which |
111 |
methods are overwritten by an extension method of the loaded package, the other package is asked to safe those |
|
23124 | 112 |
methods in its safe(ForOverwrittenMethods). |
17025 | 113 |
Thus, if the other package or any of its classes is asked |
114 |
to file itself out, it can do so using the safe (otherwise, you'd not be able to check the original class into |
|
115 |
its repository while it has an overriding extension loaded). |
|
116 |
||
117 |
Also, the information about which other package was in charge when a method is overwritten is recorded in |
|
23124 | 118 |
extensionOverwriteInfo. |
21562 | 119 |
This is used to correctly reinstall any overwritten method, whenever a package is unloaded. |
9714 | 120 |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
121 |
## Build Support Files |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
122 |
|
21562 | 123 |
To support compilation of a package, ProjectDefinition can generate a set of makefiles and other |
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
124 |
support files to allow that. To see the set of files that should be generated, see #fileNamesToGenerate. |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
125 |
These files are usually generated and saved to the repository upon a commit - the source code management |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
126 |
does (should) care for this. |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
127 |
|
21562 | 128 |
Packages may add more files to this list by defining an (extension) method in project definition class |
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
129 |
and by annotating the method by <file:overwrite:> annotation: |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
130 |
|
23124 | 131 |
* the first parameter is the file name to generate as String, relative to the package root. As directory |
132 |
separator, use slash (as on UNIX), it will be automagically converted to platform's separator. |
|
133 |
* The second parametrer (true or false) tells the SCM whether the file should be generated (and thus |
|
134 |
overwritten) upon each commit (when true) or only the first time (when false). Important: see the |
|
135 |
remark below. |
|
136 |
* The method itself should return file's contents a string. If it returns nil, then the file is *not* |
|
137 |
generated at all. |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
138 |
|
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
139 |
For examples, see #generate_java_build_auto_dot_xml and #generate_java_build_dot_xml defined by STX:LIBJAVA. |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
140 |
|
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
141 |
REMARK: CAUTION: |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
142 |
The overwrite: boolean is currently *not* supported by old SCM managers, more specifically |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
143 |
CVSSourceCodeManager does not support it. CVSSourceCodeManager will always overwrite the file!! |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
144 |
It *is* supported by all SCMs based on new stx:libscm. More specifically, *it is supported* by |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
145 |
Mercurial. |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
146 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
147 |
## Adding additional rules to generated makefiles |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
148 |
|
20986 | 149 |
There are two ways to add additional rules to generated makefiles (Make.proto and bc.mak): |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
150 |
1) overriding #additionalRules_make_dot_proto and/or #additionalRules_bc_dot_mak |
23124 | 151 |
2) adding a method annotated by <file:target:> or <file:target:extends:> |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
152 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
153 |
### Overriding #additionalRules* methods |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
154 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
155 |
You may override #additionalRules_make_dot_proto and/or #additionalRules_bc_dot_mak and return |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
156 |
string containing the code of the rules. This string is inserted to the resulting makefile |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
157 |
as-is. This is the traditional way of doing this. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
158 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
159 |
If you any of the targets defined there to be called as part of standard build, you may |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
160 |
also want to list these targets in #additionalTargets_make_dot_proto and/or |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
161 |
#additionalTargets_bc_dot_mak |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
162 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
163 |
### Adding annotatated method |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
164 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
165 |
Alternatively, you may add one method per rule and annotate it by |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
166 |
<file:target:> or <file:target:extends:> annotation. For example, |
20624 | 167 |
to call 'ant' whenever a package is built, add a method like: |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
168 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
169 |
additionalRuleAnt_make_dot_proto |
23124 | 170 |
<file: 'Make.proto' target: 'ant' extends: 'pre_objs' > |
171 |
||
172 |
^ ' |
|
173 |
java: |
|
174 |
ant -f java/build.xml |
|
175 |
' |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
176 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
177 |
The meaning annotation parameters is the following: |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
178 |
|
23124 | 179 |
* file: <String> - name of the file in which to include |
180 |
the rule. Currently only two values are valid: |
|
181 |
'Make.proto' and 'bc.mak'. |
|
182 |
* target: <String> - name of the target' |
|
183 |
* extends: <String> - optional name of the target that this additional |
|
184 |
rule extends. This means that the extending target (specified by target: |
|
185 |
annotation parameter) is called as part of building of the extended target |
|
186 |
(i.e., the target specified by extends: annotation parameter). Not all targets |
|
187 |
are extendible, see below. |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
188 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
189 |
Method annotated by these annotations should return - when executed - a string |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
190 |
with exactly one rule. The rule name SHOULD match with the name in target: annotation |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
191 |
parameter, otherwise the extends: parameter will not work correctly. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
192 |
If the methor returns nil, the rule is not included in resulting makefile. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
193 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
194 |
The advantage of this approach is that it allows for additional, non-basic packages to hook in |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
195 |
and add their own targets if they want to. The disadvantage is that if package makefiles |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
196 |
are regenerated without this extending package loaded, targets are lost. To avid this, |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
197 |
you may want to add this non-basic package to prerequsites. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
198 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
199 |
Currently, this mechanism is used by STX:LIBJAVA to call ant to compile package's java classes. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
200 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
201 |
#### Extendable targets |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
202 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
203 |
Make.proto: |
23124 | 204 |
all |
205 |
clean |
|
206 |
...more to be added... |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
207 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
208 |
bc.mak |
23124 | 209 |
ALL |
210 |
clean |
|
211 |
...more to be added... |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
212 |
|
9714 | 213 |
" |
9553 | 214 |
! ! |
9536 | 215 |
|
9569 | 216 |
!ProjectDefinition class methodsFor:'instance creation'! |
9559 | 217 |
|
23866 | 218 |
definitionClassForMonticelloPackage:aMonicelloPackagename |
219 |
^ self definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:false |
|
220 |
||
221 |
" |
|
222 |
self definitionClassForMonticelloPackage:'foobar' |
|
223 |
" |
|
224 |
! |
|
225 |
||
226 |
definitionClassForMonticelloPackage:aMonicelloPackagename createIfAbsent:createIfAbsent |
|
227 |
^ self allSubclasses |
|
228 |
detect:[:eachProjectDefinition | |
|
229 |
eachProjectDefinition monticelloPackageName = aMonicelloPackagename ] |
|
230 |
ifNone:[ |
|
231 |
|dfn squeakPackageInfo| |
|
232 |
||
233 |
createIfAbsent ifTrue:[ |
|
234 |
dfn := ApplicationDefinition |
|
235 |
definitionClassForPackage:'mc:',aMonicelloPackagename createIfAbsent:true projectType:GUIApplicationType. |
|
236 |
||
237 |
"/ if the squeak-stuff is loaded, use it. |
|
238 |
PackageInfo notNil ifTrue:[ |
|
239 |
squeakPackageInfo := PackageInfo allSubclasses |
|
240 |
detect:[:pi | pi new packageName = aMonicelloPackagename] ifNone:nil. |
|
241 |
]. |
|
242 |
||
243 |
squeakPackageInfo notNil ifTrue:[ |
|
244 |
dfn classNames:(squeakPackageInfo new classes collect:[:each | each name]). |
|
245 |
]. |
|
246 |
] ifFalse:[ |
|
247 |
nil |
|
248 |
] |
|
249 |
] |
|
250 |
||
251 |
" |
|
252 |
self definitionClassForMonticelloPackage:'foobar' |
|
253 |
self definitionClassForMonticelloPackage:'foobar' createIfAbsent:true |
|
254 |
" |
|
255 |
||
256 |
"Modified: / 30-10-2010 / 00:26:07 / cg" |
|
257 |
! |
|
258 |
||
12371 | 259 |
definitionClassForPackage:aPackageID |
17025 | 260 |
"given a packageID (such as 'stx:libfoo/bar'), lookup the corresponding peoject definition class. |
261 |
Return it, or nil if not present" |
|
262 |
||
12371 | 263 |
^ self definitionClassForPackage:aPackageID createIfAbsent:false |
264 |
||
17025 | 265 |
" |
266 |
ProjectDefinition definitionClassForPackage:'stx:libbasic' |
|
267 |
ProjectDefinition definitionClassForPackage:'stx:libfoobarBaz' |
|
268 |
" |
|
269 |
||
12371 | 270 |
"Modified: / 17-08-2006 / 14:33:35 / cg" |
271 |
! |
|
272 |
||
273 |
definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent |
|
274 |
^ self definitionClassForPackage:aPackageID createIfAbsent:doCreateIfAbsent projectType:nil |
|
275 |
||
276 |
"Modified: / 23-08-2006 / 14:29:15 / cg" |
|
277 |
! |
|
278 |
||
279 |
definitionClassForPackage: aPackageID createIfAbsent: doCreateIfAbsent projectType:typeOrNil |
|
280 |
|packageDefinitionClassName class| |
|
281 |
||
17344 | 282 |
packageDefinitionClassName := self projectDefinitionClassNameForDefinitionOf:aPackageID. |
12371 | 283 |
class := Smalltalk classNamed:packageDefinitionClassName. |
284 |
class isNil ifTrue:[ |
|
23124 | 285 |
doCreateIfAbsent ifTrue:[ |
286 |
typeOrNil = GUIApplicationType ifTrue:[ |
|
287 |
class := ApplicationDefinition newForPackage:aPackageID. |
|
288 |
] ifFalse:[ |
|
289 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
|
290 |
class := ApplicationDefinition newForPackage:aPackageID. |
|
291 |
] ifFalse:[ |
|
292 |
typeOrNil = FolderForSubApplicationsType ifTrue:[ |
|
293 |
class := FolderForProjectsDefinition newForPackage:aPackageID. |
|
294 |
] ifFalse:[ |
|
295 |
class := LibraryDefinition newForPackage:aPackageID. |
|
296 |
] |
|
297 |
] |
|
298 |
]. |
|
299 |
"setup before prerequisites are defined" |
|
300 |
class setupForType:typeOrNil. |
|
301 |
"/ look what is there and include it; is this ok ? |
|
302 |
class compileDescriptionMethods |
|
303 |
]. |
|
12371 | 304 |
] ifFalse:[ |
23124 | 305 |
typeOrNil notNil ifTrue:[ |
306 |
doCreateIfAbsent ifTrue:[ |
|
307 |
class projectType == typeOrNil ifFalse: [ |
|
308 |
class setupForType:typeOrNil. |
|
309 |
] |
|
310 |
]. |
|
311 |
]. |
|
12371 | 312 |
]. |
313 |
^ class |
|
314 |
||
315 |
"Created: / 23-08-2006 / 14:29:21 / cg" |
|
316 |
"Modified: / 23-08-2006 / 15:35:26 / cg" |
|
317 |
! |
|
318 |
||
319 |
definitionClassForPackage:newProjectID projectType:typeOrNil createIfAbsent:createIfAbsent |
|
320 |
^ (self definitionClassForType:typeOrNil) |
|
23124 | 321 |
definitionClassForPackage:newProjectID |
322 |
createIfAbsent:createIfAbsent |
|
323 |
projectType:typeOrNil |
|
12371 | 324 |
|
325 |
"Created: / 23-08-2006 / 14:28:53 / cg" |
|
326 |
! |
|
327 |
||
328 |
definitionClassForType: type |
|
329 |
"answer the class that describes a give project type" |
|
330 |
||
331 |
(type = LibraryType) ifTrue:[ ^ LibraryDefinition ]. |
|
332 |
(type = GUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
333 |
(type = NonGUIApplicationType) ifTrue:[ ^ ApplicationDefinition ]. |
|
16682 | 334 |
(type = FolderForSubApplicationsType) ifTrue:[ ^ FolderForProjectsDefinition ]. |
12371 | 335 |
(type = 'Application') ifTrue:[ ^ ApplicationDefinition ]. "/ temporary - for backward compat. |
336 |
self error:'unknown project type'. |
|
337 |
||
338 |
"Created: / 17-08-2006 / 14:46:28 / cg" |
|
339 |
"Modified: / 23-08-2006 / 13:49:27 / cg" |
|
340 |
! |
|
341 |
||
9559 | 342 |
newForPackage:packageID |
13419 | 343 |
^ self |
23124 | 344 |
newNamed:(self projectDefinitionClassNameForDefinitionOf:packageID) |
345 |
package:packageID. |
|
9559 | 346 |
|
347 |
"Created: / 11-08-2006 / 14:27:19 / cg" |
|
348 |
! |
|
349 |
||
350 |
newNamed:newName package:packageID |
|
351 |
|newClass| |
|
352 |
||
353 |
"/ for now, we are strict. |
|
17344 | 354 |
self assert:(self projectDefinitionClassNameForDefinitionOf:packageID) = newName. |
9569 | 355 |
self assert:(self ~~ ProjectDefinition). "ProjectDefinition is abstract" |
9559 | 356 |
|
357 |
newClass := self |
|
23124 | 358 |
subclass:(newName asSymbol) |
359 |
instanceVariableNames:'' |
|
360 |
classVariableNames:'' |
|
361 |
poolDictionaries:'' |
|
362 |
category:(self defaultCategory). |
|
9559 | 363 |
|
364 |
newClass package:packageID asSymbol. |
|
365 |
^ newClass |
|
366 |
||
367 |
"Created: / 09-08-2006 / 17:57:37 / fm" |
|
368 |
"Modified: / 09-08-2006 / 19:27:53 / fm" |
|
9569 | 369 |
"Modified: / 17-08-2006 / 17:24:23 / cg" |
9559 | 370 |
! ! |
371 |
||
9569 | 372 |
!ProjectDefinition class methodsFor:'accessing'! |
9536 | 373 |
|
23452 | 374 |
additionalClassResources |
375 |
"for projects which need additional resources from some other |
|
376 |
package (i.e. plugins), redefine this to return a collection |
|
377 |
of inherited definitions. |
|
378 |
i.e. change to ^ { foo_package classResources }" |
|
379 |
||
380 |
^ #() |
|
381 |
! |
|
382 |
||
12575 | 383 |
directory |
384 |
"for packageId compatibility" |
|
385 |
||
386 |
^ self moduleDirectory |
|
387 |
||
388 |
" |
|
389 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
|
390 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 391 |
stx_libbasic3 moduleDirectory |
392 |
cg_croquet moduleDirectory |
|
393 |
cg_croquet package asPackageId module |
|
394 |
cg_croquet moduleDirectory |
|
395 |
stx_goodies_xml_vw moduleDirectory |
|
12575 | 396 |
" |
397 |
||
398 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
399 |
"Modified: / 18-08-2006 / 12:18:33 / cg" |
|
400 |
! |
|
401 |
||
13823 | 402 |
extensionsRevisionInfoForManager:managerOrNil |
403 |
"return the revisionInfo object for my extensions for a particular source code manager. |
|
404 |
Return nil, if there is either no manager, or I have no extensions" |
|
405 |
||
406 |
|mgr versionMethod revString| |
|
407 |
||
408 |
(mgr := managerOrNil) isNil ifTrue:[ |
|
23124 | 409 |
mgr := SourceCodeManagerUtilities sourceCodeManagerFor:self. |
410 |
mgr isNil ifTrue:[ |
|
411 |
^ nil |
|
412 |
]. |
|
13823 | 413 |
]. |
414 |
||
415 |
versionMethod := mgr nameOfVersionMethodForExtensions. |
|
416 |
(self class implements:versionMethod) ifFalse:[^ nil]. |
|
417 |
||
418 |
revString := self perform:(mgr nameOfVersionMethodForExtensions) ifNotUnderstood:nil. |
|
419 |
revString isNil ifTrue:[ |
|
23124 | 420 |
^ nil. |
13823 | 421 |
]. |
422 |
^ mgr revisionInfoFromString:revString. |
|
423 |
||
424 |
" |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
425 |
(stx_libcomp extensionsRevisionInfoForManager:nil) revision |
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
426 |
(stx_libbasic extensionsRevisionInfoForManager:nil) |
13823 | 427 |
" |
428 |
||
429 |
"Created: / 25-11-2011 / 14:34:01 / cg" |
|
430 |
! |
|
431 |
||
19996 | 432 |
fullPackageName |
433 |
"all components with underlines" |
|
434 |
||
435 |
^ self fullPackageNameFor: self package |
|
436 |
||
437 |
" |
|
438 |
stx_libwidg2 packageName |
|
439 |
stx_libwidg2 fullPackageName |
|
440 |
stx_goodies_refactoryBrowser_browser packageName |
|
441 |
stx_goodies_refactoryBrowser_browser fullPackageName |
|
442 |
" |
|
443 |
! |
|
444 |
||
445 |
fullPackageNameFor: aProjectID |
|
446 |
^ (aProjectID copyReplaceAny:':/' with:$_) |
|
447 |
||
448 |
" |
|
23124 | 449 |
stx_goodies_refactoryBrowser_lint fullPackageNameFor:#stx_goodies_refactoryBrowser_lint |
19996 | 450 |
" |
451 |
! |
|
452 |
||
9536 | 453 |
initialClassNameForDefinitionOf:aPackageId |
17344 | 454 |
<resource: #obsolete> |
455 |
||
456 |
"now obsolete - left here for backward compatibility |
|
457 |
given a package-ID, return an appropriate class name for this package" |
|
458 |
||
459 |
^ self projectDefinitionClassNameForDefinitionOf:aPackageId |
|
460 |
||
461 |
" |
|
462 |
ProjectDefinition projectDefinitionClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
|
463 |
ProjectDefinition projectDefinitionClassNameForDefinitionOf:'stx:libbasic' |
|
464 |
ProjectDefinition projectDefinitionClassNameForDefinitionOf:'stx:goodies/xml' |
|
465 |
ProjectDefinition projectDefinitionClassNameForDefinitionOf:'stx/goodies/xml' |
|
466 |
ProjectDefinition projectDefinitionClassNameForDefinitionOf:'stx_goodies_xml' |
|
467 |
" |
|
9536 | 468 |
! |
469 |
||
470 |
libraryName |
|
9575 | 471 |
^ self package asPackageId libraryName |
9536 | 472 |
|
9559 | 473 |
" |
9688 | 474 |
bosch_dapasx_datenbasis libraryName |
9575 | 475 |
stx_libbasic3 libraryName |
9559 | 476 |
" |
9536 | 477 |
|
478 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 479 |
"Modified: / 18-08-2006 / 12:36:45 / cg" |
9536 | 480 |
! |
481 |
||
13419 | 482 |
libraryNameFor:aProjectID |
9575 | 483 |
^ aProjectID asPackageId libraryName |
9536 | 484 |
|
9559 | 485 |
" |
9575 | 486 |
bosch_dapasx_datenbasis libraryName |
487 |
stx_libbasic3 libraryNameFor:'stx:libbasic' |
|
13419 | 488 |
stx_libbasic3 libraryNameFor:'bosch:dapasx/datenbasis' |
9559 | 489 |
" |
9536 | 490 |
|
491 |
"Modified: / 09-08-2006 / 18:20:29 / fm" |
|
9575 | 492 |
"Modified: / 18-08-2006 / 12:37:02 / cg" |
9536 | 493 |
! |
494 |
||
14577 | 495 |
loadDirectory |
19731 | 496 |
"if I was loaded from a directory (as opposed to loaded via a dll or from a source code manager), |
14577 | 497 |
return that directory. Otherwise return nil." |
498 |
||
14583 | 499 |
^ self getAttribute:#projectDirectory |
14577 | 500 |
! |
501 |
||
502 |
loadDirectory:aDirectory |
|
503 |
"remember the directory from which I was loaded from" |
|
504 |
||
14583 | 505 |
self setAttribute:#projectDirectory to:aDirectory |
14577 | 506 |
! |
507 |
||
9536 | 508 |
module |
9559 | 509 |
^ self moduleOfClass:self |
9536 | 510 |
|
9559 | 511 |
" |
512 |
bosch_dapasx_datenbasis_Definition module |
|
513 |
DapasX_Datenbasis module |
|
13419 | 514 |
stx_libbasic3 module |
515 |
stx_libbasic3 directory |
|
9559 | 516 |
" |
9536 | 517 |
|
518 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
519 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
9575 | 520 |
"Modified: / 17-08-2006 / 20:50:46 / cg" |
9536 | 521 |
! |
522 |
||
523 |
moduleDirectory |
|
9575 | 524 |
^ (PackageId from:self package) directory |
9536 | 525 |
|
9559 | 526 |
" |
9575 | 527 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
528 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
13419 | 529 |
stx_libbasic3 moduleDirectory |
530 |
cg_croquet moduleDirectory |
|
531 |
cg_croquet package asPackageId module |
|
532 |
cg_croquet moduleDirectory |
|
533 |
stx_goodies_xml_vw moduleDirectory |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
534 |
cg_demos_demo1 moduleDirectory |
9559 | 535 |
" |
9536 | 536 |
|
537 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
14339 | 538 |
"Modified (comment): / 05-09-2012 / 10:07:18 / cg" |
9536 | 539 |
! |
540 |
||
13419 | 541 |
moduleDirectoryFor:aProjectID |
9559 | 542 |
^ (aProjectID subStrings:$:) last |
9536 | 543 |
|
9559 | 544 |
" |
23124 | 545 |
bosch_dapasx_datenbasis_Definition moduleDirectory |
546 |
bosch_dapasx_parameter_system_Definition moduleDirectory |
|
9559 | 547 |
" |
9536 | 548 |
|
549 |
"Created: / 08-08-2006 / 20:25:39 / fm" |
|
9559 | 550 |
"Modified: / 17-08-2006 / 14:13:41 / cg" |
9536 | 551 |
! |
552 |
||
9891 | 553 |
moduleDirectory_win32 |
15528 | 554 |
^ (PackageId from:self package) directory copyReplaceAll:$/ with:$\ |
9891 | 555 |
|
556 |
" |
|
557 |
bosch_dapasx_datenbasis moduleDirectory_win32 |
|
558 |
bosch_dapasx_parameter_system moduleDirectory_win32 |
|
13419 | 559 |
stx_libbasic3 moduleDirectory_win32 |
9891 | 560 |
" |
561 |
||
562 |
"Created: / 14-09-2006 / 20:19:17 / cg" |
|
563 |
! |
|
564 |
||
10562 | 565 |
moduleDirectory_win32For: projectID |
566 |
||
15528 | 567 |
^(self moduleDirectoryFor:projectID) copyReplaceAll:$/ with:$\ |
10562 | 568 |
|
569 |
" |
|
570 |
self moduleDirectory_win32For: #'bosch:dapasx/pav_vergleich' |
|
571 |
self moduleDirectory_win32For: #'stx:goodies/xml/stx' |
|
572 |
self moduleDirectory_win32For: #'stx:libbasic2' |
|
573 |
" |
|
15528 | 574 |
|
575 |
"Modified: / 16-07-2013 / 19:47:24 / cg" |
|
10562 | 576 |
! |
577 |
||
13419 | 578 |
moduleFor:aProjectID |
9559 | 579 |
^ (aProjectID subStrings:$:) first |
9536 | 580 |
|
9559 | 581 |
" |
582 |
DapasXProject module |
|
583 |
DapasX_Datenbasis module |
|
584 |
" |
|
9536 | 585 |
|
586 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 587 |
"Modified: / 17-08-2006 / 14:13:46 / cg" |
9536 | 588 |
! |
589 |
||
13419 | 590 |
moduleOfClass:aClass |
9559 | 591 |
^ self moduleFor:aClass package |
9536 | 592 |
|
9559 | 593 |
" |
594 |
DapasXProject module |
|
595 |
DapasX_Datenbasis module |
|
596 |
" |
|
9536 | 597 |
|
598 |
"Created: / 09-08-2006 / 16:16:16 / fm" |
|
9559 | 599 |
"Modified: / 17-08-2006 / 14:13:51 / cg" |
9536 | 600 |
! |
601 |
||
12360
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
602 |
monticelloPackageName |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
603 |
"hook for packages which have been loaded from monticello" |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
604 |
|
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
605 |
^ nil |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
606 |
! |
18b9a4b30466
preps to allow for monticello packages to be loaded
Claus Gittinger <cg@exept.de>
parents:
12357
diff
changeset
|
607 |
|
9559 | 608 |
msdosPathToPackage:toPackageID from:fromPackageID |
609 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
13419 | 610 |
|
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
|
611 |
|parts1 parts2 common up down| |
9852 | 612 |
|
613 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
614 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
615 |
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
|
616 |
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
|
617 |
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
|
618 |
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
|
619 |
down isEmpty ifTrue:[^ '.']. |
23124 | 620 |
^ down. |
9852 | 621 |
]. |
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
|
622 |
down isEmpty ifTrue:[ |
23124 | 623 |
^ up. |
9714 | 624 |
]. |
13419 | 625 |
^ up, '\', down |
9901 | 626 |
|
9559 | 627 |
" |
628 |
self msdosPathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' |
|
13419 | 629 |
self msdosPathToPackage:'stx:libbasic' from:'bosch:dapasx/application' |
630 |
self msdosPathToPackage:'bosch:dapasx/application' from:'stx:libbasic' |
|
631 |
self msdosPathToPackage:'exept:expecco' from:'exept:expecco/application' |
|
632 |
self msdosPathToPackage:'exept:expecco/application' from:'exept:expecco' |
|
9559 | 633 |
" |
9536 | 634 |
|
9559 | 635 |
"Created: / 17-08-2006 / 14:26:39 / cg" |
9901 | 636 |
"Modified: / 14-09-2006 / 22:04:56 / cg" |
9536 | 637 |
! |
638 |
||
12028 | 639 |
packageDirectory |
19731 | 640 |
"if I was loaded from a directory (as opposed to loaded via a dll or from a source code manager), |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
641 |
return that directory. |
14577 | 642 |
Otherwise ask Smalltalk for my package directory a long the package path." |
643 |
||
14580 | 644 |
|loadDirectory| |
645 |
||
14586 | 646 |
(loadDirectory := self loadDirectory) ifNotNil:[ ^ loadDirectory ]. |
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
647 |
^ Smalltalk packageDirectoryForPackageId: self package |
12028 | 648 |
|
649 |
"Created: / 15-06-2009 / 12:01:18 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
650 |
! |
|
651 |
||
9536 | 652 |
packageName |
9688 | 653 |
"the last component" |
9536 | 654 |
|
9688 | 655 |
^ self packageNameFor: self package |
9536 | 656 |
|
9688 | 657 |
" |
10810 | 658 |
stx_libwidg2 packageName |
16812 | 659 |
stx_goodies_refactoryBrowser_browser packageName |
9688 | 660 |
bosch_dapasx_hw_schnittstellen packageName |
661 |
bosch_dapasx_datenbasis packageName |
|
13419 | 662 |
bosch_dapasx_parameter_system packageName |
9688 | 663 |
" |
9536 | 664 |
|
665 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
666 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
667 |
! |
|
668 |
||
669 |
packageNameFor: aProjectID |
|
9688 | 670 |
^ (aProjectID asCollectionOfSubstringsSeparatedByAny:':/') last. |
9536 | 671 |
|
9688 | 672 |
" |
673 |
bosch_dapasx_hw_schnittstellen packageName |
|
674 |
bosch_dapasx_datenbasis packageName |
|
13419 | 675 |
bosch_dapasx_parameter_system packageName |
676 |
cg_croquet packageName |
|
677 |
stx_goodies_xml_vw packageName |
|
678 |
stx_goodies_xml_vw packageDirectory |
|
9688 | 679 |
" |
9536 | 680 |
|
681 |
"Created: / 08-08-2006 / 20:24:53 / fm" |
|
682 |
"Modified: / 09-08-2006 / 16:16:37 / fm" |
|
683 |
"Modified: / 11-08-2006 / 14:02:32 / cg" |
|
684 |
! |
|
685 |
||
686 |
parentProject |
|
23124 | 687 |
"return the packageID of the parent project. |
17236 | 688 |
That is the projectID of the package above in the folder hierarchy" |
689 |
||
10306 | 690 |
^ (self parentProjectFor: self package) |
9536 | 691 |
|
17236 | 692 |
" |
693 |
bosch_dapasx_hw_schnittstellen_Definition parentProject |
|
694 |
DapasX_Datenbasis parentProject |
|
695 |
||
23124 | 696 |
stx_libbasic parentProject |
697 |
stx_goodies_refactoryBrowser_lint parentProject |
|
17236 | 698 |
" |
9536 | 699 |
! |
700 |
||
701 |
parentProjectFor: aProjectID |
|
17236 | 702 |
"given a packageID symbol or string, return the packageID of the |
23124 | 703 |
parent project. |
17236 | 704 |
That is the projectID of the package above in the folder hierarchy" |
705 |
||
706 |
|path| |
|
707 |
||
708 |
path := aProjectID splitByAny:':/'. |
|
709 |
path size == 1 ifTrue:[^ nil]. |
|
710 |
path size == 2 ifTrue:[^ path first]. |
|
711 |
^ path first , ':' , ((path copyFrom:2 to:path size - 1) asStringWith:'/') |
|
712 |
||
713 |
" |
|
714 |
bosch_dapasx_hw_schnittstellen parentProject |
|
715 |
||
23124 | 716 |
self parentProjectFor:'bosch:dapasx' |
717 |
self parentProjectFor:'bosch:dapasx/hw_schnittstellen' |
|
718 |
self parentProjectFor:'stx:goodies/refactoryBrowser/lint' |
|
719 |
self parentProjectFor:'stx:goodies/svg' |
|
720 |
self parentProjectFor:'stx:libbasic' |
|
721 |
self parentProjectFor:'exept:expecco/application' |
|
722 |
||
723 |
self parentProjectFor:'stx' |
|
724 |
self parentProjectFor:'exept' |
|
17236 | 725 |
" |
9536 | 726 |
! |
727 |
||
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
728 |
pathSeparator:platformName |
16328 | 729 |
^ platformName == #unix ifTrue:['/'] ifFalse:['\']. |
9850 | 730 |
! |
731 |
||
732 |
pathTo:aBaseFilename inPackage:aPackageID architecture:arch |
|
733 |
"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" |
|
734 |
||
16328 | 735 |
|p separator| |
736 |
||
737 |
separator := self pathSeparator:arch. |
|
738 |
p := self pathToPackage:aPackageID withSeparator:separator. |
|
739 |
aBaseFilename isNil ifTrue:[^ p]. |
|
740 |
^ p , separator, aBaseFilename |
|
741 |
! |
|
742 |
||
743 |
pathToPackage:toPackageID from:fromPackageID withSeparator:pathSeparator |
|
744 |
"Returns the path to the package defined by aPackageID relative to my path" |
|
745 |
||
746 |
|parts1 parts2 common up down rel oneUp| |
|
747 |
||
748 |
oneUp := '..', pathSeparator. |
|
749 |
||
750 |
parts1 := fromPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
751 |
parts2 := toPackageID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
752 |
common := parts1 commonPrefixWith:parts2. |
|
753 |
common notEmpty ifTrue:[ |
|
23516 | 754 |
up := ((1 to:parts1 size - common size) collect:[:p | oneUp]) asStringWith:''. |
755 |
down := (parts2 copyFrom:common size+1) asStringWith:pathSeparator. |
|
756 |
(up isEmpty and:[down isEmpty]) ifTrue:[^ '.']. |
|
757 |
(up endsWith:'/') ifTrue:[ |
|
758 |
down isEmpty ifTrue:[^ up copyButLast] |
|
759 |
]. |
|
760 |
(up isEmpty) ifTrue:[ |
|
761 |
(down startsWith:'/') ifTrue:[^ down copyButFirst] |
|
762 |
]. |
|
763 |
^ up , down |
|
9850 | 764 |
]. |
16328 | 765 |
|
766 |
rel := (self topRelativePathToPackage:toPackageID withSeparator:pathSeparator). |
|
767 |
(rel startsWith:('stx', pathSeparator)) ifTrue:[ |
|
23516 | 768 |
^ '$(TOP)', (rel copyFrom:'stx/' size) "/ notice: the separator remains |
9850 | 769 |
]. |
16328 | 770 |
|
771 |
^ '$(TOP)', pathSeparator, oneUp, rel. |
|
772 |
||
773 |
" |
|
774 |
self pathToPackage:'bosch:dapasx/kernel' from:'bosch:dapasx/application' withSeparator:'\' |
|
775 |
self pathToPackage:'stx:libbasic' from:'bosch:dapasx/application' withSeparator:'\' |
|
776 |
self pathToPackage:'bosch:dapasx/application' from:'stx:libbasic' withSeparator:'\' |
|
23516 | 777 |
exept_expecco_application pathToPackage:'exept:expecco' from:'exept:expecco/application' withSeparator:'/' |
778 |
exept_expecco_application pathToPackage:'exept:expecco/plugins/guiBrowser' from:'exept:expecco/application' withSeparator:'/' |
|
16328 | 779 |
" |
780 |
||
781 |
"Created: / 14-09-2006 / 15:21:10 / cg" |
|
23516 | 782 |
"Modified: / 07-11-2018 / 17:24:26 / Claus Gittinger" |
16328 | 783 |
! |
784 |
||
785 |
pathToPackage:aPackageID withSeparator:pathSeparator |
|
9850 | 786 |
"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" |
787 |
||
10875
ed4bd37a995e
Fix unix Make.proto generation: resource file copy
Stefan Vogel <sv@exept.de>
parents:
10872
diff
changeset
|
788 |
|rel| |
9850 | 789 |
|
9880 | 790 |
aPackageID asPackageId module = self package asPackageId module ifTrue:[ |
23474 | 791 |
^ self pathToPackage:aPackageID from:self package withSeparator:pathSeparator. |
9880 | 792 |
]. |
16328 | 793 |
rel := self topRelativePathToPackage:aPackageID withSeparator:pathSeparator. |
794 |
(rel startsWith:('stx', pathSeparator)) ifTrue:[ |
|
23474 | 795 |
^ '$(TOP)', (rel copyFrom:'stx/' size). "keep the separator" |
9850 | 796 |
] ifFalse:[ |
23474 | 797 |
^ '$(TOP)', pathSeparator, '..', pathSeparator, rel |
9850 | 798 |
] |
799 |
||
800 |
" |
|
16328 | 801 |
exept_expecco_application pathToPackage:'exept:expecco/application' withSeparator:'\' |
802 |
exept_expecco_application pathToPackage:'exept:expecco/report' withSeparator:'\' |
|
23474 | 803 |
exept_expecco_application make_dot_proto_resource_rules |
16328 | 804 |
stx_libbasic pathToPackage:'exept:expecco/application' withSeparator:'\' |
9850 | 805 |
" |
806 |
||
807 |
"Modified: / 16-08-2006 / 18:55:41 / User" |
|
808 |
"Created: / 14-09-2006 / 13:21:23 / cg" |
|
9880 | 809 |
"Modified: / 14-09-2006 / 15:23:59 / cg" |
23474 | 810 |
"Modified (comment): / 26-10-2018 / 21:06:56 / Claus Gittinger" |
9850 | 811 |
! |
812 |
||
16328 | 813 |
pathToTopFor:aProjectID withSeparator:aPathSeparator |
814 |
"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" |
|
815 |
||
816 |
|parts oneUp| |
|
817 |
||
818 |
oneUp := '..', aPathSeparator. |
|
819 |
||
820 |
parts := aProjectID asCollectionOfSubstringsSeparatedByAny:':/'. |
|
821 |
||
822 |
parts first = 'stx' ifTrue:[ |
|
23124 | 823 |
parts size == 1 ifTrue:[^ '']. |
824 |
^ (((2 to:parts size-1) collect:[:p | oneUp]) asStringWith:'') , '..' |
|
9880 | 825 |
]. |
826 |
||
16328 | 827 |
^ ((parts collect:[:p | oneUp]) asStringWith:'') , 'stx' |
828 |
||
829 |
" |
|
830 |
self pathToTopFor: #'exept' with:'/' |
|
831 |
self pathToTopFor: #'exept:expecco' with:'/' |
|
832 |
self pathToTopFor: #'exept:expecco/application' with:'/' |
|
833 |
self pathToTopFor: #'stx' with:'/' |
|
834 |
self pathToTopFor: #'stx:libview' with:'/' |
|
835 |
self pathToTopFor: #'stx:goodies/foo' with:'/' |
|
836 |
" |
|
837 |
||
838 |
"Created: / 14-09-2006 / 14:59:53 / cg" |
|
839 |
! |
|
840 |
||
841 |
pathToTopWithSeparator:aPathSeparator |
|
9714 | 842 |
"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" |
843 |
||
16328 | 844 |
^ self pathToTopFor:self package withSeparator:aPathSeparator |
845 |
||
846 |
" |
|
847 |
exept_expecco_application pathToTopWithSeparator:'\' |
|
848 |
stx_libbasic pathToTopWithSeparator:'\' |
|
849 |
stx_goodies_xml pathToTopWithSeparator:'\' |
|
850 |
stx_libhtml pathToTopWithSeparator:'\' |
|
851 |
stx_goodies_refactoryBrowser_changes pathToTopWithSeparator:'\' |
|
9714 | 852 |
" |
853 |
||
854 |
"Created: / 09-08-2006 / 15:45:54 / fm" |
|
9852 | 855 |
"Modified: / 14-09-2006 / 15:01:47 / cg" |
9714 | 856 |
! |
857 |
||
17344 | 858 |
projectDefinitionClassNameForDefinitionOf:aPackageId |
859 |
"given a package-ID, return an appropriate class name for this package" |
|
860 |
||
861 |
|s| |
|
862 |
||
18503 | 863 |
s := aPackageId asString copy replaceAny:' :/-' with:$_. |
17344 | 864 |
(s endsWith:$_) ifTrue:[ |
23124 | 865 |
s := s copyButLast:1 |
17344 | 866 |
]. |
867 |
^ s |
|
868 |
||
869 |
" |
|
870 |
ProjectDefinition initialClassNameForDefinitionOf:'bosch:dapasx/interactiver_editor' |
|
871 |
ProjectDefinition initialClassNameForDefinitionOf:'stx:libbasic' |
|
872 |
ProjectDefinition initialClassNameForDefinitionOf:'stx:goodies/xml' |
|
873 |
ProjectDefinition initialClassNameForDefinitionOf:'stx/goodies/xml' |
|
874 |
ProjectDefinition initialClassNameForDefinitionOf:'stx_goodies_xml' |
|
875 |
" |
|
876 |
! |
|
877 |
||
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
878 |
projectIsLoaded |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
879 |
"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
|
880 |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
881 |
projectIsLoaded isNil ifTrue:[ |
23124 | 882 |
projectIsLoaded := false. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
883 |
]. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
884 |
^ projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
885 |
|
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
886 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
887 |
stx_libbasic projectIsLoaded |
13251 | 888 |
(ProjectDefinition definitionClassForPackage:#'stx:libbasic') projectIsLoaded |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
889 |
" |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
890 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
891 |
|
15760 | 892 |
projectIsLoaded:aBoolean |
893 |
projectIsLoaded := aBoolean. |
|
894 |
aBoolean ifTrue:[ |
|
23124 | 895 |
"register myself as dependent - I want to get notified on method changes" |
896 |
self class addDependent:self. |
|
897 |
self postLoadAction. |
|
898 |
self executeHooks: #postLoad. |
|
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
899 |
]. |
10433
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
900 |
! |
4768502f5cbf
Do not try to load already loaded projects
Stefan Vogel <sv@exept.de>
parents:
10430
diff
changeset
|
901 |
|
21449 | 902 |
projectTags |
903 |
"a list of resource-tags used in the project. |
|
904 |
These are offered in the browser's methodList menu as 'Tag as' items. |
|
905 |
Allowing convenient tagging for things like '<resource: EXPECCO_API>'. |
|
906 |
When redefined, a collection of useful tag-strings should be returned." |
|
23124 | 907 |
|
21449 | 908 |
^ #() |
909 |
||
910 |
"Created: / 15-02-2017 / 16:42:48 / cg" |
|
911 |
! |
|
912 |
||
9850 | 913 |
topRelativePathTo:aBaseFilename inPackage:aPackageID architecture:arch |
13419 | 914 |
"Returns the path to stx counting the number of $/ and $: in the package name |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
915 |
and adding for each one '../' to get the ST/X top directory" |
9850 | 916 |
|
16328 | 917 |
|p separator| |
918 |
||
919 |
separator := self pathSeparator:arch. |
|
920 |
p := self topRelativePathToPackage:aPackageID withSeparator:separator. |
|
921 |
aBaseFilename isNil ifTrue:[^ p]. |
|
922 |
^ p , separator, aBaseFilename |
|
923 |
! |
|
924 |
||
925 |
topRelativePathToPackage:aPackageID withSeparator:aDirectorySeparator |
|
18503 | 926 |
"Returns the path to the package as specified by aPackageID relative to the top directory. |
927 |
Basically this simply replaces colons and slashes by the OS's path separator." |
|
13419 | 928 |
|
16328 | 929 |
^ aPackageID asString copyReplaceAny:':/' with:aDirectorySeparator first |
930 |
||
931 |
" |
|
932 |
self topRelativePathToPackage:'stx:goodies/xml' withSeparator:'\' |
|
933 |
self topRelativePathToPackage:'bosch:dapasx/kernel' withSeparator:'\' |
|
9850 | 934 |
" |
935 |
||
936 |
"Created: / 14-09-2006 / 13:20:40 / cg" |
|
9536 | 937 |
! ! |
938 |
||
15950 | 939 |
!ProjectDefinition class methodsFor:'accessing - coverage'! |
940 |
||
941 |
excludedFromCoverage |
|
942 |
"List of classes and/or methods excluded from coverage report. |
|
943 |
Entries maybe ClassName or #(ClassName selector) |
|
944 |
||
945 |
Please note that certain classes and methods are excluded |
|
946 |
in #Builder::CoverageReport>>excludedFromCoverage:. |
|
947 |
" |
|
948 |
^ #() |
|
949 |
||
950 |
"Created: / 28-06-2013 / 02:11:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
951 |
"Modified (comment): / 28-06-2013 / 11:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
952 |
! |
|
953 |
||
954 |
excludedFromCoverage: aMethod |
|
955 |
"Return true if given method should be excluded from coverage |
|
18224 | 956 |
info. This method may be redefined in subclasses to automagically omit methods |
15950 | 957 |
matching some criteria. |
958 |
||
959 |
Please note that certain classes and methods are excluded |
|
960 |
in Builder::CoverageReport>>excludedFromCoverage:. |
|
961 |
" |
|
962 |
||
18224 | 963 |
|excluded mclass mselector| |
964 |
||
965 |
excluded := self excludedFromCoverage. |
|
966 |
excluded notEmptyOrNil ifTrue:[ |
|
23124 | 967 |
mclass := aMethod mclass. |
968 |
mselector := aMethod selector. |
|
969 |
excluded do:[:eachSpecLine| |
|
970 |
eachSpecLine isArray ifTrue:[ |
|
971 |
(eachSpecLine first = mclass name and:[eachSpecLine second == mselector]) ifTrue:[ ^ true ]. |
|
972 |
]. |
|
973 |
eachSpecLine = mclass name ifTrue:[ ^ true ]. |
|
974 |
]. |
|
18224 | 975 |
]. |
976 |
||
977 |
^ false |
|
15950 | 978 |
|
979 |
"Created: / 28-06-2013 / 02:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
980 |
"Modified (comment): / 28-06-2013 / 11:25:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
981 |
! ! |
|
982 |
||
24342 | 983 |
|
17228 | 984 |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
985 |
!ProjectDefinition class methodsFor:'accessing - packaging'! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
986 |
|
12371 | 987 |
classNames:aCollectionOfClassNames |
988 |
"set the set of classes" |
|
989 |
||
990 |
self classNamesAndAttributes:aCollectionOfClassNames usingCompiler:nil |
|
991 |
! |
|
992 |
||
993 |
classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
|
13419 | 994 |
"set the set of classes. and attributes |
995 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12371 | 996 |
which has to do the job. |
997 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
998 |
||
999 |
|oldSpec newCode| |
|
1000 |
||
1001 |
oldSpec := self classNamesAndAttributes. |
|
1002 |
newSpec = oldSpec ifTrue: [^ self]. |
|
1003 |
||
1004 |
newCode := self classNamesAndAttributes_codeFor:newSpec. |
|
1005 |
||
15006 | 1006 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
12371 | 1007 |
! |
1008 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1009 |
excludeClasses:toExclude usingCompiler:compilerOrNil |
13419 | 1010 |
"exclude (remove from classList) a number of classes. |
1011 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1012 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1013 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1014 |
|
12371 | 1015 |
|newSpec| |
1016 |
||
1017 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1018 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1019 |
toExclude do:[:eachClassToExclude | |
23124 | 1020 |
|className| |
1021 |
className := eachClassToExclude theNonMetaclass name. |
|
1022 |
(self allClassNames includes:className) ifTrue:[ |
|
1023 |
|idx| |
|
1024 |
||
1025 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
|
1026 |
idx ~~ 0 ifTrue:[ |
|
1027 |
newSpec := newSpec copyWithoutIndex:idx. |
|
1028 |
]. |
|
1029 |
]. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1030 |
]. |
12371 | 1031 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1032 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1033 |
"Created: / 30-08-2007 / 18:28:28 / cg" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1034 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1035 |
|
15069 | 1036 |
excludeMethodFor:selector inClassNamed:className usingCompiler:compilerOrNil |
1037 |
"exclude (remove from extensionList) a method by name. |
|
1038 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
1039 |
which has to do the job. |
|
1040 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
1041 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
1042 |
||
15764 | 1043 |
|oldSpec newSpec newCode idx| |
15069 | 1044 |
|
1045 |
oldSpec := self extensionMethodNames. |
|
15764 | 1046 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
1047 |
idx := (1 to:oldSpec size-1 by:2) |
23124 | 1048 |
detect:[:i | |
1049 |
((oldSpec at:i) = className) |
|
1050 |
and:[ (oldSpec at:i+1) = selector ]] |
|
1051 |
ifNone:[ ^ self ]. |
|
15069 | 1052 |
|
1053 |
"/ attention: there are two spec-elements per method |
|
15764 | 1054 |
newSpec := oldSpec copyWithoutIndex:idx toIndex:idx+1. |
15069 | 1055 |
|
1056 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
1057 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
|
1058 |
! |
|
1059 |
||
15005 | 1060 |
excludeMethods:toRemove usingCompiler:compilerOrNil |
1061 |
"exclude (remove from extensionList) a number of methods. |
|
1062 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
1063 |
which has to do the job. |
|
1064 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
1065 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
1066 |
||
1067 |
|oldSpec newSpec newCode extensionMethods| |
|
1068 |
||
1069 |
oldSpec := self extensionMethodNames. |
|
1070 |
newSpec := oldSpec copy. |
|
1071 |
extensionMethods := self extensionMethods. |
|
1072 |
||
1073 |
toRemove do:[:eachMethodToRemove | |
|
23124 | 1074 |
|className selector idx| |
1075 |
||
1076 |
(extensionMethods includes:eachMethodToRemove) ifTrue:[ |
|
1077 |
className := eachMethodToRemove mclass name. |
|
1078 |
selector := eachMethodToRemove selector. |
|
1079 |
idx := (1 to:newSpec size-1 by:2) |
|
1080 |
detect:[:i | |
|
1081 |
((newSpec at:i) = className) |
|
1082 |
and:[ (newSpec at:i+1) = selector ]] |
|
1083 |
ifNone:nil. |
|
1084 |
idx notNil ifTrue:[ |
|
1085 |
"/ attention: there are two spec-elements per method |
|
1086 |
newSpec := newSpec removeFromIndex:idx toIndex:idx+1 |
|
1087 |
] |
|
1088 |
]. |
|
15005 | 1089 |
]. |
1090 |
||
1091 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
15006 | 1092 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15005 | 1093 |
! |
1094 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1095 |
includeClasses:toInclude usingCompiler:compilerOrNil |
13419 | 1096 |
"include (add to classList) a number of classes. |
1097 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1098 |
which has to do the job. |
15005 | 1099 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
1100 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1101 |
|
12371 | 1102 |
|oldSpec newSpec| |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1103 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1104 |
oldSpec := self classNamesAndAttributes. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1105 |
newSpec := oldSpec copy. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1106 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1107 |
toInclude do:[:eachClassToInclude | |
23124 | 1108 |
|className| |
1109 |
||
1110 |
className := eachClassToInclude theNonMetaclass name. |
|
1111 |
(self compiled_classNames includes:className) ifFalse:[ |
|
1112 |
| idx entry| |
|
1113 |
||
1114 |
idx := oldSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
|
1115 |
idx == 0 ifTrue:[ |
|
1116 |
newSpec := newSpec copyWith:(Array with:className) |
|
1117 |
] ifFalse:[ |
|
1118 |
entry := newSpec at:idx. |
|
1119 |
entry isArray ifTrue:[ |
|
1120 |
entry := entry copyWithout:#autoload |
|
1121 |
]. |
|
1122 |
newSpec at:idx put:entry |
|
1123 |
]. |
|
1124 |
]. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1125 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1126 |
|
12371 | 1127 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1128 |
! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1129 |
|
15005 | 1130 |
includeMethods:toInclude usingCompiler:compilerOrNil |
1131 |
"include (add to extensionList) a number of methods. |
|
1132 |
Because this requires compilation of my extensionMethodNames-method, a compiler can be passed in, |
|
1133 |
which has to do the job. |
|
1134 |
This is used by the systembrowser to pass in a CodeGeneratorTool with undo support. |
|
1135 |
If nil is passed in, the recurlar compiler is used (no undo support)" |
|
1136 |
||
1137 |
|oldSpec newSpec newCode extensionMethods| |
|
1138 |
||
1139 |
oldSpec := self extensionMethodNames. |
|
1140 |
newSpec := oldSpec copy. |
|
1141 |
extensionMethods := self extensionMethods. |
|
1142 |
||
1143 |
toInclude do:[:eachMethodToInclude | |
|
23124 | 1144 |
(extensionMethods includes:eachMethodToInclude) ifFalse:[ |
1145 |
newSpec := newSpec copyWith:eachMethodToInclude mclass name. |
|
1146 |
newSpec := newSpec copyWith:eachMethodToInclude selector. |
|
1147 |
]. |
|
15005 | 1148 |
]. |
1149 |
||
1150 |
newCode := self extensionMethodNames_code_For:newSpec. |
|
15006 | 1151 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15005 | 1152 |
! |
1153 |
||
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1154 |
makeClassesAutoloaded:toMakeAutoloaded usingCompiler:compilerOrNil |
13419 | 1155 |
"include as autoloaded (add to classList) a number of classes. |
1156 |
Because this requires compilation of my classList-method, a compiler can be passed in, |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1157 |
which has to do the job. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1158 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1159 |
|
12371 | 1160 |
|newSpec| |
1161 |
||
1162 |
newSpec := self classNamesAndAttributes copy. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1163 |
|
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1164 |
toMakeAutoloaded do:[:eachClassToMakeAutoloaded | |
23124 | 1165 |
|className| |
1166 |
||
1167 |
className := eachClassToMakeAutoloaded theNonMetaclass name. |
|
1168 |
(self autoloaded_classNames includes:className) ifFalse:[ |
|
1169 |
|idx entry| |
|
1170 |
||
1171 |
idx := newSpec findFirst:[:entry | entry = className or:[entry first = className]]. |
|
1172 |
idx == 0 ifTrue:[ |
|
1173 |
newSpec := newSpec copyWith:(Array with:className with:#autoload) |
|
1174 |
] ifFalse:[ |
|
1175 |
entry := newSpec at:idx. |
|
1176 |
entry isArray ifTrue:[ |
|
1177 |
entry := (entry copyWithout:#autoload) copyWith:#autoload. |
|
1178 |
] ifFalse:[ |
|
1179 |
entry := Array with:entry with:#autoload |
|
1180 |
]. |
|
1181 |
newSpec at:idx put:entry. |
|
1182 |
]. |
|
1183 |
]. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1184 |
]. |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1185 |
|
12371 | 1186 |
self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil |
14982 | 1187 |
! |
1188 |
||
15052 | 1189 |
updateContentsMethodsCodeUsingCompiler:compilerOrNil ignoreOldDefinition:doRegenerate |
1190 |
"regenerate the contents-describing methods. |
|
1191 |
This searches through the system and picks classes and extension methods |
|
1192 |
which have me as package and lists them in the generated class- |
|
1193 |
and extensionMethods methods. |
|
1194 |
If doRegenerate is true, forget any any previous contents info; |
|
1195 |
otherwise, merge new items into the existing lists." |
|
1196 |
||
1197 |
Class packageQuerySignal |
|
23124 | 1198 |
answer:self package |
1199 |
do:[ |
|
1200 |
self |
|
1201 |
forEachContentsMethodsCodeToCompileDo: |
|
1202 |
[:code :category | |
|
1203 |
(compilerOrNil ? self theMetaclass compilerClass) |
|
1204 |
compile:code |
|
1205 |
forClass:self theMetaclass |
|
1206 |
inCategory:category. |
|
1207 |
] |
|
1208 |
ignoreOldDefinition:doRegenerate |
|
1209 |
]. |
|
15052 | 1210 |
! |
1211 |
||
14982 | 1212 |
updateExtensionMethodNamesUsingCompiler:compilerOrNil |
1213 |
"set the set of extension methods |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
1214 |
Because this requires compilation of my extensionMethodNames-method, |
14982 | 1215 |
a compiler can be passed in, which has to do the job. |
1216 |
(this is used by the systembrowser to pass in a CodeGeneratorTool with undo support)" |
|
1217 |
||
1218 |
|newCode| |
|
1219 |
||
1220 |
newCode := self extensionMethodNames_code. |
|
15006 | 1221 |
self compile:newCode categorized:'description - contents' using:compilerOrNil |
15052 | 1222 |
! |
1223 |
||
1224 |
updateMethodsCodeUsingCompiler:compilerOrNil ignoreOldDefinition:doRegenerate |
|
1225 |
"regenerate the all contents- plus version describing methods. |
|
1226 |
This searches through the system and picks classes and extension methods |
|
1227 |
which have me as package and lists them in the generated class- |
|
1228 |
and extensionMethods methods. |
|
1229 |
If doRegenerate is true, forget any any previous contents info; |
|
1230 |
otherwise, merge new items into the existing lists." |
|
1231 |
||
1232 |
Class packageQuerySignal |
|
23124 | 1233 |
answer:self package |
1234 |
do:[ |
|
1235 |
self |
|
1236 |
forEachMethodsCodeToCompileDo: |
|
1237 |
[:code :category | |
|
1238 |
(compilerOrNil ? self theMetaclass compilerClass) |
|
1239 |
compile:code |
|
1240 |
forClass:self theMetaclass |
|
1241 |
inCategory:category. |
|
1242 |
] |
|
1243 |
ignoreOldDefinition:doRegenerate |
|
1244 |
]. |
|
12339
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1245 |
! ! |
918b3eddd723
#excludeClasses:usingCompiler:
Claus Gittinger <cg@exept.de>
parents:
12338
diff
changeset
|
1246 |
|
13411 | 1247 |
!ProjectDefinition class methodsFor:'accessing - tests'! |
1248 |
||
13419 | 1249 |
excludedFromTestSuite |
13411 | 1250 |
"List of testcases and/or tests excluded from testsuite. |
1251 |
Entries maybe ClassName or #(ClassName testName) |
|
1252 |
" |
|
1253 |
^ #() |
|
1254 |
||
1255 |
"Created: / 03-06-2011 / 16:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1256 |
! |
|
1257 |
||
1258 |
testSuite |
|
13544 | 1259 |
"generate and return a testSuite containing all of my test-classes" |
13411 | 1260 |
|
1261 |
|suite classes| |
|
1262 |
||
1263 |
suite := TestSuite named:self package. |
|
13695 | 1264 |
classes := self classes |
23124 | 1265 |
select:[:each | |
1266 |
[ |
|
1267 |
each isLoaded ifFalse:[each autoload]. |
|
1268 |
(each isTestCaseLike) and:[ each isAbstract not ] |
|
1269 |
] on: Autoload autoloadFailedSignal do:[ |
|
1270 |
'FAILED TO LOAD: ' infoPrint. |
|
1271 |
each name infoPrintCR. |
|
1272 |
false |
|
1273 |
] |
|
1274 |
]. |
|
13544 | 1275 |
|
13411 | 1276 |
classes := classes asSortedCollection:[:a :b | a name <= b name ]. |
13695 | 1277 |
classes do: [:eachClass | |
23124 | 1278 |
| tests | |
1279 |
||
1280 |
eachClass name infoPrintCR. |
|
1281 |
tests := eachClass suite tests. |
|
1282 |
tests := tests reject:[:test|self shouldExcludeTest: test]. |
|
1283 |
suite addTests: tests |
|
13544 | 1284 |
]. |
1285 |
^ suite |
|
13411 | 1286 |
|
1287 |
"Created: / 01-04-2011 / 15:20:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1288 |
"Modified: / 03-06-2011 / 17:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13568 | 1289 |
"Modified: / 08-08-2011 / 14:59:45 / cg" |
12028 | 1290 |
! ! |
1291 |
||
9714 | 1292 |
!ProjectDefinition class methodsFor:'class initialization'! |
1293 |
||
1294 |
initialize |
|
14776
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1295 |
AccessLock isNil ifTrue:[ |
23124 | 1296 |
LibraryType := #Library. |
1297 |
GUIApplicationType := #'GUI-Application'. |
|
1298 |
NonGUIApplicationType := #'NonGUI-Application'. |
|
1299 |
FolderForSubApplicationsType := #'Folder for Subapplications'. |
|
1300 |
AccessLock := Semaphore forMutualExclusion name:'ProjectDefinition Lock'. |
|
1301 |
Verbose := false. |
|
1302 |
PackagesBeingLoaded := Set new. |
|
14776
28a1f265cd65
add user friendly name to semaphores
Stefan Vogel <sv@exept.de>
parents:
14764
diff
changeset
|
1303 |
]. |
9714 | 1304 |
|
10121 | 1305 |
" |
1306 |
self initialize |
|
1307 |
" |
|
1308 |
||
13592 | 1309 |
"Modified: / 18-08-2011 / 13:48:31 / cg" |
10121 | 1310 |
! |
1311 |
||
1312 |
initializeAllProjectDefinitions |
|
16179 | 1313 |
"tells all already loaded project definition classes that they are loaded |
15761 | 1314 |
(i.e. calls postLoadAction). |
1315 |
This needs everything else (especially the compiler etc.) to be initialized. |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
1316 |
Therefore, it's not invoked by the projDef's #initialize, |
15761 | 1317 |
but instead explicitely, by Smalltalk as a late step in the startup." |
13695 | 1318 |
|
13609 | 1319 |
|isStandAloneApp| |
1320 |
||
1321 |
isStandAloneApp := Smalltalk isStandAloneApp. |
|
1322 |
||
1323 |
self allSubclassesDo:[:eachProjectDefinitionClass | |
|
23124 | 1324 |
eachProjectDefinitionClass isAbstract ifFalse:[ |
1325 |
isStandAloneApp ifFalse:[ |
|
1326 |
eachProjectDefinitionClass installAutoloadedClasses. |
|
1327 |
]. |
|
1328 |
eachProjectDefinitionClass projectIsLoaded:true. |
|
1329 |
] |
|
13609 | 1330 |
]. |
10115 | 1331 |
|
9714 | 1332 |
" |
1333 |
self initialize |
|
1334 |
" |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1335 |
|
10121 | 1336 |
"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
|
1337 |
! |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1338 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1339 |
installAutoloadedClasses |
12372 | 1340 |
"install all of my autoloaded classes (if any)" |
1341 |
||
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1342 |
|classesToFixClassFileName| |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1343 |
|
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1344 |
classesToFixClassFileName := OrderedCollection new. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1345 |
|
13592 | 1346 |
self autoloaded_classNames do:[:className | |
23124 | 1347 |
|cls| |
1348 |
||
1349 |
"/ 'install as autoloaded: ' errorPrint. className errorPrintCR. |
|
1350 |
(cls := Smalltalk classNamed:className) isNil ifTrue:[ |
|
1351 |
Error handle:[:ex | |
|
1352 |
(self name,' [warning]: failed to install autoloaded: ',className) errorPrintCR. |
|
1353 |
(self name,' [info]: reason: ',ex description) errorPrintCR. |
|
1354 |
"/ thisContext fullPrintAll. |
|
1355 |
] do:[ |
|
1356 |
cls := Smalltalk |
|
1357 |
installAutoloadedClassNamed:className |
|
1358 |
category:'* as yet unknown category *' |
|
1359 |
package:self package |
|
1360 |
revision:nil |
|
1361 |
]. |
|
1362 |
cls notNil ifTrue:[ |
|
1363 |
classesToFixClassFileName add:cls. |
|
1364 |
]. |
|
1365 |
]. |
|
13592 | 1366 |
]. |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1367 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1368 |
Smalltalk addStartBlock:[ |
23124 | 1369 |
|abbrevs| |
1370 |
||
1371 |
abbrevs := self abbrevs. |
|
1372 |
"/ patch the classFileNames |
|
1373 |
classesToFixClassFileName do:[:cls | |
|
1374 |
|entry classFilenameFromAbbreviations| |
|
1375 |
||
1376 |
entry := abbrevs at:cls name ifAbsent:nil. |
|
1377 |
entry notNil ifTrue:[ |
|
1378 |
classFilenameFromAbbreviations := entry fileName. |
|
1379 |
classFilenameFromAbbreviations notNil ifTrue:[ |
|
1380 |
classFilenameFromAbbreviations := classFilenameFromAbbreviations,'.st'. |
|
1381 |
(classFilenameFromAbbreviations ~= cls getClassFilename) ifTrue:[ |
|
1382 |
cls setClassFilename:classFilenameFromAbbreviations |
|
1383 |
]. |
|
1384 |
]. |
|
1385 |
] |
|
1386 |
]. |
|
1387 |
||
1388 |
"/ patch the categories |
|
1389 |
Class withoutUpdatingChangesDo:[ |
|
1390 |
|entry| |
|
1391 |
||
1392 |
self classNames do:[:nm | |
|
1393 |
|cls| |
|
1394 |
||
1395 |
((cls := Smalltalk at: nm) notNil |
|
1396 |
and:[ cls isLoaded not |
|
1397 |
and:[ (entry := abbrevs at:cls name ifAbsent:[nil]) notNil |
|
1398 |
]]) ifTrue:[ |
|
1399 |
cls category: (entry category) |
|
1400 |
] |
|
1401 |
] |
|
1402 |
] |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1403 |
]. |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1404 |
|
13411 | 1405 |
|
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1406 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1407 |
stx_libbasic installAutoloadedClasses |
12268
b3cd2af642f2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
12264
diff
changeset
|
1408 |
stx_libhtml installAutoloadedClasses |
13592 | 1409 |
stx_libtool2 installAutoloadedClasses |
10113
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1410 |
" |
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1411 |
|
78086bf25905
install autoloaded classes (if not already present)
Claus Gittinger <cg@exept.de>
parents:
10106
diff
changeset
|
1412 |
"Created: / 23-10-2006 / 16:02:12 / cg" |
13411 | 1413 |
"Modified: / 06-03-2011 / 18:26:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
1414 |
"Modified: / 20-08-2011 / 23:32:32 / cg" |
9714 | 1415 |
! ! |
1416 |
||
9998 | 1417 |
!ProjectDefinition class methodsFor:'code generation'! |
1418 |
||
20567 | 1419 |
applicationIconFileNameLinux_code |
1420 |
^ String streamContents:[:s | |
|
23124 | 1421 |
s nextPutLine:'applicationIconFileNameLinux'. |
1422 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon).'. |
|
1423 |
s nextPutLine:' This is currently unused (will be for desktop definitions)"'. |
|
1424 |
s cr; |
|
1425 |
nextPutLine:' ^ nil'; |
|
1426 |
nextPutLine:' " ^ self applicationName "'. |
|
20567 | 1427 |
]. |
1428 |
||
1429 |
" |
|
1430 |
self applicationIconFileNameLinux_code |
|
1431 |
stx_libbasic3 applicationIconFileNameLinux_code |
|
1432 |
" |
|
1433 |
||
1434 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1435 |
! |
|
1436 |
||
1437 |
applicationIconFileNameOSX_code |
|
1438 |
^ String streamContents:[:s | |
|
23124 | 1439 |
s nextPutLine:'applicationIconFileNameOSX'. |
1440 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon).'. |
|
1441 |
s nextPutLine:' This is used to create the osx/Info.plist file"'. |
|
1442 |
s cr; |
|
1443 |
nextPutLine:' ^ nil'; |
|
1444 |
nextPutLine:' " ^ self applicationName "'. |
|
20567 | 1445 |
]. |
1446 |
||
1447 |
" |
|
1448 |
self applicationIconFileNameOSX_code |
|
1449 |
stx_libbasic3 applicationIconFileNameOSX_code |
|
1450 |
" |
|
1451 |
||
1452 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
21569 | 1453 |
"Modified: / 24-02-2017 / 11:55:32 / cg" |
20567 | 1454 |
! |
1455 |
||
1456 |
applicationIconFileNameWindows_code |
|
1457 |
^ String streamContents:[:s | |
|
23124 | 1458 |
s nextPutLine:'applicationIconFileNameWindows'. |
1459 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon).'. |
|
1460 |
s nextPutLine:' This will be included in the rc-resource file for Windowsdeployment"'. |
|
1461 |
s cr; |
|
1462 |
nextPutLine:' ^ nil'; |
|
1463 |
nextPutLine:' " ^ self applicationName "'. |
|
20567 | 1464 |
]. |
1465 |
||
1466 |
" |
|
1467 |
self applicationIconFileNameWindows_code |
|
1468 |
stx_libbasic3 applicationIconFileNameWindows_code |
|
1469 |
" |
|
1470 |
||
1471 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1472 |
! |
|
1473 |
||
11072 | 1474 |
applicationIconFileName_code |
20567 | 1475 |
"obsolete - replaced by three separate methods as-per-OS" |
23124 | 1476 |
|
11072 | 1477 |
^ String streamContents:[:s | |
23124 | 1478 |
s nextPutLine:'applicationIconFileName'. |
1479 |
s nextPutLine:' "Return the name (without suffix) of an icon-file (the app''s icon);'. |
|
1480 |
s nextPutLine:' "will be included in the rc-resource file"'. |
|
1481 |
s cr; |
|
1482 |
nextPutLine:' ^ nil'; |
|
1483 |
nextPutLine:' " ^ self applicationName "'. |
|
11072 | 1484 |
]. |
1485 |
||
1486 |
" |
|
13873 | 1487 |
self applicationIconFileName_code |
1488 |
stx_libbasic3 applicationIconFileName_code |
|
11072 | 1489 |
" |
1490 |
||
1491 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
1492 |
! |
|
1493 |
||
23179 | 1494 |
checkForBadReferences:prerequisiteList |
23125 | 1495 |
"check, that there are no 'illegal' references to prerequisites. |
1496 |
If there is a bad prrequisite, ask the user whether to abort." |
|
1497 |
||
23179 | 1498 |
prerequisiteList keysDo:[:eachPackageSymbol| |
23125 | 1499 |
|defClass| |
1500 |
||
1501 |
defClass := self definitionClassForPackage:eachPackageSymbol. |
|
1502 |
(defClass isProjectDefinition and:[defClass isPluginDefinition]) ifTrue:[ |
|
1503 |
(self confirm:('Bad cross-plugin requirement to: %1%<cr>%<cr>Proceed?' bindWith:eachPackageSymbol)) ifFalse:[ |
|
1504 |
AbortOperationRequest raiseRequest. |
|
1505 |
]. |
|
1506 |
]. |
|
1507 |
] |
|
23179 | 1508 |
|
1509 |
"Modified (format): / 02-07-2018 / 18:56:29 / cg" |
|
23125 | 1510 |
! |
1511 |
||
10393 | 1512 |
classNamesAndAttributes_codeFor:aSpecArray |
1513 |
"generate method code returning all classes of the project from the given spec." |
|
1514 |
||
1515 |
^ String streamContents:[:s | |
|
23124 | 1516 |
s nextPutLine:'classNamesAndAttributes'. |
1517 |
s nextPutLine:' "lists the classes which are to be included in the project.'. |
|
1518 |
s nextPutLine:' Each entry in the list may be: a single class-name (symbol),'. |
|
1519 |
s nextPutLine:' or an array-literal consisting of class name and attributes.'. |
|
1520 |
s nextPutLine:' Attributes are: #autoload or #<os> where os is one of win32, unix,..."'. |
|
1521 |
s nextPutLine:''. |
|
1522 |
s nextPutLine:' ^ #('. |
|
1523 |
s nextPutLine:' "<className> or (<className> attributes...) in load order"'. |
|
1524 |
||
1525 |
(self classNamesAndAttributesFromSpecArray:aSpecArray) do:[:entry | |
|
1526 |
s spaces:8. |
|
1527 |
entry storeArrayElementOn:s. |
|
1528 |
s cr. |
|
1529 |
]. |
|
1530 |
s nextPutLine:' )' |
|
10393 | 1531 |
]. |
1532 |
||
1533 |
" |
|
1534 |
stx_libbasic3 classNamesAndAttributes_codeFor:(stx_libbasic3 classNamesAndAttributes) |
|
1535 |
exept_expecco classNamesAndAttributes_codeFor:(exept_expecco classNamesAndAttributes) |
|
1536 |
" |
|
1537 |
||
1538 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
1539 |
"Created: / 19-02-2007 / 15:43:27 / cg" |
|
1540 |
! |
|
1541 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1542 |
classNamesAndAttributes_code_ignoreOldEntries:ignoreOldEntries ignoreOldDefinition:ignoreOldDefinition |
10010 | 1543 |
"generate method code returning all classes of the project. |
1544 |
Platform attributes are kept from the old definition. |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1545 |
If ignoreOldEntries is true, the list is completely recreated; |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1546 |
if false, existing entries are preserved. |
10010 | 1547 |
If ignoreOldDefinition is true, the autoload attribute is set/reset if |
13419 | 1548 |
the class is installed as autoloaded in the image (i.e. the state in the image is taken). |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1549 |
If false, it is taken from an existing definition in #classNamesAndAttributes" |
10010 | 1550 |
|
20673 | 1551 |
|newSpec oldSpec ignored| |
10393 | 1552 |
|
1553 |
oldSpec := self classNamesAndAttributesAsSpecArray. |
|
1554 |
ignored := self ignoredClassNames asSet. |
|
1555 |
newSpec := OrderedCollection new. |
|
1556 |
||
1557 |
ignoreOldEntries ifFalse:[ |
|
23124 | 1558 |
oldSpec do:[:oldEntry | |
1559 |
|newEntry className cls | |
|
1560 |
||
1561 |
newEntry := oldEntry copy. |
|
1562 |
className := newEntry first. |
|
1563 |
||
1564 |
(ignored includes:className) ifFalse:[ |
|
1565 |
cls := Smalltalk classNamed:className. |
|
1566 |
cls notNil ifTrue:[ |
|
1567 |
ignoreOldDefinition ifTrue:[ |
|
1568 |
cls isLoaded ifFalse:[ |
|
1569 |
(newEntry includes:#autoload) ifFalse:[ |
|
1570 |
newEntry := newEntry copyWith:#autoload. |
|
1571 |
]. |
|
1572 |
]. |
|
1573 |
]. |
|
1574 |
"JV @ 2010-06-19 |
|
1575 |
Force merge default class attributes with existing ones" |
|
1576 |
newEntry := self mergeDefaultClassAttributesFor: cls with: newEntry. |
|
1577 |
newSpec add:newEntry. |
|
1578 |
] |
|
1579 |
]. |
|
1580 |
]. |
|
10393 | 1581 |
]. |
1582 |
self searchForClasses do:[:eachClass | |
|
23124 | 1583 |
|className attributes oldSpecEntry oldAttributes newEntry| |
1584 |
||
1585 |
eachClass isJavaClass ifFalse:[ |
|
1586 |
className := eachClass name. |
|
1587 |
(ignored includes:className) ifFalse:[ |
|
1588 |
oldSpecEntry := oldSpec detect:[:entry | entry first = className] ifNone:nil. |
|
1589 |
||
1590 |
(ignoreOldEntries or:[oldSpecEntry isNil]) ifTrue:[ |
|
1591 |
(eachClass isLoaded not or:[eachClass isPrivate not]) ifTrue:[ |
|
1592 |
(self additionalClassNamesAndAttributes includes:className) ifFalse:[ |
|
1593 |
(oldSpecEntry size > 1) ifTrue:[ |
|
1594 |
oldAttributes := oldSpecEntry copyFrom:2. |
|
1595 |
]. |
|
1596 |
||
1597 |
ignoreOldDefinition ifTrue:[ |
|
1598 |
"take autoload attribute from classes state in the image" |
|
1599 |
oldAttributes notNil ifTrue:[ |
|
1600 |
attributes := oldAttributes copyWithout:#autoload. |
|
1601 |
] ifFalse:[ |
|
1602 |
attributes := #() |
|
1603 |
]. |
|
1604 |
eachClass isLoaded ifFalse:[ |
|
1605 |
attributes := attributes copyWith:#autoload. |
|
1606 |
]. |
|
1607 |
] ifFalse:[ |
|
1608 |
"keep any existing attribute" |
|
1609 |
oldAttributes notNil ifTrue:[ |
|
1610 |
attributes := oldAttributes. |
|
1611 |
] ifFalse:[ |
|
1612 |
attributes := eachClass isLoaded ifTrue:[ #() ] ifFalse:[ #(autoload) ]. |
|
1613 |
]. |
|
1614 |
]. |
|
1615 |
"JV @ 2010-06-19 |
|
1616 |
Support for additional class attributes and programming language attribute" |
|
1617 |
attributes := self mergeDefaultClassAttributesFor: eachClass with: attributes. |
|
1618 |
||
1619 |
newEntry := Array with:className. |
|
1620 |
attributes notEmptyOrNil ifTrue:[ |
|
1621 |
newEntry := newEntry , attributes. |
|
1622 |
]. |
|
1623 |
newSpec add:newEntry. |
|
1624 |
] |
|
1625 |
] |
|
1626 |
] |
|
1627 |
] |
|
1628 |
] |
|
9998 | 1629 |
]. |
17109 | 1630 |
^ self classNamesAndAttributes_codeFor:newSpec |
10393 | 1631 |
|
13419 | 1632 |
" |
10393 | 1633 |
stx_libbasic3 classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
1634 |
exept_expecco classNamesAndAttributes_code_ignoreOldEntries:false ignoreOldDefinition:true |
|
1635 |
" |
|
9998 | 1636 |
|
1637 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1638 |
"Created: / 10-10-2006 / 22:00:50 / cg" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
1639 |
"Modified: / 06-09-2011 / 07:48:52 / cg" |
16802
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
1640 |
"Modified: / 30-07-2014 / 20:40:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22333 | 1641 |
"Modified (comment): / 08-11-2017 / 17:59:04 / mawalch" |
9998 | 1642 |
! |
1643 |
||
1644 |
companyName_code |
|
20567 | 1645 |
"generate code that answers the company name." |
1646 |
||
12541 | 1647 |
^ self companyName_codeFor:self companyName |
1648 |
||
1649 |
" |
|
1650 |
self companyName_code |
|
1651 |
stx_libbasic3 companyName_code |
|
1652 |
" |
|
1653 |
||
1654 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
1655 |
! |
|
1656 |
||
1657 |
companyName_codeFor:aString |
|
20567 | 1658 |
"generate code that answers aString as the company name." |
1659 |
||
9998 | 1660 |
^ String streamContents:[:s | |
23124 | 1661 |
s nextPutLine:'companyName'. |
1662 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #companyName) comment; nextPutLine:'"'. |
|
1663 |
s cr; nextPutLine:' ^ ',aString storeString. |
|
9998 | 1664 |
]. |
1665 |
||
1666 |
" |
|
1667 |
self companyName_code |
|
1668 |
stx_libbasic3 companyName_code |
|
1669 |
" |
|
1670 |
||
1671 |
"Created: / 18-08-2006 / 16:20:42 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
1672 |
"Modified: / 05-03-2014 / 17:00:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1673 |
! |
1674 |
||
1675 |
compileDescriptionMethods |
|
16682 | 1676 |
(self isAbstract) ifTrue:[ |
23124 | 1677 |
self error:'I am abstract - must be a subclass of Libray- or ApplicationDefinition.' |
9998 | 1678 |
]. |
1679 |
||
13419 | 1680 |
self |
23124 | 1681 |
forEachMethodsCodeToCompileDo:[:code :category | |
1682 |
self compile:code categorized:category |
|
1683 |
]. |
|
9998 | 1684 |
|
1685 |
"/ self instAndClassMethodsDo:[:m | m package:self package]. |
|
1686 |
||
1687 |
" |
|
1688 |
DapasXProject compileDescriptionMethods |
|
1689 |
DapasX_Datenbasis compileDescriptionMethods |
|
1690 |
bosch_dapasx_interactiver_editor compileDescriptionMethods |
|
1691 |
stx_libbasic compileDescriptionMethods |
|
1692 |
" |
|
1693 |
||
1694 |
"Created: / 09-08-2006 / 18:00:31 / fm" |
|
1695 |
"Modified: / 05-09-2006 / 13:46:29 / cg" |
|
1696 |
! |
|
1697 |
||
1698 |
description_code |
|
1699 |
^ String streamContents:[:s | |
|
23124 | 1700 |
s nextPutLine:'description'. |
1701 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #description) comment; nextPutLine:'"'. |
|
1702 |
s cr; nextPutLine:' ^ ',self description asString storeString. |
|
9998 | 1703 |
]. |
1704 |
||
1705 |
" |
|
13419 | 1706 |
self description_code |
1707 |
stx_libbasic3 description_code |
|
9998 | 1708 |
" |
1709 |
||
1710 |
"Created: / 17-08-2006 / 21:24:01 / cg" |
|
1711 |
"Modified: / 18-08-2006 / 16:16:24 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
1712 |
"Modified: / 05-03-2014 / 17:00:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1713 |
! |
1714 |
||
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1715 |
effectiveSubProjects |
21259 | 1716 |
"get the subProjects for the current OS platform, that are not excluded" |
1717 |
||
1718 |
^ self effectiveSubProjects:OperatingSystem platformName |
|
1719 |
||
1720 |
"Modified: / 17-01-2017 / 16:31:42 / stefan" |
|
1721 |
! |
|
1722 |
||
1723 |
effectiveSubProjects:osSymbol |
|
1724 |
"get the subProjects, that are not excluded. |
|
1725 |
osSymbol can be #win32 or #unix (for now)." |
|
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1726 |
|
23629 | 1727 |
|prereqs subProjects| |
1728 |
||
1729 |
prereqs := self allPreRequisites. |
|
1730 |
||
1731 |
subProjects := (self subProjects, self includedInSubProjects) |
|
1732 |
collect:[:eachLine| |
|
1733 |
|prj| |
|
1734 |
||
1735 |
eachLine isString ifTrue:[ |
|
1736 |
prj := eachLine |
|
1737 |
] ifFalse:[ |
|
1738 |
eachLine second = osSymbol ifTrue:[ |
|
1739 |
prj := eachLine first. |
|
1740 |
]. |
|
1741 |
]. |
|
1742 |
(prereqs includes:prj) ifTrue:[ prj := nil]. |
|
1743 |
prj. |
|
1744 |
] as:OrderedSet. |
|
21259 | 1745 |
|
1746 |
subProjects remove:self package ifAbsent:[]. |
|
1747 |
subProjects remove:nil ifAbsent:[]. |
|
1748 |
||
1749 |
self excludedFromSubProjects do:[:eachLine| |
|
23629 | 1750 |
eachLine isString ifTrue:[ |
1751 |
subProjects remove:eachLine ifAbsent:[]. |
|
1752 |
] ifFalse:[eachLine second = osSymbol ifTrue:[ |
|
1753 |
subProjects remove:eachLine first ifAbsent:[]. |
|
1754 |
]]. |
|
21259 | 1755 |
]. |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1756 |
|
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1757 |
^ subProjects |
21259 | 1758 |
|
1759 |
"Created: / 17-01-2017 / 16:16:03 / stefan" |
|
23629 | 1760 |
"Modified: / 22-01-2019 / 14:42:51 / Claus Gittinger" |
11386
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1761 |
! |
5e4e1acf7242
Fix #allPrerequisites to return prerequisites that are
Stefan Vogel <sv@exept.de>
parents:
11383
diff
changeset
|
1762 |
|
12425 | 1763 |
excludedFromPreRequisites_code |
1764 |
"generate the code of the #excludedFromPreRequisites method" |
|
1765 |
||
1766 |
^ String streamContents:[:s | |
|
23124 | 1767 |
s nextPutLine:'excludedFromPreRequisites'. |
1768 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #excludedFromPreRequisites) comment; nextPutLine:'"'. |
|
1769 |
s nextPutLine:''. |
|
1770 |
s nextPutLine:' ^ #('. |
|
1771 |
s nextPutLine:' )' |
|
12425 | 1772 |
]. |
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
1773 |
|
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
1774 |
"Modified: / 05-03-2014 / 17:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12425 | 1775 |
! |
1776 |
||
9998 | 1777 |
extensionMethodNames_code |
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1778 |
^ self extensionMethodNames_code_ignoreOldEntries:true |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1779 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1780 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1781 |
self extensionMethodNames_code |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1782 |
" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1783 |
|
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1784 |
"Created: / 17-08-2006 / 21:21:48 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1785 |
"Modified: / 10-10-2006 / 22:02:42 / cg" |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1786 |
! |
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1787 |
|
15005 | 1788 |
extensionMethodNames_code_For:extensionMethodNames |
1789 |
^ String streamContents:[:s | |
|
23124 | 1790 |
|spec| |
1791 |
||
1792 |
s nextPutLine:'extensionMethodNames'. |
|
1793 |
s nextPutLine:' "lists the extension methods which are to be included in the project.'. |
|
1794 |
s nextPutLine:' Entries are pairwise elements, consisting of class-name and selector."'. |
|
1795 |
s nextPutLine:''. |
|
1796 |
s nextPutLine:' ^ #('. |
|
1797 |
||
1798 |
spec := extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
|
1799 |
spec do:[:entry | |
|
1800 |
|mclassName mselector| |
|
1801 |
||
1802 |
mclassName := entry key asSymbol. |
|
1803 |
(mclassName endsWith:' class') ifTrue:[ |
|
1804 |
mclassName := mclassName asString. |
|
1805 |
]. |
|
1806 |
mselector := entry value asSymbol. |
|
1807 |
||
1808 |
s spaces:8. |
|
1809 |
mclassName storeArrayElementOn:s. |
|
1810 |
s space. |
|
1811 |
mselector storeArrayElementOn:s. |
|
1812 |
s cr. |
|
1813 |
]. |
|
1814 |
s nextPutLine:' )' |
|
15005 | 1815 |
]. |
1816 |
! |
|
1817 |
||
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1818 |
extensionMethodNames_code_ignoreOldEntries:ignoreOldEntries |
9998 | 1819 |
^ String streamContents:[:s | |
23124 | 1820 |
|oldSpec| |
1821 |
||
1822 |
s nextPutLine:'extensionMethodNames'. |
|
1823 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #extensionMethodNames) comment; nextPutLine:'"'. |
|
1824 |
s nextPutLine:''. |
|
1825 |
s nextPutLine:' ^ #('. |
|
1826 |
||
1827 |
oldSpec := self extensionMethodNames pairWiseCollect:[:className :selector | className -> selector ]. |
|
1828 |
||
1829 |
ignoreOldEntries ifFalse:[ |
|
1830 |
oldSpec do:[:entry | |
|
1831 |
|mclassName mselector| |
|
1832 |
||
1833 |
mclassName := entry key asSymbol. |
|
1834 |
(mclassName endsWith:' class') ifTrue:[ |
|
1835 |
mclassName := mclassName asString. |
|
1836 |
]. |
|
1837 |
mselector := entry value asSymbol. |
|
1838 |
||
1839 |
s spaces:8. |
|
1840 |
mclassName storeArrayElementOn:s. |
|
1841 |
s space. |
|
1842 |
mselector storeArrayElementOn:s. |
|
1843 |
s cr. |
|
1844 |
]. |
|
1845 |
]. |
|
1846 |
||
1847 |
self searchForExtensions do:[:eachMethod | |
|
1848 |
|attributes oldSpecEntry mclassName mselector| |
|
1849 |
||
1850 |
mclassName := eachMethod mclass name. |
|
1851 |
mselector := eachMethod selector. |
|
1852 |
"JV@2012-09-07: Do not list Java methods in extensionMethodNames. |
|
1853 |
They are loaded lazily by JavaClassReader and if listed here, |
|
1854 |
they would cause an error if the package is loaded from source. |
|
1855 |
Sort of a HACK, indeed" |
|
1856 |
eachMethod mclass theNonMetaclass isJavaClass ifFalse:[ |
|
1857 |
oldSpecEntry := oldSpec detect:[:entry | entry key = mclassName and:[ entry value = mselector]] ifNone:nil. |
|
1858 |
(ignoreOldEntries or:[ oldSpecEntry isNil]) ifTrue:[ |
|
1859 |
s spaces:8. |
|
1860 |
mclassName storeArrayElementOn:s. |
|
1861 |
s space. |
|
1862 |
mselector storeArrayElementOn:s. |
|
1863 |
s cr. |
|
1864 |
] |
|
1865 |
]. |
|
1866 |
]. |
|
1867 |
||
1868 |
s nextPutLine:' )' |
|
9998 | 1869 |
]. |
1870 |
||
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1871 |
" |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1872 |
self extensionMethodNames_code_ignoreOldEntries:false |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
1873 |
stx_libjava extensionMethodNames_code_ignoreOldEntries:false |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1874 |
stx_libtool extensionMethodNames_code_ignoreOldEntries:true |
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1875 |
" |
9998 | 1876 |
|
10064
fb1ad676019d
update spec vs. regenerate spec.
Claus Gittinger <cg@exept.de>
parents:
10063
diff
changeset
|
1877 |
"Created: / 10-10-2006 / 22:02:36 / cg" |
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
1878 |
"Modified: / 23-10-2006 / 11:07:29 / cg" |
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
1879 |
"Modified: / 05-03-2014 / 17:00:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 1880 |
! |
1881 |
||
1882 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
15052 | 1883 |
"generate code for each contents-specifying method |
1884 |
(classesAndAttributes, extensionMethodNames, etc.), |
|
1885 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1886 |
If ignoreOldDefinition is true, new code is generated (class/method scan); |
|
1887 |
otherwise, new items are added to the existing lists" |
|
1888 |
||
13419 | 1889 |
aTwoArgBlock |
23124 | 1890 |
value:(self classNamesAndAttributes_code_ignoreOldEntries:ignoreOldDefinition ignoreOldDefinition:ignoreOldDefinition) |
1891 |
value:'description - contents'. |
|
13419 | 1892 |
|
1893 |
aTwoArgBlock |
|
23124 | 1894 |
value: (self extensionMethodNames_code_ignoreOldEntries:ignoreOldDefinition) |
1895 |
value: 'description - contents'. |
|
13419 | 1896 |
|
1897 |
aTwoArgBlock |
|
23124 | 1898 |
value: self mandatoryPreRequisites_code |
1899 |
value: 'description'. |
|
14843 | 1900 |
|
1901 |
aTwoArgBlock |
|
23124 | 1902 |
value: self referencedPreRequisites_code |
1903 |
value: 'description'. |
|
13419 | 1904 |
|
16571 | 1905 |
(self class includesSelector:#excludedFromPreRequisites) ifFalse:[ |
23124 | 1906 |
aTwoArgBlock |
1907 |
value: self excludedFromPreRequisites_code |
|
1908 |
value: 'description'. |
|
14812 | 1909 |
]. |
13411 | 1910 |
|
15950 | 1911 |
"/ JV: No, subProjects **should not** be automatically generated. |
1912 |
"/ Remember, they are not required to be loaded!! So, generate |
|
1913 |
"/ subProjects only if there's no such method yet. |
|
1914 |
(self class methodDictionary includesKey: #subProjects) ifFalse:[ |
|
23124 | 1915 |
aTwoArgBlock |
1916 |
value: self subProjects_code |
|
1917 |
value: 'description'. |
|
15950 | 1918 |
]. |
14988 | 1919 |
|
13411 | 1920 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
23124 | 1921 |
aTwoArgBlock |
1922 |
value: self monticelloTimestamps_code |
|
1923 |
value: 'description - monticello'. |
|
13411 | 1924 |
]. |
1925 |
||
15950 | 1926 |
"Modified: / 25-11-2013 / 13:56:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13411 | 1927 |
! |
1928 |
||
16682 | 1929 |
forEachDescriptionMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
1930 |
"generate code for descriptive methods, |
|
15052 | 1931 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
1932 |
If ignoreOldDefinition is true, new code is generated (class/method scan); |
|
1933 |
otherwise, new items are added to the existing lists" |
|
1934 |
||
13873 | 1935 |
"/ code like: |
1936 |
"/ |
|
1937 |
"/ (self class includesSelector:#productName) ifFalse:[ |
|
1938 |
"/ aTwoArgBlock |
|
1939 |
"/ value: self productName_code |
|
1940 |
"/ value: 'description - project information'. |
|
1941 |
"/ ]. |
|
1942 |
||
1943 |
#( |
|
23124 | 1944 |
(productName productName_code) |
1945 |
(description description_code) |
|
1946 |
(companyName companyName_code) |
|
1947 |
(legalCopyright legalCopyright_code) |
|
13873 | 1948 |
) pairsDo:[:selector :codeMethodSelector | |
23124 | 1949 |
(self class includesSelector:selector) ifFalse:[ |
1950 |
aTwoArgBlock |
|
1951 |
value: (self perform:codeMethodSelector) |
|
1952 |
value: 'description - project information'. |
|
1953 |
]. |
|
11072 | 1954 |
]. |
16682 | 1955 |
! |
1956 |
||
1957 |
forEachMethodsCodeToCompileDo:aTwoArgBlock |
|
1958 |
"update code for each method (contents plus version info), |
|
1959 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1960 |
New items are added to the existing lists" |
|
1961 |
||
1962 |
self forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:false |
|
1963 |
! |
|
1964 |
||
1965 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
1966 |
"generate code for each method (contents plus version info), |
|
1967 |
and evaluate aTwoArgBlock on it, passing in the code and the method's category. |
|
1968 |
If ignoreOldDefinition is true, new code is generated (class/method scan); |
|
1969 |
otherwise, new items are added to the existing lists" |
|
1970 |
||
1971 |
self |
|
23124 | 1972 |
forEachContentsMethodsCodeToCompileDo:aTwoArgBlock |
1973 |
ignoreOldDefinition:ignoreOldDefinition. |
|
16682 | 1974 |
|
1975 |
self |
|
23124 | 1976 |
forEachDescriptionMethodsCodeToCompileDo:aTwoArgBlock |
1977 |
ignoreOldDefinition:ignoreOldDefinition. |
|
9998 | 1978 |
|
13411 | 1979 |
(self monticelloPackageName notNil and:[self respondsTo:#monticelloTimestamps_code]) ifTrue:[ |
23124 | 1980 |
aTwoArgBlock |
1981 |
value: self monticelloTimestamps_code |
|
1982 |
value: 'description - monticello'. |
|
13411 | 1983 |
]. |
1984 |
||
9998 | 1985 |
"Created: / 18-08-2006 / 16:22:37 / cg" |
13411 | 1986 |
"Modified: / 09-11-2010 / 18:41:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13873 | 1987 |
"Modified: / 21-12-2011 / 16:42:41 / cg" |
9998 | 1988 |
! |
1989 |
||
1990 |
legalCopyright_code |
|
1991 |
^ String streamContents:[:s | |
|
23124 | 1992 |
s nextPutLine:'legalCopyright'. |
1993 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #legalCopyright) comment; nextPutLine:'"'. |
|
1994 |
s cr; nextPutLine:' ^ ', self legalCopyright storeString. |
|
9998 | 1995 |
]. |
1996 |
||
1997 |
" |
|
13419 | 1998 |
self legalCopyright_code |
1999 |
stx_libbasic3 legalCopyright_code |
|
9998 | 2000 |
" |
2001 |
||
2002 |
"Created: / 18-08-2006 / 16:21:01 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2003 |
"Modified: / 05-03-2014 / 17:00:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 2004 |
! |
2005 |
||
14843 | 2006 |
mandatoryPreRequisites_code |
2007 |
"generate the code of the #mandatoryPreRequisites method" |
|
2008 |
||
2009 |
|preRequisites| |
|
2010 |
||
2011 |
preRequisites := self searchForPreRequisites first. |
|
23125 | 2012 |
preRequisites |
2013 |
removeAllKeys:self excludedFromMandatoryPreRequisites ifAbsent:[]; |
|
2014 |
removeAllKeys:self excludedFromPreRequisites ifAbsent:[]. |
|
2015 |
||
2016 |
self checkForBadReferences:preRequisites. |
|
14843 | 2017 |
|
2018 |
^ String streamContents:[:s | |
|
23125 | 2019 |
s nextPutLine:'mandatoryPreRequisites'. |
2020 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #mandatoryPreRequisites) comment; nextPutLine:'"'. |
|
2021 |
s nextPutLine:''. |
|
2022 |
s nextPutLine:' ^ #('. |
|
2023 |
preRequisites keys asSortedCollection do:[:eachPackageID | |
|
2024 |
|reason| |
|
2025 |
||
2026 |
s spaces:8. |
|
2027 |
eachPackageID asSymbol storeOn:s. |
|
2028 |
reason := preRequisites at:eachPackageID ifAbsent:[nil]. |
|
2029 |
reason notEmptyOrNil ifTrue:[ |
|
2030 |
s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$". |
|
2031 |
]. |
|
2032 |
s cr. |
|
2033 |
]. |
|
2034 |
s nextPutLine:' )' |
|
14843 | 2035 |
]. |
2036 |
||
2037 |
" |
|
2038 |
demo_demoApp1 mandatoryPreRequisites_code |
|
2039 |
stx_libbasic3 mandatoryPreRequisites_code |
|
2040 |
stx_libtool2 mandatoryPreRequisites_code |
|
2041 |
" |
|
2042 |
||
2043 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
2044 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
2045 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2046 |
"Modified: / 05-03-2014 / 17:00:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14843 | 2047 |
! |
2048 |
||
13873 | 2049 |
productInstallDirBaseName_code |
2050 |
^ String streamContents:[:s | |
|
23124 | 2051 |
s nextPutLine:'productInstallDirBaseName'. |
2052 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #productInstallDirBaseName) comment; nextPutLine:'"'. |
|
2053 |
s cr; |
|
2054 |
nextPutLine:' ^ (self package asCollectionOfSubstringsSeparatedByAny:'':/'') last'. |
|
13873 | 2055 |
]. |
2056 |
||
2057 |
" |
|
20567 | 2058 |
ApplicationDefinition productInstallDirBaseName_code |
13873 | 2059 |
stx_libbasic3 productInstallDirBaseName_code |
2060 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDirBaseName_code |
|
2061 |
" |
|
2062 |
||
2063 |
"Created: / 21-12-2011 / 16:38:11 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2064 |
"Modified: / 05-03-2014 / 17:00:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13873 | 2065 |
! |
2066 |
||
9998 | 2067 |
productName_code |
20567 | 2068 |
"generate code that answers the product name." |
2069 |
||
12541 | 2070 |
^ self productName_codeFor:(self productName) |
2071 |
||
2072 |
" |
|
2073 |
self productName_code |
|
2074 |
stx_libbasic3 productName_code |
|
2075 |
" |
|
2076 |
||
2077 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
2078 |
! |
|
2079 |
||
2080 |
productName_codeFor:aString |
|
20567 | 2081 |
"generate code that answers aString as the product name." |
2082 |
||
9998 | 2083 |
^ String streamContents:[:s | |
23124 | 2084 |
s nextPutLine:'productName'. |
2085 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #productName) comment; nextPutLine:'"'. |
|
2086 |
s cr; nextPutLine:' ^ ',aString storeString. |
|
9998 | 2087 |
]. |
2088 |
||
2089 |
" |
|
2090 |
self productName_code |
|
2091 |
stx_libbasic3 productName_code |
|
2092 |
" |
|
2093 |
||
2094 |
"Created: / 18-08-2006 / 16:14:19 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2095 |
"Modified: / 05-03-2014 / 17:00:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2096 |
! |
2097 |
||
14843 | 2098 |
referencedPreRequisites_code |
2099 |
"generate the code of the #referencedPreRequisites method" |
|
2100 |
||
2101 |
|preRequisitesColl preRequisites| |
|
2102 |
||
2103 |
preRequisitesColl := self searchForPreRequisites. |
|
14885 | 2104 |
preRequisites := preRequisitesColl second. |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
2105 |
preRequisites |
23125 | 2106 |
removeAllKeys:self excludedFromPreRequisites ifAbsent:[]; |
2107 |
removeAllKeys:self excludedFromRequiredPreRequisites ifAbsent:[]; |
|
2108 |
removeAllKeys:preRequisitesColl first keys ifAbsent:[]. "remove the mandatory prerequisites" |
|
2109 |
||
2110 |
self checkForBadReferences:preRequisites. |
|
14843 | 2111 |
|
2112 |
^ String streamContents:[:s | |
|
23125 | 2113 |
s nextPutLine:'referencedPreRequisites'. |
2114 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #referencedPreRequisites) comment; nextPutLine:'"'. |
|
2115 |
s nextPutLine:''. |
|
2116 |
s nextPutLine:' ^ #('. |
|
2117 |
preRequisites keys asSortedCollection do:[:eachPackageID | |
|
2118 |
|reason| |
|
2119 |
||
2120 |
s spaces:8. |
|
2121 |
eachPackageID asSymbol storeOn:s. |
|
2122 |
reason := preRequisites at:eachPackageID ifAbsent:[nil]. |
|
2123 |
reason notEmptyOrNil ifTrue:[ |
|
2124 |
s nextPutAll:' "'; nextPutAll:reason anElement; nextPut:$". |
|
2125 |
]. |
|
2126 |
s cr. |
|
2127 |
]. |
|
2128 |
s nextPutLine:' )' |
|
14843 | 2129 |
]. |
2130 |
||
2131 |
" |
|
2132 |
demo_demoApp1 referencedPreRequisites_code |
|
2133 |
stx_libbasic3 referencedPreRequisites_code |
|
2134 |
stx_libtool2 referencedPreRequisites_code |
|
2135 |
" |
|
2136 |
||
2137 |
"Modified: / 08-08-2006 / 19:24:34 / fm" |
|
2138 |
"Created: / 17-08-2006 / 21:28:09 / cg" |
|
2139 |
"Modified: / 09-10-2006 / 14:27:20 / cg" |
|
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2140 |
"Modified: / 05-03-2014 / 17:00:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14843 | 2141 |
! |
2142 |
||
14988 | 2143 |
subProjects_code |
2144 |
"generate the code of the #subProjects method. |
|
2145 |
Returns nil if no such code is needed (because there are none)" |
|
2146 |
||
2147 |
^ String streamContents:[:s | |
|
23124 | 2148 |
s nextPutLine:'subProjects'. |
2149 |
s nextPutAll: ' "'; nextPutAll: (self class superclass lookupMethodFor: #subProjects) comment; nextPutLine:'"'. |
|
2150 |
s nextPutLine:''. |
|
2151 |
s nextPutLine:' ^ #('. |
|
2152 |
ProjectDefinition allSubclassesDo:[:each | |
|
2153 |
(each package startsWith:(self package,'/')) ifTrue:[ |
|
2154 |
s nextPutLine:' #''',each package,''''. |
|
2155 |
] |
|
2156 |
]. |
|
2157 |
s nextPutLine:' )' |
|
14988 | 2158 |
]. |
16222
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2159 |
|
15aa39f0f5cb
Fix in ProjectDefinition - use up-to-date comment when (re)generating methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16213
diff
changeset
|
2160 |
"Modified: / 05-03-2014 / 17:00:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14988 | 2161 |
! |
2162 |
||
12028 | 2163 |
svnRevisionNr_code: revisionNrOrNil |
2164 |
^ String streamContents:[:s | |
|
23124 | 2165 |
s nextPutLine:'svnRevisionNr'. |
2166 |
s nextPutLine:' "Return a SVN revision number of myself.'. |
|
2167 |
s nextPutLine:' This number is updated after a commit"'. |
|
2168 |
s cr; |
|
2169 |
nextPutLine:' ^ "$SVN-Revision:"''', ('%-16s' printf: (Array with: revisionNrOrNil printString)) , '''"$"'. |
|
12028 | 2170 |
]. |
2171 |
||
2172 |
" |
|
2173 |
self svnRevisionNr_code |
|
2174 |
stx_libbasic3 svnRevisionNr_code |
|
2175 |
" |
|
2176 |
||
2177 |
"Created: / 16-06-2009 / 12:12:37 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
2178 |
"Modified: / 22-08-2009 / 09:05:05 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2179 |
"Modified: / 29-03-2012 / 18:43:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9998 | 2180 |
! ! |
2181 |
||
9569 | 2182 |
!ProjectDefinition class methodsFor:'defaults'! |
9536 | 2183 |
|
9664 | 2184 |
applicationTypes |
9714 | 2185 |
GUIApplicationType isNil ifTrue:[self initialize]. |
2186 |
^ Array with:GUIApplicationType with:NonGUIApplicationType |
|
9664 | 2187 |
|
9714 | 2188 |
" |
13419 | 2189 |
self applicationTypes |
9714 | 2190 |
" |
9664 | 2191 |
! |
2192 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
2193 |
defaultCategory |
10466 | 2194 |
^'* Projects & Packages *' |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
2195 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
2196 |
"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
|
2197 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
2198 |
|
9714 | 2199 |
defaultProjectType |
9745 | 2200 |
^ self libraryTypes first |
2201 |
"/ ^ self applicationTypes first |
|
9714 | 2202 |
|
2203 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
2204 |
! |
|
2205 |
||
2206 |
defaultProjectTypeForGUIApplication |
|
2207 |
^ GUIApplicationType |
|
2208 |
! |
|
2209 |
||
2210 |
defaultProjectTypeForNonGUIApplication |
|
2211 |
^ NonGUIApplicationType |
|
2212 |
! |
|
9664 | 2213 |
|
16541 | 2214 |
folderForSubApplicationsType |
2215 |
^ FolderForSubApplicationsType |
|
2216 |
! |
|
2217 |
||
9714 | 2218 |
guiApplicationType |
2219 |
^ GUIApplicationType |
|
2220 |
! |
|
2221 |
||
2222 |
libraryType |
|
2223 |
^ LibraryType |
|
2224 |
! |
|
2225 |
||
13419 | 2226 |
libraryTypes |
9714 | 2227 |
LibraryType isNil ifTrue:[self initialize]. |
2228 |
^ Array with:LibraryType |
|
2229 |
||
2230 |
" |
|
13419 | 2231 |
self libraryTypes |
9714 | 2232 |
" |
2233 |
! |
|
2234 |
||
2235 |
nonGuiApplicationType |
|
2236 |
^ NonGUIApplicationType |
|
9664 | 2237 |
! |
2238 |
||
12331 | 2239 |
projectTypeSelectors |
2240 |
"a list of possible project type selectors" |
|
2241 |
||
16541 | 2242 |
^ #( libraryType guiApplicationType nonGuiApplicationType folderForSubApplicationsType ) |
12331 | 2243 |
|
2244 |
" |
|
2245 |
self libraryType |
|
2246 |
self guiApplicationType |
|
2247 |
self nonGuiApplicationType |
|
2248 |
" |
|
2249 |
||
2250 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
|
2251 |
! |
|
2252 |
||
9664 | 2253 |
projectTypes |
16541 | 2254 |
"a list of possible project types (shown in the new-package dialog's combo list)" |
2255 |
||
2256 |
^ self libraryTypes , self applicationTypes , { FolderForSubApplicationsType } |
|
9664 | 2257 |
|
12331 | 2258 |
" |
2259 |
self projectTypes |
|
2260 |
" |
|
2261 |
||
9664 | 2262 |
"Created: / 23-08-2006 / 14:27:32 / cg" |
9536 | 2263 |
! ! |
2264 |
||
9569 | 2265 |
!ProjectDefinition class methodsFor:'description'! |
9536 | 2266 |
|
20527 | 2267 |
excludedFromMandatoryPreRequisites |
9983 | 2268 |
"list packages which are to be explicitely excluded from the automatic constructed |
23124 | 2269 |
mandatory prerequisites list. |
20527 | 2270 |
If empty, everything that is found along the inheritance of any of |
2271 |
my classes is considered to be a prerequisite package." |
|
2272 |
||
2273 |
^ #() |
|
2274 |
! |
|
2275 |
||
2276 |
excludedFromPreRequisites |
|
2277 |
"obsolete; temporarily, this is still called for, but will eventually vanish. |
|
23124 | 2278 |
|
20527 | 2279 |
List packages which are to be explicitely excluded from the automatic constructed |
23124 | 2280 |
prerequisites lists (both). |
20527 | 2281 |
If empty, everything that is found along the inheritance of any of |
2282 |
my classes is considered to be a prerequisite package." |
|
2283 |
||
2284 |
^ #() |
|
2285 |
||
2286 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
2287 |
! |
|
2288 |
||
2289 |
excludedFromRequiredPreRequisites |
|
2290 |
"list packages which are to be explicitely excluded from the automatic constructed |
|
23124 | 2291 |
required prerequisites list. |
20527 | 2292 |
If empty, everything that is found along the inheritance of any of |
9983 | 2293 |
my classes is considered to be a prerequisite package." |
2294 |
||
2295 |
^ #() |
|
2296 |
||
2297 |
"Modified: / 17-08-2006 / 19:48:59 / cg" |
|
2298 |
! |
|
2299 |
||
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2300 |
excludedFromSubProjects |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2301 |
"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
|
2302 |
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
|
2303 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2304 |
^ #() |
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2305 |
|
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
2306 |
"Modified: / 17-08-2006 / 19:49:40 / cg" |
10039 | 2307 |
! |
2308 |
||
14808 | 2309 |
includedInPreRequisites |
17577 | 2310 |
"list packages which are to be implicitely included in the prerequisites list, |
14808 | 2311 |
even if not found by the automatic search. |
2312 |
Redefine this, if classes from other packages are referred to via reflection |
|
2313 |
or by constructing names dynamically (i.e. the search cannot find it)" |
|
2314 |
||
2315 |
^ #() |
|
2316 |
! |
|
2317 |
||
15395 | 2318 |
includedInSubProjects |
2319 |
"list packages which are to be explicitely included in the subproject list, |
|
2320 |
even if not found by the automatic search. |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
2321 |
However: they are not forced to be loaded when a package is loaded; |
15395 | 2322 |
for those, redefine #includedInPreRequisites." |
2323 |
||
2324 |
^ #() |
|
2325 |
||
2326 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
2327 |
! |
|
2328 |
||
14843 | 2329 |
mandatoryPreRequisites |
2330 |
"list packages which are mandatory as a prerequisite. |
|
2331 |
This are packages containing superclasses of my classes and classes which |
|
2332 |
are extended by myself. |
|
16554 | 2333 |
They are mandatory, because we need these packages as a prerequisite for loading and compiling. |
24342 | 2334 |
When loading whole packages, |
2335 |
mandatoryPreRequisites will be automatically loaded |
|
2336 |
BEFORE this packet has been loaded. |
|
14843 | 2337 |
This method is generated automatically, |
20664 | 2338 |
by searching along the inheritance chain of all of my classes. |
2339 |
Please take a look at the #referencedPreRequisites method as well." |
|
9575 | 2340 |
|
2341 |
^ #() |
|
24342 | 2342 |
|
2343 |
"Modified (comment): / 23-06-2019 / 10:40:58 / Claus Gittinger" |
|
14843 | 2344 |
! |
2345 |
||
23850 | 2346 |
nonMandatorySubProjects |
2347 |
"list subprojects which can be ignored if the folder has been removed. |
|
2348 |
Make will give a warning, but proceed. |
|
2349 |
Should be a subset of what is returned by #subProjects" |
|
2350 |
||
2351 |
^ #() |
|
2352 |
||
2353 |
"Created: / 07-03-2019 / 17:31:36 / Claus Gittinger" |
|
2354 |
! |
|
2355 |
||
14843 | 2356 |
preRequisites |
20527 | 2357 |
"list packages which are required as a prerequisite (both mandatory and referenced). |
2358 |
This is used to build dependency chains in makefiles" |
|
14843 | 2359 |
|
2360 |
"use an OrderedSet here, so that mandatory prerequisites come first" |
|
2361 |
||
2362 |
^ OrderedSet new |
|
23124 | 2363 |
addAll:self mandatoryPreRequisites; |
2364 |
addAll:self referencedPreRequisites; |
|
2365 |
addAll:self includedInPreRequisites; |
|
2366 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
2367 |
yourself. |
|
9575 | 2368 |
|
2369 |
"Modified: / 17-08-2006 / 19:54:21 / cg" |
|
2370 |
! |
|
2371 |
||
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
2372 |
preRequisitesFor:packageId |
14843 | 2373 |
|def| |
13411 | 2374 |
|
2375 |
def := self definitionClassForPackage:packageId. |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2376 |
def isNil ifTrue:[ |
23124 | 2377 |
"Maybe the package is not loaded? Try to load it..." |
2378 |
[ |
|
2379 |
Smalltalk loadPackage:packageId. |
|
2380 |
def := self definitionClassForPackage:packageId |
|
2381 |
] on:PackageLoadError do:[:ex| def := nil]. |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2382 |
]. |
21259 | 2383 |
^ def isNil ifTrue:[ |
23124 | 2384 |
"Still no project definition - maybe it does not exist?" |
2385 |
Transcript showCR:'Warning: no definition class for package: ', packageId. |
|
2386 |
((self searchForPreRequisites:packageId) |
|
2387 |
fold:[:d1 :d2| d1 addAll:d2; yourself]) keys |
|
2388 |
] ifFalse:[ |
|
2389 |
def effectivePreRequisites |
|
21259 | 2390 |
] |
13411 | 2391 |
|
2392 |
"Created: / 24-02-2011 / 22:47:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13820
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2393 |
"Modified: / 18-11-2011 / 14:52:43 / cg" |
f46f7306eea2
changed: #preRequisitesFor:
Claus Gittinger <cg@exept.de>
parents:
13809
diff
changeset
|
2394 |
"Modified (format): / 19-11-2011 / 11:25:36 / cg" |
21259 | 2395 |
"Modified: / 17-01-2017 / 16:55:39 / stefan" |
13411 | 2396 |
! |
2397 |
||
14843 | 2398 |
referencedPreRequisites |
16213 | 2399 |
"list packages which are a prerequisite, because they contain |
14843 | 2400 |
classes which are referenced by my classes. |
20664 | 2401 |
These packages are NOT needed as a prerequisite for compiling or loading, |
17472 | 2402 |
however, a class from it may be referenced during execution and having it |
2403 |
unloaded then may lead to a runtime doesNotUnderstand error, unless the caller |
|
2404 |
includes explicit checks for the package being present. |
|
24342 | 2405 |
When loading whole packages, |
2406 |
referencedPreRequisites will be automatically loaded |
|
2407 |
AFTER this packet has been loaded. |
|
14843 | 2408 |
This method is generated automatically, |
20664 | 2409 |
by searching all classes (and their packages) which are referenced by my classes. |
2410 |
Please also take a look at the #mandatoryPreRequisites method" |
|
14843 | 2411 |
|
2412 |
^ #() |
|
24342 | 2413 |
|
2414 |
"Modified (comment): / 23-06-2019 / 10:40:30 / Claus Gittinger" |
|
12186 | 2415 |
! |
2416 |
||
9685 | 2417 |
siblingsAreSubProjects |
2418 |
^ false |
|
2419 |
! |
|
2420 |
||
11377 | 2421 |
splashFileName |
2422 |
"answer the base-name of the splash bitmap. |
|
2423 |
||
2424 |
Default is nil, for no splash. If non-nil, it must be a bmp file's name" |
|
2425 |
||
2426 |
^ nil. |
|
2427 |
! |
|
2428 |
||
9575 | 2429 |
subProjects |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
2430 |
"list packages which are known as subprojects. |
14959 | 2431 |
The generated makefile will enter those and make there as well. |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
2432 |
However: they are not forced to be loaded when a package is loaded; |
20664 | 2433 |
for those, redefine #referencedPrerequisites or #mandatoryPreRequisites." |
9575 | 2434 |
|
2435 |
^ #() |
|
2436 |
||
2437 |
"Modified: / 17-08-2006 / 19:57:46 / cg" |
|
21449 | 2438 |
! |
2439 |
||
2440 |
superProject |
|
2441 |
"return the package which contains me as subProject, |
|
2442 |
or if not found, which contains me under its directory hierarchy, |
|
2443 |
or nil if none found" |
|
2444 |
||
2445 |
|p superPackage idx| |
|
23124 | 2446 |
|
21451 | 2447 |
p := self package. |
21449 | 2448 |
ProjectDefinition allSubclassesDo:[:prjDef | |
23124 | 2449 |
(prjDef subProjects includes:p) ifTrue:[^ prjDef]. |
21451 | 2450 |
]. |
21449 | 2451 |
[ |
23124 | 2452 |
(idx := p lastIndexOf:$/) ~~ 0 |
21449 | 2453 |
] whileTrue:[ |
23124 | 2454 |
|defClass| |
2455 |
||
2456 |
superPackage := p copyTo:idx-1. |
|
2457 |
(defClass := ProjectDefinition definitionClassForPackage:superPackage) notNil ifTrue:[ |
|
2458 |
^ defClass |
|
2459 |
]. |
|
2460 |
p := superPackage. |
|
2461 |
]. |
|
21449 | 2462 |
^ nil |
2463 |
||
2464 |
" |
|
23124 | 2465 |
stx_goodies_refactoryBrowser_lint superProject |
2466 |
exept_expecco_plugin_guiBrowser superProject |
|
21449 | 2467 |
" |
2468 |
||
2469 |
"Created: / 15-02-2017 / 16:49:05 / cg" |
|
9575 | 2470 |
! ! |
2471 |
||
12372 | 2472 |
!ProjectDefinition class methodsFor:'description - actions'! |
2473 |
||
2474 |
postLoadAction |
|
2475 |
"invoked after loading a project" |
|
2476 |
||
2477 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2478 |
||
2479 |
"Modified: / 17-08-2006 / 19:59:17 / cg" |
|
2480 |
! |
|
2481 |
||
2482 |
preLoadAction |
|
2483 |
"invoked before loading a project" |
|
2484 |
||
2485 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2486 |
! |
|
2487 |
||
2488 |
preUnloadAction |
|
2489 |
"invoked before unloading a project" |
|
2490 |
||
2491 |
"/ intentionally left blank, to be redefined by subclasses (i.e. real projects) |
|
2492 |
||
2493 |
"Modified: / 17-08-2006 / 19:59:26 / cg" |
|
2494 |
! ! |
|
2495 |
||
16256 | 2496 |
|
9575 | 2497 |
!ProjectDefinition class methodsFor:'description - compilation'! |
9536 | 2498 |
|
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2499 |
additionalBaseAddressDefinition_bc_dot_mak |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2500 |
"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
|
2501 |
Subclasses may redefine this to something like |
23124 | 2502 |
LIB_BASE=$(LIBWIDG_BASE) |
11940
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2503 |
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
|
2504 |
" |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2505 |
|
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2506 |
^ nil |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2507 |
! |
cb9e5867b474
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11937
diff
changeset
|
2508 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2509 |
additionalDefinitions |
22657 | 2510 |
"allows for additional definitions/rules to be added to both the Make.proto and bc.mak file." |
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2511 |
|
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2512 |
^ '' |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2513 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2514 |
"Modified (comment): / 03-02-2015 / 05:59:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2515 |
! |
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2516 |
|
10306 | 2517 |
additionalDefinitions_bc_dot_mak |
2518 |
"allows for additional definitions/rules to be added to the bc.mak file. |
|
10974 | 2519 |
Subclasses may redefine this." |
10306 | 2520 |
|
2521 |
^ self additionalDefinitions_nt_dot_mak |
|
2522 |
||
2523 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2524 |
! |
|
2525 |
||
9625 | 2526 |
additionalDefinitions_make_dot_proto |
2527 |
"allows for additional definitions/rules to be added to the make.proto file." |
|
2528 |
||
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2529 |
^ self additionalDefinitions |
9625 | 2530 |
|
2531 |
"Created: / 22-08-2006 / 23:53:08 / cg" |
|
2532 |
! |
|
2533 |
||
2534 |
additionalDefinitions_nt_dot_mak |
|
10306 | 2535 |
"obsolete - kept for compatibility with old project files" |
9625 | 2536 |
|
11829
2d880f341cfc
#additionalDefinitions for both bc_dot_mak and make_dot_proto
Stefan Vogel <sv@exept.de>
parents:
11789
diff
changeset
|
2537 |
^ self additionalDefinitions |
9625 | 2538 |
|
2539 |
"Created: / 22-08-2006 / 23:59:32 / cg" |
|
2540 |
! |
|
2541 |
||
16328 | 2542 |
additionalHeaderRulesUsingTemplate:template withSeparator:pathSeparator |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2543 |
"rules for header files (of autoloaded classes). |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2544 |
For each extended class, which is autoloaded (and therefore, we will not find a header file for it), |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2545 |
generate a rule to create the header file only." |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2546 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2547 |
^ String streamContents:[:s | |
23124 | 2548 |
(self extensionClassesWithSuperclasses:true) do:[:eachExtendedClass | |
2549 |
|headerFileDirPath baseFilename| |
|
2550 |
||
2551 |
(eachExtendedClass isLoaded not or:[eachExtendedClass wasAutoloaded]) ifTrue:[ |
|
2552 |
headerFileDirPath := self pathToPackage:eachExtendedClass package withSeparator:pathSeparator. |
|
2553 |
baseFilename := self filenameForClass:eachExtendedClass. |
|
2554 |
||
2555 |
s nextPutAll:(template |
|
2556 |
bindWith:headerFileDirPath |
|
2557 |
with:baseFilename). |
|
2558 |
] |
|
2559 |
]. |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2560 |
]. |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2561 |
|
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2562 |
"Created: / 12-09-2011 / 16:23:52 / cg" |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2563 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2564 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2565 |
additionalHeaderRules_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2566 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2567 |
|
13695 | 2568 |
^ self |
23124 | 2569 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_bc_dot_mak) |
2570 |
withSeparator:'\' |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2571 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2572 |
"Created: / 12-09-2011 / 15:44:09 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2573 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2574 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2575 |
additionalHeaderRules_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2576 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2577 |
|
13695 | 2578 |
^ self |
23124 | 2579 |
additionalHeaderRulesUsingTemplate:(self singleHeaderRuleTemplate_make_dot_proto) |
2580 |
withSeparator:'/' |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2581 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2582 |
"Created: / 12-09-2011 / 15:44:28 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2583 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2584 |
|
10306 | 2585 |
additionalLinkLibraries_bc_dot_mak |
2586 |
"allows for additional static libraries to be added to the bc.mak file. |
|
2587 |
Subclasses may redefine this" |
|
2588 |
||
2589 |
"backward compatibilty with old projects" |
|
2590 |
||
2591 |
^ self additionalLinkLibraries_nt_dot_mak |
|
2592 |
||
2593 |
||
2594 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2595 |
! |
|
2596 |
||
9733 | 2597 |
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
|
2598 |
"allows for additional static libraries to be added to the make.proto file." |
9733 | 2599 |
|
2600 |
^ '' |
|
2601 |
||
2602 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
2603 |
! |
|
2604 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2605 |
additionalLinkLibraries_nt_dot_mak |
10306 | 2606 |
"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
|
2607 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2608 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2609 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2610 |
"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
|
2611 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
2612 |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2613 |
additionalRulesFor: fileToGenerateFor |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2614 |
"Return additional rules for given file specified by <rule:file:> or <rule:extends:file:>. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2615 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2616 |
See class documentation on rule extension methods" |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2617 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2618 |
| rules cls processed | |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2619 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2620 |
cls := self. |
20503 | 2621 |
rules := '' writeStream. |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2622 |
processed := Set new. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2623 |
[ cls ~~ Object ] whileTrue:[ |
23124 | 2624 |
cls class selectorsAndMethodsDo:[:selector :method | |
2625 |
method annotationsAt: #file:target: orAt:#file:target:extends: do: [ :annotation | |
|
2626 |
(processed includes: selector) ifFalse:[ |
|
2627 |
| file target extends contents | |
|
2628 |
||
2629 |
processed add: selector. |
|
2630 |
file := annotation argumentAt: 1. |
|
2631 |
target := annotation argumentAt: 2. |
|
2632 |
annotation key == #file:target:extends: ifTrue:[ |
|
2633 |
extends := annotation argumentAt: 3. |
|
2634 |
]. |
|
2635 |
(#('Make.proto' 'bc.mak' ) includes: file) ifFalse:[ |
|
2636 |
self error:'Only Make.proto or bc.mak can have extension rules!!' |
|
2637 |
]. |
|
2638 |
extends notNil ifTrue:[ |
|
2639 |
file = 'Make.proto' ifTrue:[ |
|
2640 |
(#('all' 'clean' ) includes: extends) ifFalse:[ |
|
2641 |
self error: ('Rule %1 cannot be extended. Check documentation to see which rules can be extended' bindWith: extends). |
|
2642 |
]. |
|
2643 |
]. |
|
2644 |
file = 'bc.mak' ifTrue:[ |
|
2645 |
(#('ALL' 'clean') includes: extends) ifFalse:[ |
|
2646 |
self error: ('Rule %1 cannot be extended. Check documentation to see which rules can be extended' bindWith: extends). |
|
2647 |
]. |
|
2648 |
]. |
|
2649 |
]. |
|
2650 |
||
2651 |
(fileToGenerateFor = file and:[(contents := self perform: selector) notNil]) ifTrue:[ |
|
2652 |
rules nextPutAll: contents. |
|
2653 |
rules cr. |
|
2654 |
extends notNil ifTrue:[ |
|
2655 |
rules nextPutAll: extends; nextPutAll:'::'; space; nextPutLine: target; cr. |
|
2656 |
]. |
|
2657 |
]. |
|
2658 |
]. |
|
2659 |
] |
|
2660 |
]. |
|
2661 |
cls := cls superclass. |
|
2662 |
]. |
|
2663 |
fileToGenerateFor = 'Make.proto' ifTrue:[ |
|
2664 |
rules nextPutAll: self additionalRules_make_dot_proto. |
|
2665 |
] ifFalse:[ |
|
2666 |
fileToGenerateFor = 'bc.mak' ifTrue:[ |
|
2667 |
rules nextPutAll: self additionalRules_bc_dot_mak |
|
2668 |
] |
|
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2669 |
]. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2670 |
^ rules contents asStringCollection withTabs asString. |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2671 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2672 |
" |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2673 |
stx_libjava additionalRulesFor: 'Make.proto' |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2674 |
stx_libjava additionalRulesFor: 'bc.mak' |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2675 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2676 |
stx_libjava generateFile:'Make.proto' |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2677 |
stx_libjava generateFile:'bc.mak' |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2678 |
" |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2679 |
|
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2680 |
"Created: / 03-02-2015 / 06:49:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17404
e15994335cb4
Allow to extend target clean in both Make.proto and bc.mak.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17366
diff
changeset
|
2681 |
"Modified: / 04-02-2015 / 07:41:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2682 |
! |
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
2683 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2684 |
additionalRulesHG_bc_dot_mak |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2685 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2686 |
(self class includesSelector: #version_HG) ifFalse:[^'']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2687 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2688 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2689 |
# **Must be at end** |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2690 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2691 |
# Enforce recompilation of package definition class if Mercurial working |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2692 |
# copy state changes. Together with --guessVersion it ensures that package |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2693 |
# definition class always contains correct binary revision string. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2694 |
!!IFDEF HGROOT |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2695 |
$(OUTDIR)%1.$(O): $(HGROOT)\.hg\dirstate |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2696 |
!!ENDIF |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2697 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2698 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2699 |
" |
23124 | 2700 |
stx_libscm_mercurial additionalRulesHG_bc_dot_mak |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2701 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2702 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2703 |
"Created: / 28-11-2012 / 10:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2704 |
"Modified: / 08-12-2012 / 12:18:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2705 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2706 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2707 |
additionalRulesHG_make_dot_proto |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2708 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2709 |
(self class includesSelector: #version_HG) ifFalse:[^'']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2710 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2711 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2712 |
# Enforce recompilation of package definition class if Mercurial working |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2713 |
# copy state changes. Together with --guessVersion it ensures that package |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2714 |
# definition class always contains correct binary revision string. |
23310 | 2715 |
ifdef HGROOT |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2716 |
ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n ''**NOHG**'')) |
23310 | 2717 |
%1.$(O): $(shell hg root)/.hg/dirstate |
2718 |
endif |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2719 |
endif |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2720 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2721 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2722 |
" |
23310 | 2723 |
stx_libscm_mercurial additionalRulesHG_make_dot_proto |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2724 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2725 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2726 |
"Created: / 28-11-2012 / 10:12:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
23310 | 2727 |
"Modified: / 28-08-2018 / 16:00:49 / Claus Gittinger" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2728 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2729 |
|
12028 | 2730 |
additionalRulesSvn_make_dot_proto |
2731 |
||
2732 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^'']. |
|
2733 |
||
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2734 |
^' |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2735 |
# Update SVN revision in package definition class |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2736 |
ifneq (,$(findstring .svn,$(wildcard .svn))) |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2737 |
.svnversion: *.st |
23124 | 2738 |
if [ -d .svn ]; then \ |
2739 |
rev=$(shell svnversion -n); \ |
|
2740 |
echo -n $$rev > .svnversion; \ |
|
2741 |
else \ |
|
2742 |
echo -n exported > .svnversion; \ |
|
2743 |
fi |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2744 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2745 |
%1.o: %1.st .svnversion |
23124 | 2746 |
@if [ -d .svn ]; then \ |
2747 |
rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \ |
|
2748 |
echo " [SV] Expanding svnRevisionNo in $1.st"; \ |
|
2749 |
sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\''$$rev2\''\"\$$\"/g" $< > .%1.svn.st; \ |
|
2750 |
fi |
|
2751 |
$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.%1.svn $(C_RULE); |
|
2752 |
sed -i -e "s/\".%1.svn.st\");/\"\%1.st\");/g" .%1.svn.c |
|
2753 |
$(MAKE) .%1.svn.$(O) |
|
2754 |
@mv .%1.svn.$(O) %1.$(O) |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2755 |
endif |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2756 |
' bindWith: self name. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2757 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2758 |
" |
23124 | 2759 |
stx_libbasic3 additionalRulesSvn_make_dot_proto |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2760 |
" |
12028 | 2761 |
|
2762 |
"Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2763 |
"Modified: / 28-11-2012 / 10:12:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2764 |
! |
2765 |
||
10306 | 2766 |
additionalRules_bc_dot_mak |
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2767 |
"obsolete - kept for compatibility with old project files" |
13419 | 2768 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2769 |
^ '' |
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2770 |
|
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2771 |
"Created: / 22-08-2006 / 23:59:24 / cg" |
10306 | 2772 |
! |
2773 |
||
9625 | 2774 |
additionalRules_make_dot_proto |
2775 |
"allows for additional rules to be added to the make.proto file." |
|
2776 |
||
2777 |
^ '' |
|
2778 |
||
2779 |
"Created: / 22-08-2006 / 23:59:16 / cg" |
|
2780 |
! |
|
2781 |
||
9972
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2782 |
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
|
2783 |
"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
|
2784 |
|
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2785 |
^ '' |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2786 |
! |
c63164ec0584
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9964
diff
changeset
|
2787 |
|
12028 | 2788 |
additionalTargetsSvn_make_dot_proto |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2789 |
"Returns additional targets to make when build projec |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2790 |
checked out from SVN" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2791 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2792 |
"As of 2011-02-06, new version of libsvn does not use any additional targets" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2793 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2794 |
^'' |
12028 | 2795 |
|
2796 |
"Created: / 24-06-2009 / 21:35:15 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
2797 |
"Modified (comment): / 06-02-2012 / 15:34:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12028 | 2798 |
! |
2799 |
||
10306 | 2800 |
additionalTargets_bc_dot_mak |
23517 | 2801 |
"can list additional bc.mak targets (additional windows support files)" |
13419 | 2802 |
|
10312
7f71d47b09bd
#additionalTargets_bc_dot_mak for applications
Stefan Vogel <sv@exept.de>
parents:
10306
diff
changeset
|
2803 |
^ '' |
10306 | 2804 |
|
2805 |
"Created: / 23-08-2006 / 00:00:35 / cg" |
|
23517 | 2806 |
"Modified (comment): / 07-11-2018 / 19:19:51 / Claus Gittinger" |
10306 | 2807 |
! |
2808 |
||
9625 | 2809 |
additionalTargets_make_dot_proto |
23517 | 2810 |
"can list additional Make.proto targets (additional unix support files)" |
9625 | 2811 |
|
2812 |
^ '' |
|
2813 |
||
2814 |
"Created: / 22-08-2006 / 23:53:33 / cg" |
|
23517 | 2815 |
"Modified (comment): / 07-11-2018 / 19:20:02 / Claus Gittinger" |
9625 | 2816 |
! |
2817 |
||
18428 | 2818 |
additional_post_nsis_rules |
2819 |
"this will be performed after the nsis did build the program installer" |
|
2820 |
^ '' |
|
2821 |
||
2822 |
"Created: / 02-06-2015 / 17:41:37 / gg" |
|
2823 |
! |
|
2824 |
||
19592 | 2825 |
additional_post_nsis_rules64 |
2826 |
"this will be performed after the nsis did build the program installer for 64bit build" |
|
2827 |
^ '' |
|
2828 |
||
2829 |
"Created: / 02-06-2015 / 17:41:37 / gg" |
|
2830 |
! |
|
2831 |
||
10979 | 2832 |
globalDefines |
2833 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2834 |
an subprojects" |
|
2835 |
||
2836 |
^ '' |
|
2837 |
! |
|
2838 |
||
2839 |
globalDefines_unix |
|
2840 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2841 |
an subprojects" |
|
2842 |
||
2843 |
^ self globalDefines |
|
2844 |
! |
|
2845 |
||
2846 |
globalDefines_win32 |
|
2847 |
"allow for the specification of additional defines for stc compilation of prerequisite packages |
|
2848 |
an subprojects" |
|
2849 |
||
2850 |
^ self globalDefines |
|
2851 |
! |
|
2852 |
||
10331 | 2853 |
localDefines |
10979 | 2854 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2855 |
|
2856 |
^ '' |
|
2857 |
! |
|
2858 |
||
2859 |
localDefines_unix |
|
10979 | 2860 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2861 |
|
2862 |
^ self localDefines |
|
2863 |
! |
|
2864 |
||
2865 |
localDefines_win32 |
|
10979 | 2866 |
"allow for the specification of additional defines for stc compilation" |
10331 | 2867 |
|
2868 |
^ self localDefines |
|
2869 |
! |
|
2870 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2871 |
localIncludes |
10979 | 2872 |
"allow for the specification of additional include directories" |
9714 | 2873 |
|
2874 |
^ '' |
|
2875 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2876 |
"Created: / 06-09-2006 / 18:14:31 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2877 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2878 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2879 |
localIncludes_unix |
10979 | 2880 |
"allow for the specification of additional include directories" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2881 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2882 |
^ self makeUnixIncludes:(self localIncludes) |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2883 |
|
9714 | 2884 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2885 |
"Modified: / 06-09-2006 / 18:15:26 / cg" |
9714 | 2886 |
! |
2887 |
||
2888 |
localIncludes_win32 |
|
10979 | 2889 |
"allow for the specification of additional include directories" |
9714 | 2890 |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2891 |
^ self makeWin32Includes:(self localIncludes) |
9714 | 2892 |
|
2893 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
2894 |
"Modified: / 06-09-2006 / 18:15:37 / cg" |
9714 | 2895 |
! |
2896 |
||
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
|
2897 |
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
|
2898 |
"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
|
2899 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2900 |
^ '' |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2901 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2902 |
"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
|
2903 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2904 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2905 |
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
|
2906 |
"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
|
2907 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2908 |
^ 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
|
2909 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2910 |
"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
|
2911 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2912 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2913 |
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
|
2914 |
"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
|
2915 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2916 |
^ 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
|
2917 |
|
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2918 |
"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
|
2919 |
! |
8b244e994b96
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11562
diff
changeset
|
2920 |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2921 |
singleHeaderRuleTemplate_bc_dot_mak |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2922 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2923 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2924 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2925 |
%1\%2.$(H): |
17253 | 2926 |
',Character tab,'pushd %1 \ |
2927 |
',Character tab,'& $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
|
2928 |
',Character tab,'& popd |
|
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2929 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2930 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2931 |
"Created: / 12-09-2011 / 15:55:49 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2932 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2933 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2934 |
singleHeaderRuleTemplate_make_dot_proto |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2935 |
"rules for header files (of autoloaded classes)" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2936 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2937 |
^ ' |
13688
4f43dc4a3182
added: #additionalHeaderRulesUsingTemplate:pathConverter:
Claus Gittinger <cg@exept.de>
parents:
13687
diff
changeset
|
2938 |
%1/%2.$(H): |
17253 | 2939 |
',Character tab,'cd %1 && $(STC) $(FFLAGS) $(STCFLAGS) $(STC_MSGFORMAT) $(DBGFLAGS) $(DEFS) -C -headerOnly %2.st \ |
13687
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2940 |
' |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2941 |
|
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2942 |
"Created: / 12-09-2011 / 15:55:57 / cg" |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2943 |
! |
1577ea868878
generate rules for header files of extended classes
Claus Gittinger <cg@exept.de>
parents:
13650
diff
changeset
|
2944 |
|
9575 | 2945 |
stcOptimizationOptions |
2946 |
"see the stc reference / stc usage for options. |
|
17070 | 2947 |
Can be redefined in concrete packages. |
9575 | 2948 |
For now, the following variants are useful: |
23124 | 2949 |
+optspace3 most compact code |
2950 |
- use for all gui, application code. |
|
2951 |
||
2952 |
+optinline +optinline2 +inlineNew |
|
2953 |
fastest code |
|
2954 |
- use only for computation-intensive classes" |
|
9575 | 2955 |
|
2956 |
^ '+optspace3' |
|
2957 |
||
2958 |
"Created: / 18-08-2006 / 12:50:27 / cg" |
|
9536 | 2959 |
! |
2960 |
||
9575 | 2961 |
stcWarningOptions |
2962 |
"see the stc reference / stc usage for options. |
|
17070 | 2963 |
Can be redefined in concrete packages. |
9575 | 2964 |
For now, the following variants are useful: |
23124 | 2965 |
-warn no warnings |
2966 |
-warnNonStandard no warnings about non-standard smalltalk features |
|
2967 |
-warnUnused no warnings about unused variables" |
|
9575 | 2968 |
|
9714 | 2969 |
^ '-warnNonStandard' |
9575 | 2970 |
|
2971 |
"Created: / 18-08-2006 / 12:51:38 / cg" |
|
2972 |
! ! |
|
9536 | 2973 |
|
22688 | 2974 |
!ProjectDefinition class methodsFor:'description - contents'! |
2975 |
||
2976 |
additionalClassNamesAndAttributes |
|
2977 |
"a List of classes, that belong to the project, but may not be included |
|
2978 |
in the image (someone may have removed it by purpose)" |
|
2979 |
||
2980 |
^ #() |
|
2981 |
||
2982 |
"Created: / 21-08-2006 / 19:53:04 / cg" |
|
2983 |
! |
|
2984 |
||
2985 |
classNamesAndAttributes |
|
2986 |
"a correponding method with real names must be present in my concrete subclasses" |
|
2987 |
||
2988 |
"/ should this be a subclassResponsibility here ? |
|
2989 |
^ #() |
|
2990 |
||
2991 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
2992 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
2993 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
2994 |
! |
|
2995 |
||
2996 |
extensionMethodNames |
|
2997 |
"lists the extension methods which are to be included in the project. |
|
2998 |
Entries are 2-element array literals, consisting of class-name and selector. |
|
2999 |
A correponding method with real names must be present in my concrete subclasses |
|
3000 |
if it has extensions." |
|
3001 |
||
3002 |
"/ should this be a subclassResponsibility here ? |
|
3003 |
^ #() |
|
3004 |
||
3005 |
"Modified: / 17-08-2006 / 20:49:51 / cg" |
|
3006 |
! |
|
3007 |
||
3008 |
ignoredClassNames |
|
3009 |
"can be redefined to suppress some classes from being included in a |
|
3010 |
generated classNamesAndAttributes spec" |
|
3011 |
||
3012 |
^ #() |
|
3013 |
||
3014 |
"Created: / 23-01-2007 / 19:08:27 / cg" |
|
3015 |
! ! |
|
22657 | 3016 |
|
23866 | 3017 |
!ProjectDefinition class methodsFor:'description - java'! |
3018 |
||
3019 |
javaBundle |
|
3020 |
"Defines a Java code bundle provided by this package. |
|
3021 |
Used by STX:LIBJAVA" |
|
3022 |
||
3023 |
^nil |
|
3024 |
||
3025 |
"Created: / 15-01-2013 / 16:49:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3026 |
! |
|
3027 |
||
3028 |
javaClassPath |
|
3029 |
| bundle | |
|
3030 |
||
3031 |
bundle := self javaBundle. |
|
3032 |
^ bundle notNil ifTrue:[ bundle classPath ] ifFalse: [ #() ] |
|
3033 |
||
3034 |
"Created: / 13-12-2011 / 23:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3035 |
"Modified: / 21-01-2015 / 11:11:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3036 |
! |
|
3037 |
||
3038 |
javaSourcePath |
|
3039 |
| bundle | |
|
3040 |
||
3041 |
bundle := self javaBundle. |
|
3042 |
^ bundle notNil ifTrue:[ bundle sourcePath ] ifFalse: [ #() ] |
|
3043 |
||
3044 |
"Created: / 13-12-2011 / 23:49:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3045 |
"Modified: / 21-01-2015 / 11:11:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3046 |
! ! |
|
3047 |
||
9575 | 3048 |
!ProjectDefinition class methodsFor:'description - project information'! |
3049 |
||
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3050 |
applicationAdditionalIconFileNames |
13419 | 3051 |
"Return the icon-filenames for additional icons of the application |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3052 |
(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
|
3053 |
|
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3054 |
^ #() |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3055 |
! |
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
3056 |
|
20567 | 3057 |
applicationDocumentTypeDescriptions |
3058 |
"Return the OSX document type descriptions. |
|
3059 |
For deployment, some systems can make use of additional information |
|
3060 |
on which documents are handled by the application. |
|
3061 |
This is used eg. for double-clicking on a document in OSX. |
|
3062 |
If the deployed app can/should handle this, redefine this |
|
21562 | 3063 |
to return a collection of instances of ApplicationDocumentTypeDescription." |
20567 | 3064 |
|
3065 |
||
3066 |
^ nil |
|
21562 | 3067 |
|
3068 |
"Modified (comment): / 24-02-2017 / 09:36:42 / cg" |
|
20567 | 3069 |
! |
3070 |
||
11039
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
3071 |
applicationIconFileName |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
3072 |
"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
|
3073 |
|
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
3074 |
^ nil |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
3075 |
! |
1f977c01e7df
Fix usage of #iconFilename vs. #applicationIconFilename
Stefan Vogel <sv@exept.de>
parents:
11035
diff
changeset
|
3076 |
|
20567 | 3077 |
applicationIconFileNameLinux |
3078 |
"Return the icon-filename for the application (nil if there is none)" |
|
3079 |
||
3080 |
^ nil |
|
3081 |
! |
|
3082 |
||
3083 |
applicationIconFileNameOSX |
|
3084 |
"Return the OSX icon-filename for the application (nil if there is none). |
|
3085 |
This must be the name of a .icns file, which contains the app-icon in |
|
3086 |
multiple resolutions." |
|
3087 |
||
3088 |
^ nil |
|
3089 |
! |
|
3090 |
||
3091 |
applicationIconFileNameWindows |
|
3092 |
"Return the icon-filename for the application (nil if there is none). |
|
3093 |
This must be the name of a .ico file, which contains the app-icon in |
|
3094 |
single or multiple resolutions." |
|
3095 |
||
3096 |
"/ for backward compatibility |
|
3097 |
^ self applicationIconFileName |
|
3098 |
! |
|
3099 |
||
21571 | 3100 |
applicationReadMeFileNameOSX |
3101 |
"Return the OSX filename for a readme file. |
|
3102 |
If nil, nothing is installed; |
|
3103 |
if non-nil, it is copied into the dmg folder." |
|
3104 |
||
3105 |
^ nil |
|
3106 |
||
3107 |
"Created: / 24-02-2017 / 14:21:57 / cg" |
|
3108 |
! |
|
3109 |
||
9575 | 3110 |
companyName |
9584 | 3111 |
"Returns a company string which will appear in <lib>.rc. |
20564 | 3112 |
Under win32, this is placed into the dll's file-info. |
3113 |
Other systems may put it elsewhere, or ignore it." |
|
9575 | 3114 |
|
20601 | 3115 |
|m| |
23124 | 3116 |
|
20601 | 3117 |
m := self module. |
3118 |
(m = 'stx') ifTrue:[ |
|
23124 | 3119 |
^ 'Claus Gittinger & eXept Software AG' |
20601 | 3120 |
]. |
3121 |
(m = 'exept') ifTrue:[ |
|
23124 | 3122 |
^ 'eXept Software AG' |
20601 | 3123 |
]. |
9575 | 3124 |
^ 'My Company' |
3125 |
||
9584 | 3126 |
"Modified: / 18-08-2006 / 16:08:20 / cg" |
9536 | 3127 |
! |
3128 |
||
3129 |
description |
|
10306 | 3130 |
"Returns a description string which will appear in vc.def / bc.def" |
9536 | 3131 |
|
9803 | 3132 |
^self productName,' ',self packageName |
3133 |
"/ ^ self name |
|
9536 | 3134 |
|
3135 |
"Created: / 08-08-2006 / 11:15:01 / fm" |
|
9575 | 3136 |
"Modified: / 17-08-2006 / 20:53:34 / cg" |
3137 |
! |
|
3138 |
||
3139 |
fileDescription |
|
10416 | 3140 |
"Returns a description string which will appear in libName.rc and the rc-file" |
9575 | 3141 |
|
9803 | 3142 |
^self description |
9575 | 3143 |
|
3144 |
"Modified: / 17-08-2006 / 20:27:07 / cg" |
|
3145 |
! |
|
3146 |
||
3147 |
fileMajorVersionNr |
|
3148 |
"Returns a versionNumber which will appear in libName.rc" |
|
3149 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
3150 |
^ self majorVersionNr |
9575 | 3151 |
|
3152 |
"Created: / 18-08-2006 / 12:03:32 / cg" |
|
9817 | 3153 |
"Modified: / 30-08-2006 / 18:50:51 / cg" |
9575 | 3154 |
! |
3155 |
||
3156 |
fileMinorVersionNr |
|
3157 |
"Returns a versionNumber which will appear in libName.rc" |
|
3158 |
||
11100
c9ec12ef4b3b
Set default for fileMajorVersionNumber and fileMajorVersionNumber
Stefan Vogel <sv@exept.de>
parents:
11074
diff
changeset
|
3159 |
^ self minorVersionNr |
9575 | 3160 |
|
3161 |
"Created: / 18-08-2006 / 12:03:13 / cg" |
|
9817 | 3162 |
"Modified: / 30-08-2006 / 18:50:46 / cg" |
9575 | 3163 |
! |
3164 |
||
3165 |
fileReleaseNr |
|
3166 |
"Returns a releaseNumber which will appear in libName.rc" |
|
3167 |
||
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
3168 |
"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
|
3169 |
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
|
3170 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3171 |
"JV@2012-11-20: Original code was: |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3172 |
|
11035
ff88ec6339a3
Generate valid project.rc files even if the CVS revision string ends with
Stefan Vogel <sv@exept.de>
parents:
10979
diff
changeset
|
3173 |
^ self cvsRevision last upTo:$m |
9575 | 3174 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3175 |
But this is too CVS specific. Modern SCMs does not use X.Y style |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3176 |
revision numbers, instead it uses hashes (Git/Mercurial/Darcs/Monotone). |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3177 |
Even worse, all the SCM code passes strings around, so providing compatible, |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3178 |
polymorph object is not possible. Hence following hack." |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3179 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3180 |
| nr | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3181 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3182 |
nr := (self cvsRevision last upTo:$m) select:[:c|c isDigit]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3183 |
nr isEmptyOrNil ifTrue:[^'0']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3184 |
nr := (nr asInteger min: 16r7FFF) printString. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3185 |
^nr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3186 |
|
9575 | 3187 |
"Created: / 18-08-2006 / 12:02:58 / cg" |
9817 | 3188 |
"Modified: / 30-08-2006 / 18:54:48 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3189 |
"Modified: / 23-11-2012 / 11:24:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9536 | 3190 |
! |
3191 |
||
9575 | 3192 |
fileRevisionNr |
3193 |
"Returns a revisionNumber which will appear in libName.rc" |
|
9536 | 3194 |
|
9817 | 3195 |
"take the default revision from the cvs-version" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3196 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3197 |
"JV@2012-11-20: Original code was: |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3198 |
|
9618 | 3199 |
^ self cvsRevision first |
9575 | 3200 |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3201 |
But this is too CVS specific. Modern SCMs does not use X.Y style |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3202 |
revision numbers, instead it uses hashes (Git/Mercurial/Darcs/Monotone). |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3203 |
Even worse, all the SCM code passes strings around, so providing compatible, |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3204 |
polymorph object is not possible. Hence following hack." |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3205 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3206 |
| nr | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3207 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3208 |
nr := self cvsRevision first select:[:c|c isDigit]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3209 |
nr isEmptyOrNil ifTrue:[^'0']. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3210 |
nr := (nr asInteger min: 16r7FFF) printString. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3211 |
^nr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3212 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3213 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3214 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3215 |
stx_libbasic fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3216 |
stx_libbasic2 fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3217 |
stx_libscm_mercurial fileRevisionNr |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3218 |
" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3219 |
|
9575 | 3220 |
"Created: / 18-08-2006 / 12:02:39 / cg" |
9817 | 3221 |
"Modified: / 30-08-2006 / 18:54:39 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
3222 |
"Modified: / 23-11-2012 / 11:24:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9536 | 3223 |
! |
3224 |
||
9575 | 3225 |
fileVersion |
3226 |
"Returns a fileVersion string which will appear in libName.rc" |
|
3227 |
||
3228 |
"<major>.<minor>.<rev>.<rel> (such as '1.2.17.1') " |
|
3229 |
||
13419 | 3230 |
^ '%1.%2.%3.%4' |
23124 | 3231 |
bindWith:self fileMajorVersionNr |
3232 |
with:self fileMinorVersionNr |
|
3233 |
with:self fileRevisionNr |
|
3234 |
with:self fileReleaseNr. |
|
9575 | 3235 |
|
3236 |
" |
|
3237 |
self fileVersion |
|
3238 |
" |
|
3239 |
||
9817 | 3240 |
"Modified: / 30-08-2006 / 18:51:49 / cg" |
9575 | 3241 |
! |
9536 | 3242 |
|
9575 | 3243 |
fileVersionCommaSeparated |
3244 |
"Returns a fileVersion string which will appear in libName.rc" |
|
3245 |
||
9817 | 3246 |
"<major>,<minor>,<revision>,<release> (such as '2,17,1,2') " |
3247 |
||
13419 | 3248 |
^ '%1,%2,%3,%4' |
23124 | 3249 |
bindWith:self fileMajorVersionNr |
3250 |
with:self fileMinorVersionNr |
|
3251 |
with:self fileRevisionNr |
|
3252 |
with:self fileReleaseNr. |
|
9575 | 3253 |
|
3254 |
"Created: / 17-08-2006 / 20:16:17 / cg" |
|
9817 | 3255 |
"Modified: / 30-08-2006 / 18:54:20 / cg" |
3256 |
! |
|
3257 |
||
9575 | 3258 |
internalName |
3259 |
"Returns a name string which will appear in libName.rc" |
|
3260 |
||
11041
3bb26d86e616
Fix #description and #internalName
Stefan Vogel <sv@exept.de>
parents:
11039
diff
changeset
|
3261 |
^ self package |
9575 | 3262 |
|
3263 |
"Modified: / 17-08-2006 / 20:27:37 / cg" |
|
9536 | 3264 |
! |
3265 |
||
9575 | 3266 |
legalCopyright |
9584 | 3267 |
"Returns a copyright string which will appear in <lib>.rc. |
20564 | 3268 |
Under win32, this is placed into the dll's file-info. |
3269 |
Other systems may put it elsewhere, or ignore it." |
|
9575 | 3270 |
|
20985 | 3271 |
|m thisYear template| |
23124 | 3272 |
|
20985 | 3273 |
m := self module. |
3274 |
thisYear := Date today year. |
|
3275 |
||
20601 | 3276 |
m = 'stx' ifTrue:[ |
23124 | 3277 |
"hardwired-default" |
3278 |
template := 'Copyright Claus Gittinger %1\nCopyright eXept Software AG %1' |
|
20985 | 3279 |
] ifFalse:[ |
23124 | 3280 |
m = 'exept' ifTrue:[ |
3281 |
"hardwired-default" |
|
3282 |
template := 'Copyright eXept Software AG %1' |
|
3283 |
] ifFalse:[ |
|
3284 |
template := 'My CopyRight or CopyLeft %1' |
|
3285 |
]. |
|
20985 | 3286 |
]. |
3287 |
^ template bindWith:thisYear |
|
3288 |
||
3289 |
" |
|
3290 |
self legalCopyright |
|
3291 |
" |
|
3292 |
||
3293 |
"Modified (comment): / 18-11-2016 / 12:23:36 / cg" |
|
9575 | 3294 |
! |
3295 |
||
3296 |
majorVersionNr |
|
3297 |
"Returns a versionNumber which will appear in libName.rc" |
|
3298 |
||
3299 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
3300 |
the default here takes smalltalks version number. |
|
20424 | 3301 |
But that's probably not good for an end-user-app." |
9575 | 3302 |
|
11042 | 3303 |
^ Smalltalk majorVersionNr |
9575 | 3304 |
|
3305 |
"Created: / 17-08-2006 / 20:20:18 / cg" |
|
9817 | 3306 |
"Modified: / 30-08-2006 / 18:52:13 / cg" |
9575 | 3307 |
! |
3308 |
||
3309 |
minorVersionNr |
|
3310 |
"Returns a versionNumber which will appear in libName.rc" |
|
9536 | 3311 |
|
9575 | 3312 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
3313 |
the default here takes smalltalks version number. |
|
20424 | 3314 |
But that's probably not good for an end-user-app." |
9575 | 3315 |
|
11042 | 3316 |
^ Smalltalk minorVersionNr |
9575 | 3317 |
|
3318 |
"Created: / 17-08-2006 / 20:20:32 / cg" |
|
9817 | 3319 |
"Modified: / 30-08-2006 / 18:52:16 / cg" |
9575 | 3320 |
! |
3321 |
||
3322 |
productDate |
|
11043 | 3323 |
"Returns a product-date string which will appear in libName.rc and the installer file" |
9575 | 3324 |
|
3325 |
"take the current date - by default" |
|
9536 | 3326 |
|
9575 | 3327 |
^ Timestamp now printStringRFC1123Format |
3328 |
||
3329 |
"Created: / 17-08-2006 / 20:17:28 / cg" |
|
3330 |
! |
|
3331 |
||
13177 | 3332 |
productDescription |
3333 |
"Returns a description (for autopackage)" |
|
3334 |
||
3335 |
^ self description |
|
3336 |
||
3337 |
"Created: / 21-12-2010 / 09:32:16 / cg" |
|
3338 |
! |
|
3339 |
||
10426 | 3340 |
productFilename |
20546 | 3341 |
"Returns a filename which will be used as linkname, product file name etc. |
3342 |
The final deployable will be named like this (<fn>.dmg / <fn>Setup.ex / <fn>Install.pkg etc.)" |
|
10426 | 3343 |
|
3344 |
^ self productNameAsValidFilename |
|
3345 |
||
3346 |
" |
|
13419 | 3347 |
stx_projects_smalltalk productName |
10426 | 3348 |
stx_projects_smalltalk productFilename |
20546 | 3349 |
stx_libbasic productFilename |
3350 |
stx_doc_coding_demoConsoleApp productFilename |
|
10426 | 3351 |
" |
3352 |
||
3353 |
"Created: / 01-03-2007 / 19:33:06 / cg" |
|
3354 |
! |
|
3355 |
||
9898 | 3356 |
productInstallDir |
13873 | 3357 |
"Returns a default installDir which will appear in <app>.nsi." |
3358 |
||
3359 |
^ '$PROGRAMFILES\',(self productInstallDirBaseName). |
|
3360 |
||
3361 |
" |
|
3362 |
stx_projects_smalltalk productInstallDir |
|
3363 |
stx_clients_Clock_QlockTwoWatchApplication productInstallDir |
|
3364 |
" |
|
9898 | 3365 |
|
3366 |
"Created: / 14-09-2006 / 21:23:01 / cg" |
|
3367 |
! |
|
3368 |
||
13873 | 3369 |
productInstallDirBaseName |
3370 |
"Returns a default installDir which will appear in <app>.nsi. |
|
3371 |
This is usually not the one you want to keep" |
|
3372 |
||
3373 |
^ self module |
|
3374 |
||
3375 |
"Created: / 21-12-2011 / 16:31:38 / cg" |
|
3376 |
! |
|
3377 |
||
13177 | 3378 |
productLicense |
3379 |
"Returns the license (for autopackage)" |
|
3380 |
||
3381 |
^ 'Commercial' |
|
3382 |
||
3383 |
"Created: / 21-12-2010 / 09:31:25 / cg" |
|
3384 |
! |
|
3385 |
||
3386 |
productMaintainer |
|
3387 |
"Returns the maintainer (for autopackage)" |
|
3388 |
||
3389 |
^ self companyName |
|
3390 |
||
3391 |
"Created: / 21-12-2010 / 09:26:16 / cg" |
|
3392 |
! |
|
3393 |
||
9575 | 3394 |
productName |
9584 | 3395 |
"Returns a product name which will appear in <lib>.rc. |
20564 | 3396 |
Under win32, this is placed into the dll's file-info. |
15216 | 3397 |
This method is usually redefined in a concrete application definition" |
3398 |
||
21683 | 3399 |
|m| |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
3400 |
|
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
3401 |
m := self module. |
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
3402 |
m = 'stx' ifTrue:[ |
23124 | 3403 |
^ 'Smalltalk/X' |
9575 | 3404 |
]. |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
3405 |
m = 'exept' ifTrue:[ |
23124 | 3406 |
^ 'eXept AddOns' |
10785
da5023cdf55b
no need for productName string (already inherited)
Claus Gittinger <cg@exept.de>
parents:
10774
diff
changeset
|
3407 |
]. |
21683 | 3408 |
^ nil. |
10296 | 3409 |
|
20982 | 3410 |
"Modified: / 18-11-2016 / 11:44:03 / cg" |
21683 | 3411 |
"Modified: / 03-04-2017 / 19:09:22 / stefan" |
9536 | 3412 |
! |
3413 |
||
10426 | 3414 |
productNameAsValidFilename |
20546 | 3415 |
"Returns a filename generated from the product name. |
3416 |
This will be the name of the deployable package (i.e. <fn>.dmg, <fn>Setup.exe, etc.)" |
|
10426 | 3417 |
|
3418 |
|nm| |
|
3419 |
||
3420 |
nm := self productName. |
|
20546 | 3421 |
^ nm copy replaceAny:'/\:;., ' with:$_ |
10426 | 3422 |
|
3423 |
" |
|
3424 |
'Smalltalk/X' replaceAny:'/\:;.,' with:nil |
|
20546 | 3425 |
stx_doc_coding_demoConsoleApp productName |
3426 |
stx_doc_coding_demoConsoleApp productNameAsValidFilename |
|
10426 | 3427 |
" |
3428 |
||
3429 |
"Created: / 01-03-2007 / 19:19:21 / cg" |
|
3430 |
! |
|
3431 |
||
9898 | 3432 |
productPublisher |
3433 |
"Returns a product publisher which will appear in <app>.nsi." |
|
3434 |
||
3435 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
23124 | 3436 |
^ 'eXept Software AG' |
9898 | 3437 |
]. |
3438 |
||
11789
8d56dc5fa8a8
Default productPublisher is companyName
Stefan Vogel <sv@exept.de>
parents:
11777
diff
changeset
|
3439 |
^ self companyName |
9898 | 3440 |
|
3441 |
"Created: / 14-09-2006 / 21:12:54 / cg" |
|
3442 |
! |
|
3443 |
||
13177 | 3444 |
productType |
3445 |
"Returns the product type for autopackage" |
|
3446 |
||
3447 |
^ 'Application' |
|
3448 |
||
3449 |
"Created: / 21-12-2010 / 09:28:48 / cg" |
|
3450 |
! |
|
3451 |
||
9575 | 3452 |
productVersion |
11043 | 3453 |
"Returns a product version which will appear in libName.rc and the installer file" |
9575 | 3454 |
|
3455 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1')" |
|
9536 | 3456 |
|
13419 | 3457 |
^ '%1.%2.%3.%4' |
23124 | 3458 |
bindWith:self majorVersionNr |
3459 |
with:self minorVersionNr |
|
3460 |
with:self revisionNr |
|
3461 |
with:self releaseNr. |
|
9536 | 3462 |
|
9575 | 3463 |
" |
3464 |
self productVersion |
|
3465 |
" |
|
3466 |
||
9817 | 3467 |
"Modified: / 30-08-2006 / 18:52:47 / cg" |
9536 | 3468 |
! |
3469 |
||
9575 | 3470 |
productVersionCommaSeparated |
3471 |
"Returns a product version which will appear in libName.rc" |
|
3472 |
||
3473 |
"<major>.<minor>.<revision>.<release> (such as '0,1,1,1') " |
|
9536 | 3474 |
|
13419 | 3475 |
^ '%1,%2,%3,%4' |
23124 | 3476 |
bindWith:self majorVersionNr |
3477 |
with:self minorVersionNr |
|
3478 |
with:self revisionNr |
|
3479 |
with:self releaseNr. |
|
11042 | 3480 |
|
3481 |
" |
|
3482 |
self productVersionCommaSeparated |
|
3483 |
" |
|
9536 | 3484 |
|
9575 | 3485 |
"Created: / 17-08-2006 / 20:13:32 / cg" |
9817 | 3486 |
"Modified: / 30-08-2006 / 18:52:42 / cg" |
9536 | 3487 |
! |
3488 |
||
9898 | 3489 |
productWebSite |
3490 |
"Returns a product webSite which will appear in <app>.nsi." |
|
3491 |
||
3492 |
( #('exept' 'stx') includes:self module) ifTrue:[ |
|
23124 | 3493 |
^ 'http://www.exept.de' |
9898 | 3494 |
]. |
3495 |
||
10426 | 3496 |
"/ should be redefined by concrete ApplicationDefinition |
9898 | 3497 |
^ 'http://www.yoursite.com' |
3498 |
||
3499 |
"Created: / 14-09-2006 / 21:15:05 / cg" |
|
10426 | 3500 |
"Modified: / 01-03-2007 / 18:11:27 / cg" |
9898 | 3501 |
! |
3502 |
||
9575 | 3503 |
releaseNr |
3504 |
"Returns a releaseNr which will appear in libName.rc" |
|
3505 |
||
3506 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
|
3507 |
the default here takes smalltalks version number. |
|
20424 | 3508 |
But that's probably not good for an end-user-app." |
9575 | 3509 |
|
11042 | 3510 |
^ Smalltalk releaseNr |
9536 | 3511 |
|
9575 | 3512 |
"Created: / 17-08-2006 / 20:20:51 / cg" |
9817 | 3513 |
"Modified: / 30-08-2006 / 18:52:22 / cg" |
9575 | 3514 |
! |
3515 |
||
3516 |
revisionNr |
|
3517 |
"Returns a revisionNr which will appear in libName.rc" |
|
9536 | 3518 |
|
9575 | 3519 |
"<major>.<minor>.<revision>.<release> (such as '5.3.2.1') |
3520 |
the default here takes smalltalks version number. |
|
20424 | 3521 |
But that's probably not good for an end-user-app." |
9575 | 3522 |
|
11042 | 3523 |
^ Smalltalk revisionNr |
9575 | 3524 |
|
3525 |
"Created: / 17-08-2006 / 20:20:40 / cg" |
|
9817 | 3526 |
"Modified: / 30-08-2006 / 18:52:32 / cg" |
9536 | 3527 |
! |
3528 |
||
17236 | 3529 |
supportedLanguages |
3530 |
"Returns a list of languages that (should be / are) supported by this application or library. |
|
23124 | 3531 |
Currently this is only used by lint, to verify that the corresponding languages are |
17236 | 3532 |
present in the resource files." |
3533 |
||
19656 | 3534 |
self module = 'stx' ifTrue:[ |
23124 | 3535 |
^ #(en de) |
3536 |
]. |
|
17236 | 3537 |
^ #(en) |
19656 | 3538 |
|
3539 |
" |
|
3540 |
stx_goodies_rdoit supportedLanguages |
|
3541 |
cg_tools supportedLanguages |
|
3542 |
" |
|
17236 | 3543 |
! |
3544 |
||
9536 | 3545 |
versionNumber |
10306 | 3546 |
"Returns a version string which will appear in bc.def / vc.def " |
9536 | 3547 |
|
9575 | 3548 |
^'' |
9536 | 3549 |
|
3550 |
"Created: / 08-08-2006 / 11:35:52 / fm" |
|
9575 | 3551 |
"Modified: / 17-08-2006 / 19:46:29 / cg" |
9536 | 3552 |
! ! |
3553 |
||
16854 | 3554 |
!ProjectDefinition class methodsFor:'doc generation'! |
3555 |
||
3556 |
autoDocClassNamePatterns |
|
3557 |
"lists patterns for class names for which autodoc html-documentation files |
|
3558 |
are to be built. |
|
3559 |
Return #( '*' ) to get doc files for all classes" |
|
3560 |
||
3561 |
^ #( |
|
23124 | 3562 |
'*' |
16854 | 3563 |
) |
3564 |
! |
|
3565 |
||
3566 |
generate_autoDocFiles |
|
3567 |
"generate html documentation for all classes matching the autoDocNamePatterns. |
|
3568 |
Use this, if you don't want to deliver source code, but still need some documentation |
|
3569 |
to be deployed." |
|
3570 |
||
3571 |
self classes do:[:eachClass | |
|
23124 | 3572 |
(self autoDocClassNamePatterns contains:[:pattern | pattern match:eachClass name]) ifTrue:[ |
3573 |
self generateClassDocumentationFor:eachClass. |
|
3574 |
] |
|
16854 | 3575 |
]. |
3576 |
! ! |
|
3577 |
||
9569 | 3578 |
!ProjectDefinition class methodsFor:'file generation'! |
9536 | 3579 |
|
13177 | 3580 |
apspecFilename |
13968 | 3581 |
"/ for linux |
13177 | 3582 |
^ 'autopackage/default.apspec' |
3583 |
||
3584 |
"Created: / 21-12-2010 / 09:43:13 / cg" |
|
3585 |
! |
|
3586 |
||
9852 | 3587 |
basicFileNamesToGenerate |
22387 | 3588 |
"answer a dictionary (filename -> generator method) with all the build-support files, |
11937 | 3589 |
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
|
3590 |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3591 |
| dict cls | |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3592 |
|
13419 | 3593 |
dict := OrderedDictionary withKeysAndValues:#( |
23124 | 3594 |
'Make.spec' #'generate_make_dot_spec' |
3595 |
'Make.proto' #'generate_make_dot_proto' |
|
3596 |
"/ cg: changed to generate Makefile.init instead of Makefile, |
|
3597 |
"/ because macosx files are not case sensitive. |
|
3598 |
"/ You will have to execute make -f Makefile.init initially |
|
3599 |
"/ 'Makefile' #'generate_makefile' "/ for unix |
|
3600 |
'Makefile.init' #'generate_makefile' "/ for unix |
|
3601 |
'bc.mak' #'generate_bc_dot_mak' "/ for windows |
|
3602 |
'abbrev.stc' #'generate_abbrev_dot_stc' |
|
3603 |
'bmake.bat' #'generate_bmake_dot_mak' "/ for bcc32 |
|
3604 |
'vcmake.bat' #'generate_vcmake_dot_mak' "/ for msvc |
|
3605 |
"/ 'lccmake.bat' #'generate_lccmake_dot_mak' "/ for lcc - not supported at the moment |
|
3606 |
"/ 'tccmake.bat' #'generate_tccmake_dot_mak' "/ for tcc - cannot link at the moment |
|
3607 |
'mingwmake.bat' #'generate_mingwmake_dot_mak' "/ for mingw |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3608 |
). |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3609 |
|
13419 | 3610 |
dict |
23124 | 3611 |
at:self rcFilename put:#'generate_packageName_dot_rc'. "/ for windows |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3612 |
|
22387 | 3613 |
"Add additional custom files as specified in file:overwrite: annotations" |
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3614 |
cls := self. |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3615 |
[ cls ~~ Object ] whileTrue:[ |
23124 | 3616 |
cls class selectorsAndMethodsDo:[:selector :method | |
3617 |
| annotation | |
|
3618 |
||
3619 |
annotation := method annotationAt: #file:overwrite:. |
|
3620 |
annotation notNil ifTrue:[ |
|
3621 |
dict at: (annotation argumentAt: 1) put: selector |
|
3622 |
]. |
|
3623 |
]. |
|
3624 |
cls := cls superclass. |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3625 |
]. |
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3626 |
|
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3627 |
^ dict. |
13154
bac0fcd8a888
make sure that the makefiles are generated before the libInit file
Claus Gittinger <cg@exept.de>
parents:
13148
diff
changeset
|
3628 |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3629 |
" |
22387 | 3630 |
stx_libbasic basicFileNamesToGenerate |
3631 |
stx_libjava basicFileNamesToGenerate |
|
3632 |
" |
|
3633 |
||
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3634 |
"Modified: / 19-01-2015 / 16:33:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22387 | 3635 |
"Modified (comment): / 04-12-2017 / 17:40:03 / cg" |
9852 | 3636 |
! |
3637 |
||
9536 | 3638 |
fileNamesToGenerate |
22387 | 3639 |
"answer the build-support files that have to be generated as a dictionary of names and generator method" |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3640 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3641 |
^ self basicFileNamesToGenerate removeAllKeys:self protectedFileNames ifAbsent:[] |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3642 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3643 |
" |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3644 |
stx_libbasic fileNamesToGenerate |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3645 |
" |
22387 | 3646 |
|
3647 |
"Modified (comment): / 04-12-2017 / 17:40:23 / cg" |
|
9536 | 3648 |
! |
3649 |
||
13419 | 3650 |
forEachFileNameAndGeneratedContentsDo:aTwoArgBlock |
14930 | 3651 |
"for build-support file generation, checkin etc., use this common method which |
22387 | 3652 |
enumerates all build-support fileNames with their generated contents to be built." |
14930 | 3653 |
|
9544 | 3654 |
|pairs| |
3655 |
||
3656 |
pairs := OrderedCollection new. |
|
23123 | 3657 |
self fileNamesToGenerate keysDo:[:fileName | |
23434 | 3658 |
|fileContents| |
3659 |
||
3660 |
fileContents := self generateFile:fileName confirmMissingClasses:false. |
|
3661 |
fileContents notNil ifTrue:[ |
|
3662 |
pairs add:(Array with:fileName with:fileContents) |
|
3663 |
]. |
|
9544 | 3664 |
]. |
3665 |
||
3666 |
pairs pairsDo:aTwoArgBlock |
|
3667 |
||
3668 |
"Created: / 16-08-2006 / 18:37:52 / User" |
|
17303
70d8ec3051df
Added support for custom build files.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17294
diff
changeset
|
3669 |
"Modified: / 19-01-2015 / 16:58:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22387 | 3670 |
"Modified (comment): / 04-12-2017 / 17:40:49 / cg" |
9544 | 3671 |
! |
3672 |
||
9536 | 3673 |
generateFile:filename |
23434 | 3674 |
^ self generateFile:filename confirmMissingClasses:true |
3675 |
! |
|
3676 |
||
3677 |
generateFile:filename confirmMissingClasses:confirmBoolean |
|
23123 | 3678 |
|action missingNames| |
3679 |
||
23434 | 3680 |
confirmBoolean ifTrue:[ |
3681 |
(#('bc.mak' 'Make.proto' 'loadAll') includes:filename) ifTrue:[ |
|
3682 |
"if there are missing classes in image, the dependencies cannot be computed. |
|
3683 |
Warn the user" |
|
3684 |
||
3685 |
missingNames := |
|
3686 |
self allClassNames "compiled_classNames" |
|
3687 |
select:[:aName | |
|
3688 |
|cls| |
|
3689 |
||
3690 |
cls := Smalltalk at:aName asSymbol. |
|
3691 |
cls isNil |
|
3692 |
]. |
|
3693 |
missingNames notEmpty ifTrue:[ |
|
3694 |
(self confirm:(self classResources |
|
3695 |
stringWithCRs:'While generating %1:\Some classes from the list of compiled classes are missing in the image:\\%2\\If you continue, you have to fix dependencies for these classes in %1 manually!!\\Continue anyway?' |
|
3696 |
with:filename |
|
3697 |
with:(missingNames asStringWith:', '))) |
|
3698 |
ifFalse:[^ nil]. |
|
3699 |
]. |
|
3700 |
]. |
|
23123 | 3701 |
]. |
10864
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3702 |
|
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3703 |
action := self basicFileNamesToGenerate at:filename ifAbsent:[]. |
512cd79cee0e
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10849
diff
changeset
|
3704 |
action notNil ifTrue:[ |
23434 | 3705 |
^ self perform:action |
3706 |
]. |
|
3707 |
(filename = 'app.rc' |
|
3708 |
or:[filename = 'lib.rc' |
|
3709 |
or:[filename = self rcFilename]] |
|
3710 |
) ifTrue:[ |
|
3711 |
^ self generate_packageName_dot_rc |
|
9607 | 3712 |
]. |
9850 | 3713 |
(filename = 'loadAll') ifTrue:[ |
23434 | 3714 |
^ self generate_loadAll |
9850 | 3715 |
]. |
13177 | 3716 |
self error:('File "%1" not appropriate (not generated) for this type of project.' bindWith:filename) |
3717 |
||
21569 | 3718 |
"Modified: / 24-02-2017 / 11:53:18 / cg" |
9536 | 3719 |
! |
3720 |
||
13411 | 3721 |
generateFile:filename in: directory |
16257 | 3722 |
|dir| |
3723 |
||
13411 | 3724 |
dir := directory asFilename. |
3725 |
dir exists ifFalse:[self error:'Directory does not exist']. |
|
16257 | 3726 |
|
3727 |
(dir / (filename asFilename baseName)) contents:(self generateFile: filename). |
|
13411 | 3728 |
|
3729 |
" |
|
23124 | 3730 |
stx_projects_smalltalk generateFile:'package.deps.rake' in: '/tmp' |
13411 | 3731 |
" |
3732 |
||
3733 |
"Created: / 26-02-2011 / 10:42:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3734 |
"Modified: / 09-06-2011 / 14:53:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3735 |
! |
|
3736 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3737 |
generateRemoveShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3738 |
"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
|
3739 |
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
|
3740 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3741 |
|firstLine| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3742 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3743 |
firstLine := true. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3744 |
self searchForClasses do:[:eachClass| |
23124 | 3745 |
eachClass isJavaClass ifFalse:[ |
3746 |
firstLine ifTrue:[ |
|
3747 |
aStream nextPutAll:'cvs rm -f '. |
|
3748 |
firstLine := false. |
|
3749 |
]. |
|
3750 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
|
3751 |
aStream nextPutAll:eachClass classBaseFilename; space. |
|
3752 |
] |
|
3753 |
]. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3754 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3755 |
firstLine ifFalse:[ |
23124 | 3756 |
aStream cr. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3757 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3758 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3759 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3760 |
stx_goodies_webServer_htmlTree generateRemoveShellScriptOn:Transcript |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3761 |
" |
16802
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
3762 |
|
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
3763 |
"Modified: / 30-07-2014 / 20:44:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3764 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3765 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3766 |
generateRenameShellScriptOn:aStream |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3767 |
"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
|
3768 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3769 |
self searchForClasses do:[:eachClass| |
23124 | 3770 |
eachClass isJavaClass ifFalse:[ |
3771 |
eachClass classFilename ~= (eachClass generateClassFilename, '.st') ifTrue:[ |
|
3772 |
aStream nextPutAll:'cp '; |
|
3773 |
nextPutAll:eachClass classBaseFilename; nextPutAll:',v '; |
|
3774 |
nextPutAll:eachClass generateClassFilename; nextPutAll:'.st,v'; cr. |
|
3775 |
] |
|
3776 |
] |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3777 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3778 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3779 |
" |
11981
e479249ba36e
Fix #generateRenameShellScriptOn:
Stefan Vogel <sv@exept.de>
parents:
11980
diff
changeset
|
3780 |
stx_libdb generateRemoveShellScriptOn:Transcript |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3781 |
" |
16802
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
3782 |
|
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
3783 |
"Modified: / 30-07-2014 / 20:44:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3784 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3785 |
|
9536 | 3786 |
generate_abbrev_dot_stc |
13968 | 3787 |
"/ for stc: provides abbreviations and namespace information |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
3788 |
self checkIfClassesArePresent. |
10104
96bce48c03b5
some care for incomplete information bein present when
Claus Gittinger <cg@exept.de>
parents:
10103
diff
changeset
|
3789 |
|
13419 | 3790 |
^ String |
23124 | 3791 |
streamContents:[:s | |
3792 |
|addEntry| |
|
3793 |
||
3794 |
addEntry := |
|
3795 |
[:eachClassName | |
|
3796 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
|
3797 |
||
3798 |
s nextPutAll:eachClassName. |
|
3799 |
s nextPutAll:' '. |
|
3800 |
||
3801 |
cls := Smalltalk classNamed:eachClassName. |
|
3802 |
cls isNil ifTrue:[ |
|
3803 |
fn := self filenameForClass:eachClassName. |
|
3804 |
s nextPutAll:fn. |
|
3805 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
|
3806 |
s nextPutAll:' '; nextPutAll:'unknownCategory' storeString; nextPutAll:' '. |
|
3807 |
s nextPutAll:' '; nextPutAll:'0'. |
|
3808 |
] ifFalse:[ |
|
3809 |
wasLoaded := cls isLoaded. |
|
3810 |
wasLoaded ifFalse:[ |
|
3811 |
failedToLoad := false. |
|
3812 |
||
3813 |
Error handle:[:ex | |
|
3814 |
failedToLoad := true. |
|
3815 |
] do:[ |
|
3816 |
ParserFlags |
|
3817 |
withSTCCompilation:#never |
|
3818 |
do:[ |
|
3819 |
cls autoload. |
|
3820 |
] |
|
3821 |
]. |
|
3822 |
]. |
|
3823 |
||
3824 |
fn := self filenameForClass:cls. |
|
3825 |
(fn includes:Character space) ifTrue:[ |
|
3826 |
s nextPutAll:fn storeString. |
|
3827 |
] ifFalse:[ |
|
3828 |
s nextPutAll:fn. |
|
3829 |
]. |
|
3830 |
s nextPutAll:' '; nextPutAll:(self package); nextPutAll:' '. |
|
3831 |
s nextPutAll: (cls category asString storeString). |
|
3832 |
failedToLoad ifTrue:[ |
|
3833 |
s nextPutAll:' 0'. |
|
3834 |
] ifFalse:[ |
|
3835 |
numClassInstvars := cls theMetaclass instSize - Class instSize. |
|
3836 |
s nextPutAll:' '; nextPutAll:numClassInstvars printString. |
|
3837 |
]. |
|
3838 |
||
3839 |
wasLoaded ifFalse:[ |
|
3840 |
UserPreferences current autoUnloadAutoloadedClassesInProjectDefinition ifTrue:[ |
|
3841 |
cls unload |
|
3842 |
] |
|
3843 |
] |
|
3844 |
]. |
|
3845 |
s cr. |
|
3846 |
]. |
|
3847 |
||
3848 |
s nextPutLine:'# automagically generated by the project definition'. |
|
3849 |
s nextPutLine:'# this file is needed for stc to be able to compile modules independently.'. |
|
3850 |
s nextPutLine:'# it provides information about a classes filename, category and especially namespace.'. |
|
3851 |
||
3852 |
self allClassNames do:addEntry. |
|
3853 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
3854 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
3855 |
addEntry value:nm |
|
3856 |
]. |
|
3857 |
]. |
|
3858 |
] |
|
3859 |
||
3860 |
" |
|
3861 |
stx_libbasic generate_abbrev_dot_stc |
|
3862 |
DapasXProject generate_abbrev_dot_stc |
|
3863 |
DapasX_Datenbasis generate_abbrev_dot_stc |
|
3864 |
bosch_dapasx_interactiver_editor generate_abbrev_dot_stc |
|
9536 | 3865 |
" |
3866 |
||
3867 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
15916 | 3868 |
"Modified: / 28-01-2014 / 21:43:56 / cg" |
9536 | 3869 |
! |
3870 |
||
13177 | 3871 |
generate_autopackage_default_dot_apspec |
3872 |
||
13419 | 3873 |
^self |
23124 | 3874 |
replaceMappings: self autopackage_default_dot_apspec_mappings |
3875 |
in: self autopackage_default_dot_apspec |
|
13177 | 3876 |
|
3877 |
" |
|
3878 |
stx_projects_smalltalk generate_autopackage_default_dot_apspec |
|
3879 |
" |
|
3880 |
||
3881 |
"Created: / 21-12-2010 / 09:40:04 / cg" |
|
3882 |
! |
|
3883 |
||
13419 | 3884 |
generate_bc_dot_mak |
3885 |
^ (self |
|
23124 | 3886 |
replaceMappings: self bc_dot_mak_mappings |
3887 |
in: self bc_dot_mak) asStringCollection withTabs asString |
|
10306 | 3888 |
|
3889 |
" |
|
3890 |
DapasXProject generate_bc_dot_mak |
|
3891 |
DapasX_Datenbasis generate_bc_dot_mak |
|
3892 |
" |
|
3893 |
||
3894 |
"Modified: / 09-08-2006 / 11:46:14 / fm" |
|
3895 |
! |
|
3896 |
||
13419 | 3897 |
generate_bmake_dot_mak |
3898 |
||
3899 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
23124 | 3900 |
in: self bmake_dot_mak |
9575 | 3901 |
|
3902 |
"Created: / 17-08-2006 / 20:03:43 / cg" |
|
3903 |
! |
|
3904 |
||
13411 | 3905 |
generate_builder_baseline_dot_rbspec |
3906 |
^ self replaceMappings:self builder_baseline_dot_rbspec_mappings |
|
23124 | 3907 |
in:self builder_baseline_dot_rbspec |
13411 | 3908 |
|
3909 |
" |
|
3910 |
stx_projects_smalltalk generate_builder_baseline_dot_rbspec |
|
3911 |
||
3912 |
" |
|
3913 |
||
3914 |
"Created: / 24-02-2011 / 11:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3915 |
! |
|
3916 |
||
23866 | 3917 |
generate_java_build_auto_dot_xml |
3918 |
<file: 'java/build.auto.xml' overwrite: true> |
|
3919 |
||
3920 |
self javaBundle isNil ifTrue:[ ^ nil ]. |
|
3921 |
^self |
|
3922 |
replaceMappings: self java_build_auto_dot_xml_mappings |
|
3923 |
in: self java_build_auto_dot_xml |
|
3924 |
||
3925 |
" |
|
3926 |
stx_libjava_tools generate_java_build_auto_dot_xml |
|
3927 |
stx_libjava_experiments generate_java_build_auto_dot_xml |
|
3928 |
||
3929 |
" |
|
3930 |
||
3931 |
"Created: / 18-01-2015 / 07:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3932 |
"Modified: / 19-01-2015 / 16:55:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3933 |
! |
|
3934 |
||
3935 |
generate_java_build_dot_xml |
|
3936 |
<file: 'java/build.xml' overwrite: false> |
|
3937 |
||
3938 |
self javaBundle isNil ifTrue:[ ^ nil ]. |
|
3939 |
^self |
|
3940 |
replaceMappings: self java_build_dot_xml_mappings |
|
3941 |
in: self java_build_dot_xml |
|
3942 |
||
3943 |
" |
|
3944 |
stx_libjava_tools generate_java_build_auto_dot_xml |
|
3945 |
stx_libjava_experiments generate_java_build_auto_dot_xml |
|
3946 |
||
3947 |
" |
|
3948 |
||
3949 |
"Created: / 19-01-2015 / 07:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3950 |
"Modified: / 19-01-2015 / 16:32:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3951 |
! |
|
3952 |
||
14334 | 3953 |
generate_lccmake_dot_mak |
13419 | 3954 |
|
3955 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
23124 | 3956 |
in: self lccmake_dot_mak |
14334 | 3957 |
|
3958 |
"Created: / 03-09-2012 / 19:49:56 / cg" |
|
11979 | 3959 |
! |
3960 |
||
9850 | 3961 |
generate_loadAll |
13419 | 3962 |
^ String |
23124 | 3963 |
streamContents:[:s | |
3964 |
|classNames classesLoaded classNamesUnloaded classesSorted| |
|
3965 |
||
3966 |
classNames := self compiled_classNames_common. |
|
3967 |
classesLoaded := classNames |
|
3968 |
collect:[:nm | Smalltalk classNamed:nm] |
|
3969 |
thenSelect:[:cls | cls notNil and:[cls isLoaded] ]. |
|
3970 |
classNamesUnloaded := classNames |
|
3971 |
select:[:nm | |
|
3972 |
|cls| |
|
3973 |
cls := Smalltalk classNamed:nm. |
|
3974 |
cls isNil or:[cls isLoaded not] |
|
3975 |
]. |
|
3976 |
||
3977 |
classesSorted := Class classesSortedByLoadOrder:classesLoaded. |
|
3978 |
||
3979 |
s nextPutAll:'"/ |
|
9850 | 3980 |
"/ $' , 'Header' , '$ |
3981 |
"/ |
|
3982 |
"/ loadAll-file to fileIn code for: ' , self package , ' |
|
3983 |
"/ |
|
3984 |
"/ Automatically generated from the ProjectDefinition. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3985 |
"/ DO NOT MODIFY THIS FILE; |
9850 | 3986 |
"/ |
3987 |
"/ |
|
3988 |
"/ Prerequisites: |
|
3989 |
"/ |
|
3990 |
"/ Smalltalk loadPackage:''module:directory''. |
|
3991 |
"/ Smalltalk loadPackage:''....''. |
|
3992 |
!! |
|
3993 |
||
3994 |
"{ package:''' , self package, ''' }" |
|
3995 |
!! |
|
3996 |
||
3997 |
|files| |
|
3998 |
||
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
3999 |
''loading package ' , self package ,'...'' infoPrint. |
9850 | 4000 |
|
4001 |
files := #( |
|
4002 |
'. |
|
4003 |
||
23124 | 4004 |
classesSorted do:[:eachClass | |
4005 |
s nextPutLine:' ''' , (self filenameForClass:eachClass), ''''. |
|
4006 |
]. |
|
4007 |
classNamesUnloaded do:[:nm | |
|
4008 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
|
4009 |
]. |
|
4010 |
||
4011 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
|
4012 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
|
4013 |
s nextPutLine:' ''' , (self filenameForClass:nm), ''''. |
|
4014 |
]. |
|
4015 |
]. |
|
4016 |
||
4017 |
self hasExtensionMethods ifTrue:[ |
|
4018 |
s nextPutLine:' ''extensions.st'''. |
|
4019 |
]. |
|
4020 |
||
4021 |
s nextPutAll:' |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
4022 |
). |
9850 | 4023 |
|
4024 |
"/ see if there is a classLibrary |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
4025 |
(Smalltalk fileInClassLibrary:''' , (self libraryName) , ''') ifTrue:[ |
9850 | 4026 |
|handle loaded| |
4027 |
||
13419 | 4028 |
handle := ObjectFileLoader loadedObjectHandles |
23124 | 4029 |
detect:[:h | h package = ''' , self package , '''] ifNone:nil. |
9850 | 4030 |
handle ifNotNil:[ |
23124 | 4031 |
loaded := Set new:(handle classes size). |
4032 |
handle classes do:[:c| c isMeta ifFalse:[loaded add:c classBaseFilename]]. |
|
4033 |
files := files \ loaded. |
|
9850 | 4034 |
]. |
4035 |
]. |
|
4036 |
||
4037 |
"/ 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
|
4038 |
files notEmpty ifTrue:[ |
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
4039 |
'''' infoPrintCR. |
9850 | 4040 |
files do:[:f | |
4041 |
''.'' infoPrint. |
|
4042 |
f asFilename exists ifTrue:[ |
|
23124 | 4043 |
Smalltalk fileIn:f. |
9850 | 4044 |
] ifFalse:[ |
23124 | 4045 |
Smalltalk fileIn:(''source/'' , f) |
9850 | 4046 |
] |
4047 |
]. |
|
4048 |
'' '' infoPrintCR. |
|
4049 |
]. |
|
9911
114cf30d0561
Handle (load) binary class libraryies.
Stefan Vogel <sv@exept.de>
parents:
9909
diff
changeset
|
4050 |
''done (' , self package ,').'' infoPrintCR. |
9850 | 4051 |
'. |
23124 | 4052 |
]. |
9850 | 4053 |
|
4054 |
"Created: / 14-09-2006 / 14:21:31 / cg" |
|
10080 | 4055 |
"Modified: / 12-10-2006 / 15:55:00 / cg" |
9850 | 4056 |
! |
4057 |
||
13419 | 4058 |
generate_make_dot_proto |
4059 |
||
4060 |
^ (self |
|
23124 | 4061 |
replaceMappings: self make_dot_proto_mappings |
4062 |
in: self make_dot_proto) asStringCollection withTabs asString |
|
9536 | 4063 |
|
9733 | 4064 |
" |
12428 | 4065 |
stx_libbasic2 generate_make_dot_proto |
9733 | 4066 |
" |
9536 | 4067 |
|
4068 |
"Modified: / 09-08-2006 / 11:31:01 / fm" |
|
4069 |
! |
|
4070 |
||
4071 |
generate_make_dot_spec |
|
13419 | 4072 |
^ (self |
23124 | 4073 |
replaceMappings: self make_dot_spec_mappings |
4074 |
in: self make_dot_spec) asStringCollection withTabs asString |
|
9536 | 4075 |
|
9733 | 4076 |
" |
4077 |
DapasXProject generate_make_dot_spec |
|
4078 |
DapasX_Datenbasis generate_make_dot_spec |
|
4079 |
bosch_dapasx_kernel_Definition generate_make_dot_spec |
|
4080 |
" |
|
9536 | 4081 |
|
4082 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
4083 |
! |
|
4084 |
||
13419 | 4085 |
generate_makefile |
4086 |
||
4087 |
^ (self |
|
23124 | 4088 |
replaceMappings: self makefile_mappings |
4089 |
in: self makefile) asStringCollection withTabs asString |
|
12428 | 4090 |
|
4091 |
" |
|
4092 |
stx_libbasic2 generate_makefile |
|
4093 |
" |
|
4094 |
! |
|
4095 |
||
14345 | 4096 |
generate_mingwmake_dot_mak |
4097 |
||
4098 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
23124 | 4099 |
in: self mingwmake_dot_mak |
14345 | 4100 |
|
4101 |
"Created: / 05-09-2012 / 19:44:07 / cg" |
|
4102 |
! |
|
4103 |
||
9536 | 4104 |
generate_packageName_dot_rc |
4105 |
||
13419 | 4106 |
^self replaceMappings: self packageName_dot_rc_mappings |
23124 | 4107 |
in: self packageName_dot_rc |
9536 | 4108 |
|
4109 |
" |
|
4110 |
bosch_dapasx_datenbasis generate_packageName_dot_rc |
|
4111 |
bosch_dapasx_hw_schnittstellen generate_packageName_dot_rc |
|
9575 | 4112 |
stx_libbasic3 generate_packageName_dot_rc |
9618 | 4113 |
stx_libwidg3 generate_packageName_dot_rc |
13419 | 4114 |
stx_libwidg3 productVersion |
9536 | 4115 |
|
4116 |
" |
|
4117 |
||
4118 |
"Modified: / 09-08-2006 / 11:31:09 / fm" |
|
9618 | 4119 |
"Modified: / 21-08-2006 / 19:33:21 / cg" |
9831 | 4120 |
! |
4121 |
||
13411 | 4122 |
generate_package_dot_deps_dot_rake |
4123 |
^ (self replaceMappings:self package_dot_deps_dot_rake_mappings |
|
23124 | 4124 |
in:self package_dot_deps_dot_rake) asStringCollection |
4125 |
withTabs asString |
|
13411 | 4126 |
|
4127 |
" |
|
4128 |
stx_libjava generate_dependencies_dot_rake" |
|
4129 |
||
4130 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4131 |
! |
|
4132 |
||
14334 | 4133 |
generate_tccmake_dot_mak |
4134 |
||
4135 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
23124 | 4136 |
in: self tccmake_dot_mak |
14334 | 4137 |
|
4138 |
"Created: / 03-09-2012 / 19:50:25 / cg" |
|
4139 |
! |
|
4140 |
||
13419 | 4141 |
generate_vcmake_dot_mak |
4142 |
||
4143 |
^self replaceMappings: self bmake_dot_mak_mappings |
|
23124 | 4144 |
in: self vcmake_dot_mak |
11937 | 4145 |
! |
4146 |
||
23112 | 4147 |
nsiFilename |
4148 |
"only applications define it" |
|
23124 | 4149 |
|
23112 | 4150 |
^ nil. |
4151 |
||
4152 |
"Created: / 18-06-2018 / 14:07:43 / Claus Gittinger" |
|
4153 |
! |
|
4154 |
||
9852 | 4155 |
protectedFileNames |
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
4156 |
"names of files which should NOT be generated (because they are hand-maintained) |
12200
7e452033e984
rememberOverwrittenExtensionMethods
Claus Gittinger <cg@exept.de>
parents:
12198
diff
changeset
|
4157 |
- redefine this to protect a hand-written Make.proto or other handwritten support files" |
9852 | 4158 |
|
4159 |
^ #() |
|
4160 |
||
4161 |
"Created: / 14-09-2006 / 14:38:40 / cg" |
|
13178
07e3a9bb37c8
changed: #protectedFileNames
Claus Gittinger <cg@exept.de>
parents:
13177
diff
changeset
|
4162 |
"Modified: / 21-12-2010 / 11:36:46 / cg" |
9852 | 4163 |
! |
4164 |
||
9831 | 4165 |
rcFilename |
19996 | 4166 |
^ self fullPackageName,'WINrc.rc'. |
9831 | 4167 |
|
4168 |
"Created: / 07-09-2006 / 17:07:00 / cg" |
|
19996 | 4169 |
! |
4170 |
||
4171 |
resourceFilename |
|
4172 |
^ (self rcFilename asFilename withSuffix:'$(RES)') name |
|
4173 |
||
4174 |
"Created: / 07-09-2006 / 17:12:53 / cg" |
|
9536 | 4175 |
! ! |
4176 |
||
12364 | 4177 |
!ProjectDefinition class methodsFor:'file mappings'! |
9536 | 4178 |
|
13177 | 4179 |
autopackage_default_dot_apspec_mappings |
4180 |
|mappings| |
|
4181 |
||
4182 |
mappings := Dictionary new. |
|
16257 | 4183 |
^ mappings |
23124 | 4184 |
at: 'TOP' put: (self pathToTopWithSeparator:'/'); "/ unix here |
14339 | 4185 |
"/ at: 'MODULE_PATH' put: ( self moduleDirectory ); "/ unix here |
23124 | 4186 |
at: 'DESCRIPTION' put: (self description); |
4187 |
at: 'PRODUCT_NAME' put: (self productName); |
|
4188 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
4189 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
4190 |
at: 'PRODUCT_PUBLISHER' put: (self productPublisher); |
|
4191 |
at: 'PRODUCT_WEBSITE' put: (self productWebSite); |
|
4192 |
at: 'PRODUCT_INSTALLDIR' put: (self productInstallDir); |
|
4193 |
at: 'PRODUCT_TYPE' put: (self productType); |
|
4194 |
at: 'PRODUCT_LICENSE' put: (self productLicense); |
|
4195 |
at: 'PRODUCT_DESCRIPTION' put: (self productDescription); |
|
4196 |
at: 'PRODUCT_CPU_VERSIONS' put: 'x86'; |
|
4197 |
at: 'PRODUCT_ROOT_NAME' put: (self productName); |
|
4198 |
at: 'MAINTAINER' put: (self productMaintainer); |
|
4199 |
at: 'PACKAGER' put: (self productPublisher); |
|
4200 |
at: 'ADDITIONAL_SOURCE_DIRS' put: ''; |
|
4201 |
at: 'ADDITIONAL_COPYFILES' put: ''; |
|
4202 |
at: 'ADDITIONAL_INSTALL' put: ''; |
|
4203 |
yourself. |
|
13419 | 4204 |
|
13177 | 4205 |
|
4206 |
"Created: / 21-12-2010 / 09:00:49 / cg" |
|
14339 | 4207 |
"Modified: / 05-09-2012 / 10:09:06 / cg" |
13177 | 4208 |
! |
4209 |
||
10306 | 4210 |
bc_dot_mak_mappings |
4211 |
|d| |
|
4212 |
||
14337 | 4213 |
d := self common_mappings. |
14944 | 4214 |
^ d |
23124 | 4215 |
at: 'TOP' put: ( self pathToTopWithSeparator:'\' ); "/ win32 here |
4216 |
at: 'MODULE_PATH' put: ( self moduleDirectory_win32 ); "/ win32 here |
|
4217 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_bc_dot_mak); |
|
4218 |
at: 'ADDITIONAL_BASE_ADDRESS_DEFINITION' put: (self additionalBaseAddressDefinition_bc_dot_mak ? ''); |
|
4219 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak ? ''); |
|
4220 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_bc_dot_mak); |
|
4221 |
at: 'ADDITIONAL_RULES' put: (self additionalRulesFor: 'bc.mak'); |
|
4222 |
at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_bc_dot_mak ? ''); |
|
4223 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak ? ''); |
|
4224 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak ? ''); |
|
4225 |
at: 'ADDITIONAL_POSTNSISRULES' put: (self additional_post_nsis_rules); "/ win32 bc here |
|
4226 |
at: 'ADDITIONAL_POSTNSISRULES64' put: (self additional_post_nsis_rules64); "/ win64 mingw here |
|
4227 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32 ? ''); |
|
4228 |
at: 'LOCAL_DEFINES' put: self localDefines_win32 ? ''; |
|
4229 |
at: 'GLOBAL_DEFINES' put: self globalDefines_win32 ? ''; |
|
4230 |
yourself. |
|
10306 | 4231 |
|
4232 |
"Created: / 18-08-2006 / 11:43:39 / cg" |
|
14339 | 4233 |
"Modified: / 05-09-2012 / 10:02:51 / cg" |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
4234 |
"Modified: / 03-02-2015 / 07:28:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
18428 | 4235 |
"Modified: / 02-06-2015 / 17:44:11 / gg" |
10306 | 4236 |
! |
4237 |
||
9627 | 4238 |
bmake_dot_mak_mappings |
14337 | 4239 |
^ self common_mappings |
23124 | 4240 |
at:'TOP' put: ( self pathToTopWithSeparator:'\' ); |
4241 |
at:'SUBPROJECT_BMAKE_CALLS' put:(self subProjectBmakeCalls); |
|
4242 |
at:'SUBPROJECT_VCMAKE_CALLS' put:(self subProjectVCmakeCalls); |
|
4243 |
at:'SUBPROJECT_LCCMAKE_CALLS' put:(self subProjectLCCmakeCalls); |
|
4244 |
at:'SUBPROJECT_TCCMAKE_CALLS' put:(self subProjectTCCmakeCalls); |
|
4245 |
at:'SUBPROJECT_MINGWMAKE_CALLS' put:(self subProjectMingwmakeCalls); |
|
4246 |
yourself |
|
9627 | 4247 |
|
4248 |
"Created: / 17-08-2006 / 21:41:56 / cg" |
|
14345 | 4249 |
"Modified: / 05-09-2012 / 19:45:36 / cg" |
9575 | 4250 |
! |
4251 |
||
13411 | 4252 |
builder_baseline_dot_rbspec_mappings |
4253 |
|mappings| |
|
4254 |
||
4255 |
mappings := Dictionary new. |
|
16257 | 4256 |
^ mappings |
23124 | 4257 |
at:'APPLICATION' put:(self perform:#applicationName ifNotUnderstood:[self packageName]); |
4258 |
at:'APPLICATION_PACKAGE' put:self package printString; |
|
4259 |
at:'PREAMBLE' put:self builder_baseline_dot_rbspec_preamble; |
|
4260 |
at:'POSTAMBLE' put:self builder_baseline_dot_rbspec_postamble; |
|
4261 |
at:'PACKAGES' put:self builder_baseline_dot_rbspec_packages; |
|
4262 |
yourself. |
|
13411 | 4263 |
|
4264 |
"Modified: / 21-12-2010 / 11:00:22 / cg" |
|
4265 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4266 |
"Modified: / 09-06-2011 / 14:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4267 |
! |
|
4268 |
||
4269 |
builder_baseline_dot_rbspec_packages |
|
19955 | 4270 |
^ String streamContents:[:s | |
23124 | 4271 |
self allPreRequisitesSorted do: [:packageId | |
4272 |
s nextPutLine:(' package "%1"' bindWith:packageId). |
|
4273 |
] |
|
19955 | 4274 |
]. |
13411 | 4275 |
|
4276 |
"Created: / 24-02-2011 / 11:59:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
19955 | 4277 |
"Modified: / 06-06-2016 / 14:32:44 / cg" |
13411 | 4278 |
! |
4279 |
||
13419 | 4280 |
classLine_mappings:aClassName |
12545 | 4281 |
^ Dictionary new |
23124 | 4282 |
at:'CLASS' put:(self st2c:aClassName); |
4283 |
yourself |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4284 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4285 |
"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
|
4286 |
"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
|
4287 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4288 |
|
14337 | 4289 |
common_mappings |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4290 |
^ Dictionary new |
23124 | 4291 |
at: 'TAB' put: ( Character tab asString ); |
4292 |
at: 'TOP' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
|
4293 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
|
4294 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
|
4295 |
at: 'MODULE' put: ( self module ); |
|
4296 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); "/ always unix format |
|
4297 |
at: 'MODULE_PATH' put: ( 'depends-on-file(unix vs. win32)' ); "/ must be in specific mapping |
|
4298 |
yourself |
|
14337 | 4299 |
|
4300 |
"Created: / 04-09-2012 / 13:04:26 / cg" |
|
4301 |
! |
|
4302 |
||
23866 | 4303 |
java_build_auto_dot_xml_mappings |
4304 |
^ self common_mappings |
|
4305 |
at: 'TOP' put: (self pathToTopWithSeparator:'/'); |
|
4306 |
at: 'PACKAGE_SLASHED' put: (self package copyReplaceAll: $: with: $/); |
|
4307 |
at: 'PACKAGE_DOTTED' put: ((self package copyReplaceAll: $: with: $/) replaceAll: $/ with: $.); |
|
4308 |
at: 'BUILD_PREREQS_CLASSPATH_REFS' put: (self generateJavaBuildPrereqsClasspathRefs); |
|
4309 |
at: 'BUILD_PREREQS_CLASSPATH_PATHS' put: (self generateJavaBuildPrereqsClasspathPaths); |
|
4310 |
at: 'BUILD_PREREQS' put: (self generateJavaBuildPrereqs); |
|
4311 |
yourself |
|
4312 |
||
4313 |
"Created: / 18-01-2015 / 07:32:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4314 |
"Modified: / 19-01-2015 / 07:21:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4315 |
! |
|
4316 |
||
4317 |
java_build_dot_xml_mappings |
|
4318 |
^ self common_mappings |
|
4319 |
at: 'TOP' put: (self pathToTopWithSeparator:'/'); |
|
4320 |
at: 'PACKAGE_SLASHED' put: (self package copyReplaceAll: $: with: $/); |
|
4321 |
at: 'PACKAGE_DOTTED' put: ((self package copyReplaceAll: $: with: $/) replaceAll: $/ with: $.); |
|
4322 |
yourself |
|
4323 |
||
4324 |
"Created: / 19-01-2015 / 07:37:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4325 |
! |
|
4326 |
||
14337 | 4327 |
make_dot_proto_mappings |
4328 |
^ self common_mappings |
|
23124 | 4329 |
at: 'MODULE' put: ( self module ); |
4330 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
|
4331 |
at: 'MODULE_PATH' put: ( self moduleDirectory ); |
|
4332 |
at: 'TOP' put: ( self pathToTopWithSeparator:'/' ); |
|
4333 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories); |
|
4334 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
|
4335 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix); |
|
4336 |
at: 'LOCAL_DEFINES' put: self localDefines_unix; |
|
4337 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix; |
|
4338 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
|
4339 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
|
4340 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto); |
|
4341 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto); |
|
4342 |
at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_make_dot_proto); |
|
4343 |
at: 'ADDITIONAL_RULES' put: (self additionalRulesFor: 'Make.proto'); |
|
4344 |
at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto); |
|
4345 |
at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_make_dot_proto); |
|
4346 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto); |
|
4347 |
at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto); |
|
4348 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto); |
|
4349 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto); |
|
4350 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix); |
|
4351 |
yourself |
|
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4352 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4353 |
"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
|
4354 |
"Modified: / 09-08-2006 / 16:44:48 / fm" |
12028 | 4355 |
"Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>" |
14339 | 4356 |
"Modified: / 05-09-2012 / 10:10:40 / cg" |
17366
ef60968bb4e7
Added annotation-based support to add extra rules to generated makefiles.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17344
diff
changeset
|
4357 |
"Modified: / 03-02-2015 / 07:17:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4358 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4359 |
|
9627 | 4360 |
make_dot_spec_mappings |
14337 | 4361 |
^ self common_mappings |
23124 | 4362 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory ); |
4363 |
at: 'STCWARNINGOPTIONS' put: (self stcWarningOptions); |
|
4364 |
at: 'STCOPTIMIZATIONOPTIONS' put: (self stcOptimizationOptions); |
|
4365 |
at: 'CLASSES' put: [self generateClasses_make_dot_spec]; |
|
4366 |
at: 'OBJECTS' put: [self generateObjects_make_dot_spec]; |
|
4367 |
yourself |
|
9627 | 4368 |
|
4369 |
"Created: / 18-08-2006 / 11:44:23 / cg" |
|
14339 | 4370 |
"Modified: / 05-09-2012 / 10:11:02 / cg" |
9575 | 4371 |
! |
4372 |
||
12428 | 4373 |
makefile_mappings |
4374 |
^ Dictionary new |
|
23124 | 4375 |
yourself |
12428 | 4376 |
! |
4377 |
||
9627 | 4378 |
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
|
4379 |
|d s resourceCount| |
9627 | 4380 |
|
9630 | 4381 |
d := Dictionary new. |
4382 |
d |
|
23124 | 4383 |
at: 'PRODUCT_NAME' put: (self productName); |
4384 |
at: 'PRODUCT_VERSION' put: (self productVersion); |
|
4385 |
at: 'PRODUCT_DATE' put: (self productDate); |
|
4386 |
at: 'FILETYPE' put: ( 'VFT_DLL' ); |
|
4387 |
at: 'FILE_VERSION_COMMASEPARATED' put: (self fileVersionCommaSeparated); |
|
4388 |
at: 'PRODUCT_VERSION_COMMASEPARATED' put: (self productVersionCommaSeparated); |
|
4389 |
||
4390 |
at: 'COMPANY_NAME' put: (self companyName); |
|
4391 |
at: 'FILE_DESCRIPTION' put: (self fileDescription); |
|
4392 |
at: 'FILE_VERSION' put: (self fileVersion); |
|
4393 |
at: 'INTERNAL_NAME' put: (self internalName). |
|
11377 | 4394 |
|
9630 | 4395 |
s := self legalCopyright. |
4396 |
s notNil ifTrue:[ |
|
23124 | 4397 |
d at: 'LEGAL_COPYRIGHT_LINE' put: ' VALUE "LegalCopyright", "',s,'\0"' |
9630 | 4398 |
]. |
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
4399 |
s := String streamContents:[:stream| |
23124 | 4400 |
|suff| |
4401 |
||
4402 |
s := self applicationIconFileNameWindows. |
|
4403 |
s notNil ifTrue:[ |
|
4404 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
|
4405 |
suff := '.ico' |
|
4406 |
] ifFalse:[ |
|
4407 |
suff := '' |
|
4408 |
]. |
|
4409 |
'IDR_MAINFRAME ICON DISCARDABLE "%1%2"' |
|
4410 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
|
4411 |
stream cr. |
|
4412 |
]. |
|
4413 |
||
4414 |
s := self splashFileName. |
|
4415 |
s notNil ifTrue:[ |
|
4416 |
s asFilename suffix isEmptyOrNil ifTrue:[ |
|
4417 |
suff := '.bmp' |
|
4418 |
] ifFalse:[ |
|
4419 |
suff := '' |
|
4420 |
]. |
|
4421 |
'IDR_SPLASH BITMAP DISCARDABLE "%1%2"' |
|
4422 |
expandPlaceholdersWith:(Array with:s with:suff) on:stream. |
|
4423 |
stream cr. |
|
4424 |
]. |
|
4425 |
resourceCount := 2. |
|
4426 |
self applicationAdditionalIconFileNames do:[:eachFilename| |
|
4427 |
'IDR_MAINFRAME+%1 ICON DISCARDABLE "%2"' |
|
4428 |
expandPlaceholdersWith:(Array with:resourceCount with:eachFilename) on:stream. |
|
4429 |
stream cr. |
|
4430 |
resourceCount := resourceCount+1. |
|
4431 |
]. |
|
4432 |
]. |
|
11611
fa06cde6bd11
Allow for additional icon files to be placed in resources
Stefan Vogel <sv@exept.de>
parents:
11580
diff
changeset
|
4433 |
d at: #'ICONDEFINITION_LINE' put:s. |
9817 | 4434 |
|
9630 | 4435 |
^ d |
9627 | 4436 |
|
4437 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
13309
27f463f6c0cb
changed: #packageName_dot_rc_mappings
Claus Gittinger <cg@exept.de>
parents:
13285
diff
changeset
|
4438 |
"Modified: / 22-02-2011 / 11:30:36 / cg" |
9536 | 4439 |
! |
4440 |
||
13411 | 4441 |
package_dot_deps_dot_rake_mappings |
14843 | 4442 |
|dependencies| |
4443 |
||
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
4444 |
dependencies := String |
23124 | 4445 |
streamContents:[:s | |
4446 |
self allPreRequisites do:[:package | |
|
4447 |
(self preRequisitesFor:package) do:[:prereq | |
|
4448 |
s |
|
4449 |
nextPutAll:('task "%1" => "%2"' bindWith:package with:prereq); |
|
4450 |
cr |
|
4451 |
]. |
|
4452 |
s cr |
|
4453 |
]. |
|
4454 |
self effectivePreRequisites do:[:prereq | |
|
4455 |
s |
|
4456 |
nextPutAll:('task "%1" => "%2"' bindWith:self package with:prereq); |
|
4457 |
cr |
|
4458 |
]. |
|
4459 |
]. |
|
13411 | 4460 |
|
4461 |
^ (Dictionary new) |
|
23124 | 4462 |
at:'DEPENDENCIES' put:dependencies; |
4463 |
yourself |
|
4464 |
||
4465 |
" |
|
4466 |
stx_libjava generate_package_dot_deps_dot_rake |
|
13411 | 4467 |
" |
4468 |
||
4469 |
"Created: / 24-02-2011 / 22:32:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4470 |
! |
|
4471 |
||
9627 | 4472 |
replaceMappings: mappings in: fileTemplate |
9733 | 4473 |
"Replaces the defined variable mappings found in a file template with the corresponding information" |
9627 | 4474 |
|
9733 | 4475 |
^ fileTemplate bindWithArguments:mappings. |
9627 | 4476 |
|
9733 | 4477 |
" |
13419 | 4478 |
self replaceMappings: (self nt_dot_def_mappingsFor: self) in: self nt_dot_def |
9733 | 4479 |
" |
9627 | 4480 |
|
4481 |
"Created: / 08-08-2006 / 11:44:27 / fm" |
|
4482 |
"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
|
4483 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4484 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4485 |
st2c:aString |
23124 | 4486 |
^ (aString asString |
4487 |
copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8))) |
|
4488 |
replaceAny:':' with:$_ |
|
9536 | 4489 |
! ! |
4490 |
||
12364 | 4491 |
!ProjectDefinition class methodsFor:'file mappings support'! |
9817 | 4492 |
|
12545 | 4493 |
classNamesByCategory |
4494 |
"answer a dictionary |
|
23124 | 4495 |
category -> classNames topological sorted" |
12545 | 4496 |
|
15916 | 4497 |
|classes classNames mapping alreadyWarned| |
12545 | 4498 |
|
4499 |
mapping := Dictionary new. |
|
4500 |
||
15126 | 4501 |
classes := Class classesSortedByLoadOrder:self compiled_classes_common. |
15124 | 4502 |
classNames := classes collect:[:eachClass| eachClass name]. |
4503 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do: [:nm :attr | |
|
23124 | 4504 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
4505 |
classNames add:nm. |
|
4506 |
]. |
|
15124 | 4507 |
]. |
4508 |
mapping at:'COMMON' put:classNames. |
|
4509 |
||
15916 | 4510 |
alreadyWarned := false. |
12545 | 4511 |
OperatingSystem knownPlatformNames do:[:platformID | |
23124 | 4512 |
|platformClasses platformClassNames| |
4513 |
||
4514 |
platformClasses := self compiled_classesForPlatform:platformID. |
|
4515 |
platformClasses notEmpty ifTrue:[ |
|
4516 |
(platformClasses contains:[:each| each isNil or:[each isLoaded not]]) ifTrue:[ |
|
4517 |
"win32 classes are not present in linux..." |
|
4518 |
Transcript show:'Missing classes for platform: '. Transcript showCR:platformID. |
|
4519 |
platformClassNames := self compiled_classNamesForPlatform:platformID. |
|
4520 |
platformClassNames |
|
4521 |
select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]] |
|
4522 |
thenDo:[:nm | Transcript tab; showCR:nm]. |
|
4523 |
UserPreferences current suppressProjectDefinitionWarnings ifFalse:[ |
|
4524 |
alreadyWarned ifFalse:[ |
|
4525 |
(Dialog confirm:('Dependencies (and therefore build-order) might be incorrect\(some classes for platform ''%1'' are not present or autoloaded; see Transcript).\\Continue anyway without recomputing the compilation order for this platform''s classes?' withCRs bindWith:platformID)) |
|
4526 |
ifFalse:[ |
|
4527 |
AbortOperationRequest raise. |
|
4528 |
]. |
|
4529 |
]. |
|
4530 |
alreadyWarned := true |
|
4531 |
]. |
|
4532 |
] ifFalse:[ |
|
4533 |
classes := Class classesSortedByLoadOrder:platformClasses. |
|
4534 |
platformClassNames := platformClasses collect:[:eachClass| eachClass name]. |
|
4535 |
]. |
|
4536 |
mapping at:platformID asUppercase put:platformClassNames. |
|
4537 |
]. |
|
12545 | 4538 |
]. |
4539 |
^ mapping |
|
4540 |
||
4541 |
" |
|
4542 |
stx_libbasic classNamesByCategory |
|
4543 |
stx_libbasic3 classNamesByCategory |
|
4544 |
stx_libview classNamesByCategory |
|
15124 | 4545 |
stx_libjava classNamesByCategory |
12545 | 4546 |
" |
4547 |
||
4548 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
15916 | 4549 |
"Modified: / 28-01-2014 / 21:40:23 / cg" |
12545 | 4550 |
! |
4551 |
||
10299
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4552 |
commonSymbolsFlag |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4553 |
"only for libraries" |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4554 |
|
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4555 |
^ '' |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4556 |
! |
af27a10749c2
add #additional_link_libraries_nt_dot_mak
Stefan Vogel <sv@exept.de>
parents:
10296
diff
changeset
|
4557 |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4558 |
filenameForClass:classNameOrClass |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4559 |
"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
|
4560 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4561 |
"/ "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
|
4562 |
"/ See also: #generateRemoveShellScriptOn: and #generateRenamShellScriptOn:" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4563 |
"/ classNameOrClass isBehavior ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4564 |
"/ ^ classNameOrClass generateClassFilename. |
13419 | 4565 |
"/ ] ifFalse:[ |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4566 |
"/ |cls| |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4567 |
"/ |
13419 | 4568 |
"/ cls := Smalltalk classNamed:classNameOrClass. |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4569 |
"/ cls notNil ifTrue:[ |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4570 |
"/ ^ cls generateClassFilename. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4571 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4572 |
"/ ]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4573 |
"/ "end special code" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4574 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4575 |
^ Smalltalk fileNameForClass:classNameOrClass. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4576 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4577 |
" |
23124 | 4578 |
self filenameForClass:HTML::Encoder |
4579 |
Smalltalk fileNameForClass:HTML::Encoder |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4580 |
" |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4581 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4582 |
"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
|
4583 |
"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
|
4584 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
4585 |
|
13419 | 4586 |
generateClassLines:classLineTemplate |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4587 |
"for the init-file: generate class-init-lines for all classes" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4588 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4589 |
^ self generateClassLines:classLineTemplate forClasses:(self compiled_classNames_common) |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4590 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4591 |
|
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4592 |
generateClassLines:classLineTemplate forClasses:classNames |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4593 |
"for the init-file: generate class-init-lines for a collection of classes" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
4594 |
|
13419 | 4595 |
^ self generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:true |
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4596 |
! |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4597 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4598 |
generateClassLines:classLineTemplate forClasses:classNames includeAdditionalClasses:includeAdditionalClasses |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4599 |
"for the init-file: generate class-init-lines for a collection of classes" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
4600 |
|
13419 | 4601 |
^ String |
23124 | 4602 |
streamContents:[:s | |
4603 |
|classesLoaded classNamesUnloaded classNamesSorted putLineForClassName| |
|
4604 |
||
4605 |
putLineForClassName := |
|
4606 |
[:className | |
|
4607 |
|newClassLine mappings| |
|
4608 |
||
4609 |
mappings := self classLine_mappings:className. |
|
4610 |
newClassLine := self replaceMappings:mappings in:classLineTemplate. |
|
4611 |
s nextPutLine:newClassLine |
|
4612 |
]. |
|
4613 |
classesLoaded := classNames collect:[:eachClassName | Smalltalk classNamed:eachClassName] |
|
4614 |
thenSelect:[:eachClass | eachClass notNil and:[eachClass isLoaded]]. |
|
4615 |
classNamesUnloaded := classNames |
|
4616 |
select:[:nm | |
|
4617 |
|cls| |
|
4618 |
||
4619 |
cls := Smalltalk classNamed:nm. |
|
4620 |
cls isNil or:[ cls isLoaded not ] |
|
4621 |
]. |
|
4622 |
classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls | cls name]. |
|
4623 |
classNamesSorted do:putLineForClassName. |
|
4624 |
classNamesUnloaded do:putLineForClassName. |
|
4625 |
||
4626 |
includeAdditionalClasses ifTrue:[ |
|
4627 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
4628 |
do:[:nm :attr | |
|
4629 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
4630 |
putLineForClassName value:nm. |
|
4631 |
]. |
|
4632 |
]. |
|
4633 |
#( ('UNIX' unix) |
|
4634 |
('WIN32' win32) |
|
4635 |
('OSX' osx) |
|
4636 |
('VMS' vms) |
|
4637 |
('BEOS' beos) ) |
|
4638 |
pairsDo:[:ifdef :platformName | |
|
4639 |
|archClassNames archClassesLoaded| |
|
4640 |
||
4641 |
archClassNames := self compiled_classNamesForPlatform:platformName. |
|
4642 |
archClassNames notEmpty ifTrue:[ |
|
4643 |
s nextPutLine:'#ifdef ' , ifdef. |
|
4644 |
archClassNames do:[:clsName | |
|
4645 |
putLineForClassName value:clsName |
|
4646 |
]. |
|
4647 |
s nextPutLine:'#endif /* ' , ifdef , ' */'. |
|
4648 |
]. |
|
4649 |
]. |
|
4650 |
] |
|
4651 |
] |
|
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4652 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4653 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4654 |
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
|
4655 |
bosch_dapasx_kernel generateClassLines_libInit_dot_cc |
10010 | 4656 |
stx_libbasic3 generateClassLines_libInit_dot_cc |
4657 |
" |
|
4658 |
||
9962
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4659 |
"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
|
4660 |
"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
|
4661 |
"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
|
4662 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4663 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4664 |
generateClassLines_libInit_dot_cc |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4665 |
^ 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
|
4666 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4667 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4668 |
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
|
4669 |
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
|
4670 |
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
|
4671 |
" |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4672 |
|
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4673 |
"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
|
4674 |
"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
|
4675 |
"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
|
4676 |
! |
905898cca08c
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9956
diff
changeset
|
4677 |
|
13419 | 4678 |
generateClasses_make_dot_spec |
12545 | 4679 |
|classNamesDict| |
4680 |
||
4681 |
classNamesDict := self classNamesByCategory. |
|
4682 |
||
4683 |
^ String streamContents:[:s | |
|
23124 | 4684 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
4685 |
s nextPutLine:eachCategory,'_CLASSES= \'. |
|
4686 |
classNames do:[:eachClassName| |
|
4687 |
s tab; nextPutAll:eachClassName; nextPutLine:' \'. |
|
4688 |
]. |
|
4689 |
s cr. |
|
4690 |
]. |
|
4691 |
s cr. |
|
12545 | 4692 |
]. |
4693 |
||
4694 |
" |
|
4695 |
stx_libbasic generateClasses_make_dot_spec |
|
4696 |
stx_libbasic3 generateClasses_make_dot_spec |
|
4697 |
stx_libview generateClasses_make_dot_spec |
|
4698 |
stx_libboss generateClasses_make_dot_spec |
|
4699 |
" |
|
4700 |
||
4701 |
"Created: / 09-08-2006 / 11:24:39 / fm" |
|
4702 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
|
4703 |
! |
|
4704 |
||
19309 | 4705 |
generateDefinitionClassLine_libInit_dot_cc |
4706 |
"for the init-file: generate a single class-init-line for the definition class itself" |
|
4707 |
||
4708 |
^ self |
|
23124 | 4709 |
generateClassLines:(self classLine_libInit_dot_cc) |
4710 |
forClasses:(Array with:self name) |
|
4711 |
includeAdditionalClasses:false |
|
19309 | 4712 |
|
4713 |
" |
|
4714 |
stx_libbasic generateDefinitionClassLine_libInit_dot_cc |
|
4715 |
" |
|
4716 |
! |
|
4717 |
||
13419 | 4718 |
generateDependencies:whichArchitecture |
4719 |
^ String |
|
23124 | 4720 |
streamContents:[:s | |
4721 |
|classNames classesPresent classesLoaded clsBaseName putDependencyForClassBlock |
|
4722 |
putDependencyForClassBaseNameBlock |
|
4723 |
archClassNames archClassesPresent archClassesLoaded |
|
4724 |
putSingleClassDependencyEntryBlock putDependencyForExtensionsBlock classSortBlock| |
|
4725 |
||
4726 |
classSortBlock := [ :a :b| |
|
4727 |
a package == b package ifTrue:[ |
|
4728 |
a name < b name |
|
4729 |
] ifFalse:[ |
|
4730 |
a package < b package |
|
4731 |
]. |
|
4732 |
]. |
|
4733 |
||
4734 |
putSingleClassDependencyEntryBlock := [:cls | |
|
4735 |
|sclsBaseName| |
|
4736 |
||
4737 |
s nextPutAll:' $(INCLUDE_TOP)'. |
|
4738 |
s nextPutAll:(self pathSeparator:whichArchitecture). |
|
4739 |
sclsBaseName := self filenameForClass:cls. |
|
4740 |
s nextPutAll:(self |
|
4741 |
topRelativePathTo:sclsBaseName |
|
4742 |
inPackage:cls package |
|
4743 |
architecture:whichArchitecture). |
|
4744 |
s nextPutAll:'.$(H)'. |
|
4745 |
]. |
|
4746 |
||
4747 |
putDependencyForClassBaseNameBlock := [:clsBaseName | |
|
4748 |
s nextPutAll:('$(OUTDIR)',clsBaseName,'.$(O)'). |
|
4749 |
s nextPutAll:' '. |
|
4750 |
s nextPutAll:(clsBaseName,'.$(C)'). |
|
4751 |
s nextPutAll:' '. |
|
4752 |
s nextPutAll:clsBaseName. |
|
4753 |
s nextPutAll:'.$(H)'. |
|
4754 |
s nextPutAll:': '. |
|
4755 |
s nextPutAll:clsBaseName. |
|
4756 |
s nextPutAll:'.st'. |
|
4757 |
]. |
|
4758 |
||
4759 |
||
4760 |
putDependencyForClassBlock := [:cls | |
|
4761 |
|clsBaseName classes| |
|
4762 |
||
4763 |
clsBaseName := self filenameForClass:cls. |
|
4764 |
putDependencyForClassBaseNameBlock value:clsBaseName. |
|
4765 |
cls isLoaded ifTrue:[ |
|
4766 |
classes := IdentitySet new. |
|
4767 |
cls |
|
4768 |
sharedPools do:[:poolClass | |
|
4769 |
poolClass isNil ifTrue:[ |
|
4770 |
Dialog warn:'At least one pool class is missing.\\Dependencies are incomplete.' withCRs |
|
4771 |
] ifFalse:[ |
|
4772 |
classes add:poolClass. |
|
4773 |
] |
|
4774 |
]. |
|
4775 |
||
4776 |
cls |
|
4777 |
allSuperclassesDo:[:scls | |
|
4778 |
classes add:scls. |
|
4779 |
]. |
|
4780 |
cls |
|
4781 |
allPrivateClassesDo:[:eachPrivateClass | |
|
4782 |
eachPrivateClass |
|
4783 |
allSuperclassesDo:[:scls | |
|
4784 |
|sclsBaseName| |
|
4785 |
||
4786 |
scls ~~ cls ifTrue:[ |
|
4787 |
scls isPrivate ifFalse:[ |
|
4788 |
(classes includes:scls) ifFalse:[ |
|
4789 |
classes add:scls. |
|
4790 |
]. |
|
4791 |
]. |
|
4792 |
]. |
|
4793 |
] |
|
4794 |
]. |
|
4795 |
"/ Sort them to get stable order to avoid false conflicts |
|
4796 |
classes := classes asSortedCollection:classSortBlock. |
|
4797 |
classes do:[:each | putSingleClassDependencyEntryBlock value:each]. |
|
4798 |
]. |
|
4799 |
s nextPutLine:' $(STCHDR)'. |
|
4800 |
]. |
|
4801 |
||
4802 |
putDependencyForExtensionsBlock := [ |
|
4803 |
| classes | |
|
4804 |
||
4805 |
s nextPutAll:'$(OUTDIR)extensions.$(O): extensions.st'. |
|
4806 |
classes := Set new. |
|
4807 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
4808 |
|mthdCls cls| |
|
4809 |
||
4810 |
((mthdCls := Smalltalk classNamed:className) notNil |
|
4811 |
and:[ mthdCls isLoaded ]) |
|
4812 |
ifTrue:[ |
|
4813 |
cls := mthdCls theNonMetaclass. |
|
4814 |
(classes includes:cls) ifFalse:[ |
|
4815 |
cls |
|
4816 |
withAllSuperclassesDo:[:scls | |
|
4817 |
(classes includes:scls) ifFalse:[ |
|
4818 |
classes add:scls. |
|
4819 |
]. |
|
4820 |
]. |
|
4821 |
]. |
|
4822 |
]. |
|
4823 |
]. |
|
4824 |
"/ Sort them to get stable order to avoid false conflicts |
|
4825 |
classes := classes asSortedCollection:classSortBlock. |
|
4826 |
classes do:[:each | putSingleClassDependencyEntryBlock value:each]. |
|
4827 |
s nextPutLine:' $(STCHDR)'. |
|
4828 |
]. |
|
4829 |
||
4830 |
classNames := self compiled_classNames_common. |
|
4831 |
classesPresent := classNames |
|
4832 |
collect:[:className | Smalltalk classNamed:className] |
|
4833 |
thenSelect:[:cls | cls notNil]. |
|
4834 |
classesLoaded := classesPresent select:[:cls | cls isLoaded]. |
|
4835 |
||
4836 |
(Class classesSortedByLoadOrder:classesLoaded) do:putDependencyForClassBlock. |
|
4837 |
classesPresent reject:[:cls | cls isLoaded] thenDo:putDependencyForClassBlock. |
|
4838 |
||
4839 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) |
|
4840 |
do:[:className :attr | |
|
4841 |
|cls| |
|
4842 |
||
4843 |
(attr isEmptyOrNil or:[ (attr includes:#autoload) not ]) ifTrue:[ |
|
4844 |
((cls := Smalltalk classNamed:className) notNil) ifTrue:[ |
|
4845 |
putDependencyForClassBlock value:cls. |
|
4846 |
] |
|
4847 |
]. |
|
4848 |
]. |
|
4849 |
archClassNames := self compiled_classNamesForPlatform:whichArchitecture. |
|
4850 |
archClassesPresent := archClassNames |
|
4851 |
collect:[:className | Smalltalk classNamed:className] |
|
4852 |
thenSelect:[:cls | cls notNil]. |
|
4853 |
||
4854 |
archClassesLoaded := archClassesPresent select:[:cls | cls isLoaded]. |
|
4855 |
||
4856 |
(Class classesSortedByLoadOrder:archClassesLoaded) |
|
4857 |
do:putDependencyForClassBlock. |
|
4858 |
||
4859 |
"some classes are not loaded - probably this is the wrong architecture. |
|
4860 |
Sorry, but for these classes, we do not know the superclass chain" |
|
4861 |
archClassesPresent |
|
4862 |
select:[:cls | cls isLoaded not] |
|
4863 |
thenDo:putDependencyForClassBlock. |
|
4864 |
||
4865 |
"for the following classes, we do not know the superclass chain |
|
4866 |
and neither the real class file name" |
|
4867 |
archClassNames |
|
4868 |
select:[:eachClassName | (Smalltalk classNamed:eachClassName) isNil] |
|
4869 |
thenDo:[:eachClassName | |
|
4870 |
putDependencyForClassBaseNameBlock value:(self filenameForClass:eachClassName). |
|
4871 |
s nextPutLine:' $(STCHDR)'. |
|
4872 |
]. |
|
4873 |
||
4874 |
self hasExtensionMethods ifTrue:putDependencyForExtensionsBlock. |
|
4875 |
] |
|
9887 | 4876 |
|
4877 |
" |
|
4878 |
stx_libbasic3 generateDependencies:#unix |
|
10010 | 4879 |
stx_libbasic3 generateDependencies:#win32 |
4880 |
" |
|
4881 |
||
9887 | 4882 |
"Created: / 14-09-2006 / 12:38:57 / cg" |
13798
894c48237cd5
changed: #generateDependencies:
Claus Gittinger <cg@exept.de>
parents:
13797
diff
changeset
|
4883 |
"Modified: / 27-10-2011 / 16:35:59 / cg" |
16163 | 4884 |
"Modified: / 27-02-2014 / 22:34:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9887 | 4885 |
! |
4886 |
||
4887 |
generateDependencies_unix |
|
4888 |
^ self generateDependencies:#unix |
|
4889 |
||
4890 |
" |
|
4891 |
stx_libbasic3 generateDependencies:#unix |
|
4892 |
stx_libbasic3 generateDependencies:#win32 |
|
4893 |
" |
|
4894 |
||
4895 |
"Modified: / 14-09-2006 / 13:32:34 / cg" |
|
4896 |
! |
|
4897 |
||
4898 |
generateDependencies_win32 |
|
4899 |
^ self generateDependencies:#win32 |
|
4900 |
||
4901 |
"Created: / 14-09-2006 / 12:39:18 / cg" |
|
4902 |
! |
|
4903 |
||
19309 | 4904 |
generateExternalDeclarationLines_libInit_dot_cc |
4905 |
"for the init-file: generate a single external definition for a single class for the definition class itself" |
|
4906 |
||
4907 |
^ self |
|
23124 | 4908 |
generateClassLines:(self classExternalDeclarationLine_libInit_dot_cc) |
19309 | 4909 |
|
4910 |
" |
|
4911 |
stx_libbasic generateExternalDeclarationLines_libInit_dot_cc |
|
4912 |
" |
|
4913 |
! |
|
4914 |
||
9956 | 4915 |
generateLocalIncludes_unix |
4916 |
^ String streamContents:[:s | |
|
23124 | 4917 |
s nextPutAll:(self localIncludes_unix). |
4918 |
self searchForProjectsWhichProvideHeaderFiles asSortedCollection |
|
4919 |
do:[:includeProject | |
|
4920 |
s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage:includeProject withSeparator:'/') |
|
4921 |
] |
|
9956 | 4922 |
] |
4923 |
||
4924 |
" |
|
4925 |
bosch_dapasx generateLocalIncludes_unix |
|
13419 | 4926 |
bosch_dapasx_datenbasis generateLocalIncludes_unix |
4927 |
stx_libbasic generateLocalIncludes_unix |
|
4928 |
stx_libview generateLocalIncludes_unix |
|
4929 |
stx_libtool2 generateLocalIncludes_unix |
|
4930 |
stx_libui generateLocalIncludes_unix |
|
14939 | 4931 |
cg_demos_helloWorld localIncludes_unix |
9956 | 4932 |
" |
4933 |
||
4934 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 4935 |
"Modified: / 07-12-2006 / 17:47:06 / cg" |
15950 | 4936 |
"Modified: / 25-11-2013 / 16:40:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9956 | 4937 |
! |
4938 |
||
9887 | 4939 |
generateLocalIncludes_win32 |
4940 |
^ String streamContents:[:s | |
|
23124 | 4941 |
s nextPutAll:(self localIncludes_win32). |
4942 |
self searchForProjectsWhichProvideHeaderFiles asSortedCollection |
|
4943 |
do:[:includeProject | |
|
4944 |
s nextPutAll:' -I$(INCLUDE_TOP)\',(self topRelativePathToPackage:includeProject withSeparator:'\') |
|
4945 |
] |
|
9887 | 4946 |
] |
4947 |
||
4948 |
" |
|
4949 |
bosch_dapasx_application generateLocalIncludes_win32 |
|
13419 | 4950 |
bosch_dapasx_datenbasis generateLocalIncludes_win32 |
4951 |
stx_libbasic generateLocalIncludes_win32 |
|
4952 |
stx_libview generateLocalIncludes_win32 |
|
4953 |
stx_libtool2 generateLocalIncludes_win32 |
|
9887 | 4954 |
" |
4955 |
||
4956 |
"Created: / 09-08-2006 / 16:46:49 / fm" |
|
10251 | 4957 |
"Modified: / 07-12-2006 / 17:47:10 / cg" |
15950 | 4958 |
"Modified: / 25-11-2013 / 16:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9887 | 4959 |
! |
4960 |
||
13419 | 4961 |
generateObjects_make_dot_spec |
12545 | 4962 |
|classNamesDict| |
4963 |
||
4964 |
classNamesDict := self classNamesByCategory. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
4965 |
|
9817 | 4966 |
^ String streamContents:[:s | |
23124 | 4967 |
|putLineForClassName| |
4968 |
||
4969 |
putLineForClassName := |
|
4970 |
[:eachClassName | |
|
4971 |
|mappings newObjectLine| |
|
4972 |
mappings := self objectLine_make_dot_spec_mappings: eachClassName. |
|
4973 |
newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec. |
|
4974 |
s nextPutLine:newObjectLine. |
|
4975 |
]. |
|
4976 |
||
4977 |
classNamesDict keysAndValuesDo:[:eachCategory :classNames| |
|
4978 |
s nextPutLine:eachCategory,'_OBJS= \'. |
|
4979 |
classNames do:putLineForClassName. |
|
4980 |
(eachCategory = 'COMMON' and:[self hasExtensionMethods]) ifTrue:[ |
|
4981 |
s nextPutLine:' $(OUTDIR)extensions.$(O) \'. |
|
4982 |
]. |
|
4983 |
||
4984 |
s cr. |
|
4985 |
]. |
|
4986 |
s cr. |
|
12545 | 4987 |
]. |
9817 | 4988 |
|
4989 |
" |
|
12545 | 4990 |
stx_libbasic generateObjects_make_dot_spec |
9817 | 4991 |
stx_libbasic3 generateObjects_make_dot_spec |
12545 | 4992 |
stx_libview generateObjects_make_dot_spec |
4993 |
stx_libboss generateObjects_make_dot_spec |
|
9817 | 4994 |
" |
4995 |
||
4996 |
"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
|
4997 |
"Modified: / 20-10-2006 / 16:18:54 / cg" |
9887 | 4998 |
! |
4999 |
||
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5000 |
generateRequiredMakePrerequisites_bc_dot_mak |
11380
ac50ce4321b5
Fix prerequisite makes (pushd)
Stefan Vogel <sv@exept.de>
parents:
11377
diff
changeset
|
5001 |
|myProjectId| |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5002 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5003 |
^ String streamContents:[:s | |
23124 | 5004 |
myProjectId := self package. |
5005 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
|
5006 |
is required!! |
|
5007 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
|
5008 |
'popd' is not needed, since each line is executed in |
|
5009 |
an own cmd.exe process. |
|
5010 |
'popd' is not desireable, since it masks a possible |
|
5011 |
error return from the 'bmake'. |
|
5012 |
" |
|
5013 |
||
5014 |
"cg: changed to not go and remake librun" |
|
5015 |
(self allPreRequisitesSorted:#effectiveMandatoryPreRequisites "#effectivePreRequisites") do:[:eachProjectId | |
|
5016 |
s tab; nextPutAll:'pushd '; |
|
5017 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
|
5018 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
|
5019 |
]. |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5020 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5021 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5022 |
" |
13419 | 5023 |
exept_expecco_application generateRequiredMakePrerequisites_bc_dot_mak |
5024 |
alspa_batch_application generateRequiredMakePrerequisites_bc_dot_mak |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5025 |
" |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5026 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5027 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5028 |
generateRequiredMakePrerequisites_make_dot_proto |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5029 |
|libPath| |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5030 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5031 |
^ String streamContents:[:s | |
23858 | 5032 |
"cg: changed to not go and remake librun" |
5033 |
(self allPreRequisitesSorted:#effectiveMandatoryPreRequisites "#effectivePreRequisites") do:[:projectID | |
|
5034 |
libPath := self pathToPackage:projectID withSeparator:'/'. |
|
5035 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) $(MAKE_ARGS) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
|
5036 |
]. |
|
5037 |
||
5038 |
s cr. |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5039 |
]. |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5040 |
|
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5041 |
" |
13419 | 5042 |
exept_expecco_application generateRequiredMakePrerequisites_make_dot_proto |
5043 |
alspa_batch_application generateRequiredMakePrerequisites_make_dot_proto |
|
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5044 |
" |
19290 | 5045 |
|
5046 |
"Modified: / 03-03-2016 / 21:23:31 / cg" |
|
23858 | 5047 |
"Modified: / 08-03-2019 / 12:12:43 / Claus Gittinger" |
11157
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5048 |
! |
5bef68f784c7
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
11152
diff
changeset
|
5049 |
|
14882 | 5050 |
generateRequiredMakeReferences_bc_dot_mak |
5051 |
|myProjectId preRequisites| |
|
5052 |
||
5053 |
myProjectId := self package. |
|
5054 |
"Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) ' |
|
5055 |
is required!! |
|
5056 |
Use 'pushd' instead of 'cd', since cd is executed by borland make directly. |
|
5057 |
'popd' is not needed, since each line is executed in |
|
23124 | 5058 |
an own cmd.exe process. |
14882 | 5059 |
'popd' is not desierable, since it masks a possible |
23124 | 5060 |
error return from the 'bmake'. |
14882 | 5061 |
" |
5062 |
||
5063 |
preRequisites := self allPreRequisitesSorted:#effectivePreRequisites. |
|
5064 |
"these have been already built in preReq" |
|
5065 |
preRequisites removeAllFoundIn:(self allPreRequisites:#mandatoryPreRequisites). |
|
5066 |
||
5067 |
^ String streamContents:[:s | |
|
23124 | 5068 |
preRequisites do:[:eachProjectId | |
5069 |
s tab; nextPutAll:'pushd '; |
|
5070 |
nextPutAll:(self msdosPathToPackage:eachProjectId from:myProjectId); |
|
5071 |
nextPutLine:' & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
|
5072 |
]. |
|
14882 | 5073 |
]. |
5074 |
||
5075 |
" |
|
5076 |
exept_expecco_application generateRequiredMakeReferences_bc_dot_mak |
|
5077 |
alspa_batch_application generateRequiredMakeReferences_bc_dot_mak |
|
5078 |
" |
|
5079 |
! |
|
5080 |
||
5081 |
generateRequiredMakeReferences_make_dot_proto |
|
5082 |
|libPath preRequisites| |
|
5083 |
||
5084 |
preRequisites := self allPreRequisitesSorted:#effectivePreRequisites. |
|
5085 |
"these have been already built in preReq" |
|
5086 |
preRequisites removeAllFoundIn:(self allPreRequisites:#mandatoryPreRequisites). |
|
5087 |
||
5088 |
^ String streamContents:[:s | |
|
23858 | 5089 |
preRequisites do:[:projectID | |
5090 |
libPath := self pathToPackage:projectID withSeparator:'/'. |
|
5091 |
s tab; nextPutAll: 'cd ', libPath; nextPutLine:' && $(MAKE) $(MAKE_ARGS) "CFLAGS_LOCAL=$(GLOBALDEFINES) "'. |
|
5092 |
]. |
|
5093 |
||
5094 |
s cr. |
|
14882 | 5095 |
]. |
5096 |
||
5097 |
" |
|
5098 |
exept_expecco_application generateRequiredMakeReferences_make_dot_proto |
|
5099 |
alspa_batch_application generateRequiredMakeReferences_make_dot_proto |
|
5100 |
" |
|
19290 | 5101 |
|
5102 |
"Modified: / 03-03-2016 / 21:23:45 / cg" |
|
23858 | 5103 |
"Modified: / 08-03-2019 / 12:12:52 / Claus Gittinger" |
14882 | 5104 |
! |
5105 |
||
10022 | 5106 |
generateSubDirectories |
5107 |
^ String streamContents:[:s | |
|
23124 | 5108 |
self subProjects |
5109 |
do:[:eachProjectID | |
|
5110 |
s space; nextPutAll:(self pathToPackage:eachProjectID from:self package withSeparator:'/') |
|
5111 |
] |
|
10022 | 5112 |
] |
5113 |
||
5114 |
" |
|
10380
ff1cfee6130b
Fix subproject incluseion in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10369
diff
changeset
|
5115 |
exept_expecco generateSubDirectories |
10022 | 5116 |
" |
5117 |
||
5118 |
"Created: / 09-08-2006 / 11:26:59 / fm" |
|
5119 |
"Modified: / 14-09-2006 / 18:46:18 / cg" |
|
5120 |
! |
|
5121 |
||
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5122 |
generate_definitionClassLine_libInit_dot_cc |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5123 |
"for the init-file: generate a single class-init-line for the definition class itself" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5124 |
|
13419 | 5125 |
^ self |
23124 | 5126 |
generateClassLines:(self classLine_libInit_dot_cc) |
5127 |
forClasses:(Array with:self name) |
|
5128 |
includeAdditionalClasses:false |
|
12804
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
5129 |
|
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
5130 |
" |
079b692e0776
added: #generateClassLines:forClasses:includeAdditionalClasses:
sr
parents:
12771
diff
changeset
|
5131 |
stx_libbasic generate_definitionClassLine_libInit_dot_cc |
12771
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5132 |
" |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5133 |
! |
878fc210c8e7
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12749
diff
changeset
|
5134 |
|
10022 | 5135 |
headerFileOutputArg |
20590 | 5136 |
"Every header file is left locally in its lib-dir" |
5137 |
||
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
5138 |
^ '-headerDir=.' |
10022 | 5139 |
! |
5140 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5141 |
objectLine_make_dot_spec_mappings: aClassName |
13419 | 5142 |
^ Dictionary new |
23124 | 5143 |
at: 'CLASSFILE' put:(self filenameForClass:aClassName); |
5144 |
yourself |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5145 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5146 |
"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
|
5147 |
"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
|
5148 |
"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
|
5149 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
5150 |
|
9887 | 5151 |
subProjectBmakeCalls |
12439 | 5152 |
"generate submake-calls for borland bcc" |
5153 |
||
13419 | 5154 |
^ self subProjectMakeCallsUsing:'call bmake %1 %2'. |
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
5155 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
5156 |
|
14334 | 5157 |
subProjectLCCmakeCalls |
5158 |
"generate submake-calls for lcc" |
|
5159 |
||
5160 |
^ self subProjectMakeCallsUsing:'call lccmake %1 %2'. |
|
5161 |
||
5162 |
"Created: / 03-09-2012 / 19:49:08 / cg" |
|
12438
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
5163 |
! |
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
5164 |
|
26bbeae51816
added: #subProjectMakeCallsUsing:
Claus Gittinger <cg@exept.de>
parents:
12428
diff
changeset
|
5165 |
subProjectMakeCallsUsing:callString |
20703 | 5166 |
"for xxxmake.bat files" |
23124 | 5167 |
|
9887 | 5168 |
^ String streamContents:[:s | |
23850 | 5169 |
(self effectiveSubProjects:#win32) do:[:packageID | |
5170 |
|pkgLabel skipLabel joinLabel| |
|
5171 |
||
5172 |
pkgLabel := (packageID copyReplaceAll:$: with:$_) copyReplaceAll:$/ with:$_. |
|
5173 |
skipLabel := 'skip_',pkgLabel. |
|
5174 |
joinLabel := 'done_',pkgLabel. |
|
5175 |
s nextPutLine:'@if not exist ',(self msdosPathToPackage:packageID from:(self package)),' goto ',skipLabel. |
|
5176 |
s nextPutLine:'@echo "***********************************"'. |
|
5177 |
s nextPutLine:'@echo "Building ',(packageID copyReplaceAll:$: with:$/),'"'. |
|
5178 |
s nextPutLine:'@echo "***********************************"'. |
|
5179 |
s nextPutLine:'@pushd ', (self msdosPathToPackage:packageID from:(self package)). |
|
5180 |
s nextPutAll:'@'; nextPutAll:callString; nextPutLine:' || exit /b "%errorlevel%"'. |
|
5181 |
s nextPutLine:'@popd'. |
|
5182 |
s nextPutLine:'@goto ',joinLabel. |
|
5183 |
s nextPutLine:':',skipLabel. |
|
5184 |
s nextPutLine:'@echo "###################################"'. |
|
5185 |
s nextPutLine:'@echo "FOLDER MISSING: ',(packageID copyReplaceAll:$: with:$/),'"'. |
|
5186 |
s nextPutLine:'@echo "###################################"'. |
|
5187 |
(self nonMandatorySubProjects includes:packageID) ifTrue:[ |
|
5188 |
s nextPutLine:'@REM exit /b 1'. |
|
5189 |
s nextPutLine:'@echo "subproject is not mandatory; continue."'. |
|
5190 |
] ifFalse:[ |
|
5191 |
s nextPutLine:'exit /b 1'. |
|
5192 |
]. |
|
5193 |
s nextPutLine:':',joinLabel. |
|
5194 |
s cr. |
|
5195 |
] |
|
9887 | 5196 |
] |
5197 |
||
5198 |
"Created: / 14-09-2006 / 18:40:09 / cg" |
|
13734 | 5199 |
"Modified: / 27-09-2011 / 19:36:12 / cg" |
21259 | 5200 |
"Modified: / 17-01-2017 / 16:32:45 / stefan" |
23850 | 5201 |
"Modified: / 07-03-2019 / 17:30:46 / Claus Gittinger" |
11937 | 5202 |
! |
5203 |
||
14345 | 5204 |
subProjectMingwmakeCalls |
5205 |
"generate submake-calls for mingw" |
|
5206 |
||
5207 |
^ self subProjectMakeCallsUsing:'call mingwmake %1 %2'. |
|
5208 |
||
5209 |
"Created: / 05-09-2012 / 19:45:53 / cg" |
|
5210 |
! |
|
5211 |
||
14334 | 5212 |
subProjectTCCmakeCalls |
5213 |
"generate submake-calls for tcc" |
|
5214 |
||
5215 |
^ self subProjectMakeCallsUsing:'call tccmake %1 %2'. |
|
5216 |
||
5217 |
"Created: / 03-09-2012 / 19:50:53 / cg" |
|
5218 |
! |
|
5219 |
||
11937 | 5220 |
subProjectVCmakeCalls |
12439 | 5221 |
"generate submake-calls for visual-C" |
5222 |
||
13419 | 5223 |
^ self subProjectMakeCallsUsing:'call vcmake %1 %2'. |
9817 | 5224 |
! ! |
5225 |
||
23866 | 5226 |
!ProjectDefinition class methodsFor:'file mappings support-Java'! |
5227 |
||
5228 |
generateJavaBuildPrereqs |
|
5229 |
^ self generateJavaBuildPrereqsUsingTemplate: |
|
5230 |
||
5231 |
' <target name="prereqs.%(PREREQ_PACKAGE_DOTTED)" extensionOf="prereqs.main"> |
|
5232 |
<ant antfile="${TOP}/../%(PREREQ_PACKAGE_SLASHED)/java/build.xml" |
|
5233 |
target="${ant.project.invoked-targets}" |
|
5234 |
inheritAll="false" |
|
5235 |
useNativeBasedir="true"/> |
|
5236 |
</target> |
|
5237 |
' |
|
5238 |
||
5239 |
"Created: / 18-01-2015 / 07:40:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5240 |
"Modified: / 19-01-2015 / 07:27:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5241 |
! |
|
5242 |
||
5243 |
generateJavaBuildPrereqsClasspathPaths |
|
5244 |
^ self generateJavaBuildPrereqsUsingTemplate: |
|
5245 |
||
5246 |
' <path id="build.classpath.prereqs.%(PREREQ_PACKAGE_DOTTED)"> |
|
5247 |
<pathelement path="${TOP}/../%(PREREQ_PACKAGE_SLASHED)/java/bin"/> |
|
5248 |
<fileset dir="${TOP}/../%(PREREQ_PACKAGE_SLASHED)/java/libs" includes="*.jar"/> |
|
5249 |
</path> |
|
5250 |
' |
|
5251 |
||
5252 |
"Created: / 18-01-2015 / 07:40:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5253 |
"Modified: / 19-01-2015 / 07:27:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5254 |
! |
|
5255 |
||
5256 |
generateJavaBuildPrereqsClasspathRefs |
|
5257 |
^ self generateJavaBuildPrereqsUsingTemplate: |
|
5258 |
||
5259 |
' <path refid="build.classpath.prereqs.%(PREREQ_PACKAGE_DOTTED)"/> |
|
5260 |
' |
|
5261 |
||
5262 |
"Created: / 18-01-2015 / 07:40:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5263 |
! |
|
5264 |
||
5265 |
generateJavaBuildPrereqsUsingTemplate: template |
|
5266 |
| mappings | |
|
5267 |
||
5268 |
mappings := Dictionary new. |
|
5269 |
mappings at: 'PACKAGE_SLASHED' put: (self package copyReplaceAll: $: with: $/). |
|
5270 |
mappings at: 'PACKAGE_DOTTED' put: ((self package copyReplaceAll: $: with: $/) replaceAll: $/ with: $.). |
|
5271 |
||
5272 |
^ String streamContents:[ :s | |
|
5273 |
((self preRequisitesFor: self package) asArray sort) do:[:each | |
|
5274 |
| def | |
|
5275 |
||
5276 |
def := ProjectDefinition definitionClassForPackage: each createIfAbsent: false. |
|
5277 |
def javaBundle notNil ifTrue: [ |
|
5278 |
mappings at: 'PREREQ_PACKAGE_SLASHED' put: (each copyReplaceAll: $: with: $/). |
|
5279 |
mappings at: 'PREREQ_PACKAGE_DOTTED' put: ((each copyReplaceAll: $: with: $/) replaceAll: $/ with: $.). |
|
5280 |
s nextPutAll: (template expandPlaceholdersWith: mappings) |
|
5281 |
] |
|
5282 |
]. |
|
5283 |
] |
|
5284 |
||
5285 |
"Created: / 18-01-2015 / 07:43:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5286 |
"Modified: / 19-01-2015 / 07:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5287 |
! ! |
|
5288 |
||
12364 | 5289 |
!ProjectDefinition class methodsFor:'file templates'! |
5290 |
||
13177 | 5291 |
autopackage_default_dot_apspec |
5292 |
"for linux's autopackage" |
|
5293 |
||
5294 |
^ |
|
5295 |
'# -*- shell-script -*- |
|
5296 |
[Meta] |
|
5297 |
ShortName: %(APPLICATION) |
|
5298 |
SoftwareVersion: %(PRODUCT_VERSION) |
|
5299 |
DisplayName: %(DESCRIPTION) |
|
20550 | 5300 |
RootName: %(PRODUCT_ROOT_NAME) |
13177 | 5301 |
Summary: %(DESCRIPTION) |
5302 |
Maintainer: %(MAINTAINER) |
|
5303 |
Packager: %(PACKAGER) |
|
5304 |
PackageVersion: 1 |
|
20550 | 5305 |
CPUArchitectures: %(PRODUCT_CPU_VERSIONS) |
13177 | 5306 |
AutopackageTarget: 1.0 |
5307 |
Type: %(PRODUCT_TYPE) |
|
13419 | 5308 |
License: %(PRODUCT_LICENSE) |
13177 | 5309 |
|
5310 |
[Description] |
|
5311 |
%(PRODUCT_DESCRIPTION) |
|
5312 |
||
5313 |
[BuildPrepare] |
|
5314 |
# If you''re using autotools, the default should be enough. |
|
5315 |
# prepareBuild will set up apbuild and run configure for you. If you |
|
5316 |
# need to pass arguments to configure, just add them to prepareBuild: |
|
5317 |
# prepareBuild --enable-foo --disable-bar |
|
5318 |
#prepareBuild |
|
5319 |
||
5320 |
[BuildUnprepare] |
|
5321 |
# If you''re using prepareBuild above, there is no need to change this!! |
|
5322 |
#unprepareBuild |
|
5323 |
||
5324 |
[Globals] |
|
5325 |
# Variables declared in this section will be available in all other sections |
|
5326 |
export APKG_BUILD_SKIP_CONFIGURE=1 |
|
5327 |
export APKG_BUILD_SKIP_MAKE=1 |
|
5328 |
export MYPREFIX=/opt/%(APPLICATION) |
|
5329 |
||
5330 |
[Prepare] |
|
5331 |
#recommend ''@autopackage.org/autopackage-gtk'' 1 |
|
5332 |
||
5333 |
[Imports] |
|
5334 |
import <<EOF |
|
5335 |
$source_dir/%(APPLICATION) |
|
20550 | 5336 |
%(ADDITIONAL_SOURCE_DIRS) |
13177 | 5337 |
EOF |
5338 |
||
5339 |
for i in $source_dir/*.so |
|
5340 |
do |
|
5341 |
echo $source_dir/$(readlink $i) |
|
5342 |
done | import |
|
5343 |
||
5344 |
[Install] |
|
5345 |
if [ "$PREFIX" !!= "/usr" ] |
|
5346 |
then |
|
5347 |
export MYPREFIX=$PREFIX |
|
5348 |
fi |
|
5349 |
||
5350 |
find . -type d \( -name CVS -or -name ''not_*'' \) -print | xargs rm -rf |
|
5351 |
mkdir -p $MYPREFIX |
|
23440 | 5352 |
copyFiles %(PRODUCT_NAME) *.rc resources $MYPREFIX/bin |
20550 | 5353 |
%(ADDITIONAL_COPYFILES) |
5354 |
||
5355 |
#installExe %(PRODUCT_NAME) |
|
13177 | 5356 |
#installLib *.so |
20550 | 5357 |
%(ADDITIONAL_INSTALL) |
13177 | 5358 |
|
5359 |
[Uninstall] |
|
5360 |
# Leaving this at the default is safe unless you use custom commands in |
|
5361 |
# "Install" to create files. All autopackage API functions |
|
5362 |
# that installs files are logged. |
|
5363 |
uninstallFromLog |
|
5364 |
' |
|
5365 |
||
5366 |
"Created: / 21-12-2010 / 09:06:21 / cg" |
|
5367 |
! |
|
5368 |
||
12364 | 5369 |
bc_dot_mak |
5370 |
"answer a template for the bc.mak makefile. |
|
5371 |
Any variable definition %(Variable) will be later replaced by the mapping. |
|
5372 |
$% characters have to be duplicated. |
|
5373 |
Only needed for WIN" |
|
5374 |
||
5375 |
^ self subclassResponsibility |
|
5376 |
! |
|
5377 |
||
5378 |
bmake_dot_mak |
|
17186 | 5379 |
"the template code for the bmake.bat file |
5380 |
Notice: duplicate %'s if they are needed as such in the generated file" |
|
12364 | 5381 |
|
13419 | 5382 |
^ |
12364 | 5383 |
'@REM ------- |
14336 | 5384 |
@REM make using Borland bcc32 |
12364 | 5385 |
@REM type bmake, and wait... |
5386 |
@REM do not edit - automatically generated from ProjectDefinition |
|
5387 |
@REM ------- |
|
15950 | 5388 |
@SET DEFINES= |
18521 | 5389 |
|
17186 | 5390 |
make.exe -N -f bc.mak %%DEFINES%% %%* |
5391 |
||
19627 | 5392 |
%(SKIP_IF_ARG_IS_APP_TARGET) |
19594 | 5393 |
|
12364 | 5394 |
%(SUBPROJECT_BMAKE_CALLS) |
5395 |
' |
|
5396 |
||
5397 |
"Created: / 17-08-2006 / 20:04:14 / cg" |
|
14336 | 5398 |
"Modified: / 04-09-2012 / 11:46:22 / cg" |
12364 | 5399 |
! |
5400 |
||
13411 | 5401 |
builder_baseline_dot_rbspec |
5402 |
"For rake-base automatic builder" |
|
13419 | 5403 |
|
13411 | 5404 |
^ ' |
5405 |
# generated from project definition |
|
5406 |
||
5407 |
# load package dependencies |
|
5408 |
load ''package.deps.rake'' |
|
5409 |
||
5410 |
# kludge: clear some invalid dependencies of libwidg |
|
5411 |
# (should be fixed in baseline) |
|
5412 |
clear "stx:libwidg" => "stx:libui" |
|
5413 |
clear "stx:libwidg2" => "stx:libui" |
|
5414 |
||
5415 |
project :''%(APPLICATION):baseline'' do |
|
5416 |
# preamble |
|
5417 |
%(PREAMBLE) |
|
5418 |
# -------- |
|
5419 |
||
5420 |
%(PACKAGES) |
|
5421 |
||
5422 |
application "%(APPLICATION_PACKAGE)" |
|
5423 |
||
5424 |
# postamble |
|
5425 |
%(POSTABLE) |
|
5426 |
# --------- |
|
5427 |
||
5428 |
end |
|
5429 |
' |
|
5430 |
||
5431 |
"Created: / 24-02-2011 / 11:39:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5432 |
"Modified: / 27-02-2011 / 12:42:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5433 |
! |
|
5434 |
||
5435 |
builder_baseline_dot_rbspec_postamble |
|
5436 |
^ '' |
|
5437 |
||
5438 |
"Created: / 24-02-2011 / 11:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5439 |
! |
|
5440 |
||
5441 |
builder_baseline_dot_rbspec_preamble |
|
5442 |
^ '' |
|
5443 |
||
5444 |
"Created: / 24-02-2011 / 11:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5445 |
! |
|
5446 |
||
19309 | 5447 |
classExternalDeclarationLine_libInit_dot_cc |
5448 |
||
5449 |
^'extern void _%(CLASS)_Init(int pass, struct __vmData__ *__pRT__, OBJ snd);' |
|
5450 |
! |
|
5451 |
||
12364 | 5452 |
classLine_libInit_dot_cc |
5453 |
||
19309 | 5454 |
^' _%(CLASS)_Init(pass,__pRT__,snd);' |
12364 | 5455 |
|
5456 |
"Created: / 08-08-2006 / 12:51:44 / fm" |
|
5457 |
"Modified: / 08-08-2006 / 15:46:05 / fm" |
|
5458 |
! |
|
5459 |
||
20582 | 5460 |
generate_osx_info_dot_plist |
20567 | 5461 |
"template for the info.plist file, which is included in an OS X deployment" |
23124 | 5462 |
|
20567 | 5463 |
|plist| |
5464 |
||
20582 | 5465 |
(plist := self osx_info_dot_plist_dictionary) isNil ifTrue:[^ nil]. |
20586 | 5466 |
MacPlistXMLCoder isNil ifTrue:[ |
23124 | 5467 |
Smalltalk loadPackage:'stx:goodies/xml/stx'. |
5468 |
Smalltalk loadPackage:'stx:goodies/fileformats/plist'. |
|
5469 |
]. |
|
5470 |
^ MacPlistXMLCoder encode:plist |
|
20567 | 5471 |
|
5472 |
" |
|
5473 |
exept_expecco_application info_dot_plist |
|
5474 |
" |
|
5475 |
! |
|
5476 |
||
23866 | 5477 |
java_build_auto_dot_xml |
5478 |
"Template for java/build.auto.xml" |
|
5479 |
^ '<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
5480 |
<!!-- This file has been generated by STX:LIBJAVA. Do not edit!! Edit build.xml instead --> |
|
5481 |
<project> |
|
5482 |
<property name="TOP" value="../%(TOP)" /> |
|
5483 |
<import file="${TOP}/libjava/java/build.common.xml"/> |
|
5484 |
||
5485 |
<path id="build.classpath.prereqs"> |
|
5486 |
%(BUILD_PREREQS_CLASSPATH_REFS) |
|
5487 |
</path> |
|
5488 |
||
5489 |
%(BUILD_PREREQS_CLASSPATH_PATHS) |
|
5490 |
||
5491 |
%(BUILD_PREREQS) |
|
5492 |
||
5493 |
</project> |
|
5494 |
' |
|
5495 |
||
5496 |
"Created: / 18-01-2015 / 07:32:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5497 |
"Modified: / 19-01-2015 / 07:23:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5498 |
! |
|
5499 |
||
5500 |
java_build_dot_xml |
|
5501 |
"Template for java/build.xml" |
|
5502 |
^ '<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
5503 |
<project name="%(PACKAGE_DITTED)" default="compile" basedir="."> |
|
5504 |
<import file="build.auto.xml"/> |
|
5505 |
<!!-- Put custom build code here, this file is never overwritten by Smalltalk/X --> |
|
5506 |
</project> |
|
5507 |
' |
|
5508 |
||
5509 |
"Created: / 19-01-2015 / 07:35:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
5510 |
! |
|
5511 |
||
14334 | 5512 |
lccmake_dot_mak |
5513 |
"the template code for the lccmake.bat file" |
|
12364 | 5514 |
|
13419 | 5515 |
^ |
12364 | 5516 |
'@REM ------- |
5517 |
@REM make using lcc compiler |
|
14334 | 5518 |
@REM type lccmake, and wait... |
12364 | 5519 |
@REM do not edit - automatically generated from ProjectDefinition |
5520 |
@REM ------- |
|
14361 | 5521 |
make.exe -N -f bc.mak -DUSELCC=1 %%* |
12364 | 5522 |
|
19627 | 5523 |
%(SKIP_IF_ARG_IS_APP_TARGET) |
19595 | 5524 |
|
12364 | 5525 |
%(SUBPROJECT_LCCMAKE_CALLS) |
5526 |
' |
|
14334 | 5527 |
|
5528 |
"Created: / 03-09-2012 / 19:49:23 / cg" |
|
12364 | 5529 |
! |
5530 |
||
5531 |
make_dot_proto |
|
5532 |
"the template code for the make.proto file" |
|
5533 |
||
5534 |
^ self subclassResponsibility |
|
5535 |
! |
|
5536 |
||
5537 |
make_dot_spec |
|
5538 |
||
13419 | 5539 |
^ |
12364 | 5540 |
'# $','Header','$ |
5541 |
# |
|
13419 | 5542 |
# DO NOT EDIT |
14248 | 5543 |
# automagically generated from the projectDefinition: ',self name,"' at ',Timestamp now printString,"'. |
12364 | 5544 |
# |
5545 |
# Warning: once you modify this file, do not rerun |
|
5546 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
5547 |
# |
|
5548 |
# This file contains specifications which are common to all platforms. |
|
5549 |
# |
|
5550 |
||
5551 |
# Do NOT CHANGE THESE DEFINITIONS |
|
5552 |
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID, |
|
5553 |
# to find the source code of a class and to find the library for a package) |
|
5554 |
MODULE=%(MODULE) |
|
5555 |
MODULE_DIR=%(MODULE_DIRECTORY) |
|
5556 |
PACKAGE=$(MODULE):$(MODULE_DIR) |
|
5557 |
||
5558 |
||
5559 |
# Argument(s) to the stc compiler (stc --usage). |
|
13875
2e01d09fa4c4
-headerDir= instead of --headerDir=
Claus Gittinger <cg@exept.de>
parents:
13873
diff
changeset
|
5560 |
# -headerDir=. : create header files locally |
12364 | 5561 |
# (if removed, they will be created as common |
5562 |
# -Pxxx : defines the package |
|
5563 |
# -Zxxx : a prefix for variables within the classLib |
|
20152 | 5564 |
# -Dxxx : defines passed to CC for inline C-code |
12364 | 5565 |
# -Ixxx : include path passed to CC for inline C-code |
5566 |
# +optspace : optimized for space |
|
5567 |
# +optspace2 : optimized more for space |
|
5568 |
# +optspace3 : optimized even more for space |
|
5569 |
# +optinline : generate inline code for some ST constructs |
|
5570 |
# +inlineNew : additionally inline new |
|
5571 |
# +inlineMath : additionally inline some floatPnt math stuff |
|
5572 |
# |
|
5573 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
5574 |
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew |
|
5575 |
# STCLOCALOPTIMIZATIONS=+optspace3 |
|
5576 |
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS) |
|
5577 |
||
5578 |
||
5579 |
# Argument(s) to the stc compiler (stc --usage). |
|
5580 |
# -warn : no warnings |
|
5581 |
# -warnNonStandard : no warnings about ST/X extensions |
|
5582 |
# -warnEOLComments : no warnings about EOL comment extension |
|
5583 |
# -warnPrivacy : no warnings about privateClass extension |
|
17070 | 5584 |
# -warnUnused : no warnings about unused variables |
12364 | 5585 |
# |
5586 |
# ********** OPTIONAL: MODIFY the next line(s) *** |
|
5587 |
# STCWARNINGS=-warn |
|
5588 |
# STCWARNINGS=-warnNonStandard |
|
5589 |
# STCWARNINGS=-warnEOLComments |
|
5590 |
STCWARNINGS=%(STCWARNINGOPTIONS) |
|
5591 |
||
12545 | 5592 |
%(CLASSES) |
5593 |
||
12364 | 5594 |
%(OBJECTS) |
5595 |
' |
|
5596 |
||
5597 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
5598 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
14248 | 5599 |
"Modified: / 26-07-2012 / 00:56:03 / cg" |
12364 | 5600 |
! |
5601 |
||
12428 | 5602 |
makefile |
13419 | 5603 |
^ |
12428 | 5604 |
'# |
13419 | 5605 |
# DO NOT EDIT |
12428 | 5606 |
# |
13419 | 5607 |
# make uses this file (Makefile) only, if there is no |
12428 | 5608 |
# file named "makefile" (lower-case m) in the same directory. |
5609 |
# My only task is to generate the real makefile and call make again. |
|
5610 |
# Thereafter, I am no longer used and needed. |
|
5611 |
# |
|
15201 | 5612 |
# MACOSX caveat: |
5613 |
# as filenames are not case sensitive (in a default setup), |
|
15385 | 5614 |
# we cannot use the above trick. Therefore, this file is now named |
15201 | 5615 |
# "Makefile.init", and you have to execute "make -f Makefile.init" to |
5616 |
# get the initial makefile. This is now also done by the toplevel CONFIG |
|
5617 |
# script. |
|
12428 | 5618 |
|
5619 |
.PHONY: run |
|
5620 |
||
5621 |
run: makefile |
|
23124 | 5622 |
$(MAKE) -f makefile |
12428 | 5623 |
|
5624 |
#only needed for the definition of $(TOP) |
|
5625 |
include Make.proto |
|
5626 |
||
14665 | 5627 |
makefile: mf |
5628 |
||
5629 |
mf: |
|
23124 | 5630 |
$(TOP)/rules/stmkmf |
12428 | 5631 |
' |
5632 |
! |
|
5633 |
||
14345 | 5634 |
mingwmake_dot_mak |
5635 |
"the template code for the mingwmake.bat file" |
|
5636 |
||
5637 |
^ |
|
5638 |
'@REM ------- |
|
5639 |
@REM make using mingw gnu compiler |
|
5640 |
@REM type mingwmake, and wait... |
|
5641 |
@REM do not edit - automatically generated from ProjectDefinition |
|
5642 |
@REM ------- |
|
15950 | 5643 |
@SET DEFINES= |
14642 | 5644 |
|
14850 | 5645 |
@pushd %(TOP)\rules |
5646 |
@call find_mingw.bat |
|
5647 |
@popd |
|
15950 | 5648 |
make.exe -N -f bc.mak %DEFINES% %%USEMINGW_ARG%% %%* |
14345 | 5649 |
|
19627 | 5650 |
%(SKIP_IF_ARG_IS_APP_TARGET) |
19595 | 5651 |
|
14345 | 5652 |
%(SUBPROJECT_MINGWMAKE_CALLS) |
5653 |
' |
|
5654 |
||
5655 |
"Created: / 05-09-2012 / 19:44:51 / cg" |
|
15950 | 5656 |
"Modified: / 19-03-2013 / 08:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14345 | 5657 |
! |
5658 |
||
12364 | 5659 |
objectLine_make_dot_spec |
5660 |
||
21236 | 5661 |
^' $(OUTDIR)%(CLASSFILE).$(O) \' |
12364 | 5662 |
|
5663 |
"Created: / 08-08-2006 / 20:16:46 / fm" |
|
5664 |
"Modified: / 23-08-2006 / 11:11:38 / cg" |
|
5665 |
! |
|
5666 |
||
20582 | 5667 |
osx_info_dot_plist_dictionary |
5668 |
"template for the info.plist file, which is included in an OS X deployment" |
|
23124 | 5669 |
|
20582 | 5670 |
|plist pkg icnFilename docTypeDescriptions| |
23124 | 5671 |
|
20582 | 5672 |
plist := Dictionary new. |
5673 |
plist at:'CFBundleInfoDictionaryVersion' put:'6.0'. |
|
5674 |
pkg := self package copyReplaceAny:':/' with:$.. |
|
5675 |
(pkg endsWith:'.application') ifTrue:[ |
|
23124 | 5676 |
pkg := pkg copyButLast:'.application' size. |
5677 |
]. |
|
20582 | 5678 |
plist at:'CFBundleIdentifier' put:pkg. |
5679 |
plist at:'CFBundleShortVersionString' put:(self fileVersion asString). |
|
5680 |
plist at:'CFBundleVersion' put:(self fileVersion asString). |
|
5681 |
plist at:'LSMinimumSystemVersion' put:'10.6'. |
|
5682 |
"/ plist at:'CFBundleDevelopmentRegion' put:'English'. |
|
20601 | 5683 |
plist at:'CFBundleExecutable' put:(self applicationName). |
23124 | 5684 |
|
20582 | 5685 |
self isLibraryDefinition ifTrue:[ |
23124 | 5686 |
plist at:'CFBundleName' put:(self package copyReplaceAny:':/' with:$.). |
20582 | 5687 |
] ifFalse:[ |
23124 | 5688 |
plist at:'CFBundleName' put:(self applicationName). |
5689 |
plist at:'CFBundlePackageType' put:'APPL'. |
|
5690 |
]. |
|
5691 |
||
5692 |
(icnFilename := self applicationIconFileNameOSX) notNil ifTrue:[ |
|
5693 |
plist at:'CFBundleIconFile' put:icnFilename. |
|
20582 | 5694 |
]. |
5695 |
(docTypeDescriptions := self applicationDocumentTypeDescriptions) notNil ifTrue:[ |
|
23124 | 5696 |
plist at:'CFBundleDocumentTypes' put: |
5697 |
(docTypeDescriptions collect:[:each | |
|
5698 |
|d| |
|
5699 |
d := Dictionary new. |
|
5700 |
d at:'CFBundleTypeExtensions' put:{ each extension }. |
|
5701 |
d at:'CFBundleTypeIconFile' put:{ each iconFileOSX }. |
|
5702 |
d at:'CFBundleTypeMimeTypes' put:{ each mimeType }. |
|
5703 |
d at:'CFBundleTypeName' put:(each documentTypeName). |
|
5704 |
d at:'CFBundleTypeRole' put:'Editor'. |
|
5705 |
d |
|
5706 |
]). |
|
5707 |
]. |
|
20582 | 5708 |
^ plist |
5709 |
||
5710 |
" |
|
5711 |
exept_expecco_application info_dot_plist |
|
5712 |
" |
|
21562 | 5713 |
|
5714 |
"Modified (format): / 24-02-2017 / 09:35:09 / cg" |
|
20582 | 5715 |
! |
5716 |
||
12364 | 5717 |
packageName_dot_rc |
5718 |
"the template code for the <libName>.rc file. |
|
5719 |
Only used for WIN" |
|
5720 |
||
13419 | 5721 |
^ |
12364 | 5722 |
'// |
13419 | 5723 |
// DO NOT EDIT |
12364 | 5724 |
// automagically generated from the projectDefinition: ',self name,'. |
5725 |
// |
|
5726 |
VS_VERSION_INFO VERSIONINFO |
|
5727 |
FILEVERSION %(FILE_VERSION_COMMASEPARATED) |
|
5728 |
PRODUCTVERSION %(PRODUCT_VERSION_COMMASEPARATED) |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
5729 |
#if (__BORLANDC__) |
12364 | 5730 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
5731 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
5732 |
FILEOS VOS_NT_WINDOWS32 |
|
5733 |
FILETYPE %(FILETYPE) |
|
5734 |
FILESUBTYPE VS_USER_DEFINED |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
5735 |
#endif |
12364 | 5736 |
|
5737 |
BEGIN |
|
5738 |
BLOCK "StringFileInfo" |
|
5739 |
BEGIN |
|
5740 |
BLOCK "040904E4" |
|
5741 |
BEGIN |
|
5742 |
VALUE "CompanyName", "%(COMPANY_NAME)\0" |
|
5743 |
VALUE "FileDescription", "%(FILE_DESCRIPTION)\0" |
|
5744 |
VALUE "FileVersion", "%(FILE_VERSION)\0" |
|
5745 |
VALUE "InternalName", "%(INTERNAL_NAME)\0" |
|
5746 |
%(LEGAL_COPYRIGHT_LINE) |
|
5747 |
VALUE "ProductName", "%(PRODUCT_NAME)\0" |
|
5748 |
VALUE "ProductVersion", "%(PRODUCT_VERSION)\0" |
|
5749 |
VALUE "ProductDate", "%(PRODUCT_DATE)\0" |
|
5750 |
END |
|
5751 |
||
5752 |
END |
|
5753 |
||
5754 |
BLOCK "VarFileInfo" |
|
5755 |
BEGIN // Language | Translation |
|
5756 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
5757 |
END |
|
5758 |
END |
|
5759 |
' |
|
5760 |
" |
|
5761 |
stx_libbasic3 packageName_dot_rc |
|
5762 |
stx_libbasic3 generate_packageName_dot_rc |
|
5763 |
" |
|
5764 |
||
5765 |
"Created: / 08-08-2006 / 19:31:29 / fm" |
|
5766 |
"Modified: / 09-08-2006 / 15:10:57 / fm" |
|
13769
8259f3bf7fa2
changed: #packageName_dot_rc
Claus Gittinger <cg@exept.de>
parents:
13763
diff
changeset
|
5767 |
"Modified: / 07-10-2011 / 10:51:34 / cg" |
12364 | 5768 |
! |
5769 |
||
13411 | 5770 |
package_dot_deps_dot_rake |
5771 |
^ ' |
|
5772 |
# Package dependencies. |
|
21753 | 5773 |
# Automatically generated by project definition. |
13411 | 5774 |
|
5775 |
%(DEPENDENCIES) |
|
5776 |
||
5777 |
' |
|
5778 |
||
5779 |
"Created: / 24-02-2011 / 22:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
21753 | 5780 |
"Modified: / 17-05-2017 / 12:35:21 / mawalch" |
13411 | 5781 |
! |
5782 |
||
14334 | 5783 |
tccmake_dot_mak |
5784 |
"the template code for the tccmake.bat file" |
|
5785 |
||
5786 |
^ |
|
5787 |
'@REM ------- |
|
14336 | 5788 |
@REM make using tcc compiler (Tiny-C) |
14334 | 5789 |
@REM type tccmake, and wait... |
5790 |
@REM do not edit - automatically generated from ProjectDefinition |
|
5791 |
@REM ------- |
|
14361 | 5792 |
make.exe -N -f bc.mak -DUSETCC=1 %%* |
14334 | 5793 |
|
19627 | 5794 |
%(SKIP_IF_ARG_IS_APP_TARGET) |
19596 | 5795 |
|
5796 |
||
14334 | 5797 |
%(SUBPROJECT_TCCMAKE_CALLS) |
5798 |
' |
|
5799 |
||
5800 |
"Created: / 03-09-2012 / 19:50:41 / cg" |
|
5801 |
! |
|
5802 |
||
12364 | 5803 |
vcmake_dot_mak |
5804 |
"the template code for the vcmake.bat file" |
|
5805 |
||
13419 | 5806 |
^ |
12364 | 5807 |
'@REM ------- |
14336 | 5808 |
@REM make using Microsoft Visual C compiler |
12364 | 5809 |
@REM type vcmake, and wait... |
5810 |
@REM do not edit - automatically generated from ProjectDefinition |
|
5811 |
@REM ------- |
|
13789 | 5812 |
|
5813 |
@if not defined VSINSTALLDIR ( |
|
14850 | 5814 |
pushd %(TOP)\rules |
5815 |
call vcsetup.bat |
|
5816 |
popd |
|
13789 | 5817 |
) |
15950 | 5818 |
@SET DEFINES= |
18521 | 5819 |
|
15950 | 5820 |
make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %* |
5821 |
||
19627 | 5822 |
%(SKIP_IF_ARG_IS_APP_TARGET) |
15950 | 5823 |
|
12364 | 5824 |
%(SUBPROJECT_VCMAKE_CALLS) |
5825 |
' |
|
12966 | 5826 |
|
14336 | 5827 |
"Modified: / 04-09-2012 / 11:45:49 / cg" |
12364 | 5828 |
! ! |
5829 |
||
5830 |
!ProjectDefinition class methodsFor:'loading'! |
|
5831 |
||
19905 | 5832 |
checkForLoad |
21563 | 5833 |
"raise an error, if the package is not suitable for loading" |
19905 | 5834 |
|
23746 | 5835 |
|m| |
5836 |
||
19905 | 5837 |
self supportedOnPlatform ifFalse:[ |
23681 | 5838 |
PackageNotCompatibleError |
5839 |
raiseRequestWith:self package |
|
5840 |
errorString:(self reasonForNotSupportedOnPlatform) |
|
19905 | 5841 |
]. |
21563 | 5842 |
|
23746 | 5843 |
"/ check for an uncompiled method in the dictionary |
5844 |
"/ happens if an incompatible library is loaded. |
|
5845 |
(m := self class compiledMethodAt:#mandatoryPreRequisites) notNil ifTrue:[ |
|
5846 |
m isExecutable ifFalse:[ |
|
5847 |
PackageNotCompatibleError |
|
5848 |
raiseRequestWith:self package |
|
5849 |
errorString:'package is incompatible (needs recompilation)' |
|
5850 |
]. |
|
5851 |
]. |
|
5852 |
||
21563 | 5853 |
"Modified (comment): / 24-02-2017 / 10:06:44 / cg" |
23746 | 5854 |
"Modified: / 19-02-2019 / 16:24:25 / Claus Gittinger" |
19905 | 5855 |
! |
5856 |
||
12397 | 5857 |
ensureFullyLoaded |
5858 |
"ensure that all classes and extensions are loaded properly. |
|
5859 |
This is normally no problem for compiled classLibs - however, if a package |
|
5860 |
has only be installedAsAutoloaded, some classes might want to ensure that |
|
5861 |
when being loaded themself." |
|
5862 |
||
16892 | 5863 |
self supportedOnPlatform ifFalse:[^ self]. |
5864 |
||
12397 | 5865 |
self hasAllExtensionsLoaded ifFalse:[ |
23124 | 5866 |
self breakPoint:#cg. |
12397 | 5867 |
]. |
5868 |
self hasAllClassesFullyLoaded ifFalse:[ |
|
23124 | 5869 |
self hasAllClassesLoaded ifFalse:[ |
5870 |
self breakPoint:#cg. |
|
5871 |
]. |
|
5872 |
self installAutoloadedClasses. |
|
5873 |
self classes do:[:cls | cls autoload ]. |
|
12397 | 5874 |
]. |
5875 |
||
5876 |
" |
|
5877 |
stx_libbasic ensureFullyLoaded |
|
5878 |
" |
|
12731 | 5879 |
"Verbose := true |
5880 |
stx_libjavascript hasAllExtensionsLoaded |
|
5881 |
" |
|
12735
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
5882 |
"Verbose := true |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
5883 |
stx_goodies_soap_xe hasAllExtensionsLoaded |
215f7514f56b
comment/format in: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
12731
diff
changeset
|
5884 |
" |
13689
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
5885 |
|
9d93d5e56029
changed: #ensureFullyLoaded
Claus Gittinger <cg@exept.de>
parents:
13688
diff
changeset
|
5886 |
"Modified: / 12-09-2011 / 16:57:53 / cg" |
12397 | 5887 |
! |
5888 |
||
12364 | 5889 |
load |
5890 |
"load the project |
|
13419 | 5891 |
Answer true, if new classes have been installed for this package, |
12364 | 5892 |
false if the package's classes have been already present." |
5893 |
||
5894 |
^ self loadAsAutoloaded:false. |
|
5895 |
! |
|
5896 |
||
5897 |
loadAsAutoloaded:asAutoloaded |
|
5898 |
"load the project. |
|
5899 |
If asAutoloaded == true, install all new classes as autoloaded. |
|
5900 |
Answer true, if new classes have been installed for this package, |
|
5901 |
false if the package's classes have been already present." |
|
5902 |
||
5903 |
|newStuffHasBeenLoaded meOrMySecondIncarnation| |
|
5904 |
||
16892 | 5905 |
self supportedOnPlatform ifFalse:[^ false]. |
5906 |
||
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5907 |
self projectIsLoaded ifTrue:[ |
23124 | 5908 |
asAutoloaded ifFalse:[ |
5909 |
"/ to be considered !! |
|
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5910 |
"/ self isFullyLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5911 |
"/ self hasAllExtensionsLoaded ifFalse:[ |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5912 |
"/ self loadExtensions. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5913 |
"/ ]. |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5914 |
"/ self loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5915 |
"/ ]. |
23124 | 5916 |
]. |
5917 |
^ false |
|
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
5918 |
]. |
17587 | 5919 |
|
5920 |
"/ the following prevents us from crshing if a project definition's prerequisites |
|
5921 |
"/ are wrong and circular/recursive |
|
5922 |
||
12749 | 5923 |
thisContext isRecursive ifTrue:[self breakPoint:#cg. ^ false]. "/ avoid endless loops |
15172 | 5924 |
(PackagesBeingLoaded includes:self package) ifTrue:[ |
23124 | 5925 |
"/ seems to be a recursive call |
5926 |
^ false |
|
14851 | 5927 |
]. |
12364 | 5928 |
|
15172 | 5929 |
PackagesBeingLoaded add:self package. |
17587 | 5930 |
PackageLoadInProgressQuery |
23124 | 5931 |
answerNotifyLoading:self package |
5932 |
do:[ |
|
5933 |
||
5934 |
[ |
|
5935 |
newStuffHasBeenLoaded := false. |
|
5936 |
||
5937 |
Smalltalk silentLoading ifFalse:[ |
|
5938 |
"/ thisContext fullPrintAll. |
|
5939 |
Logger info:('loading %1%2...' |
|
5940 |
bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:['']) |
|
5941 |
with:self name). |
|
5942 |
]. |
|
5943 |
||
5944 |
self rememberOverwrittenExtensionMethods. |
|
5945 |
||
5946 |
self activityNotification:'Executing pre-load action'. |
|
5947 |
self executeHooks: #preLoad. |
|
5948 |
self preLoadAction. |
|
5949 |
||
5950 |
meOrMySecondIncarnation := self. |
|
5951 |
||
5952 |
Class withoutUpdatingChangesDo:[ |
|
5953 |
self activityNotification:'Loading prerequisities'. |
|
5954 |
self loadMandatoryPreRequisitesAsAutoloaded:asAutoloaded. |
|
5955 |
||
5956 |
self checkPrerequisitesForLoading. |
|
5957 |
||
5958 |
asAutoloaded ifFalse:[ |
|
5959 |
"ignore binary class library load failure - try is the hard way (loading classes)" |
|
5960 |
PackageLoadError ignoreIn:[ |
|
5961 |
self loadClassLibrary. |
|
5962 |
"/ could have overloaded my first incarnation |
|
5963 |
meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self. |
|
5964 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
|
5965 |
meOrMySecondIncarnation fetchSlotsFrom:self. |
|
5966 |
]. |
|
5967 |
]. |
|
5968 |
]. |
|
5969 |
||
5970 |
self hasAllExtensionsLoaded ifFalse:[ |
|
5971 |
self activityNotification:'Loading extensions'. |
|
5972 |
"/ evaluating or here - want extensions to be loaded |
|
5973 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions. |
|
5974 |
]. |
|
5975 |
(self hasAllClassesLoaded:asAutoloaded not) ifFalse:[ |
|
5976 |
self activityNotification:'Loading classes'. |
|
5977 |
"/ evaluating or here - want autoloaded classes to be loaded |
|
5978 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded). |
|
5979 |
]. |
|
5980 |
"/ no, don't load subProjects here - will lead to a recursion, which leads |
|
5981 |
"/ to some classes being loaded from source (soap) |
|
5982 |
"/ self activityNotification:'Loading sub projects'. |
|
5983 |
"/ meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded. |
|
5984 |
]. |
|
5985 |
self activityNotification:('Executing post-load action for %1' bindWith:self package). |
|
5986 |
||
5987 |
"/ mhmh - already done for dll-loaded packages |
|
5988 |
"/ meOrMySecondIncarnation initializeAllClasses. |
|
5989 |
||
5990 |
meOrMySecondIncarnation projectIsLoaded:true. |
|
5991 |
meOrMySecondIncarnation ~~ self ifTrue:[ |
|
5992 |
self projectIsLoaded:true. |
|
5993 |
]. |
|
5994 |
] ensure:[ |
|
5995 |
PackagesBeingLoaded remove:self package ifAbsent:[]. |
|
5996 |
]. |
|
5997 |
"/ load the other prerequisites |
|
5998 |
self loadPreRequisitesAsAutoloaded:asAutoloaded. |
|
5999 |
]. |
|
13194
8e451f8ff654
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13178
diff
changeset
|
6000 |
self activityNotification:('Done (%1).' bindWith:self package). |
12364 | 6001 |
^ newStuffHasBeenLoaded |
6002 |
||
6003 |
"Created: / 17-08-2006 / 01:01:41 / cg" |
|
6004 |
"Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
6005 |
"Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13623
46625f58d8ee
changed: #loadAsAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13614
diff
changeset
|
6006 |
"Modified: / 04-09-2011 / 10:01:53 / cg" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6007 |
"Modified: / 20-11-2012 / 23:06:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12364 | 6008 |
! |
6009 |
||
6010 |
unloadPackage |
|
6011 |
"unload the project. |
|
6012 |
Fails if there are still instances of any of my classes in the system" |
|
6013 |
||
6014 |
self projectIsLoaded ifFalse:[^ false]. |
|
6015 |
thisContext isRecursive ifTrue:[^ false]. |
|
6016 |
||
20952 | 6017 |
Smalltalk silentLoading ifFalse:[ |
23124 | 6018 |
"/ thisContext fullPrintAll. |
6019 |
Logger info:'unloading %1' with:self name. |
|
12364 | 6020 |
]. |
6021 |
||
6022 |
self activityNotification:'Executing pre-unload action'. |
|
6023 |
self preUnloadAction. |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6024 |
self executeHooks: #preUnload. |
12364 | 6025 |
|
6026 |
self activityNotification:'Restoring original methods'. |
|
6027 |
self restoreOverwrittenExtensionMethods. |
|
6028 |
||
6029 |
Class withoutUpdatingChangesDo:[ |
|
23124 | 6030 |
self activityNotification:'Unloading subprojects'. |
6031 |
self unloadSubProjects. |
|
6032 |
||
6033 |
self activityNotification:'Unloading classes'. |
|
6034 |
self unloadClassLibrary. |
|
6035 |
self unloadAllClasses. |
|
12364 | 6036 |
]. |
6037 |
self projectIsLoaded:false. |
|
6038 |
^ true |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6039 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6040 |
"Modified: / 20-11-2012 / 23:06:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12364 | 6041 |
! ! |
6042 |
||
12086 | 6043 |
|
9575 | 6044 |
!ProjectDefinition class methodsFor:'private'! |
9536 | 6045 |
|
13411 | 6046 |
abbrevs |
13592 | 6047 |
"return a dictionary containing my abbreviations; |
6048 |
this dictionary is read from my project-directory's abbrev.stc file, |
|
6049 |
and cached for future use" |
|
6050 |
||
6051 |
|abbrevs| |
|
6052 |
||
6053 |
AccessLock critical:[ |
|
23124 | 6054 |
|mustRead file myPackageDirectory| |
6055 |
||
6056 |
AbbrevDictionary isNil ifTrue:[ |
|
6057 |
AbbrevDictionary := WeakIdentityDictionary new. |
|
6058 |
]. |
|
6059 |
||
6060 |
mustRead := false. |
|
6061 |
abbrevs := AbbrevDictionary at:self ifAbsent:[ mustRead := true. Dictionary new ]. |
|
6062 |
||
6063 |
mustRead ifTrue:[ |
|
6064 |
myPackageDirectory := self packageDirectory. |
|
6065 |
myPackageDirectory isNil ifTrue:[ |
|
6066 |
] ifFalse:[ |
|
6067 |
file := myPackageDirectory / 'abbrev.stc'. |
|
6068 |
file exists ifTrue: [ |
|
6069 |
file readingFileDo:[:stream | |
|
6070 |
Smalltalk |
|
6071 |
withAbbreviationsFromStream:stream |
|
6072 |
do:[:nm :fn :pkg :cat :sz| |
|
6073 |
abbrevs at: nm put: (AbbrevEntry new className:nm fileName:fn category:cat numClassInstVars:sz) |
|
6074 |
] |
|
6075 |
] |
|
6076 |
]. |
|
6077 |
]. |
|
6078 |
]. |
|
13419 | 6079 |
]. |
13695 | 6080 |
|
13411 | 6081 |
^abbrevs |
6082 |
||
6083 |
"Created: / 06-03-2011 / 18:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13959 | 6084 |
"Modified: / 20-01-2012 / 15:42:47 / cg" |
13411 | 6085 |
! |
6086 |
||
12368 | 6087 |
additionalClassAttributesFor: aClass |
6088 |
"Answers additional set of class attributes for given class |
|
6089 |
Individual project definitions may override this method, but |
|
6090 |
overriding method should always merge its attributes with result |
|
6091 |
of 'super additionalClassAttributesFor: aClass'. |
|
6092 |
||
6093 |
Here, we add #autoload attributes to all test cases and |
|
21102 | 6094 |
test resources, as they are not necessary for the package |
12368 | 6095 |
and should not be compiled (because of unwanted dependency |
6096 |
on stx:goodies/sunit package) |
|
15950 | 6097 |
|
6098 |
But not make them autoloaded when the package is separate |
|
6099 |
test-package - by conventions such package should by named |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6100 |
#'module:package/subpackage/tests' |
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6101 |
" |
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6102 |
((self package endsWith: '/tests') or:[(self package endsWith: '/test')]) ifFalse:[ |
23124 | 6103 |
(TestCase notNil and:[aClass inheritsFrom: TestCase]) ifTrue:[^#(autoload)]. |
6104 |
(TestResource notNil and:[aClass inheritsFrom: TestResource]) ifTrue:[^#(autoload)]. |
|
15950 | 6105 |
]. |
12368 | 6106 |
|
6107 |
"No additional attributes" |
|
6108 |
^#() |
|
6109 |
||
6110 |
" |
|
23124 | 6111 |
stx_libbasic additionalClassAttributesFor: Object |
6112 |
stx_libtool additionalClassAttributesFor: Tools::NavigationHistoryTests |
|
6113 |
stx_goodies_sunit additionalClassAttributesFor: TestCase |
|
6114 |
stx_goodies_petitparser_tests additionalClassAttributesFor: PPAbstractParseTest |
|
6115 |
||
6116 |
||
6117 |
stx_libtool classNamesAndAttributes_code_ignoreOldEntries:true ignoreOldDefinition: true |
|
12368 | 6118 |
|
6119 |
" |
|
6120 |
||
6121 |
"Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6122 |
"Modified (comment): / 01-11-2014 / 00:27:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
12368 | 6123 |
! |
6124 |
||
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6125 |
checkIfClassesArePresent |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6126 |
"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
|
6127 |
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
|
6128 |
|
18684 | 6129 |
|check nonExistentClasses| |
6130 |
||
6131 |
nonExistentClasses := Set new. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6132 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6133 |
check := |
23124 | 6134 |
[:eachClassName | |
6135 |
|cls fn wasLoaded failedToLoad numClassInstvars| |
|
6136 |
||
6137 |
cls := Smalltalk classNamed:eachClassName. |
|
6138 |
cls isNil ifTrue:[ |
|
6139 |
Transcript showCR:eachClassName. |
|
6140 |
nonExistentClasses add:eachClassName. |
|
6141 |
]. |
|
6142 |
]. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6143 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6144 |
self allClassNames do:check. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6145 |
self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr | |
23124 | 6146 |
(attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[ |
6147 |
check value:nm |
|
6148 |
]. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6149 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6150 |
|
18684 | 6151 |
nonExistentClasses notEmpty ifTrue:[ |
23124 | 6152 |
Transcript showCR:('"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.' bindWith:nonExistentClasses). |
6153 |
UserPreferences current suppressProjectDefinitionWarnings ifFalse:[ |
|
6154 |
(Dialog confirm:(Dialog classResources |
|
6155 |
stringWithCRs:'"%1" and possibly more classes are missing.\Cannot generate a correct "abbrev.stc" file.\\Continue anyway?' |
|
6156 |
with:nonExistentClasses anElement allBold)) ifFalse:[ |
|
6157 |
AbortOperationRequest raise. |
|
6158 |
]. |
|
6159 |
]. |
|
6160 |
^ false. |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6161 |
]. |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6162 |
|
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6163 |
^ true |
15916 | 6164 |
|
6165 |
"Modified: / 28-01-2014 / 21:44:37 / cg" |
|
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6166 |
! |
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6167 |
|
12368 | 6168 |
classNamesAndAttributesAsSpecArray |
13419 | 6169 |
"given a classNamesAndAttributes array, make this a spec array (array of arrays). |
12368 | 6170 |
This decompresses class-name entries into a one-element array for easier processing" |
6171 |
||
6172 |
^ self classNamesAndAttributes |
|
23124 | 6173 |
collect:[:entry | |
6174 |
entry isArray ifTrue:[ |
|
6175 |
entry first isSymbol ifTrue:[ |
|
6176 |
entry |
|
6177 |
] ifFalse:[ |
|
6178 |
(Array with:entry first asSymbol) , (entry copyFrom:2) |
|
6179 |
]. |
|
6180 |
] ifFalse:[ |
|
6181 |
Array with:entry asSymbol. |
|
6182 |
]]. |
|
12368 | 6183 |
|
6184 |
"Created: / 19-02-2007 / 16:11:53 / cg" |
|
6185 |
! |
|
6186 |
||
9627 | 6187 |
classNamesAndAttributesDo: aBlock |
6188 |
self namesAndAttributesIn:(self classNamesAndAttributes) do: aBlock |
|
6189 |
||
6190 |
"Modified: / 22-08-2006 / 18:20:21 / cg" |
|
9607 | 6191 |
! |
6192 |
||
12368 | 6193 |
classNamesAndAttributesFromSpecArray:aSpecArray |
6194 |
"given a spec array (array of arrays), make this a classNamesAndAttributes array |
|
6195 |
as stored literally in the method. |
|
6196 |
This compresses single element array-elements into plain names |
|
16572 | 6197 |
(to save code in the compiled binaries) and especially sorts them by load/compile order" |
6198 |
||
6199 |
|newSpec loadedClasses loadedClassNames itemsForUnloadedClasses |
|
6200 |
entriesByName| |
|
6201 |
||
6202 |
entriesByName := Dictionary new. |
|
16024 | 6203 |
|
6204 |
newSpec := |
|
23124 | 6205 |
aSpecArray |
6206 |
collect:[:entry | |
|
6207 |
|nm newEntry| |
|
6208 |
||
6209 |
(entry isArray and:[entry size == 1]) ifTrue:[ |
|
6210 |
nm := newEntry := entry first. |
|
6211 |
entriesByName at:nm put:nm. |
|
6212 |
] ifFalse:[ |
|
6213 |
newEntry := entry. |
|
6214 |
(entry isArray and:[entry size > 1]) ifTrue:[ |
|
6215 |
nm := entry first. |
|
6216 |
entriesByName at:nm put:entry. |
|
6217 |
] ifFalse:[ |
|
6218 |
nm := entry. |
|
6219 |
entriesByName at:nm put:entry. |
|
6220 |
]. |
|
6221 |
]. |
|
6222 |
newEntry |
|
6223 |
]. |
|
16024 | 6224 |
|
6225 |
"/ extract loaded and unloaded classes. |
|
6226 |
loadedClasses := OrderedCollection new. |
|
6227 |
itemsForUnloadedClasses := OrderedCollection new. |
|
6228 |
||
6229 |
newSpec do:[:entry | |
|
23124 | 6230 |
|clsName clsOrNil| |
6231 |
||
6232 |
(entry isArray and:[entry includes:#autoload]) ifTrue:[ |
|
6233 |
itemsForUnloadedClasses add:entry. |
|
6234 |
] ifFalse:[ |
|
6235 |
clsName := entry isArray ifTrue:[ entry first ] ifFalse:[ entry ]. |
|
6236 |
clsOrNil := Smalltalk classNamed:clsName. |
|
6237 |
(clsOrNil notNil and:[clsOrNil isLoaded]) ifTrue:[ |
|
6238 |
loadedClasses add:clsOrNil. |
|
6239 |
] ifFalse:[ |
|
6240 |
itemsForUnloadedClasses add:entry. |
|
6241 |
] |
|
6242 |
] |
|
16024 | 6243 |
]. |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6244 |
"/ and sort by load order |
16024 | 6245 |
loadedClassNames := (Class classesSortedByLoadOrder:loadedClasses) collect:[:cls | cls name]. |
16619 | 6246 |
newSpec := loadedClassNames collect:[:nm | entriesByName at:nm ifAbsent:[ { nm . #autoload }]]. |
16572 | 6247 |
|
16024 | 6248 |
"/ reconstruct contents array, unloaded classes last. |
16572 | 6249 |
^ newSpec asArray , itemsForUnloadedClasses asArray. |
12368 | 6250 |
! |
6251 |
||
9664 | 6252 |
compile:someCode categorized:category |
15006 | 6253 |
^ self compile:someCode categorized:category using:nil |
6254 |
! |
|
6255 |
||
6256 |
compile:someCode categorized:category using:compilerOrNil |
|
6257 |
^ Class packageQuerySignal |
|
23124 | 6258 |
answer:self package |
6259 |
do:[ |
|
6260 |
(compilerOrNil ? self theMetaclass compilerClass) |
|
6261 |
compile:someCode |
|
6262 |
forClass:self theMetaclass |
|
6263 |
inCategory:category |
|
6264 |
] |
|
9664 | 6265 |
|
6266 |
"Created: / 23-08-2006 / 14:36:53 / cg" |
|
6267 |
! |
|
6268 |
||
9627 | 6269 |
compiled_classes |
13419 | 6270 |
^ self compiled_classNames |
23124 | 6271 |
collect: |
6272 |
[:eachName| |
|
6273 |
|cls| |
|
6274 |
||
6275 |
cls := (Smalltalk at:eachName asSymbol). |
|
6276 |
(cls isNil or:[cls isBehavior not]) ifTrue:[ |
|
6277 |
Transcript showCR:('ProjectDefinition: missing/invalid class: ', eachName). |
|
6278 |
cls := nil. |
|
6279 |
]. |
|
6280 |
cls. |
|
6281 |
] |
|
6282 |
thenSelect:[:cls | cls notNil] |
|
9627 | 6283 |
|
6284 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
6285 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 6286 |
"Modified: / 07-12-2006 / 17:48:11 / cg" |
9536 | 6287 |
! |
6288 |
||
9627 | 6289 |
compiled_classesDo:aBlock |
6290 |
self compiled_classes do:aBlock. |
|
6291 |
||
6292 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
6293 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
6294 |
! |
|
6295 |
||
15124 | 6296 |
compiled_classesForPlatform:arch |
13419 | 6297 |
^ (self compiled_classNamesForPlatform:arch) |
23124 | 6298 |
collect:[:eachName | (Smalltalk classNamed:eachName)] |
9627 | 6299 |
|
10251 | 6300 |
" |
6301 |
stx_libbasic compiled_classesForArchitecture:#win32 |
|
6302 |
stx_libbasic compiled_classesForArchitecture:#macos |
|
6303 |
stx_libbasic compiled_classesForArchitecture:#unix |
|
6304 |
" |
|
6305 |
||
9627 | 6306 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
6307 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
10251 | 6308 |
"Modified: / 07-12-2006 / 17:43:17 / cg" |
9627 | 6309 |
! |
6310 |
||
6311 |
compiled_classes_common |
|
13419 | 6312 |
^ self |
23124 | 6313 |
compiled_classNames_common |
6314 |
collect:[:eachName | |
|
6315 |
|cls| |
|
6316 |
||
6317 |
cls := Smalltalk classNamed:eachName. |
|
6318 |
cls isNil ifTrue:[ |
|
6319 |
Transcript showCR:('Warning: Missing/invalid class: %1 - the class is skipped in the list of compiled classes.'). |
|
6320 |
UserPreferences current suppressProjectDefinitionWarnings ifFalse:[ |
|
6321 |
self warn:('Missing/invalid class: %1\\%2' |
|
6322 |
bindWith:eachName |
|
6323 |
with:('Warning: The class is skipped in the list of compiled classes.' allBold)) withCRs. |
|
6324 |
]. |
|
6325 |
cls := nil. |
|
6326 |
]. |
|
6327 |
cls |
|
6328 |
] |
|
6329 |
thenSelect:[:cls| cls notNil "isBehavior"] |
|
9627 | 6330 |
|
6331 |
"Created: / 09-08-2006 / 16:28:15 / fm" |
|
6332 |
"Modified: / 09-08-2006 / 18:02:28 / fm" |
|
15916 | 6333 |
"Modified: / 28-01-2014 / 21:45:08 / cg" |
9607 | 6334 |
! |
6335 |
||
9627 | 6336 |
cvsRevision |
6337 |
|rev| |
|
6338 |
||
6339 |
rev := self revision. |
|
6340 |
rev isNil ifTrue:[ |
|
23124 | 6341 |
"not yet pubplished" |
6342 |
^ #( '0' '1' ) |
|
9627 | 6343 |
]. |
6344 |
^ rev asCollectionOfSubstringsSeparatedBy:$. . |
|
6345 |
||
6346 |
" |
|
6347 |
self cvsRevision |
|
13419 | 6348 |
stx_libbasic3 cvsRevision |
9627 | 6349 |
" |
6350 |
||
6351 |
"Created: / 17-08-2006 / 20:19:03 / cg" |
|
9575 | 6352 |
! |
6353 |
||
13411 | 6354 |
defaultClassAttributesFor: aClass |
6355 |
"Answers default set of class attributes for given class. |
|
6356 |
This is internal method only, to per-project customization |
|
6357 |
please override either #additionalClassAttributes or |
|
6358 |
#additional classAttributesFor:" |
|
6359 |
||
6360 |
| attrs | |
|
6361 |
||
6362 |
"JV @ 2010-06-19 |
|
6363 |
Add a programming language attribute for non-smalltalk classes. |
|
6364 |
Used by multi-lang enabled loading mechanism" |
|
13419 | 6365 |
attrs := aClass programmingLanguage isSmalltalk |
23124 | 6366 |
ifTrue:[#()] |
6367 |
ifFalse:[Array with: (Array with: #lang with: aClass programmingLanguage name asSymbol)]. |
|
13419 | 6368 |
|
13411 | 6369 |
|
6370 |
"JV @ 2009-10-26 |
|
6371 |
Give a project definition to specify additional attributes for given class." |
|
6372 |
attrs := attrs , (self additionalClassAttributesFor: aClass). |
|
6373 |
||
6374 |
^attrs |
|
6375 |
||
6376 |
"Created: / 19-06-2010 / 10:44:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6377 |
! |
|
6378 |
||
9627 | 6379 |
inconsistency:message |
6380 |
Dialog warn:message |
|
9536 | 6381 |
|
9627 | 6382 |
" |
6383 |
self searchForNeverCompiledSuperclasses |
|
13419 | 6384 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
9627 | 6385 |
" |
6386 |
||
6387 |
"Created: / 09-08-2006 / 16:32:31 / fm" |
|
9536 | 6388 |
! |
6389 |
||
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6390 |
makeOSIncludesWith:fileSeparator from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6391 |
^ aString copy replaceAny:'/\' with:fileSeparator |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6392 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6393 |
" |
13419 | 6394 |
self makeOSIncludesWith:$/ from:'-I$(TOP)/foo/bar' |
6395 |
self makeOSIncludesWith:$\ from:'-I$(TOP)/foo/bar' |
|
9826
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6396 |
" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6397 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6398 |
"Created: / 06-09-2006 / 18:17:03 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6399 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6400 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6401 |
makeUnixIncludes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6402 |
^ self makeOSIncludesWith:$/ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6403 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6404 |
"Created: / 06-09-2006 / 18:16:19 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6405 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6406 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6407 |
makeWin32Includes:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6408 |
^ self makeOSIncludesWith:$\ from:aString |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6409 |
|
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6410 |
"Created: / 06-09-2006 / 18:16:13 / cg" |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6411 |
! |
8d5fe8462720
common localIncludes for all oses
Claus Gittinger <cg@exept.de>
parents:
9825
diff
changeset
|
6412 |
|
13411 | 6413 |
mergeClassAttributes: attr1 with: attr2 |
6414 |
||
6415 |
^attr1 , (attr2 reject:[:each|attr1 includes: each]) |
|
6416 |
||
6417 |
"Created: / 19-06-2010 / 10:50:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6418 |
! |
|
6419 |
||
6420 |
mergeDefaultClassAttributesFor: aClass with: attributes |
|
6421 |
||
6422 |
^self mergeClassAttributes: attributes with: (self defaultClassAttributesFor: aClass) |
|
6423 |
||
6424 |
"Created: / 19-06-2010 / 10:51:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6425 |
! |
|
6426 |
||
9627 | 6427 |
namesAndAttributesIn:aCollection do: aBlock |
18988 | 6428 |
aCollection isNil ifTrue:[^ self]. |
6429 |
||
9627 | 6430 |
aCollection do:[:entry | |
23124 | 6431 |
|className attributes| |
6432 |
||
6433 |
entry isArray ifFalse:[ |
|
6434 |
className := entry. |
|
6435 |
attributes := #(). |
|
6436 |
] ifTrue:[ |
|
6437 |
className := entry first. |
|
6438 |
attributes := entry copyFrom:2. |
|
6439 |
]. |
|
6440 |
aBlock value: className value: attributes |
|
9627 | 6441 |
]. |
6442 |
||
6443 |
"Created: / 22-08-2006 / 18:20:09 / cg" |
|
9621 | 6444 |
! |
6445 |
||
9627 | 6446 |
searchForClasses |
10010 | 6447 |
"answer all non-private classes that belong to this project. |
10005 | 6448 |
They are sorted in load order" |
6449 |
||
13419 | 6450 |
^ Class classesSortedByLoadOrder:(self searchForClassesWithProject: self package) |
9627 | 6451 |
|
6452 |
" |
|
10010 | 6453 |
stx_libbasic3 searchForClasses |
11868
59e160ca3419
First support for cleanup of class filenames
Stefan Vogel <sv@exept.de>
parents:
11829
diff
changeset
|
6454 |
stx_goodies_webServer_htmlTree searchForClasses |
9627 | 6455 |
" |
6456 |
||
6457 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
6458 |
"Created: / 17-08-2006 / 21:18:30 / cg" |
|
9536 | 6459 |
! |
6460 |
||
9627 | 6461 |
searchForClassesWithProject: aProjectID |
15098 | 6462 |
"answer all public and private classes belonging to aProjectID" |
9627 | 6463 |
|
13419 | 6464 |
^ Smalltalk allClasses |
23124 | 6465 |
select:[:cls | cls package = aProjectID]. |
9627 | 6466 |
|
6467 |
" |
|
15098 | 6468 |
self searchForClassesWithProject: #'exept:ctypes' |
9627 | 6469 |
" |
6470 |
||
6471 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
9536 | 6472 |
! |
6473 |
||
9627 | 6474 |
searchForExtensions |
6475 |
^ self searchForExtensionsWithProject:self package |
|
6476 |
||
6477 |
" |
|
13419 | 6478 |
self searchForExtensions |
9627 | 6479 |
DapasXProject searchForExtensions |
6480 |
DapasX_Datenbasis searchForExtensions |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
6481 |
stx_libtool searchForExtensions |
9627 | 6482 |
" |
6483 |
||
6484 |
"Modified: / 09-08-2006 / 13:01:26 / fm" |
|
6485 |
"Created: / 17-08-2006 / 21:17:46 / cg" |
|
10106
c26879b72dfe
extensionlist generator was buggy
Claus Gittinger <cg@exept.de>
parents:
10104
diff
changeset
|
6486 |
"Modified: / 23-10-2006 / 11:03:07 / cg" |
9575 | 6487 |
! |
6488 |
||
9627 | 6489 |
searchForExtensionsWithProject:aProjectID |
6490 |
"search for any class which has extensions from aProjectID. |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
6491 |
Return the extension-methods sorted by classname-selector" |
9627 | 6492 |
|
6493 |
|methods| |
|
6494 |
||
11152 | 6495 |
methods := Smalltalk allExtensionsForPackage:aProjectID. |
13419 | 6496 |
methods |
23124 | 6497 |
sort:[:m1 :m2 | |
6498 |
|c1 c2| |
|
6499 |
||
6500 |
c1 := m1 mclass. |
|
6501 |
c2 := m2 mclass. |
|
6502 |
c1 == c2 ifTrue:[ |
|
6503 |
m1 selector < m2 selector |
|
6504 |
] ifFalse:[ |
|
6505 |
(c2 isMeta and:[c1 isMeta not]) ifTrue:[ |
|
6506 |
true |
|
6507 |
] ifFalse:[ |
|
6508 |
(c1 isMeta and:[c2 isMeta not]) ifTrue:[ |
|
6509 |
false |
|
6510 |
] ifFalse:[ |
|
6511 |
c1 name < c2 name |
|
9908
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6512 |
"/ (c2 isSubclassOf:c1) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6513 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6514 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6515 |
"/ (c1 isSubclassOf:c2) ifTrue:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6516 |
"/ false |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6517 |
"/ ] ifFalse:[ |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6518 |
"/ "/ leave as is |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6519 |
"/ true |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6520 |
"/ ]. |
eede5b535b1e
extensions sorted by name (to avoid confusing cvs-diff)
Claus Gittinger <cg@exept.de>
parents:
9906
diff
changeset
|
6521 |
"/ ]. |
23124 | 6522 |
]. |
6523 |
]. |
|
6524 |
]. |
|
6525 |
]. |
|
9627 | 6526 |
^ methods |
6527 |
||
6528 |
" |
|
6529 |
self searchForExtensionsWithProject:#'bosch:dapasx' |
|
6530 |
self searchForExtensionsWithProject:#'cg:oyster' |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
6531 |
self searchForExtensionsWithProject:#'stx:libboss' |
9627 | 6532 |
" |
6533 |
||
6534 |
"Created: / 17-08-2006 / 21:19:04 / cg" |
|
10086
024ea420d1a6
extension method stuff refactored
Claus Gittinger <cg@exept.de>
parents:
10080
diff
changeset
|
6535 |
"Modified: / 12-10-2006 / 20:45:39 / cg" |
9536 | 6536 |
! |
6537 |
||
9627 | 6538 |
searchForProjectsWhichProvideHeaderFiles |
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6539 |
|addPackage myPackageID requiredPackages| |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6540 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6541 |
myPackageID := self package. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6542 |
requiredPackages := Set new. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6543 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6544 |
addPackage := |
24342 | 6545 |
[:package | |
6546 |
(package ~= myPackageID) ifTrue:[ |
|
6547 |
true "(package startsWith:'stx:') not" ifTrue:[ |
|
6548 |
package ~= PackageId noProjectID ifTrue:[ |
|
6549 |
requiredPackages add:package. |
|
6550 |
] |
|
6551 |
] |
|
6552 |
] |
|
6553 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6554 |
|
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
6555 |
"/ need them also... |
14886 | 6556 |
self mandatoryPreRequisites do:[:eachPreRequisitePackage | |
24342 | 6557 |
addPackage value:eachPreRequisitePackage |
12555
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
6558 |
]. |
9924562388ed
changed: #searchForProjectsWhichProvideHeaderFiles
Claus Gittinger <cg@exept.de>
parents:
12554
diff
changeset
|
6559 |
|
16554 | 6560 |
"/ cg: also need include lines for all referenced packages, |
6561 |
"/ because otherwise, a reference to a symbol in a namespace |
|
6562 |
"/ is not resolved correctly by stc (which would not know, if the |
|
6563 |
"/ symbol is in Smalltalk or the NameSpace. |
|
6564 |
"/ This happens eg. when referring to a class Foo in namespace N |
|
6565 |
"/ as Foo from within the same namespace, but Foo is in another package. |
|
6566 |
"/ It is then only in the referencedPreRequisites's, not the mandatory prereqs. |
|
24342 | 6567 |
"/ Actually, the question is, if then the package should not be listed in the |
16554 | 6568 |
"/ mandatoryPrereqs right away. Discuss this with sv. |
6569 |
self referencedPreRequisites do:[:eachPreRequisitePackage | |
|
24342 | 6570 |
addPackage value:eachPreRequisitePackage |
16554 | 6571 |
]. |
6572 |
||
10788 | 6573 |
self compiled_classesDo:[:cls | |
24342 | 6574 |
cls allSuperclassesDo:[:eachSuperClass | |
6575 |
addPackage value:(eachSuperClass package) |
|
6576 |
]. |
|
6577 |
||
6578 |
cls allPrivateClassesDo:[:eachPrivateClass | |
|
6579 |
eachPrivateClass allSuperclassesDo:[:eachSuperClass | |
|
6580 |
eachSuperClass isPrivate ifFalse:[ |
|
6581 |
addPackage value:(eachSuperClass package) |
|
6582 |
]. |
|
6583 |
] |
|
6584 |
]. |
|
6585 |
||
6586 |
cls sharedPoolNames do:[:eachPoolName | |
|
6587 |
|eachPoolClass| |
|
6588 |
||
6589 |
eachPoolClass := Smalltalk classNamed:eachPoolName. |
|
6590 |
eachPoolClass isNil ifTrue:[ |
|
6591 |
Transcript showCR:('Warning: missing pool: %1 (required by %2)' bindWith:eachPoolName with:cls name) |
|
6592 |
] ifFalse:[ |
|
6593 |
eachPoolClass withAllSuperclassesDo:[:eachPoolSuperClass | |
|
6594 |
addPackage value:(eachPoolSuperClass package) |
|
6595 |
] |
|
6596 |
] |
|
6597 |
]. |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6598 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6599 |
|
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6600 |
self extensionMethodNames pairWiseDo:[:className :selector | |
24342 | 6601 |
|cls| |
6602 |
((cls := Smalltalk classNamed:className) notNil and:[cls isLoaded]) ifTrue:[ |
|
6603 |
cls withAllSuperclassesDo:[:eachSuperClass | |
|
6604 |
addPackage value:(eachSuperClass package) |
|
6605 |
] |
|
6606 |
] |
|
9883
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6607 |
]. |
c641767d1483
include and dependency generation fixed
Claus Gittinger <cg@exept.de>
parents:
9880
diff
changeset
|
6608 |
^ requiredPackages |
9627 | 6609 |
|
9880 | 6610 |
" |
13419 | 6611 |
stx_libtool searchForProjectsWhichProvideHeaderFiles |
14939 | 6612 |
cg_demos_helloWorld searchForProjectsWhichProvideHeaderFiles |
16554 | 6613 |
cg_tools_emulators_freecell searchForProjectsWhichProvideHeaderFiles |
9880 | 6614 |
" |
9627 | 6615 |
|
10251 | 6616 |
"Created: / 07-12-2006 / 17:46:38 / cg" |
13216 | 6617 |
"Modified: / 18-01-2011 / 17:58:33 / cg" |
24342 | 6618 |
"Modified (comment): / 23-06-2019 / 10:36:23 / Claus Gittinger" |
9664 | 6619 |
! |
6620 |
||
9667 | 6621 |
searchForSiblingProjects |
10132 | 6622 |
"answer all the packages (package names) having the my parent package" |
6623 |
||
9667 | 6624 |
|myPackage myParentPackage| |
6625 |
||
6626 |
myPackage := self package asPackageId. |
|
6627 |
myParentPackage := myPackage parentPackage. |
|
6628 |
myParentPackage isNil ifTrue:[^ #() ]. |
|
6629 |
||
19476 | 6630 |
^ Smalltalk allPackageIDs |
23124 | 6631 |
select:[:projectID | |
6632 |
|thisPackage| |
|
6633 |
thisPackage := projectID asPackageId. |
|
6634 |
(thisPackage parentPackage = myParentPackage) |
|
6635 |
and:[ thisPackage ~= myPackage ]. |
|
6636 |
] |
|
9667 | 6637 |
|
6638 |
" |
|
6639 |
self searchForSiblingProjects |
|
6640 |
bosch_dapasx_Application searchForSiblingProjects |
|
6641 |
stx_goodies_refactoryBrowser_changes searchForSiblingProjects |
|
6642 |
" |
|
6643 |
||
6644 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
6645 |
"Created: / 23-08-2006 / 15:06:12 / cg" |
|
6646 |
! |
|
6647 |
||
9664 | 6648 |
searchForSubProjects |
10132 | 6649 |
"answer all packages (package names), that are my subProjects" |
6650 |
||
9664 | 6651 |
|myPackage| |
6652 |
||
6653 |
myPackage := self package. |
|
19476 | 6654 |
^ Smalltalk allPackageIDs |
23124 | 6655 |
select:[:projectID | |
6656 |
projectID ~= PackageId noProjectID |
|
6657 |
and:[ (projectID asPackageId parentPackage) = myPackage ]]. |
|
13419 | 6658 |
|
6659 |
" |
|
6660 |
self searchForSubProjects |
|
9664 | 6661 |
bosch_dapasx_Application searchForSubProjects |
6662 |
stx_goodies_refactoryBrowser_changes searchForSubProjects |
|
6663 |
" |
|
6664 |
||
6665 |
"Created: / 07-08-2006 / 20:42:39 / fm" |
|
6666 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
10215 | 6667 |
"Modified: / 05-12-2006 / 18:04:27 / cg" |
9664 | 6668 |
! |
6669 |
||
6670 |
setupForType:typeOrNil |
|
9714 | 6671 |
typeOrNil = GUIApplicationType ifTrue:[ |
23124 | 6672 |
self compile: |
12425 | 6673 |
'isGUIApplication |
6674 |
"return true, if this is a GUI application. |
|
6675 |
(these need more libraries and use a different startup procedure)" |
|
6676 |
||
6677 |
^ true |
|
6678 |
' |
|
23124 | 6679 |
categorized:'description'. |
6680 |
self setSuperclass: ApplicationDefinition. |
|
6681 |
^ self |
|
9664 | 6682 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
6683 |
|
9714 | 6684 |
typeOrNil = NonGUIApplicationType ifTrue:[ |
23124 | 6685 |
self compile: |
12425 | 6686 |
'isGUIApplication |
6687 |
"return true, if this is a GUI application. |
|
6688 |
(these need more libraries and use a different startup procedure)" |
|
6689 |
||
6690 |
^ false |
|
6691 |
' |
|
23124 | 6692 |
categorized:'description'. |
6693 |
self setSuperclass: ApplicationDefinition. |
|
6694 |
^ self |
|
13419 | 6695 |
]. |
12856
1651184275a2
comment/format in: #setupForType:
Claus Gittinger <cg@exept.de>
parents:
12804
diff
changeset
|
6696 |
|
12349 | 6697 |
self theMetaclass removeSelector: #isGUIApplication. |
15070 | 6698 |
self setSuperclass: LibraryDefinition. |
9664 | 6699 |
^ self. |
6700 |
||
6701 |
"Created: / 23-08-2006 / 14:26:10 / cg" |
|
13411 | 6702 |
! |
6703 |
||
6704 |
shouldExcludeTest: test |
|
16257 | 6705 |
^ self excludedFromTestSuite contains:[:spec| |
23124 | 6706 |
(spec isSymbol and:[test class name == spec]) |
6707 |
or:[spec isArray and:[test class name == spec first and:[test selector == spec second]]] |
|
6708 |
]. |
|
13411 | 6709 |
|
6710 |
"Created: / 03-06-2011 / 17:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
18323 | 6711 |
! |
6712 |
||
6713 |
verbose:aBoolean |
|
6714 |
"enable/disable diagnostic output, which gives more detail on why package loading fails" |
|
6715 |
||
6716 |
Verbose := aBoolean |
|
6717 |
||
6718 |
" |
|
6719 |
self verbose:true |
|
6720 |
self verbose:false |
|
6721 |
" |
|
9536 | 6722 |
! ! |
6723 |
||
12210 | 6724 |
!ProjectDefinition class methodsFor:'private-extension handling'! |
6725 |
||
15057 | 6726 |
extensionOverwriteInfo |
6727 |
^ extensionOverwriteInfo |
|
6728 |
! |
|
6729 |
||
6730 |
fetchSlotsFrom:myFirstIncarnation |
|
6731 |
"this is invoked in a just loaded instance of myself, |
|
6732 |
to fetch the safe and extensionInfo from my first incarnation" |
|
6733 |
||
6734 |
safeForOverwrittenMethods := myFirstIncarnation safeForOverwrittenMethods. |
|
6735 |
extensionOverwriteInfo := myFirstIncarnation extensionOverwriteInfo. |
|
6736 |
! |
|
6737 |
||
12210 | 6738 |
hasSavedOverwrittenMethods |
6739 |
"true, if any of my methods was overwritten by another loaded package. |
|
6740 |
These methods are now in my safe" |
|
6741 |
||
12208
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
6742 |
^ safeForOverwrittenMethods notEmptyOrNil |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
6743 |
! |
0b65ddcb68f2
added: #hasSafedOverwrittenMethods
Michael Beyl <mb@exept.de>
parents:
12202
diff
changeset
|
6744 |
|
14984 | 6745 |
methodOverwrittenBy:anExtensionMethod |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6746 |
"return the (hidden) original method, which was located in another package |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6747 |
and which got overwritten by one of my extension methods. Nil if there is none." |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6748 |
|
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6749 |
|mclass selector oldPackage| |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6750 |
|
12218
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
6751 |
extensionOverwriteInfo isNil ifTrue:[^ nil]. |
a3662ecd1438
changed: #methodOverwrittenBy:
Claus Gittinger <cg@exept.de>
parents:
12213
diff
changeset
|
6752 |
|
14984 | 6753 |
mclass := anExtensionMethod mclass. |
6754 |
selector := anExtensionMethod selector. |
|
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6755 |
oldPackage := extensionOverwriteInfo at:(mclass name,'>>',selector) ifAbsent:nil. |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6756 |
oldPackage isNil ifTrue:[^ nil]. |
13419 | 6757 |
^ oldPackage asPackageId projectDefinitionClass |
23124 | 6758 |
savedOverwrittenMethodForClass:mclass selector:selector. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6759 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6760 |
|
12210 | 6761 |
rememberOverwrittenExtensionMethods |
6762 |
"before loading, tell other packages to keep a safe reference to any method |
|
23851 | 6763 |
which gets overloaded by me, and also remember here, whom I have overloaded. |
12210 | 6764 |
This allows for two things: |
23851 | 6765 |
a) correct fileout of the other base-package (for example, when checking in any of its class) |
6766 |
b) correct unloading of myself" |
|
12210 | 6767 |
|
6768 |
self extensionMethodNames pairWiseDo:[:className :selector | |
|
23851 | 6769 |
|class oldMethod oldPackage defClass| |
6770 |
||
6771 |
class := Smalltalk classNamed:className. |
|
6772 |
class notNil ifTrue:[ |
|
6773 |
oldMethod := class compiledMethodAt:selector. |
|
6774 |
]. |
|
6775 |
oldMethod notNil ifTrue:[ |
|
6776 |
oldPackage := oldMethod package. |
|
6777 |
oldPackage ~= PackageId noProjectID ifTrue:[ |
|
6778 |
defClass := oldPackage asPackageId projectDefinitionClass. |
|
6779 |
defClass notNil ifTrue:[ |
|
6780 |
defClass rememberOverwrittenMethod:oldMethod inClass:class. |
|
6781 |
extensionOverwriteInfo isNil ifTrue:[ |
|
6782 |
extensionOverwriteInfo := Dictionary new. |
|
6783 |
]. |
|
6784 |
extensionOverwriteInfo at:(className,'>>',selector) put:oldPackage. |
|
6785 |
] |
|
6786 |
]. |
|
6787 |
]. |
|
6788 |
]. |
|
6789 |
||
6790 |
"Modified (comment): / 07-03-2019 / 18:02:46 / Stefan Vogel" |
|
12210 | 6791 |
! |
6792 |
||
6793 |
rememberOverwrittenMethod:oldMethod inClass:aClass |
|
6794 |
"invoked from another projectDefinition, when that package is about to be loaded |
|
13419 | 6795 |
and about to overwrite one of my methods. |
6796 |
I will save the method locally, to allow for correct fileout of this class/project or |
|
12210 | 6797 |
to correctly reestablish my methods when the other package is unloaded later." |
6798 |
||
6799 |
|thisIsOneOfMyMethods selector| |
|
6800 |
||
6801 |
selector := oldMethod selector. |
|
6802 |
||
12293
983b9555f6e8
changed: #rememberOverwrittenMethod:inClass:
Claus Gittinger <cg@exept.de>
parents:
12286
diff
changeset
|
6803 |
thisIsOneOfMyMethods := (self classNames includes:aClass theNonMetaclass name) |
23124 | 6804 |
or:[ aClass isPrivate and:[ self classNames includes: aClass topOwningClass theNonMetaclass name ]]. |
12210 | 6805 |
thisIsOneOfMyMethods ifFalse:[ |
23124 | 6806 |
self extensionMethodNames pairWiseDo:[:extClassName :extSelector | |
6807 |
extClassName = aClass name ifTrue:[ |
|
6808 |
selector = extSelector ifTrue:[ |
|
6809 |
thisIsOneOfMyMethods := true |
|
6810 |
]. |
|
6811 |
]. |
|
6812 |
] |
|
12210 | 6813 |
]. |
6814 |
thisIsOneOfMyMethods ifFalse:[ |
|
23124 | 6815 |
"/ self error:'oops - this is not one of my methods' mayProceed:true. |
6816 |
Transcript showCR:self name,' [warning]:not one of my methods in rememberOverwritten'. |
|
6817 |
^ self |
|
12210 | 6818 |
]. |
6819 |
||
6820 |
safeForOverwrittenMethods isNil ifTrue:[ |
|
23124 | 6821 |
safeForOverwrittenMethods := Dictionary new. |
12210 | 6822 |
]. |
14984 | 6823 |
safeForOverwrittenMethods at:(aClass name,'>>',selector) put:oldMethod. |
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6824 |
! |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6825 |
|
12624 | 6826 |
restoreOverwrittenExtensionMethods |
23851 | 6827 |
<resource: #todo> |
21764 | 6828 |
"after unloading, tell other packages to restore any saved reference to any method |
14981 | 6829 |
which got overloaded by me. |
6830 |
Unfinished!!" |
|
12624 | 6831 |
|
16786 | 6832 |
extensionOverwriteInfo notEmptyOrNil ifTrue:[ |
23124 | 6833 |
self extensionMethodNames pairWiseDo:[:className :selector | |
6834 |
|class oldMethod oldPackage| |
|
6835 |
||
6836 |
oldPackage := extensionOverwriteInfo at:(className,'>>',selector). |
|
6837 |
oldPackage notNil ifTrue:[ |
|
6838 |
class := Smalltalk classNamed:className. |
|
6839 |
class notNil ifTrue:[ |
|
6840 |
oldMethod := oldPackage savedOverwrittenMethodForClass:class selector:selector. |
|
6841 |
oldMethod notNil ifTrue:[ |
|
6842 |
self breakPoint:#cg. |
|
6843 |
]. |
|
6844 |
] |
|
6845 |
]. |
|
6846 |
]. |
|
12624 | 6847 |
]. |
21764 | 6848 |
|
6849 |
"Modified (comment): / 18-05-2017 / 14:49:39 / mawalch" |
|
12624 | 6850 |
! |
6851 |
||
15057 | 6852 |
safeForOverwrittenMethods |
6853 |
^ safeForOverwrittenMethods |
|
6854 |
! |
|
6855 |
||
12213
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6856 |
savedOverwrittenMethodForClass:aClass selector:aSelector |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6857 |
"return one of my saved original methods" |
73371949b807
overwrittenExtensionMethods handling
Claus Gittinger <cg@exept.de>
parents:
12210
diff
changeset
|
6858 |
|
13692
2dffef08a4ac
changed: #savedOverwrittenMethodForClass:selector:
Stefan Vogel <sv@exept.de>
parents:
13689
diff
changeset
|
6859 |
safeForOverwrittenMethods isNil ifTrue:[^ nil]. |
12274 | 6860 |
^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil |
14981 | 6861 |
! |
6862 |
||
6863 |
savedOverwrittenMethods |
|
6864 |
"return my saved original methods" |
|
6865 |
||
6866 |
^ safeForOverwrittenMethods ? #() |
|
12210 | 6867 |
! ! |
6868 |
||
6869 |
!ProjectDefinition class methodsFor:'private-loading'! |
|
6870 |
||
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
6871 |
checkPrerequisitesForLoading |
14957 | 6872 |
"check if I can be loaded - i.e. if all classes to be extended are already loaded. |
6873 |
Raise an error if not" |
|
6874 |
||
12264 | 6875 |
|classesAlreadyWarned| |
6876 |
||
6877 |
classesAlreadyWarned := Set new. |
|
6878 |
||
13419 | 6879 |
self extensionMethodNames |
23124 | 6880 |
pairWiseDo:[:className :selector | |
6881 |
|class errMsg| |
|
6882 |
||
6883 |
class := Smalltalk classNamed:className. |
|
6884 |
class isNil ifTrue:[ |
|
6885 |
(classesAlreadyWarned includes:className) ifFalse:[ |
|
6886 |
(self classNames includes:className) ifTrue:[ |
|
6887 |
errMsg := 'extension for a class in myself: ',className. |
|
6888 |
] ifFalse:[ |
|
6889 |
errMsg := 'missing class for extension: ',className. |
|
6890 |
]. |
|
6891 |
Logger error:errMsg. |
|
6892 |
self proceedableError:errMsg. |
|
6893 |
classesAlreadyWarned add:className. |
|
6894 |
]. |
|
6895 |
]. |
|
6896 |
] |
|
12263
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
6897 |
|
c6d50824fbba
comment/format in: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12262
diff
changeset
|
6898 |
"/ todo: more needed here... |
12731 | 6899 |
|
6900 |
" |
|
6901 |
stx_libjavascript checkPrerequisitesForLoading |
|
6902 |
" |
|
23013 | 6903 |
|
6904 |
"Modified: / 24-05-2018 / 21:04:56 / Claus Gittinger" |
|
12262
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
6905 |
! |
24861bbf25fc
added: #checkPrerequisitesForLoading
Claus Gittinger <cg@exept.de>
parents:
12251
diff
changeset
|
6906 |
|
15760 | 6907 |
executeHooks: hookSymbol |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
6908 |
"Execute all hooks annotated by the given hook-symbol. |
15760 | 6909 |
Currently supported hooks are: #preLoad, #postLoad, #preUnload." |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6910 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6911 |
| cls | |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6912 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6913 |
cls := self. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6914 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6915 |
[ cls notNil ] whileTrue:[ |
23124 | 6916 |
cls class selectorsAndMethodsDo:[:selector :method| |
6917 |
(method annotationAt: hookSymbol) notNil ifTrue:[ |
|
6918 |
method numArgs == 0 ifTrue:[ |
|
6919 |
self perform: selector |
|
6920 |
] ifFalse:[ |
|
6921 |
self proceedableError:'Hook for %1 may not have arguments'. |
|
6922 |
] |
|
6923 |
] |
|
6924 |
]. |
|
6925 |
cls := cls superclass. |
|
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6926 |
]. |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6927 |
|
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6928 |
"Created: / 20-11-2012 / 23:00:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6929 |
"Modified: / 27-11-2012 / 16:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
23013 | 6930 |
"Modified: / 24-05-2018 / 21:05:03 / Claus Gittinger" |
14859
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6931 |
! |
1511cfd924cd
Merged ProjectDefinition fixes & tweaks required for stx:libjava and mercurial support.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14851
diff
changeset
|
6932 |
|
13614
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6933 |
loadAllAutoloadedClasses |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6934 |
self allClasses do:[:cls | cls autoload] |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6935 |
|
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6936 |
"Created: / 21-08-2011 / 17:24:13 / cg" |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6937 |
! |
5606bfa8cbec
added: #loadAllAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13610
diff
changeset
|
6938 |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6939 |
loadAllClassesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6940 |
"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
|
6941 |
install as autoloaded classes marked to be autoloaded. |
10401 | 6942 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
6943 |
||
6944 |
Answer true, if classes have been loaded" |
|
12028 | 6945 |
|
13411 | 6946 |
^self loadAllClassesAsAutoloaded:asAutoloaded languages: ProgrammingLanguage all |
6947 |
||
6948 |
"Created: / 17-08-2006 / 01:01:14 / cg" |
|
6949 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
6950 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
6951 |
"Modified: / 19-06-2010 / 11:37:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
6952 |
! |
|
6953 |
||
6954 |
loadAllClassesAsAutoloaded:asAutoloaded languages: langs |
|
6955 |
"load (fileIn) classes in given languages that should be present - |
|
6956 |
install as autoloaded classes marked to be autoloaded. |
|
6957 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
6958 |
langs should be collection of ProgrammingLanguage available in the system. |
|
6959 |
||
6960 |
Answer true, if classes have been loaded" |
|
6961 |
||
6962 |
|classNamesToLoad classNamesToAutoload classNamesToLangs hasClassesToLoad loadedClasses platformName |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6963 |
classesWhichFailedToLoad| |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6964 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6965 |
platformName := OperatingSystem platformName. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6966 |
classNamesToLoad := OrderedCollection new. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6967 |
classNamesToAutoload := OrderedCollection new. |
13411 | 6968 |
classNamesToLangs := Dictionary new. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6969 |
|
12315
71599fb91dcf
comment/format in: #packageDirectory
Claus Gittinger <cg@exept.de>
parents:
12314
diff
changeset
|
6970 |
hasClassesToLoad := false. |
13419 | 6971 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
23124 | 6972 |
|eachClassnameSym isAutoload clsLangAttr clsLang cls | |
6973 |
||
6974 |
eachClassnameSym := eachClassname asSymbol. |
|
6975 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
|
6976 |
clsLangAttr := eachAttributes detect:[:a| a isArray and: [a size == 2 and:[a first == #lang]]] ifNone:[nil]. |
|
6977 |
clsLang := clsLangAttr |
|
6978 |
ifNil:[SmalltalkLanguage instance] |
|
6979 |
ifNotNil:[ProgrammingLanguage named: clsLangAttr second ifNone:[nil]]. |
|
6980 |
classNamesToLangs at: eachClassname put: clsLang. |
|
6981 |
||
6982 |
"no need to (re-)load an existing class, but install if should be loaded" |
|
6983 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
|
6984 |
((cls isNil or:[cls isLoaded not and:[isAutoload not]]) and:[clsLang notNil and:[langs includes: clsLang]]) ifTrue:[ |
|
6985 |
(eachAttributes isEmpty |
|
6986 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
|
6987 |
or:[(eachAttributes includes:platformName) |
|
6988 |
or:[eachAttributes contains:[:a| a isArray]]]]) "/FIXME: Hack." |
|
6989 |
ifTrue:[ |
|
6990 |
hasClassesToLoad := true. |
|
6991 |
isAutoload ifTrue:[ |
|
6992 |
classNamesToAutoload add:eachClassnameSym. |
|
6993 |
] ifFalse:[ |
|
6994 |
classNamesToLoad add:eachClassnameSym. |
|
6995 |
]. |
|
6996 |
]. |
|
6997 |
]. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6998 |
]. |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
6999 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7000 |
hasClassesToLoad ifTrue:[ |
23124 | 7001 |
loadedClasses := OrderedCollection new. |
7002 |
||
7003 |
self packageDirectory isNil ifTrue:[ |
|
7004 |
classNamesToLoad notEmpty ifTrue:[ |
|
7005 |
"required classes are missing. |
|
7006 |
Autoloaded classes are considered as optional..." |
|
7007 |
self |
|
7008 |
error:(self name,'[error] cannot install because packageDirectory is unknown for missing classes: ', classNamesToLoad printString) |
|
7009 |
mayProceed:true. |
|
7010 |
^ false. |
|
7011 |
]. |
|
7012 |
(self name,'[info] cannot install autoloaded classes because packageDirectory is unknown') infoPrintCR. |
|
7013 |
^ true. |
|
7014 |
]. |
|
7015 |
||
7016 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
|
7017 |
of class name to file name" |
|
7018 |
||
7019 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
|
7020 |
||
7021 |
"install autoloaded classes first, |
|
7022 |
some others may depend on them" |
|
7023 |
||
7024 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
|
7025 |
ActivityNotification |
|
7026 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
|
7027 |
errorString: 'Autoloading class ', eachClassName. |
|
7028 |
||
7029 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName) . |
|
7030 |
]. |
|
7031 |
||
7032 |
classesWhichFailedToLoad := OrderedCollection new. |
|
7033 |
classNamesToLoad notEmpty ifTrue:[ |
|
7034 |
Verbose ifTrue:[ |
|
7035 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
|
7036 |
bindWith:self name with:classNamesToLoad size). |
|
7037 |
] |
|
7038 |
]. |
|
7039 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
|
7040 |
|cls| |
|
7041 |
ActivityNotification |
|
7042 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
|
7043 |
errorString: 'Loading class ', eachClassName. |
|
7044 |
||
7045 |
Error handle:[:ex | |
|
7046 |
"maybe, fileIn failed, because the load order is wrong. |
|
7047 |
Work around this by installing the class as autoloaded and |
|
7048 |
loading it" |
|
7049 |
||
7050 |
classesWhichFailedToLoad add:eachClassName. |
|
7051 |
self loadClass: eachClassName asAutoloaded: true language: (classNamesToLangs at: eachClassName). |
|
7052 |
] do:[ |
|
7053 |
Verbose ifTrue:[ |
|
7054 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
|
7055 |
]. |
|
7056 |
cls := self loadClass: eachClassName asAutoloaded: false language: (classNamesToLangs at: eachClassName). |
|
7057 |
cls notNil ifTrue:[ |
|
7058 |
loadedClasses add:cls |
|
7059 |
]. |
|
7060 |
]. |
|
7061 |
]. |
|
7062 |
||
7063 |
classesWhichFailedToLoad do:[:eachClassName | |
|
7064 |
(Smalltalk at:eachClassName) autoload. |
|
7065 |
]. |
|
7066 |
||
7067 |
loadedClasses do:[:eachLoadedClass | |
|
7068 |
"do not initialize, if initialize method is inherited" |
|
7069 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
|
7070 |
eachLoadedClass initialize |
|
7071 |
]. |
|
7072 |
]. |
|
7073 |
^ true. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7074 |
]. |
10401 | 7075 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7076 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7077 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
12028 | 7078 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
13411 | 7079 |
"Created: / 19-06-2010 / 11:35:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
7080 |
"Modified: / 19-06-2010 / 15:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
7081 |
! |
|
7082 |
||
7083 |
loadClass: className asAutoloaded: asAutoloaded language: lang |
|
13592 | 7084 |
| packageDir classFile entry category numClassInstVars cls| |
7085 |
||
7086 |
"Handle smalltalk classes specially to provide backward compatibility" |
|
13411 | 7087 |
lang isSmalltalk ifTrue:[ |
23124 | 7088 |
entry := self abbrevs at: className ifAbsent:[nil]. |
7089 |
||
7090 |
asAutoloaded ifTrue:[ |
|
7091 |
category := entry isNil ifTrue:[#autoloaded] ifFalse:[entry category]. |
|
7092 |
numClassInstVars := entry isNil ifTrue:[0] ifFalse:[entry numClassInstVars]. |
|
7093 |
cls := Smalltalk |
|
7094 |
installAutoloadedClassNamed: className |
|
7095 |
category: category |
|
7096 |
package: self package |
|
7097 |
revision: nil |
|
7098 |
numClassInstVars:numClassInstVars. |
|
7099 |
entry notNil ifTrue:[ |
|
7100 |
cls setClassFilename:(entry fileName,'.st'). |
|
7101 |
]. |
|
7102 |
^ cls. |
|
7103 |
]. |
|
7104 |
^ Smalltalk |
|
7105 |
fileInClass:className |
|
7106 |
package:self package |
|
7107 |
initialize:false |
|
7108 |
lazy:false |
|
7109 |
silent:true |
|
13411 | 7110 |
]. |
7111 |
||
7112 |
"For non-smalltalk language do" |
|
7113 |
asAutoloaded ifTrue:[^self error:'Only Smalltalk classes may be autoloaded (yet)']. |
|
7114 |
||
7115 |
packageDir := self packageDirectory asFilename. |
|
7116 |
classFile := packageDir / ((Smalltalk fileNameForClass: className) , '.' , lang sourceFileSuffix). |
|
7117 |
classFile exists ifFalse:[^nil]. |
|
7118 |
lang fileIn: classFile. |
|
7119 |
^nil "FIXME: should return the class" |
|
7120 |
||
7121 |
"Created: / 19-06-2010 / 09:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
7122 |
"Modified: / 06-03-2011 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13592 | 7123 |
"Modified: / 18-08-2011 / 14:22:15 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7124 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7125 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7126 |
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
|
7127 |
"try to load a binary class library |
16146 | 7128 |
Return true if ok, raise an exception if not." |
10430
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
7129 |
|
12295 | 7130 |
|libraryName| |
10430
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
7131 |
|
16894 | 7132 |
self supportedOnPlatform ifFalse:[^ false]. |
7133 |
||
10430
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
7134 |
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
|
7135 |
|
fc34b59eca00
Don not try to load a class library already linked to the executable
Stefan Vogel <sv@exept.de>
parents:
10426
diff
changeset
|
7136 |
(Smalltalk isClassLibraryLoaded:libraryName) ifTrue:[ |
23124 | 7137 |
"already loaded" |
7138 |
^ true |
|
13419 | 7139 |
]. |
14021 | 7140 |
Verbose ifTrue:[ |
23124 | 7141 |
Transcript showCR:(' %1: loading classLibrary...' bindWith:self name). |
13419 | 7142 |
]. |
12743 | 7143 |
self activityNotification:'Loading classLibrary'. |
7144 |
||
12295 | 7145 |
^ 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
|
7146 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7147 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7148 |
loadExtensions |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7149 |
"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
|
7150 |
|
16894 | 7151 |
self supportedOnPlatform ifFalse:[^ false]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7152 |
self hasAllExtensionsLoaded ifFalse:[ |
23124 | 7153 |
self breakPoint:#cg. |
7154 |
Verbose ifTrue:[ |
|
7155 |
Transcript showCR:(' %1: filing in extensions...' bindWith:self name). |
|
7156 |
]. |
|
7157 |
Smalltalk loadExtensionsForPackage:self package. |
|
7158 |
^ true. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7159 |
]. |
10401 | 7160 |
^ false. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7161 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7162 |
"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
|
7163 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7164 |
|
15950 | 7165 |
loadExtensionsForLanguage: lang |
7166 |
"load extension methods for given programming language" |
|
7167 |
||
7168 |
| filename file | |
|
16894 | 7169 |
|
7170 |
self supportedOnPlatform ifFalse:[^ self]. |
|
7171 |
||
15950 | 7172 |
filename := 'extensions.' , lang sourceFileSuffix. |
7173 |
file := self packageDirectory / filename. |
|
7174 |
file exists ifTrue:[ |
|
23124 | 7175 |
lang fileIn: file. |
15950 | 7176 |
] |
7177 |
||
7178 |
"Created: / 17-08-2006 / 00:21:39 / cg" |
|
7179 |
"Created: / 25-11-2011 / 18:13:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
7180 |
! |
|
7181 |
||
15372 | 7182 |
loadMandatoryPreRequisitesAsAutoloaded:asAutoloaded |
7183 |
"load those packages which are required for loading. |
|
7184 |
Called after my definition has been loaded, but before the rest of the |
|
7185 |
package is." |
|
7186 |
||
7187 |
|prereq| |
|
7188 |
||
23681 | 7189 |
self supportedOnPlatform ifFalse:[^ self]. |
22186 | 7190 |
|
7191 |
prereq := self effectiveMandatoryPreRequisites. |
|
15372 | 7192 |
prereq notEmpty ifTrue:[ |
23681 | 7193 |
Verbose ifTrue:[ |
7194 |
Transcript showCR:(' %1 loading mandatory prerequisites...' bindWith:self name). |
|
7195 |
]. |
|
7196 |
self loadPackages:prereq asAutoloaded:asAutoloaded |
|
7197 |
]. |
|
7198 |
||
7199 |
"Modified (format): / 07-02-2019 / 14:23:00 / Claus Gittinger" |
|
15372 | 7200 |
! |
7201 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7202 |
loadPackages:aListOfPackages asAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7203 |
"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
|
7204 |
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
|
7205 |
|
14764
2497dc2ff1ab
tuned prereq-package loading
Claus Gittinger <cg@exept.de>
parents:
14748
diff
changeset
|
7206 |
Class withoutUpdatingChangesDo:[ |
23124 | 7207 |
aListOfPackages do:[:eachPackageID | |
7208 |
|cls| |
|
7209 |
||
7210 |
cls := self definitionClassForPackage:eachPackageID. |
|
7211 |
(cls isNil or:[cls isLoaded not or:[cls projectIsLoaded not]]) ifTrue:[ |
|
7212 |
Smalltalk loadPackage:eachPackageID asAutoloaded:asAutoloaded. |
|
7213 |
]. |
|
7214 |
]. |
|
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7215 |
]. |
13166
aa93e348e5d3
changed: #loadPackages:asAutoloaded:
Claus Gittinger <cg@exept.de>
parents:
13154
diff
changeset
|
7216 |
|
13167 | 7217 |
"Modified: / 09-12-2010 / 12:36:17 / cg" |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7218 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7219 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7220 |
loadPreRequisitesAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7221 |
"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
|
7222 |
|
12743 | 7223 |
|prereq| |
7224 |
||
7225 |
prereq := self effectivePreRequisites. |
|
14843 | 7226 |
prereq notEmpty ifTrue:[ |
23124 | 7227 |
Verbose ifTrue:[ |
7228 |
Transcript showCR:(' %1 loading prerequisites...' bindWith:self name). |
|
7229 |
]. |
|
7230 |
self loadPackages:prereq asAutoloaded:asAutoloaded |
|
12743 | 7231 |
]. |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7232 |
! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7233 |
|
12596 | 7234 |
loadSubProjects |
7235 |
"load other packages (at least the projectDefinitions and their extensions)" |
|
7236 |
||
7237 |
self loadSubProjectsAsAutoloaded:false. |
|
15395 | 7238 |
self effectiveSubProjects do:[:p | |
23124 | 7239 |
|subDef| |
7240 |
||
7241 |
subDef := self definitionClassForPackage:p. |
|
7242 |
subDef notNil ifTrue:[ |
|
7243 |
subDef loadSubProjects |
|
7244 |
]. |
|
12596 | 7245 |
]. |
7246 |
! |
|
7247 |
||
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7248 |
loadSubProjectsAsAutoloaded:asAutoloaded |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7249 |
"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
|
7250 |
|
15395 | 7251 |
self loadPackages:(self effectiveSubProjects) asAutoloaded:asAutoloaded |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7252 |
|
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7253 |
"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
|
7254 |
! |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7255 |
|
13411 | 7256 |
old_loadAllClassesAsAutoloaded:asAutoloaded |
7257 |
"load (fileIn) classes that should be present - |
|
7258 |
install as autoloaded classes marked to be autoloaded. |
|
7259 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked. |
|
7260 |
||
7261 |
Answer true, if classes have been loaded" |
|
7262 |
||
7263 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName |
|
7264 |
classesWhichFailedToLoad| |
|
7265 |
||
7266 |
platformName := OperatingSystem platformName. |
|
7267 |
classNamesToLoad := OrderedCollection new. |
|
7268 |
classNamesToAutoload := OrderedCollection new. |
|
7269 |
||
7270 |
hasClassesToLoad := false. |
|
13419 | 7271 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |
23124 | 7272 |
|eachClassnameSym isAutoload cls| |
7273 |
||
7274 |
eachClassnameSym := eachClassname asSymbol. |
|
7275 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload]. |
|
7276 |
||
7277 |
"no need to (re-)load an existing class, but install if should be loaded" |
|
7278 |
cls := Smalltalk loadedClassNamed:eachClassnameSym. |
|
7279 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[ |
|
7280 |
(eachAttributes isEmpty |
|
7281 |
or:[(eachAttributes size == 1 and:[isAutoload]) |
|
7282 |
or:[eachAttributes includes:platformName]]) ifTrue:[ |
|
7283 |
hasClassesToLoad := true. |
|
7284 |
isAutoload ifTrue:[ |
|
7285 |
classNamesToAutoload add:eachClassnameSym. |
|
7286 |
] ifFalse:[ |
|
7287 |
classNamesToLoad add:eachClassnameSym. |
|
7288 |
]. |
|
7289 |
]. |
|
7290 |
]. |
|
13411 | 7291 |
]. |
7292 |
||
7293 |
hasClassesToLoad ifTrue:[ |
|
23124 | 7294 |
loadedClasses := OrderedCollection new. |
7295 |
||
7296 |
self packageDirectory isNil ifTrue:[ |
|
7297 |
self |
|
7298 |
error:(self name,'[error] cannot install because packageDirectory is unknown') |
|
7299 |
mayProceed:true. |
|
7300 |
^ false. |
|
7301 |
]. |
|
7302 |
||
7303 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping |
|
7304 |
of class name to file name" |
|
7305 |
||
7306 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1. |
|
7307 |
||
7308 |
"install autoloaded classes first, |
|
7309 |
some others may depend on them" |
|
7310 |
||
7311 |
classNamesToAutoload withIndexDo:[:eachClassName :index| |
|
7312 |
ActivityNotification |
|
7313 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded |
|
7314 |
errorString: 'Autoloading class ', eachClassName. |
|
7315 |
||
7316 |
Smalltalk |
|
7317 |
installAutoloadedClassNamed:eachClassName |
|
7318 |
category:#autoloaded "FIXME" |
|
7319 |
package:self package |
|
7320 |
revision:nil |
|
7321 |
numClassInstVars:0. "FIXME" |
|
7322 |
]. |
|
7323 |
||
7324 |
classesWhichFailedToLoad := OrderedCollection new. |
|
7325 |
classNamesToLoad notEmpty ifTrue:[ |
|
7326 |
Verbose ifTrue:[ |
|
7327 |
Transcript showCR:(' %1: filing in missing classes (%2) individually...' |
|
7328 |
bindWith:self name with:classNamesToLoad size). |
|
7329 |
] |
|
7330 |
]. |
|
7331 |
classNamesToLoad withIndexDo:[:eachClassName :index| |
|
7332 |
|cls| |
|
7333 |
ActivityNotification |
|
7334 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded |
|
7335 |
errorString: 'Loading class ', eachClassName. |
|
7336 |
||
7337 |
Error handle:[:ex | |
|
7338 |
"maybe, fileIn failed, because the load order is wrong. |
|
7339 |
Work around this by installing the class as autoloaded and |
|
7340 |
loading it" |
|
7341 |
||
7342 |
classesWhichFailedToLoad add:eachClassName. |
|
7343 |
Smalltalk |
|
7344 |
installAutoloadedClassNamed:eachClassName |
|
7345 |
category:#autoloaded "FIXME" |
|
7346 |
package:self package |
|
7347 |
revision:nil |
|
7348 |
numClassInstVars:0. "FIXME" |
|
7349 |
] do:[ |
|
7350 |
Verbose ifTrue:[ |
|
7351 |
Transcript showCR:(' %1: filing in %2...' bindWith:self name with:eachClassName). |
|
7352 |
]. |
|
7353 |
cls := Smalltalk |
|
7354 |
fileInClass:eachClassName |
|
7355 |
package:self package |
|
7356 |
initialize:false |
|
7357 |
lazy:false |
|
7358 |
silent:true. |
|
7359 |
cls notNil ifTrue:[ |
|
7360 |
loadedClasses add:cls |
|
7361 |
]. |
|
7362 |
]. |
|
7363 |
]. |
|
7364 |
||
7365 |
classesWhichFailedToLoad do:[:eachClassName | |
|
7366 |
(Smalltalk at:eachClassName) autoload. |
|
7367 |
]. |
|
7368 |
||
7369 |
loadedClasses do:[:eachLoadedClass | |
|
7370 |
"do not initialize, if initialize method is inherited" |
|
7371 |
(eachLoadedClass theMetaclass includesSelector:#initialize) ifTrue:[ |
|
7372 |
eachLoadedClass initialize |
|
7373 |
]. |
|
7374 |
]. |
|
7375 |
^ true. |
|
13411 | 7376 |
]. |
7377 |
^ false. |
|
7378 |
||
7379 |
"Modified: / 26-10-2006 / 12:30:01 / cg" |
|
7380 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
7381 |
"Created: / 19-06-2010 / 11:36:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
7382 |
! |
|
7383 |
||
12624 | 7384 |
unloadAllClasses |
20605 | 7385 |
Logger warning:'unloading not yet fully supported' |
12624 | 7386 |
! |
7387 |
||
7388 |
unloadClassLibrary |
|
20604 | 7389 |
Logger warning:'unloading not yet fully supported' |
12624 | 7390 |
! |
7391 |
||
7392 |
unloadSubProjects |
|
7393 |
"unload other packages" |
|
7394 |
||
15395 | 7395 |
self effectiveSubProjects do:[:p | |
23124 | 7396 |
|subDef| |
7397 |
||
7398 |
subDef := self definitionClassForPackage:p. |
|
7399 |
subDef notNil ifTrue:[ |
|
7400 |
subDef unloadSubProjects. |
|
7401 |
subDef unloadPackage. |
|
7402 |
]. |
|
12624 | 7403 |
]. |
7404 |
! |
|
7405 |
||
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7406 |
update:anAspectSymbol with:argument from:changedObject |
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7407 |
"when any of my class methods is changed, we mark the project as unloaded. |
12926
620ef12f673c
comment/format in: #update:with:from:
Stefan Vogel <sv@exept.de>
parents:
12856
diff
changeset
|
7408 |
May be some more classes have to be loaded" |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7409 |
|
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7410 |
(changedObject == self class and:[anAspectSymbol == #methodDictionary]) ifTrue:[ |
23124 | 7411 |
self projectIsLoaded:false. |
10434
25f76184bf81
project definition change marks project as unloaded
Stefan Vogel <sv@exept.de>
parents:
10433
diff
changeset
|
7412 |
] |
10399
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7413 |
! ! |
6c16947a05ca
Allow to load all classes of a project as autoloaded
Stefan Vogel <sv@exept.de>
parents:
10397
diff
changeset
|
7414 |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7415 |
!ProjectDefinition class methodsFor:'private-prerequisites'! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7416 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7417 |
addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons |
12371 | 7418 |
"helper for searchForPreRequisites" |
7419 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7420 |
aSetOfClasses |
23124 | 7421 |
do:[:aClass | |
7422 |
self |
|
7423 |
addReferencesToClassesFromGlobalsInMethods: |
|
7424 |
(aClass theNonMetaclass methodDictionary values |
|
7425 |
reject:[:m | m isExtension]) |
|
7426 |
to:usedClassReasons. |
|
7427 |
||
7428 |
self |
|
7429 |
addReferencesToClassesFromGlobalsInMethods: |
|
7430 |
(aClass theMetaclass methodDictionary values |
|
7431 |
reject:[:m | m isExtension]) |
|
7432 |
to:usedClassReasons. |
|
7433 |
]. |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7434 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7435 |
"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
|
7436 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7437 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7438 |
addReferencesToClassesFromGlobalsInMethods:someMethods to:usedClassReasons |
12371 | 7439 |
"helper for searchForPreRequisites" |
7440 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7441 |
someMethods do:[:method | |
23124 | 7442 |
|resources| |
7443 |
||
7444 |
resources := method resources. |
|
7445 |
(resources isNil |
|
7446 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
7447 |
and:[(resources includesKey:#'example') not])]) |
|
7448 |
ifTrue:[ |
|
7449 |
method usedGlobals |
|
7450 |
do:[:global | |
|
7451 |
|globalsName usedClass| |
|
7452 |
||
7453 |
globalsName := global asSymbol. |
|
7454 |
usedClass := Smalltalk at:globalsName. |
|
7455 |
(usedClass notNil and:[usedClass isClass and:[usedClass isNameSpace not]]) ifTrue:[ |
|
7456 |
usedClass name == globalsName ifTrue:[ "/ skip aliases |
|
7457 |
(usedClassReasons at:usedClass ifAbsentPut:[Set new]) |
|
7458 |
add:(usedClass name, ' - referenced by ', method mclass name,'>>',method selector) |
|
7459 |
] |
|
7460 |
] |
|
7461 |
] |
|
7462 |
] |
|
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7463 |
] |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7464 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7465 |
"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
|
7466 |
"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
|
7467 |
! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7468 |
|
15066 | 7469 |
addReferencesToExtensionMethodsIn:someClasses to:usedMethodReasons |
7470 |
"helper for searchForPreRequisites: search for sends of a selector which |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7471 |
is defined in an extension method (in the set of passed-in methods). |
15066 | 7472 |
If found, add the extension method and a reason string to usedReasons. |
7473 |
This should find especially sends to extension methods from libcompat." |
|
7474 |
||
16257 | 7475 |
|allRealExtensions| |
7476 |
||
15066 | 7477 |
"/ only care for methods which are not already implemented in an extension methods's superclass |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7478 |
allRealExtensions := Smalltalk allExtensions |
23124 | 7479 |
select:[:mthd | |
7480 |
|superClass| |
|
7481 |
superClass := mthd mclass superclass. |
|
7482 |
(superClass isNil or:[superClass whichClassIncludesSelector:mthd selector]) isNil |
|
7483 |
]. |
|
15066 | 7484 |
|
7485 |
someClasses do:[:eachClass | |
|
23124 | 7486 |
eachClass instAndClassMethodsDo:[:method | |
7487 |
|resources extensionsSent| |
|
7488 |
||
7489 |
resources := method resources. |
|
7490 |
(resources isNil |
|
7491 |
or:[ ((resources includesKey:#'ignoreInPrerequisites') not |
|
7492 |
and:[(resources includesKey:#'example') not])]) |
|
7493 |
ifTrue:[ |
|
7494 |
extensionsSent := allRealExtensions select:[:ext | method messagesSent includes:ext selector]. |
|
7495 |
extensionsSent do:[:eachExtensionMethod | |
|
7496 |
(usedMethodReasons at:eachExtensionMethod ifAbsentPut:[Set new]) |
|
7497 |
add:(eachExtensionMethod selector, ' - sent by ', method mclass name,'>>',method selector) |
|
7498 |
] |
|
7499 |
] |
|
7500 |
] |
|
15066 | 7501 |
] |
7502 |
! |
|
7503 |
||
19955 | 7504 |
allMandatoryPreRequisites |
7505 |
"answer all (recursive) mandatory prerequisite project ids of myself - in random order." |
|
7506 |
||
7507 |
^ self allPreRequisites:#effectiveMandatoryPreRequisites. |
|
7508 |
||
7509 |
" |
|
23124 | 7510 |
stx_libbasic allMandatoryPreRequisites |
19955 | 7511 |
stx_libbasic2 allMandatoryPreRequisites |
23124 | 7512 |
stx_libview2 allMandatoryPreRequisites |
7513 |
stx_libcomp allMandatoryPreRequisites |
|
19955 | 7514 |
" |
7515 |
||
7516 |
"Created: / 06-06-2016 / 12:19:39 / cg" |
|
7517 |
! |
|
7518 |
||
7519 |
allMandatoryPreRequisitesSorted |
|
7520 |
[ |
|
23124 | 7521 |
^ self allPreRequisitesSorted:#effectiveMandatoryPreRequisites |
19955 | 7522 |
] on:Error do:[:ex | |
23124 | 7523 |
(self confirm:(self name,' [warning]: cycle in prerequisites:' ,, Character cr, ' ', (ex parameter printStringWithSeparator:' -> ') ,, Character cr, 'Proceed with incomplete (mandatory) prerequites?')) |
7524 |
ifFalse:[ |
|
7525 |
AbortOperationRequest raise |
|
7526 |
]. |
|
7527 |
^ self allPreRequisitesSorted:#mandatoryPreRequisites |
|
19955 | 7528 |
]. |
7529 |
||
7530 |
"Created: / 06-06-2016 / 12:20:40 / cg" |
|
7531 |
! |
|
7532 |
||
14843 | 7533 |
allPreRequisites |
7534 |
"answer all (recursive) prerequisite project ids of myself - in random order." |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7535 |
|
14885 | 7536 |
^ self allPreRequisites:#effectivePreRequisites. |
14843 | 7537 |
|
7538 |
" |
|
7539 |
stx_libbasic allPreRequisites |
|
7540 |
stx_libbasic2 allPreRequisites |
|
7541 |
stx_libview2 allPreRequisites |
|
7542 |
ubs_application allPreRequisites |
|
7543 |
ubs_application allPreRequisitesSorted |
|
7544 |
exept_expecco_application allPreRequisites |
|
7545 |
exept_expeccoNET_application allPreRequisites |
|
7546 |
alspa_batch_application allPreRequisites" |
|
7547 |
"Modified: / 13-04-2011 / 15:30:45 / sr" |
|
7548 |
"Modified (comment): / 06-09-2011 / 08:26:06 / cg" |
|
7549 |
! |
|
7550 |
||
14882 | 7551 |
allPreRequisites:aSelector |
7552 |
"answer all (recursive) prerequisite project ids of myself - in random order." |
|
7553 |
||
7554 |
|result| |
|
7555 |
||
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7556 |
result := self |
23124 | 7557 |
allPreRequisites:aSelector withParentDo:[:parent :prereq | |
7558 |
prereq = self package ifTrue:[ |
|
7559 |
Transcript showCR:('oops: %1 depends on itself' bindWith:prereq) |
|
7560 |
]. |
|
7561 |
]. |
|
14882 | 7562 |
result remove:self package ifAbsent:[]. |
7563 |
^ result. |
|
7564 |
||
7565 |
" |
|
7566 |
stx_libbasic allPreRequisites |
|
7567 |
stx_libbasic2 allPreRequisites |
|
7568 |
stx_libview2 allPreRequisites |
|
7569 |
ubs_application allPreRequisites |
|
7570 |
ubs_application allPreRequisitesSorted |
|
7571 |
exept_expecco_application allPreRequisites |
|
7572 |
exept_expeccoNET_application allPreRequisites |
|
7573 |
alspa_batch_application allPreRequisites" |
|
7574 |
"Modified: / 13-04-2011 / 15:30:45 / sr" |
|
7575 |
"Modified (comment): / 06-09-2011 / 08:26:06 / cg" |
|
7576 |
! |
|
7577 |
||
7578 |
allPreRequisites:aSelector withParentDo:aBlock |
|
7579 |
"answer all (recursive) prerequisite project ids of myself - in random order. |
|
7580 |
If we exclude a project, but one of our prerequisite projects depends on it, |
|
7581 |
then what ????" |
|
7582 |
||
7583 |
|setOfAllPreRequisites toAdd| |
|
7584 |
||
7585 |
setOfAllPreRequisites := Set new. |
|
7586 |
toAdd := Set withAll:(self perform:aSelector). |
|
7587 |
||
7588 |
"is a subproject really a prerequisite?? |
|
7589 |
No, it works the other way: parent projects are prerequisites of sub projects, |
|
7590 |
so the following line has been deleted. |
|
7591 |
Unfortunately the meaning of 'subproject' has never been well defined. SV." |
|
7592 |
"/ toAdd addAll:self effectiveSubProjects. |
|
7593 |
||
7594 |
[toAdd notEmpty] whileTrue:[ |
|
23124 | 7595 |
|aPreRequisiteProjectID def| |
7596 |
||
7597 |
aPreRequisiteProjectID := toAdd removeFirst. |
|
7598 |
(setOfAllPreRequisites includes:aPreRequisiteProjectID) ifFalse:[ |
|
7599 |
setOfAllPreRequisites add:aPreRequisiteProjectID. |
|
7600 |
||
7601 |
def := self definitionClassForPackage:aPreRequisiteProjectID. |
|
7602 |
def isNil ifTrue:[ |
|
7603 |
Transcript showCR:'ProjectDefinition ', aPreRequisiteProjectID, ' is missing - cannot find its preRequisites.'. |
|
7604 |
] ifFalse:[ |
|
7605 |
(def perform:aSelector) |
|
7606 |
select:[:eachSubPreRequisite | (setOfAllPreRequisites includes:eachSubPreRequisite) not] |
|
7607 |
thenDo:[:eachSubPreRequisite | |
|
7608 |
Verbose == true ifTrue:[ |
|
7609 |
Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' requires ', eachSubPreRequisite). |
|
7610 |
]. |
|
7611 |
aBlock value:def value:eachSubPreRequisite. |
|
7612 |
toAdd add:eachSubPreRequisite |
|
7613 |
]. |
|
7614 |
||
7615 |
"but subprojects of our prerequisites are also prerequisites" |
|
14994 | 7616 |
"/ SV: - I don't think so. Either we need them, because they have classes being superclasses |
19587 | 7617 |
"/ or referenced. Or we include the explicitly. In both cases we do not need this code. |
14994 | 7618 |
"/ But we do not want them only because there is a subProject with examples or tests!! |
7619 |
||
7620 |
"/ def effectiveSubProjects |
|
7621 |
"/ select:[:eachSubSubRequisite | eachSubSubRequisite ~= self package and:[ (setOfAllPreRequisites includes:eachSubSubRequisite) not ]] |
|
7622 |
"/ thenDo:[:eachSubSubRequisite | |
|
7623 |
"/ Verbose == true ifTrue:[ |
|
7624 |
"/ Transcript show:'ProjectDefinition preRequisites: '; showCR:(aPreRequisiteProjectID, ' hasSub ', eachSubSubRequisite). |
|
7625 |
"/ ]. |
|
7626 |
"/ aBlock value:def value:eachSubSubRequisite. |
|
7627 |
"/ toAdd add:eachSubSubRequisite |
|
7628 |
"/ ]. |
|
23124 | 7629 |
]. |
7630 |
] |
|
14882 | 7631 |
]. |
7632 |
^ setOfAllPreRequisites. |
|
7633 |
||
7634 |
" |
|
7635 |
stx_libbasic allPreRequisites |
|
7636 |
stx_libbasic2 allPreRequisites |
|
7637 |
stx_libview2 allPreRequisites |
|
7638 |
ubs_application allPreRequisites |
|
7639 |
ubs_application allPreRequisitesSorted |
|
7640 |
exept_expecco_application allPreRequisites |
|
7641 |
exept_expeccoNET_application allPreRequisites |
|
7642 |
alspa_batch_application allPreRequisites |
|
7643 |
" |
|
7644 |
||
7645 |
"Created: / 13-04-2011 / 15:23:21 / sr" |
|
7646 |
"Modified: / 20-07-2012 / 18:29:31 / cg" |
|
7647 |
! |
|
7648 |
||
14843 | 7649 |
allPreRequisitesSorted |
18178 | 7650 |
[ |
23124 | 7651 |
^ self allPreRequisitesSorted:#effectivePreRequisites |
18178 | 7652 |
] on:Error do:[:ex | |
23124 | 7653 |
(self confirm:(self name,' [warning]: cycle in prerequisites:' ,, Character cr, ' ', (ex parameter printStringWithSeparator:' -> ') ,, Character cr, 'Proceed with incomplete (only mandatory) prerequites?')) |
7654 |
ifFalse:[ |
|
7655 |
AbortOperationRequest raise |
|
7656 |
]. |
|
7657 |
^ self allPreRequisitesSorted:#mandatoryPreRequisites |
|
18178 | 7658 |
]. |
21509 | 7659 |
|
7660 |
"Modified: / 21-02-2017 / 17:53:35 / cg" |
|
14843 | 7661 |
! |
7662 |
||
14882 | 7663 |
allPreRequisitesSorted:aSelector |
7664 |
"answer all the prerequisites of this projects sorted in |
|
7665 |
the order they are needed. |
|
7666 |
Use this to e.g. compile packages in the dependency order" |
|
7667 |
||
7668 |
|allPreRequisites orderedTuples sortedPackages| |
|
7669 |
||
7670 |
orderedTuples := OrderedCollection new. |
|
7671 |
allPreRequisites := self allPreRequisites:aSelector. |
|
16540
12807abd853b
Use stable topological sort when sorting prerequisites.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16328
diff
changeset
|
7672 |
allPreRequisites := allPreRequisites collect:[ :e | e asString ]. |
14882 | 7673 |
|
7674 |
"/JV@2013-03-13: Added asSortedCollection to make the order of packages |
|
7675 |
"/as stable as possible. Makes merging of makefiles a lot easier. |
|
7676 |
allPreRequisites asSortedCollection do:[:eachPackageID | |
|
23124 | 7677 |
|def preRequisites| |
7678 |
||
7679 |
self assert:(eachPackageID ~= self package). |
|
7680 |
orderedTuples add:(Array with:eachPackageID with:self package). |
|
7681 |
||
7682 |
def := self definitionClassForPackage:eachPackageID. |
|
7683 |
def isNil ifTrue:[ |
|
7684 |
Transcript showCR:'Warning: no definition class for package: ', eachPackageID. |
|
7685 |
((self searchForPreRequisites: eachPackageID) |
|
7686 |
fold:[:d1 :d2| d1 addAll:d2; yourself]) keys |
|
7687 |
] ifFalse:[ |
|
7688 |
preRequisites := def perform:aSelector. |
|
7689 |
preRequisites := preRequisites copyWithoutAll:def excludedFromPreRequisites. |
|
7690 |
preRequisites do:[:eachPrerequisitePackageID| |
|
7691 |
self assert:(eachPrerequisitePackageID ~= eachPackageID). |
|
7692 |
orderedTuples add:(Array with:eachPrerequisitePackageID with:eachPackageID). |
|
7693 |
]. |
|
7694 |
]. |
|
14882 | 7695 |
]. |
7696 |
||
16812 | 7697 |
(orderedTuples contains:[:el | el first = el second]) ifTrue:[ |
23124 | 7698 |
self halt:'something seems to depend upon itself' |
14882 | 7699 |
]. |
16540
12807abd853b
Use stable topological sort when sorting prerequisites.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16328
diff
changeset
|
7700 |
sortedPackages := orderedTuples topologicalSortStable: true. |
14882 | 7701 |
|
7702 |
"packages which only result from extension methods are used for computing the sort order, |
|
7703 |
but they are not added, if not present in the first place" |
|
7704 |
^ sortedPackages select:[:eachProject| allPreRequisites includes:eachProject] |
|
7705 |
||
7706 |
" |
|
7707 |
stx_libbasic allPreRequisitesSorted |
|
7708 |
stx_libbasic2 allPreRequisitesSorted |
|
7709 |
stx_libwidg2 allPreRequisitesSorted |
|
7710 |
exept_expecco allPreRequisitesSorted |
|
7711 |
alspa_batch_application allPreRequisitesSorted |
|
7712 |
ubs_application allPreRequisitesSorted |
|
7713 |
" |
|
7714 |
||
7715 |
"Modified: / 13-04-2011 / 15:19:13 / sr" |
|
16540
12807abd853b
Use stable topological sort when sorting prerequisites.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16328
diff
changeset
|
7716 |
"Modified: / 05-06-2014 / 12:22:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14882 | 7717 |
! |
7718 |
||
19955 | 7719 |
allPreRequisitesWithMandatorySorted |
7720 |
"a list of all prerequisites (mandatory and non-mandatory, |
|
7721 |
with the mandatory ones coming first and being sorted by dependency" |
|
7722 |
||
7723 |
|pre mandatory| |
|
7724 |
||
7725 |
mandatory := self allMandatoryPreRequisitesSorted. |
|
7726 |
pre := OrderedSet withAll:mandatory. |
|
7727 |
self allPreRequisites do:[:each | |
|
23124 | 7728 |
(mandatory includes:each) ifFalse:[ pre add: each ] |
19955 | 7729 |
]. |
7730 |
^ pre |
|
7731 |
||
7732 |
"Created: / 06-06-2016 / 14:30:25 / cg" |
|
7733 |
! |
|
7734 |
||
14882 | 7735 |
allReferences |
7736 |
"answer all (recursive) projects to which I refer - in random order." |
|
7737 |
||
7738 |
|result| |
|
7739 |
||
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7740 |
result := self |
23124 | 7741 |
allPreRequisites:#referencedPreRequisites withParentDo:[:parent :prereq | |
7742 |
prereq = self package ifTrue:[ |
|
7743 |
Transcript showCR:('oops: %1 depends on itself' bindWith:prereq) |
|
7744 |
]. |
|
7745 |
]. |
|
14882 | 7746 |
result remove:self package ifAbsent:[]. |
7747 |
^ result. |
|
7748 |
||
7749 |
" |
|
7750 |
stx_libbasic allReferences |
|
7751 |
stx_libbasic2 allReferences |
|
7752 |
stx_libview2 allReferences |
|
7753 |
ubs_application allReferences |
|
7754 |
ubs_application allReferences |
|
7755 |
exept_expecco_application allReferences |
|
7756 |
exept_expeccoNET_application allReferences |
|
7757 |
alspa_batch_application allReferences |
|
7758 |
" |
|
7759 |
! |
|
7760 |
||
15082 | 7761 |
effectiveMandatoryPreRequisites |
15372 | 7762 |
"get the preRequisites, that are not excluded, which are needed for loading |
7763 |
and compiling (i.e. which must be present BEFORE)" |
|
15082 | 7764 |
|
7765 |
self mandatoryPreRequisites notEmpty ifTrue:[ |
|
23124 | 7766 |
"this is a new subclass - avoid overhead" |
7767 |
^ OrderedSet new |
|
7768 |
addAll:self mandatoryPreRequisites; |
|
7769 |
"/ addAll:self includedInPreRequisites; |
|
7770 |
removeAllFoundIn:self excludedFromMandatoryPreRequisites; |
|
7771 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
7772 |
yourself. |
|
15082 | 7773 |
]. |
7774 |
||
7775 |
"I am an old subclass, where #preRequisites returns a plain array" |
|
7776 |
^ Set new |
|
23124 | 7777 |
addAll:self preRequisites; |
7778 |
addAll:self includedInPreRequisites; |
|
7779 |
removeAllFoundIn:self excludedFromMandatoryPreRequisites; |
|
7780 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
7781 |
remove:self package ifAbsent:[]; |
|
7782 |
yourself. |
|
15082 | 7783 |
! |
7784 |
||
14843 | 7785 |
effectivePreRequisites |
7786 |
"get the preRequisites, that are not excluded. |
|
7787 |
This method appears to be obsolete, because its functionality |
|
7788 |
is now included in #preRequisites. |
|
20527 | 7789 |
But is to be kept for backward compatibilty with old existing subclasses." |
14843 | 7790 |
|
7791 |
self mandatoryPreRequisites notEmpty ifTrue:[ |
|
23124 | 7792 |
"this is a new subclass - avoid overhead" |
7793 |
^ self preRequisites. |
|
14843 | 7794 |
]. |
7795 |
||
15082 | 7796 |
"I am an old subclass, where #preRequisites returns a plain array" |
14843 | 7797 |
^ Set new |
23124 | 7798 |
addAll:self preRequisites; |
7799 |
addAll:self includedInPreRequisites; |
|
7800 |
removeAllFoundIn:self excludedFromPreRequisites; |
|
7801 |
remove:self package ifAbsent:[]; |
|
7802 |
yourself. |
|
14843 | 7803 |
! |
7804 |
||
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7805 |
searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7806 |
"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
|
7807 |
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
|
7808 |
|
15024 | 7809 |
^ self searchForPreRequisites:self package |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7810 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7811 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7812 |
self searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7813 |
stx_libbasic3 searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7814 |
bosch_dapasx_Application searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7815 |
bosch_dapasx_pav_browser searchForPreRequisites |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7816 |
" |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7817 |
|
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7818 |
"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
|
7819 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7820 |
"Modified: / 06-09-2011 / 08:30:43 / cg" |
13411 | 7821 |
! |
7822 |
||
7823 |
searchForPreRequisites: packageId |
|
14860 | 7824 |
"answer an array containing two Dictionaries where the keys are the prerequisite package for the given package |
7825 |
and the values are a Set of reasons, why each key package is required. |
|
7826 |
The first entry in the array are the mandatory prereqs (required for compilation), |
|
7827 |
the second entry are the referenced prereqs (required for loading). |
|
7828 |
Referenced prereqs are due to elements accessed at execution time (such as globals)" |
|
13411 | 7829 |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7830 |
^ self searchForPreRequisites: packageId withSubProjects:false |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7831 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7832 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7833 |
self searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7834 |
self searchForPreRequisites:#'stx:libwidg3' |
14860 | 7835 |
self searchForPreRequisites:#'stx:libtool' |
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7836 |
bosch_dapasx_Application searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7837 |
bosch_dapasx_pav_browser searchForPreRequisites |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7838 |
" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7839 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7840 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7841 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7842 |
"Modified: / 06-09-2011 / 08:30:20 / cg" |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7843 |
! |
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7844 |
|
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7845 |
searchForPreRequisites:packageId withSubProjects:withSubProjectsBoolean |
14860 | 7846 |
"answer an array containing two Dictionaries where the keys are the prerequisite package for the given package |
7847 |
and the values are a Set of reasons, why each key package is required. |
|
7848 |
The first entry in the array are the mandatory prereqs (required for compilation), |
|
7849 |
the second entry are the referenced prereqs (required for loading). |
|
7850 |
Referenced prereqs are due to elements accessed at execution time (such as globals)" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7851 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7852 |
|requiredClasses mandatoryClassesForLoadingWithReasons referencedClassesWithReasons |
15066 | 7853 |
ignoredPackages packageExtractionBlock mandatoryPackageReasons referencedPackageReasons referencedMethodsWithReasons| |
14843 | 7854 |
|
7855 |
mandatoryClassesForLoadingWithReasons := Dictionary new. |
|
7856 |
referencedClassesWithReasons := Dictionary new. |
|
15066 | 7857 |
referencedMethodsWithReasons := Dictionary new. |
13411 | 7858 |
|
7859 |
"my classes are required" |
|
15098 | 7860 |
requiredClasses := self searchForClassesWithProject: packageId. |
13411 | 7861 |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7862 |
withSubProjectsBoolean ifTrue:[ |
23124 | 7863 |
"my subproject's classes are required" |
7864 |
self effectiveSubProjects do:[:eachProjectName | |
|
7865 |
requiredClasses addAll:(self searchForClassesWithProject:eachProjectName asSymbol) |
|
7866 |
]. |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7867 |
]. |
13411 | 7868 |
|
16802
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
7869 |
"/ ..but not if they're a Java class |
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
7870 |
requiredClasses := requiredClasses reject:[:each | each isJavaClass ]. |
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
7871 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7872 |
"all superclasses of my classes |
15098 | 7873 |
and my subProject's classes (if required) are mandatory. |
7874 |
All shared pools used by my classes are required as well" |
|
13419 | 7875 |
requiredClasses do:[:cls | |
23124 | 7876 |
(self autoloaded_classNames includes:cls name) ifFalse:[ |
7877 |
cls allSuperclassesDo:[:eachSuperclass | |
|
7878 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
|
7879 |
add: (eachSuperclass name, ' - superclass of ', cls name). |
|
7880 |
]. |
|
7881 |
]. |
|
7882 |
cls sharedPools do:[:eachSharedPool | |
|
7883 |
(mandatoryClassesForLoadingWithReasons at: eachSharedPool ifAbsentPut:[OrderedSet new]) |
|
7884 |
add: (eachSharedPool name, ' - shared pool used by ', cls name). |
|
7885 |
eachSharedPool allSuperclassesDo:[:eachSuperclass | |
|
7886 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
|
7887 |
add: (eachSuperclass name, ' - superclass of shared pool ', eachSharedPool name). |
|
7888 |
] |
|
7889 |
] |
|
13411 | 7890 |
]. |
14843 | 7891 |
"all classes for which I define extensions are mandatory" |
7892 |
self allExtensionClasses do:[:eachExtendedClass | |
|
23124 | 7893 |
(mandatoryClassesForLoadingWithReasons at:eachExtendedClass ifAbsentPut:[OrderedSet new]) |
7894 |
add: (eachExtendedClass name, ' - extended'). |
|
7895 |
eachExtendedClass allSuperclassesDo:[:eachSuperclass | |
|
7896 |
(mandatoryClassesForLoadingWithReasons at: eachSuperclass ifAbsentPut:[OrderedSet new]) |
|
7897 |
add: (eachSuperclass name, ' - superclass of extended ', eachExtendedClass name). |
|
7898 |
] |
|
14843 | 7899 |
]. |
13411 | 7900 |
|
7901 |
"all classes referenced by my classes or my subproject's classes |
|
7902 |
are required. But: |
|
23124 | 7903 |
only search for locals refered to by my methods (assuming that superclasses' |
7904 |
prerequisites are specified in their package)." |
|
13411 | 7905 |
|
14843 | 7906 |
self addReferencesToClassesFromGlobalsIn:requiredClasses to:referencedClassesWithReasons. |
7907 |
self addReferencesToClassesFromGlobalsInMethods:(self searchForExtensionsWithProject:self package) to:referencedClassesWithReasons. |
|
15066 | 7908 |
self addReferencesToExtensionMethodsIn:requiredClasses to:referencedMethodsWithReasons. |
14843 | 7909 |
|
13411 | 7910 |
"now map classes to packages and collect the reasons" |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7911 |
packageExtractionBlock := |
23124 | 7912 |
[:classesWithReasons| |
7913 |
|requiredPackageReasons| |
|
7914 |
requiredPackageReasons := Dictionary new. |
|
7915 |
classesWithReasons keysAndValuesDo:[:usedClass :reasonsPerClass| |
|
7916 |
(requiredPackageReasons at:usedClass package ifAbsentPut:[Set new]) |
|
7917 |
addAll:reasonsPerClass. |
|
7918 |
]. |
|
7919 |
"sort, to avoid differences from one generation to the next one" |
|
7920 |
requiredPackageReasons |
|
7921 |
]. |
|
14843 | 7922 |
|
15066 | 7923 |
mandatoryPackageReasons := packageExtractionBlock value:mandatoryClassesForLoadingWithReasons. |
15126 | 7924 |
|
15066 | 7925 |
referencedPackageReasons := packageExtractionBlock value:referencedClassesWithReasons. |
7926 |
||
7927 |
"and map extension method invocations to packages and collect the reasons" |
|
7928 |
referencedMethodsWithReasons keysAndValuesDo:[:usedMethod :reasonsPerMethod | |
|
23124 | 7929 |
(referencedPackageReasons at:usedMethod package ifAbsentPut:[Set new]) |
7930 |
addAll:reasonsPerMethod. |
|
15066 | 7931 |
]. |
14885 | 7932 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7933 |
ignoredPackages := Set |
23124 | 7934 |
with:packageId |
7935 |
with:PackageId noProjectID. |
|
14885 | 7936 |
|
15066 | 7937 |
referencedPackageReasons removeAllKeys:ignoredPackages ifAbsent:[]. |
15126 | 7938 |
"sort, to avoid differences from one generation to the next one" |
7939 |
referencedPackageReasons keysAndValuesDo:[:eachPackageId :eachReasons | referencedPackageReasons at:eachPackageId put:eachReasons asSortedCollection]. |
|
14885 | 7940 |
|
7941 |
"don't put classes from subProjects into the required list" |
|
7942 |
ignoredPackages addAll:(self siblingsAreSubProjects |
|
23124 | 7943 |
ifTrue:[ self searchForSiblingProjects ] |
7944 |
ifFalse:[ self searchForSubProjects ]) asSet. |
|
14885 | 7945 |
|
15066 | 7946 |
mandatoryPackageReasons removeAllKeys:ignoredPackages ifAbsent:[]. |
15126 | 7947 |
"sort, to avoid differences from one generation to the next one" |
7948 |
mandatoryPackageReasons keysAndValuesDo:[:eachPackageId :eachReasons | mandatoryPackageReasons at:eachPackageId put:eachReasons asSortedCollection]. |
|
14843 | 7949 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7950 |
^ Array |
23124 | 7951 |
with:mandatoryPackageReasons |
7952 |
with:referencedPackageReasons. |
|
14885 | 7953 |
|
7954 |
" |
|
13411 | 7955 |
self searchForPreRequisites:#'stx:libwidg3' |
7956 |
bosch_dapasx_Application searchForPreRequisites |
|
7957 |
bosch_dapasx_pav_browser searchForPreRequisites |
|
15066 | 7958 |
self searchForPreRequisites:#'stx:goodies/json' withSubProjects:false |
13411 | 7959 |
" |
7960 |
||
7961 |
"Modified: / 07-08-2006 / 21:56:25 / fm" |
|
7962 |
"Created: / 17-11-2010 / 18:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
13635
b07e00f94949
searchForPreRequisites:withSubProjects:
Claus Gittinger <cg@exept.de>
parents:
13623
diff
changeset
|
7963 |
"Created: / 06-09-2011 / 08:29:37 / cg" |
16802
0875f5d7c9ce
Care for Java classes that are part of a Smalltalk/X package.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16786
diff
changeset
|
7964 |
"Modified: / 30-07-2014 / 20:33:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
21509 | 7965 |
"Modified: / 21-02-2017 / 17:45:58 / cg" |
11147
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7966 |
! ! |
ea616118c5b6
if method is marked as example- or ignoreInPreRequisite
Claus Gittinger <cg@exept.de>
parents:
11100
diff
changeset
|
7967 |
|
9585 | 7968 |
!ProjectDefinition class methodsFor:'queries'! |
7969 |
||
13419 | 7970 |
allClassNames |
12368 | 7971 |
^ self classNamesForWhich:[:nm :attr | true ]. |
7972 |
! |
|
7973 |
||
13559 | 7974 |
allClasses |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
7975 |
^ self allClassNames |
23124 | 7976 |
collect:[:nm | |
7977 |
|cls| |
|
7978 |
||
7979 |
cls := Smalltalk classNamed:nm. |
|
7980 |
cls isNil ifTrue:[ |
|
7981 |
Logger warning:'%1: failed to autoload class %2' with:self name with:nm |
|
7982 |
]. |
|
7983 |
cls |
|
7984 |
] |
|
7985 |
thenSelect:[:cls | cls notNil ]. |
|
13559 | 7986 |
|
7987 |
"Created: / 06-08-2011 / 15:47:36 / cg" |
|
7988 |
! |
|
7989 |
||
13636 | 7990 |
allExtensionClasses |
7991 |
"answer the set of classes, which are extended by the package. |
|
7992 |
includes all superclasses of the extended classes" |
|
7993 |
||
7994 |
^ self extensionClassesWithSuperclasses:true |
|
7995 |
||
7996 |
" |
|
7997 |
stx_libboss allExtensionClasses |
|
7998 |
" |
|
7999 |
||
8000 |
"Created: / 06-09-2011 / 10:15:54 / cg" |
|
8001 |
! |
|
8002 |
||
13419 | 8003 |
autoloaded_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8004 |
"the opposite of compiled class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8005 |
|
12368 | 8006 |
^ self classNamesForWhich:[:nm :attr | attr notEmptyOrNil and:[attr includes:#autoload]]. |
8007 |
||
8008 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
8009 |
"Created: / 30-08-2007 / 18:48:09 / cg" |
|
8010 |
! |
|
8011 |
||
14978 | 8012 |
canHaveExtensions |
8013 |
"return true, if this class allows extensions from other packages. |
|
8014 |
Private classes, namespaces and projectDefinitions don't allow this" |
|
8015 |
||
8016 |
^ self isAbstract |
|
8017 |
||
8018 |
" |
|
8019 |
Smalltalk allClasses select:[:each | each canHaveExtensions not] |
|
8020 |
" |
|
8021 |
||
8022 |
"Created: / 30-08-2006 / 15:29:49 / cg" |
|
8023 |
! |
|
8024 |
||
13419 | 8025 |
classNames |
12368 | 8026 |
"answer an array containing all the class names of the project's classes" |
8027 |
||
8028 |
^ self classNamesAndAttributesAsSpecArray collect:[:entry | entry first]. |
|
8029 |
||
8030 |
" |
|
8031 |
stx_libhtml classNames |
|
8032 |
stx_libhtml classNamesAndAttributesAsSpecArray |
|
8033 |
" |
|
8034 |
! |
|
8035 |
||
13419 | 8036 |
classNamesForWhich:aBlock |
12368 | 8037 |
"a correponding method with real names is generated in my subclasses" |
8038 |
||
8039 |
|coll| |
|
8040 |
||
8041 |
coll := OrderedCollection new. |
|
8042 |
self classNamesAndAttributesDo:[:nm :attributes | |
|
23124 | 8043 |
(aBlock value:nm value:attributes) ifTrue:[ |
8044 |
coll add:nm. |
|
8045 |
]. |
|
12368 | 8046 |
]. |
8047 |
^ coll |
|
8048 |
||
8049 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
8050 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
8051 |
"Modified: / 17-08-2006 / 20:47:20 / cg" |
|
8052 |
! |
|
8053 |
||
8054 |
classes |
|
8055 |
"list my classes. |
|
8056 |
Project must be loaded - otherwise an error is reported here. |
|
8057 |
Use #classNames if you are only interested in the names" |
|
8058 |
||
13728 | 8059 |
^ self classNames collect:[:nm | Smalltalk at:nm ifAbsent:[self error:'Missing class: ',nm]] |
12368 | 8060 |
|
8061 |
" |
|
8062 |
stx_libbasic3 classNames |
|
8063 |
stx_libbasic3 classes |
|
8064 |
" |
|
13728 | 8065 |
|
8066 |
"Modified: / 27-09-2011 / 18:12:33 / cg" |
|
12368 | 8067 |
! |
8068 |
||
13419 | 8069 |
compiled_classNames |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8070 |
"the opposite of autoloaded class names" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8071 |
|
12368 | 8072 |
^ self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[(attr includes:#autoload) not]]. |
8073 |
||
8074 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
8075 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
8076 |
"Modified: / 21-08-2006 / 18:48:31 / cg" |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8077 |
"Modified (comment): / 05-03-2012 / 12:21:23 / cg" |
12368 | 8078 |
! |
8079 |
||
8080 |
compiled_classNamesForPlatform |
|
8081 |
"answer the classes to be compiled only for the current platformName" |
|
8082 |
||
8083 |
^ self compiled_classNamesForPlatform:OperatingSystem platformName |
|
8084 |
! |
|
8085 |
||
8086 |
compiled_classNamesForPlatform:platformName |
|
8087 |
"answer the classes to be compiled only for platformName |
|
17638 | 8088 |
platformName is one of #unix, #win32, #vms or #osx (OperatingSystem platformName)" |
12368 | 8089 |
|
13419 | 8090 |
^ self |
23124 | 8091 |
classNamesForWhich:[:nm :attr | |
8092 |
(attr includes:#autoload) not and:[attr includes:platformName] |
|
8093 |
]. |
|
12368 | 8094 |
|
8095 |
"Created: / 07-08-2006 / 19:02:57 / fm" |
|
8096 |
"Modified: / 07-08-2006 / 21:25:25 / fm" |
|
8097 |
"Modified: / 09-10-2006 / 13:30:08 / cg" |
|
8098 |
! |
|
8099 |
||
8100 |
compiled_classNames_common |
|
8101 |
"classes to be compiled for any platform" |
|
8102 |
||
13419 | 8103 |
^ self |
23124 | 8104 |
classNamesForWhich:[:nm :attr | |
8105 |
attr isEmptyOrNil |
|
8106 |
]. |
|
12368 | 8107 |
|
8108 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
8109 |
! |
|
8110 |
||
8111 |
compiled_classNames_unix |
|
8112 |
"class, only to be compiled under unix" |
|
13419 | 8113 |
|
12368 | 8114 |
^ self compiled_classNamesForPlatform:#unix. |
8115 |
||
8116 |
"Created: / 18-08-2006 / 13:37:51 / cg" |
|
8117 |
! |
|
8118 |
||
8119 |
compiled_classNames_windows |
|
8120 |
"class, only to be compiled under windows" |
|
13419 | 8121 |
|
12368 | 8122 |
^ self compiled_classNamesForPlatform:#win32. |
8123 |
||
8124 |
"Created: / 18-08-2006 / 13:37:56 / cg" |
|
8125 |
! |
|
8126 |
||
17500 | 8127 |
compiled_classesForPlatform |
8128 |
"list my classes for the current platform. |
|
8129 |
Project must be loaded - otherwise an error is reported here. |
|
8130 |
Use #classNames if you are only interested in the names" |
|
8131 |
||
23124 | 8132 |
^ self compiled_classNamesForPlatform collect:[:nm | |
8133 |
Smalltalk at:nm ifAbsent:[self error:'Missing class: ',nm]] |
|
17500 | 8134 |
|
8135 |
" |
|
8136 |
stx_libbasic compiled_classesForPlatform |
|
8137 |
stx_libbasic classes |
|
8138 |
" |
|
8139 |
! |
|
8140 |
||
13081 | 8141 |
extensionClasses |
8142 |
"answer the set of classes, which are extended by the package" |
|
8143 |
||
13636 | 8144 |
^ self extensionClassesWithSuperclasses:false |
8145 |
||
8146 |
" |
|
8147 |
stx_libboss extensionClasses |
|
8148 |
" |
|
8149 |
||
8150 |
"Modified: / 06-09-2011 / 10:21:44 / cg" |
|
8151 |
! |
|
8152 |
||
8153 |
extensionClassesWithSuperclasses:withSuperclassesBoolean |
|
8154 |
"answer the set of classes, which are extended by the package" |
|
8155 |
||
13081 | 8156 |
|classes| |
8157 |
||
8158 |
classes := IdentitySet new. |
|
8159 |
||
13419 | 8160 |
self extensionMethodNames pairWiseDo:[:className :selector | |
23124 | 8161 |
|mthdCls extendedClass| |
8162 |
||
8163 |
mthdCls := Smalltalk classNamed:className. |
|
8164 |
(mthdCls notNil and:[mthdCls isLoaded]) ifTrue:[ |
|
8165 |
extendedClass := mthdCls theNonMetaclass. |
|
8166 |
(classes includes:extendedClass) ifFalse:[ |
|
8167 |
withSuperclassesBoolean ifTrue:[ |
|
8168 |
extendedClass withAllSuperclassesDo:[:eachClass | |
|
8169 |
classes add:eachClass. |
|
8170 |
]. |
|
8171 |
] ifFalse:[ |
|
8172 |
classes add:extendedClass. |
|
8173 |
]. |
|
8174 |
]. |
|
8175 |
]. |
|
13081 | 8176 |
]. |
8177 |
^ classes. |
|
8178 |
||
8179 |
" |
|
23124 | 8180 |
stx_libboss extensionClasses |
13636 | 8181 |
" |
8182 |
||
8183 |
"Created: / 06-09-2011 / 10:17:06 / cg" |
|
13081 | 8184 |
! |
8185 |
||
12368 | 8186 |
extensionMethods |
8187 |
"list my extension methods. |
|
8188 |
Project must be loaded - otherwise an error is reported here. |
|
8189 |
Use #extensionMethodsNames if you are only interested in the names" |
|
8190 |
||
13419 | 8191 |
^ self extensionMethodNames |
23124 | 8192 |
pairWiseCollect:[:className :selector | |
8193 |
(Smalltalk classNamed:className) compiledMethodAt:selector. |
|
8194 |
]. |
|
12368 | 8195 |
|
8196 |
" |
|
8197 |
stx_libbasic2 extensionMethodNames |
|
8198 |
stx_libbasic2 extensionMethods |
|
8199 |
" |
|
8200 |
! |
|
8201 |
||
13081 | 8202 |
extensionPackages |
8203 |
"answer the set of packages, which are extended by this package" |
|
8204 |
||
13636 | 8205 |
^ self allExtensionClasses collect:[:eachClass| eachClass package] |
8206 |
||
8207 |
" |
|
23124 | 8208 |
stx_libboss extensionPackages |
13636 | 8209 |
" |
8210 |
||
8211 |
"Modified: / 06-09-2011 / 10:20:47 / cg" |
|
13081 | 8212 |
! |
8213 |
||
10144 | 8214 |
hasAllClassesFullyLoaded |
14957 | 8215 |
"return true, if all classes are present and loaded (not autoloaded)" |
10144 | 8216 |
|
8217 |
^ self hasAllClassesLoaded:true |
|
8218 |
||
8219 |
"Created: / 25-10-2006 / 16:08:25 / cg" |
|
8220 |
! |
|
8221 |
||
9627 | 8222 |
hasAllClassesLoaded |
10205 | 8223 |
"return true, if all classes are present (although, some might be autoloaded)" |
10144 | 8224 |
|
8225 |
^ self hasAllClassesLoaded:false |
|
8226 |
||
8227 |
"Modified: / 25-10-2006 / 16:08:11 / cg" |
|
8228 |
! |
|
8229 |
||
8230 |
hasAllClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
8231 |
"check if all classes for this platform are present. |
12421
67898c88eceb
comment/format in: #hasAllClassesLoaded:
Claus Gittinger <cg@exept.de>
parents:
12416
diff
changeset
|
8232 |
If checkIfFullyLoaded is true, they must be fully loaded; that means: not autoloaded" |
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
8233 |
|
13419 | 8234 |
^ (self |
23124 | 8235 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil or:[ attr includes:#autoload]]) |
8236 |
loaded:checkIfFullyLoaded) |
|
10154 | 8237 |
and:[ |
23124 | 8238 |
self |
8239 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
|
8240 |
loaded:checkIfFullyLoaded ] |
|
10154 | 8241 |
|
8242 |
"Modified: / 07-11-2006 / 11:47:30 / cg" |
|
8243 |
! |
|
8244 |
||
8245 |
hasAllCompiledClassesFullyLoaded |
|
8246 |
"return true, if all compiled classes are present and loaded" |
|
8247 |
||
8248 |
^ self hasAllCompiledClassesLoaded:true |
|
8249 |
||
8250 |
"Created: / 07-11-2006 / 11:48:02 / cg" |
|
8251 |
! |
|
8252 |
||
8253 |
hasAllCompiledClassesLoaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
8254 |
"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
|
8255 |
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
|
8256 |
|
13419 | 8257 |
^ (self |
23124 | 8258 |
hasClasses:(self classNamesForWhich:[:nm :attr | attr isEmptyOrNil]) |
8259 |
loaded:checkIfFullyLoaded) |
|
10154 | 8260 |
and:[ |
13419 | 8261 |
self |
23124 | 8262 |
hasClasses:(self compiled_classNamesForPlatform:OperatingSystem platformName) |
8263 |
loaded:checkIfFullyLoaded |
|
10366
8990764f8911
#compiled_classNamesForPlatform: does not return classes names,
Stefan Vogel <sv@exept.de>
parents:
10350
diff
changeset
|
8264 |
] |
9585 | 8265 |
! |
8266 |
||
9627 | 8267 |
hasAllExtensionsLoaded |
10203
b210e7832fe1
Do not autoload when checking for extensions
Stefan Vogel <sv@exept.de>
parents:
10200
diff
changeset
|
8268 |
"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
|
8269 |
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
|
8270 |
|
18988 | 8271 |
(self extensionMethodNames ? #()) pairWiseDo:[:className :selector | |
23124 | 8272 |
|cls| |
8273 |
||
8274 |
cls := Smalltalk loadedClassNamed:className. |
|
8275 |
cls isNil ifTrue:[ |
|
8276 |
Verbose ifTrue:[ |
|
8277 |
Transcript showCR:(self name,' missing extension class "',className,'".'). |
|
8278 |
]. |
|
8279 |
^ false |
|
8280 |
]. |
|
8281 |
"there is no possibility that we installed an extension method in an unloaded class" |
|
8282 |
(cls isLoaded not or:[(cls compiledMethodAt:selector) isNil]) ifTrue:[ |
|
8283 |
Verbose ifTrue:[ |
|
8284 |
Transcript showCR:(self name,' missing extension method "',className,'>>',selector,'".'). |
|
8285 |
]. |
|
8286 |
^ false |
|
8287 |
]. |
|
9627 | 8288 |
]. |
8289 |
^ true. |
|
8290 |
||
8291 |
"Created: / 17-08-2006 / 00:50:01 / cg" |
|
10140 | 8292 |
"Modified: / 25-10-2006 / 00:01:10 / cg" |
9850 | 8293 |
! |
8294 |
||
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8295 |
hasClasses:classNames loaded:checkIfFullyLoaded |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8296 |
"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
|
8297 |
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
|
8298 |
are not considered" |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8299 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8300 |
classNames do:[:eachClassName | |
23124 | 8301 |
|cls| |
8302 |
||
8303 |
cls := Smalltalk loadedClassNamed:eachClassName. |
|
8304 |
cls isNil ifTrue:[ |
|
8305 |
Verbose ifTrue:[ |
|
8306 |
(self name, ' [info]: missing class: ', eachClassName) infoPrintCR. |
|
8307 |
]. |
|
8308 |
^ false |
|
8309 |
]. |
|
8310 |
(checkIfFullyLoaded and:[cls isLoaded not]) ifTrue:[ |
|
8311 |
Verbose ifTrue:[ |
|
8312 |
(self name,' [info]: unloaded class: ', eachClassName) infoPrintCR. |
|
8313 |
]. |
|
8314 |
^ false. |
|
8315 |
]. |
|
10369
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8316 |
]. |
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8317 |
|
14baf6dc8ba6
No diag message about "unloaded classes" when loading packages
Stefan Vogel <sv@exept.de>
parents:
10368
diff
changeset
|
8318 |
^ true |
10154 | 8319 |
! |
8320 |
||
9906
9efd21c9b1b6
hasExtensions is a bad name (conflicts with the other query)
Claus Gittinger <cg@exept.de>
parents:
9904
diff
changeset
|
8321 |
hasExtensionMethods |
9850 | 8322 |
^ self extensionMethodNames notEmpty |
8323 |
||
8324 |
"Created: / 14-09-2006 / 14:19:35 / cg" |
|
10005 | 8325 |
! |
8326 |
||
12369 | 8327 |
hasPostLoadAction |
8328 |
"/ true if postLoadAction has been redefined |
|
8329 |
^ (self class whichClassIncludesSelector:#postLoadAction) theNonMetaclass isAbstract not |
|
8330 |
! |
|
8331 |
||
8332 |
hasPostUnloadAction |
|
8333 |
"/ true if postUnloadAction has been redefined |
|
8334 |
^ (self class whichClassIncludesSelector:#postUnloadAction) theNonMetaclass isAbstract not |
|
8335 |
! |
|
8336 |
||
8337 |
hasPreLoadAction |
|
8338 |
"/ true if preLoadAction has been redefined |
|
8339 |
^ (self class whichClassIncludesSelector:#preLoadAction) theNonMetaclass isAbstract not |
|
8340 |
! |
|
8341 |
||
8342 |
hasPreUnloadAction |
|
8343 |
"/ true if preUnloadAction has been redefined |
|
8344 |
^ (self class whichClassIncludesSelector:#preUnloadAction) theNonMetaclass isAbstract not |
|
8345 |
! |
|
8346 |
||
13609 | 8347 |
isAbstract |
8348 |
^ self == ProjectDefinition |
|
8349 |
||
8350 |
"Modified (format): / 20-08-2011 / 22:47:46 / cg" |
|
8351 |
! |
|
8352 |
||
17461 | 8353 |
isAutoloaded:aClassOrClassName |
8354 |
|className| |
|
8355 |
||
23124 | 8356 |
className := aClassOrClassName isBehavior |
8357 |
ifTrue:[ aClassOrClassName theNonMetaclass name ] |
|
8358 |
ifFalse:[ aClassOrClassName ]. |
|
17461 | 8359 |
^ self autoloaded_classNames includes:className |
8360 |
||
8361 |
" |
|
8362 |
'stx:goodies/soap/xe/tests' asPackageId projectDefinitionClass |
|
23124 | 8363 |
isAutoloaded:#'SOAP::XeAllTests' |
17461 | 8364 |
" |
8365 |
! |
|
8366 |
||
10140 | 8367 |
isFullyLoaded |
16160 | 8368 |
"as the inherited query isLoaded only refers to a single classes load status, |
8369 |
this one returns true iff the whole project (all classes plus all extensions) is loaded" |
|
8370 |
||
13419 | 8371 |
^ self hasAllCompiledClassesFullyLoaded |
13167 | 8372 |
and:[self hasAllClassesLoaded and:[self hasAllExtensionsLoaded]] |
10140 | 8373 |
|
8374 |
"Created: / 24-10-2006 / 23:52:23 / cg" |
|
13609 | 8375 |
"Modified: / 20-08-2011 / 22:47:16 / cg" |
12331 | 8376 |
! |
8377 |
||
8378 |
projectType |
|
8379 |
^ self subclassResponsibility |
|
16812 | 8380 |
! |
8381 |
||
23681 | 8382 |
reasonForNotSupportedOnPlatform |
23866 | 8383 |
"answer a reason string, why the package is not supported on this platform |
8384 |
(if it is not, i.e. if supportedByPlatform returns false)" |
|
8385 |
||
8386 |
^ 'not supported by this OS-platform' |
|
23681 | 8387 |
|
8388 |
"Created: / 07-02-2019 / 14:21:54 / Claus Gittinger" |
|
8389 |
! |
|
8390 |
||
16892 | 8391 |
supportedOnPlatform |
8392 |
"answer false, if this package is not suitable for |
|
8393 |
the current platform. The default here returns true. |
|
8394 |
Only to be redefined in packages which are definitely not valid |
|
23124 | 8395 |
for the given platform. For example, the OLE package is only |
16892 | 8396 |
usable under windows" |
8397 |
||
23866 | 8398 |
^ true |
16892 | 8399 |
! |
8400 |
||
16812 | 8401 |
whoReferences:aPackageString |
8402 |
"answer, which package references directly or indirectly a package defined by aPackageString" |
|
8403 |
||
22160 | 8404 |
|referrers| |
8405 |
||
8406 |
referrers := OrderedCollection new. |
|
16812 | 8407 |
|
8408 |
self allSubclassesDo:[:eachPackageDefinitionClass| |
|
23124 | 8409 |
(eachPackageDefinitionClass allPreRequisites includes:aPackageString) ifTrue:[ |
8410 |
referrers add:eachPackageDefinitionClass. |
|
8411 |
] |
|
16812 | 8412 |
]. |
8413 |
||
22160 | 8414 |
^ referrers. |
16812 | 8415 |
|
8416 |
" |
|
8417 |
self whoReferences:'stx:libview3' |
|
8418 |
self whoReferences:'stx:libwidg3' |
|
8419 |
self whoReferences:'stx:libbasic' |
|
8420 |
" |
|
22160 | 8421 |
|
8422 |
"Modified (format): / 02-08-2017 / 18:38:27 / cg" |
|
16812 | 8423 |
! |
8424 |
||
8425 |
whoReferencesSorted:aPackageString |
|
8426 |
"answer, which package references directly or indirectly a package define by aPackageString. |
|
22160 | 8427 |
Sort the result, so that the most direct referrers are at the top" |
16812 | 8428 |
|
8429 |
|referers orderedTuples sortedPackages| |
|
8430 |
||
8431 |
referers := self whoReferences:aPackageString. |
|
8432 |
orderedTuples := OrderedCollection new. |
|
8433 |
||
8434 |
referers do:[:eachProjectDefinition | |
|
23124 | 8435 |
|preRequisites| |
8436 |
||
8437 |
preRequisites := eachProjectDefinition effectivePreRequisites. |
|
8438 |
preRequisites do:[:eachPrerequisitePackageID| |
|
8439 |
|eachPrerequisitePackage| |
|
8440 |
||
8441 |
eachPrerequisitePackage := self definitionClassForPackage:eachPrerequisitePackageID. |
|
8442 |
(referers includes:eachPrerequisitePackage) ifTrue:[ |
|
8443 |
orderedTuples add:(Array with:eachPrerequisitePackage with:eachProjectDefinition). |
|
8444 |
]. |
|
8445 |
]. |
|
16812 | 8446 |
]. |
8447 |
||
8448 |
(orderedTuples contains:[:el | el first = el second]) ifTrue:[ |
|
23124 | 8449 |
self halt:'something seems to depend upon itself' |
16812 | 8450 |
]. |
8451 |
sortedPackages := orderedTuples topologicalSortStable: true. |
|
8452 |
||
8453 |
^ sortedPackages. |
|
8454 |
||
8455 |
" |
|
8456 |
self whoReferencesSorted:'stx:libview3' |
|
8457 |
self whoReferencesSorted:'stx:libwidg3' |
|
8458 |
self whoReferencesSorted:'stx:libbasic' |
|
8459 |
" |
|
22160 | 8460 |
|
8461 |
"Modified (comment): / 02-08-2017 / 18:38:03 / cg" |
|
9585 | 8462 |
! ! |
8463 |
||
10774 | 8464 |
!ProjectDefinition class methodsFor:'queries-privacy'! |
8465 |
||
8466 |
showClassDocumentationOf:aClass |
|
12198
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
8467 |
"used by the HTMLDoc-generator to ask if a classes' protocol is to be documented |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
8468 |
or hidden. |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
8469 |
(used for expecco, to suppress documentation of workflow- and expecco classes |
f3f15cc6a32e
changed: #showClassDocumentationOf:
Claus Gittinger <cg@exept.de>
parents:
12192
diff
changeset
|
8470 |
in the expecco-class browser)" |
10774 | 8471 |
|
8472 |
^ true |
|
8473 |
||
8474 |
"Created: / 05-11-2007 / 16:44:16 / cg" |
|
8475 |
! ! |
|
8476 |
||
9726 | 8477 |
!ProjectDefinition class methodsFor:'sanity checks'! |
8478 |
||
8479 |
validateDescription |
|
13808 | 8480 |
"perform some consistency checks (set of classes in project same as those listed in description); |
14981 | 8481 |
called before checking in build support files. |
8482 |
Somewhat obsolete: use the ProjectChecker, which does more checks" |
|
13808 | 8483 |
|
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
8484 |
|emptyProjects nonProjects emptyOrNonProjects classesInImage |
14510 | 8485 |
classesInDescription onlyInImage onlyInDescription missingPools myPackage| |
9956 | 8486 |
|
15395 | 8487 |
emptyProjects := Set withAll:self effectiveSubProjects. |
9956 | 8488 |
Smalltalk allClassesDo:[:cls | |
23124 | 8489 |
emptyProjects remove:(cls package) ifAbsent:[]. |
9956 | 8490 |
]. |
15395 | 8491 |
nonProjects := self effectiveSubProjects select:[:p | |
23124 | 8492 |
(self definitionClassForPackage: p) isNil |
8493 |
]. |
|
9956 | 8494 |
|
8495 |
emptyOrNonProjects := Set withAll:emptyProjects. |
|
8496 |
emptyOrNonProjects addAll:nonProjects. |
|
8497 |
||
8498 |
emptyOrNonProjects notEmpty ifTrue:[ |
|
23124 | 8499 |
(Dialog |
8500 |
confirm:('The following subprojects are non-existent, empty or without description:\\ ' |
|
8501 |
, ((emptyOrNonProjects |
|
8502 |
asSortedCollection |
|
8503 |
collect:[:p | p allBold]) |
|
8504 |
asStringWith:'\ ') |
|
8505 |
, '\\Continue ?') withCRs |
|
8506 |
yesLabel:'OK' noLabel:'Cancel') |
|
8507 |
ifFalse:[ |
|
8508 |
AbortSignal raise |
|
8509 |
]. |
|
9956 | 8510 |
]. |
8511 |
||
14510 | 8512 |
myPackage := self package. |
8513 |
classesInImage := Smalltalk allClasses select:[:cls | (cls package == myPackage) and:[cls isPrivate not]]. |
|
13728 | 8514 |
"/ classesInDescription := self classes asIdentitySet. |
8515 |
classesInDescription := IdentitySet new. |
|
8516 |
((self compiled_classNamesForPlatform:(OperatingSystem platformName)) |
|
8517 |
, (self compiled_classNames_common) |
|
8518 |
, (self autoloaded_classNames)) do:[:nm | |
|
23124 | 8519 |
|cls| |
8520 |
||
8521 |
cls := Smalltalk at:nm asSymbol. |
|
8522 |
cls isNil ifTrue:[ |
|
8523 |
(self autoloaded_classNames includes:nm) ifTrue:[ |
|
8524 |
Transcript showCR:'missing autoloaded class: ',nm. |
|
8525 |
] ifFalse:[ |
|
8526 |
self proceedableError:('missing class: ',nm). |
|
8527 |
] |
|
8528 |
] ifFalse:[ |
|
8529 |
classesInDescription add:cls. |
|
8530 |
] |
|
13728 | 8531 |
]. |
8532 |
||
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8533 |
missingPools := Set new. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8534 |
classesInDescription do:[:eachClass | |
23124 | 8535 |
eachClass sharedPoolNames do:[:eachPoolName | |
8536 |
|pool| |
|
8537 |
||
8538 |
pool := eachClass nameSpace classNamed:eachPoolName. |
|
8539 |
pool isNil ifTrue:[ |
|
8540 |
eachClass nameSpace ~~ Smalltalk ifTrue:[ |
|
8541 |
pool := Smalltalk classNamed:eachPoolName. |
|
8542 |
] |
|
8543 |
]. |
|
8544 |
pool isNil ifTrue:[ |
|
8545 |
Transcript showCR:'missing pool: ',eachPoolName. |
|
8546 |
missingPools add:eachPoolName. |
|
8547 |
] ifFalse:[ |
|
8548 |
pool isSharedPool ifFalse:[ |
|
8549 |
Transcript showCR:'not a shared pool: ',eachPoolName. |
|
8550 |
missingPools add:eachPoolName. |
|
8551 |
]. |
|
8552 |
]. |
|
8553 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8554 |
]. |
14981 | 8555 |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8556 |
missingPools notEmpty ifTrue:[ |
23124 | 8557 |
(Dialog |
8558 |
confirm:('The following sharedpools are non-existent, or not pools:\\ ' |
|
8559 |
, ((missingPools |
|
8560 |
asSortedCollection |
|
8561 |
collect:[:p | p allBold]) |
|
8562 |
asStringWith:'\ ') |
|
8563 |
, '\\Continue ?') withCRs |
|
8564 |
yesLabel:'OK' noLabel:'Cancel') |
|
8565 |
ifFalse:[ |
|
8566 |
AbortOperationRequest raise |
|
8567 |
]. |
|
13809
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8568 |
]. |
da77d6869c9c
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13808
diff
changeset
|
8569 |
|
14981 | 8570 |
"/ also found by ProjectChecker... |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8571 |
classesInImage ~= classesInDescription ifTrue:[ |
23124 | 8572 |
onlyInImage := (classesInImage reject:[:cls | classesInDescription includes:cls]). |
8573 |
onlyInImage notEmpty ifTrue:[ |
|
8574 |
Transcript show:self name; show:': only in image: '; showCR:onlyInImage |
|
8575 |
]. |
|
8576 |
onlyInDescription := (classesInDescription reject:[:cls | classesInImage includes:cls]). |
|
8577 |
onlyInDescription notEmpty ifTrue:[ |
|
8578 |
Transcript show:self name; show:': only in description: '; showCR:onlyInDescription |
|
8579 |
]. |
|
8580 |
(Dialog confirm:'The set of classes in the image is different from the listed classes in the project definition.\\Proceed?' withCRs) ifFalse:[ |
|
8581 |
AbortOperationRequest raiseRequest |
|
8582 |
] |
|
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8583 |
]. |
14981 | 8584 |
|
14045 | 8585 |
"/ self validateOrderOfClasses |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8586 |
|
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8587 |
" |
15395 | 8588 |
exept_expecco_application validateDescription |
13694
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8589 |
squeak_vmMaker validateDescription |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8590 |
" |
ff3118874df3
changed: #validateDescription
Claus Gittinger <cg@exept.de>
parents:
13692
diff
changeset
|
8591 |
|
14045 | 8592 |
"Modified: / 06-03-2012 / 11:31:37 / cg" |
21259 | 8593 |
"Modified: / 17-01-2017 / 16:33:56 / stefan" |
23013 | 8594 |
"Modified: / 24-05-2018 / 21:05:15 / Claus Gittinger" |
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8595 |
! |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8596 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8597 |
validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8598 |
"check if the project's classes are listed in the correct dependency order in the classList. |
14045 | 8599 |
This would be required, if the generated makefile would compile files in that order, |
8600 |
and superclasses must be compiled before subclasses (for the header files). |
|
8601 |
However, the makefile list is generated by a separate mechanism, so that is not requiered." |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8602 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8603 |
|classesInDescriptionInOrder classesInProject already| |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8604 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8605 |
classesInDescriptionInOrder := OrderedCollection new. |
16911
e8a8231b0be1
class: ProjectDefinition
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16894
diff
changeset
|
8606 |
classesInDescriptionInOrder := |
23124 | 8607 |
self compiled_classNames |
8608 |
collect:[:eachName | |
|
8609 |
|cls| |
|
8610 |
||
8611 |
cls := Smalltalk at:eachName. |
|
8612 |
self assert:cls notNil message:'missing class: ',eachName. |
|
8613 |
cls |
|
8614 |
]. |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8615 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8616 |
classesInProject := classesInDescriptionInOrder asSet. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8617 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8618 |
already := Set new. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8619 |
classesInDescriptionInOrder do:[:eachClass | |
23124 | 8620 |
eachClass allSuperclassesDo:[:superclass | |
8621 |
(classesInProject includes:superclass) ifTrue:[ |
|
8622 |
"/ if in the set, it must have been already listed |
|
8623 |
self |
|
8624 |
assert:(already includes:superclass) |
|
8625 |
message:('superclass "%1" not compiled before "%2"' |
|
8626 |
bindWith:superclass name |
|
8627 |
with:eachClass name). |
|
8628 |
]. |
|
8629 |
]. |
|
8630 |
already add:eachClass. |
|
14042
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8631 |
]. |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8632 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8633 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8634 |
stx_goodies_refactoryBrowser_lint validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8635 |
squeak_vmMaker validateOrderOfClasses |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8636 |
" |
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8637 |
|
05b7b61d7e59
added: #validateOrderOfClasses
Claus Gittinger <cg@exept.de>
parents:
14021
diff
changeset
|
8638 |
"Created: / 05-03-2012 / 12:18:45 / cg" |
9726 | 8639 |
! ! |
8640 |
||
9585 | 8641 |
!ProjectDefinition class methodsFor:'testing'! |
8642 |
||
9664 | 8643 |
isApplicationDefinition |
23294 | 8644 |
"true iff an application-package (i.e. not a library). |
8645 |
Applications have a main and startup for standalon start" |
|
8646 |
||
9664 | 8647 |
^ false |
8648 |
||
8649 |
"Created: / 23-08-2006 / 15:17:32 / cg" |
|
9983 | 8650 |
"Modified: / 20-09-2006 / 14:59:56 / cg" |
8651 |
! |
|
8652 |
||
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8653 |
isConsoleApplication |
23051 | 8654 |
"Used with WIN32 only (i.e. affects bc.mak). |
23124 | 8655 |
Return true, if this is a console application. |
23051 | 8656 |
Console applications have stdout and stderr and open up a command-window |
8657 |
when started. Only console applications can interact with the user in the |
|
8658 |
command line window." |
|
8659 |
||
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8660 |
^ false |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8661 |
|
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8662 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
23051 | 8663 |
"Modified (comment): / 06-06-2018 / 15:17:21 / Claus Gittinger" |
12309
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8664 |
! |
f51aaafd2131
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12305
diff
changeset
|
8665 |
|
16682 | 8666 |
isFolderForProjectsDefinition |
23294 | 8667 |
"true iff an 'empty' project which only holds subprojects, |
8668 |
but no own classes. Examples are stx, exept, etc." |
|
8669 |
||
16682 | 8670 |
^ false |
8671 |
! |
|
8672 |
||
9983 | 8673 |
isGUIApplication |
23294 | 8674 |
"true iff a GUI application. |
8675 |
Will include startup code to open a display" |
|
8676 |
||
9983 | 8677 |
^ false |
8678 |
||
8679 |
"Created: / 20-09-2006 / 14:59:49 / cg" |
|
9664 | 8680 |
! |
8681 |
||
8682 |
isLibraryDefinition |
|
23294 | 8683 |
"true iff a library. |
8684 |
Will NOT include startup code, and can only be loaded into or |
|
8685 |
linked with an application" |
|
8686 |
||
9664 | 8687 |
^ false |
8688 |
||
8689 |
"Created: / 23-08-2006 / 15:17:46 / cg" |
|
9983 | 8690 |
"Modified: / 20-09-2006 / 15:00:00 / cg" |
9664 | 8691 |
! |
8692 |
||
23866 | 8693 |
isPluginDefinition |
8694 |
^ false |
|
8695 |
! |
|
8696 |
||
9627 | 8697 |
isProjectDefinition |
9664 | 8698 |
"concrete i.e. not abstract" |
8699 |
||
14978 | 8700 |
^ self isAbstract not |
9627 | 8701 |
|
8702 |
"Created: / 10-08-2006 / 16:24:02 / cg" |
|
13285 | 8703 |
"Modified: / 08-02-2011 / 10:03:49 / cg" |
9585 | 8704 |
! ! |
8705 |
||
13592 | 8706 |
!ProjectDefinition::AbbrevEntry methodsFor:'accessing'! |
8707 |
||
8708 |
category |
|
8709 |
^ category |
|
8710 |
! |
|
8711 |
||
8712 |
className |
|
8713 |
^ className |
|
8714 |
! |
|
8715 |
||
13695 | 8716 |
className:classNameArg fileName:fileNameArg category:categoryArg numClassInstVars:numClassInstVarsArg |
13592 | 8717 |
className := classNameArg. |
8718 |
fileName := fileNameArg. |
|
8719 |
category := categoryArg. |
|
8720 |
numClassInstVars := numClassInstVarsArg. |
|
8721 |
||
8722 |
"Created: / 18-08-2011 / 14:18:30 / cg" |
|
8723 |
! |
|
8724 |
||
8725 |
fileName |
|
8726 |
^ fileName |
|
8727 |
! |
|
8728 |
||
8729 |
numClassInstVars |
|
8730 |
^ numClassInstVars |
|
8731 |
||
8732 |
"Created: / 18-08-2011 / 14:18:37 / cg" |
|
8733 |
! ! |
|
8734 |
||
20567 | 8735 |
!ProjectDefinition::ApplicationDocumentTypeDescription class methodsFor:'documentation'! |
8736 |
||
8737 |
documentation |
|
8738 |
" |
|
8739 |
for deployment, some systems can make use of additional information |
|
8740 |
on which documents are handled by the application. |
|
8741 |
This is used eg. for double-clicking on a document in OSX. |
|
8742 |
If the deployed app can/should handle this, redefine the |
|
8743 |
applicatinDocumentTypeDescriptions / applicatinDocumentTypeDescriptionsOSX |
|
8744 |
methods in the projectDefinition to return a collection of instances of me. |
|
8745 |
||
8746 |
[author:] |
|
23124 | 8747 |
cg |
20567 | 8748 |
|
8749 |
For example: |
|
23124 | 8750 |
mimeType: 'application/x-expecco-testsuite |
8751 |
extension: 'ets' |
|
8752 |
typeName: 'expecco test suite' |
|
8753 |
iconFileWindows: 'expeccoSuite.ico' |
|
8754 |
iconFileOSX: 'expeccoSuite.icns' |
|
8755 |
roleOSX: 'Editor' |
|
20567 | 8756 |
" |
8757 |
! ! |
|
8758 |
||
8759 |
!ProjectDefinition::ApplicationDocumentTypeDescription methodsFor:'accessing'! |
|
8760 |
||
8761 |
extension |
|
8762 |
"the extension of the document" |
|
23124 | 8763 |
|
20567 | 8764 |
^ extension |
8765 |
! |
|
8766 |
||
8767 |
extension:aString |
|
8768 |
"the extension of the document" |
|
8769 |
||
8770 |
extension := aString. |
|
8771 |
! |
|
8772 |
||
8773 |
iconFileLinux |
|
8774 |
^ iconFileLinux |
|
8775 |
! |
|
8776 |
||
8777 |
iconFileLinux:aString |
|
8778 |
iconFileLinux := aString. |
|
8779 |
! |
|
8780 |
||
8781 |
iconFileOSX |
|
8782 |
^ iconFileOSX |
|
8783 |
! |
|
8784 |
||
8785 |
iconFileOSX:aString |
|
8786 |
iconFileOSX := aString. |
|
8787 |
! |
|
8788 |
||
8789 |
iconFileWindows |
|
8790 |
^ iconFileWindows |
|
8791 |
! |
|
8792 |
||
8793 |
iconFileWindows:aString |
|
8794 |
iconFileWindows := aString. |
|
8795 |
! |
|
8796 |
||
8797 |
mimeType |
|
8798 |
^ mimeType |
|
8799 |
! |
|
8800 |
||
8801 |
mimeType:aString |
|
8802 |
mimeType := aString. |
|
8803 |
! |
|
8804 |
||
8805 |
roleOSX |
|
8806 |
^ roleOSX |
|
8807 |
! |
|
8808 |
||
8809 |
roleOSX:aString |
|
8810 |
roleOSX := aString. |
|
8811 |
! |
|
8812 |
||
8813 |
typeName |
|
8814 |
"something like 'foo Document'; |
|
8815 |
eg. 'expecco test suite', 'expecco log file', etc." |
|
8816 |
||
8817 |
^ typeName |
|
8818 |
! |
|
8819 |
||
21562 | 8820 |
typeName:aString |
8821 |
"aString like 'foo Document'; |
|
20567 | 8822 |
eg. 'expecco test suite', 'expecco log file', etc." |
8823 |
||
21562 | 8824 |
typeName := aString. |
8825 |
||
8826 |
"Modified (comment): / 24-02-2017 / 09:37:26 / cg" |
|
20567 | 8827 |
! ! |
8828 |
||
9569 | 8829 |
!ProjectDefinition class methodsFor:'documentation'! |
9536 | 8830 |
|
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
8831 |
version |
18477 | 8832 |
^ '$Header$' |
13610
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
8833 |
! |
ec7ea708ebd2
changed: #installAutoloadedClasses
Claus Gittinger <cg@exept.de>
parents:
13609
diff
changeset
|
8834 |
|
12086 | 8835 |
version_CVS |
18477 | 8836 |
^ '$Header$' |
13411 | 8837 |
! |
8838 |
||
8839 |
version_SVN |
|
15221 | 8840 |
^ '$ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1 $' |
9536 | 8841 |
! ! |
9714 | 8842 |
|
14642 | 8843 |
|
9714 | 8844 |
ProjectDefinition initialize! |