desktop.yml: preset the bun sidecar's rpath so linuxdeploy's patchelf does not corrupt it in the AppImage

This commit is contained in:
CRTkafa 2026-10-11 05:52:50 +08:00
parent 1e564613c2
commit e86bcec37c

View file

@ -66,6 +66,11 @@ jobs:
bun install --frozen-lockfile bun install --frozen-lockfile
bun tools/desktop-version.ts bun tools/desktop-version.ts
bun tools/build-sidecars.ts --target bun-linux-x64 bun tools/build-sidecars.ts --target bun-linux-x64
# linuxdeploy (AppImage) sets the rpath of every executable with its own patchelf, which corrupts the bun
# sidecar (segfault, then ldd fails in the gtk plugin). With the rpath already set (Ubuntu's patchelf, which
# keeps it working), linuxdeploy leaves the file as it is. The sidecar needs only libc, so the rpath is inert.
patchelf --set-rpath '$ORIGIN/../lib' apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu
apps/desktop/src-tauri/binaries/storebound-x86_64-unknown-linux-gnu version
- name: Build AppImage and deb (path-free) - name: Build AppImage and deb (path-free)
working-directory: apps/desktop working-directory: apps/desktop
run: bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci --verbose run: bun ../../tools/desktop-release.ts exec -- bunx tauri build --bundles appimage,deb --ci --verbose