THRIFT-4508: change windows CI builds to use current MSVC, one cygwin and one mingw build
diff --git a/build/appveyor/build-libevent.bat b/build/appveyor/build-libevent.bat
index 13c74ee..64b635b 100644
--- a/build/appveyor/build-libevent.bat
+++ b/build/appveyor/build-libevent.bat
@@ -17,14 +17,21 @@
SET URLFILE=libevent-%LIBEVENT_VERSION%-stable.tar.gz
SET URL=https://github.com/libevent/libevent/releases/download/release-%LIBEVENT_VERSION%-stable/%URLFILE%
-CD %WIN3P% || EXIT /B
-appveyor DownloadFile %URL% || EXIT /B
-7z x %URLFILE% -so | 7z x -si -ttar > nul || EXIT /B
+:: Download - support running a local build or a build in appveyor
+CD "%WIN3P%" || EXIT /B
+IF "%APPVEYOR_BUILD_ID%" == "" (
+ curl -L -f -o "%URLFILE%" "%URL%"
+) ELSE (
+ appveyor DownloadFile "%URL%"
+)
+7z x "%URLFILE%" -so | 7z x -si -ttar > nul || EXIT /B
CD "libevent-%LIBEVENT_VERSION%-stable" || EXIT /B
-nmake -f Makefile.nmake || EXIT /B
+nmake -f Makefile.nmake static_libs || EXIT /B
+
+:: in libevent 2.0 there is no nmake subdirectory in WIN32-Code, but in 2.1 there is
mkdir lib || EXIT /B
move *.lib lib\ || EXIT /B
-move WIN32-Code\event2\* include\event2\ || EXIT /B
+move WIN32-Code\event2\* include\event2\ || move WIN32-Code\nmake\event2\* include\event2\ || EXIT /B
move *.h include\ || EXIT /B
ENDLOCAL