IIS: Changes Curl version and removes OpenSSL dependency

As the this new Curl version supports well the Windows certificate storage,
removing the dependency on the OpenSSL. Also changing the build scripts to work
accordingly. As the cmake build of Curl is said to broken abandoning it in
favor of the nmake files. Thanks to Gregg Smith and Steffen.
This commit is contained in:
Felipe Zimmerle
2014-12-05 05:49:58 -08:00
parent 0d2d01ba2c
commit 6c0cdab35a
10 changed files with 53 additions and 159 deletions

View File

@@ -1,39 +1,41 @@
cd "%WORK_DIR%"
@if NOT EXIST "%SOURCE_DIR%\%CURL%" goto file_not_found_bin
cd "%WORK_DIR%"
@if NOT EXIST "%SOURCE_DIR%\%CURL%" goto file_not_found_bin
echo "7z..."
7z.exe x "%SOURCE_DIR%\%CURL%"
7z.exe x "%SOURCE_DIR%\%CURL%"
echo "Timeout..."
timeout 5
echo "Curl..."
set CURL_DIR=%CURL:~0,-4%
set CURL_DIR=%CURL:~0,-4%
echo "Move..."
move "%CURL_DIR%" "curl"
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
CD "curl\winbuild"
@set ARCH=x86
@call cl 2>&1 | findstr /C:"x64"
@if (%ERRORLEVEL%) == (0) set ARCH=x64
nmake /f Makefile.vc mode=dll ENABLE_WINSSL=yes MACHINE=%ARCH% WITH_ZLIB=dll
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
cd "%WORK_DIR%"
copy /y "%WORK_DIR%\curl\builds\libcurl-vc-%ARCH%-release-dll-zlib-dll-ipv6-sspi-winssl-obj-lib\libcurl.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\curl\builds\libcurl-vc-%ARCH%-release-dll-zlib-dll-ipv6-sspi-winssl-obj-lib\libcurl.lib" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\curl\builds\libcurl-vc-%ARCH%-release-dll-zlib-dll-ipv6-sspi-winssl-obj-lib\libcurl.lib" "%WORK_DIR%\curl\libcurl.lib"
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
->

View File

@@ -1,83 +0,0 @@
::set WORK_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\dependencies\build_dir
::set SOURCE_DIR=C:\Users\fcosta\Downloads
::set OPENSSL=openssl-1.0.1j.tar.gz
::set OUTPUT_DIR=C:\buildbot\win-local_-_Release\build\ModSecurity\iis\release_files
cd "%WORK_DIR%"
@if NOT EXIST "%SOURCE_DIR%\%OPENSSL%" goto file_not_found_bin
echo "7z..."
@7z.exe x "%SOURCE_DIR%\%OPENSSL%" -so | 7z.exe x -aoa -si -ttar
echo "Timeout..."
timeout 5
echo "OpenSSL..."
set OPENSSL_DIR=%OPENSSL:~0,-7%
echo "Move..."
move "%OPENSSL_DIR%" "openssl"
echo "Cd..."
cd "openssl"
@set ARCH=x86
@call cl 2>&1 | findstr /C:"x64"
@if (%ERRORLEVEL%) == (0) set ARCH=x64
echo "Starting to build"
if "%ARCH%" == "x64" ( goto first ) else ( goto second )
goto end
:first
echo "Building x64"
perl Configure VC-WIN64A --prefix=%WORK_DIR%/openssl_inst
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
call ms\do_win64a
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
nmake -f ms\ntdll.mak
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
nmake -f ms\ntdll.mak install
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
goto end
:second
echo "Building x86"
perl Configure VC-WIN32 no-asm --prefix=%WORK_DIR%/openssl_inst
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
:: call ms\do_nasm
call ms\do_ms
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
nmake -f ms\ntdll.mak
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
nmake -f ms\ntdll.mak install
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.dll" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\libeay32.lib" "%OUTPUT_DIR%"
copy /y "%WORK_DIR%\openssl\out32dll\ssleay32.lib" "%OUTPUT_DIR%"
goto end
:end
exit /B 0
:file_not_found_bin
@echo File not found: "%SOURCE_DIR%\%OPENSSL%"
@goto failed
:: :build_failed
:: @echo Problems during the building phase
:: @goto failed
:failed
@exit /B 1