3 # Custom AppRun entry point that allows symlinking multiple
4 # executables, e.g. wireshark, tshark, dumpcap, editcap, etc.
7 # https://github.com/probonopd/ippsample/blob/feature/appimage/appimage/AppRun
9 SELF
=$
(readlink
-f "$0")
12 # https://github.com/AppImage/AppImageKit/issues/126
13 export LD_LIBRARY_PATH
="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}"
15 # We should probably set these relative to the program path in
17 if [ -z "$WIRESHARK_DATA_DIR" ] ; then
18 export WIRESHARK_DATA_DIR
="$APPDIR@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/wireshark"
21 if [ -z "$WIRESHARK_EXTCAP_DIR" ] ; then
22 export WIRESHARK_EXTCAP_DIR
="$APPDIR@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/wireshark/extcap"
25 if [ -z "$WIRESHARK_PLUGIN_DIR" ] ; then
26 export WIRESHARK_PLUGIN_DIR
="$APPDIR@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/wireshark/plugins"
29 # See if we were called by runtime.c, which sets APPIMAGE, ARGV0,
31 if [ -n "$APPIMAGE" ] && [ -n "$ARGV0" ] ; then
32 BINARY_NAME
=${ARGV0##*/}
37 if [ -e "$HERE/usr/bin/$BINARY_NAME" ] ; then
38 exec "$HERE/usr/bin/$BINARY_NAME" "$@"
40 exec "$HERE/usr/bin/wireshark" "$@"