add TWAIN components to package

This commit is contained in:
gb 2023-07-19 09:21:58 +08:00
parent 609ce7157b
commit 4cfd69b7d1
1 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,6 @@
# usage: build.sh oem os password twain
# the last parameter 'twain' is optional for building twain-ui, added on 2023-07-18
oem=$1 #厂商
password="hg123123" #电脑密码
cpu=$(arch) #cpu架构
@ -122,6 +125,9 @@ function appbuild()
./../code_app/build.sh ${oem%${oem:0-2:2}*}
else
./../code_app/build.sh $oem
#if [ "${4}" == "twain" ]; then
./../code_app/build.sh ${oem}twain
#fi
echo ""
fi
echo "-----------------------------over code_app build-----------------------------"
@ -382,6 +388,11 @@ rm dpkg/$dpkgtype/$oem/etc/udev/rules.d/*
cp dpkg/60-sane.rules dpkg/$dpkgtype/$oem/etc/udev/rules.d/60-"$oem"sane.rules
# make directory for TWAIN components ...
mkdir dpkg/$dpkgtype/$oem/usr/local
mkdir dpkg/$dpkgtype/$oem/usr/local/lib
mkdir dpkg/$dpkgtype/$oem/usr/local/lib/twain
if [ "${oem:0-2:2}" != "so" ] && [ "${oem:0-3:3}" != "web" ];
then
#创建sane的文件目录 //必须保证这一步成功
@ -401,6 +412,10 @@ then
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/lib/$libpath/sane/libsane-"$sanelibname"sane.so.1
#if [ "${4}" == "twain" ]; then
cp release/$syspath/$cpu/libtwaindsm.so dpkg/$dpkgtype/$oem/usr/local/lib/libtwaindsm.so
cp release/$syspath/$cpu/lib${oem}twain*.ds dpkg/$dpkgtype/$oem/usr/local/lib/twain/
#fi
if [ $? -ne 0 ];then
echo "copy libsane file fail sane name is :libsane-"$sanelibname"sane.so!!!"
@ -416,6 +431,10 @@ then
exit 1
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/lib/"mips64el-linux-gnuabi64"/sane/libsane-"$sanelibname"sane.so.1
#if [ "${4}" == "twain" ]; then
cp release/$syspath/$cpu/libtwaindsm.so dpkg/$dpkgtype/$oem/usr/local/lib/libtwaindsm.so
cp release/$syspath/$cpu/lib${oem}twain*.ds dpkg/$dpkgtype/$oem/usr/local/lib/twain/
#fi
if [ $? -ne 0 ];then
echo "copy libsane file fail sane name is :libsane-"$sanelibname"sane.so!!!"
@ -447,6 +466,10 @@ else
mkdir -p "dpkg/$syspath/$oem/usr/local/lib/sane/"
fi
cp release/$syspath/$cpu/libsane-"$sanelibname"sane.so dpkg/$dpkgtype/$oem/usr/local/lib/sane/libsane-"$sanelibname"sane.so.1
#if [ "${4}" == "twain" ]; then
cp release/$syspath/$cpu/libtwaindsm.so dpkg/$dpkgtype/$oem/usr/local/lib/libtwaindsm.so
cp release/$syspath/$cpu/lib${oem}twain*.ds dpkg/$dpkgtype/$oem/usr/local/lib/twain/
#fi
fi
savedpkgpath="dpkg/$dpkgtype/$oem/opt/apps/$dpkgpath"
echo $dpkgpath