Binary builder & bash


I'm trying to use a bash script to launch binary builder to wrap up some files. I can't seem to get it to work. If I just open binarybuilder I get the explanation of how to use it -- so far so good. However when I try to open it with arguments (directory locations and file name) it just tells me I have a bad file name. 

this is probably just my nearly non-existant knowledge of bash! Can someone please give an example of how to open this with arguments? 


I haven't used binary builder in a while, and even then not as you're describing, so I may have the wrong end of the stick, but ... Are there any spaces in the file path you're supplying? If so, (on windows) you'll have to wrap the path in quotes or Linux place a "\" before spaces in the path


nope, no spaces, but thanks for the suggestion. I did try wrapping them in quotes just to be sure, and didn't seem to help.

this is what I'm trying:

open binarybuilder  /myuserdirectory/code/myproject/somefiles /myuserdirectory/code/myproject/binarydata filename

the error I get is:

The files /myuserdirectory/code/JUCE/extras/binarybuilder/Builds/MacOSX/build/Debug/“myuserdirectory/code/myproject/binarydata/“  ... [and other long weird mushed together paths for other arguments] do not exist.


PS -- i would just use introjucer for this, however it keeps messing with my Xcode project, so I want to avoid using it when I'm just adding a few files to binary data. 

AFAIK, you don't need "open".

BinaryBuilder $HOME/Temp/Images $HOME/Temp/Binary Foo

Works fine for me (of course the binarybuilder executable must be in your $PATH).

so you can easily step into the code with a debugger and figure out what is going wrong.

a quick look through the BinaryBuilder source reveals that the error message you are showing here (unless you've not shown it accuately) is not coming from BinaryBuilder.

thanks, but as I strongly suspect the problem is with my use/understanding of bash, I didn't think that would help :D

aha, thanks. that gets rid of the errors on my paths (if I use $HOME to get to my home directory instead of trying to do give the full path). However I still get an error on the name I give (foo in your example) saying it does not exist. hmm.

Did you try WITHOUT "open"?

Probably the open command performed on all the following arguments.

yes, if I get rid of open, I get "BinaryBuilder: command not found" 


great links, thanks!

thanks. hmm. so it is probably something i'm doing wrong with bash. still trying to figure that out though. 

To launch a command without providing the fullpath, that command must be in the searchpath of your bash.

echo $PATH

If you don’t want to change the $PATH just provide the fullpath.


Of course the example above must be modify according to your JUCE directory.

OK! Finaly managed to figure it out. Because I want to run binarybuilder from it's own directory, I need to use "./" to tell bash that the executable is in the directory I've navigated to. So the resulting script looks something like:


cd ~/Code/JUCE/extras/BinaryBuilder/Builds/MacOSX/build/Debug
./binarybuilder ~/Code/myproject/sourcefiles/ ~/Code/myproject/destination binaryname