class: Tools::ProjectBuilder
authorClaus Gittinger <cg@exept.de>
Thu, 21 Mar 2013 18:30:30 +0100
changeset 2981e61e4a6fb317
parent 2980 0756e01d5954
child 2982 e8a9f796d598
class: Tools::ProjectBuilder
changed:
#copyResourcesForPackage:
#generateSourceFilesByFilingOut

care for extensions
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Wed Mar 20 19:41:52 2013 +0100
     1.2 +++ b/ProjectBuilder.st	Thu Mar 21 18:30:30 2013 +0100
     1.3 @@ -462,18 +462,18 @@
     1.4  !
     1.5  
     1.6  copyResourcesForPackage:aPackage
     1.7 -    |module directory|
     1.8 +    |module directory myPackageDirectory rsrcDir stylesDir|
     1.9  
    1.10      module := aPackage asPackageId module.
    1.11      directory := aPackage asPackageId directory.
    1.12  
    1.13 -    (myTopDirectory / module / directory / 'resources' ) exists ifTrue:[
    1.14 -        (myTopDirectory / module / directory / 'resources' )
    1.15 -            recursiveCopyTo:(buildDirectory / module / directory)
    1.16 +    myPackageDirectory := myTopDirectory / module / directory.
    1.17 +
    1.18 +    (rsrcDir := myPackageDirectory / 'resources' ) exists ifTrue:[
    1.19 +        rsrcDir recursiveCopyTo:(buildDirectory / module / directory)
    1.20      ].
    1.21 -    (myTopDirectory / module / directory / 'styles' ) exists ifTrue:[
    1.22 -        (myTopDirectory / module / directory / 'styles' )
    1.23 -            recursiveCopyTo:(buildDirectory / module / directory)
    1.24 +    (stylesDir := myPackageDirectory / 'styles' ) exists ifTrue:[
    1.25 +        stylesDir recursiveCopyTo:(buildDirectory / module / directory)
    1.26      ].
    1.27  !
    1.28  
    1.29 @@ -804,7 +804,7 @@
    1.30      "/ file out the package(s) which are to be built
    1.31      ((Array with:package))
    1.32      do:[:eachPackageToFileout |
    1.33 -        |packageId packageModule packageDirectory packageTargetDir packageDef|
    1.34 +        |packageId packageModule packageDirectory packageTargetDir packageDef extSource|
    1.35  
    1.36          packageId := eachPackageToFileout asPackageId.
    1.37          packageModule := packageId module.
    1.38 @@ -830,6 +830,16 @@
    1.39              ].
    1.40          ].
    1.41  
    1.42 +        packageDef hasExtensionMethods ifTrue:[
    1.43 +            extSource := 
    1.44 +                String streamContents:[:s |
    1.45 +                    packageDef extensionMethods do:[:eachMethod |
    1.46 +                        eachMethod mclass fileOutMethod:eachMethod on:s
    1.47 +                    ].
    1.48 +                ].
    1.49 +                (packageTargetDir asFilename construct:'extensions.st') contents:extSource
    1.50 +        ].
    1.51 +
    1.52  "/        (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls |
    1.53  "/            cls isPrivate ifFalse:[
    1.54  "/                cls isLoaded ifFalse:[