Simple addon how to enable on build?

  • I have a simple python script addon that I would like to add.

    I have these files:
    addon.xml
    default.py
    icon.png

    and this is my package I got the example from script.config.vdr:

    Everything builds correctly, no errors, but the add-on does not appear in Kodi, anyone know what am I missing?

    Thank you!

    Edited once, last by niabi (March 12, 2017 at 3:52 AM).

  • "Add-on" packages are built for installation via a repo or local install from zip. So you need to modify the package so that it is built as a normal package (no as an add-on) and installed/embedded into the SYSTEM image.


  • I have a simple python script addon that I would like to add.

    I have these files:
    addon.xml
    default.py
    icon.png

    and this is my package I got the example from script.config.vdr:

    Everything builds correctly, no errors, but the add-on does not appear in Kodi, anyone know what am I missing?

    Thank you!

    You can create a kodi addon (as opposed to LE addon) with the three files you have. As long as the addon.xml is valid, just zip up the three files and install from zip in kodi.

    If you post (or pm) your addon.xml, I can take a look


  • "Add-on" packages are built for installation via a repo or local install from zip. So you need to modify the package so that it is built as a normal package (no as an add-on) and installed/embedded into the SYSTEM image.

    Thanks!

    Got it, I have to copy the files to $INSTALL/usr/share/kodi/addons, then enable it manually. or is there a way to enable it automatically?

    [hr]

    You can create a kodi addon (as opposed to LE addon) with the three files you have. As long as the addon.xml is valid, just zip up the three files and install from zip in kodi.

    If you post (or pm) your addon.xml, I can take a look

    I know, it works like that. but what I want to do is install/enable the add-on when I am building the image :)
    [hr]
    I build the package, and it works, it gets copied to the addons folder and I can enable it manually.

    But is there a way to enable the addon automatically on build? how does the LibreElec settings addon does it? or does it have to be manually enabled? its not a big deal. I just rather it be enabled by default :)

    Edited once, last by niabi (March 12, 2017 at 5:44 AM).

  • Hi all,

    sorry for reactivating this old thread.

    Editing the addon_manifest.xml with another package works so far with that command in the package's package.mk:

    Code
    +  ADDON_MANIFEST=$(get_install_dir kodi)/usr/share/kodi/system/addon-manifest.xml
    +  xmlstarlet ed -L --subnode "/addons" -t elem -n "addon" -v "service.locale" ${ADDON_MANIFEST}

    What needs to be done, to get the xml from $(get_install_dir kodi) into the image/system path in the end? Do i need to copy it manually or kick off the copy with a special command or need some other path instead of $(get_install_dir) ?

    Thanks for your help

    rellla

  • Editing the addon_manifest.xml with another package works so far

    You have to change it on the kodi package.mk file only.

    E.g. define $ADDITIONAL_KODI_ADDONS in your options file and add the addon names in kodi's package.mk