Mercurial > hg > easyhg
comparison deploy/osx/paths.sh @ 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 | 0f3e086066fc |
children | 646e48a0d3a5 |
comparison
equal
deleted
inserted
replaced
669:acfaae6844de | 670:8f3075eeaac2 |
---|---|
28 find "$app.app" -name \*.dylib -print | while read x; do | 28 find "$app.app" -name \*.dylib -print | while read x; do |
29 install_name_tool -id "`basename \"$x\"`" "$x" | 29 install_name_tool -id "`basename \"$x\"`" "$x" |
30 done | 30 done |
31 | 31 |
32 for fwk in $frameworks; do | 32 for fwk in $frameworks; do |
33 find "$app.app" -type f -print | while read x; do | 33 find "$app.app" -type f -print | while read x; do |
34 current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }') | 34 |
35 [ -z "$current" ] && continue | 35 current=$(otool -L "$x" | |
36 echo "$x has $current" | 36 grep "$fwk" | grep amework | grep -v ':$' | |
37 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \ | 37 awk '{ print $1; }') |
38 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) | 38 |
39 echo "replacing with relative path $relative" | 39 [ -z "$current" ] && continue |
40 install_name_tool -change "$current" "@loader_path/$relative" "$x" | 40 |
41 done | 41 echo "$x has $current" |
42 | |
43 case "$x" in | |
44 *PyQt4*) | |
45 # These are "special" Qt4 libraries used by | |
46 # the PyQt module. They need to refer to their | |
47 # own local neighbours. Ugh, but let's handle | |
48 # those manually here. | |
49 relative="$fwk.so" | |
50 ;; | |
51 *) | |
52 # The normal Qt5 case | |
53 relative=$(echo "$x" | | |
54 sed -e "s,$app.app/Contents/,," \ | |
55 -e 's,[^/]*/,../,g' \ | |
56 -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) | |
57 ;; | |
58 esac | |
59 | |
60 echo "replacing with relative path $relative" | |
61 install_name_tool -change \ | |
62 "$current" "@loader_path/$relative" "$x" | |
63 done | |
42 done | 64 done |
43 | 65 |
44 find "$app.app" -type f -print | while read x; do | 66 find "$app.app" -type f -print | while read x; do |
45 qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }') | 67 qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }') |
46 if [ -n "$qtdep" ]; then | 68 if [ -n "$qtdep" ]; then |