Skip to content

Commit

Permalink
Merge branch 'master' into feature_2922
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetig authored Oct 28, 2020
2 parents 33fa108 + b60a341 commit a7f635e
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 28 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
env:
QT_VERSION: 5.15.1
QTCREATOR_VERSION: 4.13.1
TILED_SNAPSHOT: true

jobs:
appimage:
Expand Down Expand Up @@ -115,12 +116,17 @@ jobs:

strategy:
matrix:
arch: [32, 64]
include:
- arch: 32
openssl_arch: x86
- arch: 64
openssl_arch: x64

env:
QT_TOOLCHAIN: win${{ matrix.arch }}_mingw81
MINGW_VERSION: 8.1.0
MINGW_COMPONENT: win${{ matrix.arch }}_mingw810
OPENSSL_VERSION: 1.1.1

defaults:
run:
Expand All @@ -134,6 +140,7 @@ jobs:
run: |
echo "QT_PATH=$(./dist/install-qt.sh --version ${QT_VERSION} --toolchain ${QT_TOOLCHAIN} qtbase qtdeclarative qtscript qtsvg qtimageformats qttools qttranslations)" >> $GITHUB_ENV
echo "MINGW_PATH=$(./dist/install-qt.sh --version ${MINGW_VERSION} ${MINGW_COMPONENT})" >> $GITHUB_ENV
echo "OPENSSL_PATH=$(./dist/install-qt.sh --version ${OPENSSL_VERSION} openssl --arch ${{ matrix.openssl_arch }})" >> $GITHUB_ENV
./dist/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator >> $GITHUB_PATH
- name: Setup Qbs
Expand All @@ -156,9 +163,16 @@ jobs:
export TILED_MSI_VERSION=1.4.${GITHUB_RUN_NUMBER}
qbs build --all-products config:release projects.Tiled.windowsInstaller:true projects.Tiled.enableZstd:true
mv release/installer*/Tiled-*.msi .
mv release/archive*/Tiled-*.7z .
- name: Upload Tiled installer
uses: actions/upload-artifact@v2
with:
name: Tiled-win${{ matrix.arch }}.msi
path: Tiled-*.msi

- name: Upload Tiled archive
uses: actions/upload-artifact@v2
with:
name: Tiled-win${{ matrix.arch }}.7z
path: Tiled-*.7z
28 changes: 16 additions & 12 deletions dist/distribute.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,23 @@ Product {
condition: qbs.targetOS.contains("windows") && File.exists(prefix)

prefix: {
// Not sure what this check should be exactly, but Qt 5.6.3 was
// built against OpenSSL 1.0.2 whereas Qt 5.12.5 was built against
// OpenSSL 1.1.1.
if (Qt.core.versionMinor >= 12) {
if (qbs.architecture === "x86_64")
return "C:/OpenSSL-v111-Win64/"
else
return "C:/OpenSSL-v111-Win32/"
if (project.openSslPath) {
return project.openSslPath + "/";
} else {
if (qbs.architecture === "x86_64")
return "C:/OpenSSL-Win64/"
else
return "C:/OpenSSL-Win32/"
// Not sure what this check should be exactly, but Qt 5.6.3 was
// built against OpenSSL 1.0.2 whereas Qt 5.12.5 was built against
// OpenSSL 1.1.1.
if (Qt.core.versionMinor >= 12) {
if (qbs.architecture === "x86_64")
return "C:/OpenSSL-v111-Win64/"
else
return "C:/OpenSSL-v111-Win32/"
} else {
if (qbs.architecture === "x86_64")
return "C:/OpenSSL-Win64/"
else
return "C:/OpenSSL-Win32/"
}
}
}
files: {
Expand Down
32 changes: 27 additions & 5 deletions dist/install-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ Options
desktop
win64_mingw73, win64_msvc2017_64 (default)
--arch <arch>
The CPU architecture to use when installing openssl (x86 or x64).
--version <version>
The desired Qt version. Currently supported are all versions
above 5.9.0.
Expand All @@ -111,6 +114,7 @@ COMPONENTS=
VERSION=
FORCE_DOWNLOAD=false
MD5_TOOL=md5sum
ARCH=

case "$OSTYPE" in
*linux*)
Expand Down Expand Up @@ -156,6 +160,10 @@ while [ $# -gt 0 ]; do
TOOLCHAIN=$(echo $2 | tr '[A-Z]' '[a-z]')
shift
;;
--arch)
ARCH="$2"
shift
;;
--version)
VERSION="$2"
shift
Expand Down Expand Up @@ -231,17 +239,30 @@ function compute_url(){
local COMPONENT=$1
local CURL="curl -s -L"
local BASE_URL="http://download.qt.io/online/qtsdkrepository/${HOST_OS}/${TARGET_PLATFORM}"
if [[ "${COMPONENT}" =~ "mingw" ]]; then
if [[ "${COMPONENT}" =~ "qtcreator" ]]; then
REMOTE_BASE="tools_qtcreator/qt.tools.qtcreator"
REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "${VERSION}[0-9\-]*${COMPONENT}\.7z" | tail -1)"

if [ ! -z "${REMOTE_PATH}" ]; then
echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}"
return 0
fi
elif [[ "${COMPONENT}" =~ "mingw" ]]; then
REMOTE_BASE="tools_mingw/qt.tools.${COMPONENT}"
REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "${VERSION}[[:alnum:]_.\-]*rev0.7z" | tail -1)"

