diff --git a/scripts/cross-build-mingw.sh b/scripts/cross-build-mingw.sh index ab39757fc1..02ddcb4d26 100755 --- a/scripts/cross-build-mingw.sh +++ b/scripts/cross-build-mingw.sh @@ -42,13 +42,6 @@ EOF done shift $((OPTIND - 1)) -if [ "$GTK3" = yes ]; then - BUNDLE_ZIP="$GTK3_BUNDLE_ZIP" -else - BUNDLE_ZIP="$GTK2_BUNDLE_ZIP" - CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-gtk2=yes" -fi - # USAGE: fetch_and_unzip URL DEST_PREFIX fetch_and_unzip() { @@ -88,7 +81,15 @@ cd "$BUILDDIR" mkdir _deps -fetch_and_unzip "$BUNDLE_ZIP" _deps +# both the GTK2 and GTK3 build require files from the GTK3 bundle +# so download and unzip it unconditionally +fetch_and_unzip "$GTK3_BUNDLE_ZIP" _deps + +if [ "$GTK3" = no ]; then + fetch_and_unzip "$GTK2_BUNDLE_ZIP" _deps + CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-gtk2=yes" +fi + # fixup the prefix= in the pkg-config files sed -i "s%^\(prefix=\).*$%\1$PWD/_deps%" _deps/lib/pkgconfig/*.pc