ProjectBuilder.st
changeset 2981 e61e4a6fb317
parent 2979 06dcbe5668a4
child 2984 bfb6db857ea8
equal deleted inserted replaced
2980:0756e01d5954 2981:e61e4a6fb317
   460     ].
   460     ].
   461     self activityNotification:nil
   461     self activityNotification:nil
   462 !
   462 !
   463 
   463 
   464 copyResourcesForPackage:aPackage
   464 copyResourcesForPackage:aPackage
   465     |module directory|
   465     |module directory myPackageDirectory rsrcDir stylesDir|
   466 
   466 
   467     module := aPackage asPackageId module.
   467     module := aPackage asPackageId module.
   468     directory := aPackage asPackageId directory.
   468     directory := aPackage asPackageId directory.
   469 
   469 
   470     (myTopDirectory / module / directory / 'resources' ) exists ifTrue:[
   470     myPackageDirectory := myTopDirectory / module / directory.
   471         (myTopDirectory / module / directory / 'resources' )
   471 
   472             recursiveCopyTo:(buildDirectory / module / directory)
   472     (rsrcDir := myPackageDirectory / 'resources' ) exists ifTrue:[
   473     ].
   473         rsrcDir recursiveCopyTo:(buildDirectory / module / directory)
   474     (myTopDirectory / module / directory / 'styles' ) exists ifTrue:[
   474     ].
   475         (myTopDirectory / module / directory / 'styles' )
   475     (stylesDir := myPackageDirectory / 'styles' ) exists ifTrue:[
   476             recursiveCopyTo:(buildDirectory / module / directory)
   476         stylesDir recursiveCopyTo:(buildDirectory / module / directory)
   477     ].
   477     ].
   478 !
   478 !
   479 
   479 
   480 copySTCDirectoryForBuild
   480 copySTCDirectoryForBuild
   481     "copy stc files to the build directory"
   481     "copy stc files to the build directory"
   802     ].
   802     ].
   803 
   803 
   804     "/ file out the package(s) which are to be built
   804     "/ file out the package(s) which are to be built
   805     ((Array with:package))
   805     ((Array with:package))
   806     do:[:eachPackageToFileout |
   806     do:[:eachPackageToFileout |
   807         |packageId packageModule packageDirectory packageTargetDir packageDef|
   807         |packageId packageModule packageDirectory packageTargetDir packageDef extSource|
   808 
   808 
   809         packageId := eachPackageToFileout asPackageId.
   809         packageId := eachPackageToFileout asPackageId.
   810         packageModule := packageId module.
   810         packageModule := packageId module.
   811         packageDirectory := packageId directory.
   811         packageDirectory := packageId directory.
   812         packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   812         packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   826                     fileName contents:newSource
   826                     fileName contents:newSource
   827                 ].
   827                 ].
   828             ] ifFalse:[
   828             ] ifFalse:[
   829                 cls fileOutIn:packageTargetDir withTimeStamp:false
   829                 cls fileOutIn:packageTargetDir withTimeStamp:false
   830             ].
   830             ].
       
   831         ].
       
   832 
       
   833         packageDef hasExtensionMethods ifTrue:[
       
   834             extSource := 
       
   835                 String streamContents:[:s |
       
   836                     packageDef extensionMethods do:[:eachMethod |
       
   837                         eachMethod mclass fileOutMethod:eachMethod on:s
       
   838                     ].
       
   839                 ].
       
   840                 (packageTargetDir asFilename construct:'extensions.st') contents:extSource
   831         ].
   841         ].
   832 
   842 
   833 "/        (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls |
   843 "/        (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls |
   834 "/            cls isPrivate ifFalse:[
   844 "/            cls isPrivate ifFalse:[
   835 "/                cls isLoaded ifFalse:[
   845 "/                cls isLoaded ifFalse:[