• 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 13
Develop PVR addons with new cmake build system
I tried build by post #1 instructions for linux with error:

Home directory: /home/xbmc4
Kodi directory: /home/xbmc4/xbmc (15.1, bootstrap, configure, make, make install)

git clone https://github.com/kodi-pvr/pvr.iptvsimple
mkdir /home/xbmc4/pvr.iptvsimple/build
cd /home/xbmc4/pvr.iptvsimple/build
cmake -DADDONS_TO_BUILD=pvr.iptvsimple -DADDON_SRC_PREFIX=/home/xbmc4 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/xbmc4/xbmc/addons -DPACKAGE_ZIP=1 /home/xbmc4/xbmc/project/cmake/addons
make -C /home/xbmc4/pvr.iptvsimple/build

Error:

CMake Error at build/build/depends/lib/kodi/addon-helpers.cmake:19 (FILE):
file Internal CMake error when trying to open file:
/home/xbmc4/pvr.iptvsimple/pvr.iptvsimple/addon.xml for reading.
Call Stack (most recent call first):
build/build/depends/lib/kodi/addon-helpers.cmake:29 (addon_version)
CMakeLists.txt:26 (build_addon)
-- Configuring incomplete, errors occurred!

I haven't addon.xml only addon.xml.in.
Ubuntu 22.04, Linux desktop 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Kodi (20.1 (20.1.0) Git:20230312-289ec664e3). Platform: Linux x86 64-bit
Sony Android TV, Kodi 20.1
Reply
you're mixing stuff up. You're trying to use the kodi addon buildsystem from the addon dir.
Besides that this way of building is meant specifically for addon developers.

Either use the intree build system or clone the Isengard branch of the addon and just run: cmake . && make && sudo make install
Reply
(2015-08-18, 21:51)wsnipex Wrote: you're mixing stuff up. You're trying to use the kodi addon buildsystem from the addon dir.
Besides that this way of building is meant specifically for addon developers.

Either use the intree build system or clone the Isengard branch of the addon and just run: cmake . && make && sudo make install
Thank you wsnipex.
I cloned 3 dirs and cmake && make && sudo make install:
git clone https://github.com/Pulse-Eight/platform
git clone https://github.com/xbmc/kodi-platform
git clone https://github.com/kodi-pvr/pvr.iptvsimple (Isengard branch)
OK. Addon is working now.
Ubuntu 22.04, Linux desktop 5.15.0-57-generic #63-Ubuntu SMP Thu Nov 24 13:43:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Kodi (20.1 (20.1.0) Git:20230312-289ec664e3). Platform: Linux x86 64-bit
Sony Android TV, Kodi 20.1
Reply
hey all,

Im on windows and previously have been able to use the "prepare-addons-dev.bat" scropt posted earlier in this thread. Im not sure when the last time I fully rebuilt my dev environment is, but in trying to do it today im getting errors. I was on an older cmake 3.1 so I tried updating to the latest cmake 3.3.1 but still getting the same problem. It mentions VS2015, which I do have installed, but have always used VS2013 for kodi and pvr addons without problems in the past (even after I'd installed VS2015).

The cmake magic is a bit beyond me, Ive tried to set "Visual Studio 14" instead of 12 in the batch file, but still get the same error.

Any help much appreciated! Smile

Code:
--------------------------------------------------
Preparing addons development environment
--------------------------------------------------
-- Addon source tarball caching is enabled
-- ZIP packaging enabled (destination: D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/build/zips})
-- Building following addons: pvr.wmc
-- patch utility found at D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/output/bin/patch.exe
-- Processing D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
-- kodi-platform url: https://github.com/xbmc/kodi-platform
-- kodi-platform depends: kodi;tinyxml;platform
-- Processing D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/depends/common/platform/platform.txt
-- platform url: https://github.com/Pulse-Eight/platform.git
-- Processing D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
-- tinyxml url: http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz
-- Processing windows
-- Bootstrapping all default repositories as no addons were found...
-- Building for: Visual Studio 14 2015
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:1 (project):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:1 (project):
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/build/bootstrap/CMakeFiles/CMakeOutput.log".
See also "D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/build/bootstrap/CMakeFiles/CMakeError.log".
Error: could not find CMAKE_GENERATOR in Cache
CMake Error at CMakeLists.txt:215 (message):
  No addons available to be built


-- Configuring incomplete, errors occurred!
See also "D:/0/dev/repos/j/scarecrow420_xbmc/project/cmake/addons/build/CMakeFiles/CMakeOutput.log".
Failed to prepare addons development environment
See D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\make-addons.error for more details


This is the command the the bat file runs

cmake "%ADDONS_PATH%" -G "Visual Studio 12" ^
-DCMAKE_BUILD_TYPE=Debug ^
-DCMAKE_USER_MAKE_RULES_OVERRIDE="%SCRIPTS_PATH%/c-flag-overrides.cmake" ^
-DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX="%SCRIPTS_PATH%/cxx-flag-overrides.cmake" ^
-DCMAKE_INSTALL_PREFIX=%WORKDIR%\addons ^
-DAPP_ROOT=%WORKDIR% ^
-DBUILD_DIR=%ADDONS_BUILD_PATH% ^
-DDEPENDS_PATH=%ADDON_DEPENDS_PATH% ^
-DPACKAGE_ZIP=1 ^
-DADDONS_TO_BUILD="%ADDONS_TO_BUILD%"

