SwagLyrics / SwagLyricsGUI

A GUI for SwagLyrics library
MIT License
15 stars 2 forks source link

AppImage does not start #8

Open srevinsaju opened 4 years ago

srevinsaju commented 4 years ago

On Xubuntu 18.04 image

It looks like you are trying to install swaglyrics on spot using pip. On Xubuntu 18.04, Ubuntu 18.04 and above, python does not include a pip module by default.

AppImage tests failed with this error (related to C#)

===========================================
============= TRYING TO RUN ===============
===========================================
/tmp/.mount_BeingTsTRsEG/AppRun: POSIX shell script, ASCII text executable
-rwxr-xr-x 1 root root 206 Jul 20 14:14 /tmp/.mount_BeingTsTRsEG/AppRun
kernel.unprivileged_userns_clone = 1
Failed to load �]�, error: /var/tmp/.net/SwagLyricsGUI/bvctffl2.1wn/libhostfxr.so: failed to map segment from shared object
The library libhostfxr.so was found, but loading it from /var/tmp/.net/SwagLyricsGUI/bvctffl2.1wn/libhostfxr.so failed
  - Installing .NET Core prerequisites might help resolve this problem.
     https://go.microsoft.com/fwlink/?linkid=2063370
NUMBER_OF_WINDOWS: 0
ERROR: Could not find a single window on screen :-(

Possibly the bundle libhostfxr.so was not bundled on the AppImage, adding that library should fix the error.

PS: Ideally, please package swaglyrics and python3 into the appimage. Sandboxed appimages will not be able to run /usr/bin/python

probonopd commented 4 years ago

Also you might want to check out https://github.com/AppImage/awesome-appimage#deployment-tools-for-python-applications

flabbet commented 4 years ago

@probonopd It's not that simple. I am not bundling full SwagLyrics-For-Spotify library, The AppImage only contains GUI and bridge scripts, that are communicating with SwagLyrics. There are a few solutions. One is to install Python and pip (done by the program itself ofc) or freeze the SwagLyrics lib. The second option is harder, since we would need to keep up to date the GUI and SwagLyrics itself. And the size of AppImage would grow as well.

srevinsaju commented 4 years ago

@flabbet Bundling swaglyrics-for-spotiy frozen would add 9.8 MB to be precise. If you are okay with that increase in size.

flabbet commented 4 years ago

It's not a problem, but it would create a lot of smaller problems:

I would prefer to write a more advanced installer that handles python, pip, and lib installing rather than freeze the lib

srevinsaju commented 4 years ago

Wait, so is Swaglyrics-GUI an installer, and not the app itself?

flabbet commented 4 years ago

It's a GUI version of SwagLyrics-For-Spotify but it installs SwagLyrics if it is missing. It does not include the lib itself

probonopd commented 4 years ago

According to the AppImage philosophy, an AppImage should contain an application and everything it needs to run. Hence the AppImage should contain Python, SwagLyricsGUI, SwagLyrics, and its library, and any of their dependencies.

As a result, users will be able to download the one AppImage file and run SwagLyricsGUI without downloading or installing anything else.

Tools like https://github.com/AppImage/awesome-appimage#deployment-tools-for-python-applications can greatly simplify this process.

Maybe I do not understand what the issue is with this?

flabbet commented 4 years ago

Yeah, makes sense. I guess we should do that. A good solution would be to create distro packages for major distributions, but it's a lot of work too. I don't have the time recently, so if you guys want you can make a PR with lib freeze solution, feel free to do so.