#BUGFIX by stefan
class: ProjectDefinition class
changed:
#reasonForNotSupportedOnPlatform
#supportedOnPlatform
check whether prerequisite package are supported on platform
--- a/ProjectDefinition.st Mon Mar 11 11:59:49 2019 +0100
+++ b/ProjectDefinition.st Tue Mar 12 15:36:20 2019 +0100
@@ -8139,12 +8139,26 @@
!
reasonForNotSupportedOnPlatform
- "answer a reason string, why the package is not supported on this platform
- (if it is not, i.e. if supportedByPlatform returns false)"
-
- ^ 'not supported by this OS-platform'
+ "answer false, if this package is not suitable for
+ the current platform. The default here returns true.
+ Only to be redefined in packages which are definitely not valid
+ for the given platform. For example, the OLE package is only
+ usable under windows"
+
+ self preRequisites do:[:eachProjectDefinitionClassNameSymbol|
+ |cls|
+ cls := self definitionClassForPackage:eachProjectDefinitionClassNameSymbol.
+ cls isNil ifTrue:[
+ ^ 'Prerequisite package "', eachProjectDefinitionClassNameSymbol, '" is missing'.
+ ].
+ cls supportedOnPlatform ifFalse:[
+ ^ 'Prerequisite package "', eachProjectDefinitionClassNameSymbol, '" is not supported: ', cls reasonForNotSupportedOnPlatform.
+ ].
+ ].
+ ^ ''.
"Created: / 07-02-2019 / 14:21:54 / Claus Gittinger"
+ "Modified: / 12-03-2019 / 15:26:07 / Stefan Vogel"
!
supportedOnPlatform
@@ -8154,7 +8168,19 @@
for the given platform. For example, the OLE package is only
usable under windows"
- ^ true
+ self preRequisites do:[:eachProjectDefinitionClassNameSymbol|
+ |cls|
+ cls := self definitionClassForPackage:eachProjectDefinitionClassNameSymbol.
+ cls isNil ifTrue:[
+ ^ false. "prerequisite project is missing"
+ ].
+ cls supportedOnPlatform ifFalse:[
+ ^ false.
+ ].
+ ].
+ ^ true.
+
+ "Modified: / 12-03-2019 / 15:26:00 / Stefan Vogel"
!
whoReferences:aPackageString