From 1447766e816a896e88c9c8f053fcc3f62797bac1 Mon Sep 17 00:00:00 2001 From: "Felipe \\\\\\\"Zimmerle\\\\\\\" Costa" Date: Tue, 5 Nov 2013 19:44:55 -0600 Subject: [PATCH] iis: Renamves winbuild to dependencies Since the directory becomes all about dependencies there is no need to call it winbuild anymore. --- iis/build_dependencies.bat | 16 ++-- .../build_apache.bat | 0 iis/{winbuild => dependencies}/build_curl.bat | 6 +- .../build_libxml2.bat | 6 +- iis/{winbuild => dependencies}/build_lua.bat | 10 +- .../build_module.bat | 32 +++---- iis/{winbuild => dependencies}/build_pcre.bat | 4 +- iis/{winbuild => dependencies}/build_zlib.bat | 2 +- iis/{winbuild => dependencies}/fart.exe | Bin iis/{winbuild => dependencies}/howto.txt | 88 +++++++++--------- 10 files changed, 82 insertions(+), 82 deletions(-) rename iis/{winbuild => dependencies}/build_apache.bat (100%) rename iis/{winbuild => dependencies}/build_curl.bat (99%) rename iis/{winbuild => dependencies}/build_libxml2.bat (99%) rename iis/{winbuild => dependencies}/build_lua.bat (99%) rename iis/{winbuild => dependencies}/build_module.bat (97%) rename iis/{winbuild => dependencies}/build_pcre.bat (99%) rename iis/{winbuild => dependencies}/build_zlib.bat (99%) rename iis/{winbuild => dependencies}/fart.exe (100%) rename iis/{winbuild => dependencies}/howto.txt (97%) diff --git a/iis/build_dependencies.bat b/iis/build_dependencies.bat index 182e5364..c73e85ca 100644 --- a/iis/build_dependencies.bat +++ b/iis/build_dependencies.bat @@ -2,8 +2,8 @@ :: Use full paths. :: General paths -@set WORK_DIR=%cd%\winbuild\build_dir -@set OUTPUT_DIR=%cd%\winbuild\release_files +@set WORK_DIR=%cd%\dependencies\build_dir +@set OUTPUT_DIR=%cd%\dependencies\release_files @set SOURCE_DIR=%USERPROFILE%\Downloads :: Aditional paths. @@ -41,33 +41,33 @@ if EXIST "%OUTPUT_DIR%" @rmdir /s /q "%OUTPUT_DIR%" @echo Starting with the depdendencies... @echo # Apache - %HTTPD%/%APACHE24_ZIP% -@call winbuild/build_apache.bat +@call dependencies/build_apache.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_apache @cd "%CURRENT_DIR%" echo "c" @echo # pcre. - %PCRE% -@call winbuild/build_pcre.bat +@call dependencies/build_pcre.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_pcre @cd "%CURRENT_DIR%" echo "b" @echo # zlib - %ZLIB% -@call winbuild/build_zlib.bat +@call dependencies/build_zlib.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_zlib @cd "%CURRENT_DIR%" @echo # libxml2 - %LIBXML2% -@call winbuild/build_libxml2.bat +@call dependencies/build_libxml2.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_libxml2 @cd "%CURRENT_DIR%" @echo # lua - %LUA% -@call winbuild/build_lua.bat +@call dependencies/build_lua.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua @cd "%CURRENT_DIR%" @echo # curl - %CURL% -@call winbuild/build_curl.bat +@call dependencies/build_curl.bat @if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl @cd "%CURRENT_DIR%" diff --git a/iis/winbuild/build_apache.bat b/iis/dependencies/build_apache.bat similarity index 100% rename from iis/winbuild/build_apache.bat rename to iis/dependencies/build_apache.bat diff --git a/iis/winbuild/build_curl.bat b/iis/dependencies/build_curl.bat similarity index 99% rename from iis/winbuild/build_curl.bat rename to iis/dependencies/build_curl.bat index e48a9ed1..39d2117a 100644 --- a/iis/winbuild/build_curl.bat +++ b/iis/dependencies/build_curl.bat @@ -8,10 +8,10 @@ set CURL_DIR=%CURL:~0,-4% copy /y CMakeLists.txt "%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 -NMAKE - +NMAKE + cd "%WORK_DIR%" copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.dll" "%OUTPUT_DIR%" diff --git a/iis/winbuild/build_libxml2.bat b/iis/dependencies/build_libxml2.bat similarity index 99% rename from iis/winbuild/build_libxml2.bat rename to iis/dependencies/build_libxml2.bat index 8c59dd79..c954aa8b 100644 --- a/iis/winbuild/build_libxml2.bat +++ b/iis/dependencies/build_libxml2.bat @@ -8,9 +8,9 @@ set LIBXML2_DIR=%LIBXML2:~0,-7% fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " " cd "%LIBXML2_DIR%\win32" -CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes -NMAKE -f Makefile.msvc - +CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes +NMAKE -f Makefile.msvc + cd "%WORK%" copy /y "%WORK_DIR%\%LIBXML2_DIR%\win32\bin.msvc\libxml2.dll" "%OUTPUT_DIR%" diff --git a/iis/winbuild/build_lua.bat b/iis/dependencies/build_lua.bat similarity index 99% rename from iis/winbuild/build_lua.bat rename to iis/dependencies/build_lua.bat index 248c04a1..b870f75e 100644 --- a/iis/winbuild/build_lua.bat +++ b/iis/dependencies/build_lua.bat @@ -8,11 +8,11 @@ set LUA_DIR=%LUA:~0,-7% 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 -DEL lua.obj luac.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 - +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 +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 + cd "%WORK_DIR%" copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.dll" "%OUTPUT_DIR%" diff --git a/iis/winbuild/build_module.bat b/iis/dependencies/build_module.bat similarity index 97% rename from iis/winbuild/build_module.bat rename to iis/dependencies/build_module.bat index 7d54ae4a..50cd83a1 100644 --- a/iis/winbuild/build_module.bat +++ b/iis/dependencies/build_module.bat @@ -1,16 +1,16 @@ -cd %WORK% -CD mod_security\apache2 -del *.obj *.dll *.lib -NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS -cd ..\mlogc -copy /y %WORK%\Makefile.win . -nmake -f Makefile.win clean -nmake -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% CURL=%WORK%\%CURL% VERSION=VERSION_IIS -cd ..\iis -nmake -f Makefile.win clean -NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS -cd %WORK% - -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.pdb %DROP% +cd %WORK% +CD mod_security\apache2 +del *.obj *.dll *.lib +NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS +cd ..\mlogc +copy /y %WORK%\Makefile.win . +nmake -f Makefile.win clean +nmake -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% CURL=%WORK%\%CURL% VERSION=VERSION_IIS +cd ..\iis +nmake -f Makefile.win clean +NMAKE -f Makefile.win APACHE=%APACHE% PCRE=%WORK%\%PCRE% LIBXML2=%WORK%\%LIBXML2% LUA=%WORK%\%LUA%\src VERSION=VERSION_IIS +cd %WORK% + +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.pdb %DROP% diff --git a/iis/winbuild/build_pcre.bat b/iis/dependencies/build_pcre.bat similarity index 99% rename from iis/winbuild/build_pcre.bat rename to iis/dependencies/build_pcre.bat index 02553c0a..bbf3046f 100644 --- a/iis/winbuild/build_pcre.bat +++ b/iis/dependencies/build_pcre.bat @@ -7,7 +7,7 @@ set PCRE_DIR=%PCRE:~0,-4% cd "%PCRE_DIR%" CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -NMAKE +NMAKE cd "%WORK%" copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.dll" "%OUTPUT_DIR%" @@ -19,6 +19,6 @@ echo "a" :file_not_found_bin @echo File not found: "%SOURCE_DIR%\%PCRE%" @goto failed - + :failed @exit /B 1 diff --git a/iis/winbuild/build_zlib.bat b/iis/dependencies/build_zlib.bat similarity index 99% rename from iis/winbuild/build_zlib.bat rename to iis/dependencies/build_zlib.bat index d329538e..00e1b600 100644 --- a/iis/winbuild/build_zlib.bat +++ b/iis/dependencies/build_zlib.bat @@ -7,7 +7,7 @@ cd "%WORK_DIR%" set ZLIB_DIR=%ZLIB:~0,-7% cd "%ZLIB_DIR%" -nmake -f win32\Makefile.msc +nmake -f win32\Makefile.msc SET INCLUDE=%INCLUDE%;%WORK_DIR%\%ZLIB_DIR% SET LIB=%LIB%;%WORK_DIR%\%ZLIB_DIR% cd "%WORK_DIR%" diff --git a/iis/winbuild/fart.exe b/iis/dependencies/fart.exe similarity index 100% rename from iis/winbuild/fart.exe rename to iis/dependencies/fart.exe diff --git a/iis/winbuild/howto.txt b/iis/dependencies/howto.txt similarity index 97% rename from iis/winbuild/howto.txt rename to iis/dependencies/howto.txt index e5b034cd..1505a5f9 100644 --- a/iis/winbuild/howto.txt +++ b/iis/dependencies/howto.txt @@ -1,44 +1,44 @@ -WARNING! - -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. - --------------------------------------- -Tested on: - -Windows 7 x64 -Vistual Studio 2010 Ultimate SP1 -IIS enabled/installed - -cmake 2.8.7 -curl 7.24.0 -apache 2.2.22 or apache 2.4.3 -libxml2 2.7.7 -lua 5.1.5 -pcre 8.30 -zlib 1.2.7 -7-Zip --------------------------------------- - -1. Create working directory c:\work and drop directory c:\drop -2. Sync SVN ModSecurity branch to c:\work\mod_security -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) -5. Download and install 7-Zip -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 - -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)) -libxml2-2.7.7.zip -lua-5.1.5.zip -pcre-8.30.zip -zlib-1.2.7.zip - -Modify c:\work\build.bat accordingly (if other versions were used) - -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) -10. Open the VS ModSecurity IIS installer project -11. Copy new binaries to the installer's x86 and amd64 directories -12. Build installer from within VS +WARNING! + +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. + +-------------------------------------- +Tested on: + +Windows 7 x64 +Vistual Studio 2010 Ultimate SP1 +IIS enabled/installed + +cmake 2.8.7 +curl 7.24.0 +apache 2.2.22 or apache 2.4.3 +libxml2 2.7.7 +lua 5.1.5 +pcre 8.30 +zlib 1.2.7 +7-Zip +-------------------------------------- + +1. Create working directory c:\work and drop directory c:\drop +2. Sync SVN ModSecurity branch to c:\work\mod_security +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) +5. Download and install 7-Zip +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 + +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)) +libxml2-2.7.7.zip +lua-5.1.5.zip +pcre-8.30.zip +zlib-1.2.7.zip + +Modify c:\work\build.bat accordingly (if other versions were used) + +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) +10. Open the VS ModSecurity IIS installer project +11. Copy new binaries to the installer's x86 and amd64 directories +12. Build installer from within VS