Open yodantauber opened 11 years ago
I'll see what I can do.
Hey, wanna know something funny? It's already in there.
Sweet mercy, we gotta get some of this stuff documented.
You should be able to do something like this:
files {
bin : {
#exclude: {
// use any filename wildcard match pattern (so, *, ** and ? but NOT RegEx)
"*.bak", "*.tmp"
};
/some/files/in/here/*.*
};
};
Tried this on the latest dev release and couldn't get it to work. Relevant snippet:
files {
[x86,v110,release] {
lib: { "x86\vc11\lib\*246.lib" };
bin: {
#exclude: { "opencv_ffmpeg*.dll" };
"x86\vc11\bin\*246.dll"
};
}
}
Also tried with the full filename or the full path name, even with just "*.dll", none of them could get any file excluded.
Hmm. Try:
#exclude: { "**\opencv_ffmpeg*.dll" };
That did the trick :)
Is this because the exclusion pattern is matched against the destination path? If that's the case, I think it will be a bit unintuitive for users.
Thanks!
Actually, it's matched against the source path.
Curious then why it didn't match with the previous patterns... i'll play around a bit more to get a feel for what's up.
I'm looking at the code, and now that I think about it, I think that the full source path has been resolved by this point-- which is why we likely needed the **\
in front (and why a passing the filename relative to the folder didn't work).
Lemme see if i can change the function so it filters them out before returning the fully resolved path name,..
And just as I'm about to say why I can't fix this trivially, I figured out a way to do that.
You can now just use #exclude: { "opencv_ffmpeg*.dll" };
-- if the exclude mask doesn't have any \
or /
characters it will just exclude on a filename wildcard alone.
if it does have a \
or /
in the exclude mask, it will exclude with partial path info included.
this fix is in CoApp Powershell Developer Tools Version: 2.4.199.0 and beyond.
G
When specifying files to include in a package, the simple wildcard (*) support may not be enough. It is very common for libraries (e.g. Qt) to have a different filename, and not a different folder, for debug libraries or DLLs (usually "d" is appended somewhere in the filename, either before or after the version number). This makes it very hard, or rather impossible, to create a pattern which will include the release binaries (which do not have a particular suffix).
One possible solution - an option to add an exclusion pattern, i.e. something like "add .dll except d.dll". Another possible solution - make the pattern (optionally) a regular expression.