changeset 670:8f3075eeaac2 qt5

Attempt to fix library paths for PyQt libraries. Doesn't seem to be sufficient.
author Chris Cannam
date Fri, 27 May 2016 11:02:53 +0100
parents acfaae6844de
children ce29dc775650
files deploy/osx/deploy.sh deploy/osx/paths.sh
diffstat 2 files changed, 37 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Fri May 27 11:02:38 2016 +0100
+++ b/deploy/osx/deploy.sh	Fri May 27 11:02:53 2016 +0100
@@ -49,6 +49,12 @@
 echo "Done: check $source/Contents/Info.plist for sanity please"
 
 echo
+echo "Copying in helper scripts"
+cp easyhg-extdiff.sh "$source"/Contents/MacOS/
+cp easyhg-merge.sh "$source"/Contents/MacOS/
+chmod +x "$source"/Contents/MacOS/easyhg-extdiff.sh "$source"/Contents/MacOS/easyhg-merge.sh
+
+echo
 echo "Making target tree."
 
 volume="$app"-"$version"
--- a/deploy/osx/paths.sh	Fri May 27 11:02:38 2016 +0100
+++ b/deploy/osx/paths.sh	Fri May 27 11:02:53 2016 +0100
@@ -30,15 +30,37 @@
 done
 
 for fwk in $frameworks; do
-        find "$app.app" -type f -print | while read x; do
-                current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
-                [ -z "$current" ] && continue
-                echo "$x has $current"
-                relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
-                        -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
-                echo "replacing with relative path $relative"
-                install_name_tool -change "$current" "@loader_path/$relative" "$x"
-        done
+    find "$app.app" -type f -print | while read x; do
+
+        current=$(otool -L "$x" | 
+	    grep "$fwk" | grep amework | grep -v ':$' | 
+	    awk '{ print $1; }')
+	
+        [ -z "$current" ] && continue
+	
+        echo "$x has $current"
+	
+	case "$x" in
+	    *PyQt4*)
+		# These are "special" Qt4 libraries used by
+		# the PyQt module. They need to refer to their
+		# own local neighbours. Ugh, but let's handle
+		# those manually here.
+		relative="$fwk.so"
+		;;
+	    *)
+		# The normal Qt5 case
+		relative=$(echo "$x" | 
+		    sed -e "s,$app.app/Contents/,," \
+			-e 's,[^/]*/,../,g' \
+			-e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
+		;;
+	esac
+	
+	echo "replacing with relative path $relative"
+	install_name_tool -change \
+	    "$current" "@loader_path/$relative" "$x"
+    done
 done
 
 find "$app.app" -type f -print | while read x; do