From 8e81703b91b995cf07477bc7b35799916ee89e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Tue, 3 Dec 2024 16:24:20 +0100 Subject: [PATCH] CI: Updated builds to Qt 6.8.1 (#4110) Replaced install-qt.sh with aqtinstall, since aqtinstall has already been patched to be able to install Qt 6.8.1. It appears to require reading a destination path from an XML file, which is getting a bit much for a shell script. The Qt 6 AppImage builds are now done on Ubuntu 22.04, since the latest aqtinstall needed a more recent Python version. This required installing libfuse2 explicitly, to allow the linuxdeploy AppImage to run. The Qt 5 AppImage is now being built by Qbs 1.13. This is the oldest supported version of Qbs so it's good as additional test case. --- .github/workflows/packages.yml | 69 +++-- dist/install-qt.sh | 462 --------------------------------- 2 files changed, 45 insertions(+), 486 deletions(-) delete mode 100755 dist/install-qt.sh diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 5098cfe612..402745dab8 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -40,21 +40,28 @@ jobs: linux: name: Linux (AppImage, Qt ${{ matrix.qt_version_major }}) - runs-on: ubuntu-20.04 + runs-on: ubuntu-${{ matrix.ubuntu_version }} needs: version strategy: matrix: include: - - qt_version: 5.15.2 + - ubuntu_version: 20.04 + qt_version: 5.15.2 qt_version_major: 5 - - qt_version: 6.8.0 + qt_arch: gcc_64 + qt_install_args: "" + qbs_default_profile: gcc + - ubuntu_version: 22.04 + qt_version: 6.8.1 qt_version_major: 6 + qt_arch: linux_gcc_64 + qt_install_args: "--modules qtimageformats" + qbs_default_profile: x86_64-linux-gnu-gcc-11 env: TILED_VERSION: ${{ needs.version.outputs.version }} QT_VERSION: ${{ matrix.qt_version }} - QTCREATOR_VERSION: 14.0.2 steps: - name: Checkout repository @@ -75,12 +82,15 @@ jobs: libxcb-shape0 \ libxcb-xinerama0 \ libxkbcommon-x11-0 \ - libzstd-dev + libzstd-dev \ + qbs \ + libfuse2 - name: Install Qt run: | - ./dist/install-qt.sh --version ${QT_VERSION} qtbase qtdeclarative qtsvg qtimageformats qttools qttranslations icu | tee -a $GITHUB_PATH - ./dist/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator | tee -a $GITHUB_PATH + pip install aqtinstall + aqt install-qt linux desktop ${QT_VERSION} ${{ matrix.qt_arch }} ${{ matrix.qt_install_args }} --outputdir /opt/Qt + echo "/opt/Qt/${QT_VERSION}/gcc_64/bin" | tee -a $GITHUB_PATH - name: Setup ccache uses: hendrikmuhs/ccache-action@v1 @@ -96,7 +106,7 @@ jobs: run: | qbs --version qbs setup-toolchains --detect - qbs config defaultProfile x86_64-linux-gnu-gcc-10 + qbs config defaultProfile ${{ matrix.qbs_default_profile }} - name: Build Sentry Native run: | @@ -192,16 +202,19 @@ jobs: matrix: include: - qt_version: 5.12.12 + qt_dir: "clang_64" + qt_install_args: "" version_suffix: "10.12-10.15" architectures: x86_64 - - qt_version: 6.8.0 + - qt_version: 6.8.1 + qt_dir: "macos" + qt_install_args: "--modules qtimageformats" version_suffix: "11+" architectures: x86_64,arm64 env: TILED_VERSION: ${{ needs.version.outputs.version }} QT_VERSION: ${{ matrix.qt_version }} - QTCREATOR_VERSION: 14.0.2 steps: - name: Checkout repository @@ -209,11 +222,13 @@ jobs: - name: Install Qt run: | - sudo ./dist/install-qt.sh --version ${QT_VERSION} qtbase qtdeclarative qtsvg qtimageformats qttools | tee -a $GITHUB_PATH - sudo ./dist/install-qt.sh --version ${QTCREATOR_VERSION} qtcreator | tee -a $GITHUB_PATH + pip install aqtinstall + sudo aqt install-qt mac desktop ${QT_VERSION} clang_64 ${{ matrix.qt_install_args }} --outputdir /opt/Qt + echo "/opt/Qt/${QT_VERSION}/${{ matrix.qt_dir }}/bin" | tee -a $GITHUB_PATH - name: Setup Qbs run: | + brew install qbs qbs setup-toolchains --detect qbs config defaultProfile xcode @@ -280,26 +295,31 @@ jobs: include: - qt_version: 5.15.2 qt_version_major: 5 - qt_toolchain: win32_mingw81 + qt_arch: win32_mingw81 + qt_dir: mingw81_32 + qt_install_args: "" arch: 32 openssl_arch: x86 filename_suffix: 'Windows-7-8_x86' - mingw_version: 8.1.0 - mingw_component: mingw - mingw_path: /c/Qt/Tools/mingw810_32/bin - - qt_version: 6.8.0 + mingw_component: tools_mingw + mingw_variant: qt.tools.win32_mingw810 + mingw_dir: mingw810_32 + - qt_version: 6.8.1 qt_version_major: 6 - qt_toolchain: win64_mingw + qt_arch: win64_mingw + qt_dir: mingw_64 + qt_install_args: "--modules qtimageformats" arch: 64 openssl_arch: x64 filename_suffix: 'Windows-10+_x86_64' - mingw_version: 13.1.0 - mingw_component: mingw1310 - mingw_path: /c/Qt/Tools/mingw1310_64/bin + mingw_component: tools_mingw1310 + mingw_variant: qt.tools.win64_mingw1310 + mingw_dir: mingw1310_64 env: TILED_VERSION: ${{ needs.version.outputs.version }} - MINGW_PATH: ${{ matrix.mingw_path }} + MINGW_PATH: /c/Qt/Tools/${{ matrix.mingw_dir }}/bin + QT_PATH: "/c/Qt/${{ matrix.qt_version }}/${{ matrix.qt_dir }}/bin" defaults: run: @@ -311,8 +331,9 @@ jobs: - name: Install Qt run: | - echo "QT_PATH=$(./dist/install-qt.sh --version ${{ matrix.qt_version }} --toolchain ${{ matrix.qt_toolchain }} qtbase qtdeclarative qtsvg qtimageformats qttools qttranslations)" >> $GITHUB_ENV - ./dist/install-qt.sh --version ${{ matrix.mingw_version }} --toolchain win${{ matrix.arch }}_mingw ${{ matrix.mingw_component }} + pip install aqtinstall + aqt install-qt windows desktop ${{ matrix.qt_version }} ${{ matrix.qt_arch }} ${{ matrix.qt_install_args }} --outputdir /c/Qt + aqt install-tool windows desktop ${{ matrix.mingw_component }} ${{ matrix.mingw_variant }} --outputdir /c/Qt - name: Install Qbs run: | diff --git a/dist/install-qt.sh b/dist/install-qt.sh deleted file mode 100755 index d5753021e2..0000000000 --- a/dist/install-qt.sh +++ /dev/null @@ -1,462 +0,0 @@ -#!/usr/bin/env bash -############################################################################# -## -## Copyright (C) 2019 Richard Weickelt. -## Contact: https://www.qt.io/licensing/ -## -## This file is part of Qbs. -## -## $QT_BEGIN_LICENSE:LGPL$ -## Commercial License Usage -## Licensees holding valid commercial Qt licenses may use this file in -## accordance with the commercial license agreement provided with the -## Software or, alternatively, in accordance with the terms contained in -## a written agreement between you and The Qt Company. For licensing terms -## and conditions see https://www.qt.io/terms-conditions. For further -## information use the contact form at https://www.qt.io/contact-us. -## -## GNU Lesser General Public License Usage -## Alternatively, this file may be used under the terms of the GNU Lesser -## General Public License version 3 as published by the Free Software -## Foundation and appearing in the file LICENSE.LGPL3 included in the -## packaging of this file. Please review the following information to -## ensure the GNU Lesser General Public License version 3 requirements -## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -## -## GNU General Public License Usage -## Alternatively, this file may be used under the terms of the GNU -## General Public License version 2.0 or (at your option) the GNU General -## Public license version 3 or any later version approved by the KDE Free -## Qt Foundation. The licenses are as published by the Free Software -## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -## included in the packaging of this file. Please review the following -## information to ensure the GNU General Public License requirements will -## be met: https://www.gnu.org/licenses/gpl-2.0.html and -## https://www.gnu.org/licenses/gpl-3.0.html. -## -## $QT_END_LICENSE$ -## -############################################################################# -set -eu - -function help() { - cat < - Root directory where to install the components. - Maps to C:/Qt on Windows, /opt/Qt on Linux, /usr/local/Qt on Mac - by default. - - -f, --force - Force download and do not attempt to re-use an existing installation. - - --host - The host operating system. Can be one of linux_x64, mac_x64, - windows_x86. Auto-detected by default. - - --target - The desired target platform. Can be one of desktop, android, ios. - The default value is desktop. - - --toolchain - The toolchain that has been used to build the binaries. - Possible values depend on --host and --target, respectively: - - linux_x64 - android - any, android_armv7, android_arm64_v8a - desktop - gcc_64 (default) - - mac_x64 - android - any, android_armv7, android_arm64_v8a - desktop - clang_64 (default) - ios - ios - - windows_x86 - android - any, android_armv7, android_arm64_v8a - desktop - win64_mingw73, win64_mingw81, win64_mingw, - win64_msvc2015_64 (default), win64_msvc2017_64, - win64_msvc2019_64, win64_msvc2019_arm64 - - --arch - The CPU architecture to use when installing opensslv3 (x86 or x64). - - --version - The desired Qt version. Currently supported are all versions - above 5.9.0. - -EOF -} - -TARGET_PLATFORM=desktop -COMPONENTS= -VERSION= -FORCE_DOWNLOAD=false -MD5_TOOL=md5sum -ARCH= - -case "$OSTYPE" in - *linux*) - HOST_OS=linux_x64 - INSTALL_DIR=/opt/Qt - TOOLCHAIN=gcc_64 - ;; - *darwin*) - HOST_OS=mac_x64 - INSTALL_DIR=/usr/local/Qt - TOOLCHAIN=clang_64 - MD5_TOOL="md5 -r" - ;; - msys) - HOST_OS=windows_x86 - INSTALL_DIR=/c/Qt - TOOLCHAIN=win64_msvc2015_64 - ;; - *) - HOST_OS= - INSTALL_DIR= - ;; -esac - -while [ $# -gt 0 ]; do - case "$1" in - --directory|-d) - INSTALL_DIR="$2" - shift - ;; - --force|-f) - FORCE_DOWNLOAD=true - ;; - --host) - HOST_OS="$2" - shift - ;; - --target) - TARGET_PLATFORM="$2" - shift - ;; - --toolchain) - TOOLCHAIN=$(echo $2 | tr '[:upper:]' '[:lower:]') - shift - ;; - --arch) - ARCH="$2" - shift - ;; - --version) - VERSION="$2" - shift - ;; - --help|-h) - help - exit 0 - ;; - *) - COMPONENTS="${COMPONENTS} $1" - ;; - esac - shift -done - -if [ -z "${HOST_OS}" ]; then - echo "No --host specified or auto-detection failed." >&2 - exit 1 -fi - -if [ -z "${INSTALL_DIR}" ]; then - echo "No --directory specified or auto-detection failed." >&2 - exit 1 -fi - -if [ -z "${VERSION}" ]; then - echo "No --version specified." >&2 - exit 1 -fi - -if [ -z "${COMPONENTS}" ]; then - echo "No components specified." >&2 - exit 1 -fi - -case "$TARGET_PLATFORM" in - android) - ;; - ios) - ;; - desktop) - ;; - wasm) - ;; - *) - echo "Error: TARGET_PLATFORM=${TARGET_PLATFORM} is not valid." >&2 - exit 1 - ;; -esac - -HASH=$(echo "${OSTYPE} ${TARGET_PLATFORM} ${TOOLCHAIN} ${VERSION} ${INSTALL_DIR}" | ${MD5_TOOL} | head -c 16) -HASH_FILEPATH="${INSTALL_DIR}/${HASH}.manifest" -INSTALLATION_IS_VALID=false -if ! ${FORCE_DOWNLOAD} && [ -f "${HASH_FILEPATH}" ]; then - INSTALLATION_IS_VALID=true - while read filepath; do - if [ ! -e "${filepath}" ]; then - INSTALLATION_IS_VALID=false - break - fi - done <"${HASH_FILEPATH}" -fi - -if ${INSTALLATION_IS_VALID}; then - echo "Already installed. Skipping download." >&2 - exit 0 -fi - -MIRRORS="\ - http://ftp.acc.umu.se/mirror/qt.io/qtproject \ - http://ftp.fau.de/qtproject \ - http://download.qt.io \ -" - -for MIRROR in ${MIRRORS}; do - if curl "${MIRROR}/online" -s -f -o /dev/null; then - break; - else - echo "Server ${MIRROR} not availabe. Trying next alternative..." >&2 - MIRROR="" - fi -done - -DOWNLOAD_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'install-qt'` - -function version { - echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; -} - -# -# The repository structure is a mess. Try different URL variants -# -function compute_url(){ - local COMPONENT=$1 - local CURL="curl -s -L" - local BASE_URL="${MIRROR}/online/qtsdkrepository/${HOST_OS}/${TARGET_PLATFORM}" - local ANDROID_ARCH=$(echo ${TOOLCHAIN##android_}) - - if [[ "${COMPONENT}" =~ "qtcreator" ]]; then - - if [[ "${HOST_OS}" == "windows_x86" ]]; then - # newer QtC versions do not supported x86 version anymore - HOST_OS="windows_x64" - fi - - SHORT_VERSION=${VERSION%??} - BASE_URL="${MIRROR}/official_releases/qtcreator" - REMOTE_PATH="${SHORT_VERSION}/${VERSION}/installer_source/${HOST_OS}/qtcreator.7z" - echo "${BASE_URL}/${REMOTE_PATH}" - return 0 - elif [[ "${COMPONENT}" =~ "mingw" ]]; then - REMOTE_BASE="tools_${COMPONENT}/qt.tools.${TOOLCHAIN}${VERSION//./}" - - REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "[[:alnum:]_.\-]*7z" | grep -v "meta" | head -1)" - if [ ! -z "${REMOTE_PATH}" ]; then - echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}" - return 0 - fi - elif [[ "${COMPONENT}" =~ "opensslv3" ]]; then - if [ -z "${ARCH}" ]; then - echo "No architecture specified for opensslv3 (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}" - return 0 - fi - else - if [ "$(version "${VERSION}")" -ge "$(version "6.7.0")" ]; then - if [ "${TOOLCHAIN}" == "gcc_64" ]; then - TOOLCHAIN="linux_gcc_64" - fi - fi - - REMOTE_BASES=( - # New repository format (>=6.8.0) - "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" - "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - "qt6_${VERSION//./}/qt6_${VERSION//./}/qt.qt6.${VERSION//./}.addons.${COMPONENT}.${TOOLCHAIN}" - # New repository format (>=6.0.0) - "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" - "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${HOST_OS//_x64/}_${TOOLCHAIN}" - "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.${COMPONENT}.${HOST_OS//_x64/}_${TOOLCHAIN}" - "qt6_${VERSION//./}/qt.qt6.${VERSION//./}.addons.${COMPONENT}.${TOOLCHAIN}" - "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" - "qt6_${VERSION//./}_${ANDROID_ARCH}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${TOOLCHAIN}" - "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${COMPONENT}" - "qt${VERSION//./_}/qt6_${VERSION//./}_${TOOLCHAIN}/qt.qt6.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - # New repository format (>=5.9.6) - "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${TOOLCHAIN}" - "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - # Multi-abi Android since 5.14 - "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${TARGET_PLATFORM}" - "qt5_${VERSION//./}/qt.qt5.${VERSION//./}.${COMPONENT}.${TARGET_PLATFORM}" - # Older repository format (<5.9.0) - "qt5_${VERSION//./}/qt.${VERSION//./}.${TOOLCHAIN}" - "qt5_${VERSION//./}/qt.${VERSION//./}.${COMPONENT}.${TOOLCHAIN}" - ) - - for REMOTE_BASE in ${REMOTE_BASES[*]}; do - REMOTE_PATH="$(${CURL} ${BASE_URL}/${REMOTE_BASE}/ | grep -o -E "[[:alnum:]_.\-]*7z" | grep "${COMPONENT}" | tail -1)" - if [ ! -z "${REMOTE_PATH}" ]; then - echo "${BASE_URL}/${REMOTE_BASE}/${REMOTE_PATH}" - return 0 - fi - done - fi - - echo "Could not determine a remote URL for ${COMPONENT} with version ${VERSION}">&2 - exit 1 -} - -mkdir -p ${INSTALL_DIR} -rm -f "${HASH_FILEPATH}" - -for COMPONENT in ${COMPONENTS}; do - - if [[ "${COMPONENT}" =~ "qtcreator" ]] && [[ "${HOST_OS}" != "mac_x64" ]]; then - UNPACK_DIR="${INSTALL_DIR}/Tools/QtCreator" - mkdir -p ${UNPACK_DIR} - else - UNPACK_DIR="${INSTALL_DIR}" - fi - - if [ "$(version "${VERSION}")" -ge "$(version "6.0.0")" ]; then - if [[ "${COMPONENT}" =~ "qtscript" ]] || [[ "${COMPONENT}" =~ "qtscxml" ]] || [[ "${COMPONENT}" =~ "qtx11extras" ]]; then - echo "Component ${COMPONENT} was removed in Qt6, skipping" >&2 - continue - fi - if [[ "${COMPONENT}" =~ "icu" ]] && [[ "${TARGET_PLATFORM}" =~ "wasm" ]]; then - echo "Component ${COMPONENT} is not present in Qt6 (${TARGET_PLATFORM}), skipping" >&2 - continue - fi - else - if [[ "${COMPONENT}" =~ "qt5compat" ]]; then - echo "Component ${COMPONENT} is not present in Qt ${VERSION}, skipping" >&2 - continue - fi - fi - - URL="$(compute_url ${COMPONENT})" - echo "Downloading ${COMPONENT} ${URL}..." >&2 - curl --progress-bar -L -o ${DOWNLOAD_DIR}/package.7z ${URL} >&2 - 7z x -y -o${UNPACK_DIR} ${DOWNLOAD_DIR}/package.7z >/dev/null 2>&1 - 7z l -ba -slt -y ${DOWNLOAD_DIR}/package.7z | tr '\\' '/' | sed -n -e "s|^Path\ =\ |${UNPACK_DIR}/|p" >> "${HASH_FILEPATH}" 2>/dev/null - rm -f ${DOWNLOAD_DIR}/package.7z - - # - # conf file is needed for qmake - # - if [ "${COMPONENT}" == "qtbase" ]; then - if [[ "${TOOLCHAIN}" =~ "win64_mingw" ]]; then - SUBDIR="${TOOLCHAIN/win64_/}_64" - elif [[ "${TOOLCHAIN}" =~ "win32_mingw" ]]; then - SUBDIR="${TOOLCHAIN/win32_/}_32" - elif [[ "${TOOLCHAIN}" =~ "win64_msvc" ]]; then - SUBDIR="${TOOLCHAIN/win64_/}" - elif [[ "${TOOLCHAIN}" =~ "win32_msvc" ]]; then - SUBDIR="${TOOLCHAIN/win32_/}" - elif [[ "${TOOLCHAIN}" =~ "any" ]] && [[ "${TARGET_PLATFORM}" == "android" ]]; then - SUBDIR="android" - elif [[ "${HOST_OS}" == "mac_x64" ]] && [[ ! "${VERSION}" < "6.1.2" ]] && [[ "${TARGET_PLATFORM}" == "desktop" ]]; then - SUBDIR="macos" - else - SUBDIR="${TOOLCHAIN}" - fi - - if [ "${TARGET_PLATFORM}" == "android" ] && [ ! "${VERSION}" \< "6.0.0" ]; then - CONF_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/target_qt.conf" - ANDROID_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/qmake" - if [ "${TOOLCHAIN}" == "android_armv7" ] && [ ! "${VERSION}" \< "6.4.2" ]; then - sed -i "s/\r//" "${CONF_FILE}" - sed -i "s|HostLibraryExecutables=.\/bin|HostLibraryExecutables=.\/libexec|g" "${CONF_FILE}" - chmod +x "${ANDROID_QMAKE_FILE}" - sed -i "s|\\\|\/|g" "${ANDROID_QMAKE_FILE}" - fi - sed -i "s|target|../$TOOLCHAIN|g" "${CONF_FILE}" - sed -i "/HostPrefix/ s|$|gcc_64|g" "${CONF_FILE}" - QMAKE_FILE="${UNPACK_DIR}/${VERSION}/gcc_64/bin/qmake" - sed -i "s|\/home\/qt\/work\/install\/bin\/qmake|$QMAKE_FILE|g" "${ANDROID_QMAKE_FILE}" - sed -i "s|\/Users\/qt\/work\/install\/bin\/qmake|$QMAKE_FILE|g" "${ANDROID_QMAKE_FILE}" - elif [ "${TARGET_PLATFORM}" == "ios" ] && [ ! "${VERSION}" \< "6.0.0" ]; then - CONF_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/target_qt.conf" - sed -i.bak "s|HostData=target|HostData=../$TOOLCHAIN|g" "${CONF_FILE}" - sed -i.bak "s|HostPrefix=..\/..\/|HostPrefix=..\/..\/macos|g" "${CONF_FILE}" - IOS_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/qmake" - QMAKE_FILE="${UNPACK_DIR}/${VERSION}/macos/bin/qmake" - sed -i.bak "s|\/Users\/qt\/work\/install\/bin\/qmake|${QMAKE_FILE}|g" "${IOS_QMAKE_FILE}" - elif [ "${TARGET_PLATFORM}" == "wasm" ] && [ ! "${VERSION}" \< "6.0.0" ]; then - CONF_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/target_qt.conf" - sed -i.bak "s|HostData=target|HostData=../$TOOLCHAIN|g" "${CONF_FILE}" - sed -i.bak "s|HostPrefix=..\/..\/|HostPrefix=..\/..\/gcc_64|g" "${CONF_FILE}" - WASM_QMAKE_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/qmake" - QMAKE_FILE="${UNPACK_DIR}/${VERSION}/gcc_64/bin/qmake" - sed -i.bak "s|\/home\/qt\/work\/install\/bin\/qmake|${QMAKE_FILE}|g" "${WASM_QMAKE_FILE}" - else - CONF_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/bin/qt.conf" - echo "[Paths]" > ${CONF_FILE} - echo "Prefix = .." >> ${CONF_FILE} - fi - - # Adjust the license to be able to run qmake - # sed with -i requires intermediate file on Mac OS - PRI_FILE="${UNPACK_DIR}/${VERSION}/${SUBDIR}/mkspecs/qconfig.pri" - sed -i.bak 's/Enterprise/OpenSource/g' "${PRI_FILE}" - sed -i.bak 's/licheck.*//g' "${PRI_FILE}" - rm "${PRI_FILE}.bak" - - # Print the directory so that the caller can - # adjust the PATH variable. - echo $(dirname "${CONF_FILE}") - elif [[ "${COMPONENT}" =~ "mingw" ]]; then - if [[ "${TOOLCHAIN}" =~ "win64_mingw" ]]; then - echo "${UNPACK_DIR}/Tools/mingw${VERSION//./}_64/bin" - elif [[ "${TOOLCHAIN}" =~ "win32_mingw" ]]; then - echo "${UNPACK_DIR}/Tools/mingw${VERSION//./}_32/bin" - fi - elif [[ "${COMPONENT}" =~ "qtcreator" ]]; then - if [ "${HOST_OS}" == "mac_x64" ]; then - echo "${UNPACK_DIR}/Qt Creator.app/Contents/MacOS" - else - echo "${UNPACK_DIR}/bin" - fi - elif [[ "${COMPONENT}" =~ "opensslv3" ]]; then - echo "${INSTALL_DIR}/Tools/OpenSSLv3/Win_${ARCH}/bin" - fi - -done