code_app/build.sh

75 lines
1.8 KiB
Bash
Raw Normal View History

2022-05-04 02:12:20 +00:00
echo "Build QT base components require tool 'cbp2make' ..."
2022-05-06 10:20:49 +00:00
if [ -f /usr/bin/cbp2make ]; then
echo "--->installed already, nice."
else
sudo apt-get install cbp2make
fi
2022-05-04 02:12:20 +00:00
systype=`cat /etc/issue | cut -d' ' -f1`
arch=`arch`
system="linux"
echo $systype
echo $arch
if [ ${systype} = "UnionTech" ]
then
system="uos"
elif [ ${systype} = "kylin" ]
then
system="kylin"
fi
echo ${system}
2022-05-05 07:23:13 +00:00
cd ./build/linux/HGBase
cbp2make -targets ${system}_${arch}_Release -in HGBase.cbp -out makefile
2022-05-11 10:42:09 +00:00
make -j6
mv ../../../../release/${system}/${arch}/HGBase.so ../../../../release/${system}/${arch}/libHGBase.so
rm -rf ./bin
rm -rf ./obj
rm -f makefile
2022-05-03 10:25:52 +00:00
cd ../HGImgFmt
2022-05-05 07:23:13 +00:00
cbp2make -targets ${system}_${arch}_Release -in HGImgFmt.cbp -out makefile
2022-05-11 10:42:09 +00:00
make -j6
mv ../../../../release/${system}/${arch}/HGImgFmt.so ../../../../release/${system}/${arch}/libHGImgFmt.so
rm -rf ./bin
rm -rf ./obj
rm -f makefile
2022-05-03 10:25:52 +00:00
cd ../HGImgProc
2022-05-05 07:23:13 +00:00
cbp2make -targets ${system}_${arch}_Release -in HGImgProc.cbp -out makefile
2022-05-11 10:42:09 +00:00
make -j6
mv ../../../../release/${system}/${arch}/HGImgProc.so ../../../../release/${system}/${arch}/libHGImgProc.so
rm -rf ./bin
rm -rf ./obj
rm -f makefile
2022-05-03 10:25:52 +00:00
cd ../HGWebService
2022-05-05 07:23:13 +00:00
cbp2make -targets ${system}_${arch}_Release -in HGWebService.cbp -out makefile
2022-05-11 10:42:09 +00:00
make -j6
rm -rf ./bin
rm -rf ./obj
rm -f makefile
2022-05-04 02:12:20 +00:00
2022-05-05 07:23:13 +00:00
cd ../../../build-qt/HGSolution
cp HGScanner.pro HGScannerBackup.pro
if [ "${1}" == "hw" ]; then
sed -i "s/OEM_HUAGAO/OEM_HANWANG/g" HGScanner.pro
sed -i "s/logo.ico/Hanvon_logo1.ico/g" HGScanner.pro
elif [ "${1}" == "lsc" ]; then
sed -i "s/OEM_HUAGAO/OEM_LISICHEN/g" HGScanner.pro
sed -i "s/logo.ico/Lanxum_logo.ico/g" HGScanner.pro
fi
qmake -makefile HGScanner.pro
2022-05-11 10:42:09 +00:00
make -j6
rm -f *.o
rm -f *.h
rm -f *.cpp
rm -f .qmake.stash
rm -f Makefile
rm -f HGScanner.pro
mv HGScannerBackup.pro HGScanner.pro
2022-05-06 10:20:49 +00:00