added:
authorClaus Gittinger <cg@exept.de>
Sun, 22 Jan 2012 11:07:21 +0100
changeset 2873bacaa7ec62b1
parent 2872 78e56e7f9638
child 2874 cd62528801d5
added:
#defaultUsedCompiler
#listOfPossibleCompilers
#usedCompilerForBuild:
changed:
#buildWithColorizedOutputTo:
#copySupportFilesForLinkage
#makeWithOutputTo:errorTo:
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Thu Jan 19 15:49:31 2012 +0100
     1.2 +++ b/ProjectBuilder.st	Sun Jan 22 11:07:21 2012 +0100
     1.3 @@ -70,6 +70,32 @@
     1.4      UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
     1.5  ! !
     1.6  
     1.7 +!ProjectBuilder class methodsFor:'queries'!
     1.8 +
     1.9 +defaultUsedCompiler
    1.10 +    |compiler|
    1.11 +
    1.12 +    (compiler := UserPreferences current usedCompilerForBuild) notNil ifTrue:[
    1.13 +        ^ compiler
    1.14 +    ].
    1.15 +
    1.16 +    OperatingSystem isMSWINDOWSlike ifTrue:[
    1.17 +        ^ 'bcc'
    1.18 +    ].
    1.19 +    ^ 'gcc'
    1.20 +
    1.21 +    "Created: / 21-01-2012 / 14:06:51 / cg"
    1.22 +!
    1.23 +
    1.24 +listOfPossibleCompilers
    1.25 +    OperatingSystem isMSWINDOWSlike ifTrue:[
    1.26 +        ^ #('bcc' 'vc' 'lcc' 'gcc' )
    1.27 +    ].
    1.28 +    ^ #('gcc')
    1.29 +
    1.30 +    "Created: / 21-01-2012 / 14:04:15 / cg"
    1.31 +! !
    1.32 +
    1.33  !ProjectBuilder methodsFor:'accessing'!
    1.34  
    1.35  buildDirectory
    1.36 @@ -102,8 +128,10 @@
    1.37      ^ OperatingSystem isUNIXlike ifTrue:['.H'] ifFalse:['.STH']
    1.38  !
    1.39  
    1.40 -usedCompiler:something
    1.41 +usedCompilerForBuild:something
    1.42      usedCompiler := something.
    1.43 +
    1.44 +    "Created: / 22-01-2012 / 10:50:48 / cg"
    1.45  ! !
    1.46  
    1.47  !ProjectBuilder methodsFor:'building'!
    1.48 @@ -137,7 +165,8 @@
    1.49                          ]
    1.50                      ];
    1.51                      nextPutAllBlock:[:string |
    1.52 -                        lock critical:[          (string includesString:'das Ziel' )ifTrue:[self halt].
    1.53 +                        lock critical:[          
    1.54 +                            "/ (string includesString:'das Ziel' )ifTrue:[self halt].
    1.55                              makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
    1.56                              makeOutput nextPutAll:string.
    1.57                              makeOutput emphasis:nil.
    1.58 @@ -150,12 +179,15 @@
    1.59                          ]
    1.60                      ];
    1.61                      nextPutAllBlock:[:string |
    1.62 -                        lock critical:[         (string includesString:'das Ziel' )ifTrue:[self halt].
    1.63 +                        lock critical:[         
    1.64 +                            "/ (string includesString:'das Ziel' )ifTrue:[self halt].
    1.65                              makeOutput nextPutAll:string.
    1.66                          ]
    1.67                      ].
    1.68  
    1.69      self buildWithOutputTo:stdOut errorTo:stdErr.
    1.70 +
    1.71 +    "Modified: / 21-01-2012 / 13:49:13 / cg"
    1.72  !
    1.73  
    1.74  buildWithOutputTo:stdOut errorTo:stdErr
    1.75 @@ -380,7 +412,7 @@
    1.76                      'support/win32/borland/cs3245.dll' 
    1.77                      'support/win32/X11.dll'
    1.78                      'support/win32/Xext.dll'
    1.79 -                    'librun/librun.dll'
    1.80 +                    'librun/objbc/librun.dll'
    1.81                      'libbc/librun.lib'
    1.82                      'libbc/cs32i.lib'
    1.83                      'librun/genDate.exe'
    1.84 @@ -420,6 +452,8 @@
    1.85              self error:'Missing file: ',dllRelativePath printString mayProceed:true.
    1.86          ].
    1.87      ].
    1.88 +
    1.89 +    "Modified: / 21-01-2012 / 13:40:56 / cg"
    1.90  !
    1.91  
    1.92  createHeaderFileFor:aClass in:packageTargetDir
    1.93 @@ -637,9 +671,24 @@
    1.94      directory := package directory.
    1.95  
    1.96      makeCommand := ParserFlags makeCommand.
    1.97 -    usedCompiler = 'vc' ifTrue:[ makeCommand := 'vcmake'. compilerFlag := '-DUSEVC' ].
    1.98 -    usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := '-DUSELCC' ].
    1.99 -    usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ].
   1.100 +    usedCompiler = 'vc' ifTrue:[ 
   1.101 +        makeCommand := 'vcmake'. "/ compilerFlag := '-DUSEVC' 
   1.102 +    ] ifFalse:[
   1.103 +        usedCompiler = 'lcc' ifTrue:[ 
   1.104 +            makeCommand := 'lcmake'. "/ compilerFlag := '-DUSELCC' 
   1.105 +        ] ifFalse:[
   1.106 +            usedCompiler = 'gcc' ifTrue:[ 
   1.107 +                makeCommand := 'make'. 
   1.108 +            ] ifFalse:[
   1.109 +                usedCompiler = 'bcc' ifTrue:[ 
   1.110 +                    makeCommand := 'bmake'.
   1.111 +                ] ifFalse:[
   1.112 +                    self error.
   1.113 +                ]
   1.114 +            ]
   1.115 +        ]
   1.116 +    ].
   1.117 +
   1.118      "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   1.119  
   1.120      OperatingSystem isUNIXlike ifTrue:[
   1.121 @@ -680,7 +729,7 @@
   1.122          ]
   1.123      ]
   1.124  
   1.125 -    "Modified: / 15-08-2011 / 14:49:21 / cg"
   1.126 +    "Modified: / 21-01-2012 / 13:52:56 / cg"
   1.127  !
   1.128  
   1.129  recursiveCopyDirectoryForBuild:subdir