with variables fully expanded:
Code:
cmake "D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\addons"
-G "Visual Studio 14"      
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_USER_MAKE_RULES_OVERRIDE= "D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\scripts\windows/c-flag-overrides.cmake"      
-DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX= "D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\scripts\windows/cxx-flag-overrides.cmake"      
-DCMAKE_INSTALL_PREFIX=D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\addons      
-DAPP_ROOT=D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..      
-DBUILD_DIR=D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\addons\build      
-DDEPENDS_PATH=D:\0\dev\repos\j\scarecrow420_xbmc\tools\buildsteps\win32\..\..\..\project\cmake\addons\output      
-DPACKAGE_ZIP=1      
-DADDONS_TO_BUILD=""pvr.wmc""
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
OK I managed to find what had occured. Since this change here: https://github.com/xbmc/xbmc/pull/7774 we now have to run the "bootstrap" step to get the binary addon referencee repository cloned down, before the cmake build steps can be rn

So for any dumb windows devs like me that barely understand this new cmake system, you simply need to run

\tools\buildsteps\win32\bootstrap-addons.bat

Before you run the prepare-addons-dev.bat file from this thread
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
You can also cd into tools\buildsteps\win32 and run:

Code:
make-addons.bat install

or specify a specific add-on:

Code:
make-addons.bat install pvr.demo

Supposedly you can do:

Code:
make-addons.bat install pvr.*

but this doesn't work for me, it simply builds all add-ons as if pvr.* were omitted
Reply
looks like that make-addons.bat only builds them with nmake, whereas as a PVR addon developer I needed the prepare-addons-dev.bat file from this thread, to have cmake generate Visual Studio projects etc so I can then work in Visual Studio from then on. It might be a good idea to actually submit the prepare-addons-dev.bat file from this thread into the repository since it does serve a purpose that isnt elsewhere achievable (without knowing all the explicit cmake commands yourself)

