Last active
July 30, 2022 06:10
-
-
Save lasconic/5965542 to your computer and use it in GitHub Desktop.
replace double slashes by simple slash in library paths before running macdeployqt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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