102
|
1 |
"{ Package: 'cvut:stx/goodies/libsvn' }"
|
|
2 |
!
|
|
3 |
|
|
4 |
!ApplicationDefinition class methodsFor:'file templates'!
|
|
5 |
|
|
6 |
make_dot_proto
|
|
7 |
|
|
8 |
^
|
|
9 |
'# $','Header','$
|
|
10 |
#
|
|
11 |
# -------------- no need to change anything below ----------
|
|
12 |
#
|
|
13 |
# This makefile generates some standalone demo applications
|
|
14 |
#
|
|
15 |
# make
|
|
16 |
# generates %(APPLICATION)
|
|
17 |
#
|
|
18 |
|
|
19 |
TOP=%(TOP)
|
|
20 |
INCLUDE_TOP=$(TOP)/..
|
|
21 |
|
|
22 |
PACKAGE=%(APPLICATION_PACKAGE)
|
|
23 |
SUBDIRS=
|
|
24 |
SUPPRESS_LOCAL_ABBREVS="yes"
|
|
25 |
NOAUTOLOAD=1
|
|
26 |
NOSUBAUTOLOAD=1
|
|
27 |
|
|
28 |
LOCALINCLUDES=-I$(INCLUDE_TOP)/stx/libbasic %(LOCAL_INCLUDES)
|
|
29 |
LOCALDEFINES=%(LOCAL_DEFINES)
|
|
30 |
GLOBALDEFINES=%(GLOBAL_DEFINES)
|
|
31 |
MAIN_DEFINES=%(MAIN_DEFINES)
|
|
32 |
|
|
33 |
RCSSOURCES=Make.proto *.st
|
|
34 |
LINKSOURCES=Make.proto *.st
|
|
35 |
|
|
36 |
DELIVERBINARIES=
|
|
37 |
|
|
38 |
target: %(BUILD_TARGET)
|
|
39 |
|
|
40 |
all:: prereq exe
|
|
41 |
|
|
42 |
exe: %(APPLICATION) $(REQUIRED_SUPPORT_DIRS)
|
|
43 |
|
|
44 |
LIBNAME=%(LIBRARY_NAME)
|
|
45 |
STCLOCALOPT=''-package=$(PACKAGE)'' -I. -H. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
|
|
46 |
|
|
47 |
|
|
48 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
49 |
# additional C-libraries that should be pre-linked with the class-objects
|
|
50 |
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES)
|
|
51 |
LOCAL_SHARED_LIBS=%(ADDITIONAL_SHARED_LINK_LIBRARIES)
|
|
52 |
|
|
53 |
|
|
54 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
55 |
# additional C targets or libraries should be added below
|
|
56 |
LOCAL_EXTRA_TARGETS=
|
|
57 |
|
|
58 |
OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
|
|
59 |
|
|
60 |
%(ADDITIONAL_DEFINITIONS)
|
|
61 |
|
|
62 |
%(ADDITIONAL_DEFINITIONS_SVN)
|
|
63 |
|
|
64 |
LIBLIST = $(REQUIRED_LIBS)
|
|
65 |
|
|
66 |
# required libs:
|
|
67 |
#
|
|
68 |
|
|
69 |
REQUIRED_LIBS=%(REQUIRED_LIBS)
|
|
70 |
|
|
71 |
REQUIRED_LIBOBJS=%(REQUIRED_LIBOBJS)
|
|
72 |
|
|
73 |
REQUIRED_LINK_LIBOBJS=%(REQUIRED_LINK_LIBOBJS)
|
|
74 |
|
|
75 |
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS)
|
|
76 |
|
|
77 |
|
|
78 |
%(APPLICATION): %(STARTUP_CLASSFILENAME).$(O) $(APP_DIRS_TO_MAKE) $(APP_LIBOBJS) $(OBJS)
|
|
79 |
$(MAKE) %(APPLICATION_TYPE) \
|
|
80 |
TARGET=%(APPLICATION) \
|
|
81 |
APPLICATION_CLASSES="%(STARTUP_CLASSFILENAME)" \
|
|
82 |
APPLICATION_OBJS="$(OBJS)" \
|
|
83 |
APPLICATION_LIBLIST="$(REQUIRED_LIBS)" \
|
|
84 |
APPLICATION_LIBOBJS="$(REQUIRED_LIBOBJS)" \
|
|
85 |
APPLICATION_LINK_LIBOBJS="$(REQUIRED_LINK_LIBOBJS)" \
|
|
86 |
STARTUP_CLASS="%(STARTUP_CLASS)" \
|
|
87 |
STARTUP_SELECTOR="%(STARTUP_SELECTOR)" \
|
|
88 |
MAIN_DEFINES="%(MAIN_DEFINES)"
|
|
89 |
|
|
90 |
# build all prerequisite packages for this package
|
|
91 |
prereq:
|
|
92 |
%(MAKE_PREREQUISITES)
|
|
93 |
|
|
94 |
SOURCEFILES: %(APPLICATION)_SOURCES \
|
|
95 |
stx_SOURCES
|
|
96 |
|
|
97 |
%(SOURCE_RULES)
|
|
98 |
%(STX_SOURCE_RULES)
|
|
99 |
|
|
100 |
RESOURCEFILES: %(APPLICATION)_RESOURCES %(APPLICATION)_BITMAPS %(ADDITIONAL_RESOURCE_TARGETS) \
|
|
101 |
stx_RESOURCES stx_STYLES stx_BITMAPS
|
|
102 |
|
|
103 |
%(RESOURCE_RULES)
|
|
104 |
%(STX_RESOURCE_RULES)
|
|
105 |
|
|
106 |
%(PREREQUISITES_LIBS)
|
|
107 |
%(SUBPROJECTS_LIBS)
|
|
108 |
|
|
109 |
%(ADDITIONAL_RULES)
|
|
110 |
|
|
111 |
%(ADDITIONAL_RULES_SVN)
|
|
112 |
|
|
113 |
clean::
|
|
114 |
-rm -f *.so %(APPLICATION).$(O)
|
|
115 |
|
|
116 |
clobber:: clean
|
|
117 |
-rm -f %(APPLICATION) *.img *.sav
|
|
118 |
|
|
119 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
|
|
120 |
%(DEPENDENCIES)
|
|
121 |
# ENDMAKEDEPEND --- do not remove this line
|
|
122 |
'
|
|
123 |
|
|
124 |
"Modified: / 09-08-2006 / 16:50:23 / fm"
|
|
125 |
"Created: / 29-09-2006 / 23:47:07 / cg"
|
|
126 |
"Modified: / 24-06-2009 / 21:40:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
127 |
! !
|
|
128 |
|
|
129 |
!Change methodsFor:'queries'!
|
|
130 |
|
|
131 |
isForGeneratedSubject
|
|
132 |
"
|
|
133 |
Answers true iff subject of this method is somewhat
|
|
134 |
auto-generated by some tool - just like version methods
|
|
135 |
are.
|
|
136 |
"
|
|
137 |
|
|
138 |
^ false
|
|
139 |
|
|
140 |
"Created: / 08-04-2009 / 09:45:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
141 |
"Modified: / 17-08-2009 / 18:55:20 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
142 |
! !
|
|
143 |
|
|
144 |
!Change methodsFor:'queries'!
|
|
145 |
|
|
146 |
isMethodPackageChange
|
|
147 |
^ false
|
|
148 |
|
|
149 |
"Created: / 08-04-2009 / 09:00:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
150 |
! !
|
|
151 |
|
|
152 |
!ChangeSet methodsFor:'queries'!
|
|
153 |
|
|
154 |
changesForPackage:aPackageSymbol
|
|
155 |
|
|
156 |
"
|
|
157 |
ChangeSet current changesForPackage:#'stx:goodies/libsvn'.
|
|
158 |
|
|
159 |
"
|
|
160 |
|
|
161 |
^(self select:[:aChange |
|
|
162 |
|removeThis mClass mthd|
|
|
163 |
|
|
164 |
removeThis := false.
|
|
165 |
(aChange isMethodChange or:[aChange isMethodRemoveChange]) ifTrue:[
|
|
166 |
mClass := aChange changeClass.
|
|
167 |
mClass notNil ifTrue:[
|
|
168 |
mthd := mClass compiledMethodAt:(aChange selector).
|
|
169 |
mthd isNil ifTrue:[
|
|
170 |
aChange isMethodRemoveChange ifTrue:[
|
|
171 |
removeThis := (mClass package = aPackageSymbol)
|
|
172 |
].
|
|
173 |
] ifFalse:[
|
|
174 |
removeThis := (mthd package = aPackageSymbol)
|
|
175 |
]
|
|
176 |
].
|
|
177 |
] ifFalse:[
|
|
178 |
(aChange isClassChange) ifTrue:[
|
|
179 |
(aChange changeClass notNil) ifTrue:[
|
|
180 |
removeThis := (aChange changeClass package = aPackageSymbol)
|
|
181 |
].
|
|
182 |
].
|
|
183 |
].
|
|
184 |
removeThis
|
|
185 |
])
|
|
186 |
|
|
187 |
"Created: / 05-11-2001 / 14:21:17 / cg"
|
|
188 |
"Modified: / 12-10-2006 / 16:51:27 / cg"
|
|
189 |
"Modified: / 22-10-2008 / 13:25:02 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
190 |
! !
|
|
191 |
|
|
192 |
!ChangeSet methodsFor:'utilities'!
|
|
193 |
|
|
194 |
condenseChanges
|
|
195 |
|
|
196 |
| changesToRemove changesToKeep |
|
|
197 |
changesToKeep := self class new.
|
|
198 |
changesToRemove := self class new.
|
|
199 |
self reverseDo:
|
|
200 |
[:change|
|
|
201 |
(changesToKeep anySatisfy:[:each|each isForSameAs: change])
|
|
202 |
ifTrue:[changesToRemove add: change]
|
|
203 |
ifFalse:[changesToKeep add: change]
|
|
204 |
].
|
|
205 |
self condenseChanges: changesToRemove.
|
|
206 |
|
|
207 |
"Created: / 22-10-2008 / 13:05:13 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
208 |
! !
|
|
209 |
|
|
210 |
!ChangeSet methodsFor:'utilities'!
|
|
211 |
|
|
212 |
condenseChangesForPackage2:aPackageSymbol
|
|
213 |
"remove more changes for aPackageSymbol
|
|
214 |
This is invoked when a project is checked into the repository."
|
|
215 |
|
|
216 |
|changesToRemove|
|
|
217 |
|
|
218 |
changesToRemove := self select:[:aChange |
|
|
219 |
|removeThis mClass mthd|
|
|
220 |
|
|
221 |
removeThis := false.
|
|
222 |
(aChange isMethodChange or:[aChange isMethodRemoveChange]) ifTrue:[
|
|
223 |
mClass := aChange changeClass.
|
|
224 |
mClass notNil ifTrue:[
|
|
225 |
mthd := mClass compiledMethodAt:(aChange selector).
|
|
226 |
mthd isNil ifTrue:[
|
|
227 |
removeThis := (mClass package = aPackageSymbol)
|
|
228 |
] ifFalse:[
|
|
229 |
removeThis := (mthd package = aPackageSymbol)
|
|
230 |
]
|
|
231 |
].
|
|
232 |
] ifFalse:[
|
|
233 |
(aChange isClassChange) ifTrue:[
|
|
234 |
(aChange changeClass notNil) ifTrue:[
|
|
235 |
removeThis := (aChange changeClass package = aPackageSymbol)
|
|
236 |
].
|
|
237 |
].
|
|
238 |
].
|
|
239 |
removeThis
|
|
240 |
].
|
|
241 |
|
|
242 |
self condenseChanges:changesToRemove
|
|
243 |
|
|
244 |
"Modified: / 12-10-2006 / 16:51:27 / cg"
|
|
245 |
"Created: / 09-08-2009 / 14:29:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
246 |
! !
|
|
247 |
|
|
248 |
!ChangeSet methodsFor:'utilities'!
|
|
249 |
|
|
250 |
diffSetsAgainstImage
|
|
251 |
|
|
252 |
|imageChangeSet|
|
|
253 |
|
|
254 |
imageChangeSet := self class new.
|
|
255 |
self changedClasses do:
|
|
256 |
[:class|
|
|
257 |
(class isMetaclass or:[class isPrivate]) ifFalse:
|
|
258 |
[imageChangeSet addAll:
|
|
259 |
(self class fromStream: class source asString readStream)]].
|
|
260 |
^self diffSetsAgainst: imageChangeSet
|
|
261 |
|
|
262 |
"Created: / 04-12-2007 / 16:03:28 / janfrog"
|
|
263 |
! !
|
|
264 |
|
|
265 |
!ChangeSet class methodsFor:'instance creation'!
|
|
266 |
|
|
267 |
forPackage: package
|
|
268 |
|
|
269 |
^self forPackage: package ignoreAutoloaded: false.
|
|
270 |
|
|
271 |
"Created: / 20-05-2008 / 17:56:18 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
272 |
"Modified: / 12-08-2009 / 14:23:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
273 |
! !
|
|
274 |
|
|
275 |
!ChangeSet class methodsFor:'instance creation'!
|
|
276 |
|
|
277 |
forPackage: package ignoreAutoloaded: ignoreAutoloaded
|
|
278 |
"build a changeSet for a given package"
|
|
279 |
|
|
280 |
|changeSet packageClasses packageExtensions|
|
|
281 |
|
|
282 |
packageClasses := ProjectDefinition searchForClassesWithProject: package.
|
|
283 |
packageExtensions := ProjectDefinition searchForExtensionsWithProject: package.
|
|
284 |
changeSet := self forExistingMethods: packageExtensions.
|
|
285 |
packageClasses do:
|
|
286 |
[:cls|
|
|
287 |
(ignoreAutoloaded not and:[cls isLoaded not])
|
|
288 |
ifTrue:[cls autoload].
|
|
289 |
cls isLoaded
|
|
290 |
ifTrue:
|
|
291 |
[changeSet addAll:
|
|
292 |
(self
|
|
293 |
forExistingClass:cls
|
|
294 |
withExtensions:false
|
|
295 |
extensionsOnly:false)]].
|
|
296 |
^changeSet
|
|
297 |
|
|
298 |
"Created: / 12-08-2009 / 14:22:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
299 |
! !
|
|
300 |
|
|
301 |
!Class methodsFor:'accessing'!
|
|
302 |
|
|
303 |
classFilename
|
|
304 |
"return the name of the file from which the class was compiled.
|
|
305 |
If the class was loaded via an explicit load (i.e. from the fileBrowser),
|
|
306 |
this will be an absolute path. Oherwise, it will be a basename only.
|
|
307 |
See classBaseFilename for a method which always returns the basename."
|
|
308 |
|
|
309 |
|owner info fn|
|
|
310 |
|
|
311 |
(SVN::CompatModeQuery notNil and:[SVN::CompatModeQuery query not])
|
|
312 |
ifTrue:[^SVN::Repository containerNameForClass: self].
|
|
313 |
|
|
314 |
(owner := self owningClass) notNil ifTrue:[^ owner classFilename].
|
|
315 |
classFilename notNil
|
|
316 |
ifTrue:[ ^ classFilename ].
|
|
317 |
|
|
318 |
(info := self revisionInfo) notNil ifTrue:[
|
|
319 |
fn := info fileName.
|
|
320 |
fn notNil ifTrue:[
|
|
321 |
^ fn
|
|
322 |
].
|
|
323 |
].
|
|
324 |
^ (Smalltalk fileNameForClass:self), '.st'
|
|
325 |
|
|
326 |
"
|
|
327 |
SVN::Repository classFilename
|
|
328 |
"
|
|
329 |
|
|
330 |
"Modified: / 22-10-2008 / 20:58:21 / cg"
|
|
331 |
"Modified: / 13-08-2009 / 16:07:07 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
332 |
! !
|
|
333 |
|
|
334 |
!Class methodsFor:'fileOut'!
|
|
335 |
|
|
336 |
fileOutAsMethodIn: class selector: selector
|
|
337 |
|
|
338 |
^self fileOutAsMethodIn: class selector: selector category: 'sources'
|
|
339 |
|
|
340 |
"Created: / 08-04-2009 / 20:58:06 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
341 |
! !
|
|
342 |
|
|
343 |
!Class methodsFor:'accessing'!
|
|
344 |
|
|
345 |
svnRepository
|
|
346 |
|
|
347 |
^SVN::RepositoryManager repositoryForPackage: self package
|
|
348 |
|
|
349 |
"Created: / 19-04-2008 / 18:24:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
350 |
! !
|
|
351 |
|
|
352 |
!ClassChange methodsFor:'queries'!
|
|
353 |
|
|
354 |
isForMeta
|
|
355 |
^ (self className endsWith:' class')
|
|
356 |
! !
|
|
357 |
|
|
358 |
!ClassChange methodsFor:'accessing'!
|
|
359 |
|
|
360 |
nonMetaClassName
|
|
361 |
^ self isForMeta
|
|
362 |
ifTrue:[ self className copyTo:(self className size - 6) ]
|
|
363 |
ifFalse:[ self className ]
|
|
364 |
|
|
365 |
"Created: / 06-11-2008 / 17:26:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
366 |
! !
|
|
367 |
|
|
368 |
!Filename methodsFor:'reading-directories'!
|
|
369 |
|
|
370 |
directoryContentsAsFilenamesMatching: patternOrCollectionOfThose
|
|
371 |
|
|
372 |
"
|
|
373 |
Same as directoryContentsAsFilenames, but returns only files
|
|
374 |
that matches given patterns. This uses String>>matches:
|
|
375 |
for pattern matching
|
|
376 |
"
|
|
377 |
|
|
378 |
|names|
|
|
379 |
|
|
380 |
names := self directoryContentsMatching: patternOrCollectionOfThose .
|
|
381 |
names isNil ifTrue:[^ nil].
|
|
382 |
^ names asOrderedCollection collect:[:entry | self construct:entry].
|
|
383 |
|
|
384 |
"
|
|
385 |
'/etc' asFilename
|
|
386 |
directoryContentsAsFilenamesMatching: 'pass*'
|
|
387 |
|
|
388 |
'/etc' asFilename
|
|
389 |
directoryContentsAsFilenamesMatching: #('pass*' 'nsswitch.conf')
|
|
390 |
"
|
|
391 |
|
|
392 |
"Created: / 03-06-2009 / 09:57:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
393 |
! !
|
|
394 |
|
|
395 |
!Filename methodsFor:'reading-directories'!
|
|
396 |
|
|
397 |
directoryContentsMatching: patternOrCollectionOfThose
|
|
398 |
|
|
399 |
"
|
|
400 |
Same as directoryContants, but returns only files
|
|
401 |
that matches given patterns. This uses String>>matches:
|
|
402 |
for pattern matching
|
|
403 |
"
|
|
404 |
|
|
405 |
| names patterns |
|
|
406 |
patterns := patternOrCollectionOfThose isString
|
|
407 |
ifTrue: [Array with: patternOrCollectionOfThose]
|
|
408 |
ifFalse:[patternOrCollectionOfThose].
|
|
409 |
names := self directoryContents.
|
|
410 |
names ifNil:[^nil].
|
|
411 |
^names select:
|
|
412 |
[:e|patterns anySatisfy:[:pattern|e matches: pattern]]
|
|
413 |
|
|
414 |
"
|
|
415 |
'/etc' asFilename
|
|
416 |
directoryContentsMatching: 'pass*'
|
|
417 |
|
|
418 |
'/etc' asFilename
|
|
419 |
directoryContentsMatching: #('pass*' 'nsswitch.conf')
|
|
420 |
|
|
421 |
'/etc' asFilename
|
|
422 |
directoryContentsMatching: #('does-not-exists.txt')
|
|
423 |
|
|
424 |
"
|
|
425 |
|
|
426 |
"Created: / 03-06-2009 / 09:52:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
427 |
! !
|
|
428 |
|
|
429 |
!LibraryDefinition class methodsFor:'file templates'!
|
|
430 |
|
|
431 |
make_dot_proto
|
|
432 |
|
|
433 |
^
|
|
434 |
'# $','Header','$
|
|
435 |
#
|
|
436 |
# DO NOT EDIT
|
|
437 |
# automagically generated from the projectDefinition: ',self name,'.
|
|
438 |
#
|
|
439 |
# Warning: once you modify this file, do not rerun
|
|
440 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
|
|
441 |
#
|
|
442 |
# The Makefile as generated by this Make.proto supports the following targets:
|
|
443 |
# make - compile all st-files to a classLib
|
|
444 |
# make clean - clean all temp files
|
|
445 |
# make clobber - clean all
|
|
446 |
#
|
|
447 |
# This file contains definitions for Unix based platforms.
|
|
448 |
# It shares common definitions with the win32-make in Make.spec.
|
|
449 |
|
|
450 |
#
|
|
451 |
# position (of this package) in directory hierarchy:
|
|
452 |
# (must point to ST/X top directory, for tools and includes)
|
|
453 |
TOP=%(TOP)
|
|
454 |
INCLUDE_TOP=$(TOP)/..
|
|
455 |
|
|
456 |
# subdirectories where targets are to be made:
|
|
457 |
SUBDIRS=%(SUBDIRECTORIES)
|
|
458 |
|
|
459 |
|
|
460 |
# subdirectories where Makefiles are to be made:
|
|
461 |
# (only define if different from SUBDIRS)
|
|
462 |
# ALLSUBDIRS=
|
|
463 |
|
|
464 |
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS)
|
|
465 |
|
|
466 |
# if your embedded C code requires any system includes,
|
|
467 |
# add the path(es) here:,
|
|
468 |
# ********** OPTIONAL: MODIFY the next lines ***
|
|
469 |
# LOCALINCLUDES=-Ifoo -Ibar
|
|
470 |
LOCALINCLUDES=%(LOCAL_INCLUDES)
|
|
471 |
|
|
472 |
|
|
473 |
# if you need any additional defines for embedded C code,
|
|
474 |
# add them here:,
|
|
475 |
# ********** OPTIONAL: MODIFY the next lines ***
|
|
476 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
|
|
477 |
LOCALDEFINES=%(LOCAL_DEFINES)
|
|
478 |
|
|
479 |
LIBNAME=%(LIBRARY_NAME)
|
|
480 |
STCLOCALOPT=''-package=$(PACKAGE)'' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME)
|
|
481 |
|
|
482 |
|
|
483 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
484 |
# additional C-libraries that should be pre-linked with the class-objects
|
|
485 |
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES)
|
|
486 |
LOCAL_SHARED_LIBS=%(ADDITIONAL_SHARED_LINK_LIBRARIES)
|
|
487 |
|
|
488 |
|
|
489 |
# ********** OPTIONAL: MODIFY the next line ***
|
|
490 |
# additional C targets or libraries should be added below
|
|
491 |
LOCAL_EXTRA_TARGETS=
|
|
492 |
|
|
493 |
OBJS= $(COMMON_OBJS) $(UNIX_OBJS)
|
|
494 |
|
|
495 |
%(ADDITIONAL_DEFINITIONS)
|
|
496 |
|
|
497 |
all:: preMake %(PRIMARY_TARGET) postMake
|
|
498 |
|
|
499 |
pre_objs:: %(ADDITIONAL_TARGETS) %(ADDITIONAL_TARGETS_SVN)
|
|
500 |
|
|
501 |
%(ADDITIONAL_RULES)
|
|
502 |
|
|
503 |
%(ADDITIONAL_RULES_SVN)
|
|
504 |
|
|
505 |
# add more install actions here
|
|
506 |
install::
|
|
507 |
|
|
508 |
# add more install actions for aux-files (resources) here
|
|
509 |
installAux::
|
|
510 |
|
|
511 |
# add more preMake actions here
|
|
512 |
preMake::
|
|
513 |
|
|
514 |
# add more postMake actions here
|
|
515 |
postMake:: cleanjunk
|
|
516 |
|
|
517 |
prereq: $(REQUIRED_SUPPORT_DIRS)
|
|
518 |
%(MAKE_PREREQUISITES)
|
|
519 |
|
|
520 |
cleanjunk::
|
|
521 |
|
|
522 |
clean::
|
|
523 |
%(TAB)-rm -f *.o *.H
|
|
524 |
|
|
525 |
clobber:: clean
|
|
526 |
%(TAB)-rm -f *.so *.dll
|
|
527 |
|
|
528 |
',
|
|
529 |
"
|
|
530 |
$(INSTALLBASE)::
|
|
531 |
%(TAB)@test -d $@ || mkdir $@
|
|
532 |
|
|
533 |
$(INSTALLBASE)/packages:: $(INSTALLBASE)
|
|
534 |
%(TAB)@test -d $@ || mkdir $@
|
|
535 |
|
|
536 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages
|
|
537 |
%(TAB)@test -d $@ || mkdir $@
|
|
538 |
|
|
539 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE)
|
|
540 |
%(TAB)@test -d $@ || mkdir $@
|
|
541 |
|
|
542 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx
|
|
543 |
%(TAB)@test -d $@ || mkdir $@
|
|
544 |
|
|
545 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
|
|
546 |
%(TAB)@test -d $@ || mkdir $@
|
|
547 |
"
|
|
548 |
'
|
|
549 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
|
|
550 |
%(DEPENDENCIES)
|
|
551 |
# ENDMAKEDEPEND --- do not remove this line
|
|
552 |
|
|
553 |
'
|
|
554 |
|
|
555 |
"Created: / 08-08-2006 / 20:45:36 / fm"
|
|
556 |
"Modified: / 09-08-2006 / 16:50:23 / fm"
|
|
557 |
"Modified: / 14-09-2006 / 15:48:02 / cg"
|
|
558 |
"Modified: / 24-06-2009 / 21:39:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
559 |
! !
|
|
560 |
|
|
561 |
!Method methodsFor:'accessing'!
|
|
562 |
|
|
563 |
makeSourceFileAbsolute
|
|
564 |
|
|
565 |
"
|
|
566 |
Makes a source file reference absolute.
|
|
567 |
This is required by SVN, because svn working copy
|
|
568 |
is in package path, so it's existence may corrupt source
|
|
569 |
files.
|
|
570 |
"
|
|
571 |
|
|
572 |
| fileStream |
|
|
573 |
|
|
574 |
"check whether my source is in external file. If not, this is noop"
|
|
575 |
sourcePosition ifNil:[^nil].
|
|
576 |
"already absolute"
|
|
577 |
source asFilename isAbsolute ifTrue:[^self].
|
|
578 |
fileStream := self rawSourceStream.
|
|
579 |
fileStream isFileStream ifTrue:
|
|
580 |
[source := fileStream fileName asAbsoluteFilename pathName].
|
|
581 |
|
|
582 |
"
|
|
583 |
(Method compiledMethodAt:#mclass:)
|
|
584 |
makeSourceFileAbsolute
|
|
585 |
"
|
|
586 |
|
|
587 |
"Created: / 21-08-2009 / 17:24:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
588 |
! !
|
|
589 |
|
|
590 |
!MethodChange methodsFor:'queries'!
|
|
591 |
|
|
592 |
isForGeneratedSubject
|
|
593 |
"
|
|
594 |
Answers true iff subject of this method is somewhat
|
|
595 |
auto-generated by some tool - just like version methods
|
|
596 |
are.
|
|
597 |
"
|
|
598 |
|
|
599 |
^self isForMeta and: [self selector = #version]
|
|
600 |
|
|
601 |
"Created: / 17-08-2009 / 18:56:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
602 |
! !
|
|
603 |
|
|
604 |
!MethodChange methodsFor:'printing & storing'!
|
|
605 |
|
|
606 |
printOn:aStream
|
|
607 |
"append a user printed representation of the receiver to aStream.
|
|
608 |
The format is suitable for a human - not meant to be read back."
|
|
609 |
|
|
610 |
aStream
|
|
611 |
nextPutAll:(self className ? 'unnamed');
|
|
612 |
nextPutAll:'>>';
|
|
613 |
nextPutAll:(selector ? '?');
|
|
614 |
nextPutAll:' {';
|
|
615 |
nextPutAll:(methodCategory ? '?');
|
|
616 |
nextPutAll:'}'
|
|
617 |
|
|
618 |
"Modified: / 04-10-2006 / 16:46:01 / cg"
|
|
619 |
"Modified: / 07-11-2008 / 08:29:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
620 |
! !
|
|
621 |
|
|
622 |
!NewLauncher methodsFor:'change & update'!
|
|
623 |
|
|
624 |
infoLineTemplate
|
|
625 |
"available values:
|
|
626 |
PACKAGE - the current packageID
|
|
627 |
PACKAGEOREMPTY - the current packageID or empty if its __NoPackage__
|
|
628 |
IMAGE - the current snapshot image
|
|
629 |
CVS - the CVS source repository or empty
|
|
630 |
DB - the Store source repository DB or empty
|
|
631 |
SVN_WORKING_COPY- the SVN working copy dir or empty
|
|
632 |
NOREPOSITORY - the tring 'No Repository' empty
|
|
633 |
NS - the default namespace, or empty (if Smalltalk)
|
|
634 |
PROJECTDIR - the default fileOut directory or empty (if current)
|
|
635 |
"
|
|
636 |
|
|
637 |
^ '%(PACKAGEOREMPTY)%(IMAGE) %(CVS)%(DB)%(SVN_WORKING_COPY)'
|
|
638 |
"/ ^ '%(PACKAGEOREMPTY)%(IMAGE)%(CVS)%(DB)%(NOREPOSITORY)%(NS)'
|
|
639 |
"/ ^ '%(PACKAGE)%(IMAGE)%(CVS)%(DB)%(NOREPOSITORY)%(NS)%(PROJECTDIR)'
|
|
640 |
|
|
641 |
"Modified: / 30-09-2008 / 12:45:49 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
642 |
! !
|
|
643 |
|
|
644 |
!NewLauncher methodsFor:'change & update'!
|
|
645 |
|
|
646 |
updateInfo
|
|
647 |
"update the infoView from the current project"
|
|
648 |
|
|
649 |
|project projectName projectDir packageName packageNameOrNil defNameSpace projectInfo
|
|
650 |
cvsRepository storeDB image bindings|
|
|
651 |
|
|
652 |
(Project notNil and:[(project := Project current) notNil]) ifTrue:[
|
|
653 |
projectName := project name.
|
|
654 |
projectDir := project directory.
|
|
655 |
packageName := packageNameOrNil := project package.
|
|
656 |
defNameSpace := project defaultNameSpace.
|
|
657 |
packageNameOrNil = Project noProjectID ifTrue:[
|
|
658 |
packageNameOrNil := nil
|
|
659 |
].
|
|
660 |
].
|
|
661 |
defNameSpace isNil ifTrue:[
|
|
662 |
defNameSpace := Smalltalk.
|
|
663 |
].
|
|
664 |
image := ((ObjectMemory imageName ? 'none') asFilename baseName).
|
|
665 |
|
|
666 |
SourceCodeManager notNil ifTrue:[
|
|
667 |
SourceCodeManager isCVS ifTrue:[
|
|
668 |
cvsRepository := SourceCodeManager repositoryName.
|
|
669 |
(cvsRepository notNil and:[cvsRepository startsWith:':pserver:']) ifTrue:[
|
|
670 |
cvsRepository := cvsRepository copyFrom:':pserver:'size+1.
|
|
671 |
].
|
|
672 |
] ifFalse:[
|
|
673 |
SourceCodeManager isStore ifTrue:[
|
|
674 |
storeDB := SourceCodeManager hostAndDBName
|
|
675 |
]
|
|
676 |
]
|
|
677 |
].
|
|
678 |
|
|
679 |
bindings := Dictionary new.
|
|
680 |
packageName isNil ifTrue:[
|
|
681 |
bindings
|
|
682 |
at:'PACKAGE'
|
|
683 |
put:''.
|
|
684 |
] ifFalse:[
|
|
685 |
bindings
|
|
686 |
at:'PACKAGE'
|
|
687 |
put:((resources string:'Pkg') allBold,':'
|
|
688 |
,(packageName asText colorizeAllWith:(Color blue darkened)),' ').
|
|
689 |
].
|
|
690 |
packageNameOrNil isNil ifTrue:[
|
|
691 |
bindings
|
|
692 |
at:'PACKAGEOREMPTY'
|
|
693 |
put:''.
|
|
694 |
] ifFalse:[
|
|
695 |
bindings
|
|
696 |
at:'PACKAGEOREMPTY'
|
|
697 |
put:((resources string:'Pkg') allBold,':'
|
|
698 |
,(packageNameOrNil asText colorizeAllWith:(Color blue darkened)),' ').
|
|
699 |
].
|
|
700 |
|
|
701 |
bindings
|
|
702 |
at:'IMAGE'
|
|
703 |
put:((resources string:'Img') allBold,':'
|
|
704 |
,(image asText colorizeAllWith:(Color blue darkened)),' ').
|
|
705 |
|
|
706 |
cvsRepository isNil ifTrue:[
|
|
707 |
bindings
|
|
708 |
at:'CVS'
|
|
709 |
put:''
|
|
710 |
] ifFalse:[
|
|
711 |
bindings
|
|
712 |
at:'CVS'
|
|
713 |
put:((resources string:'CVS') allBold,':'
|
|
714 |
,(cvsRepository asText colorizeAllWith:(Color blue darkened)),' ').
|
|
715 |
].
|
|
716 |
storeDB isNil ifTrue:[
|
|
717 |
bindings
|
|
718 |
at:'DB'
|
|
719 |
put:''.
|
|
720 |
] ifFalse:[
|
|
721 |
bindings
|
|
722 |
at:'DB'
|
|
723 |
put:((resources string:'DB') allBold,':'
|
|
724 |
,(storeDB asText colorizeAllWith:(Color blue darkened)),' ').
|
|
725 |
].
|
|
726 |
(cvsRepository isNil and:[storeDB isNil]) ifTrue:[
|
|
727 |
bindings
|
|
728 |
at:'NOREPOSITORY'
|
|
729 |
put:' >','No Repository'allBold,'< '.
|
|
730 |
] ifFalse:[
|
|
731 |
bindings
|
|
732 |
at:'NOREPOSITORY'
|
|
733 |
put:''.
|
|
734 |
].
|
|
735 |
|
|
736 |
bindings
|
|
737 |
at:'NS'
|
|
738 |
put:( defNameSpace == Smalltalk ifTrue:'' ifFalse:[ '"',defNameSpace name,'" '] ).
|
|
739 |
|
|
740 |
bindings
|
|
741 |
at:'PROJECTDIR'
|
|
742 |
put:((resources string:'Dir') allBold,':'
|
|
743 |
, (projectDir contractTo: 30)),' '.
|
|
744 |
|
|
745 |
SVN::RepositoryManager enabled
|
|
746 |
ifTrue:
|
|
747 |
[bindings
|
|
748 |
at: 'SVN_WORKING_COPY'
|
|
749 |
put: ('Working copy' allBold, ': ',
|
|
750 |
(SVN::RepositoryManager current workingCopyBase asFilename baseName asString colorizeAllWith:(Color blue darkened)))]
|
|
751 |
ifFalse:
|
|
752 |
[bindings
|
|
753 |
at: 'SVN_WORKING_COPY'
|
|
754 |
put: ''].
|
|
755 |
|
|
756 |
|
|
757 |
projectInfo := self infoLineTemplate bindWithArguments:bindings.
|
|
758 |
self infoLabelHolder value:projectInfo.
|
|
759 |
^projectInfo.
|
|
760 |
|
|
761 |
"Modified: / 30-09-2008 / 12:46:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
762 |
! !
|
|
763 |
|
|
764 |
!ProjectDefinition class methodsFor:'description - compilation'!
|
|
765 |
|
|
766 |
additionalRulesSvn_make_dot_proto
|
|
767 |
|
|
768 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^''].
|
|
769 |
|
|
770 |
^ String streamContents:
|
|
771 |
[:s|s
|
|
772 |
nextPutLine:'update-svn-revision:';
|
|
773 |
tab; nextPutLine: 'sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"''$(shell svnversion -n)''\"\$$\"/g" \';
|
|
774 |
tab; tab; nextPutLine: (self name , '.st');
|
|
775 |
nextPutLine: '.PHONY: update-svn-revision']
|
|
776 |
|
|
777 |
"Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
778 |
! !
|
|
779 |
|
|
780 |
!ProjectDefinition class methodsFor:'description - compilation'!
|
|
781 |
|
|
782 |
additionalTargetsSvn_make_dot_proto
|
|
783 |
|
|
784 |
(self class includesSelector: #svnRevisionNr) ifFalse:[^''].
|
|
785 |
|
|
786 |
^ 'update-svn-revision'
|
|
787 |
|
|
788 |
"Created: / 24-06-2009 / 21:35:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
789 |
! !
|
|
790 |
|
|
791 |
!ProjectDefinition class methodsFor:'private loading'!
|
|
792 |
|
|
793 |
loadAllClassesAsAutoloaded:asAutoloaded
|
|
794 |
"load (fileIn) classes that should be present -
|
|
795 |
install as autoloaded classes marked to be autoloaded.
|
|
796 |
If asAutoloaded == true, all classes will be installed as autoloaded, even if not marked.
|
|
797 |
|
|
798 |
Answer true, if classes have been loaded"
|
|
799 |
|
|
800 |
|classNamesToLoad classNamesToAutoload hasClassesToLoad loadedClasses platformName
|
|
801 |
classesWhichFailedToLoad|
|
|
802 |
|
|
803 |
platformName := OperatingSystem platformName.
|
|
804 |
classNamesToLoad := OrderedCollection new.
|
|
805 |
classNamesToAutoload := OrderedCollection new.
|
|
806 |
|
|
807 |
self classNamesAndAttributesDo:[:eachClassname :eachAttributes | |eachClassnameSym isAutoload cls|
|
|
808 |
eachClassnameSym := eachClassname asSymbol.
|
|
809 |
isAutoload := asAutoloaded or:[eachAttributes includes:#autoload].
|
|
810 |
|
|
811 |
"no need to (re-)load an existing class, but install if should be loaded"
|
|
812 |
cls := Smalltalk loadedClassNamed:eachClassnameSym.
|
|
813 |
(cls isNil or:[cls isLoaded not and:[isAutoload not]]) ifTrue:[
|
|
814 |
(eachAttributes isEmpty
|
|
815 |
or:[(eachAttributes size == 1 and:[isAutoload])
|
|
816 |
or:[eachAttributes includes:platformName]]) ifTrue:[
|
|
817 |
hasClassesToLoad := true.
|
|
818 |
isAutoload ifTrue:[
|
|
819 |
classNamesToAutoload add:eachClassnameSym.
|
|
820 |
] ifFalse:[
|
|
821 |
classNamesToLoad add:eachClassnameSym.
|
|
822 |
].
|
|
823 |
].
|
|
824 |
].
|
|
825 |
].
|
|
826 |
|
|
827 |
hasClassesToLoad ifTrue:[
|
|
828 |
loadedClasses := OrderedCollection new.
|
|
829 |
|
|
830 |
"we need the abbreviations, since sometimes there is no 1-to-1 mapping
|
|
831 |
of class name to file name"
|
|
832 |
|
|
833 |
Smalltalk recursiveReadAllAbbreviationsFrom:self packageDirectory maxLevels:1.
|
|
834 |
|
|
835 |
"install autoloaded classes first,
|
|
836 |
some others may depend on them"
|
|
837 |
|
|
838 |
classNamesToAutoload withIndexDo:[:eachClassName :index|
|
|
839 |
ActivityNotification
|
|
840 |
raiseRequestWith: ((100 / classNamesToAutoload size ) * index) rounded
|
|
841 |
errorString: 'Autoloading class ', eachClassName.
|
|
842 |
|
|
843 |
Smalltalk
|
|
844 |
installAutoloadedClassNamed:eachClassName
|
|
845 |
category:#autoloaded "FIXME"
|
|
846 |
package:self package
|
|
847 |
revision:nil
|
|
848 |
numClassInstVars:0. "FIXME"
|
|
849 |
].
|
|
850 |
|
|
851 |
classesWhichFailedToLoad := OrderedCollection new.
|
|
852 |
classNamesToLoad withIndexDo:[:eachClassName :index|
|
|
853 |
|cls|
|
|
854 |
ActivityNotification
|
|
855 |
raiseRequestWith: ((100 / classNamesToLoad size) * index) rounded
|
|
856 |
errorString: 'Loading class ', eachClassName.
|
|
857 |
|
|
858 |
Error handle:[:ex |
|
|
859 |
"maybe, fileIn failed, because the load order is wrong.
|
|
860 |
Work around this by installing the class as autoloaded and
|
|
861 |
loading it"
|
|
862 |
|
|
863 |
classesWhichFailedToLoad add:eachClassName.
|
|
864 |
Smalltalk
|
|
865 |
installAutoloadedClassNamed:eachClassName
|
|
866 |
category:#autoloaded "FIXME"
|
|
867 |
package:self package
|
|
868 |
revision:nil
|
|
869 |
numClassInstVars:0. "FIXME"
|
|
870 |
] do:[
|
|
871 |
cls := Smalltalk
|
|
872 |
fileInClass:eachClassName
|
|
873 |
package:self package
|
|
874 |
initialize:false
|
|
875 |
lazy:false
|
|
876 |
silent:true.
|
|
877 |
cls notNil ifTrue:[
|
|
878 |
loadedClasses add:cls
|
|
879 |
].
|
|
880 |
].
|
|
881 |
].
|
|
882 |
|
|
883 |
classesWhichFailedToLoad do:[:eachClassName |
|
|
884 |
(Smalltalk at:eachClassName) autoload.
|
|
885 |
].
|
|
886 |
|
|
887 |
loadedClasses do:[:eachLoadedClass |
|
|
888 |
"do not initialize, if initialize method is inherited"
|
|
889 |
(eachLoadedClass theMetaclass implements:#initialize) ifTrue:[
|
|
890 |
eachLoadedClass initialize
|
|
891 |
].
|
|
892 |
].
|
|
893 |
^ true.
|
|
894 |
].
|
|
895 |
^ false.
|
|
896 |
|
|
897 |
"Created: / 17-08-2006 / 01:01:14 / cg"
|
|
898 |
"Modified: / 26-10-2006 / 12:30:01 / cg"
|
|
899 |
"Modified: / 16-08-2009 / 13:31:40 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
900 |
"Modified: / 22-08-2009 / 12:00:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
901 |
! !
|
|
902 |
|
|
903 |
!ProjectDefinition class methodsFor:'loading'!
|
|
904 |
|
|
905 |
loadAsAutoloaded:asAutoloaded
|
|
906 |
"load the project.
|
|
907 |
If asAutoloaded == true, install all new classes as autoloaded.
|
|
908 |
Answer true, if new classes have been installed for this package,
|
|
909 |
false if the package's classes have been already present."
|
|
910 |
|
|
911 |
|newStuffHasBeenLoaded|
|
|
912 |
|
|
913 |
self projectIsLoaded ifTrue:[^ false].
|
|
914 |
thisContext isRecursive ifTrue:[^ false].
|
|
915 |
|
|
916 |
newStuffHasBeenLoaded := false.
|
|
917 |
|
|
918 |
(self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[
|
|
919 |
"/ thisContext fullPrintAll.
|
|
920 |
Transcript show:'loading '.
|
|
921 |
asAutoloaded ifTrue:[
|
|
922 |
Transcript show:'as autoloaded '.
|
|
923 |
].
|
|
924 |
Transcript showCR:self name.
|
|
925 |
].
|
|
926 |
|
|
927 |
|
|
928 |
self activityNotification:'Executing pre-load action'.
|
|
929 |
self preLoadAction.
|
|
930 |
Class withoutUpdatingChangesDo:[
|
|
931 |
self activityNotification:'Loading prerequisities'.
|
|
932 |
self loadPreRequisitesAsAutoloaded:asAutoloaded.
|
|
933 |
asAutoloaded ifFalse:[
|
|
934 |
self loadClassLibrary.
|
|
935 |
].
|
|
936 |
|
|
937 |
self activityNotification:'Loading extensions'.
|
|
938 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | self loadExtensions.
|
|
939 |
self activityNotification:'Loading classes'.
|
|
940 |
newStuffHasBeenLoaded := newStuffHasBeenLoaded | (self loadAllClassesAsAutoloaded:asAutoloaded).
|
|
941 |
self activityNotification:'Loading sub projects'.
|
|
942 |
self loadSubProjectsAsAutoloaded:asAutoloaded.
|
|
943 |
].
|
|
944 |
self activityNotification:'Executing post-load action'.
|
|
945 |
self postLoadAction.
|
|
946 |
self projectIsLoaded:true.
|
|
947 |
|
|
948 |
^ newStuffHasBeenLoaded
|
|
949 |
|
|
950 |
"Created: / 17-08-2006 / 01:01:41 / cg"
|
|
951 |
"Modified: / 21-11-2006 / 15:07:09 / cg"
|
|
952 |
"Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
953 |
"Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
954 |
! !
|
|
955 |
|
|
956 |
!ProjectDefinition class methodsFor:'mappings'!
|
|
957 |
|
|
958 |
make_dot_proto_mappings
|
|
959 |
^ Dictionary new
|
|
960 |
at: 'TAB' put: ( Character tab asString );
|
|
961 |
at: 'TOP' put: ( self pathToTop_unix );
|
|
962 |
at: 'LIBRARY_NAME' put: ( self libraryName );
|
|
963 |
at: 'SUBDIRECTORIES' put: (self generateSubDirectories);
|
|
964 |
at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix);
|
|
965 |
at: 'LOCAL_DEFINES' put: self localDefines_unix;
|
|
966 |
at: 'GLOBAL_DEFINES' put: self globalDefines_unix;
|
|
967 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag);
|
|
968 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg);
|
|
969 |
at: 'PRIMARY_TARGET' put: (self primaryTarget_make_dot_proto);
|
|
970 |
at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto);
|
|
971 |
at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto);
|
|
972 |
at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto);
|
|
973 |
at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto);
|
|
974 |
at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto);
|
|
975 |
at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto);
|
|
976 |
at: 'ADDITIONAL_SHARED_LINK_LIBRARIES' put: (self additionalSharedLinkLibraries_make_dot_proto);
|
|
977 |
at: 'DEPENDENCIES' put: (self generateDependencies_unix);
|
|
978 |
at: 'MODULE' put: ( self module );
|
|
979 |
at: 'MODULE_DIRECTORY' put: ( self moduleDirectory );
|
|
980 |
at: 'MODULE_PATH' put: ( self moduleDirectory );
|
|
981 |
at: 'MAKE_PREREQUISITES' put: (self generateRequiredMakePrerequisites_make_dot_proto);
|
|
982 |
yourself
|
|
983 |
|
|
984 |
"Created: / 09-08-2006 / 11:20:45 / fm"
|
|
985 |
"Modified: / 09-08-2006 / 16:44:48 / fm"
|
|
986 |
"Modified: / 14-09-2006 / 18:57:52 / cg"
|
|
987 |
"Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
988 |
"Modified: / 22-08-2009 / 12:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
989 |
! !
|
|
990 |
|
|
991 |
!ProjectDefinition class methodsFor:'accessing'!
|
|
992 |
|
|
993 |
packageDirectory
|
|
994 |
|
|
995 |
^Smalltalk packageDirectoryForPackageId: self package
|
|
996 |
|
|
997 |
"Created: / 15-06-2009 / 12:01:18 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
998 |
! !
|
|
999 |
|
|
1000 |
!ProjectDefinition class methodsFor:'accessing - svn'!
|
|
1001 |
|
|
1002 |
svnRevision
|
|
1003 |
|
|
1004 |
"
|
|
1005 |
Answers SVN revision of given package. The revision is computed
|
|
1006 |
as follows:
|
|
1007 |
1) Look at package directory if there is .svn administration
|
|
1008 |
directory. If so, uses SVN to obtain SVN revision & return
|
|
1009 |
2) If svnRevisionNr return non-nil, use that as SVN revision & return
|
|
1010 |
3) If everything fails, compute maximum from all revision of all
|
|
1011 |
classes & extensions
|
|
1012 |
"
|
|
1013 |
| pkgDir revNr |
|
|
1014 |
|
|
1015 |
"1)"
|
|
1016 |
pkgDir := self packageDirectory.
|
|
1017 |
(pkgDir notNil and: [pkgDir exists and: [(pkgDir / '.svn') exists]]) ifTrue:
|
|
1018 |
[[revNr := (SVN::InfoCommand new
|
|
1019 |
workingCopy: (SVN::WorkingCopy branch: (SVN::Branch new) path: pkgDir);
|
|
1020 |
execute) anyOne revision]
|
|
1021 |
value
|
|
1022 |
"/on: Error do: [revNr := nil]
|
|
1023 |
].
|
|
1024 |
revNr ifNotNil:[^SVN::Revision number:revNr].
|
|
1025 |
"2)"
|
|
1026 |
"We have to explicitly check for existence of svnRevisionNr,
|
|
1027 |
because we don't want to invoke inherited method"
|
|
1028 |
(self class methodDictionary includesKey: #svnRevisionNr)
|
|
1029 |
ifTrue:[revNr := self perform:#svnRevisionNr].
|
|
1030 |
revNr ifNotNil:[^SVN::Revision number:(revNr asString select:[:e|e isDigit])].
|
|
1031 |
|
|
1032 |
"3)"
|
|
1033 |
revNr := (self searchForClassesWithProject: self package)
|
|
1034 |
inject: 0
|
|
1035 |
into:
|
|
1036 |
[:rev :cls|
|
|
1037 |
rev max: (cls revision ? '0') asNumber].
|
|
1038 |
^revNr ~= 0
|
|
1039 |
ifTrue: [SVN::Revision number:revNr]
|
|
1040 |
ifFalse:[SVN::Revision head]
|
|
1041 |
|
|
1042 |
"
|
|
1043 |
stx_libbasic svnRevision
|
|
1044 |
stx_goodies_libsvn svnRevision
|
|
1045 |
stx_goodies_libsvn revision
|
|
1046 |
|
|
1047 |
"
|
|
1048 |
|
|
1049 |
"Created: / 15-06-2009 / 11:54:33 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1050 |
"Modified: / 22-08-2009 / 09:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1051 |
! !
|
|
1052 |
|
|
1053 |
!ProjectDefinition class methodsFor:'code generation'!
|
|
1054 |
|
|
1055 |
svnRevisionNr_code: revisionNrOrNil
|
|
1056 |
^ String streamContents:[:s |
|
|
1057 |
s nextPutLine:'svnRevisionNr'.
|
|
1058 |
s nextPutLine:' "Return a SVN revision number of myself.'.
|
|
1059 |
s nextPutLine:' This number is updated after a commit"'.
|
|
1060 |
s cr;
|
|
1061 |
nextPutLine:' ^ "$SVN-Revision:"''', revisionNrOrNil printString , '''"$"'.
|
|
1062 |
].
|
|
1063 |
|
|
1064 |
"
|
|
1065 |
self svnRevisionNr_code
|
|
1066 |
stx_libbasic3 svnRevisionNr_code
|
|
1067 |
"
|
|
1068 |
|
|
1069 |
"Created: / 16-06-2009 / 12:12:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1070 |
"Modified: / 22-08-2009 / 09:05:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1071 |
! !
|
|
1072 |
|
|
1073 |
!Smalltalk class methodsFor:'system management-files'!
|
|
1074 |
|
|
1075 |
fileNameForClass:aClassOrClassName
|
|
1076 |
"return a actual or expected (or most wanted) filename for aClassOrClassName."
|
|
1077 |
|
|
1078 |
|cls nonMetaclass nm nm1 nm2 compatQuery|
|
|
1079 |
|
|
1080 |
|
|
1081 |
compatQuery := Smalltalk classNamed: 'SVN::CompatModeQuery'.
|
|
1082 |
(compatQuery notNil and:
|
|
1083 |
[compatQuery isLoaded and:[compatQuery query not]])
|
|
1084 |
ifTrue:
|
|
1085 |
[nm := aClassOrClassName isBehavior
|
|
1086 |
ifTrue:[aClassOrClassName name]
|
|
1087 |
ifFalse:[aClassOrClassName].
|
|
1088 |
nm := nm copyReplaceAll:$: with:$_.
|
|
1089 |
^nm].
|
|
1090 |
|
|
1091 |
aClassOrClassName isBehavior ifTrue:[
|
|
1092 |
nonMetaclass := aClassOrClassName theNonMetaclass.
|
|
1093 |
nm := nonMetaclass getClassFilename.
|
|
1094 |
nm notNil ifTrue:[^ nm asFilename withoutSuffix baseName].
|
|
1095 |
nm1 := nonMetaclass name.
|
|
1096 |
nm2 := nonMetaclass nameWithoutPrefix.
|
|
1097 |
] ifFalse:[
|
|
1098 |
cls := Smalltalk classNamed:aClassOrClassName.
|
|
1099 |
cls notNil ifTrue:[
|
|
1100 |
nonMetaclass := cls theNonMetaclass.
|
|
1101 |
nm := nonMetaclass getClassFilename.
|
|
1102 |
nm notNil ifTrue:[^ nm asFilename withoutSuffix baseName].
|
|
1103 |
nm1 := nonMetaclass name.
|
|
1104 |
nm2 := nonMetaclass nameWithoutPrefix.
|
|
1105 |
] ifFalse:[
|
|
1106 |
nm1 := aClassOrClassName.
|
|
1107 |
nm2 := (aClassOrClassName copyFrom:(aClassOrClassName lastIndexOf:$:)+1).
|
|
1108 |
].
|
|
1109 |
].
|
|
1110 |
nm1 := nm1 asSymbol.
|
|
1111 |
nm2 := nm2 asSymbol.
|
|
1112 |
|
|
1113 |
CachedAbbreviations notNil ifTrue:[
|
|
1114 |
(CachedAbbreviations includesKey:nm1) ifTrue:[
|
|
1115 |
^ (CachedAbbreviations at:nm1) asFilename baseName
|
|
1116 |
].
|
|
1117 |
(CachedAbbreviations includesKey:nm2) ifTrue:[
|
|
1118 |
^ (CachedAbbreviations at:nm2) asFilename baseName
|
|
1119 |
].
|
|
1120 |
].
|
|
1121 |
^ nm1 copyReplaceAll:$: with:$_
|
|
1122 |
|
|
1123 |
"
|
|
1124 |
Smalltalk fileNameForClass:#Complex
|
|
1125 |
Smalltalk fileNameForClass:'SmallInteger'
|
|
1126 |
Smalltalk fileNameForClass:'UnixOperatingSystem'
|
|
1127 |
Smalltalk fileNameForClass:'Launcher'
|
|
1128 |
Smalltalk fileNameForClass:'SomeUnknownClass'
|
|
1129 |
Smalltalk fileNameForClass:OSI::FTAMOperation
|
|
1130 |
Smalltalk fileNameForClass:'OSI::Foobar'
|
|
1131 |
Smalltalk fileNameForClass:(Workflow::UnsuccessfulFinishReasons)
|
|
1132 |
Workflow::UnsuccessfulFinishReasons classFilename
|
|
1133 |
"
|
|
1134 |
|
|
1135 |
"Modified: / 06-10-2006 / 16:16:01 / cg"
|
|
1136 |
"Modified: / 15-07-2009 / 20:18:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1137 |
"Modified: / 22-08-2009 / 11:57:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1138 |
! !
|
|
1139 |
|
|
1140 |
!Smalltalk class methodsFor:'system management-packages'!
|
|
1141 |
|
|
1142 |
loadPackageWithId:aPackageId asAutoloaded:doLoadAsAutoloaded
|
|
1143 |
"make certain, that some particular package is loaded into the system.
|
|
1144 |
Experimental."
|
|
1145 |
|
|
1146 |
|packageDir|
|
|
1147 |
|
|
1148 |
packageDir := self packageDirectoryForPackageId:aPackageId.
|
|
1149 |
packageDir isNil ifTrue:[
|
|
1150 |
(aPackageId includes:$:) ifFalse:[
|
|
1151 |
"/ assume stx
|
|
1152 |
packageDir := self packageDirectoryForPackageId:('stx:',aPackageId).
|
|
1153 |
].
|
|
1154 |
].
|
|
1155 |
(packageDir isNil and: [SVN::RepositoryManager notNil]) ifTrue:
|
|
1156 |
[^self loadPackageWithId: aPackageId fromRepositoryAsAutoloaded: doLoadAsAutoloaded].
|
|
1157 |
|
|
1158 |
^ self
|
|
1159 |
loadPackageWithId:aPackageId
|
|
1160 |
fromDirectory:packageDir
|
|
1161 |
asAutoloaded:doLoadAsAutoloaded.
|
|
1162 |
|
|
1163 |
"
|
|
1164 |
Smalltalk loadPackageWithId:'stx:libbasic'
|
|
1165 |
Smalltalk loadPackageWithId:'stx:goodies/persistency'
|
|
1166 |
Smalltalk loadPackageWithId:'exept:ctypes'
|
|
1167 |
"
|
|
1168 |
|
|
1169 |
"Modified: / 07-12-2006 / 15:04:39 / cg"
|
|
1170 |
"Modified: / 28-10-2008 / 15:56:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1171 |
"Modified: / 22-08-2009 / 11:58:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
1172 |
! !
|
|
1173 |
|
|
1174 |
!Smalltalk class methodsFor:'system management-packages'!
|
|
1175 |
|
|
1176 |
loadPackageWithId:aPackageId fromRepositoryAsAutoloaded:doLoadAsAutoloaded
|
|
1177 |
|
|
1178 |
self
|
|
1179 |
loadPackageWithId:aPackageId
|
|
1180 |
fromRepositoryAsAutoloaded:doLoadAsAutoloaded
|
|
1181 |
usingRepositoryManager: SVN::RepositoryManager current
|
|
1182 |
|
|
1183 |
"Created: / 28-10-2008 / 15:53:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1184 |
"Modified: / 09-04-2009 / 17:20:43 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1185 |
! !
|
|
1186 |
|
|
1187 |
!Smalltalk class methodsFor:'system management-packages'!
|
|
1188 |
|
|
1189 |
loadPackageWithId:aPackageId fromRepositoryAsAutoloaded:doLoadAsAutoloaded usingRepositoryManager: manager
|
|
1190 |
|
|
1191 |
| retval loadBlock |
|
|
1192 |
loadBlock :=
|
|
1193 |
[| repo packageDir |
|
|
1194 |
repo := manager repositoryForPackage: aPackageId.
|
|
1195 |
retval := (repo notNil and:[repo exists])
|
|
1196 |
ifTrue:
|
|
1197 |
[repo workingCopy checkout.
|
|
1198 |
packageDir := self packageDirectoryForPackageId:aPackageId.
|
|
1199 |
self
|
|
1200 |
loadPackageWithId:aPackageId
|
|
1201 |
fromDirectory:packageDir
|
|
1202 |
asAutoloaded:doLoadAsAutoloaded]
|
|
1203 |
ifFalse:
|
|
1204 |
[false]].
|
|
1205 |
|
|
1206 |
(Query query == true)
|
|
1207 |
ifTrue:
|
|
1208 |
[loadBlock value]
|
|
1209 |
ifFalse:
|
|
1210 |
[Query answer: true do:
|
|
1211 |
[SVN::ProgressDialog
|
|
1212 |
openOn: loadBlock
|
|
1213 |
title: ' Loading...'
|
|
1214 |
subtitle: aPackageId asText allItalic]].
|
|
1215 |
^retval
|
|
1216 |
|
|
1217 |
"Created: / 09-04-2009 / 17:20:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1218 |
! !
|
|
1219 |
|
|
1220 |
!TimestampChange methodsFor:'applying'!
|
|
1221 |
|
|
1222 |
apply
|
|
1223 |
"apply the change"
|
|
1224 |
|
|
1225 |
"Nothing to do"
|
|
1226 |
|
|
1227 |
"Created: / 06-11-2008 / 08:57:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1228 |
! !
|
|
1229 |
|
|
1230 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-class'!
|
|
1231 |
|
|
1232 |
classMenuSubversionCommit
|
|
1233 |
|
|
1234 |
| classesPerPackage |
|
|
1235 |
classesPerPackage := Dictionary new.
|
|
1236 |
self selectedClasses value do:
|
|
1237 |
[:class|
|
|
1238 |
(classesPerPackage at: class theNonMetaclass package ifAbsentPut:[Set new])
|
|
1239 |
add: class theNonMetaclass].
|
|
1240 |
classesPerPackage keysAndValuesDo:
|
|
1241 |
[:package :classes| | repo |
|
|
1242 |
repo := SVN::RepositoryManager repositoryForPackage:package.
|
|
1243 |
SVN::CommitWizard new
|
|
1244 |
task: (repo workingCopy commitTask
|
|
1245 |
classes: classes;
|
|
1246 |
extensionMethods: #()
|
|
1247 |
yourself);
|
|
1248 |
open]
|
|
1249 |
|
|
1250 |
"Modified: / 16-06-2009 / 21:05:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1251 |
! !
|
|
1252 |
|
|
1253 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-class'!
|
|
1254 |
|
|
1255 |
classMenuSubversionCompareImageWithRevision
|
|
1256 |
|
|
1257 |
| cls branch revisionLog revision |
|
|
1258 |
cls := self theSingleSelectedClass theNonMetaclass.
|
|
1259 |
branch := cls theNonMetaclass svnRepository branch.
|
|
1260 |
revisionLog := branch log: cls.
|
|
1261 |
revision := SVN::RevisionSelectionDialog openOn: revisionLog.
|
|
1262 |
self classMenuSubversionCompareImageWithRevision: revision
|
|
1263 |
|
|
1264 |
"Created: / 19-04-2008 / 18:38:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1265 |
! !
|
|
1266 |
|
|
1267 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-class'!
|
|
1268 |
|
|
1269 |
classMenuSubversionCompareImageWithRevision: revision
|
|
1270 |
|
|
1271 |
| cls branch diffSet |
|
|
1272 |
revision ifNil:[^self].
|
|
1273 |
cls := self theSingleSelectedClass theNonMetaclass.
|
|
1274 |
branch := cls theNonMetaclass svnRepository branch.
|
|
1275 |
SVN::ProgressDialog
|
|
1276 |
openOn:[diffSet := branch diffSetForClass: cls betweenImageAndRevision: revision]
|
|
1277 |
title: 'Creating diffset for class ', cls fullName asText allItalic
|
|
1278 |
subtitle:
|
|
1279 |
('Package: ' , branch package asText allItalic ,
|
|
1280 |
' Revision ' , revision asString).
|
|
1281 |
Tools::SmalltalkDiffTool
|
|
1282 |
openOnDiffSet:diffSet
|
|
1283 |
labelA: 'Image'
|
|
1284 |
labelB: 'r',revision printString
|
|
1285 |
title: 'Differences of ',cls fullName,' between image and revision ',revision printString.
|
|
1286 |
|
|
1287 |
"Created: / 19-04-2008 / 18:54:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1288 |
"Modified: / 09-08-2009 / 14:14:37 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1289 |
! !
|
|
1290 |
|
|
1291 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-class'!
|
|
1292 |
|
|
1293 |
classMenuSubversionCompareImageWithRevisionHead
|
|
1294 |
|
|
1295 |
self classMenuSubversionCompareImageWithRevision: SVN::Revision head
|
|
1296 |
|
|
1297 |
"Created: / 19-04-2008 / 18:56:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1298 |
! !
|
|
1299 |
|
|
1300 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-class'!
|
|
1301 |
|
|
1302 |
classMenuSubversionUpdate
|
|
1303 |
"automatically generated by UIEditor ..."
|
|
1304 |
|
|
1305 |
"*** the code below performs no action"
|
|
1306 |
"*** (except for some feedback on the Transcript)"
|
|
1307 |
"*** Please change as required and accept in the browser."
|
|
1308 |
"*** (and replace this comment by something more useful ;-)"
|
|
1309 |
|
|
1310 |
"action to be added ..."
|
|
1311 |
|
|
1312 |
Transcript showCR:self class name, ': action for #classMenuSubversionUpdate ...'.
|
|
1313 |
! !
|
|
1314 |
|
|
1315 |
!Tools::NewSystemBrowser methodsFor:'menus-dynamic'!
|
|
1316 |
|
|
1317 |
projectMenuSubversionBranches
|
|
1318 |
|
|
1319 |
<resource: #programMenu >
|
|
1320 |
|
|
1321 |
| menu repository |
|
|
1322 |
menu := Menu new.
|
|
1323 |
repository := self selectedProjectSubversionRepository.
|
|
1324 |
repository branches do:
|
|
1325 |
[:branch|
|
|
1326 |
menu addItem:
|
|
1327 |
(MenuItem new
|
|
1328 |
label: branch name;
|
|
1329 |
choiceValue: branch;
|
|
1330 |
choice:(repository workingCopy branch);
|
|
1331 |
enabled:(repository workingCopy branch) = branch;
|
|
1332 |
yourself)
|
|
1333 |
].
|
|
1334 |
|
|
1335 |
^menu
|
|
1336 |
|
|
1337 |
"Created: / 19-04-2008 / 11:06:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1338 |
! !
|
|
1339 |
|
|
1340 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1341 |
|
|
1342 |
projectMenuSubversionBrowseWorkingCopy
|
|
1343 |
|
|
1344 |
self selectedProjects value do:
|
|
1345 |
[:package|
|
|
1346 |
| pkg repo |
|
|
1347 |
pkg := self theSingleSelectedProject.
|
|
1348 |
repo := (SVN::RepositoryManager repositoryForPackage: pkg) .
|
|
1349 |
FileBrowserV2 openOn: repo workingCopy path]
|
|
1350 |
|
|
1351 |
"Created: / 09-04-2009 / 13:19:43 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1352 |
! !
|
|
1353 |
|
|
1354 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1355 |
|
|
1356 |
projectMenuSubversionCommit
|
|
1357 |
|
|
1358 |
self selectedProjects value do:
|
|
1359 |
[:package|
|
|
1360 |
| repo |
|
|
1361 |
repo := SVN::RepositoryManager repositoryForPackage:package.
|
|
1362 |
SVN::CommitWizard new
|
|
1363 |
task: repo workingCopy commitTask;
|
|
1364 |
open]
|
|
1365 |
|
|
1366 |
"Created: / 01-04-2008 / 19:02:42 / janfrog"
|
|
1367 |
"Modified: / 16-08-2009 / 19:17:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1368 |
! !
|
|
1369 |
|
|
1370 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1371 |
|
|
1372 |
projectMenuSubversionCommitMode
|
|
1373 |
|
|
1374 |
^(PluggableAdaptor on: self theSingleSelectedProject)
|
|
1375 |
getBlock:
|
|
1376 |
[:prjHolder| | wc |
|
|
1377 |
wc := SVN::RepositoryManager workingCopyForPackage: self theSingleSelectedProject value.
|
|
1378 |
wc ifNotNil:[wc commitMode] ifNil:[nil]]
|
|
1379 |
putBlock:
|
|
1380 |
[:prjHolder :value| | wc |
|
|
1381 |
wc := SVN::RepositoryManager workingCopyForPackage: self theSingleSelectedProject value.
|
|
1382 |
wc ifNotNil:[wc commitMode:value]]
|
|
1383 |
updateBlock:
|
|
1384 |
[:prjHolder :aspect :value|true].
|
|
1385 |
|
|
1386 |
"Created: / 13-08-2009 / 15:05:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1387 |
! !
|
|
1388 |
|
|
1389 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1390 |
|
|
1391 |
projectMenuSubversionCompareExtensionsInImageWithRevision
|
|
1392 |
|
|
1393 |
| pkg branch revisionLog revision |
|
|
1394 |
pkg := self theSingleSelectedProject.
|
|
1395 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1396 |
revisionLog := branch log:(branch repository containerNameForExtensions).
|
|
1397 |
revision := SVN::RevisionSelectionDialog openOn: revisionLog.
|
|
1398 |
self projectMenuSubversionCompareExtensionsInImageWithRevision: revision
|
|
1399 |
|
|
1400 |
"Created: / 19-04-2008 / 19:13:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1401 |
! !
|
|
1402 |
|
|
1403 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1404 |
|
|
1405 |
projectMenuSubversionCompareExtensionsInImageWithRevision: revision
|
|
1406 |
|
|
1407 |
| pkg diffSet branch|
|
|
1408 |
revision ifNil:[^self].
|
|
1409 |
pkg := self theSingleSelectedProject.
|
|
1410 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1411 |
SVN::ProgressDialog
|
|
1412 |
openOn:[diffSet := branch diffSetForExtensionsBetweenImageAndRevision: revision.]
|
|
1413 |
title: 'Creating diffset for extensions'
|
|
1414 |
subtitle:
|
|
1415 |
('Package: ' , branch package asText allItalic ,
|
|
1416 |
' Revision ' , revision asString).
|
|
1417 |
Tools::SmalltalkDiffTool
|
|
1418 |
openOnDiffSet:diffSet
|
|
1419 |
labelA: 'Image'
|
|
1420 |
labelB: 'r',revision printString
|
|
1421 |
title: 'Differences of extensions for ',pkg,' between image and revision ',revision printString.
|
|
1422 |
|
|
1423 |
"Created: / 19-04-2008 / 19:13:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1424 |
"Modified: / 09-08-2009 / 14:14:15 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1425 |
! !
|
|
1426 |
|
|
1427 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1428 |
|
|
1429 |
projectMenuSubversionCompareImageWithRevision
|
|
1430 |
|
|
1431 |
| pkg branch revisionLog revision |
|
|
1432 |
pkg := self theSingleSelectedProject.
|
|
1433 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1434 |
revisionLog := branch log:'.'.
|
|
1435 |
revision := SVN::RevisionSelectionDialog openOn: revisionLog.
|
|
1436 |
self projectMenuSubversionCompareImageWithRevision: revision
|
|
1437 |
|
|
1438 |
"Created: / 20-05-2008 / 18:09:20 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1439 |
! !
|
|
1440 |
|
|
1441 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1442 |
|
|
1443 |
projectMenuSubversionCompareImageWithRevision: revision
|
|
1444 |
|
|
1445 |
| pkg diffSet branch|
|
|
1446 |
revision ifNil:[^self].
|
|
1447 |
pkg := self theSingleSelectedProject.
|
|
1448 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1449 |
SVN::ProgressDialog
|
|
1450 |
openOn:[diffSet := branch diffSetBetweenImageAndRevision: revision]
|
|
1451 |
title: 'Creating diffset'
|
|
1452 |
subtitle:
|
|
1453 |
('Package: ' , branch package asText allItalic ,
|
|
1454 |
' Revision ' , revision asString).
|
|
1455 |
|
|
1456 |
Tools::SmalltalkDiffTool
|
|
1457 |
openOnDiffSet:diffSet
|
|
1458 |
labelA: 'Image'
|
|
1459 |
labelB: 'r',revision printString
|
|
1460 |
title: 'Differences for ',pkg,' between image and revision ',revision printString.
|
|
1461 |
|
|
1462 |
"Created: / 20-05-2008 / 18:09:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1463 |
"Modified: / 09-08-2009 / 14:14:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1464 |
! !
|
|
1465 |
|
|
1466 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1467 |
|
|
1468 |
projectMenuSubversionCompareImageWithRevisionHEAD
|
|
1469 |
|
|
1470 |
self projectMenuSubversionCompareImageWithRevision: SVN::Revision head
|
|
1471 |
|
|
1472 |
"Created: / 20-05-2008 / 18:10:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1473 |
! !
|
|
1474 |
|
|
1475 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1476 |
|
|
1477 |
projectMenuSubversionLoadRevision
|
|
1478 |
|
|
1479 |
^self projectMenuSubversionLoadRevision: nil
|
|
1480 |
|
|
1481 |
"Created: / 22-10-2008 / 11:49:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1482 |
"Modified: / 09-04-2009 / 09:38:17 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1483 |
! !
|
|
1484 |
|
|
1485 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1486 |
|
|
1487 |
projectMenuSubversionLoadRevision: aRevision
|
|
1488 |
|
|
1489 |
self selectedProjects value do:
|
|
1490 |
[:package|
|
|
1491 |
| pkg task |
|
|
1492 |
pkg := self theSingleSelectedProject.
|
|
1493 |
task := (SVN::RepositoryManager repositoryForPackage: pkg) updateTask.
|
|
1494 |
task revision: aRevision.
|
|
1495 |
SVN::UpdateWizard openOn: task]
|
|
1496 |
|
|
1497 |
"Created: / 09-04-2009 / 09:38:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1498 |
! !
|
|
1499 |
|
|
1500 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1501 |
|
|
1502 |
projectMenuSubversionMergeImageWithRevision
|
|
1503 |
|
|
1504 |
| pkg branch revisionLog revision |
|
|
1505 |
pkg := self theSingleSelectedProject.
|
|
1506 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1507 |
revisionLog := branch log:'.'.
|
|
1508 |
revision := SVN::RevisionSelectionDialog openOn: revisionLog.
|
|
1509 |
self projectMenuSubversionMergeImageWithRevision: revision
|
|
1510 |
|
|
1511 |
"Created: / 20-05-2008 / 23:41:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1512 |
! !
|
|
1513 |
|
|
1514 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1515 |
|
|
1516 |
projectMenuSubversionMergeImageWithRevision: revision
|
|
1517 |
|
|
1518 |
| pkg diffSet branch|
|
|
1519 |
revision ifNil:[^self].
|
|
1520 |
pkg := self theSingleSelectedProject.
|
|
1521 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1522 |
SVN::ProgressDialog
|
|
1523 |
openOn:[diffSet := branch diffSetBetweenImageAndRevision: revision]
|
|
1524 |
title: 'Creating diffset'
|
|
1525 |
subtitle:
|
|
1526 |
('Package: ' , branch package asText allItalic ,
|
|
1527 |
' Revision ' , revision asString).
|
|
1528 |
|
|
1529 |
Tools::SmalltalkMergeTool
|
|
1530 |
openOnDiffSet:diffSet
|
|
1531 |
labelA: 'Image'
|
|
1532 |
labelB: 'r',revision printString
|
|
1533 |
title: 'Merge ',pkg,' revision ',revision printString, ' into image'
|
|
1534 |
|
|
1535 |
"Created: / 20-05-2008 / 23:44:22 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1536 |
"Modified: / 09-08-2009 / 14:15:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1537 |
! !
|
|
1538 |
|
|
1539 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1540 |
|
|
1541 |
projectMenuSubversionMergeImageWithRevisionHEAD
|
|
1542 |
|
|
1543 |
self projectMenuSubversionMergeImageWithRevision: SVN::Revision head
|
|
1544 |
|
|
1545 |
"Created: / 20-05-2008 / 23:44:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1546 |
! !
|
|
1547 |
|
|
1548 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1549 |
|
|
1550 |
projectMenuSubversionRemoveWorkingCopy
|
|
1551 |
|
|
1552 |
self selectedProjects value do:
|
|
1553 |
[:package|
|
|
1554 |
| pkg repo |
|
|
1555 |
pkg := self theSingleSelectedProject.
|
|
1556 |
repo := (SVN::RepositoryManager repositoryForPackage: pkg) .
|
|
1557 |
repo workingCopy path asFilename recursiveRemove]
|
|
1558 |
|
|
1559 |
"Created: / 09-04-2009 / 13:19:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1560 |
! !
|
|
1561 |
|
|
1562 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1563 |
|
|
1564 |
projectMenuSubversionShowRevisionLog
|
|
1565 |
|
|
1566 |
| pkg branch revisionLog revision |
|
|
1567 |
pkg := self theSingleSelectedProject.
|
|
1568 |
branch := (SVN::RepositoryManager repositoryForPackage: pkg) branch.
|
|
1569 |
revisionLog := branch log:'.'.
|
|
1570 |
revision := SVN::RevisionLogBrowser openOn: revisionLog.
|
|
1571 |
|
|
1572 |
"Created: / 21-05-2008 / 09:37:51 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1573 |
"Modified: / 21-10-2008 / 19:52:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1574 |
! !
|
|
1575 |
|
|
1576 |
!Tools::NewSystemBrowser methodsFor:'menu actions-subversion-project'!
|
|
1577 |
|
|
1578 |
projectMenuSubversionUpdate
|
|
1579 |
|
|
1580 |
^self projectMenuSubversionLoadRevision: SVN::Revision head
|
|
1581 |
|
|
1582 |
"Created: / 22-10-2008 / 11:49:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1583 |
"Modified: / 09-04-2009 / 09:38:34 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1584 |
! !
|
|
1585 |
|
|
1586 |
!Tools::NewSystemBrowser methodsFor:'private-helpers'!
|
|
1587 |
|
|
1588 |
selectedProjectSubversionRepository
|
|
1589 |
|
|
1590 |
self selectedProjects value size ~= 1 ifTrue:[^nil].
|
|
1591 |
^SVN::RepositoryManager repositoryForPackage: self selectedProjects value anyOne.
|
|
1592 |
|
|
1593 |
"Created: / 19-04-2008 / 11:09:02 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1594 |
! !
|
|
1595 |
|
|
1596 |
!URL methodsFor:'queries'!
|
|
1597 |
|
|
1598 |
isValidSvnRepositoryUrl
|
|
1599 |
|
|
1600 |
^#('file' 'http' 'https' 'svn' 'svn+ssh')
|
|
1601 |
includes: self method
|
|
1602 |
|
|
1603 |
"Created: / 16-08-2009 / 16:39:38 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1604 |
! !
|
|
1605 |
|
|
1606 |
!URL methodsFor:'printing & storing'!
|
|
1607 |
|
|
1608 |
printOn: aStream
|
|
1609 |
method notNil ifTrue: [
|
|
1610 |
aStream nextPutAll: method; nextPut: $:
|
|
1611 |
].
|
|
1612 |
aStream nextPutAll: '//'.
|
|
1613 |
host notNil ifTrue: [
|
|
1614 |
aStream nextPutAll: host
|
|
1615 |
].
|
|
1616 |
port notNil ifTrue: [
|
|
1617 |
aStream nextPut: $:; nextPutAll: port printString
|
|
1618 |
].
|
|
1619 |
path notNil ifTrue: [
|
|
1620 |
aStream nextPutAll: path
|
|
1621 |
].
|
|
1622 |
(otherPart notNil and: [self hasPostData not]) ifTrue:[
|
|
1623 |
self hasFragmentPart ifTrue: [
|
|
1624 |
aStream nextPut: $#
|
|
1625 |
] ifFalse:[
|
|
1626 |
aStream nextPut: $?
|
|
1627 |
].
|
|
1628 |
aStream nextPutAll: otherPart
|
|
1629 |
].
|
|
1630 |
|
|
1631 |
"Modified: / 19-08-2009 / 13:14:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1632 |
! !
|
|
1633 |
|
|
1634 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1635 |
|
|
1636 |
svnConfigurations
|
|
1637 |
|
|
1638 |
^(self at:#'libsvn.configurations' ifAbsent:#())
|
|
1639 |
collect:[:cfg|cfg decodeAsLiteralArray]
|
|
1640 |
|
|
1641 |
"Created: / 03-10-2008 / 11:14:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1642 |
"Modified: / 19-08-2009 / 12:08:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1643 |
! !
|
|
1644 |
|
|
1645 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1646 |
|
|
1647 |
svnConfigurations: aCollection
|
|
1648 |
|
|
1649 |
"
|
|
1650 |
UserPreferences current svnConfigurations: #()
|
|
1651 |
"
|
|
1652 |
|
|
1653 |
SVN::RepositoryManager allInstances do:
|
|
1654 |
[:e|e configurations: aCollection].
|
|
1655 |
|
|
1656 |
^self
|
|
1657 |
at: #'libsvn.configurations'
|
|
1658 |
put: (aCollection asArray collect:[:cfg|cfg literalArrayEncoding])
|
|
1659 |
|
|
1660 |
"Created: / 03-10-2008 / 11:14:01 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1661 |
"Modified: / 19-08-2009 / 12:09:22 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1662 |
! !
|
|
1663 |
|
|
1664 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1665 |
|
|
1666 |
svnEnabled
|
|
1667 |
|
|
1668 |
^self at:#svnEnabled ifAbsent:[true]
|
|
1669 |
|
|
1670 |
"Created: / 03-10-2008 / 11:11:39 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1671 |
! !
|
|
1672 |
|
|
1673 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1674 |
|
|
1675 |
svnEnabled: aBoolean
|
|
1676 |
|
|
1677 |
^self at:#svnEnabled put: aBoolean
|
|
1678 |
|
|
1679 |
"Created: / 03-10-2008 / 11:13:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1680 |
! !
|
|
1681 |
|
|
1682 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1683 |
|
|
1684 |
svnVerbose
|
|
1685 |
|
|
1686 |
^self at:#svnVerbose ifAbsent: false
|
|
1687 |
|
|
1688 |
"Created: / 19-03-2009 / 14:00:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1689 |
! !
|
|
1690 |
|
|
1691 |
!UserPreferences methodsFor:'accessing - subversion'!
|
|
1692 |
|
|
1693 |
svnVerbose: aBoolean
|
|
1694 |
|
|
1695 |
^self at:#svnVerbose put: aBoolean
|
|
1696 |
|
|
1697 |
"Created: / 19-03-2009 / 13:59:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
1698 |
! !
|
|
1699 |
|
|
1700 |
!XML::NodeSet methodsFor:'navigation'!
|
|
1701 |
|
|
1702 |
@ attributeName
|
|
1703 |
"XPath like processing - if singleton set, answer an value of
|
|
1704 |
atribute named attributeName, error otherwise.
|
|
1705 |
This method is used in libsvn"
|
|
1706 |
|
|
1707 |
self size = 1 ifTrue:[^self first @ attributeName].
|
|
1708 |
self error:'More than one element in node set'
|
|
1709 |
! !
|
|
1710 |
|