Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- name: download-deps
working-directory: ./buildscripts
run: |
export mpvarchoverride=armv7l
chmod +x github-prepare.sh
./github-prepare.sh
- name: build-apk
Expand Down Expand Up @@ -101,6 +102,7 @@ jobs:
- name: download-deps
working-directory: ./buildscripts
run: |
export mpvarchoverride=x86_64
chmod +x github-prepare.sh
./github-prepare.sh x86_64
- name: build-apk
Expand Down Expand Up @@ -157,6 +159,7 @@ jobs:
- name: download-deps
working-directory: ./buildscripts
run: |
export mpvarchoverride=arm64
chmod +x github-prepare.sh
./github-prepare.sh arm64
- name: build-apk
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
LOCAL_PATH:= $(call my-dir)

ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
PREFIX = $(PREFIX32)
endif
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
PREFIX = $(PREFIX64)
endif
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/jni/Application.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
ifneq ($(PREFIX32),)
APP_ABI := armeabi-v7a
endif
ifneq ($(PREFIX64),)
APP_ABI += arm64-v8a
endif
Expand Down
7 changes: 7 additions & 0 deletions buildscripts/buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ cleanbuild=0
nodeps=0
clang=1
target=mpv-android

if [ -z $mpvarchoverride ]
then
arch=armv7l
else
arch=$mpvarchoverride
fi

getdeps () {
varname="dep_${1//-/_}[*]"
Expand Down Expand Up @@ -118,6 +124,7 @@ usage () {
echo "--clean Clean build dirs before compiling"
echo "--gcc Use gcc compiler (unsupported!)"
echo "--arch <arch> Build for specified architecture (default: $arch; supported: armv7l, arm64, x86_64)"
echo "--no32 <arch> Build only for specified architecture (supported: armv7l, arm64, x86_64)"
exit 0
}

Expand Down
3 changes: 2 additions & 1 deletion buildscripts/scripts/mpv-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ nativeprefix () {
fi
}

prefix32=$(nativeprefix "armv7l")
prefix64=$(nativeprefix "arm64")
prefix_x64=$(nativeprefix "x86_64")
prefix_x86=$(nativeprefix "x86")

PREFIX=$BUILD/prefix/armv7l PREFIX64=$prefix64 PREFIX_X64=$prefix_x64 PREFIX_X86=$prefix_x86 \
PREFIX=$BUILD/prefix/armv7l PREFIX64=$prefix64 PREFIX32=$prefix32 PREFIX_X64=$prefix_x64 PREFIX_X86=$prefix_x86 \
ndk-build -C app/src/main -j$cores
./gradlew assembleDebug assembleRelease

Expand Down