aboutsummaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-02-26 15:14:36 -0800
committerGerald Combs <gerald@wireshark.org>2022-03-05 14:32:53 -0800
commit1677e0a8f9cb097e5b7613d51489244772b8b9be (patch)
treed82aed0a7820ec437dc42f5a1146ce8a82c397eb /packaging
parentdf0fc8b517b38f261e9d39515b57eed32bbd0347 (diff)
Packaging: Ship macOS dSYMs in their own .dmg.
Create a Wireshark.dSYM bundle for our debugging symbols. Create a separate .dmg for the dSYM bundle, similar to what we do for Windows. `dwarfdump --uuid run/Wireshark.dSYM` returns what app This reduces the size of the application bundle and .dmg quite a bit (sizes measured with `du -sm`): 51 Wireshark 3.7.0 Intel 64.dmg 81 Wireshark dSYM 3.7.0 Intel 64.dmg 182 Wireshark.app 262 Wireshark.dSYM
Diffstat (limited to 'packaging')
-rw-r--r--packaging/macosx/Debugging_symbols_installation.adoc17
-rw-r--r--packaging/macosx/Read_me_first.adoc2
-rwxr-xr-xpackaging/macosx/osx-app.sh.in87
-rwxr-xr-xpackaging/macosx/osx-dmg.sh.in36
-rw-r--r--packaging/macosx/wireshark-app.dmgbuild.in (renamed from packaging/macosx/dmgbuild-settings.py.in)19
-rw-r--r--packaging/macosx/wireshark-dsym.dmgbuild.in136
6 files changed, 254 insertions, 43 deletions
diff --git a/packaging/macosx/Debugging_symbols_installation.adoc b/packaging/macosx/Debugging_symbols_installation.adoc
new file mode 100644
index 0000000000..a7c1b99e2e
--- /dev/null
+++ b/packaging/macosx/Debugging_symbols_installation.adoc
@@ -0,0 +1,17 @@
+// Required attributes:
+// include-dir
+
+include::{include-dir}/attributes.adoc[]
+:stylesheet: {include-dir}/ws.css
+
+== Debugging Symbols for Wireshark
+
+This archive contains the debugging symbols for Wireshark {wireshark-version}.
+The debugging symbols are only necessary if Wireshark is crashing and you need to report an issue to the Wireshark development team.
+
+WARNING: This won't work properly with any version other than Wireshark {wireshark-version}.
+
+To install the symbols, drag _Wireshark.dSYM_ to the same location as _Wireshark_.
+This is usually your _Applications_ folder.
+
+To uninstall, drag _Wireshark.dSYM_ to the trash.
diff --git a/packaging/macosx/Read_me_first.adoc b/packaging/macosx/Read_me_first.adoc
index a715a4507d..1f6073ded3 100644
--- a/packaging/macosx/Read_me_first.adoc
+++ b/packaging/macosx/Read_me_first.adoc
@@ -5,7 +5,7 @@
include::{include-dir}/attributes.adoc[]
:stylesheet: {include-dir}/ws.css
-= Before You Begin
+== 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.
diff --git a/packaging/macosx/osx-app.sh.in b/packaging/macosx/osx-app.sh.in
index 382b33bb1c..70503bd410 100755
--- a/packaging/macosx/osx-app.sh.in
+++ b/packaging/macosx/osx-app.sh.in
@@ -434,42 +434,69 @@ else
fi
-dsymify_file () {
- echo " $1"
- dsymutil --minimize "$1"
-}
-
-echo "Dsymifying executables:"
-if [ -z "$bundle_binary_list" ] ; then
- echo "No executables specified for dsymifying."
- exit 1
-fi
-for binary in $bundle_binary_list ; do
- if [ -e "$binary" ];then
- dsymify_file "$binary"
- fi
-done
+bundle_dsym=$bundle.dSYM
-echo "Dsymifying frameworks:"
+frameworks=()
for framework in "$pkglib"/*.framework/Versions/*/* ; do
if [ -f "$framework" ];then
- dsymify_file "$framework"
+ frameworks+=("$framework")
fi
done
-echo "Dsymifying libraries:"
-for library in "$pkglib"/*.dylib ; do
- #
- # Squelch warnings, in case the .o files from building
- # support libraries aren't around any more.
- #
- dsymify_file "$library" | grep -E -v 'unable to open object file'
-done
-
-echo "Dsymifying plugins:"
-for plugin in "$pkgplugin"/*/*.so ; do
- dsymify_file "$plugin"
-done
+echo "Dsymifying binaries:"
+# shellcheck disable=SC2086
+dsymutil --minimize --out "$bundle_dsym" \
+ $bundle_binary_list \
+ "${frameworks[@]}" \
+ "$pkglib"/*.dylib
+
+# echo "Stripping binaries:"
+# # shellcheck disable=SC2086
+# strip -S \
+# $bundle_binary_list \
+# "${frameworks[@]}" \
+# "$pkglib"/*.dylib \
+# "$pkgplugin"/*/*.so
+
+# XXX What's the proper directory layout here?
+# dsymify_file () {
+# # out_dsym="${1/#$bundle/$bundle_dsym}.dSYM"
+# echo " $1"
+# dsymutil --minimize --out "$bundle_dsym" "$1"
+# strip "$1"
+# }
+
+# echo "Dsymifying and stripping executables:"
+# if [ -z "$bundle_binary_list" ] ; then
+# echo "No executables specified for dsymifying."
+# exit 1
+# fi
+# for binary in $bundle_binary_list ; do
+# if [ -e "$binary" ];then
+# dsymify_file "$binary"
+# fi
+# done
+
+# echo "Dsymifying and stripping frameworks:"
+# for framework in "$pkglib"/*.framework/Versions/*/* ; do
+# if [ -f "$framework" ];then
+# dsymify_file "$framework"
+# fi
+# done
+
+# echo "Dsymifying and stripping libraries:"
+# for library in "$pkglib"/*.dylib ; do
+# #
+# # Squelch warnings, in case the .o files from building
+# # support libraries aren't around any more.
+# #
+# dsymify_file "$library" | grep -E -v 'unable to open object file'
+# done
+
+# echo "Dsymifying and stripping plugins:"
+# for plugin in "$pkgplugin"/*/*.so ; do
+# dsymify_file "$plugin"
+# done
codesign_file () {
# https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html
diff --git a/packaging/macosx/osx-dmg.sh.in b/packaging/macosx/osx-dmg.sh.in
index a922e8a680..ed7105d964 100755
--- a/packaging/macosx/osx-dmg.sh.in
+++ b/packaging/macosx/osx-dmg.sh.in
@@ -7,7 +7,8 @@ set -e
# Defaults
dmgbuild="@DMGBUILD_EXECUTABLE@"
version="@VERSION@"
-settings_file="@CMAKE_BINARY_DIR@/packaging/macosx/dmgbuild-settings.py"
+app_settings_file="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-app.dmgbuild"
+dsym_settings_file="@CMAKE_BINARY_DIR@/packaging/macosx/wireshark-dsym.dmgbuild"
architecture=""
# Help message
@@ -24,8 +25,8 @@ OPTIONS
-h,--help
Display this help message.
-Icons are positioned and the background image is set in
-dmgbuild-settings.py.in.
+Icons are positioned and the background image is set in wireshark-app.dmgbuild.in
+and wireshark-dsym.dmgbuild.in.
"
}
@@ -58,27 +59,38 @@ do
shift 1
done
-vol_name="Wireshark ${version}"
-img_name="$vol_name $architecture.dmg"
+app_vol_name="Wireshark ${version}"
+app_img_name="$app_vol_name $architecture.dmg"
-echo -e "\\nCREATE WIRESHARK DISK IMAGE\\n"
+printf "\nCreating application disk image\n"
"$dmgbuild" \
--no-hidpi \
- -s "$settings_file" \
- "$vol_name" \
- "$img_name" || exit 1
+ -s "$app_settings_file" \
+ "$app_vol_name" \
+ "$app_img_name" || exit 1
-echo -e "\\nSIGN WIRESHARK DISK IMAGE\\n"
+dsym_vol_name="Wireshark dSYM ${version}"
+dsym_img_name="$dsym_vol_name $architecture.dmg"
+
+printf "\nCreating debugging symbols disk image\n"
+
+"$dmgbuild" \
+ --no-hidpi \
+ -s "$dsym_settings_file" \
+ "$dsym_vol_name" \
+ "$dsym_img_name" || exit 1
+
+printf "\nSigning disk images\n"
# TN2206, "Signing Disk Images"
if [ -n "$CODE_SIGN_IDENTITY" ] ; then
- echo -e "Signing $img_name"
+ echo -e "Signing $app_img_name and $dsym_img_name"
codesign \
--sign "Developer ID Application: $CODE_SIGN_IDENTITY" \
--timestamp \
--verbose \
- "$img_name"
+ "$app_img_name" "$dsym_img_name"
fi
exit 0
diff --git a/packaging/macosx/dmgbuild-settings.py.in b/packaging/macosx/wireshark-app.dmgbuild.in
index 18e36f081f..7a873c2dc7 100644
--- a/packaging/macosx/dmgbuild-settings.py.in
+++ b/packaging/macosx/wireshark-app.dmgbuild.in
@@ -41,7 +41,26 @@ ws_uninstall_path_helper = 'Remove Wireshark from the system path.pkg'
# UDZO - UDIF zlib-compressed image
# UDBZ - UDIF bzip2-compressed image (Mac OS X 10.4+ only)
# ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)
+# ULMO - UDIF lzma-compressed image (macOS 10.15+ only)
# Volume format (see hdiutil create -help)
+#
+# A test with the following bundles resulted in the following .dmg sizes,
+# measured with `du -sm`:
+# 182 Wireshark.app
+# 267 Wireshark.dSYM
+#
+# UDBZ
+# 51 Wireshark 3.7.0 Intel 64.dmg
+# 81 Wireshark dSYM 3.7.0 Intel 64.dmg
+#
+# ULFO
+# 51 Wireshark 3.7.0 Intel 64.dmg
+# 81 Wireshark dSYM 3.7.0 Intel 64.dmg
+#
+# ULMO
+# 40 Wireshark 3.7.0 Intel 64.dmg
+# 50 Wireshark dSYM 3.7.0 Intel 64.dmg
+
format = defines.get('format', 'UDBZ')
# Compression level (if relevant)
diff --git a/packaging/macosx/wireshark-dsym.dmgbuild.in b/packaging/macosx/wireshark-dsym.dmgbuild.in
new file mode 100644
index 0000000000..272c337e2c
--- /dev/null
+++ b/packaging/macosx/wireshark-dsym.dmgbuild.in
@@ -0,0 +1,136 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+import biplist
+import os.path
+
+#
+# Example settings file for dmgbuild
+#
+# Adapted from https://raw.githubusercontent.com/al45tair/dmgbuild/master/examples/settings.py
+
+# Use like this: dmgbuild -s settings.py "Test Volume" test.dmg
+
+# You can actually use this file for your own application (not just TextEdit)
+# by doing e.g.
+#
+# dmgbuild -s settings.py -D app=/path/to/My.app "My Application" MyApp.dmg
+
+# .. Useful stuff ..............................................................
+
+ws_version = '@VERSION@'
+ws_volname = 'Wireshark Debugging Symbols' + ws_version
+ws_srcdir = '@CMAKE_SOURCE_DIR@'
+ws_bindir = '@CMAKE_BINARY_DIR@'
+ws_app_dsym = 'Wireshark.dSYM'
+ws_readme_dsym = 'Debugging symbols installation.html'
+
+# .. Basics ....................................................................
+
+# Uncomment to override the output filename
+# filename = ws_volname + ' Intel 64.dmg'
+
+# Uncomment to override the output volume name
+# volume_name = 'Wireshark ' + ws_version
+
+# From the hdiutil man page:
+# UDZO - UDIF zlib-compressed image
+# UDBZ - UDIF bzip2-compressed image (Mac OS X 10.4+ only)
+# ULFO - UDIF lzfse-compressed image (OS X 10.11+ only)
+# ULMO - UDIF lzma-compressed image (macOS 10.15+ only)
+# Volume format (see hdiutil create -help)
+format = defines.get('format', 'UDBZ')
+
+# Compression level (if relevant)
+compression_level = 9
+
+# Volume size
+size = None
+
+# Files to include
+files = [
+ os.path.join(ws_bindir, 'run', ws_app_dsym),
+ os.path.join(ws_bindir, 'packaging', 'macosx', ws_readme_dsym),
+]
+
+# Symlinks to create
+symlinks = {
+ 'Applications': '/Applications',
+ }
+
+# Volume icon
+#
+# You can either define icon, in which case that icon file will be copied to the
+# image, *or* you can define badge_icon, in which case the icon file you specify
+# will be used to badge the system's Removable Disk icon
+#
+badge_icon = os.path.join(ws_srcdir, 'packaging', 'macosx', 'wsiconvol.icns')
+#badge_icon = icon_from_app(application)
+
+# Where to put the icons
+icon_locations = {
+ ws_app_dsym: ( 80, 64),
+ 'Applications': (240, 64),
+ ws_readme_dsym: (160, 170),
+ }
+
+# .. Window configuration ......................................................
+
+# Background
+#
+# This is a STRING containing any of the following:
+#
+# #3344ff - web-style RGB color
+# #34f - web-style RGB color, short form (#34f == #3344ff)
+# rgb(1,0,0) - RGB color, each value is between 0 and 1
+# hsl(120,1,.5) - HSL (hue saturation lightness) color
+# hwb(300,0,0) - HWB (hue whiteness blackness) color
+# cmyk(0,1,0,0) - CMYK color
+# goldenrod - X11/SVG named color
+# builtin-arrow - A simple built-in background with a blue arrow
+# /foo/bar/baz.png - The path to an image file
+#
+# The hue component in hsl() and hwb() may include a unit; it defaults to
+# degrees ('deg'), but also supports radians ('rad') and gradians ('grad'
+# or 'gon').
+#
+# Other color components may be expressed either in the range 0 to 1, or
+# as percentages (e.g. 60% is equivalent to 0.6).
+background = os.path.join(ws_srcdir, 'packaging', 'macosx', 'dmg_background.png')
+
+show_status_bar = False
+show_tab_view = False
+show_toolbar = False
+show_pathbar = False
+show_sidebar = False
+sidebar_width = 180
+
+# Window position in ((x, y), (w, h)) format
+window_rect = ((600, 200), (350, 325))
+
+# Select the default view; must be one of
+#
+# 'icon-view'
+# 'list-view'
+# 'column-view'
+# 'coverflow'
+#
+default_view = 'icon-view'
+
+# General view configuration
+show_icon_preview = False
+
+# Set these to True to force inclusion of icon/list view settings (otherwise
+# we only include settings for the default view)
+include_icon_view_settings = 'auto'
+include_list_view_settings = 'auto'
+
+# .. Icon view configuration ...................................................
+
+arrange_by = None
+grid_offset = (0, 0)
+#grid_spacing = 100
+scroll_position = (0, 0)
+#label_pos = 'bottom' # or 'right'
+text_size = 12
+icon_size = 72