Posts: 3,735
Joined: Dec 2010
Reputation:
53
negge
yo guysv7may bd latr tomorroe
Posts: 3,735
Awesome, thanks, I got it set up just the way I wanted now.
Posts: 3
Joined: Mar 2015
Reputation:
0
Sorry to ask such a basic question, but I'm new to cmake: would someone be able to give me a hint on how to setup a cmake toolchain file to cross-compile these addons?
I'm just trying to figure out what I need to add to h.duo's instructions for native compiliation. I guess I need a .cmake file to pass to cmake with -DCMAKE_TOOLCHAIN_FILE ? Anything else?
Posts: 1,506
Joined: Nov 2013
have a look at the in-tree build system. it's doing precisely that... a cmake toolchain is generated as part of the tools/depends configure.
Posts: 1,378
Joined: Oct 2004
Reputation:
37
this may be the place to ask my question too. in pvr.wmc we have a clientversion.h file that we were previously updating the version in (as well as the addon.xml.in file) and constantly having issues when other people did changes and bumped the xml file without realising there was a header file as well. Is it possible to have the new build system generate our clientversion.h file (or similar) or replace a token in it or whatever, based on the version in the addon.xml file?
Posts: 1,506
Joined: Nov 2013
2015-03-10, 14:49
(This post was last modified: 2015-03-10, 15:01 by ironic_monkey.)
of course, want me to prepare it ? i did in any case. pull
https://github.com/notspiff/pvr.wmc/comm...entversion
i cannot send a pr as my repo aint a fork and i cba to refork right now. but it's based on kodi-pvr/pvr.wmc master so it should pull clean (git pull
https://github.com/notspiff/pvr.wmc generate_clientversion).
general cluestick: configure_file(infile outfile @ONLY). placeholders are replaced with the value of the equivalent *cmake variable*. the build_addon macro makes the version available as <PREFIX>_VERSION where PREFIX is given as a parameter (WMC in this case).
Posts: 1,506
Joined: Nov 2013
read my updated post and commit. it's the full thing. the build_addon() macro reads from addon.xml for you and makes it available.
the outlined solution happens at configure time (i.e. when you call cmake) and won't pick up a change to addon.xml on build time. it you want it done on build time, i can do that as well, easily doable, just some slightly more annoying syntax involved.
Posts: 1,506
Joined: Nov 2013
top commit in the branch now does the generation as a build step. touch clientversion.h.in or addon.xml and it's regenerated.
Posts: 1,378
Joined: Oct 2004
Reputation:
37
Cool thanks! I'll try and test it tomorrow
Posts: 99
Joined: Aug 2009
Reputation:
1
2015-03-19, 16:41
(This post was last modified: 2015-03-19, 16:50 by EricV.)
I tried to compile using the new receipe and its quite unobvious for an non dev:
[quote]
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
[\quote]
-DCMAKE_INSTALL_PREFIX install the binary addon in the xbmc source tree, why not in the installed tree? So you must redo an install to have it really installed on the target directory. So please document the full procedure
In addition, the current kodi docs/README.linux fails at make -C tools/depends/target/binary-addons PREFIX=/usr/local)
In addition, the current kodi docs/README.pvr still reference the old tree
In addition, pvr.hts reference non existing fields in epg (iYears) and channel_group(iPosition)
diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp
index 7cb1047..3d0fd13 100644
--- a/src/Tvheadend.cpp
+++ b/src/Tvheadend.cpp
@@ -130,7 +130,7 @@ PVR_ERROR CTvheadend::GetTags ( ADDON_HANDLE handle )
tag.bIsRadio = false; // TODO: support for radio channel groups.
strncpy(tag.strGroupName, it->second.name.c_str(),
sizeof(tag.strGroupName));
- tag.iPosition = it->second.index;
+ // tag.iPosition = it->second.index;
tags.push_back(tag);
}
}
@@ -684,7 +684,7 @@ void CTvheadend::TransferEvent
epg.strCast = NULL; /* not supported by tvh */
epg.strDirector = NULL; /* not supported by tvh */
epg.strWriter = NULL; /* not supported by tvh */
- epg.iYear = 0; /* not supported by tvh */
+// epg.iYear = 0; /* not supported by tvh */
epg.strIMDBNumber = NULL; /* not supported by tvh */
epg.strIconPath = event.image.c_str();
epg.iGenreType = event.content & 0xF0;
Posts: 1,506
Joined: Nov 2013
good thing non-devs is not a concern then ! ;>
really, forget about the in-tree build unless you are crossing. just build it as normal software
1) execute make install for kodi to install bindings and cmake helpers.
2) build and install kodi-platform from
https://github.com/xbmc/kodi-platform
you then build them addons completely like other software. and install them wherever you want, however you want.