changed: #copyDLLsForLinkage
authorStefan Vogel <sv@exept.de>
Sun, 15 Nov 2009 23:19:23 +0100
changeset 2723d03a850ebc29
parent 2722 647dfae127cd
child 2724 4bd4ad9083fb
changed: #copyDLLsForLinkage
need some implicitely linked DLL for linux
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Tue Nov 10 13:36:58 2009 +0100
     1.2 +++ b/ProjectBuilder.st	Sun Nov 15 23:19:23 2009 +0100
     1.3 @@ -199,12 +199,21 @@
     1.4  !
     1.5  
     1.6  copyDLLsForLinkage
     1.7 -    |targetBuildDir|
     1.8 +    |targetBuildDir preRequisites dllRelativePaths|
     1.9 +
    1.10  
    1.11      targetBuildDir := buildDirectory / package module / package directory.
    1.12  
    1.13 -    (projectDefinitionClass allPreRequisites)
    1.14 -    do:[:eachPackageToFileout |
    1.15 +    preRequisites := projectDefinitionClass allPreRequisites.
    1.16 +    OperatingSystem isUNIXlike ifTrue:[
    1.17 +        "For now: unix Makefiles require some libs implicitely..."
    1.18 +        preRequisites := preRequisites union:#(
    1.19 +                               'stx:goodies/refactoryBrowser/parser'
    1.20 +                               'stx:libtool'
    1.21 +                            ).
    1.22 +    ].
    1.23 +
    1.24 +    preRequisites do:[:eachPackageToFileout |
    1.25          |packageId packageDef packageModule packageDirectory packageTargetDir
    1.26           dllSource dllSourceDir libraryName dllRelativePath|
    1.27  
    1.28 @@ -221,20 +230,23 @@
    1.29          OperatingSystem isMSWINDOWSlike ifTrue:[
    1.30  "/            dllRelativePath := 'objvc','/',(libraryName,'.dll').
    1.31  "/            (dllSourceDir / dllRelativePath) exists 
    1.32 -            false ifFalse:[
    1.33 -                dllRelativePath := 'objbc','/',(libraryName,'.dll').
    1.34 -            ]
    1.35 +            dllRelativePaths := Array with:('objbc\', libraryName, '.dll').
    1.36          ] ifFalse:[
    1.37 -            dllRelativePath := libraryName,'.so'.
    1.38 +            dllRelativePaths := Array with:(libraryName,'.so').
    1.39 +            (packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[
    1.40 +                dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so').
    1.41 +            ].
    1.42          ].
    1.43 -        ((packageTargetDir / dllRelativePath) exists
    1.44 -        and:[ (dllSourceDir / dllRelativePath) fileSize = (packageTargetDir / dllRelativePath) fileSize
    1.45 -        and:[ (dllSourceDir / dllRelativePath) modificationTime < (packageTargetDir / dllRelativePath) modificationTime
    1.46 -        "/ and:[ (dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath) ]
    1.47 -        ]]) ifFalse:[
    1.48 -            (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
    1.49 -            (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
    1.50 -        ]
    1.51 +        dllRelativePaths do:[:dllRelativePath|
    1.52 +            ((packageTargetDir / dllRelativePath) exists not
    1.53 +             or:[(dllSourceDir / dllRelativePath) fileSize ~= (packageTargetDir / dllRelativePath) fileSize
    1.54 +             or:[(dllSourceDir / dllRelativePath) modificationTime >= (packageTargetDir / dllRelativePath) modificationTime
    1.55 +             "/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ]
    1.56 +            ]]) ifTrue:[
    1.57 +                (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
    1.58 +                (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
    1.59 +            ].
    1.60 +        ].
    1.61      ].
    1.62  !
    1.63