Linux desktop: optimized release build, installer, Linux gaps

Build: split Dart debug info out of libapp.so (13.96 -> 11.27 MB, symbols
kept in the cache) and fix icon tree shaking, which Flutter 3.44's Linux
CMake backend silently disables by quoting the define; the build image
patches its SDK copy (MaterialIcons 1.6 MB -> 25 KB). Impeller cannot be
enabled in a Linux release build and was slower in a profile-build bench.

Install: `./install --linux --install` installs the bundle into
<prefix>/lib/app-linux with com.pipelines.app.desktop (the GTK/Wayland
app id), its icon and a ~/.local/bin/pipelines-app link, through
scripts/install-linux-app.sh.

Linux gaps: notifications through the freedesktop daemon; HTML artifacts
explain the missing web view instead of throwing; no Share for files;
a GTK clipboard reader for pasting files and screenshots (Ctrl+V and
Omarchy's Super+V); GTK header bar only on GNOME; window icon.

Bench: native fixture frame log, wheel/mark steps and
tool/perf/linux_desktop_bench.py (private Xvfb); results in
app/notes/linux-desktop-optimized.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:54:18 +00:00
parent c4de1de27b
commit 8138cdc3d9
26 changed files with 722 additions and 60 deletions
+29 -17
View File
@@ -1,43 +1,55 @@
#!/bin/sh
# Installs the Pipelines Linux desktop app for the current user from a release
# archive (pipelines-linux-x64-*.tar.gz from the update feed or the build cache):
# scripts/install-linux-app.sh <archive.tar.gz> [icon.png]
# The app lives in ~/.local/share/pipelines-app (writable, so in-app updates
# can swap it), with a launcher in ~/.local/bin and a desktop entry. An existing
# install is kept as pipelines-app.previous.
# archive (pipelines-linux-x64*.tar.gz from `./install --linux`, the build
# cache or the update feed):
# scripts/install-linux-app.sh <archive.tar.gz>
# `./install --linux --install` builds the archive and runs this.
#
# The app lives in <prefix>/lib/app-linux (prefix: $PIPELINES_PREFIX, default
# ~/.local/share/pipelines), whose parent is writable so in-app updates can
# swap it. A desktop entry named after the GTK application id
# (com.pipelines.app.desktop) lets Wayland compositors, launchers and
# notification daemons match the window and its icon; ~/.local/bin/pipelines-app
# links the executable. An existing install is kept as app-linux.previous.
set -eu
archive=$1
icon=${2:-}
data=${XDG_DATA_HOME:-$HOME/.local/share}
target=$data/pipelines-app
staging=$data/.pipelines-app-install.$$
prefix=${PIPELINES_PREFIX:-$HOME/.local/share/pipelines}
target=$prefix/lib/app-linux
app_id=com.pipelines.app
mkdir -p "$prefix/lib"
staging=$(mktemp -d "$prefix/lib/.app-linux-install.XXXXXX")
trap 'rm -rf "$staging"' EXIT
mkdir -p "$staging"
tar -xzf "$archive" -C "$staging"
bundle=$(dirname "$(find "$staging" -maxdepth 3 -type f -name pipelines-app | head -n 1)")
[ -x "$bundle/pipelines-app" ] && [ -d "$bundle/data/flutter_assets" ] && [ -d "$bundle/lib" ] || {
echo "The archive has no complete pipelines-app bundle." >&2; exit 1; }
missing=$(ldd "$bundle/pipelines-app" | grep "not found" || true)
missing=$(ldd "$bundle/pipelines-app" 2>/dev/null | grep "not found" || true)
[ -z "$missing" ] || { echo "Missing system libraries:" >&2; echo "$missing" >&2; exit 1; }
rm -rf "$target.previous"
[ -d "$target" ] && mv "$target" "$target.previous"
mv "$bundle" "$target"
mkdir -p "$HOME/.local/bin" "$data/applications"
ln -sf "$target/pipelines-app" "$HOME/.local/bin/pipelines-app"
if [ -n "$icon" ]; then
icon=$app_id
if [ -f "$target/data/app_icon.png" ]; then
mkdir -p "$data/icons/hicolor/512x512/apps"
cp "$icon" "$data/icons/hicolor/512x512/apps/pipelines-app.png"
cp "$target/data/app_icon.png" "$data/icons/hicolor/512x512/apps/$app_id.png"
else
icon=utilities-terminal
fi
cat > "$data/applications/pipelines-app.desktop" <<DESKTOP
cat > "$data/applications/$app_id.desktop" <<DESKTOP
[Desktop Entry]
Type=Application
Name=Pipelines App
Name=Pipelines
Comment=Pipelines native desktop app
Exec=$target/pipelines-app
Icon=pipelines-app
Icon=$icon
Terminal=false
StartupWMClass=com.pipelines.app
StartupWMClass=$app_id
StartupNotify=true
Categories=Development;
DESKTOP
command -v update-desktop-database >/dev/null 2>&1 && update-desktop-database "$data/applications" >/dev/null 2>&1 || true
echo "Installed $(cat "$target/version.txt" 2>/dev/null || echo Pipelines) at $target"
echo "Installed Pipelines at $target"
echo "Launcher: $data/applications/$app_id.desktop (run: pipelines-app)"