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
+20 -3
View File
@@ -1,4 +1,7 @@
"""Standalone desktop client artifacts; never installs or restarts a server."""
"""Standalone desktop client artifacts; never installs or restarts a server.
`install=True` (Linux only) also installs the client for the current user
with scripts/install-linux-app.sh."""
import hashlib
import json
import os
@@ -39,7 +42,8 @@ def _linux_archive(entry):
try:
with tarfile.open(staged, "w:gz") as output:
for child in sorted(entry.iterdir()):
if child.name not in (".complete", archive.name, staged.name):
# Split Dart debug symbols stay in the build cache.
if child.name not in (".complete", ".debug-info", archive.name, staged.name):
output.add(child, arcname=f"pipelines-linux-x64/{child.name}")
os.replace(staged, archive)
finally:
@@ -120,7 +124,9 @@ def _macos_build(*, app, cache, source_digest, runner, arguments, flutter, log):
def build_desktop(kind, *, app, cache, runner, source_digest, docker_build,
docker_ready, server_url=None, flutter=None, output=None, log=print,
prune_cache=None, update_keys=()):
prune_cache=None, update_keys=(), install=False, prefix=None):
if install and kind != "linux":
raise ValueError("--install installs the Linux client only")
arguments = _arguments(server_url) + tuple(update_keys)
if kind == "macos":
entry, bundle, archive = _macos_build(app=app, cache=cache, runner=runner,
@@ -150,10 +156,21 @@ def build_desktop(kind, *, app, cache, runner, source_digest, docker_build,
archive = published
log(f"Desktop client bundle: {bundle}")
log(f"Desktop client archive: {archive}")
if install:
install_linux(archive, runner=runner, prefix=prefix)
log("No server was installed or restarted. Choose your server in the app.")
return bundle, archive
def install_linux(archive, *, runner, prefix=None):
"""Installs [archive] into <prefix>/lib/app-linux with a desktop entry."""
script = Path(__file__).with_name("install-linux-app.sh")
env = dict(os.environ)
if prefix is not None:
env["PIPELINES_PREFIX"] = str(Path(prefix).expanduser())
_run(runner, ["sh", str(script), str(archive)], env=env, timeout=300)
def publish_desktop(kind, bundle, archive, updates, *, signer, notes="", log=print):
"""Publish archive before its feed; versioned names preserve in-flight reads.