if [ ! -z "${REMOTE_PATH}" ]; then
echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}"
return 0
fi
elif [[ "${COMPONENT}" =~ "qtcreator" ]]; then
REMOTE_BASE="tools_qtcreator/qt.tools.qtcreator"
REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "${VERSION}[0-9\-]*${COMPONENT}\.7z" | tail -1)"
elif [[ "${COMPONENT}" =~ "openssl" ]]; then
if [ -z "${ARCH}" ]; then
echo "No architecture specified for openssl (x86 or x64)." >&2
exit 1
fi

REMOTE_BASE="tools_${COMPONENT}_${ARCH}/qt.tools.${COMPONENT}.win_${ARCH}"
REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "[[:alnum:]_.\-]*${ARCH}.7z" | tail -1)"

if [ ! -z "${REMOTE_PATH}" ]; then
echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}"
Expand Down Expand Up @@ -327,6 +348,7 @@ for COMPONENT in ${COMPONENTS}; do
echo "${INSTALL_DIR}/Tools/mingw810_32/bin"
elif [[ "${COMPONENT}" =~ "win64_mingw" ]]; then
echo "${INSTALL_DIR}/Tools/mingw810_64/bin"
elif [[ "${COMPONENT}" =~ "openssl" ]]; then
echo "${INSTALL_DIR}/Tools/OpenSSL/Win_${ARCH}/bin"
fi

done
24 changes: 14 additions & 10 deletions dist/win/installer.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,21 @@ WindowsInstallerPackage {
if (File.exists(Environment.getEnv("PYTHONHOME")))
defs.push("Python");

// Not sure what this check should be exactly, but Qt 5.6.3 was
// built against OpenSSL 1.0.2 whereas Qt 5.12.5 was built against
// OpenSSL 1.1.1.
if (Qt.core.versionMinor >= 12) {
var openSslDir = "C:\\OpenSSL-v111-Win" + bits
if (File.exists(openSslDir))
defs.push("OpenSsl111Dir=" + openSslDir);
if (project.openSslPath) {
defs.push("OpenSsl111Dir=" + project.openSslPath);
} else {
var openSslDir = "C:\\OpenSSL-Win" + bits
if (File.exists(openSslDir))
defs.push("OpenSsl102Dir=" + openSslDir);
// Not sure what this check should be exactly, but Qt 5.6.3 was
// built against OpenSSL 1.0.2 whereas Qt 5.12.5 was built against
// OpenSSL 1.1.1.
if (Qt.core.versionMinor >= 12) {
var openSslDir = "C:\\OpenSSL-v111-Win" + bits
if (File.exists(openSslDir))
defs.push("OpenSsl111Dir=" + openSslDir);
} else {
var openSslDir = "C:\\OpenSSL-Win" + bits
if (File.exists(openSslDir))
defs.push("OpenSsl102Dir=" + openSslDir);
}
}

return defs;
Expand Down
1 change: 1 addition & 0 deletions tiled.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Project {
property bool windowsInstaller: false
property bool enableZstd: false
property bool enableKArchive: false
property string openSslPath: Environment.getEnv("OPENSSL_PATH")

references: [
"dist/archive.qbs",
Expand Down

0 comments on commit a7f635e

Please sign in to comment.