ModSecurity/iis/dependencies/build_curl.bat
Felipe Zimmerle 9fe72b72de Improves the CA validation
On IIS CA validation was not working as libcurl on windows does not look for a
certificate store, unless it is specified. The resource downloads are now
respecting the SecRemoteRulesFailAction.
2014-11-17 19:32:32 -08:00

40 lines
1.0 KiB
Batchfile

cd "%WORK_DIR%"
@if NOT EXIST "%SOURCE_DIR%\%CURL%" goto file_not_found_bin
echo "7z..."
7z.exe x "%SOURCE_DIR%\%CURL%"
echo "Timeout..."
timeout 5
echo "Curl..."
set CURL_DIR=%CURL:~0,-4%
echo "Move..."
move "%CURL_DIR%" "curl"
echo "Cd..."
:: copy /y CMakeLists.txt "curl"
CD "curl"
echo "Cmake..."
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True -DUSE_SSLEAY=dll -DUSE_OPENSSL=dll -DOPENSSL_ROOT_DIR=%WORK_DIR%/openssl_inst
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
:: "%WORK_DIR%\fart.exe" -r -C "%WORK_DIR%\curl\include\curl\curlbuild.h" LLU ULL
NMAKE
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
cd "%WORK_DIR%"
copy /y "%WORK_DIR%\curl\lib\libcurl.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\curl\lib\libcurl.pdb" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\curl\lib\libcurl_imp.lib" "%OUTPUT_DIR%"
exit /B 0
:file_not_found_bin
@echo File not found: "%SOURCE_DIR%\%CURL%"
@goto failed
:build_failed
@echo Problems during the building phase
@goto failed
:failed
@exit /B 1