Build an application bundle on macOS
All checks were successful
Alpine 3.22 Success
Arch Linux Success
Arch Linux AUR Success
Debian Bookworm Success
Fedora 39 Success
OpenBSD 7.8 Success
openSUSE 15.5 Success

This is far from done, but nonetheless constitutes a big improvement.

macOS application bundles are more or less necessary for:
 - showing a nice icon;
 - having spawned off instances actually be brought to the foreground;
 - file associations (yet files currently do not open properly);
 - having a reasonable method of distribution.

Also resolving a bunch of minor issues:
 - The context menu had duplicate items,
   and might needlessly end up with (null) labels.
This commit is contained in:
2025-11-08 18:47:51 +01:00
parent a7ff9f220d
commit 690e60cd74
8 changed files with 440 additions and 23 deletions

22
macos-svg2icns.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh -e
# macos-svg2icns.sh: convert an SVG to the macOS .icns format
if [ $# -ne 2 ]
then
echo >&2 "Usage: $0 INPUT.svg OUTPUT.icns"
exit 2
fi
svg=$1 icns=$2 tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
iconset="$tmpdir/$(basename "$icns" .icns).iconset"
mkdir -p "$iconset"
for size in 16 32 128 256 512
do
size2x=$((size * 2))
rsvg-convert --output="$iconset/icon_${size}x${size}.png" \
--width=$size --height=$size "$svg"
rsvg-convert --output="$iconset/icon_${size}x${size}@2x.png" \
--width=$size2x --height=$size2x "$svg"
done
iconutil -c icns -o "$icns" "$iconset"