Skip to content
Stefano Gottardo edited this page Mar 13, 2023 · 23 revisions

Here we provide guidelines on how to build for some common systems, in a similar way it will be possible to build on other systems or distributions.

Choose the operating system on which to build the add-on:

Build on Windows (64 bit) [click to expand]

Prerequisites

Compile

  1. Make a new folder in your disk root e.g. C:\<folder> to use as main folder
  2. Right click on the new folder, on the context menu select Git Bash Here, a terminal will be opened to this folder
  3. git clone --branch master https://github.com/xbmc/xbmc.git *1
  4. git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git *1
  5. mkdir inputstream.adaptive/build/
  6. cd inputstream.adaptive/build/
  7. Run the following command: *2
cmake -T host=x64 -DADDONS_TO_BUILD=inputstream.adaptive -DCMAKE_BUILD_TYPE=Release -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
  1. cmake --build . --config Release --target inputstream.adaptive *3
  2. At this point the add-on binary is builded inside C:\<folder>\xbmc\addons path, then:
  • You can zip the inputstream.adaptive to make it installable via Kodi add-on browser

How to resolve the expat build syntax error errors

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 (instructions may be outdated) [click to expand]

Prerequisites

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

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 https://github.com/raspberrypi/tools --depth=1
  4. git clone https://github.com/raspberrypi/firmware --depth=1
  5. git clone --branch master https://github.com/xbmc/xbmc.git *1
  6. git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git *1
  7. mkdir inputstream.adaptive/build/
  8. cd inputstream.adaptive/build/
  9. Run the following command: *2
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, you will find the zip in home/<folder>
  • To browse builded files: cd ../../xbmc/addons/inputstream.adaptive
Build on Linux - Ubuntu [click to expand]

Prerequisites

  • GIT
  • GCC
  • CMAKE
  • G++

To install the prerequisites run 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 *1
  4. git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git *1
  5. mkdir inputstream.adaptive/build/
  6. cd inputstream.adaptive/build/
  7. Run the following command: *2
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, you will find the zip in home/<folder>
  • To browse builded files: cd ../../xbmc/addons/inputstream.adaptive

Other linux generic build instructions

You can also find others ways to build the add-on from Kodi repository documentation:

https://github.com/xbmc/xbmc/blob/master/docs/README.Linux.md#5-build-binary-add-ons


Note

  • *1: You can change the branch name according to the Kodi version to use.
  • *2: If you have to debug the component CMAKE_BUILD_TYPE value must be set to Debug (Kodi should also be built as Debug).
  • *3: If you have to debug the component --config value must be set to Debug (Kodi should also be built as Debug).