Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <2014500726@smail.xtu.edu.cn>
  • Loading branch information
QQxiaoming committed Jul 27, 2023
1 parent 0d27cc8 commit efa3909
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ export QML2_IMPORT_PATH=$QT_DIR/qml
QFSVIEWER_VERSION="V"$QFSVIEWER_MAJARVERSION$QFSVIEWER_SUBVERSION$QFSVIEWER_REVISION
# 编译
rm -rf .qmake.stash Makefile
qmake ./QFSVIEWER.pro -spec linux-g++ CONFIG+=qtquickcompiler
qmake ./QFSviewer.pro -spec linux-g++ CONFIG+=qtquickcompiler
make clean
make -j8
# clean打包目录
rm -rf ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64
rm -f ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64.deb
rm -rf ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64
rm -f ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64.deb
# 构建打包目录
cp -r ./dpkg/QFSVIEWER ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64
cp -r ./dpkg/QFSVIEWER ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64
# 使用linuxdeployqt拷贝依赖so库到打包目录
export QMAKE=$QT_DIR/bin/qmake
./tools/linuxdeploy-x86_64.AppImage --executable=./build_release/out/QFSVIEWER --appdir=./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt --plugin=qt
rm -rf ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/apprun-hooks
mv ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/usr ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER
mv ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/bin/QFSVIEWER ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/QFSVIEWER
mv ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/bin/qt.conf ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/qt.conf
rm -rf ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/bin
sed -i "s/Prefix = ..\//Prefix = .\//g" ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/qt.conf
chrpath -r "\$ORIGIN/./lib" ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/QFSVIEWER
rm -rf ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/share
cp ./img/ico.png ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/QFSVIEWER.png
mkdir -p ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER
cp -r ./test ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSVIEWER/test
./tools/linuxdeploy-x86_64.AppImage --executable=./build_release/out/QFSviewer --appdir=./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt --plugin=qt
rm -rf ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/apprun-hooks
mv ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/usr ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer
mv ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/bin/QFSviewer ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/QFSviewer
mv ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/bin/qt.conf ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/qt.conf
rm -rf ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/bin
sed -i "s/Prefix = ..\//Prefix = .\//g" ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/qt.conf
chrpath -r "\$ORIGIN/./lib" ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/QFSviewer
rm -rf ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/share
cp ./img/ico.png ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/QFSviewer.png
mkdir -p ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer
cp -r ./test ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/opt/QFSviewer/test
# 配置打包信息
sed -i "s/#VERSION#/$QFSVIEWER_MAJARVERSION.$QFSVIEWER_SUBVERSION$QFSVIEWER_REVISION/g" ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/DEBIAN/control
SIZE=$(du -sh -B 1024 ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64 | sed "s/.\///g")
sed -i "s/#VERSION#/$QFSVIEWER_MAJARVERSION.$QFSVIEWER_SUBVERSION$QFSVIEWER_REVISION/g" ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/DEBIAN/control
SIZE=$(du -sh -B 1024 ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64 | sed "s/.\///g")
InstalledSize=$SIZE
sed -i "s/#SIZE#/$InstalledSize/g" ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/DEBIAN/control
chmod 755 ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64/* -R
sed -i "s/#SIZE#/$InstalledSize/g" ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/DEBIAN/control
chmod 755 ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64/* -R
# 打包
dpkg -b ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64 ./dpkg/QFSVIEWER_Linux_"$QFSVIEWER_VERSION"_x86_64.deb
dpkg -b ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64 ./dpkg/QFSviewer_Linux_"$QFSVIEWER_VERSION"_x86_64.deb
echo build success!
###############################################################################
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit efa3909

Please sign in to comment.