Kodi Community Forum

Full Version: Building pvr.demo in Ubuntu 14.04.4 LTS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a PVR backend I have written which works fine, and wanted to write a Kodi PVR addon for it. I've downloaded the pvr.demo source code to see what's necessary and - as far as I can see - followed instructions on building it:

Code:
git clone https://github.com/xbmc/xbmc.git
git clone https://github.com/kodi-pvr/pvr.demo.git
cd pvr.demo && mkdir build && cd build
cmake -DADDONS_TO_BUILD=pvr.demo -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/project/cmake/addons
make

although I had to change the cmake path to ../../xbmc/cmake/addons (remove the 'project' folder) to get it to go. After that ran 'make all' and it seems to have built OK. It seems to have created some shared libraries, anyway.

Now I'm not at all sure how to load it into the local installed copy of Kodi (which does have PVR support - currently I use mythtv). The options are install from repository or from ZIP file. It's not in a repository, so I guess that leaves ZIP file.

What make hasn't done is create a ZIP file, despite the cmake command line having PACKAGE_ZIP set to 1, and I cannot see anything in a makefile to indicate that it would try, either. File roller is installed.

Not sure how to proceed. Any advice?

I'd point out that whilst I have an lot of C/C++ and general software experience, it has all been on Windows and embedded systems prior to writing this PVR backend, so my knowledge of Linux is fairly limited, and cmake, pretty much zero up to yesterday (although I can see what it does).

The system is Ubuntu 14.04.4 LTS, Kodi 16.1 Git:c327c53, cmake 3.7.2, g++ 4.8.4.

Any help or pointers to 'pvr addons for dummies documents' would be appreciated. (I must admit I was hoping it could all be done with python scripts - something else I have no current knowledge of - but it seems not).
those instructions are intended to install the addon into your self-built kodi, so just run kodi from your kodi source dir.
If you did not compile kodi yourself but installed it via apt, then use this command to build the addon instead:
Code:
cd pvr.demo && mkdir build && cd build
cmake ..
make -j4
sudo make install
Thanks for your rapid reply.

Unfortunately it says there is no rule for install in the makefile. However I then found that it can create a ZIP by building target 'make package-pvr.demo'.

So I did. As far as I can see the ZIP just contains the build output.

Went to install that in Kodi and it said 'The dependency on xbmc.pvr version 5.2.1 could not be satisfied.'

Thought that might be because it was an old Kodi (V16). So installed V17. After some messing around (very different interface) managed to get that up and going, and working with MythTV. Disabled MythTV and installed the demo ZIP addon.

Froze and crashed. On trying to restart, same. The only way I could recover it was to remove the .kodi folder in the home directory (or at least the pvr demo from inside its addons folder) and completely start again. I have a few crash logs. The last thing it said was:

Code:
13:24:46.870 T:140613722822400 WARNING: GetAddonProperties - Addon pulse-eight demo pvr add-on:connected does not support timer types. It will work, but not benefit from the timer features introduced with PVR Addon API 2.0.0

I assume there is some interface version incompatibility.