Skip to content

Instantly share code, notes, and snippets.

@lasconic

lasconic/gist:5965542

Last active Dec 19, 2015
Embed
What would you like to do?
replace double slashes by simple slash in library paths before running macdeployqt
BIN_FILE=YOURBINARY
for P in `otool -L $BIN_FILE | awk '{print $1}'`
do
if [[ "$P" == *//* ]]
then
PSLASH=$(echo $P | sed 's,//,/,g')
install_name_tool -change $P $PSLASH $BIN_FILE
fi
done
QTDIR=$1
for F in `find $QTDIR/lib $QTDIR/plugins $QTDIR/qml -perm 755 -type f`
do
for P in `otool -L $F | awk '{print $1}'`
do
if [[ "$P" == *//* ]]
then
PSLASH=$(echo $P | sed 's,//,/,g')
install_name_tool -change $P $PSLASH $F
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment