Skip to content

Commit

Permalink
Fix package_mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Jojo-Schmitz committed Jan 2, 2025
1 parent 75facae commit 454f447
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions build/package_mac
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ while [[ "$#" -gt 0 ]]; do
shift
done

if [ "$VERSION" -eq 0 ]; then
if [ "$VERSION" == "0" ]; then
SCRIPT_DIR=$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)
VERSION=$(cmake -P "$SCRIPT_DIR/../config.cmake" | sed -n -e "s/^.*VERSION *//p")
fi
Expand Down Expand Up @@ -92,20 +92,7 @@ function change_rpath() {
done
}

function change_rpath_QWebEngine() {
for P in `otool -L $1 | awk '{print $1}'`
do
if [[ "$P" == *@rpath* ]]
then
PSLASH=$(echo $P | sed 's,@rpath,@loader_path/../../../../../../..,g')
FNAME=$(echo $P | sed "s,@rpath,${VOLUME}/${APPNAME}.app/Contents/Frameworks,g")
install_name_tool -change $P $PSLASH $1
fi
done
}


rm ${WORKING_DIRECTORY}/${COMPRESSEDDMGNAME}
rm -f ${WORKING_DIRECTORY}/${COMPRESSEDDMGNAME}

#tip: increase the size if error on copy or macdeployqt
hdiutil create -size 800m -fs HFS+ -volname ${VOLNAME} ${WORKING_DIRECTORY}/${DMGNAME}
Expand Down Expand Up @@ -151,9 +138,6 @@ macdeployqt ${VOLUME}/${APPNAME}.app
# fix the libs, qt5.6 has @rpath...
BIN_FILE=${VOLUME}/${APPNAME}.app/Contents/MacOS/mscore
change_rpath $BIN_FILE
# fix the QWebEngineProcess, qt5.9 has @rpath...
WebEngineProcess=${VOLUME}/${APPNAME}.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/5/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
change_rpath_QWebEngine $WebEngineProcess

# Workaround:
# fix Homebrew libraries with hard coded absolute path, see QTBUG-56814
Expand Down

0 comments on commit 454f447

Please sign in to comment.