beefytech / Beef

Beef Programming Language
http://www.beeflang.org
Other
2.51k stars 131 forks source link

CopyToDependents fails in some projects for no obvious reason. #2013

Open EnokViking opened 2 months ago

EnokViking commented 2 months ago

CopyToDependents("$(ProjectDir)/resources/shaders/circle_sdf.fs") This here for instance, doesn't do anything for me but in some projects such as the space shooter sample, DLL's are copied and also in some older projects of mine.

bfiete commented 1 month ago

Can you provide a sample workspace where this fails?

bfiete commented 1 month ago

Closing due to lack of information/repro.

EnokViking commented 1 week ago

Random.zip

bfiete commented 1 week ago

In the workspace you provided you have a CopyToDependents in Random, but Random does not have any dependents.

A dependent is a project that depends on this project.

You would normally put CopyToDependents in a library such as SDL2, which would copy the SDL2 dlls to projects that depend on SDL2.

bfiete commented 1 week ago

Maybe you wanted CopyFilesIfNewer and not CopyToDependents

bfiete commented 1 week ago

That being said, perhaps it does make sense to have something like a CopyToTarget which works the way you apparently expected: it can be used in either a dependency's postbuild or in a project's own postbuild.