Skip to content

Commit

Permalink
Merge pull request #2972 from AntonioBL/macprova
Browse files Browse the repository at this point in the history
fix #152151 [Mac] Nightlies crash on start
  • Loading branch information
lasconic committed Jan 25, 2017
2 parents c82b63b + e5dd938 commit 6fdce0a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build/package_mac
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,23 @@ do
fi
done

# Workaround:
# fix Homebrew libraries with hard coded absolute path, see QTBUG-56814
BIN_FILE=${VOLUME}/${APPNAME}.app/Contents/MacOS/mscore
for P in `otool -L $BIN_FILE | awk '{print $1}'`
do
FNAME=$(echo $P | sed "s,@executable_path/../Frameworks,${VOLUME}/${APPNAME}.app/Contents/Frameworks,g")
for P1 in `otool -L $FNAME | awk '{print $1}'`
do
if [[ "$P1" == /usr/local/Cellar*.dylib ]]
then
PATHNAME=$(dirname $P1)
PSLASH1=$(echo $P1 | sed "s,$PATHNAME,@executable_path/../Frameworks,g")
install_name_tool -change $P1 $PSLASH1 $FNAME
fi
done
done

for f in $(find "${VOLUME}/${APPNAME}.app/Contents" -iname "*");
do
lipo -remove ppc7400 "$f" -output "$f" > /dev/null 2>&1
Expand Down

0 comments on commit 6fdce0a

Please sign in to comment.