aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-12-15 17:48:59 -0800
committerGuy Harris <guy@alum.mit.edu>2016-12-16 01:49:43 +0000
commitd706f9c221e85992f7011baed53f5b31b7109493 (patch)
treef2cd39bf00a9d33ed061dc8a0aa6b05f3e3dfe65 /packaging
parent8234de535022a699f6c2ac5f870cad6cd7439060 (diff)
Add symlinks to Wireshark binaries in Resources/bin, and point there.
That way, $PATH points to .../Wireshark.app/Contents/Resources/bin, so the man command will look in .../Wireshark.app/Contents/Resources/share/man. This also may obviate the need to install the wrapper scripts in /usr/local/bin, although those scripts obviate the need to re-set PATH after installing Wireshark. Change-Id: I7202b5a0fe5d2b90c956dc0db2af073f6c08b00d Reviewed-on: https://code.wireshark.org/review/19296 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/Scripts/wireshark-postinstall.sh2
-rwxr-xr-xpackaging/macosx/osx-app.sh49
-rwxr-xr-xpackaging/macosx/utility-launcher/wireshark12
3 files changed, 33 insertions, 30 deletions
diff --git a/packaging/macosx/Scripts/wireshark-postinstall.sh b/packaging/macosx/Scripts/wireshark-postinstall.sh
index 98c0e683cd..bfaedca1dd 100755
--- a/packaging/macosx/Scripts/wireshark-postinstall.sh
+++ b/packaging/macosx/Scripts/wireshark-postinstall.sh
@@ -22,7 +22,7 @@ done
# Setting PATH
# if /etc/paths.d/Wireshark already exists we overwrite it.
#
-WSPATH="$2/Wireshark.app/Contents/MacOS"
+WSPATH="$2/Wireshark.app/Contents/Resources/bin"
if [ ! -d /etc/paths.d ]
then
diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh
index f06584e30b..5356d7434f 100755
--- a/packaging/macosx/osx-app.sh
+++ b/packaging/macosx/osx-app.sh
@@ -52,8 +52,10 @@ bundle="Wireshark.app"
# Name of the Wireshark executable
wireshark_bin_name="wireshark"
-binary_list="
- $wireshark_bin_name
+#
+# Command-line executables
+#
+cli_binary_list="
capinfos
dftest
dumpcap
@@ -187,7 +189,12 @@ fi
if [ "$create_bundle" = "true" ]; then
echo -e "\nCREATE WIRESHARK APP BUNDLE\n"
- for binary in $binary_list ; do
+ if [ ! -x "$binary_path/$wireshark_bin_name" ]; then
+ echo "Couldn't find $binary_path/$wireshark_bin_name (or it's not executable)" >&2
+ exit 1
+ fi
+
+ for binary in $cli_binary_list ; do
binary=$( basename $binary )
if [ ! -x "$binary_path/$binary" ]; then
echo "Couldn't find $binary (or it's not executable)" >&2
@@ -233,7 +240,7 @@ exclude_prefixes="$exclude_prefixes|$qt_frameworks_dir"
# Package paths
pkgexec="$bundle/Contents/MacOS"
pkgres="$bundle/Contents/Resources"
-pkgbin="$pkgexec"
+pkgbin="$pkgres/bin"
pkglib="$bundle/Contents/Frameworks"
pkgplugin="$bundle/Contents/PlugIns/wireshark"
@@ -258,18 +265,17 @@ create_bundle() {
mkdir -p "$pkgbin"
mkdir -p "$pkgplugin"
- cp -v "$binary_path/$wireshark_bin_name" "$pkgexec/Wireshark"
-
# Copy all files into the bundle
#----------------------------------------------------------
echo -e "\nFilling app bundle and utility directory...\n"
# Wireshark executables
- for binary in $binary_list ; do
- # Copy the binary to its destination
- bin_dest="$pkgexec"
- cp -v "$binary_path/$binary" "$bin_dest"
- cs_binary_list="$cs_binary_list $bin_dest/$binary"
+ cp -v "$binary_path/$wireshark_bin_name" "$pkgexec/Wireshark"
+ cs_binary_list="$cs_binary_list $pkgexec/Wireshark"
+ for binary in $cli_binary_list ; do
+ # Copy the binary to the executable directory
+ cp -v "$binary_path/$binary" "$pkgexec"
+ cs_binary_list="$cs_binary_list $pkgexec/$binary"
done
#
@@ -283,6 +289,14 @@ create_bundle() {
cs_binary_list="$cs_binary_list $bin_dest/$binary"
done
+ #
+ # Links to executables
+ #
+ ln -s ../../MacOS/Wireshark $pkgbin/wireshark
+ for binary in $cli_binary_list ; do
+ ln -s ../../MacOS/$binary $pkgbin/$binary
+ done
+
# The rest of the Wireshark installation (we handled bin above)
rsync -av \
--exclude bin/ \
@@ -320,7 +334,7 @@ if [ "$create_bundle" = "true" ]; then
fi
if [ -z "$cs_binary_list" ]; then
- for binary in Wireshark $binary_list ; do
+ for binary in Wireshark $cli_binary_list ; do
cs_binary_list="$cs_binary_list $pkgexec/$binary"
done
fi
@@ -335,9 +349,8 @@ nfiles=0
endl=true
lib_dep_search_list="
$pkglib/*
- $pkgbin/*-bin
- $pkgbin/extcap/*
- $pkgexec/Wireshark
+ $pkgexec/*
+ $pkgexec/extcap/*
"
while $endl; do
@@ -388,7 +401,7 @@ macdeployqt "$bundle" -verbose=2 || exit 1
# 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
+/usr/bin/install_name_tool -delete_rpath "$qt_frameworks_dir" $pkgexec/Wireshark
# NOTE: we must rpathify *all* files, *including* Qt libraries etc.,
#
@@ -550,10 +563,10 @@ rpathify_files () {
# Fix bundle deps
#
rpathify_dir "$pkglib" "*.dylib"
- rpathify_dir "$pkgbin" "*"
+ rpathify_dir "$pkgexec" "*"
rpathify_dir "$pkgplugin" "*"
- rpathify_dir "$pkgbin/extcap" "*"
+ rpathify_dir "$pkgexec/extcap" "*"
}
PATHLENGTH=`echo $LIBPREFIX | wc -c`
diff --git a/packaging/macosx/utility-launcher/wireshark b/packaging/macosx/utility-launcher/wireshark
index e412a5024c..383730f493 100755
--- a/packaging/macosx/utility-launcher/wireshark
+++ b/packaging/macosx/utility-launcher/wireshark
@@ -18,14 +18,4 @@ fi
APP_NAME=`basename "$0"`
-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
+exec "$WIRESHARK_APP_DIR/Contents/Resources/bin/$APP_NAME" "$@"