From 8e3dedf0c51b3e5658504e2c73e498b16c68db54 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Tue, 14 Jul 2026 02:55:52 +0800 Subject: [PATCH] build: package Linux tray runtime --- packaging/deb/control | 2 +- scripts/build.sh | 9 +++++++++ scripts/package-appimage.sh | 5 +++++ scripts/test-package-formats.sh | 3 +++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packaging/deb/control b/packaging/deb/control index 92c096a..4a60432 100644 --- a/packaging/deb/control +++ b/packaging/deb/control @@ -3,7 +3,7 @@ Version: @VERSION@ Section: utils Priority: optional Architecture: amd64 -Depends: libwebkit2gtk-4.1-0, libgtk-3-0t64 | libgtk-3-0 +Depends: libwebkit2gtk-4.1-0, libgtk-3-0t64 | libgtk-3-0, libayatana-appindicator3-1 Maintainer: Verstak contributors Homepage: https://github.com/mirivlad/verstak Description: Local-first workspace diff --git a/scripts/build.sh b/scripts/build.sh index 715e410..5956b35 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -26,6 +26,15 @@ if ! command -v npm &>/dev/null; then fi echo " ✅ npm $(npm --version)" +if [[ "$(go env GOOS)" == "linux" ]]; then + if ! command -v pkg-config &>/dev/null || ! pkg-config --exists ayatana-appindicator3-0.1; then + echo " ❌ native tray development files are missing" + echo " Debian/Ubuntu: sudo apt install libayatana-appindicator3-dev" + exit 1 + fi + echo " ✅ ayatana-appindicator3 $(pkg-config --modversion ayatana-appindicator3-0.1)" +fi + # ── Frontend (build first — Go //go:embed needs frontend/dist/) ── echo "" echo "[frontend]" diff --git a/scripts/package-appimage.sh b/scripts/package-appimage.sh index c3e3d59..67af611 100755 --- a/scripts/package-appimage.sh +++ b/scripts/package-appimage.sh @@ -105,6 +105,11 @@ while IFS= read -r candidate; do done < "$APPDIR/.elf-queue" rm -f "$APPDIR/.elf-queue" +if ! compgen -G "$APPDIR/usr/lib/libayatana-appindicator3.so.*" >/dev/null; then + echo "native tray runtime library was not bundled" >&2 + exit 1 +fi + if command -v glib-compile-schemas >/dev/null; then glib-compile-schemas "$APPDIR/usr/share/glib-2.0/schemas" fi diff --git a/scripts/test-package-formats.sh b/scripts/test-package-formats.sh index e00e8d7..f42c63b 100755 --- a/scripts/test-package-formats.sh +++ b/scripts/test-package-formats.sh @@ -16,8 +16,11 @@ grep -Fq 'dpkg-deb' "$ROOT/scripts/package-deb.sh" grep -Fq -- '--build' "$ROOT/scripts/package-deb.sh" grep -Fq 'packaging/deb/control' "$ROOT/scripts/package-deb.sh" grep -Fq 'libwebkit2gtk-4.1-0' "$ROOT/packaging/deb/control" +grep -Fq 'libayatana-appindicator3-1' "$ROOT/packaging/deb/control" grep -Fq 'appimagetool' "$ROOT/scripts/package-appimage.sh" grep -Fq 'WebKitWebProcess' "$ROOT/scripts/package-appimage.sh" +grep -Fq 'libayatana-appindicator3.so.' "$ROOT/scripts/package-appimage.sh" +grep -Fq 'ayatana-appindicator3-0.1' "$ROOT/scripts/build.sh" if grep -Fq 'FixedVersionRuntime' "$ROOT/scripts/package-windows-portable.sh"; then echo "Windows portable archive must not bundle Fixed Version WebView2" >&2 exit 1