276 ). |
276 ). |
277 ]. |
277 ]. |
278 |
278 |
279 preRequisites do:[:eachPackageToFileout | |
279 preRequisites do:[:eachPackageToFileout | |
280 |packageId packageDef packageModule packageDirectory packageTargetDir |
280 |packageId packageDef packageModule packageDirectory packageTargetDir |
281 dllSource dllSourceDir libraryName dllRelativePath objDir| |
281 dllSource dllSourceDir libraryName dllRelativePathSource |
|
282 dllRelativePathDest objDirSource objDirDest| |
282 |
283 |
283 packageId := eachPackageToFileout asPackageId. |
284 packageId := eachPackageToFileout asPackageId. |
284 packageModule := packageId module. |
285 packageModule := packageId module. |
285 packageDirectory := packageId directory. |
286 packageDirectory := packageId directory. |
286 packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
287 packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory. |
290 |
291 |
291 "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ?? |
292 "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ?? |
292 dllSourceDir := myTopDirectory / packageModule / packageDirectory. |
293 dllSourceDir := myTopDirectory / packageModule / packageDirectory. |
293 |
294 |
294 OperatingSystem isMSWINDOWSlike ifTrue:[ |
295 OperatingSystem isMSWINDOWSlike ifTrue:[ |
295 objDir := self objDirForUsedCompiler:usedCompiler. |
296 objDirDest := self objDirForUsedCompiler:usedCompiler. |
296 |
297 "/ use visual-c files for tcc linkage |
|
298 usedCompiler = 'tcc' ifTrue:[ |
|
299 objDirSource := self objDirForUsedCompiler:'vc'. |
|
300 ] ifFalse:[ |
|
301 objDirSource := objDirDest |
|
302 ]. |
297 "/ dllRelativePath := objDir,'/',(libraryName,'.dll'). |
303 "/ dllRelativePath := objDir,'/',(libraryName,'.dll'). |
298 "/ (dllSourceDir / dllRelativePath) exists |
304 "/ (dllSourceDir / dllRelativePath) exists |
299 dllRelativePaths := Array with:(objDir,'\', libraryName, '.dll'). |
305 dllRelativeSourcePathes := Array with:(objDirSource,'\', libraryName, '.dll'). |
|
306 dllRelativeDestPathes := Array with:(objDirDest,'\', libraryName, '.dll'). |
300 ] ifFalse:[ |
307 ] ifFalse:[ |
301 dllRelativePaths := Array with:(libraryName,'.so'). |
308 dllRelativeSourcePathes := Array with:(libraryName,'.so'). |
302 (packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[ |
309 (packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[ |
303 dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so'). |
310 dllRelativeSourcePathes := dllRelativeSourcePathes, #('XWorkstation.so' 'GLXWorkstation.so'). |
304 ]. |
311 ]. |
305 ]. |
312 ]. |
306 dllRelativePaths do:[:dllRelativePath| |
313 dllRelativeSourcePathes with:dllRelativeDestPathes do:[:dllRelativeSourcePath :dllRelativeDestPath| |
307 |source dest| |
314 |source dest| |
308 |
315 |
309 source := dllSourceDir / dllRelativePath. |
316 source := dllSourceDir / dllRelativeSourcePath. |
310 dest := packageTargetDir / dllRelativePath. |
317 dest := packageTargetDir / dllRelativeDestPath. |
311 (dest exists not |
318 (dest exists not |
312 or:[source fileSize ~= dest fileSize |
319 or:[source fileSize ~= dest fileSize |
313 or:[source modificationTime >= dest modificationTime |
320 or:[source modificationTime >= dest modificationTime |
314 "/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ] |
321 "/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ] |
315 ]]) ifTrue:[ |
322 ]]) ifTrue:[ |
316 Transcript showCR:'updating ',dllRelativePath. |
323 Transcript showCR:'updating ',dllRelativeDestPath. |
317 dest directory recursiveMakeDirectory. |
324 dest directory recursiveMakeDirectory. |
318 source copyTo:dest. |
325 source copyTo:dest. |
319 ]. |
326 ]. |
320 ]. |
327 ]. |
321 ]. |
328 ]. |
322 |
329 |
323 "Modified: / 03-09-2012 / 20:07:23 / cg" |
330 "Modified: / 04-09-2012 / 00:30:21 / cg" |
324 ! |
331 ! |
325 |
332 |
326 copyDirectory:relativepath |
333 copyDirectory:relativepath |
327 "/ need rules in stx |
334 "/ need rules in stx |
328 ((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath) |
335 ((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath) |