ProjectBuilder.st
changeset 2647 aedc794b630a
parent 2644 428bb83dd360
child 2672 a1cda5d8943d
equal deleted inserted replaced
2646:fd847e43cedd 2647:aedc794b630a
     2 
     2 
     3 "{ NameSpace: Tools }"
     3 "{ NameSpace: Tools }"
     4 
     4 
     5 Object subclass:#ProjectBuilder
     5 Object subclass:#ProjectBuilder
     6 	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
     6 	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
     7 		myWorkingDirectory mySTXTopDirectory myTopDirectory'
     7 		myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream'
     8 	classVariableNames:'PreviousBuildDirectory'
     8 	classVariableNames:'PreviousBuildDirectory'
     9 	poolDictionaries:''
     9 	poolDictionaries:''
    10 	category:'System-Support-Projects'
    10 	category:'System-Support-Projects'
    11 !
    11 !
    12 
    12 
    71 
    71 
    72 build
    72 build
    73     "/ intermediate - this will move into a commonly used utility class
    73     "/ intermediate - this will move into a commonly used utility class
    74     "/ (where all the project code support will be collected).
    74     "/ (where all the project code support will be collected).
    75 
    75 
    76     |makeOutput stdOut stdErr lock|
    76     |makeOutput|
       
    77 
       
    78     makeOutput := TextStream on:(Text new:10000).
       
    79     self buildWithColorizedOutputTo:makeOutput.
       
    80 
       
    81     TextView openWith:makeOutput contents.
       
    82 !
       
    83 
       
    84 buildWithColorizedOutputTo:makeOutput
       
    85     "/ intermediate - this will move into a commonly used utility class
       
    86     "/ (where all the project code support will be collected).
       
    87 
       
    88     |stdOut stdErr lock|
    77 
    89 
    78     lock := Semaphore forMutualExclusion.
    90     lock := Semaphore forMutualExclusion.
    79     makeOutput := TextStream on:(Text new:10000).
    91 
    80     stdErr := ActorStream new
    92     stdErr := ActorStream new
    81                     nextPutBlock:[:char |
    93                     nextPutBlock:[:char |
    82                         lock critical:[
    94                         lock critical:[
    83                             makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
    95                             makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
    84                             makeOutput nextPut:char.
    96                             makeOutput nextPut:char.
   103                             makeOutput nextPutAll:char.
   115                             makeOutput nextPutAll:char.
   104                         ]
   116                         ]
   105                     ].
   117                     ].
   106 
   118 
   107     self buildWithOutputTo:stdOut errorTo:stdErr.
   119     self buildWithOutputTo:stdOut errorTo:stdErr.
   108 
       
   109     TextView openWith:makeOutput contents.
       
   110 !
   120 !
   111 
   121 
   112 buildWithOutputTo:stdOut errorTo:stdErr
   122 buildWithOutputTo:stdOut errorTo:stdErr
   113     "/ intermediate - this will move into a commonly used utility class
   123     "/ intermediate - this will move into a commonly used utility class
   114     "/ (where all the project code support will be collected).
   124     "/ (where all the project code support will be collected).