trilium
trilium copied to clipboard
(Feature request) Flatpak
Preflight Checklist
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe feature
Have a flatpak to support most Linux distros concurrently.
Additional Information
No response
Help for this issue would be appreciated!
I've managed to make a working flatpak based on the documentation. Just a couple things left:
- Include a .desktop file and a metadata file in the trilium repo (I can open a PR)
- Submit to flathub. I can do this but I may need some help if the reviewers have some questions as I'm not familiar with trilium's code
Note: This is the first time I've made a flatpak and I'm not very familiar with building electron apps but it seems to work
Hi, do you have scripts (or whatever is needed) to build flatpak in some github repo?
You can find all the files here. The build commands are in the yml file. They are adapted from the trilium build scripts. Please take a look and see if anything is missing or unnecessary.
It's also worth looking at the metainfo and .desktop as they're what users will see on flathub and in software managers.
Hi, awesome work! I'm not sure if you are offering to maintain the Flathub releases in the future but I would be willing to do it for each release if not (and if it's a lot for @zadam to do on each release). I already have to keep an eye out for new releases so it wouldn't be much of a burden :p
In any case, glad to see this! Finally can use this on Fedora without converting the .deb file. :D
Thanks for the offer. I assumed that if no one else was going to maintain it that I would do it. I don't mind if someone else wants to or we could do it together. An extra pair of hands is always good.
Updating the flathub release shouldn't be too much work (although I appreciate that it's still extra work on top of the current releases). Basically just have to update those files I linked to. I think the exact steps will be more clear once we have the first version on there.
That works as well! I'm fine with whichever. I can also test the flatpak before an update is pushed if necessary. It's going to be my daily driver from now on as there is no package currently available on Fedora, so it wouldnt be a hassle to me. You did of course make the Flatpak build files so let me know what you decide. :)
Just FYI I plan to take a look at this in the near future and if this can be fully automated, flatpak could be a part of the standard release process.
Any updates?
No, I got stuck. Flatpak was crashing on me and I didn't get beyond that point.
I successfully got it working, is there a particular error message it printed or was it just crashing outright? Once you install org.freedesktop.Sdk.Extension.node16, org.electronjs.Electron2.BaseApp, and org.freedesktop.Platform, it should be as easy as the four files in @pssandhu 's repo. Here's what I had to do:
- Run
flatpak-node-generator npm package-lock.jsonfrom https://github.com/flatpak/flatpak-builder-tools/tree/master/node - Copy the generated-sources.json into the flathub directory, replacing the existing one
- Update
com.github.zadam.trilium.ymlin the Sources section to update the tag and the commit - Run
flatpak-builder build-dir com.github.zadam.trilium.yml --force-clean - Run
flatpak-builder --user --install --force-clean build-dir com.github.zadam.trilium.yml - Start it with
flatpak run com.github.zadam.triliumand ensure it's working
However, the flathub service takes care of building it. All you really need to do on each release is steps 1-3 and push to a repo.
If you're okay with it, I can submit the app on your behalf
TBH, I don't remember the details.
But now, I followed your guide and got it working on the first try. Not sure what's different. I will give it a second try then, thanks!
Awesome, can't wait to see it! No more Fedora/alien problems :smile:
FYI, flathub PR has been submitted here: https://github.com/flathub/flathub/pull/3353
This can be closed: https://flathub.org/apps/details/com.github.zadam.trilium
Good work everyone, I'm glad this was able to be finished. I'll be moving over to the flatpak version as well.
Will FlatHub also contain future versions of Trilium Notes or only v0.57.5?
The releases are getting published to repo, but it's not getting through to the website. This happened before and the problem was on the flatpack infra side which got resolved eventually.