aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-02-22 20:22:19 -0800
committerGuy Harris <guy@alum.mit.edu>2018-02-23 04:23:04 +0000
commit434d1c975979bd39f42a16622db4c94f04ab66ce (patch)
tree43ebfbcd16cd52c8581a5cbc8a9b8d20ab62221d /packaging
parent529bb0491043cc716c9e8e72e78492bed6dbb076 (diff)
Remove a bunch of obsolete code.
We no longer have the code to create a bundle, as we rely on CMake having done so, at least to the extent of populating the bundle with all the files we've generated. Get rid of the code that used to support it, and the command-line options that are no longer necessary now that we no longer build code bundles. Don't have explicit lists of CLI or extcap binaries; instead, just look for all plain files in Wireshark.app/Contents/MacOS that have read and execute permissions for owner/group/user. That way, we don't have to update the script if we add new binaries or new directories of binaries. Change-Id: I047296a7889bea71165eebde10f34bec6ea96cc5 Reviewed-on: https://code.wireshark.org/review/26032 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/macosx/osx-app.sh.in123
1 files changed, 7 insertions, 116 deletions
diff --git a/packaging/macosx/osx-app.sh.in b/packaging/macosx/osx-app.sh.in
index 71feba4d11..c6c28fe6a7 100755
--- a/packaging/macosx/osx-app.sh.in
+++ b/packaging/macosx/osx-app.sh.in
@@ -1,9 +1,7 @@
#!/bin/bash
#
# USAGE
-# osx-app [-s] [-l /path/to/libraries] -bp /path/to/wireshark/bin
-# -lp /path/to/wireshark/lib -ep /path/to/wireshark/extcap/binaries
-# -pp /path/to/wireshark/plugins -p /path/to/Info.plist
+# osx-app [-s] [-l /path/to/libraries]
#
# This script attempts to build an Wireshark.app bundle for macOS, resolving
# dynamic libraries, etc.
@@ -37,51 +35,12 @@
# Defaults
strip=false
-binary_path="/tmp/inst/bin"
-library_path="/tmp/inst/lib"
-plugin_path="/tmp/inst/lib/wireshark/plugins"
-extcap_path="/tmp/inst/lib/wireshark/extcap"
-plist="./Info.plist"
exclude_prefixes="/System/|/Library/|/usr/lib/|/usr/X11/|/opt/X11/|@rpath|@executable_path"
-create_bundle=false
# Bundle always has the same name. Version information is stored in
# the Info.plist file which is filled in by the configure script.
bundle="Wireshark.app"
-# Name of the Wireshark executable
-wireshark_bin_name="wireshark"
-
-#
-# Command-line executables
-#
-cli_binary_list="
- capinfos
- dftest
- dumpcap
- editcap
- mergecap
- randpkt
- rawshark
- text2pcap
- tshark
-"
-
-extcap_binaries="
- androiddump
- ciscodump
- randpktdump
- sshdump
- udpdump
-"
-
-for extcap_binary in $extcap_binaries
-do
- if [ -x "extcap/$extcap_binary" ]; then
- extcap_binary_list="$extcap_binary_list extcap/$extcap_binary"
- fi
-done
-
# Location for libraries (tools/macos-setup.sh defaults to whatever the
# various support libraries use as their standard installation location,
# which is /usr/local)
@@ -98,7 +57,7 @@ echo -e "
Create an app bundle for macOS
USAGE
- $0 [-s] [-l /path/to/libraries] -bp /path/to/wireshark/binaries -p /path/to/Info.plist
+ $0 [-s] [-l /path/to/libraries]
OPTIONS
-h,--help
@@ -109,27 +68,11 @@ OPTIONS
Specify the path to the libraries Wireshark depends on
(typically /sw or /opt/local). By default it is
/usr/local.
- -bp,--binary-path
- Specify the path to the Wireshark binaries. By default it
- is /tmp/inst/bin.
- -lp,--library-path
- Specify the path to the Wireshark libraries. By default it
- is /tmp/inst/lib.
- -pp,--plugin-path
- Specify the path to the Wireshark plugins. By default it
- is /tmp/inst/lib/wireshark/plugins.
- -ep,--extcap-path
- Specify the path to the Wireshark extcap binaries. By
- default it is /tmp/inst/lib/wireshark/extcap.
- -p,--plist
- Specify the path to Info.plist. Info.plist can be found
- in the base directory of the source code once configure
- has been run.
-sdkroot
Specify the root of the SDK to use.
EXAMPLE
- $0 -s -l /opt/local -bp ../../Build/bin -p Info.plist -sdkroot /Developer/SDKs/MacOSX10.5.sdk
+ $0 -s -l /opt/local -sdkroot /Developer/SDKs/MacOSX10.5.sdk
"
}
@@ -144,23 +87,6 @@ do
-l|--libraries)
LIBPREFIX="$2"
shift 1 ;;
- -bp|--binary-path)
- binary_path="$2"
- shift 1 ;;
- -lp|--library-path)
- library_path="$2"
- shift 1 ;;
- -pp|--plugin-path)
- plugin_path="$2"
- shift 1 ;;
- -ep|--extcap-path)
- extcap_path="$2"
- shift 1 ;;
- -cb|--create-bundle)
- create_bundle=true;;
- -p|--plist)
- plist="$2"
- shift 1 ;;
-h|--help)
help
exit 0 ;;
@@ -180,40 +106,11 @@ if [ ! -e "$LIBPREFIX" ]; then
exit 1
fi
-if [ "$create_bundle" = "true" ]; then
- echo -e "\nCREATE WIRESHARK APP BUNDLE\n"
-
- 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
- exit 1
- fi
- done
-
- for binary in $extcap_binary_list ; do
- binary=$( basename $binary )
- if [ ! -x "$extcap_path/$binary" ]; then
- echo "Couldn't find $binary (or it's not executable)" >&2
- exit 1
- fi
- done
-
- if [ ! -f "$plist" ]; then
- echo "Need plist file" >&2
- exit 1
- fi
-elif [ ! -d "$bundle" ] ; then
+if [ ! -d "$bundle" ] ; then
echo "$bundle not found" >&2
exit 1
fi
-
qt_frameworks_dir=$( qmake -query QT_INSTALL_LIBS )
if [ ! -d "$qt_frameworks_dir" ] ; then
echo "Can't find the Qt frameworks directory" >&2
@@ -237,16 +134,10 @@ resdir=`pwd`
#
# Get a list of all binaries in the bundle.
+# Treat all plain files with read and execute permissions for all as
+# binaries.
#
-bundle_binary_list=
-if [ -z "$bundle_binary_list" ]; then
- for binary in Wireshark $cli_binary_list ; do
- bundle_binary_list="$bundle_binary_list $pkgexec/$binary"
- done
- for binary in $extcap_binaries ; do
- bundle_binary_list="$bundle_binary_list $pkgexec/extcap/$binary"
- done
-fi
+bundle_binary_list=`find $pkgexec -type f -perm -0555 -print`
echo -e "\nFixing up $bundle...\n"