ProjectDefinition.st
changeset 21259 7df4e7788299
parent 21236 df609ea04274
child 21288 886dc134d57e
child 21449 fab3dc7eb9be
--- a/ProjectDefinition.st	Tue Jan 17 14:18:45 2017 +0100
+++ b/ProjectDefinition.st	Tue Jan 17 21:02:22 2017 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -1614,17 +1616,43 @@
 !
 
 effectiveSubProjects
-    "get the subProjects, that are not excluded"
+    "get the subProjects for the current OS platform, that are not excluded"
+
+    ^ self effectiveSubProjects:OperatingSystem platformName
+
+    "Modified: / 17-01-2017 / 16:31:42 / stefan"
+!
+
+effectiveSubProjects:osSymbol
+    "get the subProjects, that are not excluded.
+     osSymbol can be #win32 or #unix (for now)."
 
     |subProjects|
 
-    subProjects := self subProjects asNewOrderedSet.
-    subProjects
-        addAll:self includedInSubProjects;
-        removeAllFoundIn:self excludedFromSubProjects;
-        remove:self package ifAbsent:[].
+    subProjects := (self subProjects, self includedInSubProjects) collect:[:eachLine|
+                        eachLine isString ifTrue:[
+                            eachLine
+                        ] ifFalse:[eachLine second = osSymbol ifTrue:[
+                            eachLine first.
+                        ] ifFalse:[
+                            nil.
+                        ]].
+                   ] as:OrderedSet.
+
+    subProjects remove:self package ifAbsent:[].
+    subProjects remove:nil ifAbsent:[].
+
+    self excludedFromSubProjects do:[:eachLine|
+        eachLine isString ifTrue:[
+            subProjects remove:eachLine ifAbsent:[]. 
+        ] ifFalse:[eachLine second = osSymbol ifTrue:[
+            subProjects remove:eachLine first ifAbsent:[].
+        ]].
+    ].
 
     ^ subProjects
+
+    "Created: / 17-01-2017 / 16:16:03 / stefan"
 !
 
 excludedFromPreRequisites_code
@@ -2227,18 +2255,19 @@
             def := self definitionClassForPackage:packageId
         ] on:PackageLoadError do:[:ex| def := nil].
     ].
-    ^ def isNil
-        ifTrue:[
-            "Still no project definition - maybe it does not exist?"
-            Transcript showCR:'Warning: no definition class for package: ', packageId.
-            ((self searchForPreRequisites:packageId)
-                fold:[:d1 :d2| d1 addAll:d2; yourself]) keys
-        ]
-        ifFalse:[ def effectivePreRequisites ]
+    ^ def isNil ifTrue:[
+        "Still no project definition - maybe it does not exist?"
+        Transcript showCR:'Warning: no definition class for package: ', packageId.
+        ((self searchForPreRequisites:packageId)
+            fold:[:d1 :d2| d1 addAll:d2; yourself]) keys
+    ] ifFalse:[ 
+        def effectivePreRequisites 
+    ]
 
     "Created: / 24-02-2011 / 22:47:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 18-11-2011 / 14:52:43 / cg"
     "Modified (format): / 19-11-2011 / 11:25:36 / cg"
+    "Modified: / 17-01-2017 / 16:55:39 / stefan"
 !
 
 referencedPreRequisites
@@ -4866,7 +4895,7 @@
     "for xxxmake.bat files"
     
     ^ String streamContents:[:s |
-        self effectiveSubProjects do:[:packageID |
+        (self effectiveSubProjects:#win32) do:[:packageID |
             |pkgLabel skipLabel joinLabel|
             
             pkgLabel := (packageID copyReplaceAll:$: with:$_) copyReplaceAll:$/ with:$_.
@@ -4892,6 +4921,7 @@
 
     "Created: / 14-09-2006 / 18:40:09 / cg"
     "Modified: / 27-09-2011 / 19:36:12 / cg"
+    "Modified: / 17-01-2017 / 16:32:45 / stefan"
 !
 
 subProjectMingwmakeCalls
@@ -8056,7 +8086,7 @@
 
     emptyOrNonProjects notEmpty ifTrue:[
         (Dialog
-            confirm:('The following projects are non-existent, empty or without description:\\    '
+            confirm:('The following subprojects are non-existent, empty or without description:\\    '
                     , ((emptyOrNonProjects
                             asSortedCollection
                                 collect:[:p | p allBold])
@@ -8149,6 +8179,7 @@
     "
 
     "Modified: / 06-03-2012 / 11:31:37 / cg"
+    "Modified: / 17-01-2017 / 16:33:56 / stefan"
 !
 
 validateOrderOfClasses