M10 (task 2022, issue 2021): Arch pacman package + commit icon set (native, system libs)
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 3m27s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 3m27s
Native-first fix for the AppImage black window: a PKGBUILD that builds from source,
linked against SYSTEM graphics libs, so it renders on the host driver.
- desktop/packaging/arch/{PKGBUILD,thoughtsync.desktop,README.md}: `makepkg -si`
installs /usr/bin/thoughtsync + .desktop + icon; deps webkit2gtk-4.1/gtk3/...;
builds the frontend + `cargo build --release` (no tauri-cli). Uses the host
graphics stack -> avoids EGL_BAD_PARAMETER.
- Commit the icon set (desktop/src-tauri/icons/*.png, un-gitignored) so BOTH
`cargo build` (pacman) and `cargo tauri build` (deb/appimage) work without a
generate step; bundle.icon -> the 4 committed PNGs; drop the `cargo tauri icon`
step from desktop.yml.
- Broaden the WebKit software-render hardening (lib.rs) to ALL Linux (was
AppImage-scoped) so the native build also renders if system WebKit is finicky.
Can't CI-test the PKGBUILD (Arch-only; CI is Debian) -- operator builds locally.
desktop.yml re-verifies the deb+AppImage build with the committed icons.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# Maintainer: bvandeusen
|
||||
#
|
||||
# ThoughtSync desktop (Tauri v2) — native Arch package.
|
||||
#
|
||||
# Built from THIS repo checkout, from SOURCE, linked against your SYSTEM libraries.
|
||||
# That is the whole point: it uses the host's graphics stack (webkit2gtk-4.1 + your
|
||||
# GPU driver), which avoids the bundled-AppImage "EGL_BAD_PARAMETER" black window.
|
||||
#
|
||||
# Usage (from a clone of the thoughtsync repo):
|
||||
# cd desktop/packaging/arch
|
||||
# makepkg -si
|
||||
#
|
||||
pkgname=thoughtsync-desktop
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="ThoughtSync desktop — local-first Keep-style thought capture"
|
||||
arch=('x86_64')
|
||||
url="https://git.fabledsword.com/bvandeusen/thoughtsync"
|
||||
license=('MIT')
|
||||
depends=(
|
||||
'webkit2gtk-4.1'
|
||||
'gtk3'
|
||||
'cairo'
|
||||
'gdk-pixbuf2'
|
||||
'glib2'
|
||||
'libsoup3'
|
||||
'pango'
|
||||
'hicolor-icon-theme'
|
||||
'desktop-file-utils'
|
||||
'librsvg'
|
||||
)
|
||||
makedepends=('rust' 'nodejs' 'npm' 'git' 'pkgconf')
|
||||
# Cargo's release profile already does its own LTO; don't let makepkg inject C-level
|
||||
# LTO flags into the crates that build native code.
|
||||
options=('!lto')
|
||||
|
||||
# Locate the repo root this PKGBUILD lives inside (desktop/packaging/arch/).
|
||||
_repo() { git -C "$startdir" rev-parse --show-toplevel; }
|
||||
|
||||
pkgver() {
|
||||
cd "$startdir"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
local repo; repo="$(_repo)"
|
||||
|
||||
# 1) Build the shared Vue frontend — it's embedded into the binary at compile time
|
||||
# (tauri generate_context!), so it must exist before the cargo build.
|
||||
cd "$repo/frontend"
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
# 2) Compile the native binary against SYSTEM libraries (no bundling, no tauri-cli).
|
||||
cd "$repo/desktop/src-tauri"
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
local repo; repo="$(_repo)"
|
||||
|
||||
install -Dm755 "$repo/desktop/src-tauri/target/release/thoughtsync-desktop" \
|
||||
"$pkgdir/usr/bin/thoughtsync"
|
||||
install -Dm644 "$repo/desktop/src-tauri/app-icon.png" \
|
||||
"$pkgdir/usr/share/pixmaps/thoughtsync.png"
|
||||
install -Dm644 "$startdir/thoughtsync.desktop" \
|
||||
"$pkgdir/usr/share/applications/thoughtsync.desktop"
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# ThoughtSync desktop — Arch package
|
||||
|
||||
A native Arch/pacman package, built **from source** so it links against your
|
||||
**system** libraries (webkit2gtk-4.1 + your GPU driver). This is the robust install
|
||||
on Arch/CachyOS: it avoids the bundled-AppImage `EGL_BAD_PARAMETER` black-window
|
||||
problem entirely, and it installs a proper application-menu entry.
|
||||
|
||||
## Install
|
||||
|
||||
From a clone of the `thoughtsync` repo:
|
||||
|
||||
```sh
|
||||
cd desktop/packaging/arch
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
`makepkg` will pull the build tools (`rust`, `nodejs`, `npm`) and runtime deps
|
||||
(`webkit2gtk-4.1`, `gtk3`, …) via pacman, compile the frontend + the Rust binary,
|
||||
and install:
|
||||
|
||||
- `/usr/bin/thoughtsync` — the app
|
||||
- `/usr/share/applications/thoughtsync.desktop` — the menu entry
|
||||
- `/usr/share/pixmaps/thoughtsync.png` — the icon
|
||||
|
||||
Then launch **ThoughtSync** from your app menu (or run `thoughtsync`).
|
||||
|
||||
## Notes
|
||||
|
||||
- Builds in-place from the checkout (`makepkg` reads the committed state via git).
|
||||
- The compile takes a few minutes the first time (Rust release build).
|
||||
- Uninstall: `sudo pacman -R thoughtsync-desktop`.
|
||||
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=ThoughtSync
|
||||
Comment=Capture a fleeting thought in a second
|
||||
Exec=thoughtsync %U
|
||||
Icon=thoughtsync
|
||||
Terminal=false
|
||||
Categories=Utility;Office;
|
||||
StartupWMClass=ThoughtSync
|
||||
Reference in New Issue
Block a user