diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-12-11 16:26:51 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2019-09-25 16:26:31 +0000 |
commit | ac4f3c0f4ddad04f0be16513357b3f03d6e565ab (patch) | |
tree | 9b15779caa9ef8839e43b4d3b4beba939f828115 /packaging | |
parent | 1f779bf9c99a75e5ee0dfa709194235175fb809e (diff) |
macOS: Make Wireshark.app drag-installable.
Create ChmodBPF installer and uninstaller packages using pkgbuild and
productbuild. Place them in Wireshark.app/Resources/Extras.
Add a path_helper installer and uninstaller which respectively add and
remove /etc/*paths.d/Wireshark.
Remove the PackageMaker and utility-launcher assets and build targets.
Show a message in the main welcome screen if we don't have capture
permissions. Add an link which launches the ChmodBPF installer.
Add a "macOS Extras" item to About → Folders.
Migrate "Read me first" from RTF to Asciidoctor, which lets us add links
and looks like our other documentation.
Rename dmg_set_style.scpt to arrange_dmg.applescript and make it plain
text. Always run it in osx-dmg.sh.
Bug: 6991
Bug: 12593
Bug: 11399
Ping-Bug: 16074
Change-Id: I7b6aa89aae2be522b4141b0d44e8142dec749e90
Reviewed-on: https://code.wireshark.org/review/31047
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'packaging')
34 files changed, 323 insertions, 812 deletions
diff --git a/packaging/macosx/ChmodBPF/install-distribution.xml b/packaging/macosx/ChmodBPF/install-distribution.xml new file mode 100644 index 0000000000..87f1e5c505 --- /dev/null +++ b/packaging/macosx/ChmodBPF/install-distribution.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Created using `productbuild -\-synthesize -\-package install.ChmodBPF.pkg /tmp/distribution.xml` +See also: https://github.com/open-eid/osx-installer/blob/master/distribution.xml +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/DistributionDefinitionRef/ +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/InstallerJavaScriptRef/ +--> +<installer-gui-script minSpecVersion="1"> + <title>ChmodBPF</title> + <welcome language="en" mime-type="text/html"><![CDATA[<html><body><br /> +<p style="margin: 0px; font: 13px 'Lucida Grande'">This package will install the ChmodBPF launch daemon, create the access_bpf group, and add you to that group.</p></body></html>]]></welcome> + <pkg-ref id="org.wireshark.ChmodBPF.pkg"/> + <options customize="never" require-scripts="false"/> + <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/> + <choices-outline> + <line choice="default"> + <line choice="org.wireshark.ChmodBPF.pkg"/> + </line> + </choices-outline> + <choice id="default"/> + <choice id="org.wireshark.ChmodBPF.pkg" visible="false"> + <pkg-ref id="org.wireshark.ChmodBPF.pkg"/> + </choice> + <pkg-ref id="org.wireshark.ChmodBPF.pkg" version="1.1" onConclusion="none">install.ChmodBPF.pkg</pkg-ref> +</installer-gui-script> diff --git a/packaging/macosx/Scripts/chmodbpf-postinstall.sh b/packaging/macosx/ChmodBPF/install-scripts/postinstall index f84bbd3c9e..f84bbd3c9e 100755 --- a/packaging/macosx/Scripts/chmodbpf-postinstall.sh +++ b/packaging/macosx/ChmodBPF/install-scripts/postinstall diff --git a/packaging/macosx/ChmodBPF/ChmodBPF b/packaging/macosx/ChmodBPF/root/Library/Application Support/Wireshark/ChmodBPF/ChmodBPF index 516b264b03..516b264b03 100755 --- a/packaging/macosx/ChmodBPF/ChmodBPF +++ b/packaging/macosx/ChmodBPF/root/Library/Application Support/Wireshark/ChmodBPF/ChmodBPF diff --git a/packaging/macosx/ChmodBPF/org.wireshark.ChmodBPF.plist b/packaging/macosx/ChmodBPF/root/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist index 30375de585..30375de585 100644 --- a/packaging/macosx/ChmodBPF/org.wireshark.ChmodBPF.plist +++ b/packaging/macosx/ChmodBPF/root/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist diff --git a/packaging/macosx/ChmodBPF/uninstall-distribution.xml b/packaging/macosx/ChmodBPF/uninstall-distribution.xml new file mode 100644 index 0000000000..c89b7c1ec3 --- /dev/null +++ b/packaging/macosx/ChmodBPF/uninstall-distribution.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Created using `productbuild -\-synthesize -\-package install.ChmodBPF.pkg /tmp/distribution.xml` +See also: https://github.com/open-eid/osx-installer/blob/master/distribution.xml +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/DistributionDefinitionRef/ +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/InstallerJavaScriptRef/ +--> +<installer-gui-script minSpecVersion="1"> + <title>Uninstall ChmodBPF</title> + <welcome language="en" mime-type="text/html"><![CDATA[<html><body><br /> +<p style="margin: 0px; font: 13px 'Lucida Grande'">This package will uninstall the ChmodBPF launch daemon and remove the access_bpf group.</p></body></html>]]></welcome> + <pkg-ref id="org.wireshark.uninstall.ChmodBPF.pkg"/> + <options customize="never" require-scripts="false"/> + <domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/> + <choices-outline> + <line choice="default"> + <line choice="org.wireshark.uninstall.ChmodBPF.pkg"/> + </line> + </choices-outline> + <choice id="default"/> + <choice id="org.wireshark.uninstall.ChmodBPF.pkg" visible="false"> + <pkg-ref id="org.wireshark.uninstall.ChmodBPF.pkg"/> + </choice> + <pkg-ref id="org.wireshark.uninstall.ChmodBPF.pkg" version="1.1" onConclusion="none">uninstall.ChmodBPF.pkg</pkg-ref> +</installer-gui-script> diff --git a/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall b/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall new file mode 100755 index 0000000000..f9723c88b4 --- /dev/null +++ b/packaging/macosx/ChmodBPF/uninstall-scripts/postinstall @@ -0,0 +1,22 @@ +#!/bin/sh + +# +# Remove the following: +# - The ChmmodBPF launch daemon +# - The ChmmodBPF script +# - The access_bpf group +# + +CHMOD_BPF_PLIST="/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist" +BPF_GROUP="access_bpf" + +launchctl unload -F "$CHMOD_BPF_PLIST" + +dscl . -read /Groups/"$BPF_GROUP" > /dev/null 2>&1 && \ + dseditgroup -q -o delete "$BPF_GROUP" + +rm -rf "/Library/Application Support/Wireshark" + +rm -f "$CHMOD_BPF_PLIST" + +rm -rf /Library/StartupItems/ChmodBPF diff --git a/packaging/macosx/Read_me_first.adoc b/packaging/macosx/Read_me_first.adoc new file mode 100644 index 0000000000..b967cfe25b --- /dev/null +++ b/packaging/macosx/Read_me_first.adoc @@ -0,0 +1,72 @@ +// Required attributes: +// include-dir +// min-macos-version + +include::{include-dir}/attributes.adoc[] +:stylesheet: {include-dir}/ws.css + += Before You Begin + +This release of Wireshark requires macOS {min-macos-version} or later. +If you are running an earlier version of macOS you can install using another packaging system such as Homebrew or MacPorts. + +== Quick Setup + +To install Wireshark, drag the _Wireshark_ application bundle to the _Applications_ folder. + +In order to be able to capture packets, install the +link:Wireshark.app/Contents/Resources/Extras/Install%20ChmodBPF.pkg[Install ChmodBPF] +package. + +If you would like to add the path to +https://www.wireshark.org/docs/man-pages/wireshark.html[Wireshark], +https://www.wireshark.org/docs/man-pages/tshark.html[TShark], +https://www.wireshark.org/docs/man-pages/capinfos.html[capinfos], +https://www.wireshark.org/docs/man-pages/editcap.html[editcap], +and +https://www.wireshark.org/docs/man-pages/[other command line utilities] +to the system PATH, install the +link:Wireshark.app/Contents/Resources/Extras/Add%20Wireshark%20to%20the%20system%20path.pkg[Add Wireshark to the system path] +package. + +== Package Installation Details + +The ChmodBPF installer writes to the following locations: + +* _/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist_. A launch daemon that adjusts permissions on the system's packet capture devices (/dev/bpf*) when the system starts up. +* _/Library/Application Support/Wireshark/ChmodBPF_. A copy of the launch daemon property list, and the script that the launch daemon runs. + +The installer group named “access_bpf” is created. The user who opened the package is added to the group. + +The system path installer writes to the following locations: + +* _/etc/paths.d/Wireshark_. The folder name in this file is automatically added to PATH +* _/etc/manpaths.d/Wireshark_. The folder name in this file is used by the man command. + +It assumes that Wireshark is installed in _/Applications_. + +== Uninstalling + +To uninstall Wireshark, do the following: + +. Remove _/Applications/Wireshark.app_ +. Remove _/Library/Application Support/Wireshark_ + +You can uninstall ChmodBPF via the +link:Wireshark.app/Contents/Resources/Extras/Uninstall%20ChmodBPF.pkg[Uninstall ChmodBPF] +package, which is available on this disk or via menu:Wireshark[About Wireshark,Folders,macOS Extras]. +You can also uninstall it manually by doing the following: + +. Unload the “org.wireshark.ChmodBPF.plist” launchd job +. Remove _/Library/LaunchDaemons/org.wireshark.ChmodBPF.plist_ +. Remove the “access_bpf” group. + +You can uninstall the system path components via the +link:Wireshark.app/Contents/Resources/Extras/Remove%20Wireshark%20from%20the%20system%20path.pkg[Remove Wireshark from the system path] +package, which is available on this disk or via menu:Wireshark[About Wireshark,Folders,macOS Extras]. +You can also uninstall it manually by doing the following: + +. Remove _/etc/paths.d/Wireshark_ +. Remove _/etc/manpaths.d/Wireshark_ + +If you move Wireshark.app the script should automatically find it. If it doesn't you will have to set WIRESHARK_APP_DIR to the path to (and including) Wireshark.app. Automatic discovery might fail if you have multiple copies of Wireshark installed on your system or if Spotlight indexing isn't working properly. diff --git a/packaging/macosx/Read_me_first.rtf.in b/packaging/macosx/Read_me_first.rtf.in deleted file mode 100644 index d6d7885866..0000000000 --- a/packaging/macosx/Read_me_first.rtf.in +++ /dev/null @@ -1,120 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1561\cocoasubrtf600 -\cocoascreenfonts1{\fonttbl\f0\froman\fcharset0 TimesNewRomanPSMT;\f1\fswiss\fcharset0 Helvetica;\f2\fnil\fcharset0 Menlo-Regular; -} -{\colortbl;\red255\green255\blue255;\red38\green38\blue38;\red242\green242\blue242;} -{\*\expandedcolortbl;;\cssrgb\c20000\c20000\c20000;\cssrgb\c96078\c96078\c96078;} -{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid1\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid1} -{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2} -{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid201\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid3} -{\list\listtemplateid4\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid301\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\lin720 }{\listname ;}\listid4} -{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid401\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid5}} -{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}} -\margl1440\margr1440\vieww13060\viewh12960\viewkind0 -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b\fs28 \cf0 Before You Begin\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1\b0\fs24 \cf0 This release of Wireshark requires macOS @MIN_MACOS_VERSION@ or later. If you are running an earlier version of macOS you can install using another packaging system such as Homebrew or MacPorts. -\f0\b\fs28 \ -\ -Quick Setup\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\b0\fs24 \cf0 \ -\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 -\ls1\ilvl0 -\f1 \cf0 Simply double-click the Wireshark package. For details about the installation read below.\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b\fs28 \cf0 What changes does the installer make?\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\b0\fs24 \cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1 \cf0 The installer writes to the following locations:\ -\ -\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 -\ls2\ilvl0\cf0 {\listtext \uc0\u8226 } -\i /Applications/Wireshark.app -\i0 . The main Wireshark application.\ -{\listtext \uc0\u8226 } -\i /Library/LaunchDaemons/org.wireshark.ChmodBPF.plist -\i0 . A launch daemon that adjusts permissions on the system's packet capture devices ( -\i /dev/bpf -\i0 *) when the system starts up.\ -{\listtext \uc0\u8226 } -\i /Library/Application Support/Wireshark/ChmodBPF -\i0 A copy of the launch daemon property list, and the script that the launch daemon runs.\ -{\listtext \uc0\u8226 } -\i /usr/local/bin -\i0 . A wrapper script and symbolic links which will let you run Wireshark and its associated utilities from the command line. You can access them directly or by adding /usr/local/bin to your PATH if it's not already in your PATH.\ -\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 -\ls3\ilvl0\cf0 {\listtext \uc0\u8226 } -\i /etc/paths.d/Wireshark -\i0 . The folder name in this file is automatically added to PATH\ -{\listtext \uc0\u8226 } -\i /etc/manpaths.d/Wireshark -\i0 . The folder name in this file is used by the man command.\ -\pard\tx560\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ -Additionally a group named -\i access_bpf -\i0 is created. The user who opened the package is added to the group.\ -\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b\fs28 \cf0 How do I uninstall?\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\b0\fs24 \cf0 \ -\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 -\ls4\ilvl0 -\f1 \cf0 {\listtext 1. }Remove -\i /Applications/Wireshark.app -\i0 \ -{\listtext 2. }Remove -\i /Library/Application Support/Wireshark -\i0 \ -{\listtext 3. }Remove the wrapper scripts from -\i /usr/local/bin -\i0 \ -{\listtext 4. }Unload the -\i org.wireshark.ChmodBPF.plist -\i0 launchd job\ -{\listtext 5. }Remove -\i /Library/LaunchDaemons/org.wireshark.ChmodBPF.plist -\i0 \ -{\listtext 6. }Remove the -\i access_bpf -\i0 group.\ -{\listtext 7. }Remove -\i /etc/paths.d/Wireshark -\i0 \ -{\listtext 8. }Remove -\i /etc/manpaths.d/Wireshark -\i0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f0\b\fs28 \cf0 \ -How does the wrapper script work? What if I move Wireshark.app?\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\b0\fs24 \cf0 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 - -\f1 \cf0 The script should find the Wireshark application bundle and run the appropriate executable automatically. It looks for Wireshark.app in the following locations:\ -\ -\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0 -\ls5\ilvl0\cf0 {\listtext \uc0\u8226 }The path set in the WIRESHARK_APP_DIR environment variable\ -{\listtext \uc0\u8226 }/Applications/Wireshark.app\ -{\listtext \uc0\u8226 }The first path returned by -\f2 mdfind "kMDItemCFBundleIdentifier == 'org.wireshark.Wireshark'" -\f1 \ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0 -\cf0 \ -If you move Wireshark.app the script should automatically find it. If it doesn't you will have to set WIRESHARK_APP_DIR to the path to (and including) Wireshark.app. Automatic discovery might fail if you have multiple copies of Wireshark installed on your system or if Spotlight indexing isn't working properly.} diff --git a/packaging/macosx/Scripts/cli-postinstall.sh b/packaging/macosx/Scripts/cli-postinstall.sh deleted file mode 100755 index 1ecc05a390..0000000000 --- a/packaging/macosx/Scripts/cli-postinstall.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -CLI_PATH="$2" -BINARIES=" - capinfos - captype - dftest - dumpcap - editcap - mergecap - mmdbresolve - randpkt - rawshark - reordercap - text2pcap - tshark -" - -cd "$CLI_PATH" - -chmod 755 wireshark -chown root:wheel wireshark - -for BIN in $BINARIES ; do - rm -f ./"$BIN" - ln -sn ./wireshark "$BIN" -done diff --git a/packaging/macosx/Scripts/cli-preinstall.sh b/packaging/macosx/Scripts/cli-preinstall.sh deleted file mode 100755 index a8d928cae0..0000000000 --- a/packaging/macosx/Scripts/cli-preinstall.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Create any missing directories with mode 755, owned by root:wheel. -# Don't blindly clobber anything that's already there. -function build_path() -{ - echo "Checking $1" - if [ ! -d "$1" ] ; then - TRIMMED=`dirname "$1"` - if [ ! -d "$TRIMMED" ] ; then - build_path "$TRIMMED" - fi - install -v -o root -g wheel -m 0755 -d "$1" - fi - -} - -build_path "$2" diff --git a/packaging/macosx/Scripts/wireshark-postinstall.sh b/packaging/macosx/Scripts/wireshark-postinstall.sh deleted file mode 100755 index 6b3578a580..0000000000 --- a/packaging/macosx/Scripts/wireshark-postinstall.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# Setting PATH -# if /etc/paths.d/Wireshark already exists we overwrite it. -# -WSPATH="$2/Wireshark.app/Contents/MacOS" - -if [ ! -d /etc/paths.d ] -then - mkdir -m u=rwx,g=rx,o=rx /etc/paths.d -fi -echo $WSPATH > /etc/paths.d/Wireshark - -# Setting MANPATH -# if /etc/manpaths.d/Wireshark already exists we overwrite it. -# -WSMANPATH="$2/Wireshark.app/Contents/Resources/share/man" - -if [ ! -d /etc/manpaths.d ] -then - mkdir -m u=rwx,g=rx,o=rx /etc/manpaths.d -fi -echo $WSMANPATH > /etc/manpaths.d/Wireshark - -# -# If we still have the old XQuartz fixer, get rid of it; we don't use -# X11, and haven't used it since Wireshark 2.0, so we don't need it. -# -XQUARTZ_FIXER_PLIST="/Library/LaunchDaemons/org.wireshark.XQuartzFixer.plist" -if [ -e "$XQUARTZ_FIXER_PLIST" ] -then - launchctl unload "$XQUARTZ_FIXER_PLIST" - rm -rf "/Library/Application Support/Wireshark/XQuartzFixer" - rm -f "$XQUARTZ_FIXER_PLIST" -fi - -# -# And get rid of the *really* old XQuartz fixer while we're at it. -# -rm -rf /Library/StartupItems/XQuartzFixer diff --git a/packaging/macosx/Scripts/wireshark-preflight.sh b/packaging/macosx/Scripts/wireshark-preflight.sh deleted file mode 100755 index bee0b2e8e0..0000000000 --- a/packaging/macosx/Scripts/wireshark-preflight.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# -# If we're upgrading, remove the old Wireshark.app before installing -# the new one so that we don't try to load old, incompatible libraries, -# plugins, codes, or other code. -# - -OLD_APP="$2/Wireshark.app" - -# This is the wrong way to go about ensuring that our installation is -# deterministic. -# https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16050 -#if [ -d "$OLD_APP" ] ; then -# rm -rf "$OLD_APP" -#fi diff --git a/packaging/macosx/Wireshark_package.pmdoc/01wireshark-contents.xml b/packaging/macosx/Wireshark_package.pmdoc/01wireshark-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/01wireshark-contents.xml +++ /dev/null @@ -1 +0,0 @@ -<pkg-contents spec="1.12"/>
\ No newline at end of file diff --git a/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml b/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml deleted file mode 100644 index 149eed4693..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/01wireshark.xml +++ /dev/null @@ -1 +0,0 @@ -<pkgref spec="1.12" uuid="0B0ABFF7-3A3D-4F37-B998-DC99734E0EFC"><config><identifier>org.wireshark.Wireshark.pkg</identifier><version>0.0.0.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true" includeRoot="true">Wireshark.app</installFrom><installTo>/Applications</installTo><flags><followSymbolicLinks/><allowRevert/><mod>allowRevert</mod></flags><packageStore type="internal"></packageStore><mod>scripts.scriptsDirectoryPath.isAbsoluteType</mod><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>installTo</mod><mod>scripts.postinstall.path</mod><mod>installFrom.isRelativeType</mod><mod>includeRoot</mod><mod>scripts.postinstall.isRelativeType</mod><mod>version</mod><mod>parent</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>identifier</mod><mod>relocatable</mod><mod>requireAuthorization</mod><mod>extraFiles</mod><mod>postInstall</mod></config><scripts><preflight relative="true" mod="true">Scripts/wireshark-preflight.sh</preflight><postinstall relative="true" mod="true">Scripts/wireshark-postinstall.sh</postinstall><scripts-dir relative="true" mod="true">Scripts</scripts-dir><scripts-element/></scripts><extra-files/></pkgref> diff --git a/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf-contents.xml b/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf-contents.xml deleted file mode 100644 index bc1e5a791f..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf-contents.xml +++ /dev/null @@ -1 +0,0 @@ -<pkg-contents spec="1.12"/>
\ No newline at end of file diff --git a/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf.xml b/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf.xml deleted file mode 100644 index 449030b0aa..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/02chmodbpf.xml +++ /dev/null @@ -1 +0,0 @@ -<pkgref spec="1.12" uuid="67B4E446-7EE6-4D65-9616-CECAA7FB2094"><config><identifier>org.wireshark.ChmodBPF.pkg</identifier><version>1.0</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" includeRoot="true">ChmodBPF</installFrom><installTo mod="true">/Library/Application Support/Wireshark</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>installTo</mod><mod>scripts.postinstall.path</mod><mod>includeRoot</mod><mod>installFrom.isRelativeType</mod><mod>version</mod><mod>parent</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>requireAuthorization</mod><mod>identifier</mod><mod>extraFiles</mod><mod>installTo.path</mod><mod>postInstall</mod></config><scripts><postinstall relative="true" mod="true">Scripts/chmodbpf-postinstall.sh</postinstall><scripts-dir relative="true" mod="true">Scripts</scripts-dir><scripts-element/></scripts><extra-files/><additionalPkgInfoXML><pkg-info><scripts><postinstall file="./postinstall"/></scripts></pkg-info></additionalPkgInfoXML></pkgref> diff --git a/packaging/macosx/Wireshark_package.pmdoc/03utility-contents.xml b/packaging/macosx/Wireshark_package.pmdoc/03utility-contents.xml deleted file mode 100644 index 12280192bf..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/03utility-contents.xml +++ /dev/null @@ -1 +0,0 @@ -<pkg-contents spec="1.12"><f n="utility-launcher" o="root" g="wheel" p="33261" pt="/Users/gcombs/Development/wireshark/packaging/macosx/utility-launcher/wireshark" m="false" t="file"><mod>group</mod><mod>owner</mod></f></pkg-contents> diff --git a/packaging/macosx/Wireshark_package.pmdoc/03utility.xml b/packaging/macosx/Wireshark_package.pmdoc/03utility.xml deleted file mode 100644 index c1779adcee..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/03utility.xml +++ /dev/null @@ -1,36 +0,0 @@ -<pkgref spec="1.12" uuid="F7F04C41-A94E-4CCA-A8F5-8B774B8D9151"> - <config> - <identifier>org.wireshark.cli.pkg</identifier> - <version>1.0</version> - <description/> - <post-install type="none"/> - <requireAuthorization/> - <installFrom relative="true">utility-launcher</installFrom> - <installTo mod="true" relocatable="true">/usr/local/bin</installTo> - <flags> - <followSymbolicLinks/> - </flags> - <packageStore type="internal"/> - <mod>installTo</mod> - <mod>relocatable</mod> - <mod>scripts.scriptsDirectoryPath.isRelativeType</mod> - <mod>identifier</mod> - <mod>parent</mod> - <mod>installTo.path</mod> - <mod>installFrom.isRelativeType</mod> - <mod>scripts.postinstall.isRelativeType</mod> - </config> - <scripts> - <preinstall relative="true" mod="true">Scripts/cli-preinstall.sh</preinstall> - <postinstall relative="true" mod="true">Scripts/cli-postinstall.sh</postinstall> - <scripts-dir relative="true" mod="true">Scripts</scripts-dir> - </scripts> - <contents> - <file-list>03utility-contents.xml</file-list> - <filter>/CVS$</filter> - <filter>/\.svn$</filter> - <filter>/\.cvsignore$</filter> - <filter>/\.cvspass$</filter> - <filter>/\.DS_Store$</filter> - </contents> -</pkgref> diff --git a/packaging/macosx/Wireshark_package.pmdoc/index.xml.in b/packaging/macosx/Wireshark_package.pmdoc/index.xml.in deleted file mode 100644 index b45f91d6e6..0000000000 --- a/packaging/macosx/Wireshark_package.pmdoc/index.xml.in +++ /dev/null @@ -1 +0,0 @@ -<pkmkdoc spec="1.12"><properties><title>Wireshark</title><build>Wireshark.pkg</build><organization>org.wireshark</organization><userSees ui="both"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><description>Wireshark and associated command line utilities.</description><contents><choice title="Wireshark" id="wireshark" tooltip="The Wireshark network protocol analyzer" description="The main Wireshark application" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.Wireshark.pkg"/></choice><choice title="Set capture permissions at startup" id="chmodbpf" tooltip="Install the ChmodBPF launch daemon and add an access_bpf group" description="This installs a launch daemon (org.wireshark.ChmodBPF.plist) that changes the group permissions of each BPF device to allow access for the "access_bpf" group. It creates the "access_bpf" group if it doesn't exist and adds the current user to the group." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.ChmodBPF.pkg"/></choice><choice title="Command line utilities" id="cli" tooltip="Command line utilities associated with Wireshark" description="Various utilities associated with Wireshark including TShark, dumpcap, mergecap, capinfos, and editcap." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.wireshark.cli.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource relative="true" type="license">COPYING.txt</resource></locale></resources><requirements><requirement id="tosv" operator="ge" value="'@MIN_MACOS_VERSION@'"><message-title>Failure</message-title><message>This package requires macOS @MIN_MACOS_VERSION@ or later. If you cannot upgrade you might try installing using MacPorts or Fink.</message></requirement></requirements><flags/><extra-files/><item type="file">01wireshark.xml</item><item type="file">02chmodbpf.xml</item><item type="file">03utility.xml</item><mod>description</mod><mod>properties.title</mod><mod>properties.anywhereDomain</mod><mod>properties.userDomain</mod><mod>properties.customizeOption</mod><mod>extraFiles</mod><mod>postinstallActions.actions</mod><mod>properties.systemDomain</mod></pkmkdoc> diff --git a/packaging/macosx/arrange_dmg.applescript.in b/packaging/macosx/arrange_dmg.applescript.in new file mode 100644 index 0000000000..89d745f892 --- /dev/null +++ b/packaging/macosx/arrange_dmg.applescript.in @@ -0,0 +1,43 @@ +(* +This AppleScript customizes the appearance of the +disk image in which Wireshark is bundled on macOS + + Author: + Jean-Olivier Irisson <jo.irisson@gmail.com> + +Modified by: + Gerald Combs <gerald@wireshark.org> + + Copyright 2006 + Licensed under GNU General Public License +*) + + +tell application "Finder" + tell disk "Wireshark @VERSION@" + open + tell container window + set current view to icon view + set toolbar visible to false + set statusbar visible to false + set the bounds to {600, 200, 950, 725} + end tell + set iv_opts to the icon view options of container window + set background picture of iv_opts to POSIX file "/Volumes/Wireshark @VERSION@/.assets/dmg_background.png" + tell iv_opts + set icon size to 72 + set arrangement to not arranged + end tell + set position of application file "Wireshark.app" to {80, 64} + set position of alias file "Applications" to {240, 64} + set position of file "Read me first.html" to {160, 170} + set position of alias file "Install ChmodBPF.pkg" to {80, 276} + set position of alias file "Uninstall ChmodBPF.pkg" to {250, 276} + set position of alias file "Add Wireshark to the system path.pkg" to {80, 382} + set position of alias file "Remove Wireshark from the system path.pkg" to {250, 382} + update without registering applications + end tell + + --give the finder some time to write the .DS_Store file + delay 7 +end tell diff --git a/packaging/macosx/dmg_background.png b/packaging/macosx/dmg_background.png Binary files differindex bf5a44a7d0..134326f031 100644 --- a/packaging/macosx/dmg_background.png +++ b/packaging/macosx/dmg_background.png diff --git a/packaging/macosx/dmg_background.svg b/packaging/macosx/dmg_background.svg index 198bf2bf72..ed90299e69 100644 --- a/packaging/macosx/dmg_background.svg +++ b/packaging/macosx/dmg_background.svg @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> + <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" @@ -10,17 +11,16 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="400" - height="350" + height="500" id="svg2" sodipodi:version="0.32" - inkscape:version="0.46" + inkscape:version="0.92.2 5c3e80d, 2017-08-06" version="1.0" - sodipodi:docbase="/Users/gerald/devel/wireshark/packaging/macosx" sodipodi:docname="dmg_background.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/Users/gerald/Development/wireshark/packaging/macosx/dmg_background.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-filename="/tmp/dmg_background.png" + inkscape:export-xdpi="72" + inkscape:export-ydpi="72"> <defs id="defs4"> <linearGradient @@ -38,16 +38,6 @@ offset="1" id="stop3161" /> </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient3157" - id="linearGradient2419" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0,-3.3291384,3.3394872,0,-1517.2685,891.61083)" - x1="228.43385" - y1="522.79901" - x2="248.31575" - y2="522.79901" /> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 175 : 1" @@ -117,44 +107,15 @@ y2="108.51223" gradientUnits="userSpaceOnUse" gradientTransform="translate(10.101525,393.9595)" /> - <filter - inkscape:collect="always" - x="-0.55671173" - width="2.1134236" - y="-0.55558705" - height="2.1111741" - id="filter4219"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3402816" - id="feGaussianBlur4221" /> - </filter> - <filter - inkscape:collect="always" - x="-0.01353314" - width="1.0270663" - y="-0.11603204" - height="1.2320641" - id="filter4223"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3402817" - id="feGaussianBlur4225" /> - </filter> - <filter - inkscape:collect="always" - x="-0.013595353" - width="1.0271907" - y="-0.10226213" - height="1.2045243" - id="filter5200"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.2503457" - id="feGaussianBlur5202" /> - </filter> <inkscape:perspective - id="perspective2500" + id="perspective3625" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <inkscape:perspective + id="perspective2594" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" @@ -169,20 +130,22 @@ gridtolerance="10000" guidetolerance="10" objecttolerance="10" - inkscape:pageopacity="0.0" + inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:zoom="0.98994949" - inkscape:cx="323.61168" - inkscape:cy="211.48805" + inkscape:zoom="1.3" + inkscape:cx="200" + inkscape:cy="250" inkscape:document-units="px" inkscape:current-layer="layer1" width="625px" height="350px" inkscape:window-width="1172" inkscape:window-height="811" - inkscape:window-x="79" - inkscape:window-y="35" - showgrid="false" /> + inkscape:window-x="0" + inkscape:window-y="877" + showgrid="false" + inkscape:window-maximized="0" + inkscape:pagecheckerboard="true" /> <metadata id="metadata7"> <rdf:RDF> @@ -191,13 +154,15 @@ <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" - id="layer1"> + id="layer1" + transform="translate(0,150)"> <rect style="opacity:1;fill:url(#linearGradient4266);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17716534;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" id="rect3289" @@ -205,62 +170,26 @@ height="267.69043" x="5.0507655" y="389.39594" /> - <g - id="g2425" - transform="translate(-19.999991,-25)"> - <g - transform="matrix(1.1558451,-0.3853304,0.3853307,1.1558443,-238.94396,-89.857966)" - id="g5204"> - <text - style="font-size:96.08612823px;font-style:normal;font-weight:bold;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4223);font-family:Luxi Sans" - x="111.0079" - y="296.20258" - id="text555" - transform="scale(0.9479031,1.0549601)" - sodipodi:linespacing="125%" - inkscape:export-filename="/home/gerald/devel/wsweb/image/wslogo.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000"> - <tspan - x="111.0079" - y="296.20258" - sodipodi:role="line" - id="tspan563" - style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00002384%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans">WIRE<tspan - style="font-size:64px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans" - id="tspan1330">SHARK</tspan> -<tspan - id="tspan1334" - style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00002384%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans" /> -</tspan> - </text> - <path - style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#d7d7d7;stroke-width:4.29723692;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5200)" - d="M 106.5666,255.33213 L 263.50037,255.33213 C 263.50037,255.33213 267.57147,207.5469 309.63965,206.88321 C 296.06928,228.12109 308.84175,255.39956 308.84175,255.39956 L 499.52492,255.39956" - id="path1328" - sodipodi:nodetypes="ccccc" - inkscape:export-filename="/home/gerald/devel/wsweb/image/wslogo.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000" /> - <text - id="text4138" - y="248.90048" - x="485.69824" - style="font-size:13.94218159px;font-style:normal;font-weight:normal;fill:#d7d7d7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4219);font-family:Bitstream Vera Sans" - xml:space="preserve"><tspan - y="248.90048" - x="485.69824" - id="tspan4140" - sodipodi:role="line">®</tspan></text> - </g> - <path - sodipodi:nodetypes="cccccccc" - id="path2417" - d="M 213.71311,129 C 259,98.53122 259,98.53122 259,98.53122 L 213.71311,67 L 213.71311,85.01782 L 181,84.80586 L 181,112.04458 L 213.71311,112.04458 L 213.71311,129 z" - style="opacity:1;fill:url(#linearGradient2419);fill-opacity:1;fill-rule:evenodd;stroke:#53851a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - inkscape:export-filename="/Users/gerald/devel/wsweb/image/dlarrow.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90" /> - </g> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.55733299px;line-height:100%;font-family:'Lucida Grande';-inkscape-font-specification:'Lucida Grande';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + x="215.77544" + y="-28.865963" + id="text9542" + transform="scale(0.84814722,1.1790406)" + inkscape:export-filename="/tmp/util_background.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"><tspan + sodipodi:role="line" + id="tspan9540" + x="215.77544" + y="-28.865963" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:62.42607117px;font-family:'Arial Narrow';-inkscape-font-specification:'Arial Narrow Bold';stroke-width:0.86972553px"><tspan + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:62.42607117px;font-family:'Arial Narrow';-inkscape-font-specification:'Arial Narrow Bold';fill:#000000;fill-opacity:0.37254902;stroke-width:1px" + id="tspan9544">></tspan><tspan + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:62.42607117px;font-family:'Arial Narrow';-inkscape-font-specification:'Arial Narrow Bold';fill:#000000;fill-opacity:0.49803922;stroke-width:1px" + id="tspan9624">></tspan><tspan + style="fill:#000000;fill-opacity:0.62352941" + id="tspan9676">></tspan></tspan></text> </g> </svg> diff --git a/packaging/macosx/dmg_set_style.scpt b/packaging/macosx/dmg_set_style.scpt Binary files differdeleted file mode 100755 index a5e17b776a..0000000000 --- a/packaging/macosx/dmg_set_style.scpt +++ /dev/null diff --git a/packaging/macosx/osx-dmg.sh.in b/packaging/macosx/osx-dmg.sh.in index e13d99eb91..39db2f256b 100755 --- a/packaging/macosx/osx-dmg.sh.in +++ b/packaging/macosx/osx-dmg.sh.in @@ -34,54 +34,19 @@ # to be commited to the repository when this is done. # +# Set during configuration +version="@VERSION@" +if [ -z "$version" ] ; then + echo "VERSION not set" + exit 1 +fi + # Defaults -set_ds_store=false -ds_store_root="root.ds_store" app_bundle="Wireshark.app" -rw_name="RWwireshark.dmg" -volume_name="Wireshark" +rw_name="RWwireshark $version.dmg" +volume_name="Wireshark $version" src_dir="." tmp_dir="/tmp/dmg-$$" -auto_open_opt= -packagemaker=$( type -p packagemaker || type -p PackageMaker ) - -if [ -z "$packagemaker" ] ; then - if [ -f /Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker ] - then - # - # Xcode 4 and later, with the "Auxiliary Tools for Xcode" - # download from developer.apple.com. (There are no such - # downloads for Mavericks or later, but PackageMaker from - # the Late July 2012 download for Mountain Lion appears to - # work on Yosemite.) - # - packagemaker=/Applications/Xcode.app//Contents/Applications/PackageMaker.app/Contents/MacOS/PackageMaker - elif [ -f /Applications/Xcode.app/Developer/Tools/packagemaker ] - then - packagemaker=/Applications/Xcode.app/Developer/Tools/packagemaker - elif [ -f /Applications/Xcode.app/Developer/usr/bin/packagemaker ] - then - packagemaker=/Applications/Xcode.app/Developer/usr/bin/packagemaker - elif [ -f /Developer/Tools/packagemaker ] - then - packagemaker=/Developer/Tools/packagemaker - elif [ -f /Developer/usr/bin/packagemaker ] - then - packagemaker=/Developer/usr/bin/packagemaker - elif [ -f /usr/bin/packagemaker ] - then - packagemaker=/usr/bin/packagemaker - elif [ -f /usr/local/bin/packagemaker ] - then - packagemaker=/usr/local/bin/packagemaker - fi -fi - -if [ -z "$packagemaker" ] -then - echo "$0: couldn't find PackageMaker" 1>&2 - exit 1 -fi # Help message #---------------------------------------------------------- @@ -96,14 +61,15 @@ USAGE OPTIONS -h,--help Display this help message. - -s - Set a new apperance (do not actually create a bundle). -b,--app-bundle Set the path to the Wireshark.app that should be copied in the dmg. -S,--source-directory If this is an out-of-tree build, set this to the path to the packaging/macosx source directory. + +Icons are positioned and the background image is set in +arrange_dmg.applescript. " } @@ -114,8 +80,6 @@ do -h|--help) help exit 0 ;; - -s) - set_ds_store=true ;; -b|--app-bundle) app_bundle="$2" shift 1 ;; @@ -129,7 +93,6 @@ do shift 1 done - # Safety checks if [ ! -e "$app_bundle" ]; then echo "Cannot find application bundle: $app_bundle" @@ -151,46 +114,7 @@ case $( file "$ws_bin" ) in exit 1 ;; esac - -# Set the version -version="@VERSION@" -if [ -z "$version" ] ; then - echo "VERSION not set" - exit 1 -fi - -echo -e "\\nCREATE WIRESHARK PACKAGE\\n" -pkg_title="$volume_name $version $architecture" -pkg_file="$pkg_title.pkg" -rm -rf "$pkg_file" -$packagemaker --doc "Wireshark_package.pmdoc" \ - --title "$pkg_title" \ - --id "org.wireshark.pkg.Wireshark" \ - --version "$version" \ - --target @MIN_MACOS_VERSION@ \ - --verbose || exit 1 - -if [ -n "$CODE_SIGN_IDENTITY" ] ; then - pkg_file_unsigned="$pkg_title UNSIGNED.pkg" - - echo -e "Signing $pkg_file" - mv "$pkg_file" "$pkg_file_unsigned" || exit 1 - productsign \ - --sign "Developer ID Installer: $CODE_SIGN_IDENTITY" \ - --timestamp \ - "$pkg_file_unsigned" "$pkg_file" || exit 1 - # TN2206, "Checking Gatekeeper Conformance" - spctl --assess --type install "$pkg_file" || exit 1 - pkgutil --check-signature "$pkg_file" || exit 1 - shasum "$pkg_file" - shasum -a 256 "$pkg_file" - rm -rf "$pkg_file_unsigned" -else - echo "Code signing not performed (no identity)" -fi - -# To do: Notarize our package. -# https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution/customizing_the_notarization_workflow?language=objc +pkg_title="$volume_name $architecture" echo -e "\\nCREATE WIRESHARK DISK IMAGE\\n" img_name="$pkg_title.dmg" @@ -200,20 +124,19 @@ rm -rf "$tmp_dir" mkdir "$tmp_dir" || exit 1 echo -e "Copying files to temp directory" -# Copy the installer package -cp "$pkg_file" "$tmp_dir"/ || exit 1 +# Copy the application bundle +cp -r "$app_bundle" "$tmp_dir"/ || exit 1 +ln -sn "/Applications" "$tmp_dir"/ + # Copy the readme -cp "../packaging/macosx/Read_me_first.rtf" "$tmp_dir/Read me first.rtf" || exit 1 +cp "../packaging/macosx/Read_me_first.html" "$tmp_dir/Read me first.html" || exit 1 -# If the appearance settings are not to be modified we just copy them -if [ ${set_ds_store} = "false" ]; then - # Copy the .DS_Store file which contains information about - # window size, appearance, etc. Most of this can be set - # with Apple script but involves user intervention so we - # just keep a copy of the correct settings and use that instead. - cp "$src_dir/$ds_store_root" "$tmp_dir/.DS_Store" || exit 1 - auto_open_opt=-noautoopen -fi +# Copy the background image +mkdir "$tmp_dir/.assets" || exit 1 +cp "$src_dir/dmg_background.png" "$tmp_dir/.assets/" || exit 1 + +# Create top-level package symlinks +ln -sn "$app_bundle/Contents/Resources/Extras/"*.pkg "$tmp_dir/" # Create a new RW image from the temp directory. echo -e "Creating a temporary disk image" @@ -225,47 +148,20 @@ rm -rf "$tmp_dir" # Mount the created image. #MOUNT_DIR="/Volumes/$volume_name" -DEV_NAME=$( /usr/bin/hdiutil attach -readwrite -noverify $auto_open_opt "$rw_name" | grep -E '^/dev/' | sed 1q | awk '{print $1}' ) +DEV_NAME=$( /usr/bin/hdiutil attach -readwrite -noverify -noautoopen "$rw_name" | grep -E '^/dev/' | sed 1q | awk '{print $1}' ) + +# Set icon positions and background image +# Work around 'Finder got an error: Can’t get disk "Wireshark 3.1.1". (-1728)' +sleep 5 +osascript ../packaging/macosx/arrange_dmg.applescript || exit 1 # Have the disk image window open automatically when mounted. -bless -openfolder /Volumes/$volume_name +bless -openfolder "/Volumes/$volume_name" # `hdiutil detach` sometimes fails with "Resource busy", possibly due to Spotlight. # Give it a chance to finish up here and pass `-force` to hdiutil below. sleep 5 -# In case the apperance has to be modified, mount the image and apply the base settings to it via Applescript -if [ ${set_ds_store} = "true" ]; then - /usr/bin/osascript dmg_set_style.scpt - - open "/Volumes/$volume_name" - # BUG: one needs to move and close the window manually for the - # changes in appearance to be retained... - echo " - ************************************** - * Please move the disk image window * - * to the center of the screen * - * then close it and press enter * - ************************************** - " - read -r -e _ - - # .DS_Store files aren't written till the disk is unmounted, or finder is restarted. - hdiutil detach "$DEV_NAME" -force - auto_open_opt=-noautoopen - DEV_NAME=$( /usr/bin/hdiutil attach -readwrite -noverify $auto_open_opt "$rw_name" | grep -E '^/dev/' | sed 1q | awk '{print $1}' ) - echo - cp /Volumes/$volume_name/.DS_Store ./$ds_store_root - SetFile -a v ./$ds_store_root - echo "New $ds_store_root written. Re-run $0 without the -s option to use them" - - # Unmount the disk image. - hdiutil detach "$DEV_NAME" -force - rm -f "$rw_name" - - exit 0 -fi - # Unmount the disk image. hdiutil detach "$DEV_NAME" diff --git a/packaging/macosx/path_helper/install-distribution.xml b/packaging/macosx/path_helper/install-distribution.xml new file mode 100644 index 0000000000..103d271efc --- /dev/null +++ b/packaging/macosx/path_helper/install-distribution.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Created using `productbuild -\-synthesize -\-package org.wireshark.path_helper.pkg.pkg /tmp/install-distribution.xml` +See also: https://github.com/open-eid/osx-installer/blob/master/distribution.xml +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/DistributionDefinitionRef/ +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/InstallerJavaScriptRef/ +--> +<installer-gui-script minSpecVersion="1"> + <title>Add Wireshark to the system PATH</title> + <welcome language="en" mime-type="text/html"><![CDATA[<html><body><br /> +<p style="margin: 0px; font: 13px 'Lucida Grande'">This package will add Wireshark and its associated utilities to the system PATH and MANPATH. Wireshark must be installed in /Applications.</p></body></html>]]></welcome> + <pkg-ref id="org.wireshark.path_helper.pkg"/> + <options customize="never" require-scripts="false"/> + <choices-outline> + <line choice="default"> + <line choice="org.wireshark.path_helper.pkg"/> + </line> + </choices-outline> + <choice id="default"/> + <choice id="org.wireshark.path_helper.pkg" visible="false"> + <pkg-ref id="org.wireshark.path_helper.pkg"/> + </choice> + <pkg-ref id="org.wireshark.path_helper.pkg" version="1.0" onConclusion="none">install.path_helper.pkg</pkg-ref> +</installer-gui-script> diff --git a/packaging/macosx/path_helper/root/etc/manpaths.d/Wireshark b/packaging/macosx/path_helper/root/etc/manpaths.d/Wireshark new file mode 100644 index 0000000000..205dad7ece --- /dev/null +++ b/packaging/macosx/path_helper/root/etc/manpaths.d/Wireshark @@ -0,0 +1 @@ +/Applications/Wireshark.app/Contents/Resources/share/man diff --git a/packaging/macosx/path_helper/root/etc/paths.d/Wireshark b/packaging/macosx/path_helper/root/etc/paths.d/Wireshark new file mode 100644 index 0000000000..554937616c --- /dev/null +++ b/packaging/macosx/path_helper/root/etc/paths.d/Wireshark @@ -0,0 +1 @@ +/Applications/Wireshark.app/Contents/MacOS diff --git a/packaging/macosx/path_helper/uninstall-distribution.xml b/packaging/macosx/path_helper/uninstall-distribution.xml new file mode 100644 index 0000000000..69f6f5722f --- /dev/null +++ b/packaging/macosx/path_helper/uninstall-distribution.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Created using `productbuild -\-synthesize -\-package org.wireshark.uninstall.path.pkg /tmp/uninstall-distribution.xml` +See also: https://github.com/open-eid/osx-installer/blob/master/distribution.xml +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/DistributionDefinitionRef/ +https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/InstallerJavaScriptRef/ +--> +<installer-gui-script minSpecVersion="1"> + <title>Add Wireshark to the system PATH</title> + <welcome language="en" mime-type="text/html"><![CDATA[<html><body><br /> +<p style="margin: 0px; font: 13px 'Lucida Grande'">This package will remove Wireshark and its associated utilities from the system PATH and MANPATH.</p></body></html>]]></welcome> + <pkg-ref id="org.wireshark.uninstall.path_helper.pkg"/> + <options customize="never" require-scripts="false"/> + <choices-outline> + <line choice="default"> + <line choice="org.wireshark.uninstall.path_helper.pkg"/> + </line> + </choices-outline> + <choice id="default"/> + <choice id="org.wireshark.uninstall.path_helper.pkg" visible="false"> + <pkg-ref id="org.wireshark.uninstall.path_helper.pkg"/> + </choice> + <pkg-ref id="org.wireshark.uninstall.path_helper.pkg" version="1.0" onConclusion="none">uninstall.path_helper.pkg</pkg-ref> +</installer-gui-script> diff --git a/packaging/macosx/path_helper/uninstall-scripts/postinstall b/packaging/macosx/path_helper/uninstall-scripts/postinstall new file mode 100755 index 0000000000..f596c783d0 --- /dev/null +++ b/packaging/macosx/path_helper/uninstall-scripts/postinstall @@ -0,0 +1,8 @@ +#!/bin/sh + +# +# Remove the Wireshark paths.d and manpaths.d entries. +# + +rm -f /private/etc/paths.d/Wireshark +rm -f /private/etc/manpaths.d/Wireshark diff --git a/packaging/macosx/root.ds_store b/packaging/macosx/root.ds_store Binary files differdeleted file mode 100644 index 5f5264b8fc..0000000000 --- a/packaging/macosx/root.ds_store +++ /dev/null diff --git a/packaging/macosx/util.ds_store b/packaging/macosx/util.ds_store Binary files differdeleted file mode 100644 index 8b11e111b3..0000000000 --- a/packaging/macosx/util.ds_store +++ /dev/null diff --git a/packaging/macosx/util_background.png b/packaging/macosx/util_background.png Binary files differdeleted file mode 100644 index a20c01a931..0000000000 --- a/packaging/macosx/util_background.png +++ /dev/null diff --git a/packaging/macosx/util_background.svg b/packaging/macosx/util_background.svg deleted file mode 100644 index 702568fd4c..0000000000 --- a/packaging/macosx/util_background.svg +++ /dev/null @@ -1,273 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="400" - height="350" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.46" - version="1.0" - sodipodi:docbase="/Users/gerald/devel/wireshark/packaging/macosx" - sodipodi:docname="util_background.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/Users/gerald/Development/wireshark/packaging/macosx/util_background.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> - <defs - id="defs4"> - <linearGradient - id="linearGradient3157"> - <stop - style="stop-color:#6eac2c;stop-opacity:1;" - offset="0" - id="stop3159" /> - <stop - id="stop3848" - offset="0.5" - style="stop-color:#acdd4a;stop-opacity:1;" /> - <stop - style="stop-color:#dbf1b0;stop-opacity:1;" - offset="1" - id="stop3161" /> - </linearGradient> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 175 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="625 : 175 : 1" - inkscape:persp3d-origin="312.5 : 116.66667 : 1" - id="perspective2499" /> - <linearGradient - id="linearGradient4260"> - <stop - style="stop-color:#d3d3d3;stop-opacity:1;" - offset="0" - id="stop4262" /> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="1" - id="stop4264" /> - </linearGradient> - <linearGradient - id="linearGradient10020"> - <stop - id="stop10022" - offset="0" - style="stop-color:#ffffff;stop-opacity:0.85567009;" /> - <stop - style="stop-color:#ffffff;stop-opacity:0.49411765;" - offset="0.09" - id="stop3157" /> - <stop - style="stop-color:#ffffff;stop-opacity:0.35051546;" - offset="0.28999999" - id="stop4129" /> - <stop - id="stop10024" - offset="1" - style="stop-color:#ffffff;stop-opacity:0.05882353;" /> - </linearGradient> - <linearGradient - id="linearGradient3152"> - <stop - style="stop-color:#1ba0df;stop-opacity:1;" - offset="0" - id="stop3154" /> - <stop - style="stop-color:#1373a1;stop-opacity:1;" - offset="1" - id="stop3156" /> - </linearGradient> - <linearGradient - id="linearGradient3978"> - <stop - style="stop-color:#50e740;stop-opacity:1;" - offset="0" - id="stop3980" /> - <stop - style="stop-color:#45a615;stop-opacity:0.94117647;" - offset="1" - id="stop3982" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient4260" - id="linearGradient4266" - x1="289.91379" - y1="4.5278296" - x2="289.91379" - y2="108.51223" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(10.101525,393.9595)" /> - <filter - inkscape:collect="always" - x="-0.55671173" - width="2.1134236" - y="-0.55558705" - height="2.1111741" - id="filter4219"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3402816" - id="feGaussianBlur4221" /> - </filter> - <filter - inkscape:collect="always" - x="-0.01353314" - width="1.0270663" - y="-0.11603204" - height="1.2320641" - id="filter4223"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.3402817" - id="feGaussianBlur4225" /> - </filter> - <filter - inkscape:collect="always" - x="-0.013595353" - width="1.0271907" - y="-0.10226213" - height="1.2045243" - id="filter5200"> - <feGaussianBlur - inkscape:collect="always" - stdDeviation="2.2503457" - id="feGaussianBlur5202" /> - </filter> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient3157" - id="linearGradient3579" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0,-3.3291384,3.3394872,0,-1517.2685,971.6108)" - x1="228.43385" - y1="522.79901" - x2="248.31575" - y2="522.79901" /> - <inkscape:perspective - id="perspective3625" - inkscape:persp3d-origin="372.04724 : 350.78739 : 1" - inkscape:vp_z="744.09448 : 526.18109 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_x="0 : 526.18109 : 1" - sodipodi:type="inkscape:persp3d" /> - <inkscape:perspective - id="perspective2594" - inkscape:persp3d-origin="372.04724 : 350.78739 : 1" - inkscape:vp_z="744.09448 : 526.18109 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_x="0 : 526.18109 : 1" - sodipodi:type="inkscape:persp3d" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10" - objecttolerance="10" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="0.98994949" - inkscape:cx="220.57612" - inkscape:cy="211.48805" - inkscape:document-units="px" - inkscape:current-layer="layer1" - width="625px" - height="350px" - inkscape:window-width="1172" - inkscape:window-height="811" - inkscape:window-x="79" - inkscape:window-y="35" - showgrid="false" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <rect - style="opacity:1;fill:url(#linearGradient4266);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.17716534;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect3289" - width="637.40625" - height="267.69043" - x="5.0507655" - y="389.39594" /> - <g - id="g3568" - transform="translate(-19.999991,24)"> - <g - transform="matrix(1.1558451,-0.3853304,0.3853307,1.1558443,-238.94396,-9.8579659)" - id="g5204"> - <text - style="font-size:96.08612823px;font-style:normal;font-weight:bold;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4223);font-family:Luxi Sans" - x="111.0079" - y="296.20258" - id="text555" - transform="scale(0.9479031,1.0549601)" - sodipodi:linespacing="125%" - inkscape:export-filename="/home/gerald/devel/wsweb/image/wslogo.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000"> - <tspan - x="111.0079" - y="296.20258" - sodipodi:role="line" - id="tspan563" - style="font-size:64px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00002384%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans">WIRE<tspan - style="font-size:64px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans" - id="tspan1330">SHARK</tspan> -<tspan - id="tspan1334" - style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00002384%;writing-mode:lr-tb;text-anchor:start;fill:#d7d7d7;fill-opacity:1;font-family:Bitstream Vera Sans" /> -</tspan> - </text> - <path - style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#d7d7d7;stroke-width:4.29723692;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5200)" - d="M 106.5666,255.33213 L 263.50037,255.33213 C 263.50037,255.33213 267.57147,207.5469 309.63965,206.88321 C 296.06928,228.12109 308.84175,255.39956 308.84175,255.39956 L 499.52492,255.39956" - id="path1328" - sodipodi:nodetypes="ccccc" - inkscape:export-filename="/home/gerald/devel/wsweb/image/wslogo.png" - inkscape:export-xdpi="90.000000" - inkscape:export-ydpi="90.000000" /> - <text - id="text4138" - y="248.90048" - x="485.69824" - style="font-size:13.94218159px;font-style:normal;font-weight:normal;fill:#d7d7d7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter4219);font-family:Bitstream Vera Sans" - xml:space="preserve"><tspan - y="248.90048" - x="485.69824" - id="tspan4140" - sodipodi:role="line">®</tspan></text> - </g> - <path - sodipodi:nodetypes="cccccccc" - id="path2417" - d="M 213.71311,209 C 259,178.53122 259,178.53122 259,178.53122 L 213.71311,147 L 213.71311,165.01782 L 181,164.80586 L 181,192.04458 L 213.71311,192.04458 L 213.71311,209 z" - style="opacity:1;fill:url(#linearGradient3579);fill-opacity:1;fill-rule:evenodd;stroke:#53851a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - inkscape:export-filename="/Users/gerald/devel/wsweb/image/dlarrow.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90" /> - </g> - </g> -</svg> diff --git a/packaging/macosx/utility-launcher/wireshark b/packaging/macosx/utility-launcher/wireshark deleted file mode 100755 index 90ca4a152d..0000000000 --- a/packaging/macosx/utility-launcher/wireshark +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# -# Wireshark CLI utility launcher - -if [ -z "$WIRESHARK_APP_DIR" ] ; then - WIRESHARK_APP_DIR="/Applications/Wireshark.app" -fi - -if [ ! -d "$WIRESHARK_APP_DIR" ] ; then - WIRESHARK_APP_DIR=`mdfind "kMDItemCFBundleIdentifier == 'org.wireshark.Wireshark'" | head -n 1` -fi - -if [ ! -d "$WIRESHARK_APP_DIR" ] ; then - echo "Wireshark doesn't appear to be located at $WIRESHARK_APP_DIR." - echo "Please set WIRESHARK_APP_DIR to its proper location and try again." - exit 1 -fi - -APP_NAME=`basename "$0"` -if [ "$APP_NAME" = "wireshark" ] ; then - APP_NAME=Wireshark -fi -exec "$WIRESHARK_APP_DIR/Contents/MacOS/$APP_NAME" "$@" |