1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-24 17:53:09 +00:00

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.
This commit is contained in:
AnyOldName3 2020-06-23 15:22:59 +01:00
parent f8e3e57755
commit 657306c293

View file

@ -497,13 +497,6 @@ if [ -z $SKIP_DOWNLOAD ]; then
"OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z" "OSG-3.6.5-msvc${MSVC_REAL_YEAR}-win${BITS}-sym.7z"
fi 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 # SDL2
download "SDL 2.0.12" \ download "SDL 2.0.12" \
"https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip" \ "https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip" \
@ -732,9 +725,16 @@ fi
fi fi
if [ -z $APPVEYOR ]; then if [ -z $APPVEYOR ]; then
cd $DEPS_INSTALL 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. " printf "Exists. "
elif [ -z $SKIP_EXTRACT ]; then elif [ -z $SKIP_EXTRACT ]; then
if [ $MISSINGPYTHON -ne 0 ]; then if [ $MISSINGPYTHON -ne 0 ]; then
@ -745,7 +745,7 @@ fi
pushd "$DEPS" > /dev/null pushd "$DEPS" > /dev/null
if ! [ -d 'aqt-venv' ]; then if ! [ -d 'aqt-venv' ]; then
echo " Creating Virtualenv for aqt..." echo " Creating Virtualenv for aqt..."
eval python -m venv aqt-venv $STRIP run_cmd python -m venv aqt-venv
fi fi
if [ -d 'aqt-venv/bin' ]; then if [ -d 'aqt-venv/bin' ]; then
VENV_BIN_DIR='bin' VENV_BIN_DIR='bin'
@ -758,7 +758,7 @@ fi
if ! [ -e "aqt-venv/${VENV_BIN_DIR}/aqt" ]; then if ! [ -e "aqt-venv/${VENV_BIN_DIR}/aqt" ]; then
echo " Installing aqt wheel into virtualenv..." 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 fi
popd > /dev/null popd > /dev/null
@ -767,7 +767,7 @@ fi
mkdir Qt mkdir Qt
cd 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... " printf " Cleaning up extraneous data... "
rm -rf Qt/{aqtinstall.log,Tools} rm -rf Qt/{aqtinstall.log,Tools}