Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.
Open
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
30 changes: 14 additions & 16 deletions native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,18 @@ build_arm64 () {
# ARM64 uses OPENSSL_ARCH="linux-generic64 -DB_ENDIAN"


# x86 FFMPEG doesn't work on modern android, and neither side wants to
# do the work to fix it. So we'll drop support.

# build_x86 () {
#
# export ANDROID_PLATFORM=android-15
# export PLATFORM=x86
# export NDK_ARCH=x86
# export FFMPEG_ARCH=x86
# export GCC_ARCH=i686-linux-android
# export OPENSSL_ARCH="android-x86"
# export PICFLAG="-fPIC"
#
# build_platform
# }
build_x86 () {

export ANDROID_PLATFORM=android-21
export PLATFORM=x86
export NDK_ARCH=x86
export FFMPEG_ARCH=x86
export GCC_ARCH=i686-linux-android
export OPENSSL_ARCH="linux-generic32"
export PICFLAG="-fPIC"

build_platform
}

build_x86_64 () {

Expand All @@ -158,10 +155,11 @@ build_ () {

build_arm64
build_arm
build_x86
build_x86_64

export ANDROID_PLATFORM=android-21
export ALL_PLATFORMS="armeabi-v7a x86_64 arm64-v8a"
export ALL_PLATFORMS="armeabi-v7a x86_64 x86 arm64-v8a"

run jni all
run finish dist
Expand Down
8 changes: 8 additions & 0 deletions native/scripts/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ build () {

pushd "ffmpeg-$version"

if [ "$FFMPEG_ARCH" = "x86" ]; then
FFMPEG_FLAGS="--disable-asm";
else
FFMPEG_FLAGS="";
fi;


./configure --prefix="$INSTALLDIR" \
--cc="$CC" \
--ld="$CC" \
Expand All @@ -21,6 +28,7 @@ build () {
--extra-ldflags="$LDFLAGS" \
--extra-ldexeflags=-pie \
--enable-cross-compile \
$FFMPEG_FLAGS \
--disable-shared \
--enable-pic \
--enable-static \
Expand Down
4 changes: 2 additions & 2 deletions templates/app-build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {
enable true;
reset();

include "x86_64", "armeabi-v7a", "arm64-v8a"
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
universalApk true
}
}
Expand All @@ -44,7 +44,7 @@ android {
}
}

project.ext.versionCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1, 'x86_64': 8]
project.ext.versionCodes = ['armeabi-v7a': 0, 'arm64-v8a': 1, 'x86': 4, 'x86_64': 8]

android.applicationVariants.all { variant ->
// assign different version code for each output
Expand Down