Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better flatpak support #11833

Merged
merged 1 commit into from
May 18, 2024
Merged

better flatpak support #11833

merged 1 commit into from
May 18, 2024

Conversation

pazos
Copy link
Member

@pazos pazos commented May 16, 2024

Add a flavor to represent flatpak limitations (No OTA updates. Cannot restart, reboot, poweroff... )

Include appstream metadata in generic linux packages. Related to flathub/rocks.koreader.KOReader#42

Add version and release data to appstream metadata at build time for appimage/linux flavors.

Maybe @benoit-pierre could come up with a better make | sed foo? Thanks!


This change is Reviewable

@Frenzie Frenzie added this to the 2024.05 milestone May 16, 2024
make/appimage.mk Outdated Show resolved Hide resolved
make/appimage.mk Outdated Show resolved Hide resolved
make/linux.mk Outdated Show resolved Hide resolved
local Flatpak = Device:extend{
model = "Flatpak",
isDesktop = yes,
canRestart = no,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flatpak version can't restart?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad
it actually can with flathub/rocks.koreader.KOReader#43

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code, the handling of $@/$ARGS does not look right to me:

set -- 1 2 3
▸ echo "${#@}"
3
▸ ARGS="$@"echo "$ARGS"
1 2 3
▸ printf '“%s”\n' "$ARGS"
“1 2 3”
▸ ARGS=""printf '“%s”\n' "$ARGS"
“”

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works nonetheless :).
Feel free to suggest something better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, I see you're fast :)

Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

local Flatpak = Device:extend{
model = "Flatpak",
isDesktop = yes,
canExternalDictLookup = no,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the Flatpak way of doing that btw, if you know?

Copy link
Member Author

@pazos pazos May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--filesystem=host-os lets you access /usr binaries linked somewhere within the app sandbox. They're not on the PATH so it requires another method of probing dicts.

Also, the kind of people that uses KOReader from a flatpak might have goldendict sandboxed too, so it won't work at all.

I'm mostly happy disabling 3rd party dicts. xdg-open works fine to open links in the browser, so hey :)

* ship metadata with generic linux binaries
* append release version & data at build time
@pazos pazos changed the title wip: better flatpak support better flatpak support May 18, 2024
@pazos pazos merged commit 7bded46 into koreader:master May 18, 2024
3 checks passed
pazos added a commit to pazos/koreader that referenced this pull request May 18, 2024
pazos added a commit that referenced this pull request May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants