Closed dtakeda closed 3 years ago
I don't really have the time to check that properly myself, but if you wish to take a look yourself, in method "void collectDependencies", the code reads like
std::string cmd = "otool -L " + filename;
It would probably be pretty straightforward to add quotes there. Something like
std::string cmd = "otool -L \"" + filename + "\"";
Want to test it? I don't have a test setup at hand
I'll give it a shot if I have time later today.
That should really use a proper shell escaping function rather than just quotes though – next would be somebody that wants to use quotes in his application name and you've got the same problem again.
Well I finally got around to testing.
tag4800:macdylibbundler dtakeda$ ./dylibbundler -od -b -x ~/Waveform\ Maker.app/Contents/MacOS/Waveform\ Maker -d ~/Waveform\ Maker.app/Contents/libs
* Collecting dependencies...............error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: /opt/local/lib/libcrypto.1.0.0.dylib (No such file or directory)
Cannot find file /opt/local/lib/libcrypto.1.0.0.dylib to read its dependencies
tag4800:macdylibbundler dtakeda$ ls -alh /opt/local/lib/libcrypto.1.0.0.dylib
-r-xr-xr-x 1 root admin 1.5M Jun 5 09:55 /opt/local/lib/libcrypto.1.0.0.dylib
Time to relearn C++ to do proper shell escaping.
Well it turns out the filename has a space at the end.
cmd:otool -L "/opt/local/lib/libcrypto.1.0.0.dylib "
fixed in #53
I created an app with a binary with two names. The space in the app name is escaped, however when I run a tool it doesn't seem to like spaces.