# HG changeset patch # User Chris Cannam # Date 1407965441 -3600 # Node ID 52717c66833bebeced7a1a4e1be12d88623db4bd # Parent 7831f08e8f4f4d9a4f39a029d36581e1bc739ea6 Attempt to make Qt plugin loading work. But it isn't. diff -r 7831f08e8f4f -r 52717c66833b deploy/osx/copy-qt.sh --- a/deploy/osx/copy-qt.sh Wed Aug 13 22:15:31 2014 +0100 +++ b/deploy/osx/copy-qt.sh Wed Aug 13 22:30:41 2014 +0100 @@ -9,7 +9,9 @@ frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport" -plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp qcocoa qminimal" +plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp" + +platplugins="qcocoa qminimal" qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) @@ -20,9 +22,11 @@ fdir="$app.app/Contents/Frameworks" pdir="$app.app/Contents/plugins" +ppdir="$app.app/Contents/plugins/platforms" mkdir -p "$fdir" mkdir -p "$pdir" +mkdir -p "$ppdir" echo echo "Copying frameworks..." @@ -45,3 +49,19 @@ echo "Done" +echo +echo "Copying platform plugins..." +for plug in $platplugins; do + pfile=$(ls "$qtdir"/plugins/*/lib"$plug".dylib) + if [ ! -f "$pfile" ]; then + echo "Failed to find plugin $plug, exiting" + exit 2 + fi + # I really cannot be bothered to figure out why Qt fails if I copy + # to either one of these alone + cp -v "$pfile" "$pdir" || exit 2 + cp -v "$pfile" "$ppdir" || exit 2 +done + +echo "Done" +