Skip to content
Stefano Gottardo edited this page May 1, 2022 · 34 revisions

Build on Windows (64 bit)

Prerequisites

Compile

  1. Make a new folder (e.g. C:\PROJECTS)
  2. On the new folder, open the context menu and select Git Bash Here (or use CMD terminal, PowerShell)
  3. In the terminal window:
    Clone the Kodi master branch git clone --branch master https://github.com/xbmc/xbmc.git
    Clone the ISA master branch git clone --branch master https://github.com/xbmc/inputstream.adaptive.git
    (Change the branch names with the preferred branch)
  4. Create the build folder mkdir inputstream.adaptive/build/
  5. Open the build folder cd inputstream.adaptive/build/
  6. Configure the build:
    CMAKE_BUILD_TYPE can be "Debug" or "Release"
    MAKE_INSTALL_PREFIX is the target folder where place the compiled files
    If needed modify the parameters in the command line and then run:
cmake -T host=x64 -DADDONS_TO_BUILD=inputstream.adaptive -DCMAKE_BUILD_TYPE=Debug -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  1. Run the build: cmake --build . --config Debug --target inputstream.adaptive
How to resolve the `expat` build `syntax error` errors [click to expand]

If you find many errors in the building of expat dependency, you are most likely using VisualStudio in a language other than English, or with more languages installed.

Unfortunately, the use of several languages leads to the localisation of CMake output, this cause the failing of check_c_compiler_flag in expat/ConfigureChecks.cmake, that is the main cause of broken build.

One way to solve the problem is uninstall all language packs of Visual Studio and install/keep only the English language pack. After this you can build with success.

Build on raspbian for raspberry pi

These instructions are to compile inputstream.adaptive for Leia (kodi 18). By selecting the Matrix branch this should work also for kodi 19.

Prerequisites

  • install tools: sudo apt install autoconf bison build-essential curl default-jdk gawk git gperf libcurl4-openssl-dev zlib1g-dev cmake zip

Compile

  1. Make a new (e.g. inputstream.adaptive): mkdir <folder>
  2. cd <folder>
  3. git clone https://github.com/raspberrypi/tools --depth=1
  4. git clone https://github.com/raspberrypi/firmware --depth=1
  5. git clone -b Leia https://github.com/xbmc/xbmc.git
  6. git clone -b Leia https://github.com/xbmc/inputstream.adaptive
  7. cd inputstream.adaptive
  8. mkdir build && cd build
  9. cmake -DADDONS_TO_BUILD=inputstream.adaptive -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  10. make
  11. cd ../../xbmc/addons/
  12. zip -r /tmp/inputstream.adaptive.zip inputstream.adaptive

There is now a zip inputstream.adaptive.zip in the /tmp folder which can be installed as addon on a raspberry pi (at least on LibreElec). The pi3 and pi4 can use this one zip.

Build (out-of-tree) on Linux Ubuntu

Prerequisites

  • GCC
  • CMAKE
  • G++

To install prerequisites by this command in the terminal: sudo apt install git cmake gcc g++

Compile

Open the terminal and execute these commands in sequence:

  1. Make a new folder in your home directory mkdir <folder> to use as main folder
  2. cd <folder>
  3. git clone --branch master https://github.com/xbmc/xbmc.git
  4. git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git
  5. mkdir inputstream.adaptive/build/
  6. cd inputstream.adaptive/build/
cmake -DADDONS_TO_BUILD=inputstream.adaptive -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  1. make
  2. At this point the add-on binary is builded inside home/<folder>/xbmc/addons path, then:
  • To make an installable Kodi add-on zip: zip -r ../../inputstream.adaptive.zip inputstream.adaptive
  • To browse builded files: cd ../../xbmc/addons/inputstream.adaptive

You can also find another way to build the add-on from the generic build instructions on the Kodi repository documentation: https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md#5-build-binary-add-ons

Build on Linux - OUTDATED/NEED TO UPDATE

Prerequisites

Compile

git clone -b Leia https://github.com/xbmc/xbmc.git
cd && git clone -b Leia https://github.com/xbmc/inputstream.adaptive
cd ~/inputstream.adaptive && mkdir build && cd build

cmake -DADDONS_TO_BUILD=inputstream.adaptive -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/.kodi/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
make -j$(getconf _NPROCESSORS_ONLN)

Clone this wiki locally