also looks like the gitignore file should probably be updated to include the /project/cmake/addons/addons/* because once the bootstrap is run and the addon reference repository is cloned down into here, git status then reports all those files as pending commit.
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
Hi all,
I would like to get involved in this project and contribute.
I have been making software for many year,, but I am not familiar with your project structure.

Could any one help me setup my environment to get me started under ubuntu ... so I can start building this addon- and eventually get familiar with the code and bring my share to help the community ? Thanks in advance.

(2015-02-21, 22:58)FernetMenta Wrote: We have changed the build system for PVR addons. Now they are built with cmake and every addon has its own repository.
CMake (http://www.cmake.org/Wiki/CMake) generates the build environment required for a particular platform.

Team-Kodi provides the infrastructure to build PVR addons for the supported plattforms. The addons are maintained in their
own repositories from where the build process loads them. The repository is specified in a .txt file in the Kodi source
tree. For the pvr.demo addon this is in home/xbmc/progs/src/xbmc/project/cmake/addons/addons/pvr.demo/pvr.demo.txt.
You can clone this repository to any location of your system. You also need to clone the Kodi repository which contains
common files, libs, and API for the addons.

For setup of an development environment follow these steps. The examples are with absolute paths. You can substitute
the path to match your systems.

Linux:

Although in-tree buildings works well, it is recommended to build an addon outside Kodi's tree. I have created a folder "build" in the source tree of the addon.

Change to addon's build folder:
Code:
cd /home/xbmc/progs/src/pvr.demo/build

generate build environment with config for debugging
Code:
cmake -DADDONS_TO_BUILD=pvr.demo -DADDON_SRC_PREFIX=/home/xbmc/progs/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/xbmc/progs/src/xbmc/addons -DPACKAGE_ZIP=1 /home/xbmc/progs/src/xbmc/project/cmake/addons

Setup Development Environment.

Setup your IDE. I use Eclipse and just need to load the sources into my Kodi workspace.
This is done by creating a new project form an existing makefile project.

Now the addon can be built by this command. I have added it to the project settings of my Eclipse project
Code:
make -C /home/xbmc/progs/src/pvr.demo/build


Windows:

Change to addons folder:
Code:
cd D:\Projects\xbmx\xbmc\project\cmake\addons\build

Generate build environment with config for debugging. This command generates a Visual Studio 2013 solution.
Code:
cmake -DADDONS_TO_BUILD="pvr.demo" -DADDON_SRC_PREFIX="D:\Projects" -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 12"  -DCMAKE_USER_MAKE_RULES_OVERRIDE="D:\Projects\xbmx\xbmc\project\cmake\scripts\windows\c-flag-overrides.cmake" -DCMAKE_USER_MAKE_RULES_OVERRIDE_CXX="D:\Projects\xbmx\xbmc\project\cmake\scripts\windows\cxx-flag-overrides.cmake" -DCMAKE_INSTALL_PREFIX="D:\Projects\xbmx\xbmc\addons" -DBUILD_DIR="D:\Projects\xbmx\xbmc\project\cmake\addons\build" -DPACKAGE_ZIP=1 "D:\Projects\xbmx\xbmc\project\cmake\addons"

Open Visual Studio, load and build this solution:
Code:
D:\Projects\xbmx\xbmc\project\cmake\addons\build\kodi-addons.sln

Setup Development Environment.

Open Visual Studio, load Kodi solution. Then add existing solution:
Code:
D:\Projects\xbmx\xbmc\project\cmake\addons\build\pvr.demo-prefix\src\pvr.demo-build\pvr.demo.sln

Create post-build step. Required to copy files for debugging

Create Post-Build Event in Visual Studio
Code:
tbd

For a more convenient method see post #9, credits to Montellese who provided this script.
Reply
You should check out README.ubuntu
Reply
I am having trouble with the cmakes trying to build dev enviroment for VS2013

I get the following error (btw I don't have the bootsrap make for some reason mentioned above)
Code:
-- Processing C:/xbmctest/xbmc-15.2rc2-Isengard/project/cmake/addons/depends/com
mon/kodi-platform/kodi-platform.txt
-- kodi-platform url: https://github.com/xbmc/kodi-platform
-- kodi-platform depends: kodi;tinyxml;platform
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/ExternalProj
ect.cmake:1717 (message):
  error: could not find git for clone of kodi-platform
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/ExternalProject.cmake:235
6 (_ep_add_download_command)
  C:/xbmctest/xbmc-15.2rc2-Isengard/project/cmake/scripts/common/handle-depends.
cmake:161 (externalproject_add)
  depends/CMakeLists.txt:34 (add_addon_depends)

any help is appreciated I am new to this cmake stuff wanting to look at the pvr and see if I can build a new source
Reply
the error is

Code:
error: could not find git for clone of kodi-platform

can't find git. try install msysgit or github's version of git for windows
Reply
Having the same problem:
(2015-08-18, 18:58)ray1112 Wrote: I tried build by post #1 instructions for linux with error:

...................

make -C /home/xbmc4/pvr.iptvsimple/build

Error:

CMake Error at build/build/depends/lib/kodi/addon-helpers.cmake:19 (FILE):
file Internal CMake error when trying to open file:
/home/xbmc4/pvr.iptvsimple/pvr.iptvsimple/addon.xml for reading.
Call Stack (most recent call first):
build/build/depends/lib/kodi/addon-helpers.cmake:29 (addon_version)
CMakeLists.txt:26 (build_addon)
-- Configuring incomplete, errors occurred!

I haven't addon.xml only addon.xml.in.

(2015-08-18, 21:51)wsnipex Wrote: you're mixing stuff up. You're trying to use the kodi addon buildsystem from the addon dir.
Isn't it what was said in the post #1 instructions?:
(2015-02-21, 22:58)FernetMenta Wrote: Although in-tree buildings works well, it is recommended to build an addon outside Kodi's tree. I have created a folder "build" in the source tree of the addon.

Change to addon's build folder:
Code:
cd /home/xbmc/progs/src/pvr.demo/build

.........................

Code:
make -C /home/xbmc/progs/src/pvr.demo/build

(2015-08-18, 21:51)wsnipex Wrote: Either use the intree build system
How to use the intree build system to build pvr addons only?

(2015-08-18, 21:51)wsnipex Wrote: or clone the Isengard branch of the addon and just run: cmake . && make && sudo make install
Is any instruction out there (wiki, etc.) which describes this method of building addons ("just run: cmake ...")?

Thank you
Reply
(2015-11-08, 22:50)bam80 Wrote: How to use the intree build system to build pvr addons only?
Ok I found out in docs/README.linux how to build binary addons from the kodi tree:
Code:
$ make -C tools/depends/target/binary-addons PREFIX=/<system>
but I can't find make target to install them.
Please help
Reply
This new build-system is a fucking piece of shit Confused
Reply
I all!!
I've a problem to compile pvr.iptvsimple.
I've done these steps


Code:
cd pvr.iptvsimple/
mkdir build
cd build
cmake -DADDONS_TO_BUILD=pvr.demo -DADDON_SRC_PREFIX=/home/xbmc/progs/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/home/xbmc/progs/src/xbmc/addons -DPACKAGE_ZIP=1 /home/xbmc/progs/src/xbmc/project/cmake/addons
make -C /Users/lucasoldi/Downloads/test-addons/pvr.iptvsimple/build/

The result of cmake is this -> http://pastebin.com/raw/h9rM664s
and the result of make -C is this -> http://pastebin.com/raw/fWsBVP27

But I don't find the addon compiled in /home/xbmc/progs/src/xbmc/addons.

Where is my error?
Thanks very muchh!!!

Luca
Reply
  • 1
  • 7
  • 8
  • 9(current)
  • 10
  • 11
  • 13

Logout Mark Read Team Forum Stats Members Help
Develop PVR addons with new cmake build system0