class: Tools::ProjectBuilder
authorClaus Gittinger <cg@exept.de>
Sat, 07 Jun 2014 17:02:41 +0200
changeset 3127 f28722d20fbb
parent 3126 9002c0912b90
child 3128 bb09c25b54dc
class: Tools::ProjectBuilder class definition added: #makeAppOnly #makeAppOnly: changed: #makeWithOutputTo:errorTo:
ProjectBuilder.st
--- a/ProjectBuilder.st	Sat Jun 07 16:22:32 2014 +0200
+++ b/ProjectBuilder.st	Sat Jun 07 17:02:41 2014 +0200
@@ -16,8 +16,8 @@
 Object subclass:#ProjectBuilder
 	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
 		myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream
-		makeExeOnly makeQuick usedCompiler stdOut stdErr isQuickBuild
-		isLocalBuild'
+		makeExeOnly makeAppOnly makeQuick usedCompiler stdOut stdErr
+		isQuickBuild isLocalBuild'
 	classVariableNames:'PreviousBuildDirectory'
 	poolDictionaries:''
 	category:'System-Support-Projects'
@@ -161,6 +161,14 @@
     isQuickBuild := aBoolean.
 !
 
+makeAppOnly
+    ^ (makeAppOnly ? false)
+!
+
+makeAppOnly:aBoolean
+    makeAppOnly := aBoolean.
+!
+
 makeExeOnly
     ^ (makeExeOnly ? false)
 !
@@ -942,7 +950,7 @@
 !
 
 makeWithOutputTo:stdOut errorTo:stdErr
-    |module directory makeCommand forceArg|
+    |module directory makeCommand forceArg makeTarget|
 
     module := package module.
     directory := package directory.
@@ -984,21 +992,17 @@
             onError:[:status | self error:'make failed'].
     ] ifFalse:[
         (self makeExeOnly) ifTrue:[
-            self activityNotification:(makeCommand,' exe').
+            makeTarget := 'exe'
+        ] ifFalse:[
+            (self makeAppOnly) ifTrue:[
+                makeTarget := 'app'
+            ] ifFalse:[
+                makeTarget := 'ALL_NP'
+            ].
+            self activityNotification:(makeCommand,' ',makeTarget).
             OperatingSystem
                 "/ generate the executable
-                executeCommand:(makeCommand,' exe',forceArg)
-                inputFrom:nil
-                outputTo:stdOut
-                errorTo:stdErr
-                inDirectory:(buildDirectory / module / directory)
-                onError:[:status | self error:'make failed'].
-
-        ] ifFalse:[
-            "/ generate the self-installable package
-            self activityNotification:(makeCommand,' ALL_NP').
-            OperatingSystem
-                executeCommand:(makeCommand,' ALL_NP')
+                executeCommand:(makeCommand,' ',makeTarget,forceArg)
                 inputFrom:nil
                 outputTo:stdOut
                 errorTo:stdErr