Kodi Community Forum

Full Version: Get Addon and Kod versions in PVR Addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I can't find an obvious way of doing this. I would like to perform some cleanup actions when the addon is updated which I can do if I store the addon version. As a last resort I could read it from addon.xml.

I can do something like this for addon name and path but it doesn't work for version:

Code:

char buffer[1024];
XBMC->GetSetting("__addonpath__", buffer);

Thanks in advnace
Added the following to CMakeLists.txt

Code:
addon_version(pvr.vuplus VUPLUS)
add_definitions(-DVUPLUS_VERSION=${VUPLUS_VERSION})

Can then be accessed from source usingĀ 
Code:
STR(VUPLUS_VERSION)