Repository navigation
Build fixes for distribution packages (GTK 4.20, system locale dir) - #178
Merged
Merged
Conversation
Member
|
Hi,i updated the main branch with changes related to yours |
The code uses no API newer than GTK 4.20 and libadwaita 1.8: cargo check, clippy and a build pass with the v4_20 / v1_8 features. Lower requirements let distributions that don't ship GTK 4.22 yet build it. Refs Stremio#169
Outside Flatpak the app binds its text domain to GETTEXT_DIR, the directory build.rs writes the compiled catalogs to (target/locale by default). A distribution package builds into its work dir but installs the catalogs to /usr/share/locale, so the installed app never finds them. STREMIO_LOCALEDIR at build time now sets the runtime directory separately; without it nothing changes. Refs Stremio#169
switch87
force-pushed
the
distro-packaging
branch
from
October 13, 2026 17:31
221510a to
2c621b2
Compare
Contributor
Author
|
Thanks @tymmesyde! 4cba0be and b8d63a3 solve the schema install and the locale output dir from #169, so I dropped my schema commit and rebased on main. Two things from #169 are left in this PR: building against GTK 4.20 / libadwaita 1.8 (nothing newer is used), and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #169.
Rebased on
main. The schema install and the locale output dir from #169 are covered by 4cba0be / b8d63a3 (GSETTINGS_SCHEMA_DIR/GETTEXT_DIRin.cargo/config.toml), so that commit is gone. Two commits are left:GTK 4.20 / libadwaita 1.8 instead of 4.22 / 1.9 (
Cargo.toml). The code uses no newer API:cargo clippy --all --no-deps -- -D warningsandcargo build --releasepass on currentmainagainst GTK 4.20.4 and libadwaita 1.8.7. Distributions that don't ship GTK 4.22 yet can then build it.Build-time system locale dir (
src/main.rs). Outside Flatpak the app binds its text domain toGETTEXT_DIR, which is also wherebuild.rswrites the catalogs. A package builds into its work dir but installs the catalogs to/usr/share/locale, so the installed app wouldn't find them, and pointingGETTEXT_DIRat/usr/share/localewould make the build write outside its sandbox.STREMIO_LOCALEDIR=/usr/share/localeat build time (option_env!) now sets the runtime dir on its own. Flatpak still wins whenFLATPAK_IDis set; without the variableGETTEXT_DIRis used as before.A distribution build then looks like:
Checked:
cargo fmt --all -- --checkand clippy pass; with the variable set the binary carries/usr/share/locale, without it behaves as onmain.