mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
Experimental MPV player backend Related to #14, #22, & #85 You can switch to MPV in advanced settings and toggle using hardware decoding or not. This uses code and buildscripts from https://github.com/mpv-android/mpv-android, plus other third party libraries to build MPV
32 lines
909 B
Bash
Executable file
32 lines
909 B
Bash
Executable file
#!/bin/bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
|
|
|
. "$DIR/include/depinfo.sh"
|
|
|
|
os=linux
|
|
[[ "$OSTYPE" == "darwin"* ]] && os=mac
|
|
export os
|
|
|
|
if [ "$os" == "mac" ]; then
|
|
[ -z "$cores" ] && cores=$(sysctl -n hw.ncpu)
|
|
# various things rely on GNU behaviour
|
|
export INSTALL=`which ginstall`
|
|
export SED=gsed
|
|
else
|
|
[ -z "$cores" ] && cores=$(grep -c ^processor /proc/cpuinfo)
|
|
fi
|
|
cores=${cores:-4}
|
|
|
|
# configure pkg-config paths if inside buildscripts
|
|
if [ -n "$ndk_triple" ]; then
|
|
export PKG_CONFIG_SYSROOT_DIR="$prefix_dir"
|
|
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig"
|
|
unset PKG_CONFIG_PATH
|
|
fi
|
|
|
|
toolchain=$(echo "$DIR/sdk/android-ndk-${v_ndk}/toolchains/llvm/prebuilt/"*)
|
|
[ -d "$toolchain" ] && \
|
|
export PATH="$toolchain/bin:$DIR/sdk/android-ndk-${v_ndk}:$DIR/sdk/bin:$PATH"
|
|
export ANDROID_HOME="$DIR/sdk/android-sdk-$os"
|
|
unset ANDROID_SDK_ROOT ANDROID_NDK_ROOT
|