pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.6k stars 402 forks source link

Flatpak distribution of Pyfa #2510

Closed asbytes closed 1 year ago

asbytes commented 1 year ago

Hello!

I have flatpak project for Pyfa at https://github.com/asbytes/com.github.Pyfa Can i publish it on Flathub.org? Or you could pull the repo and publish it by yourself, because Flathub.org states that it prefers the apps be published by their authors.

foundObjects commented 1 year ago

+1 for this, I literally had building the same thing on my TODO list for tomorrow. Please pick this up officially, it would be a really nice QoL addition to the project for a lot of us.

foundObjects commented 1 year ago

Hello!

I have flatpak project for Pyfa at https://github.com/asbytes/com.github.Pyfa Can i publish it on Flathub.org? Or you could pull the repo and publish it by yourself, because Flathub.org states that it prefers the apps be published by their authors.

I'm unable to build this flatpak as is, it dies fairly early on with:

[arglebargle@archx16 com.github.Pyfa-flatpak]$ flatpak-builder --repo=repo flatpakbuildir com.github.Pyfa.json --force-clean

(flatpak-builder:108988): Json-WARNING **: 13:41:58.907: Failed to deserialize "modules" property of type "gpointer" for an object of type "BuilderModule"
Emptying app dir 'flatpakbuildir'
Downloading sources
Starting build of com.github.Pyfa
Cache hit for python-3.7, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module gnome-themes-extra in /home/arglebargle/working/com.github.Pyfa-flatpak/.flatpak-builder/build/gnome-themes-extra-2
========================================================================
libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
Can't exec "intltoolize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 293.
autoreconf: error: intltoolize failed with exit status: 2
Error: module gnome-themes-extra: module gnome-themes-extra: Child process exited with code 2

It looks like I'm missing a build dependency but I don't see any special internationalization addon for org.gnome.Sdk.

edit: I was able to resolve this after I sat down with it for a few minutes. The intltool submodule needs to be added just above gnome-themes-extra then it builds fine.

diff --git a/com.github.Pyfa.json b/com.github.Pyfa.json
index 0f70285..e3fd5db 100644
--- a/com.github.Pyfa.json
+++ b/com.github.Pyfa.json
@@ -57,6 +57,7 @@
         "chmod 644 $FLATPAK_DEST/lib/libpython3.so"
       ]
     },
+    "shared-modules/intltool/intltool-0.51.json",
     {
       "//": "Taken from shared-modules/gtk2/gtk2.json with a few more patches.",
       "name": "gnome-themes-extra",
@@ -344,4 +345,4 @@
   "tags" : [
     "stable"
   ]
-}
\ No newline at end of file
+}
diff --git a/shared-modules b/shared-modules
index 4046709..ee56993 160000
--- a/shared-modules
+++ b/shared-modules
@@ -1 +1 @@
-Subproject commit 404670907fe744b4162a9486ab3238910d56a5c6
+Subproject commit ee56993d958f2a8a36a62691fdb1bcda90396d6e

I think I may have accidentally updated the intltool submodule there while I was trying to get it working but that shouldn't change anything here.

DarkFenX commented 1 year ago

I am putting majority of my spare time into nextgen calculation core for pyfa (which is in private repo for now). As such, I'd prefer to spend as little as possible on pyfa maintenance.

If you link me publication process and what has to be changed to support that, I can look into it. If it's not too much hassle, I can do it myself. If it's too much, i'd prefer if you do it.

edit: or, rather, just do it, i think it's very unlikely I will want to spend any time on ironing flatpak-specific kinks.

Nathan-LS commented 1 year ago

+1 it would be cool to have pyfa on flathub because flatpaks are distro-agnostic and flatpak updates are automated for users without the need to redownload the latest app image. I was considering making my own flatpak of pyfa but it's nice to see one already exists.

To answer your question about publishing, here are the app publishing instructions. The app publishing can be done either by the app developer or a third party. Once approved, a new repo gets created under the flathub organization and the submitter gets write access. On new commits to this branch the flatpak is built and published to flathub through their build process.

asbytes commented 1 year ago

Pyfa published on Flathub: https://flathub.org/apps/io.github.pyfa_org.Pyfa

I had to change app id from com.github.Pyfa to _io.github.pyfaorg.Pyfa. If you installed and used Pyfa from my github repo, please rename app directory from ~/.var/app/com.github.Pyfa to _~/.var/app/io.github.pyfaorg.Pyfa

Please report related issues to flathub repository: https://github.com/flathub/io.github.pyfa_org.Pyfa