From 8511183b5d29d1b332296ebd348fa6a56a89dfa9 Mon Sep 17 00:00:00 2001 From: Andrei Date: Sat, 6 Apr 2019 21:55:53 +0300 Subject: [PATCH] test build on 5.12.2 --- .gitignore | 3 + CQtDeployer.pro | 7 +- CQtDeployer/CQtDeployer.pro | 2 +- Deploy/Deploy.pro | 2 +- qtBase | 2 +- sharedBuild.sh | 3 +- ...ildCrossWin.sh => sharedBuildCrossWin64.sh | 22 ++--- staticBuild.sh | 2 +- staticBuildCrossWin32.sh | 85 +++++++++++++++++++ ...ildCrossWin.sh => staticBuildCrossWin64.sh | 3 +- tests/TestQMLWidgets/TestQMLWidgets.pro | 2 +- tests/TestQtWidgets/TestQtWidgets.pro | 2 +- 12 files changed, 115 insertions(+), 20 deletions(-) rename sharedBuildCrossWin.sh => sharedBuildCrossWin64.sh (81%) create mode 100755 staticBuildCrossWin32.sh rename staticBuildCrossWin.sh => staticBuildCrossWin64.sh (96%) diff --git a/.gitignore b/.gitignore index ee3ca77..0fd002c 100644 --- a/.gitignore +++ b/.gitignore @@ -54,10 +54,13 @@ snap/\.snapcraft/ \.buildconfig sharedQt/ +sharedQtWin32/ +sharedQtWin64/ distro/ staticQt/ +staticQtWin32/ staticQtWin64/ build UnitTests/release/* diff --git a/CQtDeployer.pro b/CQtDeployer.pro index 37013b0..9db5f9a 100644 --- a/CQtDeployer.pro +++ b/CQtDeployer.pro @@ -40,6 +40,9 @@ DISTFILES += \ README.md \ sharedBuild.sh \ README.md \ - staticBuildCrossWin.sh \ + staticBuildCrossWin32.sh \ + staticBuildCrossWin64.sh \ sharedBuild.bat \ - sharedBuildCrossWin.sh + sharedBuildCrossWin32.sh \ + sharedBuildCrossWin64.sh + diff --git a/CQtDeployer/CQtDeployer.pro b/CQtDeployer/CQtDeployer.pro index f53668a..88ad885 100644 --- a/CQtDeployer/CQtDeployer.pro +++ b/CQtDeployer/CQtDeployer.pro @@ -7,7 +7,7 @@ QT -= gui -CONFIG += c++14 console +CONFIG += c++17 console CONFIG -= app_bundle # The following define makes your compiler emit warnings if you use diff --git a/Deploy/Deploy.pro b/Deploy/Deploy.pro index 7d0591b..a4d5866 100644 --- a/Deploy/Deploy.pro +++ b/Deploy/Deploy.pro @@ -13,7 +13,7 @@ #------------------------------------------------- QT -= gui - +CONFIG += c++17 TARGET = Deploy TEMPLATE = lib diff --git a/qtBase b/qtBase index 08de243..856fb1a 160000 --- a/qtBase +++ b/qtBase @@ -1 +1 @@ -Subproject commit 08de243eaa007597c2bfbc97d3d14e2f821ac4be +Subproject commit 856fb1ab44722f5165fb6b5dec0bd748006acd10 diff --git a/sharedBuild.sh b/sharedBuild.sh index 9f9a912..98aa793 100755 --- a/sharedBuild.sh +++ b/sharedBuild.sh @@ -48,7 +48,8 @@ else 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 + git checkout v5.12.2 + ./configure -confirm-license -prefix $BASE_DIR/sharedQt -release -shared -no-opengl -no-openssl -opensource -nomake tests -nomake examples -qt-pcre -no-gui -no-widgets -no-dbus -no-accessibility make install -j$(nproc) break fi diff --git a/sharedBuildCrossWin.sh b/sharedBuildCrossWin64.sh similarity index 81% rename from sharedBuildCrossWin.sh rename to sharedBuildCrossWin64.sh index 59f8f7a..6d04e40 100755 --- a/sharedBuildCrossWin.sh +++ b/sharedBuildCrossWin64.sh @@ -45,18 +45,20 @@ cd $BASE_DIR/qtBase for var in "${QTLIBS[@]}" do if [ -e "$BASE_DIR/$QT_DIR/lib/$var" ] - then - echo "$var - ok" - else - echo "$var - not exits!. rebuild qt ..." + then + echo "$var - ok" + else + echo "$var - not exits!. rebuild qt ..." rm -rdf $BASE_DIR/$QT_DIR - git clean -xdf - ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32- -confirm-license -prefix $BASE_DIR/$QT_DIR -release -qt-pcre -optimize-size -shared -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility + git clean -xdf + git checkout v5.12.2 + + ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32- -confirm-license -prefix $BASE_DIR/$QT_DIR -release -optimize-size -shared -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility make install -j$(nproc) - break - fi + break + fi done - + cd .. rm -rdf $BASE_DIR/build @@ -66,7 +68,7 @@ $BASE_DIR/$QT_DIR/bin/qmake -r $BASE_DIR/CQtDeployer.pro make -j$(nproc) if [ $? -eq 0 ] -then +then echo "" echo "Build is successfully completed!" else diff --git a/staticBuild.sh b/staticBuild.sh index 356fbcf..7e01bf5 100755 --- a/staticBuild.sh +++ b/staticBuild.sh @@ -54,7 +54,7 @@ do echo "$var - not exits!. rebuild qt ..." rm -rdf $BASE_DIR/$QT_DIR git clean -xdf - git checkout . + git checkout v5.12.2 ./configure -confirm-license -prefix $BASE_DIR/$QT_DIR -release -static -optimize-size -qt-pcre -qt-zlib -no-opengl -no-openssl -opensource -nomake tests -nomake examples -no-gui -no-widgets -no-dbus -no-accessibility make install -j$(nproc) break diff --git a/staticBuildCrossWin32.sh b/staticBuildCrossWin32.sh new file mode 100755 index 0000000..82ea278 --- /dev/null +++ b/staticBuildCrossWin32.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +# +# Copyright (C) 2018-2019 QuasarApp. +# Distributed under the lgplv3 software license, see the accompanying +# Everyone is permitted to copy and distribute verbatim copies +# of this license document, but changing it is not allowed. +# + +IS_SNAP="$1" +QT_DIR=staticQtWin32 + +if [ -e "$PREFIX"] +then + echo "build for snap" + SNAP_DEFINES="$IS_SNAP" +fi + +declare -a QTLIBS + +BASE_DIR=$(dirname "$(readlink -f "$0")") +QTLIBS=( libQt5Sql.a libQt5Xml.a libQt5Core.a libQt5Test.a libQt5Network.a libQt5Bootstrap.a libQt5Concurrent.a) + +RELEASE_DIR=$BASE_DIR/distro + +if [ -e "$PREFIX"] +then + echo "PREFIX is empty, use default install path $RELEASE_DIR" +else + echo "use PREFIX path!" + RELEASE_DIR=$PREFIX +fi + +cd $BASE_DIR + +#git submodule update --init --recursive + +make clean +find $BASE_DIR -type f -name 'Makefile' -exec rm {} \; +rm $BASE_DIR/QuasarAppLib/Makefile.QuasarApp +rm -rdf $RELEASE_DIR + +cd $BASE_DIR/qtBase + +for var in "${QTLIBS[@]}" +do + if [ -e "$BASE_DIR/$QT_DIR/lib/$var" ] + then + echo "$var - ok" + else + echo "$var - not exits!. rebuild qt ..." + rm -rdf $BASE_DIR/$QT_DIR + git clean -xdf + git checkout v5.11.3 + ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -confirm-license -prefix $BASE_DIR/$QT_DIR -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 + +cd .. +rm -rdf $BASE_DIR/build + +export PATH=$PATH:$BASE_DIR/$QT_DIR +$BASE_DIR/$QT_DIR/bin/qmake QMAKE_LFLAGS+="-static" -r $BASE_DIR/CQtDeployer.pro + +make -j$(nproc) + +if [ $? -eq 0 ] +then + echo "" + echo "Build is successfully completed!" +else + echo "" + echo "Build is failed!" >&2 + exit 1 +fi + +mkdir -p $RELEASE_DIR + +cp $BASE_DIR/build/release/cqtdeployer $RELEASE_DIR/ + +strip $RELEASE_DIR/* + + diff --git a/staticBuildCrossWin.sh b/staticBuildCrossWin64.sh similarity index 96% rename from staticBuildCrossWin.sh rename to staticBuildCrossWin64.sh index e25a71f..3c69771 100755 --- a/staticBuildCrossWin.sh +++ b/staticBuildCrossWin64.sh @@ -50,7 +50,8 @@ do else echo "$var - not exits!. rebuild qt ..." rm -rdf $BASE_DIR/$QT_DIR - git clean -xdf + git clean -xdf + git checkout v5.11.3 ./configure -xplatform win32-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32- -confirm-license -prefix $BASE_DIR/$QT_DIR -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 diff --git a/tests/TestQMLWidgets/TestQMLWidgets.pro b/tests/TestQMLWidgets/TestQMLWidgets.pro index 39157d1..9f1c77e 100644 --- a/tests/TestQMLWidgets/TestQMLWidgets.pro +++ b/tests/TestQMLWidgets/TestQMLWidgets.pro @@ -1,5 +1,5 @@ QT += quick -CONFIG += c++11 +CONFIG += c++17 # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings diff --git a/tests/TestQtWidgets/TestQtWidgets.pro b/tests/TestQtWidgets/TestQtWidgets.pro index f64a23b..f1e229f 100644 --- a/tests/TestQtWidgets/TestQtWidgets.pro +++ b/tests/TestQtWidgets/TestQtWidgets.pro @@ -22,7 +22,7 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -CONFIG += c++11 +CONFIG += c++17 SOURCES += \ main.cpp \