mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-05-06 06:29:35 +00:00
fix static build
This commit is contained in:
parent
1db3644b8f
commit
7f6741fc8f
@ -1,15 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd qtBase
|
declare -a QTLIBS
|
||||||
git clean -xfd
|
|
||||||
|
|
||||||
./configure -confirm-license -release -optimize-size -static -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility
|
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||||
|
QTLIBS=( libQt5Sql.a libQt5Xml.a libQt5Core.a libQt5Test.a libQt5Network.a libQt5Bootstrap.a libQt5Concurrent.a)
|
||||||
|
echo "base dir $BASE_DIR"
|
||||||
|
|
||||||
|
make clean
|
||||||
|
find $BASE_DIR -type f -name 'Makefile' -exec rm {} \;
|
||||||
|
cd $BASE_DIR/qtBase
|
||||||
|
|
||||||
|
for var in "${QTLIBS[@]}"
|
||||||
|
do
|
||||||
|
if [ -e "$BASE_DIR/staticQt/lib/$var" ]
|
||||||
|
then
|
||||||
|
echo "$var - ok"
|
||||||
|
else
|
||||||
|
echo "$var - not exits!. rebuild qt ..."
|
||||||
|
rm -rdf $BASE_DIR/staticQt
|
||||||
|
git clean -xdf
|
||||||
|
./configure -confirm-license -prefix $BASE_DIR/staticQt -release -optimize-size -static -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility
|
||||||
|
make install -j$(nproc)
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
make -j$(nproc)
|
|
||||||
cd ..
|
cd ..
|
||||||
export PATH=$PATH:/qtBase
|
rm -rdf $BASE_DIR/build
|
||||||
|
|
||||||
./qtBase/bin/qmake CQtDeployer.pro
|
export PATH=$PATH:$BASE_DIR/staticQt
|
||||||
|
$BASE_DIR/staticQt/bin/qmake QMAKE_LFLAGS+="-static -static-libgcc -static-libstdc++" CQtDeployer.pro
|
||||||
|
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user