-
Notifications
You must be signed in to change notification settings - Fork 242
How to build
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]
- Install Git for Windows
- Install Visual Studio (component needed "Desktop development with C++")
- Install CMake
- Make a new folder in your disk root e.g.
C:\<folder>
to use as main folder - Right click on the new folder, on the context menu select
Git Bash Here
, a terminal will be opened to this folder -
git clone --branch master https://github.com/xbmc/xbmc.git
*1 -
git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git
*1 mkdir inputstream.adaptive/build/
cd inputstream.adaptive/build/
- 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
-
cmake --build . --config Release --target inputstream.adaptive
*3 - 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
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]
- Install tools:
sudo apt install autoconf bison build-essential curl default-jdk gawk git gperf libcurl4-openssl-dev zlib1g-dev cmake zip
Open the terminal and execute these commands in sequence:
- Make a new folder in your home directory
mkdir <folder>
to use as main folder cd <folder>
git clone https://github.com/raspberrypi/tools --depth=1
git clone https://github.com/raspberrypi/firmware --depth=1
-
git clone --branch master https://github.com/xbmc/xbmc.git
*1 -
git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git
*1 mkdir inputstream.adaptive/build/
cd inputstream.adaptive/build/
- 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
make
- 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 inhome/<folder>
- To browse builded files:
cd ../../xbmc/addons/inputstream.adaptive
Build on Linux - Ubuntu [click to expand]
- GIT
- GCC
- CMAKE
- G++
To install the prerequisites run in the terminal:
sudo apt install git cmake gcc g++
Open the terminal and execute these commands in sequence:
- Make a new folder in your home directory
mkdir <folder>
to use as main folder cd <folder>
-
git clone --branch master https://github.com/xbmc/xbmc.git
*1 -
git clone --branch Nexus https://github.com/xbmc/inputstream.adaptive.git
*1 mkdir inputstream.adaptive/build/
cd inputstream.adaptive/build/
- 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
make
- 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 inhome/<folder>
- To browse builded files:
cd ../../xbmc/addons/inputstream.adaptive
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
Build for Android by using linux (e.g. ubuntu) [click to expand]
- Install required packages as explained on docs, chapter: Install the required packages
- Install SDK as explained on docs, chapter: Prerequisites
- Install NDK by taking in account for what kodi version you want to build. Each Kodi version use a different NDK version. This is specified on the file
docs/README.Android.md
of each xbmc repository branch, relative to each kodi version.
- Make a new folder in your home directory
mkdir <folder>
to use as main folder cd <folder>
-
git clone --branch master https://github.com/xbmc/xbmc.git
*1 -
git clone --branch Piers https://github.com/xbmc/inputstream.adaptive.git
*1 - Save the following bash (copy it in to a file e.g.
build.sh
) in to the main<folder>
, edit it to configure relative settings, then run it./build.sh
to build ISA:
#!/bin/sh
# Before run this script, remember to install required SDK/NDK on your system based on Kodi version to be used.
# Examples:
# Kodi 22: NDK "26.2.11394342" API 24
# Kodi 21: NDK "21.4.7075529" API 21
# -------------- Build configuration
# set the android host architecture ("aarch64-linux-android" == armv8-64 / "arm-linux-androideabi" == armv7)
HOST_ARCH="aarch64-linux-android"
# set NDK version to be used
NDK_VER="26.2.11394342"
NDK_API=24
# set the sdk path
ANDROID_SDK_ROOT="${HOME}/android-tools/android-sdk-linux"
# set the path to the xbmc (kodi) source code path
KODI_SRC_PATH="${HOME}/dev/xbmc"
# set the parent folder path that contains the InputStreamAdaptive source code folder (expected "inputstream.adaptive" folder name)
ISA_SRC_PARENT_PATH="${HOME}/dev"
# set the build type ("Release" or "Debug")
BUILD_TYPE="Debug"
ADDON_ID="inputstream.adaptive"
# -------------- Building flow
cd $KODI_SRC_PATH/tools/depends
echo ">>>>>>>>>>>>>>>>>>>>>>>>>> SCRIPT MESSAGE - EVENT: BOOSTRAP"
./bootstrap
echo ">>>>>>>>>>>>>>>>>>>>>>>>>> SCRIPT MESSAGE - EVENT: CONFIGURING TOOLCHAIN"
CONFIGURE_EXTRA_OPTIONS="--with-ndk-api=${NDK_API} --with-sdk-path=${ANDROID_SDK_ROOT} --with-ndk-path=${ANDROID_SDK_ROOT}/ndk/${NDK_VER}"
./configure --host=${HOST_ARCH} --prefix=$KODI_SRC_PATH/xbmc-depends $CONFIGURE_EXTRA_OPTIONS
echo ">>>>>>>>>>>>>>>>>>>>>>>>>> SCRIPT MESSAGE - EVENT: BUILDING ADD-ON"
cd $KODI_SRC_PATH
make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons ADDONS=$ADDON_ID ADDON_SRC_PREFIX=${ISA_SRC_PARENT_PATH} INSTALL_PREFIX=${KODI_SRC_PATH}/addons EXTRA_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
# The builded files are on: $KODI_SRC_PATH/addons/$ADDON_ID
- *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 toDebug
(Kodi should also be built as Debug). - *3: If you have to debug the component
--config
value must be set toDebug
(Kodi should also be built as Debug).
User Documentation
Developer Documentation
- Integration
- Integration DRM
- Integration DRM (old)
- Stream selection types properties
- How to test a stream
- Test samples python addon
- How to provide custom manifest and license
- Supported containers and codecs
- Verified Media Path (VMP)
- Set resolution limits for DRM streams
- Custom DASH manifest tags
- Audio Subtitles track properties
- Dev. FAQ
- Widevine ARM64 support
- Add‐on WIP status
Development