Add nuget package for Windows x86 (#683)
This commit is contained in:
@@ -16,14 +16,15 @@ HF_MIRROR=hf.co
|
||||
mkdir -p /tmp/
|
||||
pushd /tmp
|
||||
|
||||
mkdir -p linux macos windows
|
||||
mkdir -p linux macos windows-x64 windows-x86
|
||||
|
||||
# You can pre-download the required wheels to /tmp
|
||||
src_dir=/tmp
|
||||
|
||||
linux_wheel=$src_dir/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
||||
macos_wheel=$src_dir/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-macosx_11_0_x86_64.whl
|
||||
windows_wheel=$src_dir/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win_amd64.whl
|
||||
windows_x64_wheel=$src_dir/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win_amd64.whl
|
||||
windows_x86_wheel=$src_dir/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win32.whl
|
||||
|
||||
if [ ! -f /tmp/linux/libsherpa-onnx-core.so ]; then
|
||||
echo "---linux x86_64---"
|
||||
@@ -72,13 +73,13 @@ if [ ! -f /tmp/macos/libsherpa-onnx-core.dylib ]; then
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f /tmp/windows/sherpa-onnx-core.dll ]; then
|
||||
if [ ! -f /tmp/windows-x64/sherpa-onnx-core.dll ]; then
|
||||
echo "---windows x64---"
|
||||
cd windows
|
||||
cd windows-x64
|
||||
mkdir -p wheel
|
||||
cd wheel
|
||||
if [ -f $windows_wheel ]; then
|
||||
cp -v $windows_wheel .
|
||||
if [ -f $windows_x64_wheel ]; then
|
||||
cp -v $windows_x64_wheel .
|
||||
else
|
||||
curl -OL https://$HF_MIRROR/csukuangfj/sherpa-onnx-wheels/resolve/main/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win_amd64.whl
|
||||
fi
|
||||
@@ -92,9 +93,29 @@ if [ ! -f /tmp/windows/sherpa-onnx-core.dll ]; then
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [ ! -f /tmp/windows-x86/sherpa-onnx-core.dll ]; then
|
||||
echo "---windows x86---"
|
||||
cd windows-x86
|
||||
mkdir -p wheel
|
||||
cd wheel
|
||||
if [ -f $windows_x86_wheel ]; then
|
||||
cp -v $windows_x86_wheel .
|
||||
else
|
||||
curl -OL https://$HF_MIRROR/csukuangfj/sherpa-onnx-wheels/resolve/main/sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win32.whl
|
||||
fi
|
||||
unzip sherpa_onnx-${SHERPA_ONNX_VERSION}-cp38-cp38-win32.whl
|
||||
cp -v sherpa_onnx-${SHERPA_ONNX_VERSION}.data/data/bin/*.dll ../
|
||||
cp -v sherpa_onnx-${SHERPA_ONNX_VERSION}.data/data/bin/*.lib ../
|
||||
cd ..
|
||||
|
||||
rm -rf wheel
|
||||
ls -lh
|
||||
cd ..
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
mkdir -p macos linux windows all
|
||||
mkdir -p macos linux windows-x64 windows-x86 all
|
||||
|
||||
cp ./online.cs all
|
||||
cp ./offline.cs all
|
||||
@@ -111,7 +132,12 @@ dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
popd
|
||||
|
||||
pushd windows
|
||||
pushd windows-x64
|
||||
dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
popd
|
||||
|
||||
pushd windows-x86
|
||||
dotnet build -c Release
|
||||
dotnet pack -c Release -o ../packages
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user