diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-13 10:34:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-13 17:35:15 +0000 |
commit | 9f03aa131e851447f6c3a89b6e57ff560df0afe2 (patch) | |
tree | 74146781896611d07c324649513c8aef1ce112d8 /packaging | |
parent | 7b9b3d469375c9d3ac1b5f7280ca64413b4811bf (diff) | |
download | wireshark-9f03aa131e851447f6c3a89b6e57ff560df0afe2.tar.gz wireshark-9f03aa131e851447f6c3a89b6e57ff560df0afe2.tar.bz2 wireshark-9f03aa131e851447f6c3a89b6e57ff560df0afe2.zip |
On OS X, add an rpath for the Qt frameworks, and remove it in the app bundle.
Qt 5.5 and later have @rpath-based install names for the frameworks,
which means that, if they're not installed in some frameworks directory
searched by default (such as /Library/Frameworks) - which is the default
case with the Qt installer - they won't be found by default.
Add the directory in which the frameworks exist as an rpath in the
Wireshark binary, so that they'll be found, and then remove it from the
Wireshark binary in the app bundle, as the directory in which the
frameworks exist on the machine on which Wireshark was built is
irrelevant to the machines on which it's being deployed - the frameworks
are included in the bundle, and we already add an rpath to find them
there.
Change-Id: I54e033743e7b17eab26976064dcd7cd000f97c78
Reviewed-on: https://code.wireshark.org/review/9625
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/macosx/osx-app.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index 6fcd043ec2..c58a24b6b5 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -178,6 +178,21 @@ elif [ ! -d "$bundle" ] ; then exit 1 fi +if [ "$ui_toolkit" = "qt" ] ; then + for i in 5 "" + do + qt_frameworks_dir=`pkg-config --libs Qt${i}Core | sed -e 's/-F//' -e 's/ -framework.*//'` + if [ ! -z "$qt_frameworks_dir" ] ; then + # found it + break; + fi + done + if [ -z "$qt_frameworks_dir" ] ; then + echo "Can't find the Qt frameworks directory" >&2 + exit 1 + fi +fi + # Package paths pkgexec="$bundle/Contents/MacOS" pkgres="$bundle/Contents/Resources" @@ -468,6 +483,12 @@ fi if [ "$ui_toolkit" = "qt" ] ; then macdeployqt "$bundle" -verbose=3 || exit 1 + + # + # The build process added to the Wireshark binary an rpath entry + # pointing to the directory containing the Qt frameworks; remove + # that entry from the Wireshark binary in the package. + /usr/bin/install_name_tool -delete_rpath "$qt_frameworks_dir" $pkgbin/Wireshark fi # NOTE: we must rpathify *all* files, *including* plugins for GTK+ etc., |