compile
Manually write compilation scripts
qmake
make
Copy dependent libraries
Reference article:
https://blog.csdn.net/JOBbaba/article/details/124289626
https://zhuanlan.zhihu.com/p/49919048
- Copy system dependent libraries
Write a replication scriptcopy.sh
ldd
- Copy Qt dependent libraries
Mainly, the related dependencies of libqxcb.so need to be copied. Please note that you must specify before executing the cpoy.sh script.
export LD_LIBRARY_PATH=/opt/Qt/5.15.2/gcc_64/lib
Otherwise, the dependencies of libqxcb.so are looked up from the system library by default.
- Copy qml related files
Because QtQuick is used in the program, Quick related files need to be copied to the directory.
Mainly 5 folders:
/opt/Qt/5.15.2/gcc_64/qml/Qt
/opt/Qt/5.15.2/gcc_64/qml/QtGraphicalEffects
/opt/Qt/5.15.2/gcc_64/qml/QtQml
/opt/Qt/5.15.2/gcc_64/qml/QtQuick
/opt/Qt/5.15.2/gcc_64/qml/QtQuick.2
- Write startup script to specify
LD_LIBRARY_PATH
export LD_LIBRARY_PATH=当前目录
- Troubleshoot the problem. Some libraries may still not be found. Note that there may beshortcut libraries.
find /opt -name 库名
cp -r 目录 ./
- ldd confirms and the script is executed
./start.sh
dpkg package
https://blog.csdn.net/weixin_39083202/article/details/106817151