mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
iis: Renamves winbuild to dependencies
Since the directory becomes all about dependencies there is no need to call it winbuild anymore.
This commit is contained in:
committed by
Felipe Zimmerle
parent
9f8cbf6ed8
commit
1447766e81
@@ -2,8 +2,8 @@
|
|||||||
:: Use full paths.
|
:: Use full paths.
|
||||||
|
|
||||||
:: General paths
|
:: General paths
|
||||||
@set WORK_DIR=%cd%\winbuild\build_dir
|
@set WORK_DIR=%cd%\dependencies\build_dir
|
||||||
@set OUTPUT_DIR=%cd%\winbuild\release_files
|
@set OUTPUT_DIR=%cd%\dependencies\release_files
|
||||||
@set SOURCE_DIR=%USERPROFILE%\Downloads
|
@set SOURCE_DIR=%USERPROFILE%\Downloads
|
||||||
|
|
||||||
:: Aditional paths.
|
:: Aditional paths.
|
||||||
@@ -41,33 +41,33 @@ if EXIST "%OUTPUT_DIR%" @rmdir /s /q "%OUTPUT_DIR%"
|
|||||||
|
|
||||||
@echo Starting with the depdendencies...
|
@echo Starting with the depdendencies...
|
||||||
@echo # Apache - %HTTPD%/%APACHE24_ZIP%
|
@echo # Apache - %HTTPD%/%APACHE24_ZIP%
|
||||||
@call winbuild/build_apache.bat
|
@call dependencies/build_apache.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_apache
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_apache
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
echo "c"
|
echo "c"
|
||||||
@echo # pcre. - %PCRE%
|
@echo # pcre. - %PCRE%
|
||||||
@call winbuild/build_pcre.bat
|
@call dependencies/build_pcre.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_pcre
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_pcre
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
echo "b"
|
echo "b"
|
||||||
|
|
||||||
@echo # zlib - %ZLIB%
|
@echo # zlib - %ZLIB%
|
||||||
@call winbuild/build_zlib.bat
|
@call dependencies/build_zlib.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_zlib
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_zlib
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
|
|
||||||
@echo # libxml2 - %LIBXML2%
|
@echo # libxml2 - %LIBXML2%
|
||||||
@call winbuild/build_libxml2.bat
|
@call dependencies/build_libxml2.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_libxml2
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_libxml2
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
|
|
||||||
@echo # lua - %LUA%
|
@echo # lua - %LUA%
|
||||||
@call winbuild/build_lua.bat
|
@call dependencies/build_lua.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
|
|
||||||
@echo # curl - %CURL%
|
@echo # curl - %CURL%
|
||||||
@call winbuild/build_curl.bat
|
@call dependencies/build_curl.bat
|
||||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl
|
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl
|
||||||
@cd "%CURRENT_DIR%"
|
@cd "%CURRENT_DIR%"
|
||||||
|
|
||||||
|
@@ -8,10 +8,10 @@ set CURL_DIR=%CURL:~0,-4%
|
|||||||
|
|
||||||
copy /y CMakeLists.txt "%CURL_DIR%"
|
copy /y CMakeLists.txt "%CURL_DIR%"
|
||||||
CD "%CURL_DIR%"
|
CD "%CURL_DIR%"
|
||||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
||||||
"%WORK_DIR%\fart.exe" -r -C "%WORK_DIR%\%CURL_DIR%\include\curl\curlbuild.h" LLU ULL
|
"%WORK_DIR%\fart.exe" -r -C "%WORK_DIR%\%CURL_DIR%\include\curl\curlbuild.h" LLU ULL
|
||||||
NMAKE
|
NMAKE
|
||||||
|
|
||||||
cd "%WORK_DIR%"
|
cd "%WORK_DIR%"
|
||||||
|
|
||||||
copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.dll" "%OUTPUT_DIR%"
|
copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.dll" "%OUTPUT_DIR%"
|
@@ -8,9 +8,9 @@ set LIBXML2_DIR=%LIBXML2:~0,-7%
|
|||||||
|
|
||||||
fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " "
|
fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " "
|
||||||
cd "%LIBXML2_DIR%\win32"
|
cd "%LIBXML2_DIR%\win32"
|
||||||
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
|
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
|
||||||
NMAKE -f Makefile.msvc
|
NMAKE -f Makefile.msvc
|
||||||
|
|
||||||
cd "%WORK%"
|
cd "%WORK%"
|
||||||
|
|
||||||
copy /y "%WORK_DIR%\%LIBXML2_DIR%\win32\bin.msvc\libxml2.dll" "%OUTPUT_DIR%"
|
copy /y "%WORK_DIR%\%LIBXML2_DIR%\win32\bin.msvc\libxml2.dll" "%OUTPUT_DIR%"
|
@@ -8,11 +8,11 @@ set LUA_DIR=%LUA:~0,-7%
|
|||||||
|
|
||||||
cd "%LUA_DIR%\src"
|
cd "%LUA_DIR%\src"
|
||||||
|
|
||||||
CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
|
CL /Ox /arch:SSE2 /GF /GL /Gy /FD /EHsc /MD /Zi /TC /wd4005 /D "_MBCS" /D "LUA_CORE" /D "LUA_BUILD_AS_DLL" /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_WIN32" /D "_WINDLL" /c *.c
|
||||||
DEL lua.obj luac.obj
|
DEL lua.obj luac.obj
|
||||||
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
|
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
|
||||||
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
|
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
|
||||||
|
|
||||||
cd "%WORK_DIR%"
|
cd "%WORK_DIR%"
|
||||||
|
|
||||||
copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.dll" "%OUTPUT_DIR%"
|
copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.dll" "%OUTPUT_DIR%"
|
@@ -1,16 +1,16 @@
|
|||||||
cd %WORK%
|
cd %WORK%
|
||||||
CD mod_security\apache2
|
CD mod_security\apache2
|
||||||
del *.obj *.dll *.lib
|
del *.obj *.dll *.lib
|
||||||
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
||||||
cd ..\mlogc
|
cd ..\mlogc
|
||||||
copy /y %WORK%\Makefile.win .
|
copy /y %WORK%\Makefile.win .
|
||||||
nmake -f Makefile.win clean
|
nmake -f Makefile.win clean
|
||||||
nmake -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% CURL=%WORK%\%CURL% VERSION=VERSION_IIS
|
nmake -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% CURL=%WORK%\%CURL% VERSION=VERSION_IIS
|
||||||
cd ..\iis
|
cd ..\iis
|
||||||
nmake -f Makefile.win clean
|
nmake -f Makefile.win clean
|
||||||
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS
|
||||||
cd %WORK%
|
cd %WORK%
|
||||||
|
|
||||||
copy /y %WORK%\mod_security\mlogc\mlogc.exe %DROP%
|
copy /y %WORK%\mod_security\mlogc\mlogc.exe %DROP%
|
||||||
copy /y %WORK%\mod_security\iis\modsecurityiis.dll %DROP%
|
copy /y %WORK%\mod_security\iis\modsecurityiis.dll %DROP%
|
||||||
copy /y %WORK%\mod_security\iis\modsecurityiis.pdb %DROP%
|
copy /y %WORK%\mod_security\iis\modsecurityiis.pdb %DROP%
|
@@ -7,7 +7,7 @@ set PCRE_DIR=%PCRE:~0,-4%
|
|||||||
|
|
||||||
cd "%PCRE_DIR%"
|
cd "%PCRE_DIR%"
|
||||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
||||||
NMAKE
|
NMAKE
|
||||||
cd "%WORK%"
|
cd "%WORK%"
|
||||||
|
|
||||||
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.dll" "%OUTPUT_DIR%"
|
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.dll" "%OUTPUT_DIR%"
|
||||||
@@ -19,6 +19,6 @@ echo "a"
|
|||||||
:file_not_found_bin
|
:file_not_found_bin
|
||||||
@echo File not found: "%SOURCE_DIR%\%PCRE%"
|
@echo File not found: "%SOURCE_DIR%\%PCRE%"
|
||||||
@goto failed
|
@goto failed
|
||||||
|
|
||||||
:failed
|
:failed
|
||||||
@exit /B 1
|
@exit /B 1
|
@@ -7,7 +7,7 @@ cd "%WORK_DIR%"
|
|||||||
set ZLIB_DIR=%ZLIB:~0,-7%
|
set ZLIB_DIR=%ZLIB:~0,-7%
|
||||||
|
|
||||||
cd "%ZLIB_DIR%"
|
cd "%ZLIB_DIR%"
|
||||||
nmake -f win32\Makefile.msc
|
nmake -f win32\Makefile.msc
|
||||||
SET INCLUDE=%INCLUDE%;%WORK_DIR%\%ZLIB_DIR%
|
SET INCLUDE=%INCLUDE%;%WORK_DIR%\%ZLIB_DIR%
|
||||||
SET LIB=%LIB%;%WORK_DIR%\%ZLIB_DIR%
|
SET LIB=%LIB%;%WORK_DIR%\%ZLIB_DIR%
|
||||||
cd "%WORK_DIR%"
|
cd "%WORK_DIR%"
|
@@ -1,44 +1,44 @@
|
|||||||
WARNING!
|
WARNING!
|
||||||
|
|
||||||
Building ModSecurityIIS on Windows is a relatively complicated process. Understanding it requires advanced knowledge of Windows and Unix environments.
|
Building ModSecurityIIS on Windows is a relatively complicated process. Understanding it requires advanced knowledge of Windows and Unix environments.
|
||||||
Using the same versions of libraries as listed below is strongly recommended.
|
Using the same versions of libraries as listed below is strongly recommended.
|
||||||
|
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
Tested on:
|
Tested on:
|
||||||
|
|
||||||
Windows 7 x64
|
Windows 7 x64
|
||||||
Vistual Studio 2010 Ultimate SP1
|
Vistual Studio 2010 Ultimate SP1
|
||||||
IIS enabled/installed
|
IIS enabled/installed
|
||||||
|
|
||||||
cmake 2.8.7
|
cmake 2.8.7
|
||||||
curl 7.24.0
|
curl 7.24.0
|
||||||
apache 2.2.22 or apache 2.4.3
|
apache 2.2.22 or apache 2.4.3
|
||||||
libxml2 2.7.7
|
libxml2 2.7.7
|
||||||
lua 5.1.5
|
lua 5.1.5
|
||||||
pcre 8.30
|
pcre 8.30
|
||||||
zlib 1.2.7
|
zlib 1.2.7
|
||||||
7-Zip
|
7-Zip
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
1. Create working directory c:\work and drop directory c:\drop
|
1. Create working directory c:\work and drop directory c:\drop
|
||||||
2. Sync SVN ModSecurity branch to c:\work\mod_security
|
2. Sync SVN ModSecurity branch to c:\work\mod_security
|
||||||
3. Copy files from c:\work\mod_security\iis\winbuild to c:\work
|
3. Copy files from c:\work\mod_security\iis\winbuild to c:\work
|
||||||
4. Download and install cmake (unpack to c:\work\cmake-2.8.7-win32-x86)
|
4. Download and install cmake (unpack to c:\work\cmake-2.8.7-win32-x86)
|
||||||
5. Download and install 7-Zip
|
5. Download and install 7-Zip
|
||||||
6. Adjust paths in c:\work\init.bat accordingly if needed
|
6. Adjust paths in c:\work\init.bat accordingly if needed
|
||||||
7. Download curl, apache, libxml2, lua, pcre and zlib, place them in zip files in c:\work
|
7. Download curl, apache, libxml2, lua, pcre and zlib, place them in zip files in c:\work
|
||||||
|
|
||||||
curl-7.24.0.zip
|
curl-7.24.0.zip
|
||||||
httpd-2.2.22-win32-src.zip or (httpd-2.4.3.zip (source) and httpd-2.4.3-win32.zip + httpd-2.4.3-win64.zip (binaries))
|
httpd-2.2.22-win32-src.zip or (httpd-2.4.3.zip (source) and httpd-2.4.3-win32.zip + httpd-2.4.3-win64.zip (binaries))
|
||||||
libxml2-2.7.7.zip
|
libxml2-2.7.7.zip
|
||||||
lua-5.1.5.zip
|
lua-5.1.5.zip
|
||||||
pcre-8.30.zip
|
pcre-8.30.zip
|
||||||
zlib-1.2.7.zip
|
zlib-1.2.7.zip
|
||||||
|
|
||||||
Modify c:\work\build.bat accordingly (if other versions were used)
|
Modify c:\work\build.bat accordingly (if other versions were used)
|
||||||
|
|
||||||
8. Open cmd.exe window, go to c:\work and run buildall.bat
|
8. Open cmd.exe window, go to c:\work and run buildall.bat
|
||||||
9. When done, the binaries, lib and pdb files should appear under c:\drop\x86 (32-bit) and c:\drop\amd64 (64-bit)
|
9. When done, the binaries, lib and pdb files should appear under c:\drop\x86 (32-bit) and c:\drop\amd64 (64-bit)
|
||||||
10. Open the VS ModSecurity IIS installer project
|
10. Open the VS ModSecurity IIS installer project
|
||||||
11. Copy new binaries to the installer's x86 and amd64 directories
|
11. Copy new binaries to the installer's x86 and amd64 directories
|
||||||
12. Build installer from within VS
|
12. Build installer from within VS
|
Reference in New Issue
Block a user