ProjectBuilder.st
changeset 2723 d03a850ebc29
parent 2684 80fe0f753fd8
child 2741 783dda495655
equal deleted inserted replaced
2722:647dfae127cd 2723:d03a850ebc29
   197     self activityNotification:'Executing make...'.
   197     self activityNotification:'Executing make...'.
   198     self makeWithOutputTo:stdOut errorTo:stdErr.
   198     self makeWithOutputTo:stdOut errorTo:stdErr.
   199 !
   199 !
   200 
   200 
   201 copyDLLsForLinkage
   201 copyDLLsForLinkage
   202     |targetBuildDir|
   202     |targetBuildDir preRequisites dllRelativePaths|
       
   203 
   203 
   204 
   204     targetBuildDir := buildDirectory / package module / package directory.
   205     targetBuildDir := buildDirectory / package module / package directory.
   205 
   206 
   206     (projectDefinitionClass allPreRequisites)
   207     preRequisites := projectDefinitionClass allPreRequisites.
   207     do:[:eachPackageToFileout |
   208     OperatingSystem isUNIXlike ifTrue:[
       
   209         "For now: unix Makefiles require some libs implicitely..."
       
   210         preRequisites := preRequisites union:#(
       
   211                                'stx:goodies/refactoryBrowser/parser'
       
   212                                'stx:libtool'
       
   213                             ).
       
   214     ].
       
   215 
       
   216     preRequisites do:[:eachPackageToFileout |
   208         |packageId packageDef packageModule packageDirectory packageTargetDir
   217         |packageId packageDef packageModule packageDirectory packageTargetDir
   209          dllSource dllSourceDir libraryName dllRelativePath|
   218          dllSource dllSourceDir libraryName dllRelativePath|
   210 
   219 
   211         packageId := eachPackageToFileout asPackageId.
   220         packageId := eachPackageToFileout asPackageId.
   212         packageModule := packageId module.
   221         packageModule := packageId module.
   219         "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
   228         "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
   220         dllSourceDir := myTopDirectory / packageModule / packageDirectory.
   229         dllSourceDir := myTopDirectory / packageModule / packageDirectory.
   221         OperatingSystem isMSWINDOWSlike ifTrue:[
   230         OperatingSystem isMSWINDOWSlike ifTrue:[
   222 "/            dllRelativePath := 'objvc','/',(libraryName,'.dll').
   231 "/            dllRelativePath := 'objvc','/',(libraryName,'.dll').
   223 "/            (dllSourceDir / dllRelativePath) exists 
   232 "/            (dllSourceDir / dllRelativePath) exists 
   224             false ifFalse:[
   233             dllRelativePaths := Array with:('objbc\', libraryName, '.dll').
   225                 dllRelativePath := 'objbc','/',(libraryName,'.dll').
       
   226             ]
       
   227         ] ifFalse:[
   234         ] ifFalse:[
   228             dllRelativePath := libraryName,'.so'.
   235             dllRelativePaths := Array with:(libraryName,'.so').
   229         ].
   236             (packageModule = 'stx' and:[packageDirectory = 'libview']) ifTrue:[
   230         ((packageTargetDir / dllRelativePath) exists
   237                 dllRelativePaths := dllRelativePaths, #('XWorkstation.so' 'GLXWorkstation.so').
   231         and:[ (dllSourceDir / dllRelativePath) fileSize = (packageTargetDir / dllRelativePath) fileSize
   238             ].
   232         and:[ (dllSourceDir / dllRelativePath) modificationTime < (packageTargetDir / dllRelativePath) modificationTime
   239         ].
   233         "/ and:[ (dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath) ]
   240         dllRelativePaths do:[:dllRelativePath|
   234         ]]) ifFalse:[
   241             ((packageTargetDir / dllRelativePath) exists not
   235             (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
   242              or:[(dllSourceDir / dllRelativePath) fileSize ~= (packageTargetDir / dllRelativePath) fileSize
   236             (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
   243              or:[(dllSourceDir / dllRelativePath) modificationTime >= (packageTargetDir / dllRelativePath) modificationTime
   237         ]
   244              "/ or:[ ((dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath)) not ]
       
   245             ]]) ifTrue:[
       
   246                 (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
       
   247                 (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
       
   248             ].
       
   249         ].
   238     ].
   250     ].
   239 !
   251 !
   240 
   252 
   241 copyDirectory:relativepath
   253 copyDirectory:relativepath
   242     "/ need rules in stx
   254     "/ need rules in stx