From 657306c29311029fe39a8409451445049bfe5f1b Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 23 Jun 2020 15:22:59 +0100 Subject: [PATCH 1/2] Make Qt work on my machine Switches `eval stuff $STRIP` to `run_cmd` as it'll log errors on failure and eval was breaking commands that ran just fine otherwise. Don't download aqt wheel from pip and install it in two separate steps. Upgrade aqt from 0.8 to 0.9.2 as there are bugs with 0.8 that stop Qt 5.15.0 from working for some people. Fall back to Qt 5.14.2 for 64-bit on MSVC 2017 as the package list is broken and that specific combination doesn't work right now. --- CI/before_script.msvc.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 78acaead6c..2fb2c5944b 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -497,13 +497,6 @@ if [ -z $SKIP_DOWNLOAD ]; then "OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" fi - # Qt - if [ -z $APPVEYOR ]; then - download "AQt installer" \ - "https://files.pythonhosted.org/packages/f3/bb/aee972f08deecca31bfc46b5aedfad1ce6c7f3aaf1288d685e4a914b53ac/aqtinstall-0.8-py2.py3-none-any.whl" \ - "aqtinstall-0.8-py2.py3-none-any.whl" - fi - # SDL2 download "SDL 2.0.12" \ "https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip" \ @@ -732,9 +725,16 @@ fi fi if [ -z $APPVEYOR ]; then cd $DEPS_INSTALL - QT_SDK="$(real_pwd)/Qt/5.15.0/msvc${MSVC_REAL_YEAR}${SUFFIX}" - if [ -d 'Qt/5.15.0' ]; then + qt_version="5.15.0" + if [ "win${BITS}_msvc${MSVC_REAL_YEAR}${SUFFIX}" == "win64_msvc2017_64" ]; then + echo "This combination of options is known not to work. Falling back to Qt 5.14.2." + qt_version="5.14.2" + fi + + QT_SDK="$(real_pwd)/Qt/${qt_version}/msvc${MSVC_REAL_YEAR}${SUFFIX}" + + if [ -d "Qt/${qt_version}" ]; then printf "Exists. " elif [ -z $SKIP_EXTRACT ]; then if [ $MISSINGPYTHON -ne 0 ]; then @@ -745,7 +745,7 @@ fi pushd "$DEPS" > /dev/null if ! [ -d 'aqt-venv' ]; then echo " Creating Virtualenv for aqt..." - eval python -m venv aqt-venv $STRIP + run_cmd python -m venv aqt-venv fi if [ -d 'aqt-venv/bin' ]; then VENV_BIN_DIR='bin' @@ -758,7 +758,7 @@ fi if ! [ -e "aqt-venv/${VENV_BIN_DIR}/aqt" ]; then echo " Installing aqt wheel into virtualenv..." - eval "aqt-venv/${VENV_BIN_DIR}/pip" install aqtinstall-0.8-py2.py3-none-any.whl $STRIP + run_cmd "aqt-venv/${VENV_BIN_DIR}/pip" install aqtinstall==0.9.2 fi popd > /dev/null @@ -767,7 +767,7 @@ fi mkdir Qt cd Qt - eval "${DEPS}/aqt-venv/${VENV_BIN_DIR}/aqt" install 5.15.0 windows desktop "win${BITS}_msvc${MSVC_REAL_YEAR}${SUFFIX}" $STRIP + run_cmd "${DEPS}/aqt-venv/${VENV_BIN_DIR}/aqt" install $qt_version windows desktop "win${BITS}_msvc${MSVC_REAL_YEAR}${SUFFIX}" printf " Cleaning up extraneous data... " rm -rf Qt/{aqtinstall.log,Tools} From 35d920569cb163c01b5563e80235c1e62646a3c1 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Tue, 23 Jun 2020 15:26:24 +0100 Subject: [PATCH 2/2] Tweak error message As we have `set -e`, the error message would never be printed if we genuinely failed to create the virtualenv, just if we succeeded and the expected directories didn't exist. --- CI/before_script.msvc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/before_script.msvc.sh b/CI/before_script.msvc.sh index 2fb2c5944b..a9f6bd81fe 100644 --- a/CI/before_script.msvc.sh +++ b/CI/before_script.msvc.sh @@ -752,8 +752,8 @@ fi elif [ -d 'aqt-venv/Scripts' ]; then VENV_BIN_DIR='Scripts' else - echo "Error: Failed to create virtualenv." - exit 1 + echo "Error: Failed to create virtualenv in expected location." + wrappedExit 1 fi if ! [ -e "aqt-venv/${VENV_BIN_DIR}/aqt" ]; then