build the app, and ship it on Linux and Windows as well as macOS

The client itself: the sync engine and mirror, the Gmail and IMAP providers,
the screener, the three boxes and two piles, compose and send, the sanitiser
and tracker stripping, contacts, clips, backup, notifications and the guide.

The pipeline that ships it. Three runners now build in parallel and the
publish gate wants all four platform keys in latest.json before a release
leaves draft. Linux gets two more packages Tauri does not build: a flatpak
repackaged from the deb against GNOME 48, and a Nix package that relinks the
deb against nixpkgs so it runs as a native Wayland client rather than through
Xwayland. CI runs the Rust suite on all three desktops rather than on Linux
alone, and rebuilds the flatpak manifest on every push to main.

Two things that were only ever exercised on macOS and were wrong everywhere
else. The menu bar was built by adjusting the submenus macOS is given, so on
a platform whose default menu has no File or View the new File menu landed
after Edit, Check for Updates landed nowhere, and the three places and the
reading pane had no menu at all. The deb declared libwebkit2gtk-4.1-0 and
libgtk-3-0 twice, because tauri.conf.json named the dependencies Tauri
already emits.

The updater key exists now, so releases can sign their artifacts.
This commit is contained in:
pj committed 2026-09-06 12:15:30 +05:30
1 parent 088ec9c6e4
commit eb59cb5f8d
423 files changed
+93217 -251

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
# The flatpak, built by repackaging the deb rather than from source. Tauri has no flatpak bundler,
# and building from source here would produce an app that runs and then says Google is not set up:
# the OAuth client is embedded at compile time from a file that is deliberately not in the repo.
#
# GNOME 48 is the runtime because it is the newest that still carries webkit2gtk-4.1, which is the
# GTK3 WebKit wry links against. When that stops being true the answer is a GTK4 wry, not an older
# runtime.
id: studio.margin.mail
runtime: org.gnome.Platform
runtime-version: '48'
sdk: org.gnome.Sdk
command: margin-mail
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --device=dri
# Gmail, IMAP, SMTP, and the loopback listener that catches Google's OAuth redirect. The redirect
# comes back to 127.0.0.1 inside the sandbox, which is where the app is listening, so this is the
# whole of what the connect flow needs; the consent page itself opens in the host's browser
# through the OpenURI portal, which needs no permission of its own.
- --share=network
- --talk-name=org.freedesktop.Notifications
# Saved attachments and exports go to the downloads directory and nowhere else.
- --filesystem=xdg-download
modules:
- name: margin-mail
buildsystem: simple
build-commands:
- mkdir -p deb
- ar x margin-mail.deb --output deb
- tar -C deb -xf deb/data.tar.gz
- install -Dm755 deb/usr/bin/margin-mail /app/bin/margin-mail
# Flatpak wants the desktop file and every icon named for the app id, and the deb names them
# after the product and the binary, so both are renamed on the way in.
- install -Dm644 "deb/usr/share/applications/Margin Mail.desktop" /app/share/applications/studio.margin.mail.desktop
- desktop-file-edit --set-icon=studio.margin.mail /app/share/applications/studio.margin.mail.desktop
- |
for src in deb/usr/share/icons/hicolor/*/apps/margin-mail.png; do
size=$(basename "$(dirname "$(dirname "$src")")")
install -Dm644 "$src" "/app/share/icons/hicolor/$size/apps/studio.margin.mail.png"
done
- install -Dm644 studio.margin.mail.metainfo.xml /app/share/metainfo/studio.margin.mail.metainfo.xml
sources:
- type: file
path: margin-mail.deb
- type: file
path: studio.margin.mail.metainfo.xml