added:
#makeCommandOfCompiler:
#objDirForUsedCompiler:
changed:5 methods
--- a/ProjectBuilder.st Wed Aug 22 19:48:09 2012 +0200
+++ b/ProjectBuilder.st Mon Sep 03 21:23:09 2012 +0200
@@ -64,10 +64,13 @@
Smalltalk loadPackage:'stx:clients/Demos/foxCalcApplication' asAutoloaded:true.
builder := self new.
- builder package:'stx:clients/Demos/foxCalcApplication'.
- builder build.
+ builder
+ package:'stx:clients/Demos/foxCalcApplication';
+ build.
UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
+
+ "Modified: / 03-09-2012 / 19:23:53 / cg"
! !
!ProjectBuilder class methodsFor:'queries'!
@@ -89,7 +92,7 @@
listOfPossibleCompilers
OperatingSystem isMSWINDOWSlike ifTrue:[
- ^ #('bcc' 'vc' 'lcc' 'gcc' )
+ ^ #('bcc' 'vc' 'tcc' 'lcc' 'gcc' )
].
^ #('gcc')
@@ -287,8 +290,10 @@
"/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
dllSourceDir := myTopDirectory / packageModule / packageDirectory.
+
OperatingSystem isMSWINDOWSlike ifTrue:[
- objDir := self objDirForUsedCompiler.
+ objDir := self objDirForUsedCompiler:usedCompiler.
+
"/ dllRelativePath := objDir,'/',(libraryName,'.dll').
"/ (dllSourceDir / dllRelativePath) exists
dllRelativePaths := Array with:(objDir,'\', libraryName, '.dll').
@@ -315,7 +320,7 @@
].
].
- "Modified: / 20-08-2012 / 17:00:33 / cg"
+ "Modified: / 03-09-2012 / 20:07:23 / cg"
!
copyDirectory:relativepath
@@ -685,8 +690,32 @@
"/ stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
!
+makeCommandOfCompiler:usedCompiler
+ usedCompiler = 'bcc' ifTrue:[
+ ^ 'bmake'.
+ ].
+ usedCompiler = 'vc' ifTrue:[
+ ^ 'vcmake'. "/ compilerFlag := '-DUSEVC'
+ ].
+ usedCompiler = 'lcc' ifTrue:[
+ ^ 'lccmake'. "/ compilerFlag := '-DUSELCC'
+ ].
+ usedCompiler = 'tcc' ifTrue:[
+ ^ 'tccmake'. "/ compilerFlag := '-DUSELCC'
+ ].
+ usedCompiler = 'gcc' ifTrue:[
+ ^ 'make'.
+ ].
+ usedCompiler = 'gcc' ifTrue:[
+ ^ 'make'.
+ ].
+ self error:'unknown compiler specified'.
+
+ "Created: / 03-09-2012 / 19:46:07 / cg"
+!
+
makeWithOutputTo:stdOut errorTo:stdErr
- |module directory compilerFlag makeCommand|
+ |module directory makeCommand|
module := package module.
directory := package directory.
@@ -695,23 +724,7 @@
usedCompiler isNil ifTrue:[
usedCompiler := ParserFlags usedCompiler.
].
- 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:'no compiler specified'.
- ]
- ]
- ]
- ].
+ makeCommand := self makeCommandOfCompiler:usedCompiler.
"/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
@@ -753,16 +766,25 @@
]
]
- "Modified: / 20-07-2012 / 12:13:29 / cg"
+ "Modified: / 03-09-2012 / 19:47:15 / cg"
!
objDirForUsedCompiler
+ ^ self objDirForUsedCompiler:usedCompiler
+
+ "Created: / 20-08-2012 / 17:01:13 / cg"
+!
+
+objDirForUsedCompiler:usedCompiler
usedCompiler = 'bcc' ifTrue:[^ 'objbc'].
usedCompiler = 'vc' ifTrue:[^ 'objvc'].
+ usedCompiler = 'tcc' ifTrue:[^ 'objtcc'].
+ usedCompiler = 'lcc' ifTrue:[^ 'objlcc'].
+ usedCompiler = 'gcc' ifTrue:[^ 'obj'].
self halt:'please fill in here'.
^ 'objbc'
- "Created: / 20-08-2012 / 17:01:13 / cg"
+ "Created: / 03-09-2012 / 19:55:34 / cg"
!
recursiveCopyDirectoryForBuild:subdir