# HG changeset patch # User Claus Gittinger # Date 1327226841 -3600 # Node ID bacaa7ec62b1591ece750e405df52d00d5697556 # Parent 78e56e7f963878d4f4e3a204f4d3d19bd74282fa added: #defaultUsedCompiler #listOfPossibleCompilers #usedCompilerForBuild: changed: #buildWithColorizedOutputTo: #copySupportFilesForLinkage #makeWithOutputTo:errorTo: diff -r 78e56e7f9638 -r bacaa7ec62b1 ProjectBuilder.st --- a/ProjectBuilder.st Thu Jan 19 15:49:31 2012 +0100 +++ b/ProjectBuilder.st Sun Jan 22 11:07:21 2012 +0100 @@ -70,6 +70,32 @@ UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory. ! ! +!ProjectBuilder class methodsFor:'queries'! + +defaultUsedCompiler + |compiler| + + (compiler := UserPreferences current usedCompilerForBuild) notNil ifTrue:[ + ^ compiler + ]. + + OperatingSystem isMSWINDOWSlike ifTrue:[ + ^ 'bcc' + ]. + ^ 'gcc' + + "Created: / 21-01-2012 / 14:06:51 / cg" +! + +listOfPossibleCompilers + OperatingSystem isMSWINDOWSlike ifTrue:[ + ^ #('bcc' 'vc' 'lcc' 'gcc' ) + ]. + ^ #('gcc') + + "Created: / 21-01-2012 / 14:04:15 / cg" +! ! + !ProjectBuilder methodsFor:'accessing'! buildDirectory @@ -102,8 +128,10 @@ ^ OperatingSystem isUNIXlike ifTrue:['.H'] ifFalse:['.STH'] ! -usedCompiler:something +usedCompilerForBuild:something usedCompiler := something. + + "Created: / 22-01-2012 / 10:50:48 / cg" ! ! !ProjectBuilder methodsFor:'building'! @@ -137,7 +165,8 @@ ] ]; nextPutAllBlock:[:string | - lock critical:[ (string includesString:'das Ziel' )ifTrue:[self halt]. + lock critical:[ + "/ (string includesString:'das Ziel' )ifTrue:[self halt]. makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}. makeOutput nextPutAll:string. makeOutput emphasis:nil. @@ -150,12 +179,15 @@ ] ]; nextPutAllBlock:[:string | - lock critical:[ (string includesString:'das Ziel' )ifTrue:[self halt]. + lock critical:[ + "/ (string includesString:'das Ziel' )ifTrue:[self halt]. makeOutput nextPutAll:string. ] ]. self buildWithOutputTo:stdOut errorTo:stdErr. + + "Modified: / 21-01-2012 / 13:49:13 / cg" ! buildWithOutputTo:stdOut errorTo:stdErr @@ -380,7 +412,7 @@ 'support/win32/borland/cs3245.dll' 'support/win32/X11.dll' 'support/win32/Xext.dll' - 'librun/librun.dll' + 'librun/objbc/librun.dll' 'libbc/librun.lib' 'libbc/cs32i.lib' 'librun/genDate.exe' @@ -420,6 +452,8 @@ self error:'Missing file: ',dllRelativePath printString mayProceed:true. ]. ]. + + "Modified: / 21-01-2012 / 13:40:56 / cg" ! createHeaderFileFor:aClass in:packageTargetDir @@ -637,9 +671,24 @@ directory := package directory. makeCommand := ParserFlags makeCommand. - usedCompiler = 'vc' ifTrue:[ makeCommand := 'vcmake'. compilerFlag := '-DUSEVC' ]. - usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := '-DUSELCC' ]. - usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ]. + usedCompiler = 'vc' ifTrue:[ + makeCommand := 'vcmake'. "/ compilerFlag := '-DUSEVC' + ] ifFalse:[ + usedCompiler = 'lcc' ifTrue:[ + makeCommand := 'lcmake'. "/ compilerFlag := '-DUSELCC' + ] ifFalse:[ + usedCompiler = 'gcc' ifTrue:[ + makeCommand := 'make'. + ] ifFalse:[ + usedCompiler = 'bcc' ifTrue:[ + makeCommand := 'bmake'. + ] ifFalse:[ + self error. + ] + ] + ] + ]. + "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName. OperatingSystem isUNIXlike ifTrue:[ @@ -680,7 +729,7 @@ ] ] - "Modified: / 15-08-2011 / 14:49:21 / cg" + "Modified: / 21-01-2012 / 13:52:56 / cg" ! recursiveCopyDirectoryForBuild:subdir