14 "{ NameSpace: Tools }" |
14 "{ NameSpace: Tools }" |
15 |
15 |
16 Object subclass:#ProjectBuilder |
16 Object subclass:#ProjectBuilder |
17 instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory |
17 instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory |
18 myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream |
18 myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream |
19 makeExeOnly makeQuick usedCompiler stdOut stdErr isQuickBuild |
19 makeExeOnly makeAppOnly makeQuick usedCompiler stdOut stdErr |
20 isLocalBuild' |
20 isQuickBuild isLocalBuild' |
21 classVariableNames:'PreviousBuildDirectory' |
21 classVariableNames:'PreviousBuildDirectory' |
22 poolDictionaries:'' |
22 poolDictionaries:'' |
23 category:'System-Support-Projects' |
23 category:'System-Support-Projects' |
24 ! |
24 ! |
25 |
25 |
157 isQuickBuild:aBoolean |
157 isQuickBuild:aBoolean |
158 "skips creation of header files, and copying of support files, if possible |
158 "skips creation of header files, and copying of support files, if possible |
159 to speedup a build. Use with care." |
159 to speedup a build. Use with care." |
160 |
160 |
161 isQuickBuild := aBoolean. |
161 isQuickBuild := aBoolean. |
|
162 ! |
|
163 |
|
164 makeAppOnly |
|
165 ^ (makeAppOnly ? false) |
|
166 ! |
|
167 |
|
168 makeAppOnly:aBoolean |
|
169 makeAppOnly := aBoolean. |
162 ! |
170 ! |
163 |
171 |
164 makeExeOnly |
172 makeExeOnly |
165 ^ (makeExeOnly ? false) |
173 ^ (makeExeOnly ? false) |
166 ! |
174 ! |
940 |
948 |
941 "Created: / 03-09-2012 / 19:46:07 / cg" |
949 "Created: / 03-09-2012 / 19:46:07 / cg" |
942 ! |
950 ! |
943 |
951 |
944 makeWithOutputTo:stdOut errorTo:stdErr |
952 makeWithOutputTo:stdOut errorTo:stdErr |
945 |module directory makeCommand forceArg| |
953 |module directory makeCommand forceArg makeTarget| |
946 |
954 |
947 module := package module. |
955 module := package module. |
948 directory := package directory. |
956 directory := package directory. |
949 |
957 |
950 makeCommand := ParserFlags makeCommand. |
958 makeCommand := ParserFlags makeCommand. |
982 errorTo:stdErr |
990 errorTo:stdErr |
983 inDirectory:(buildDirectory / module / directory) |
991 inDirectory:(buildDirectory / module / directory) |
984 onError:[:status | self error:'make failed']. |
992 onError:[:status | self error:'make failed']. |
985 ] ifFalse:[ |
993 ] ifFalse:[ |
986 (self makeExeOnly) ifTrue:[ |
994 (self makeExeOnly) ifTrue:[ |
987 self activityNotification:(makeCommand,' exe'). |
995 makeTarget := 'exe' |
|
996 ] ifFalse:[ |
|
997 (self makeAppOnly) ifTrue:[ |
|
998 makeTarget := 'app' |
|
999 ] ifFalse:[ |
|
1000 makeTarget := 'ALL_NP' |
|
1001 ]. |
|
1002 self activityNotification:(makeCommand,' ',makeTarget). |
988 OperatingSystem |
1003 OperatingSystem |
989 "/ generate the executable |
1004 "/ generate the executable |
990 executeCommand:(makeCommand,' exe',forceArg) |
1005 executeCommand:(makeCommand,' ',makeTarget,forceArg) |
991 inputFrom:nil |
|
992 outputTo:stdOut |
|
993 errorTo:stdErr |
|
994 inDirectory:(buildDirectory / module / directory) |
|
995 onError:[:status | self error:'make failed']. |
|
996 |
|
997 ] ifFalse:[ |
|
998 "/ generate the self-installable package |
|
999 self activityNotification:(makeCommand,' ALL_NP'). |
|
1000 OperatingSystem |
|
1001 executeCommand:(makeCommand,' ALL_NP') |
|
1002 inputFrom:nil |
1006 inputFrom:nil |
1003 outputTo:stdOut |
1007 outputTo:stdOut |
1004 errorTo:stdErr |
1008 errorTo:stdErr |
1005 inDirectory:(buildDirectory / module / directory) |
1009 inDirectory:(buildDirectory / module / directory) |
1006 onError:[:status | self error:'make failed']. |
1010 onError:[:status | self error:'make failed']. |