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:
@@ -24,10 +24,18 @@ COPY --chmod=0755 build.sh /usr/local/bin/pipelines-app-build
|
||||
WORKDIR /tmp
|
||||
|
||||
FROM web AS linux
|
||||
# Flutter's CMake backend passes `-dTreeShakeIcons="true"` with the quotes
|
||||
# kept (no shell parses them), so `flutter build linux` never tree-shakes the
|
||||
# icon fonts and ships the full 1.6 MB MaterialIcons font. Pass the plain value
|
||||
# in this image's copy; the grep fails the build if the line ever changes.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev liblzma-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& flutter precache --linux \
|
||||
&& backend=/opt/flutter/packages/flutter_tools/bin/tool_backend.dart \
|
||||
&& grep -q "'-dTreeShakeIcons=\"\$treeShakeIcons\"'," "$backend" \
|
||||
&& sed -i "s/'-dTreeShakeIcons=\"\$treeShakeIcons\"',/'-dTreeShakeIcons=\$treeShakeIcons',/" "$backend" \
|
||||
&& grep -q "'-dTreeShakeIcons=\$treeShakeIcons'," "$backend" \
|
||||
&& chmod -R a+rwX /opt/flutter /home/builder
|
||||
|
||||
FROM web AS android
|
||||
|
||||
+5
-1
@@ -42,8 +42,12 @@ PROPERTIES
|
||||
/tmp/apk-certificates.txt > /out/signing-certificate-sha256.txt
|
||||
;;
|
||||
linux)
|
||||
flutter build linux --release "$@"
|
||||
# Dart symbols go beside the bundle, not into libapp.so (about 18%
|
||||
# smaller); `flutter symbolize -i <trace> -d .debug-info/app.linux-x64.symbols`
|
||||
# reads a release stack trace. Icon fonts are tree-shaken (see Dockerfile).
|
||||
flutter build linux --release --split-debug-info=/tmp/debug-info "$@"
|
||||
cp -a build/linux/x64/release/bundle/. /out/
|
||||
cp -a /tmp/debug-info /out/.debug-info
|
||||
;;
|
||||
*)
|
||||
echo "unknown build: $kind" >&2
|
||||
|
||||
Reference in New Issue
Block a user