diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-09-30 11:29:58 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-09-30 11:29:58 +0000 |
commit | 2468b33ccef7189a2ee845f3c926ec12cb01e02f (patch) | |
tree | f2a7ee40ad9597e4a573d09448e3333b60d1f47b | |
parent | 0a75c9d87291d2cdd56724c470e29f2668116c31 (diff) |
More Qt app bundle migration. Still doesn't work quite right.
svn path=/trunk/; revision=52293
-rw-r--r-- | configure.ac | 2 | ||||
-rwxr-xr-x | packaging/macosx/osx-app.sh | 32 |
2 files changed, 29 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 75dc88a6a2..914d41964b 100644 --- a/configure.ac +++ b/configure.ac @@ -1075,7 +1075,7 @@ darwin*) # libraries in the rpath, rather than having a script tweak # DYLD_LIBRARY_PATH. # - LDFLAGS="-Wl,-search_paths_first -Wl,-rpath,@executable_path/../lib -Wl,-rpath,/usr/local/lib $LDFLAGS" + LDFLAGS="-Wl,-search_paths_first -Wl,-rpath,@executable_path/../lib -Wl,-rpath,@executable_path/../Resources/lib -Wl,-rpath,/usr/local/lib $LDFLAGS" AC_MSG_RESULT([Apple linker - added -Wl,-single_module and -Wl,-search_paths_first, and rpaths]) ;; cygwin*) diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index f407a23bef..bdfa4a99e8 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -209,7 +209,8 @@ resdir=`pwd` pkgexec="$package/Contents/MacOS" pkgres="$package/Contents/Resources" pkgbin="$pkgres/bin" -pkglib="$package/Contents/Frameworks" +# Should pkglib be Contents/Frameworks instead? +pkglib="$pkgres/lib" pkgplugin="$pkglib/wireshark/plugins" pkgpython="$pkglib/wireshark/python" @@ -400,7 +401,7 @@ elif [ "$ui_toolkit" = "qt" ] ; then lib_dep_search_list=" $pkgexec/Wireshark $lib_dep_search_list - $pkglib/Qt*.framework/Versions/[0-9]*/* + $pkglib/Qt*.framework/Versions/[0-9]*/Qt* " fi @@ -493,6 +494,29 @@ rpathify_file () { echo "Changing reference to $lib in $1" /usr/bin/install_name_tool -change $lib $to $1 done + # + # Rewrite framework paths + # + if [ "$ui_toolkit" = "qt" ] ; then + frameworks="`otool -L $1 | egrep "Qt.*framework/.* \(compatibility" | cut -d\( -f1`" + for fwk in $frameworks ; do + # + # Get the file name of the framework. + # + base=`echo $fwk | awk 'BEGIN{FS="/";OFS="/"} {print $(NF-3), $(NF-2), $(NF-1), $NF}'` + # + # The library will end up in a directory in + # the rpath; this is what we should change its + # file name to. + # + to=@rpath/$base + # + # Change the reference to that library. + # + echo "Changing reference to $fwk in $1" + /usr/bin/install_name_tool -change $fwk $to $1 + done + fi ;; esac fi @@ -534,8 +558,8 @@ rpathify_files () { rpathify_dir "$pkgbin" "*" if [ "$ui_toolkit" = "qt" ] ; then rpathify_dir "$pkgexec" "Wireshark" - for fwk_dir in "$pkglib/Qt*.framework/Versions/[0-9]*" ; do - rpathify_dir "$fwk_dir" "*" + for fwk_dir in $pkglib/Qt*.framework/Versions/[0-9]* ; do + rpathify_dir "$fwk_dir" "Qt*" done fi } |