Skip to content

Commit f64e24f

Browse files
committed
Android build fixes.
1 parent 833406d commit f64e24f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ then
8484
CPUS=`/usr/bin/nproc`
8585
TAR='/bin/tar'
8686
# Identify Linux OS. Sets useful variables: ID, ID_LIKE, VERSION, NAME, PRETTY_NAME.
87-
source /etc/os-release
87+
#source /etc/os-release
8888
# Windows Subsystem for Linux identifies itself as 'Linux'. Additional test required.
8989
if grep -qE "(Microsoft|WSL)" /proc/version &> /dev/null ; then
9090
OS='Windows'
@@ -207,7 +207,7 @@ if [ $BUILD_ANDROID ] ; then
207207
cd "${OURDIR}"
208208
if [ ! -d "depends/android/include/opencv2" ] ; then
209209
curl --location "https://github.com/artoolkitx/opencv/releases/download/4.6.0/opencv-4.6.0-dev-artoolkitx-android.tgz" -o opencv2.tgz
210-
tar xzf opencv2.tgz --strip-components=1 -C depends/android
210+
tar xzf opencv2.tgz --strip-components=1 --warning=no-unknown-keyword -C depends/android
211211
rm opencv2.tgz
212212
fi
213213
# If artoolkitx folder is not a symlink, fetch artoolkitx from latest build into a location where the build can find it.
@@ -220,7 +220,8 @@ if [ $BUILD_ANDROID ] ; then
220220
fi
221221

222222
# Make the version number available to Gradle.
223-
sed -E -i "" -e "s/versionCode [0-9]+/versionCode ${VERSION_INT}/" -e "s/versionName \"[0-9\.]+\"/versionName \"${VERSION}\"/" Android/app/build.gradle
223+
sed -E -i.bak -e "s/versionCode [0-9]+/versionCode ${VERSION_INT}/" -e "s/versionName \"[0-9\.]+\"/versionName \"${VERSION}\"/" Android/app/build.gradle
224+
rm -f Android/app/build.gradle.bak
224225

225226
(cd "${OURDIR}/Android"
226227
echo "Building Android project"

0 commit comments

Comments
 (0)