EDIT: the scripts are working OK now. I have tested them with Kodi Leia RC1 in Debian unstable and everything works like a charm. Have a look at the instructions/documentation here.

I have created some scripts to easy the compilation of Kodi Leia in Linux, because the game binary addons (the libretro cores) are not available online and it takes only 20 minutes to grab the source code, build and enjoy your freshly baked Kodi.

The repository with the shell scripts and the documentation are here. Currently only Debian/Ubuntu is supported but I can add more distros on demand. The only script that changes from distro to distro is install-build-dependencies-debian.sh.

Everything works fine with the exception of the libretro cores binary addons. To build the addons I execute:

2018-11-15, 06:58 (This post was last modified: 2018-11-15, 07:43 by Wintermute0110. Edited 4 times in total.)

(2018-11-14, 23:18)dafrenchyman Wrote: This is awesome,... I might play around with containerizing this!

The scripts are working well now, after I followed Rechi's instructions. Compiling Kodi takes about 10 min on a fast machine (i7 processor with 8 cores, powerful laptop bought 2 years ago). Compiling all the addons except the libretro cores takes about 15 minutes. However, compiling the libretro cores is another story... it takes about 5/6 hours. Just every MAME core takes about 1 hour each and currently there are 3 of them.

Also, I observed some issues. For example, the game.controller.* addons did not get installed and Kodi was not able to resolve the dependencies and download them automatically. You have to download these addons manually for each core (quite a tedious task).

Tonight I will prepare another script to easily select the libretro cores you want to compile. For example, it's a waste of time to compile all of the MAME cores. If you have the ROMs for an specific core then compile only that one. So, there will be an script to compile all binary addons except the libretro cores and then another script to compile the libretro cores where you can select by commenting single lines which cores you want and which cores you don't. Finally, I will purge both the build directory and the installation directory and start with a fresh Kodi installation. I will also use a real gamepad to test (original XBox360 wireless), yesterday I had only the keyboard available. I will then write a report of the bugs I find in this thread or maybe open a new one.

* In the Kodi Wiki `https://kodi.wiki/view/Game_add-ons` the following `You will need to place
them into the System Directory (linux example for pcsx bios files:
~/.kodi/userdata/addon_data/game.libretro.pcsx-rearmed/system/ ).` is wrong. The correct
directory is `~/.kodi/userdata/addon_data/game.libretro.pcsx-rearmed/resources/system/`

* If joystick is hot unplugged Kodi correctly detects that is has been unplugged and emulation
does not start anymore. Interestingly, in Windows emulation starts when
there is no gamepad, only keyboard.

* If joystick is hot plugged Kodi detects it OK. Emulation starts when a ROM is clicked.
Interestingly, whenever a joystick is plugged emulation starts correctly even if
controlling Kodi with the keyboard.

* I cannot use the gamepad at all in `beetle_psx`, not even after remapping the controllers
`PlayStation Dual Analog` and `PlayStation Dual Shock`.

* Core `prboom` crashes if `prboom.wad` is not found. Kodi crashes as well.

* Speed of `prboom` core is totally wrong. Core must be run at 35 FPS, otherwise speed is
wrong. This problem also happens in Retroarch. A core that does frame interpolation like
**Crispy Doom** or **PrBoom+** is required.

@garbear @Rechi Do you want me to open another thread for bugs, open issue in Github or report in this thread?

(2018-11-15, 06:58)Wintermute0110 Wrote: For example, the game.controller.* addons did not get installed and Kodi was not able to resolve the dependencies and download them automatically. You have to download these addons manually for each core (quite a tedious task).

Several solutions: include this patch or add instructions to press the "Get all" button in the controller configuration dialog.

The best solution would be to modify Kodi to just-in-time install the needed controller profiles. It already does just-in-time installation for libretro cores, so this shouldn't be too hard a task.

For the rest of your bugs, can you open GitHub issues in the game add-ons repo or my xbmc repo? That makes the bugs easier to track then reading through a potpourri forum post.

2018-11-18, 16:11 (This post was last modified: 2018-11-18, 16:12 by Wintermute0110. Edited 1 time in total.)

(2018-11-17, 21:08)garbear Wrote:

(2018-11-15, 06:58)Wintermute0110 Wrote: For example, the game.controller.* addons did not get installed and Kodi was not able to resolve the dependencies and download them automatically. You have to download these addons manually for each core (quite a tedious task).

Several solutions: include this patch or add instructions to press the "Get all" button in the controller configuration dialog.

The best solution would be to modify Kodi to just-in-time install the needed controller profiles. It already does just-in-time installation for libretro cores, so this shouldn't be too hard a task.

