Issue with BinaryBuilder


#1

I got a problem when trying to use BinaryBuilder 1.46 on Windows.

The recursion doesn’t seem to work at all. I have applied a patch that allows me to work around this problem, but that is not completely satisfactory.

In isHiddenFile(), I changed from :

to :

Prior to that, isHiddenFile returned yes to all files in subdir, because it thought their parent directory was hidden.


#2

Take a look at the thread I started about this exact problem:

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=1539&start=0&postdays=0&postorder=asc&highlight=

Bruce


#3

Thanks Bruce, but it seems I have the exact opposite problem, meaning that out of the box, BinaryBuilder doesn’t find anything inside subfolders, being it a svn folder or a folder I’ve placed on purpose.

BTW, Jules has now upgraded File::findChildFiles so hidden files are optionally ignored.

But this not what it’s used inside BinaryBuilder. BinaryBuilder has a hiddenFiles detection scheme tailored for SCC systems, and that’s what causes me troubles


#4

Heh, sorry then. :oops: Looks like taking account of requests like mine made yours harder.

But what you can take from that thread is that Jules advises you hack up BB to do what you need, i.e. make your own version. Mine has been stable since dunno, 1.40 or so.

Bruce


#5

Ah, how about this:

return f.getFileName().endsWithIgnoreCase (T(".scc")) || f.getFileName() != T(".svn") || f.getFileName().startsWithChar (T('.')) || (f.getSize() == 0 && ! f.isDirectory()) || (f.getParentDirectory() != root && isHiddenFile (f.getParentDirectory(), root));


#6

Well no, the problem was not that some SVN directories were not hidden, it was that all of my directories were hidden.
And that problem came from the very last line :

(f.getParentDirectory() != root && isHiddenFile (f.getParentDirectory(), root)

isHiddenFile (f.getParentDirectory(), root) returns true for a directory named “BITMAP_NORMAL”, located just at the root


#7

Yes, I understood that. It was the getFileSize() == 0 line, which would have made it think that directories were hidden. That’s why I changed it to

Did you actually try it?


#8

Sorry, I didn’t realize that you made another change beside adding a test for ".svn"
So yes, it looks promising, I will test it next time I have to use BinaryBuilder

Thanks


#9

Hi Jules,

Your suggestion is ok but for a small typo : the test for .svn should be == and not != (we are returning “isHidden”)

    return f.getFileName().endsWithIgnoreCase (T(".scc"))
        || f.getFileName() == T(".svn")
        || f.getFileName().startsWithChar (T('.'))
        || (f.getSize() == 0 && ! f.isDirectory())
        || (f.getParentDirectory() != root && isHiddenFile (f.getParentDirectory(), root));

#10

Drat! Yes, of course. Thanks!