diff options
-rwxr-xr-x | packaging/macosx/Scripts/wireshark-postinstall.sh | 18 | ||||
-rwxr-xr-x | packaging/macosx/osx-app.sh | 13 | ||||
-rwxr-xr-x | packaging/macosx/utility-launcher/wireshark | 12 |
3 files changed, 22 insertions, 21 deletions
diff --git a/packaging/macosx/Scripts/wireshark-postinstall.sh b/packaging/macosx/Scripts/wireshark-postinstall.sh index 96ed64d89b..98c0e683cd 100755 --- a/packaging/macosx/Scripts/wireshark-postinstall.sh +++ b/packaging/macosx/Scripts/wireshark-postinstall.sh @@ -19,26 +19,10 @@ do rm -f "$PLUGINS_PATH"/$plugin.so "$PLUGINS_PATH"/$plugin.la done -BIN_PATH="$2/Wireshark.app/Contents/Resources/bin" -# -# For some reason, packagemaker isn't including Contents/Resources/bin -# in the app bundle, so let's just construct it ourselves. -# -if [ ! -d "$BIN_PATH" ] -then - mkdir -m u=rwx,g=rx,o=rx "$BIN_PATH" -fi -for i in capinfos dftest dumpcap editcap mergecap randpkt rawshark \ - tshark text2pcap -do - ln -s ../../MacOS/"$i" "$BIN_PATH/$i" -done -ln -s ../../MacOS/Wireshark "$BIN_PATH/wireshark" - # Setting PATH # if /etc/paths.d/Wireshark already exists we overwrite it. # -WSPATH="$BIN_PATH" +WSPATH="$2/Wireshark.app/Contents/MacOS" if [ ! -d /etc/paths.d ] then diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index 5356d7434f..158b930496 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -290,11 +290,18 @@ create_bundle() { done # - # Links to executables + # Executable launchers in $pkgbin # - ln -s ../../MacOS/Wireshark $pkgbin/wireshark + # We can't just symbolically link to the executables, as + # that means that the executable won't be in Contents/MacOS, + # which means that all @executable_path-relative references + # will go to the wrong place if we run the executables using + # the symlink, which means that the executables could fail + # (they *do* fail to find the Cocoa Qt plugin, for example). + # + cp utility-launcher/wireshark $pkgbin for binary in $cli_binary_list ; do - ln -s ../../MacOS/$binary $pkgbin/$binary + ln -s ./wireshark $pkgbin/$binary done # The rest of the Wireshark installation (we handled bin above) diff --git a/packaging/macosx/utility-launcher/wireshark b/packaging/macosx/utility-launcher/wireshark index 383730f493..e412a5024c 100755 --- a/packaging/macosx/utility-launcher/wireshark +++ b/packaging/macosx/utility-launcher/wireshark @@ -18,4 +18,14 @@ fi APP_NAME=`basename "$0"` -exec "$WIRESHARK_APP_DIR/Contents/Resources/bin/$APP_NAME" "$@" +APP_CONTENTS="$WIRESHARK_APP_DIR/Contents" +if [ -f "$APP_CONTENTS/Frameworks/QtWidgets" -o -d "$APP_CONTENTS/Frameworks/QtWidgets.framework" ] ; then + # Qt + if [ "$APP_NAME" = "wireshark" ] ; then + APP_NAME=Wireshark + fi + exec "$APP_CONTENTS/MacOS/$APP_NAME" "$@" +else + # GTK+ + exec "$APP_CONTENTS/Resources/bin/$APP_NAME" "$@" +fi |