ProjectBuilder.st
changeset 2909 da16870432b5
parent 2905 d02db91a0938
child 2911 e12e4a47cfaa
     1.1 --- a/ProjectBuilder.st	Wed Aug 22 19:48:09 2012 +0200
     1.2 +++ b/ProjectBuilder.st	Mon Sep 03 21:23:09 2012 +0200
     1.3 @@ -64,10 +64,13 @@
     1.4      Smalltalk loadPackage:'stx:clients/Demos/foxCalcApplication' asAutoloaded:true.
     1.5  
     1.6      builder := self new.
     1.7 -    builder package:'stx:clients/Demos/foxCalcApplication'.
     1.8 -    builder build.
     1.9 +    builder 
    1.10 +        package:'stx:clients/Demos/foxCalcApplication';
    1.11 +        build.
    1.12  
    1.13      UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
    1.14 +
    1.15 +    "Modified: / 03-09-2012 / 19:23:53 / cg"
    1.16  ! !
    1.17  
    1.18  !ProjectBuilder class methodsFor:'queries'!
    1.19 @@ -89,7 +92,7 @@
    1.20  
    1.21  listOfPossibleCompilers
    1.22      OperatingSystem isMSWINDOWSlike ifTrue:[
    1.23 -        ^ #('bcc' 'vc' 'lcc' 'gcc' )
    1.24 +        ^ #('bcc' 'vc' 'tcc' 'lcc' 'gcc'  )
    1.25      ].
    1.26      ^ #('gcc')
    1.27  
    1.28 @@ -287,8 +290,10 @@
    1.29  
    1.30          "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
    1.31          dllSourceDir := myTopDirectory / packageModule / packageDirectory.
    1.32 +
    1.33          OperatingSystem isMSWINDOWSlike ifTrue:[
    1.34 -            objDir := self objDirForUsedCompiler.
    1.35 +            objDir := self objDirForUsedCompiler:usedCompiler.
    1.36 +
    1.37  "/            dllRelativePath := objDir,'/',(libraryName,'.dll').
    1.38  "/            (dllSourceDir / dllRelativePath) exists 
    1.39              dllRelativePaths := Array with:(objDir,'\', libraryName, '.dll').
    1.40 @@ -315,7 +320,7 @@
    1.41          ].
    1.42      ].
    1.43  
    1.44 -    "Modified: / 20-08-2012 / 17:00:33 / cg"
    1.45 +    "Modified: / 03-09-2012 / 20:07:23 / cg"
    1.46  !
    1.47  
    1.48  copyDirectory:relativepath
    1.49 @@ -685,8 +690,32 @@
    1.50  "/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
    1.51  !
    1.52  
    1.53 +makeCommandOfCompiler:usedCompiler
    1.54 +    usedCompiler = 'bcc' ifTrue:[ 
    1.55 +        ^ 'bmake'.
    1.56 +    ].
    1.57 +    usedCompiler = 'vc' ifTrue:[ 
    1.58 +        ^ 'vcmake'. "/ compilerFlag := '-DUSEVC' 
    1.59 +    ].
    1.60 +    usedCompiler = 'lcc' ifTrue:[ 
    1.61 +        ^ 'lccmake'. "/ compilerFlag := '-DUSELCC' 
    1.62 +    ].
    1.63 +    usedCompiler = 'tcc' ifTrue:[ 
    1.64 +        ^ 'tccmake'. "/ compilerFlag := '-DUSELCC' 
    1.65 +    ].
    1.66 +    usedCompiler = 'gcc' ifTrue:[ 
    1.67 +        ^ 'make'. 
    1.68 +    ].
    1.69 +    usedCompiler = 'gcc' ifTrue:[ 
    1.70 +        ^ 'make'. 
    1.71 +    ].
    1.72 +    self error:'unknown compiler specified'.
    1.73 +
    1.74 +    "Created: / 03-09-2012 / 19:46:07 / cg"
    1.75 +!
    1.76 +
    1.77  makeWithOutputTo:stdOut errorTo:stdErr
    1.78 -    |module directory compilerFlag makeCommand|
    1.79 +    |module directory makeCommand|
    1.80  
    1.81      module := package module.
    1.82      directory := package directory.
    1.83 @@ -695,23 +724,7 @@
    1.84      usedCompiler isNil ifTrue:[
    1.85          usedCompiler := ParserFlags usedCompiler.
    1.86      ].
    1.87 -    usedCompiler = 'vc' ifTrue:[ 
    1.88 -        makeCommand := 'vcmake'. "/ compilerFlag := '-DUSEVC' 
    1.89 -    ] ifFalse:[
    1.90 -        usedCompiler = 'lcc' ifTrue:[ 
    1.91 -            makeCommand := 'lcmake'. "/ compilerFlag := '-DUSELCC' 
    1.92 -        ] ifFalse:[
    1.93 -            usedCompiler = 'gcc' ifTrue:[ 
    1.94 -                makeCommand := 'make'. 
    1.95 -            ] ifFalse:[
    1.96 -                usedCompiler = 'bcc' ifTrue:[ 
    1.97 -                    makeCommand := 'bmake'.
    1.98 -                ] ifFalse:[
    1.99 -                    self error:'no compiler specified'.
   1.100 -                ]
   1.101 -            ]
   1.102 -        ]
   1.103 -    ].
   1.104 +    makeCommand := self makeCommandOfCompiler:usedCompiler.
   1.105  
   1.106      "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   1.107  
   1.108 @@ -753,16 +766,25 @@
   1.109          ]
   1.110      ]
   1.111  
   1.112 -    "Modified: / 20-07-2012 / 12:13:29 / cg"
   1.113 +    "Modified: / 03-09-2012 / 19:47:15 / cg"
   1.114  !
   1.115  
   1.116  objDirForUsedCompiler
   1.117 +    ^ self objDirForUsedCompiler:usedCompiler
   1.118 +
   1.119 +    "Created: / 20-08-2012 / 17:01:13 / cg"
   1.120 +!
   1.121 +
   1.122 +objDirForUsedCompiler:usedCompiler
   1.123      usedCompiler = 'bcc' ifTrue:[^ 'objbc'].
   1.124      usedCompiler = 'vc' ifTrue:[^ 'objvc'].
   1.125 +    usedCompiler = 'tcc' ifTrue:[^ 'objtcc'].
   1.126 +    usedCompiler = 'lcc' ifTrue:[^ 'objlcc'].
   1.127 +    usedCompiler = 'gcc' ifTrue:[^ 'obj'].
   1.128      self halt:'please fill in here'.
   1.129      ^ 'objbc'
   1.130  
   1.131 -    "Created: / 20-08-2012 / 17:01:13 / cg"
   1.132 +    "Created: / 03-09-2012 / 19:55:34 / cg"
   1.133  !
   1.134  
   1.135  recursiveCopyDirectoryForBuild:subdir