Addon Build Guide

  • :) I'm deffinatley willing to learn! It's just taking it in and having the time to give it a go. Im slowly trying to grasp python and have made some small youtube kodi addons. I'll keep learing what I can.
    Good to know its not all IT guys out there. :)

  • That was very helpful @awiuoy :)
    Thanks to you, I was able to start the package.mk building process with:
    user@ubuntu:~/LibreELEC.tv# PROJECT=RPi2 ARCH=arm scripts/build addon.package.name

    Could you please give some info for unexperienced users like me:
    1. The building process takes half a day on my machine (currently trouble shooting, as it aborts always), just for one addon. Is this always the case?
    2. Is there some possibility to accelerate it somehow? I mean, the addon itself is usually less than 200kb of final size. But executing the ssh line above seems to start an entire build process of an image for the raspberry pi
    3. As I had no success so far (and it takes many many hours until I encounter the next error message)... what is the outcome finally? Where do I find the addon.zip that I can pull out to install it then on my LE clients?
    4. Is the addon packed into a zip at all, or am I doing something pointless here? Or is it just one more code line that I have to do, to make an addon.zip finally? For this, I still don't know where the destination directory of the compiled addon will be then.

    I hope you can answer some of the questions, as I'm totally new to this and worried that I waste my time waiting 6 to 12 hours of compiling over and over again until I have finally sorted out all error messages, just to realize that PROJECT=RPi2 ARCH=arm scripts/build addon.package.name was the wrong aproach in the first place :D

    The thing is that I just want to have an addon.zip and not an entire raspberry pi LibreELEC image (which I could write to an sd card then). I would like to rely on the official LE releases for this, though I'd like to play around with the selfcompiled addon.

    • Official Post


    1. The toolchain and package requirements are built, which takes quite some time.
    2. Subsequent builds will only (re-)build modified packages. Keep your build environment to avoid full rebuild.
    3. Built packages are found in the build* sub-directories, addons in the build*/addons sub-directories.
    4. Successfully built addons are found zipped in target and build*/addons subdirectories.

    Cheers

  • Man, thanks a lot again! This was information I was missing badly! Always an uncomfortable feeling not to know the background about what's going on and the need to wait hours and hours seeing here and there thousands of lines scrolling down, and still not be certain whether the outcome is what you expect.

    I will make a snapshot of the VM after the first successful run, to not be forced to see this time consuming process again ;)

    Edited once, last by infinity85 (May 16, 2017 at 11:58 AM).

  • Hi awiouy,

    I will like to build this "hxxps://http://github.com/shadowsocks/shadowsocks-qt5" as an addon for my LibreElec box; not sure if it was built before, but will like to try as it will give me the confidence to make other addons.

    I have a LibreElec built environment, and the toolchain dependencies required to compile, hxxps://http://github.com/shadowsocks/shadowsocks-qt5/wiki/Compiling; installed on my Debian box.

    By following your tutorial here hxxps://http://wiki.libreelec.tv/index.php?title=Adding_a_Package. Will I be able to make this addon or am I wasting my time? Thanks

    • Official Post

    Hi awiouy,

    I will like to build this "hxxps://http://github.com/shadowsocks/shadowsocks-qt5" as an addon for my LibreElec box; not sure if it was built before, but will like to try as it will give me the confidence to make other addons.

    I have a LibreElec built environment, and the toolchain dependencies required to compile, hxxps://http://github.com/shadowsocks/shadowsocks-qt5/wiki/Compiling; installed on my Debian box.

    By following your tutorial here hxxps://http://wiki.libreelec.tv/index.php?title=Adding_a_Package. Will I be able to make this addon or am I wasting my time? Thanks

    Hello node,

    I do not know shadowsocks-qt.

    You can give it a try, either with qt-base or with qt-everywhere.

    With qt-base, simply add qt-base as a dependency to you package.

    If all qt dependencies are not provided by qt-base, try with qt-everywhere: replace qt-base by qt-everywhere in the dependencies and create a qt-everywhere package, like here.

  • Hi@awiouy,

    I created shadowsocks package.mk, for PKG_DEPENDS_TRRGET="toolchain qt-everywhere qtbase" I place qt-everywhere and qtbase with there package.mk in ../package/addons/addon-depends. Ran the scripts/build shadowsocks but getting the following errors after awhile compiling.

    make[3]: Leaving directory '/LibreELEC_T10/LE80-node/build.LibreELEC-Amlogic.T10.arm-8.0.1/qt-everywhere-5.8.0/qtbase/src/widgets'


    make[2]: Leaving directory '/LibreELEC_T10/LE80-node/build.LibreELEC-Amlogic.T10.arm-8.0.1/qt-everywhere-5.8.0/qtbase/src'


    make[1]: *** [Makefile:47: sub-src-make_first] Error 2


    make[1]: Leaving directory '/LibreELEC_T10/LE80-node/build.LibreELEC-Amlogic.T10.arm-8.0.1/qt-everywhere-5.8.0/qtbase'


    make: *** [Makefile:80: module-qtbase-make_first] Error 2

    Not sure how to solve this.