comparison deploy/osx/paths.sh @ 509:451d3c087112

Override Qt library path on OS/X to avoid dependencies on unknown versions from outside the app bundle
author Chris Cannam
date Mon, 16 Jul 2012 10:29:38 +0100
parents 27446c7f3935
children 4481a2ca375d
comparison
equal deleted inserted replaced
508:26ebbe098bce 509:451d3c087112
17 install_name_tool -id QtCore "$app.app/Contents/Frameworks/QtCore" 17 install_name_tool -id QtCore "$app.app/Contents/Frameworks/QtCore"
18 install_name_tool -id QtGui "$app.app/Contents/Frameworks/QtGui" 18 install_name_tool -id QtGui "$app.app/Contents/Frameworks/QtGui"
19 install_name_tool -id QtNetwork "$app.app/Contents/Frameworks/QtNetwork" 19 install_name_tool -id QtNetwork "$app.app/Contents/Frameworks/QtNetwork"
20 install_name_tool -id QtXml "$app.app/Contents/Frameworks/QtXml" 20 install_name_tool -id QtXml "$app.app/Contents/Frameworks/QtXml"
21 21
22 for fwk in QtCore QtGui QtNetwork QtXml; do 22 find "$app.app" -name \*.dylib -print | while read x; do
23 install_name_tool -id "`basename \"$x\"`" "$x"
24 done
25
26 for fwk in QtCore QtGui QtNetwork QtXml QtSvg; do
23 find "$app.app" -type f -print | while read x; do 27 find "$app.app" -type f -print | while read x; do
24 current=$(otool -L "$x" | grep "$fwk" | grep ramework | awk '{ print $1; }') 28 current=$(otool -L "$x" | grep "$fwk" | grep amework | awk '{ print $1; }')
25 [ -z "$current" ] && continue 29 [ -z "$current" ] && continue
26 echo "$x has $current" 30 echo "$x has $current"
27 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \ 31 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
28 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) 32 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
29 echo "replacing with relative path $relative" 33 echo "replacing with relative path $relative"