zach-morris / plugin.program.iagl

The Internet Archive Game Launcher (IAGL) will launch Games from the Internet using Kodi
GNU General Public License v3.0
348 stars 49 forks source link

Cores path for Retroarch Flatpak Not in Default Cores path Listing #183

Closed kstorbakken closed 3 years ago

kstorbakken commented 3 years ago

This took quite a bit of troubleshooting on my part so I thought I'd submit a bug report so this can get fixed for others. The issue: The default core path listings in main.py does not include a path to the cores location of a flatpak install of Retroarch. This causes IAGL to load /usr/lib/libretro as the cores path. Symlinking that default/fallback path to the flatpak cores location does not work because the /usr location is not an accessible location for Flatpak isolated apps.

The solution: It is possible to access /usr/lib/libretro in flatpak apps, but it requires going to /var/run/host/usr/lib/libretro from within the Flatpak instance to get there. So modifying the default/fallback cores path isn't really an option.

What I ended up doing is editing main.py line 137 to add a default retroarch cores location to: ~/.var/app/org.libretro.RetroArch/config/retroarch/cores (making sure to add the os.path.expanduser portion as well :))

Would it be possible to just add a settings option in settings.xml to point to the cores path manually? That would also fix the issue easily.

Other issue running Retroarch Flatpak install with IAGL I thought I'd mention this as well for others who may run into this problem. It's an easy fix for a user on each install, but I'm not sure how this would be fixed in IAGL itself. -In setting up the external launcher configuration within IAGL, it launches a file path browser to the Retroarch install location. It's not possible to browse to a hidden location in this view so it's not possible to add the program location. Nor is it possible to just type in the path. Maybe my kodi skin is the problem?

To fix: -Edit the settings.xml for IAGL directly and modify these three settings to these values:

<setting id="iagl_external_path_to_retroarch">~/.local/share/flatpak/app/org.libretro.RetroArch/x86_64/stable/96a53026110974a42f317b13cc1762ddf5a7cc8f17532c6089e18f526d3e1d71/export/bin/org.libretro.RetroArch</setting>
<setting id="iagl_external_path_to_retroarch_cfg">~/.var/app/org.libretro.RetroArch/config/retroarch/retroarch.cfg</setting>
<setting id="iagl_external_path_to_retroarch_system_dir">~/.var/app/org.libretro.RetroArch/config/retroarch/system</setting>

I can't really say if where I've pointed iagl_external_path_to_retroarch is the best way to be calling Retroarch to launch with a flatpak install of it, but it works. It does seem like the path may change when the app is updated and then I'll have to update it again. Maybe someone who knows more about Flatpak can say? I'm not sure if there's a way to make this all a little more friendly or if it's just the way it has to be using a linux host.

Thanks for all your hard work, this addon is amazing!!

zach-morris commented 3 years ago

Thanks for the report. I'll add this to the list. V19 I've updated where I think it will resovle this. The user will just point directly to the RA cfg file and then the addon will parse out what it needs from there. I will have some default cfg file locations that the addon will try to find in the wizard to make it easier for the user

zach-morris commented 3 years ago

Fixed in v19 branch, will release shortly