added: #loadPatchesMatching:
changed: #loadPatches
Install most of the patches after the plugins have been installed.
--- a/StandaloneStartup.st Wed Oct 19 16:55:37 2011 +0200
+++ b/StandaloneStartup.st Tue Oct 25 11:59:14 2011 +0200
@@ -827,14 +827,30 @@
!
loadPatches
- |patchesDir prevMode|
+ "load all patches in the application's patches dir"
+
+ self loadPatchesMatching:nil.
+!
+
+loadPatchesMatching:aGlobString
+ "load the patches in the applicazion's patches dir.
+ If aGlobString ist not empty or nil, only patches matching the glob
+ pattern are loaded. E.g. '[0-9]*.chg'"
+
+ |patchesDir prevMode patchesToLoad|
patchesDir := OperatingSystem pathOfSTXExecutable asFilename directory construct:'patches'.
(patchesDir exists and:[patchesDir isDirectory]) ifTrue:[
prevMode := ClassCategoryReader sourceMode.
ClassCategoryReader sourceMode:#discard.
[
- patchesDir directoryContents sort do:[:eachFilenameString |
+ patchesToLoad := patchesDir directoryContents.
+ aGlobString notEmptyOrNil ifTrue:[
+ patchesToLoad := patchesToLoad select:[:eachFilenameString|
+ aGlobString match:eachFilenameString ignoreCase:true.
+ ].
+ ].
+ patchesToLoad sort do:[:eachFilenameString |
self loadPatch:(patchesDir construct:eachFilenameString).
].
] ensure:[
@@ -1138,11 +1154,11 @@
!StandaloneStartup class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/StandaloneStartup.st,v 1.66 2011-08-18 23:54:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/StandaloneStartup.st,v 1.67 2011-10-25 09:59:14 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/StandaloneStartup.st,v 1.66 2011-08-18 23:54:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/StandaloneStartup.st,v 1.67 2011-10-25 09:59:14 stefan Exp $'
! !
StandaloneStartup initialize!