Skip to content

Commit

Permalink
Fixes k2-fsa#601
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Feb 22, 2024
1 parent a2df353 commit 5a893d4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 32 deletions.
12 changes: 4 additions & 8 deletions build-android-arm64-v8a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@ echo "ANDROID_NDK: $ANDROID_NDK"
sleep 1
onnxruntime_version=1.17.0

if [ ! -f $onnxruntime_version/jni/arm64-v8a/libonnxruntime.so ]; then
mkdir -p $onnxruntime_version
pushd $onnxruntime_version
wget -q https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version}/onnxruntime-android-${onnxruntime_version}.zip
unzip onnxruntime-android-${onnxruntime_version}.zip
rm onnxruntime-android-${onnxruntime_version}.zip
popd
fi
wget https://github.com/l3utterfly/jetified-onnxruntime-android-1.17.0/archive/refs/heads/main.zip
unzip main.zip
rm main.zip
mv jetified-onnxruntime-android-1.17.0-main $onnxruntime_version

export SHERPA_ONNXRUNTIME_LIB_DIR=$dir/$onnxruntime_version/jni/arm64-v8a/
export SHERPA_ONNXRUNTIME_INCLUDE_DIR=$dir/$onnxruntime_version/headers/
Expand Down
12 changes: 4 additions & 8 deletions build-android-armv7-eabi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ sleep 1

onnxruntime_version=1.17.0

if [ ! -f $onnxruntime_version/jni/armeabi-v7a/libonnxruntime.so ]; then
mkdir -p $onnxruntime_version
pushd $onnxruntime_version
wget -q https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version}/onnxruntime-android-${onnxruntime_version}.zip
unzip onnxruntime-android-${onnxruntime_version}.zip
rm onnxruntime-android-${onnxruntime_version}.zip
popd
fi
wget https://github.com/l3utterfly/jetified-onnxruntime-android-1.17.0/archive/refs/heads/main.zip
unzip main.zip
rm main.zip
mv jetified-onnxruntime-android-1.17.0-main $onnxruntime_version

export SHERPA_ONNXRUNTIME_LIB_DIR=$dir/$onnxruntime_version/jni/armeabi-v7a/
export SHERPA_ONNXRUNTIME_INCLUDE_DIR=$dir/$onnxruntime_version/headers/
Expand Down
12 changes: 4 additions & 8 deletions build-android-x86-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ sleep 1

onnxruntime_version=1.17.0

if [ ! -f $onnxruntime_version/jni/x86_64/libonnxruntime.so ]; then
mkdir -p $onnxruntime_version
pushd $onnxruntime_version
wget -q https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version}/onnxruntime-android-${onnxruntime_version}.zip
unzip onnxruntime-android-${onnxruntime_version}.zip
rm onnxruntime-android-${onnxruntime_version}.zip
popd
fi
wget https://github.com/l3utterfly/jetified-onnxruntime-android-1.17.0/archive/refs/heads/main.zip
unzip main.zip
rm main.zip
mv jetified-onnxruntime-android-1.17.0-main $onnxruntime_version

export SHERPA_ONNXRUNTIME_LIB_DIR=$dir/$onnxruntime_version/jni/x86_64/
export SHERPA_ONNXRUNTIME_INCLUDE_DIR=$dir/$onnxruntime_version/headers/
Expand Down
12 changes: 4 additions & 8 deletions build-android-x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,10 @@ sleep 1

onnxruntime_version=1.17.0

if [ ! -f $onnxruntime_version/jni/x86/libonnxruntime.so ]; then
mkdir -p $onnxruntime_version
pushd $onnxruntime_version
wget -q https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version}/onnxruntime-android-${onnxruntime_version}.zip
unzip onnxruntime-android-${onnxruntime_version}.zip
rm onnxruntime-android-${onnxruntime_version}.zip
popd
fi
wget https://github.com/l3utterfly/jetified-onnxruntime-android-1.17.0/archive/refs/heads/main.zip
unzip main.zip
rm main.zip
mv jetified-onnxruntime-android-1.17.0-main $onnxruntime_version

export SHERPA_ONNXRUNTIME_LIB_DIR=$dir/$onnxruntime_version/jni/x86/
export SHERPA_ONNXRUNTIME_INCLUDE_DIR=$dir/$onnxruntime_version/headers/
Expand Down

0 comments on commit 5a893d4

Please sign in to comment.