Last active
October 18, 2023 11:48
-
-
Save quietvoid/6b303b38e0baa85817f2b12492dc838c to your computer and use it in GitHub Desktop.
Kodi build script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
set -e | |
set -o xtrace | |
set -o pipefail | |
CUR_DATE=$(date +%Y-%m-%d) | |
BRANCH_NAME=select_hdr_fmt_build | |
BUILD_TARGET=arm-linux-androideabi | |
# BUILD_TARGET=aarch64-linux-android | |
cd $HOME/kodi | |
git fetch qv | |
git checkout $BRANCH_NAME | |
git pull | |
cd $HOME | |
TARGET_NAME=armeabi-v7a | |
if [[ "$BUILD_TARGET" == "aarch64-linux-android" ]]; then | |
TARGET_NAME=arm64-v8a | |
fi | |
OUT_LOG_DIR=$HOME/logs-kodi | |
OUT_LOG_PATH="${OUT_LOG_DIR}/${CUR_DATE}-${TARGET_NAME}-log" | |
APK_NAME=kodiapp-$TARGET_NAME-release | |
APK_FILE=$APK_NAME.apk | |
OUT_APK_FILE="kodi-21-Omega-${TARGET_NAME}-release-quietvoid-${BRANCH_NAME}-${CUR_DATE}" | |
NUM_THREADS=$(getconf _NPROCESSORS_ONLN) | |
cd $HOME/android-tools | |
sudo rm -rf kodi-depends kodi-tarballs || true | |
cd $HOME/kodi/tools/depends | |
# Depends | |
./bootstrap 2>&1 | tee "$OUT_LOG_PATH-depends.log" | |
DEBUG_BUILD=NO ./configure --enable-debug=no --disable-debug \ | |
--with-tarballs=$HOME/kodi-dev/kodi-tarballs \ | |
--host=$BUILD_TARGET \ | |
--with-sdk-path=$HOME/android-tools/android-sdk-linux \ | |
--with-ndk-path=$HOME/android-tools/android-sdk-linux/ndk/21.4.7075529 \ | |
--prefix=$HOME/kodi-dev/kodi-depends \ | |
2>&1 | tee -a "$OUT_LOG_PATH-depends.log" | |
DEBUG_BUILD=NO make -j$NUM_THREADS 2>&1 | tee -a "$OUT_LOG_PATH-depends.log" | |
cd $HOME/kodi | |
# Binary addons | |
# DEBUG_BUILD=NO make -j$NUM_THREADS \ | |
# -C tools/depends/target/binary-addons ADDONS="inputstream.adaptive" \ | |
# 2>&1 | tee "$OUT_LOG_PATH-addons.log" | |
# Kodi | |
DEBUG_BUILD=NO make -C tools/depends/target/cmakebuildsys 2>&1 | tee "$OUT_LOG_PATH-build.log" | |
cd $HOME/kodi/build | |
DEBUG_BUILD=NO make -j$NUM_THREADS 2>&1 | tee -a "$OUT_LOG_PATH-build.log" | |
DEBUG_BUILD=NO make apk 2>&1 | tee -a "$OUT_LOG_PATH-build.log" | |
cd $HOME/kodi | |
mv $APK_FILE $HOME/built-kodi-apks/$OUT_APK_FILE.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment