--- a/ProjectBuilder.st Tue Nov 10 13:36:58 2009 +0100
+++ b/ProjectBuilder.st Sun Nov 15 23:19:23 2009 +0100
@@ -199,12 +199,21 @@
!
copyDLLsForLinkage
- |targetBuildDir|
+ |targetBuildDir preRequisites dllRelativePaths|
+
targetBuildDir := buildDirectory / package module / package directory.
- (projectDefinitionClass allPreRequisites)
- do:[:eachPackageToFileout |
+ preRequisites := projectDefinitionClass allPreRequisites.
+ OperatingSystem isUNIXlike ifTrue:[
+ "For now: unix Makefiles require some libs implicitely..."
+ preRequisites := preRequisites union:#(
+ 'stx:goodies/refactoryBrowser/parser'
+ 'stx:libtool'
+ ).
+ ].
+
+ preRequisites do:[:eachPackageToFileout |
|packageId packageDef packageModule packageDirectory packageTargetDir
dllSource dllSourceDir libraryName dllRelativePath|
@@ -221,20 +230,23 @@
OperatingSystem isMSWINDOWSlike ifTrue:[
"/ dllRelativePath := 'objvc','/',(libraryName,'.dll').
"/ (dllSourceDir / dllRelativePath) exists
- false ifFalse:[
- dllRelativePath := 'objbc','/',(libraryName,'.dll').
- ]
+ dllRelativePaths := Array with:('objbc\', libraryName, '.dll').
] ifFalse:[
- dllRelativePath := libraryName,'.so'.
+ dllRelativePaths := Array with:(libraryName,'.so').
+ (packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[
+ dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so').
+ ].
].
- ((packageTargetDir / dllRelativePath) exists
- and:[ (dllSourceDir / dllRelativePath) fileSize = (packageTargetDir / dllRelativePath) fileSize
- and:[ (dllSourceDir / dllRelativePath) modificationTime < (packageTargetDir / dllRelativePath) modificationTime
- "/ and:[ (dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath) ]
- ]]) ifFalse:[
- (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
- (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).
- ]
+ dllRelativePaths do:[:dllRelativePath|
+ ((packageTargetDir / dllRelativePath) exists not
+ or:[(dllSourceDir / dllRelativePath) fileSize ~= (packageTargetDir / dllRelativePath) fileSize
+ or:[(dllSourceDir / dllRelativePath) modificationTime >= (packageTargetDir / dllRelativePath) modificationTime
+ "/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ]
+ ]]) ifTrue:[
+ (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
+ (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).
+ ].
+ ].
].
!