For the rest of your bugs, can you open GitHub issues in the game add-ons repo or my xbmc repo? That makes the bugs easier to track then reading through a potpourri forum post.

The thing with the controllers is just minor, you can always go to the addon manager and download them all. Takes less than a couple minutes. It's just a little big annoying.

For the rest of the bugs: OK, I will create core-specific reports on the binary addon repo and general Retroplayer issues in your branch.

Next AEL version will incorporate special Retroarch and Retroplayer launchers that will autoconfigure everything for the user, check for missing BIOSes and other issues, etc. As part of next AEL version development process I will do extensive testing of all the emu cores. I will try to help with the Games documentation in the Kodi Wiki, regarding particulars for each core, configurations, etc.

By the way, can you please answer a couple of questions out of curiosity?

Why there is an official repo-binary-addons yet you have another repo-binary-addons with the Libretro core addons? Is your repository going to be merged into the official one soon or the current state of affairs is going to hold for a while?

Now that Retroplayer is merged into maser, why you still keep your own branch for reports that should go into xbmc/master? If all bug reports go to your branch it's likely other developers won't see them. Are other Team members start developing (or at least polishing) Retroplayer or you will be the foremost developer like up to now?

(2018-11-18, 16:11)Wintermute0110 Wrote: Next AEL version will incorporate special Retroarch and Retroplayer launchers that will autoconfigure everything for the user, check for missing BIOSes and other issues, etc. As part of next AEL version development process I will do extensive testing of all the emu cores. I will try to help with the Games documentation in the Kodi Wiki, regarding particulars for each core, configurations, etc.

That sounds so awesome! I can't wait!!!

(2018-11-18, 16:11)Wintermute0110 Wrote: Why there is an official repo-binary-addons yet you have another repo-binary-addons with the Libretro core addons? Is your repository going to be merged into the official one soon or the current state of affairs is going to hold for a while?

The repo with libretro cores was for my test builds. Now I think it's an upstream referenced by master so that we can build all cores on Jenkins.

(2018-11-18, 16:11)Wintermute0110 Wrote: Now that Retroplayer is merged into maser, why you still keep your own branch for reports that should go into xbmc/master? If all bug reports go to your branch it's likely other developers won't see them. Are other Team members start developing (or at least polishing) Retroplayer or you will be the foremost developer like up to now?

I want to move stuff in my repo to an upstream somewhere for visibility to our other RetroPlayer devs. I'm in talks with Team Kodi about how to best do this.

2018-11-22, 15:34 (This post was last modified: 2018-11-22, 18:56 by yoshitslc. Edited 1 time in total.)

Tested the scripts last night and worked like a charm on my NUCunder Ubuntu 18,04.
Well, I had to make some changes because I wanted to just use the script just for the cores installation, no compile the whole Kodi. As my version is downloaded from the PPA, I had to copy the folders with the .so files from /usr/lib/kodi to /usr/lib/x86_64-linux-gnu/kodi. Nothing problematic at this point.

But I had a hard time compiling the game.libretro addon.

Now I have some minus problems:
- For PSX games, he doesn't boot on cue/bin files, only m3u files (used for multi discs games). And if i've installed Beetle and PCSX-rearmed, the first one is the only choice. When I select it, it tells me that bios is missing. All the bioses are stored a system for every addons where a bios is needed in /home/user/.kodi/userdata/addons_data/system. I also put a copy of them in the rom folder, but no more luck.
EDIT: this problem solved itself after a reboot
- Reicast give me an error. As the psx emulators, bios are stored in addons_data under reicastfolder/system/dc/)

I used the scripts to compile the whole shebang against RC1, then copied just the game.libretro.* bits over manually into my ppa-installed RC1's pre-existing directory & it's working great, except I don't seem to have any shaders available in the filters list, just nearest neighbour & bilinear. Is this normal? Did I miss something in my manual copying over? Is this a platform limitation?

(2018-11-25, 23:53)runsamok Wrote: except I don't seem to have any shaders available in the filters list, just nearest neighbour & bilinear. Is this normal?

Our GSoC student last year did shaders for Windows and they're awesome. Need a little more work though, so we're not shipping them yet. Until then NN and bilinear are available on all platforms. Thanks for your interest at least!

If anyone`s interested, I've forked Wintermute0110's repository and wrapped everything up into a docker container. With the help of x11docker, you can then build a container out run it in your xserver session. You'll still need to manually enable all the binary add-ons as before, but Kodi's home files are being saved to the disk. This is a nice way to play with everything without having to replace a stable version of Kodi.

Quick Links

About Kodi

Kodi is a free and open source media player application developed by the XBMC Foundation, a non-profit technology consortium.

Kodi is available for multiple operating-systems and hardware platforms, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.