From 6f99be0128b61f61ba3b735c7fc6e224d74f67e9 Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Wed, 28 Dec 2022 12:59:49 +1100 Subject: [PATCH] Try Qt 5.15.x on AppVeyor and Travis CI #94 --- .appveyor.yml | 8 ++++---- .gitignore | 2 +- .travis.yml | 7 ++----- build.cmd | 18 +++++++++--------- build.sh | 16 ++++++++-------- install.sh | 2 +- qnetworkaccessmanager.patch | 10 +++++----- 7 files changed, 30 insertions(+), 33 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ea7fea54..7802c2b0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,12 +1,12 @@ version: '{branch}-{build}' image: - - Visual Studio 2013 + - Visual Studio 2019 install: - - appveyor DownloadFile https://slproweb.com/download/Win32OpenSSL-1_0_2r.exe - - Win32OpenSSL-1_0_2r.exe /sp- /silent /verysilent /suppressmsgboxes '/DIR=C:\OpenSSL-Win32' - - appveyor DownloadFile http://download.qt.io/archive/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.7z + - appveyor DownloadFile https://slproweb.com/download/Win64OpenSSL-1_1_1s.exe + - Win64OpenSSL-1_1_1s.exe /sp- /silent /verysilent /suppressmsgboxes '/DIR=C:\OpenSSL-Win64-Bipolar' + - appveyor DownloadFile https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip build_script: - build.cmd diff --git a/.gitignore b/.gitignore index 4d6e21ba..8425bdd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ build -qt-everywhere-opensource-src-* +qt-everywhere-src-* diff --git a/.travis.yml b/.travis.yml index e4b8e2ab..8aa04527 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,12 @@ language: cpp os: osx -# Travis' Xcode 6.4 image is the last (and only current) image to provide -# the macosx10.9 and macosx10.10 SDKs, which are supported by Qt 5.5. -osx_image: xcode6.4 +osx_image: xcode13 # Matches Qt 5.15 builds. compiler: clang env: - - MACOS_SDK=macosx10.9 - - MACOS_SDK=macosx10.10 + - MACOS_SDK=macosx12.3 # Matches Qt 5.15 builds. before_install: - xcodebuild -showsdks diff --git a/build.cmd b/build.cmd index d657384e..f2815f0d 100644 --- a/build.cmd +++ b/build.cmd @@ -1,21 +1,21 @@ @echo off :: Prerequisites: -:: * MSVC tool chain; ideally version 10.0, such as Visual C++ Express 2010. +:: * MSVC tool chain; ideally version 14.26, such as Visual Studio 2019. :: * Installed. -:: * OpenSSL (ideally version 1.0.2o, or ABI compatible), headers and binaries installed. -:: * http://slproweb.com/download/Win32OpenSSL-1_0_2p.exe -:: * Qt 5.5.1 source, in the "src" subdirectory. -:: * http://download.qt.io/archive/qt/5.5/5.5.1/single/ +:: * OpenSSL (ideally version 1.1.1j, or ABI compatible), headers and binaries installed. +:: * https://slproweb.com/download/Win64OpenSSL-1_1_1s.exe +:: * Qt 5.15.2 source, in the "src" subdirectory. +:: * https://download.qt.io/archive/qt/5.15/5.15.1/single/ :: The following are all required; adjust to match your setup. set MSVC=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC -set OPENSSL=C:\OpenSSL-Win32 +set OPENSSL=C:\OpenSSL-v111-Win64 set PATCH=C:\Program Files\Git\usr\bin\patch.exe -set QT_VERSION=5.5.1 +set QT_VERSION=5.15.2 set ZIP7=%PROGRAMFILES%\7-zip\7z.exe :: Check the pre-requisites. -if not exist "%OPENSSL%" ( +if not exist "%OPENSSL%\include" ( echo OpenSSL not found. Have you installed OpenSSL for Windows? pause exit 1 @@ -82,7 +82,7 @@ if not exist "%BUILD_DIR%\Makefile" ( -no-widgets^ -nomake examples^ -nomake tools^ - -openssl -I C:\OpenSSL-Win32\include -L C:\OpenSSL-Win32\lib^ + -openssl -I C:\OpenSSL-v111-Win64\include -L C:\OpenSSL-v111-Win64\lib^ -opensource^ -platform win32-msvc2010^ -release^ diff --git a/build.sh b/build.sh index fc3521b8..ad68379a 100755 --- a/build.sh +++ b/build.sh @@ -4,8 +4,8 @@ # * Xcode # -QT_VERSION=5.5.1 # The version used by Polar FlowSync. -QT_NAME="qt-everywhere-opensource-src-$QT_VERSION" +QT_VERSION=5.15.1 # The version used by Polar FlowSync. +QT_NAME="qt-everywhere-src-$QT_VERSION" CP=`which cp` || { echo 'Failed to find: cp' 2>&1; exit 1; } CURL=`which curl` || { echo 'Failed to find: curl' 2>&1; exit 1; } @@ -18,11 +18,11 @@ SELF_DIR=`dirname "$0"` # Fetch the Qt source, if not already present. function fetchSource { - if [ ! -e "$SELF_DIR/$QT_NAME.tar.gz" ]; then - echo "Fetching $QT_NAME.tar.gz" + if [ ! -e "$SELF_DIR/$QT_NAME.tar.xz" ]; then + echo "Fetching $QT_NAME.tar.xz" "$CURL" --location \ - "http://download.qt.io/archive/qt/5.5/$QT_VERSION/single/$QT_NAME.tar.gz" \ - --output "$QT_NAME.tar.gz" + "https://download.qt.io/archive/qt/${QT_VERSION%.*}/${QT_VERSION}/single/${QT_NAME}.tar.xz" \ + --output "$QT_NAME.tar.xz" fi } @@ -30,8 +30,8 @@ function fetchSource { function extractSource { if [ ! -e "$SELF_DIR/$QT_NAME" ]; then fetchSource || return - echo "Extracting $QT_NAME.tar.gz" - "$TAR" xzf "$SELF_DIR/$QT_NAME.tar.gz" -C "$SELF_DIR" || return + echo "Extracting $QT_NAME.tar.xz" + "$TAR" xzf "$SELF_DIR/$QT_NAME.tar.xz" -C "$SELF_DIR" || return fi } diff --git a/install.sh b/install.sh index 4b690689..d1dbaa2c 100755 --- a/install.sh +++ b/install.sh @@ -36,7 +36,7 @@ install_name_tool -id \ # versions set the relevant name to '@rpath/QtCore.framework/Versions/5/QtCore' # so the following `-change` doesn't find anything to change anymore. install_name_tool -change \ - '/usr/local/Qt-5.5.1/lib/QtCore.framework/Versions/5/QtCore' \ + '/usr/local/Qt-5.15.1/lib/QtCore.framework/Versions/5/QtCore' \ '@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore' \ "$TARGET_APP/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork" diff --git a/qnetworkaccessmanager.patch b/qnetworkaccessmanager.patch index 412820c5..f810ed80 100644 --- a/qnetworkaccessmanager.patch +++ b/qnetworkaccessmanager.patch @@ -1,15 +1,15 @@ ---- qtbase\src\network\access\qnetworkaccessmanager.cpp 2013-08-26 04:03:34.000000000 +1000 -+++ qtbase\src\network\access\qnetworkaccessmanager.new 2016-01-27 13:24:14.382664262 +1100 -@@ -71,6 +71,8 @@ +--- qtbase\src\network\access\qnetworkaccessmanager.cpp 2020-09-02 20:15:07.000000000 +1000 ++++ qtbase\src\network\access\qnetworkaccessmanager.new 2022-12-27 17:17:28.577375419 +1100 +@@ -95,6 +95,8 @@ - #include "qthread.h" + #include "qnetconmonitor_p.h" +#include "QtCore/qstandardpaths.h" + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QNetworkAccessFileBackendFactory, fileBackend) -@@ -701,6 +703,67 @@ +@@ -876,6 +878,67 @@ */ QNetworkReply *QNetworkAccessManager::post(const QNetworkRequest &request, QIODevice *data) {