From cd8e71d0e7eb82c57a7bb19392dbb82a3a46f456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 19 Dec 2019 22:20:06 +0200 Subject: [PATCH] Make it possible to override the default win32 target version and mingw-w64 via environment variables This makes it easier to change the default win32 target when using build-all.sh, and also makes it possible to change the version of mingw-w64 that is used, which wasn't possible at all before. --- build-mingw-w64.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-mingw-w64.sh b/build-mingw-w64.sh index 148977b..caf4680 100755 --- a/build-mingw-w64.sh +++ b/build-mingw-w64.sh @@ -2,8 +2,9 @@ set -e -DEFAULT_WIN32_WINNT=0x601 +: ${DEFAULT_WIN32_WINNT:=0x601} : ${DEFAULT_MSVCRT:=ucrt} +: ${MINGW_W64_VERSION:=0a1d495478d8ed1a94fc77b9dbb428b7e0372588} unset HOST while [ $# -gt 0 ]; do @@ -58,7 +59,7 @@ cd mingw-w64 if [ -n "$SYNC" ] || [ -n "$CHECKOUT" ]; then [ -z "$SYNC" ] || git fetch - git checkout 0a1d495478d8ed1a94fc77b9dbb428b7e0372588 + git checkout $MINGW_W64_VERSION fi # If crosscompiling the toolchain itself, we already have a mingw-w64