[Scons-users] Bundles as targets

Arvid Rosén arvid at softube.com
Tue Oct 6 02:41:09 EDT 2020


Hi,

I have been using SCons for many years now successfully, and one of the few features I miss, or don’t know how to achieve maybe, is how to easily build bundles. A bundle in this case is a target that is a directory with exactly a set of files. No more, no less. The most notable case here is macOS bundles, but they are used in other cases too.

*Description of problem*
I want to build a target that is called MyBundle that looks exactly like this:
./MyBundle/README.txt
./MyBundle/bin/theBinary
./MyBundle/lib/myLib

If I then change something, for example rename the binary, I want exactly this:
./MyBundle/README.txt
./MyBundle/bin/theBinary2
./MyBundle/lib/myLib

I absolutely don’t want this:
./MyBundle/README.txt
./MyBundle/bin/theBinary
./MyBundle/bin/theBinary2
./MyBundle/lib/myLib

Bonus requirement.
I want to set the permissions on individual files to various things.

Is there an easy way to achieve this in SCons? Today, I always wipe the target directory, and then use Mkdir and InstallAs to populate the bundle. But is this really the best way? Would it be possible to extend SCons to add a Bundle target Node to do this in a clean way you think?
This would be great, because then other steps in the build process could use the bundle as a whole as  their input, to copy it or apply signing or similar things.

Cheers,
Arvid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20201006/4b4b7618/attachment.html>


More information about the Scons-users mailing list