Add Konverter: a local-only menu bar file converter

Drag files in Finder, hold a modifier, and drop on a wheel of outputs.
Conversions run entirely on-device through ImageIO, PDFKit, AVFoundation,
the bundled CLI tools, and optional ffmpeg/LibreOffice.

Includes a --self-test suite (41 checks) and a --convert CLI mode so the
conversion matrix can be verified without the UI.
This commit is contained in:
2026-10-20 00:36:40 +08:00
commit 2d031e58a4
47 changed files with 9149 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
# Builds Icon.icns from scripts/gen-icon.swift and drops it into Konverter.app.
# Run ./build-app.sh first (this expects the bundle to exist).
set -euo pipefail
cd "$(dirname "$0")/.."
APP="Konverter.app"
if [ ! -d "$APP" ]; then
echo "make-icon.sh: $APP not found — run ./build-app.sh first." >&2
exit 1
fi
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT
swift scripts/gen-icon.swift "$TMP/icon-1024.png"
mkdir -p "$TMP/Icon.iconset"
for s in 16 32 128 256 512; do
d=$((s * 2))
sips -z "$s" "$s" "$TMP/icon-1024.png" --out "$TMP/Icon.iconset/icon_${s}x${s}.png" >/dev/null
sips -z "$d" "$d" "$TMP/icon-1024.png" --out "$TMP/Icon.iconset/icon_${s}x${s}@2x.png" >/dev/null
done
iconutil -c icns "$TMP/Icon.iconset" -o "$TMP/Icon.icns"
mkdir -p "$APP/Contents/Resources"
cp "$TMP/Icon.icns" "$APP/Contents/Resources/Icon.icns"
echo "Generated $APP/Contents/Resources/Icon.icns"