8138cdc3d9
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>
56 lines
2.4 KiB
Bash
Executable File
56 lines
2.4 KiB
Bash
Executable File
#!/bin/sh
|
|
# Installs the Pipelines Linux desktop app for the current user from a release
|
|
# 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
|
|
data=${XDG_DATA_HOME:-$HOME/.local/share}
|
|
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
|
|
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" 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"
|
|
icon=$app_id
|
|
if [ -f "$target/data/app_icon.png" ]; then
|
|
mkdir -p "$data/icons/hicolor/512x512/apps"
|
|
cp "$target/data/app_icon.png" "$data/icons/hicolor/512x512/apps/$app_id.png"
|
|
else
|
|
icon=utilities-terminal
|
|
fi
|
|
cat > "$data/applications/$app_id.desktop" <<DESKTOP
|
|
[Desktop Entry]
|
|
Type=Application
|
|
Name=Pipelines
|
|
Comment=Pipelines native desktop app
|
|
Exec=$target/pipelines-app
|
|
Icon=$icon
|
|
Terminal=false
|
|
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 Pipelines at $target"
|
|
echo "Launcher: $data/applications/$app_id.desktop (run: pipelines-app)"
|