PokeFinder
PokeFinder copied to clipboard
Flatpak
I've created a Flatpak package for PokeFinder, which allows easier Installation on Linux. Here are the build files. PokeFinder works (except 2 little patches) out of the box, so you just need to add some data files. I can make a PR which does all needed changes, if you are interested in an Flatpak package.
Is there any significant advantage to flatpak over something like appimage? I have see https://github.com/probonopd/linuxdeployqt before in the past but never tried to use it
With Flatpak you have the guarantee that it works everywhere the same. An AppImage might not work on all Systems depending on how it's packaged.
Flatpak also offers a better System integration. You install and update Flatpaks through the Software Center of your Distro instead of downloading and executing random files from the Internet.
It also offers better Security through Sandboxing.
Flatpak is also easier than AppImage. You don't need to setup and Maintain a build pipeline. All you need to do is create a Manifest and submit it to Flathub. Flathub will automatically build and publish your App for x86_64 and AArch64.
What changes would the repo need to support that
There is only one change to the Code needed (could be put behind a build flag):
diff -ruN a/Source/main.cpp b/Source/main.cpp
--- a/Source/main.cpp 2024-06-06 08:22:08.352510825 +0200
+++ b/Source/main.cpp 2024-06-06 09:06:14.217586335 +0200
@@ -37,7 +37,7 @@
{
if (!setting.contains("settings/profiles"))
{
- QString profilePath = QString("%1/profiles.json").arg(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
+ QString profilePath = QString("%1/PokeFinderProfiles.json").arg(qgetenv("XDG_DATA_HOME"));
QFile f(profilePath);
if (f.open(QIODevice::NewOnly | QIODevice::Text | QIODevice::WriteOnly))
You could also use QStandardPaths::AppDataLocation, but then you would need to create the needed directory.
A thing that is more Linux specific, is that you need a Icon as PNG, a Desktop file and a AppStream file. Should I open a PR for that?
I would also be in favor of a flatpak. They're a lot less dependent on external factors unique to your specific computer.
I wouldn't be opposed to adding flatpak support
As a proof of concept, I have a repository (which is a fork of PokeFinder) that has the needed files and a modified .yaml workflow which allows the CI to produce AppImages. The changes in this repo adds the needed .desktop, .png icon files and AppStream files needed for Flatpak, so the remaining work needed is the change to main.cpp.
Edit: Created new branch with more congruent folder structure Another edit: Deemphasising AppImages, as they are not the point of this issue. Another edit: Added the AppStream file https://github.com/kaitouctr/PokeFinder/tree/appimage
By the way, for the Flatpak support, is there's any web domain that controlled by PokeFinder? That is particularly important for creating an application ID for Flatpak. I thought of io.github.Admiral_Fish.PokeFinder, ~~which just requires Admiral-Fish to have a GitHub Pages set up~~ actually maybe it is possible to just leave it without GitHub Pages, it just means that the Flatpak will be unverified (which only matters for people really conscious of their security). Those underscores are there as Flatpak (due to arbitrary dbus naming conventions) does not allow hyphens or dashes in anywhere but the last component of the application ID.