added: #copySupportFilesForCompilation
authorClaus Gittinger <cg@exept.de>
Tue, 04 Sep 2012 01:09:05 +0200
changeset 29126e62954c5f35
parent 2911 e12e4a47cfaa
child 2913 94e5ae8e15b2
added: #copySupportFilesForCompilation
comment/format in:
#copySTCDirectoryForBuild
#copySupportFilesForLinkage
changed:
#buildWithOutputTo:errorTo:
#copyStartupFilesFromSmalltalk
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Tue Sep 04 00:34:29 2012 +0200
     1.2 +++ b/ProjectBuilder.st	Tue Sep 04 01:09:05 2012 +0200
     1.3 @@ -251,12 +251,15 @@
     1.4      self generateSourceFiles.
     1.5      self activityNotification:'Copying dlls for linkage...'.
     1.6      self copyDLLsForLinkage.
     1.7 -    self activityNotification:'Copying support files for linkage...'.
     1.8 +    self activityNotification:'Copying support files for compilation and linkage...'.
     1.9 +    self copySupportFilesForCompilation.
    1.10      self copySupportFilesForLinkage.
    1.11      self copyStartupFilesFromSmalltalk.
    1.12  
    1.13      self activityNotification:'Executing make...'.
    1.14      self makeWithOutputTo:stdOut errorTo:stdErr.
    1.15 +
    1.16 +    "Modified: / 04-09-2012 / 00:49:52 / cg"
    1.17  ! !
    1.18  
    1.19  !ProjectBuilder methodsFor:'building/private'!
    1.20 @@ -373,6 +376,8 @@
    1.21  !
    1.22  
    1.23  copySTCDirectoryForBuild
    1.24 +    "copy stc files to the build directory"
    1.25 +
    1.26      |targetDir stc files|
    1.27  
    1.28      targetDir := buildDirectory / 'stx' / 'stc'.
    1.29 @@ -401,9 +406,13 @@
    1.30      ].
    1.31  
    1.32      self activityNotification:nil
    1.33 +
    1.34 +    "Modified (comment): / 04-09-2012 / 00:49:19 / cg"
    1.35  !
    1.36  
    1.37  copyStartupFilesFromSmalltalk
    1.38 +    "copy additional smalltalk startup files to the build directory"
    1.39 +
    1.40      (buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[
    1.41          (buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory.
    1.42      ].
    1.43 @@ -424,9 +433,49 @@
    1.44  
    1.45      (myTopDirectory / 'stx' / 'doc/online/english/LICENCE_STX.html')
    1.46              copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / 'LICENCE_STX.html').
    1.47 +
    1.48 +    "Modified (comment): / 04-09-2012 / 00:48:47 / cg"
    1.49 +!
    1.50 +
    1.51 +copySupportFilesForCompilation
    1.52 +    "copy the tcc compiler to the build directory"
    1.53 +
    1.54 +    |files|
    1.55 +
    1.56 +    files := #().
    1.57 +
    1.58 +    OperatingSystem isMSWINDOWSlike ifTrue:[
    1.59 +        usedCompiler = 'tcc' ifTrue:[
    1.60 +            files := files , #( 
    1.61 +                        'support/tcc'
    1.62 +                    ).
    1.63 +        ].
    1.64 +    ] ifFalse:[
    1.65 +        files := files , #(
    1.66 +                )
    1.67 +    ].
    1.68 +    files := files asOrderedCollection.
    1.69 +
    1.70 +    files do:[:relativePath |
    1.71 +        (mySTXTopDirectory / relativePath) exists ifTrue:[
    1.72 +            ((buildDirectory / 'stx' / relativePath) exists
    1.73 +            and:[ (mySTXTopDirectory / relativePath) fileSize = (buildDirectory / 'stx' / relativePath) fileSize
    1.74 +            and:[ (mySTXTopDirectory / relativePath) modificationTime < (buildDirectory / 'stx' / relativePath) modificationTime
    1.75 +            "/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ]
    1.76 +            ]]) ifFalse:[
    1.77 +                (mySTXTopDirectory / relativePath) recursiveCopyTo:(buildDirectory / 'stx' / relativePath).    
    1.78 +            ]
    1.79 +        ] ifFalse:[
    1.80 +            self error:'Missing directory: ',relativePath printString mayProceed:true.
    1.81 +        ].
    1.82 +    ].
    1.83 +
    1.84 +    "Created: / 04-09-2012 / 00:47:49 / cg"
    1.85  !
    1.86  
    1.87  copySupportFilesForLinkage
    1.88 +    "copy additional files which are req'd for linkage to the build directory"
    1.89 +
    1.90      |files|
    1.91  
    1.92      OperatingSystem isMSWINDOWSlike ifTrue:[
    1.93 @@ -492,7 +541,7 @@
    1.94          ].
    1.95      ].
    1.96  
    1.97 -    "Modified: / 04-09-2012 / 00:25:26 / cg"
    1.98 +    "Modified (comment): / 04-09-2012 / 00:48:24 / cg"
    1.99  !
   1.100  
   1.101  createHeaderFileFor:aClass in:packageTargetDir