veldenb / plugin.program.moonlight-qt

A launcher and updater for running Moonlight-qt on LibreELEC.
GNU General Public License v3.0
97 stars 15 forks source link

Flatpak install failed: "Building generic_local_libs" #73

Closed jackhric closed 2 months ago

jackhric commented 3 months ago

Using the most recent release and Kodi v21.0 Omega, attempting to build Moonlight (generic) on Flatpak fails. Here's my build.log:

Platform x86_64 (x86_64) running org.freedesktop.platform 23.08 detected, using platform generic...
Building generic_local_libs...

The error within Kodi states:

Update failed: Building generic_local_libs...

The only thing I can think of is that it has something to do with the strict permission policies that Flatpak has built into it. Just a guess. As a note though: I've given Kodi full permission to everything on my system (including the D-Bus) through Flatseal just to make sure.

Anyone else running into this or have a way to get Moonlight installed on Flatpak?

jackhric commented 3 months ago

Upon narrowing it down:

Using wget and grep to get the link for the Moonlight AppImage is giving some trouble: Looks like it has something to do with line 13.

https://github.com/veldenb/plugin.program.moonlight-qt/blob/24b69aa38e4205e708fe06f200e14af1a49f34d5/resources/build/generic_local_libs/create_standalone_moonlight_qt.sh#L13

Looks like it bumps back an empty string when running it inside the Flatpak:

image

Very odd.

jackhric commented 3 months ago

Update here:

Hardcoding the download link for Moonlight works. Downloading to the correct directory also works after changing this line to the Flatpak's data directory (~/.var/app/tv.kodi.Kodi/data/......): https://github.com/veldenb/plugin.program.moonlight-qt/blob/24b69aa38e4205e708fe06f200e14af1a49f34d5/resources/build/build.sh#L49

Attempting to run downloaded AppImage dosen't seem like it's possible though after reading through Steam Flatpak issue threads. There are some workarounds, but none that seem like they can be built into this.

I probably missed a few things, and this is my first rodeo when it comes to diving into add-ons / Flatpaks in general. If anyone with more expertise is willing to help, that'd be great.

In the meantime, going to be building Kodi from source and running it outside of a Flatpak to get around these issues.

veldenb commented 2 months ago

I wouldn't expect Flatpak to work because of the sandbox in Flatpak. Docker needs a lot of permissions to work correctly.