TauriTavern/packaging/flatpak
2026-10-10 21:48:45 -04:00
..
build-app.sh fix(packaging): align pnpm 11 toolchains (#256) 2026-09-16 12:48:57 +08:00
build.sh feat(flatpak): add source-based application packaging 2026-07-27 05:52:55 +08:00
cargo-sources.json chore(flatpak): refresh dependency sources 2026-10-10 21:48:45 -04:00
com.tauritavern.client.yml fix(packaging): align pnpm 11 toolchains (#256) 2026-09-16 12:48:57 +08:00
generate-sources.sh fix(packaging): align pnpm 11 toolchains (#256) 2026-09-16 12:48:57 +08:00
pnpm-sources.json chore(flatpak): refresh dependency sources 2026-10-10 21:48:45 -04:00
README.md ci: refresh Flatpak dependency sources automatically 2026-09-19 19:48:15 -04:00

Flatpak packaging

The manifest builds TauriTavern from source inside the GNOME SDK. JavaScript and Rust dependencies are downloaded by flatpak-builder, then consumed offline during the build.

Build

Install flatpak-builder, add Flathub, then run:

pnpm run flatpak:build

The wrapper records the current Git branch and revision, installs the matching SDK dependencies, and writes the result to .flatpak-build. Run the result without installing it:

flatpak-builder --run \
  .flatpak-build \
  packaging/flatpak/com.tauritavern.client.yml \
  tauritavern

Set TAURITAVERN_FLATPAK_USER=1 to install missing SDK dependencies into the current user's Flatpak installation. CI uses this mode so its SDK and source downloads can be cached without elevated permissions.

Set TAURITAVERN_BUILD_BRANCH and TAURITAVERN_BUILD_REVISION explicitly for CI or detached checkouts. A dirty local checkout receives the explicit flatpak-local / 000000000000 identity instead of claiming to represent the current commit exactly.

Dependency manifests

pnpm-sources.json and cargo-sources.json are generated from the repository lockfiles with a pinned revision of flatpak-builder-tools. The Nix check and Flatpak refresh workflow regenerates and commits changes to dev daily, or when manually dispatched. PR checks verify generation without requiring these generated files in dependency updates. To refresh them locally before a build:

pnpm run flatpak:sources

Generation requires git, Node.js, and uv. Verify that committed manifests are current with pnpm run flatpak:sources:check.

Sandbox

The application uses desktop portals for user-selected files and directories. The manifest deliberately does not grant direct access to the home directory. It temporarily grants read-write access to the XDG Downloads directory so desktop WebView exports remain visible outside the sandbox; remove this grant after all desktop exports use the save-file portal. Network, graphics, audio, Wayland/X11 fallback, and notifications are enabled because they are part of the current desktop feature set.