comparison deploy/osx/deploy.sh @ 316:806e9cb9ce61

* Fix up framework paths regardless of their initial values
author Chris Cannam
date Wed, 02 Mar 2011 12:29:45 +0000
parents facd86e268b9
children aa852b477e4d
comparison
equal deleted inserted replaced
315:2b2f0ba33262 316:806e9cb9ce61
31 31
32 install_name_tool -id QtCore "$app.app/Contents/Frameworks/QtCore" 32 install_name_tool -id QtCore "$app.app/Contents/Frameworks/QtCore"
33 install_name_tool -id QtGui "$app.app/Contents/Frameworks/QtGui" 33 install_name_tool -id QtGui "$app.app/Contents/Frameworks/QtGui"
34 install_name_tool -id QtNetwork "$app.app/Contents/Frameworks/QtNetwork" 34 install_name_tool -id QtNetwork "$app.app/Contents/Frameworks/QtNetwork"
35 35
36 install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore "$app.app/Contents/MacOS/$app" 36 for fwk in QtCore QtGui QtNetwork; do
37 install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui "$app.app/Contents/MacOS/$app" 37 find "$app.app" -type f -print | while read x; do
38 install_name_tool -change QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork "$app.app/Contents/MacOS/$app" 38 current=$(otool -L "$x" | grep "$fwk.framework/" | awk '{ print $1; }')
39 39 [ -z "$current" ] && continue
40 install_name_tool -change QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore "$app.app/Contents/MacOS/kdiff3" 40 echo "$x has $current"
41 install_name_tool -change QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui "$app.app/Contents/MacOS/kdiff3" 41 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
42 install_name_tool -change QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork "$app.app/Contents/MacOS/kdiff3" 42 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
43 43 echo "replacing with relative path $relative"
44 install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/QtCore "$app.app/Contents/Frameworks/QtGui" 44 install_name_tool -change "$current" "@loader_path/$relative" "$x"
45 install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/QtCore "$app.app/Contents/Frameworks/QtNetwork" 45 done
46 46 done
47 install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtCore "$app.app/Contents/MacOS/PyQt4/QtCore.so"
48 install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtCore "$app.app/Contents/MacOS/PyQt4/QtGui.so"
49 install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../../Frameworks/QtGui "$app.app/Contents/MacOS/PyQt4/QtGui.so"
50 47
51 echo "Done: be sure to run the app and see that it works!" 48 echo "Done: be sure to run the app and see that it works!"
52 49
53 echo 50 echo
54 echo "Making dmg..." 51 echo "Making dmg..."