Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Compilation of binary addons in Linux
#1
@garbear or any devs

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:

Code:
cd /home/kodi/kodi-source
make -j8 -C tools/depends/target/binary-addons PREFIX=/home/kodi/bin-kodi

All the binary addons are built, however there is no trace of the libretro binary addons.

Can you please help me? In return, if you give me write access to the Kodi Wiki I am willing to help with the Games documentation, particularly with Compiling Kodi-Game and Compiling game add-ons pages.
Reply
#2
The content of https://github.com/xbmc/xbmc/blob/master...addons.txt has to replaced with 'binary-addons https://github.com/kodi-game/repo-binary-addons.git retroplayer'.
Reply
#3
This is awesome,... I might play around with containerizing this!
Reply
#4
(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.
Reply
#5
OK, so I modified the scripts to compile only the Libretro cores you want. The scripts and the documentation are in Github.

Retroplayer is awesome and works fantastic, thank you all for the hard work.

I compiled current Kodi in master (commit 397fbbf82...) and started with a totally fresh Kodi installation (empty ~/.kodi/ directory). I have found the following bugs/issues (in Markdown):

* If I execute any ROM I get the following dialog window "Add-on is incompatible due to
unmet dependencies. Missing: game.controller.genesis.6button, game.controller.genesis.mouse"

Kodi does not install `game.controller.*` addons automatically. Manually installing the
addons solves the problem.

* If there is no joystick plugged in then emulation does not start.

* 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.

```
22:46:37.511 T:140428854687488 ERROR: AddOnLog: Joystick Support: ScanEvents: failed to read joystick "Xbox 360 Wireless Receiver" on /dev/input/js0 - 19 (No such device)
22:46:38.921 T:140429205022464 ERROR: Previous line repeats 86 times.
22:46:38.921 T:140429205022464 NOTICE: UnregisterRemovedDevices - device removed from joystick/peripheral.joystick/0: Xbox 360 Wireless Receiver (0000:0000)
```

* 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.

```
22:48:47.805 T:140429205022464 NOTICE: Register - new joystick device registered on addon->peripheral.joystick/1: Xbox 360 Wireless Receiver
```

* Aspect ratio in core `beetle_psx` is wrong in Stretch mode Normal. Stretch mode 4:3 seems
to work OK.

* 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?
Reply
#6
Hi Wintermute0110,

I've forked your repository and started messing around with the scripts and I'm trying to containerize it so I can run it through x11docker. It's "sort-of" got it working,... but it still needs work.

Thanks for the scripts!
Reply
#7
(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.
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#8
(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?
Reply
#9
(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.
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#10
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/)

What is wrong with my config ?
Reply
#11
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?

My HTPC just has intel integrated graphics, running Ubuntu 18.04.
Reply
#12
(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!
RetroPlayer releases: https://github.com/garbear/xbmc/releases

Donations: eigendude.eth
Reply
#13
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.

You can find everything here: https://github.com/dafrenchyman/KodiInstall
Reply
#14
Hello all,

Is there a way to compile the libretro cores only and add them to my current PPA instalation of Kodi without compiling everything and starting from scratch. I have an Asus chromebox running Ubuntu 18.04 and Kodi V18 RC3. I know enough about linux/Ubuntu/CL to get into trouble but I've never compiled or built anything and I feel like it may be a little above my skill level. Maybe it isn't a big deal but since I've never done it I figured I'd ask for a little guidance. I have also tried zachmorris's IAGL with no luck.

Long story short I'm looking for the best/easiest/most efficient way of adding emulators to my Kodi installation and this post looked like a good place to start. Any sugestions would be greatly appreciated.

Thanks in advance.
Scott -
Main HTPC/Server, Ubuntu 18.04, Leia 18.0
ASUS Chromebox, Ubuntu 18.04, Leia 18.0, Aeon Nox 5: SiLVO Mod
Reply
#15
(2018-12-27, 14:22)shess757 Wrote: Hello all,

Is there a way to compile the libretro cores only and add them to my current PPA instalation of Kodi without compiling everything and starting from scratch. I have an Asus chromebox running Ubuntu 18.04 and Kodi V18 RC3. I know enough about linux/Ubuntu/CL to get into trouble but I've never compiled or built anything and I feel like it may be a little above my skill level. Maybe it isn't a big deal but since I've never done it I figured I'd ask for a little guidance. I have also tried zachmorris's IAGL with no luck.

Long story short I'm looking for the best/easiest/most efficient way of adding emulators to my Kodi installation and this post looked like a good place to start. Any sugestions would be greatly appreciated.

Thanks in advance.
Scott -

To compile the binary addons you need to clone the Kodi source code. I recommend you compile Kodi first, then the binary addons and execute the version of Kodi you just compiled. It will use your data and settings from /home/kodi/.kodi/ and you will avoid problems (for example, sometime the version on the PPA uses an old library and you compile the addons with a newer version of the library. 95% of the times it's OK but it can cause problems). Note that compiling Kodi is much quicker than compiling the binary addons.

If you prefer to compile and install the binary addons on top of a PPA Kodi version then you will need to modify the binary addons installation directory in the build-binary-addons-* scripts and execute the script as root (PPA Kodi will be installed in /usr/ and a regular user does not have permissions to write there).
Reply

Logout Mark Read Team Forum Stats Members Help
Compilation of binary addons in Linux0