mirror of
https://github.com/QuasarApp/CQtDeployer.git
synced 2025-04-27 02:04:33 +00:00
added shared build
This commit is contained in:
parent
fbe3909fcf
commit
5c4fb0eb7f
2
.gitignore
vendored
2
.gitignore
vendored
@ -50,3 +50,5 @@ CMakeLists.txt.user*
|
||||
snap/\.snapcraft/
|
||||
|
||||
\.buildconfig
|
||||
|
||||
sharedQt/
|
||||
|
@ -39,4 +39,5 @@ DISTFILES += \
|
||||
../snapBuild.sh \
|
||||
../staticBuild.sh \
|
||||
../snap/snapcraft.yaml \
|
||||
../README.md
|
||||
../README.md \
|
||||
../sharedBuild.sh
|
||||
|
@ -88,7 +88,7 @@ bool Deploy::createRunScript() {
|
||||
|
||||
QString content =
|
||||
"#!/bin/sh\n"
|
||||
"BASEDIR=$(dirname $0)\n"
|
||||
"BASE_DIR=$(dirname \"$(readlink -f \"$0\")\")\n"
|
||||
"export LD_LIBRARY_PATH=$BASEDIR/lib:$BASEDIR:$LD_LIBRARY_PATH\n"
|
||||
"export QML_IMPORT_PATH=$BASEDIR/qml:QML_IMPORT_PATH\n"
|
||||
"export QML2_IMPORT_PATH=$BASEDIR/qml:QML2_IMPORT_PATH\n"
|
||||
|
2
qtBase
2
qtBase
@ -1 +1 @@
|
||||
Subproject commit bd42e2f0cebb2fe8de77a054e9d30aa803749a61
|
||||
Subproject commit b0dce506cc91c4b623eb323db7bbc18469e721c2
|
49
sharedBuild.sh
Executable file
49
sharedBuild.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
declare -a QTLIBS
|
||||
|
||||
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
QTLIBS=( libQt5Sql.so libQt5Xml.so libQt5Core.so libQt5Test.so libQt5Network.so libQt5Concurrent.so)
|
||||
|
||||
cd $BASE_DIR/qtBase
|
||||
|
||||
for var in "${QTLIBS[@]}"
|
||||
do
|
||||
if [ -e "$BASE_DIR/sharedQt/lib/$var" ]
|
||||
then
|
||||
echo "$var - ok"
|
||||
else
|
||||
echo "$var - not exits!. rebuild qt ..."
|
||||
|
||||
sudo apt install libpcre2-dev
|
||||
|
||||
rm -rdf $BASE_DIR/sharedQt
|
||||
|
||||
git clean -xdf
|
||||
|
||||
./configure -confirm-license -prefix $BASE_DIR/sharedQt -release -shared -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility
|
||||
|
||||
make install -j$(nproc)
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rdf $BASE_DIR/build
|
||||
|
||||
export PATH=$PATH:$BASE_DIR/sharedQt
|
||||
|
||||
$BASE_DIR/sharedQt/bin/qmake CQtDeployer.pro
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
strip build/*
|
||||
|
||||
chmod +x $BASE_DIR/build/CQtDeployer
|
||||
|
||||
$BASE_DIR/build/CQtDeployer -runScript cqtdeployer.sh -bin $BASE_DIR/build/CQtDeployer -qmake $BASE_DIR/sharedQt/bin/qmake
|
||||
|
||||
tar -czvf $BASE_DIR/build/cqtdeployer.tar.gz $BASE_DIR/build/*
|
||||
|
||||
rm $BASE_DIR/build/lib -rdf $BASE_DIR/build/*.so* $BASE_DIR/build/*.sh*
|
@ -2,32 +2,39 @@
|
||||
|
||||
declare -a QTLIBS
|
||||
|
||||
BASE_DIR=$(dirname $0)
|
||||
BASE_DIR=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
QTLIBS=( libQt5Sql.a libQt5Xml.a libQt5Core.a libQt5Test.a libqtpcre2.a libQt5Network.a libQt5Bootstrap.a libQt5Concurrent.a)
|
||||
|
||||
cd qtBase
|
||||
echo "base dir $BASE_DIR"
|
||||
|
||||
cd $BASE_DIR/qtBase
|
||||
|
||||
for var in "${QTLIBS[@]}"
|
||||
do
|
||||
if [ -e "$BASE_DIR/lib/$var" ]
|
||||
if [ -e "$BASE_DIR/staticQt/lib/$var" ]
|
||||
then
|
||||
echo "$var - ok"
|
||||
else
|
||||
echo "$var - not exits!. rebuild qt ..."
|
||||
|
||||
git clean -xfd
|
||||
rm -rdf $BASE_DIR/staticQt
|
||||
|
||||
git clean -xdf
|
||||
|
||||
./configure -confirm-license -release -optimize-size -static -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility
|
||||
./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 -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
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 CQtDeployer.pro
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user