mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
iis: Avoids directory link while building
Build scripts was creating links allowing the project to be loaded into Visual Studio without care about the dependencies versions. Sometimes windows refuse to delete those links leading the script to fail. This patch moves the sources directories instead of create links to it.
This commit is contained in:
parent
69c5ccac66
commit
ad330a44bf
@ -1,36 +1,36 @@
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%CURL%" goto file_not_found_bin
|
||||
|
||||
7z.exe x "%SOURCE_DIR%\%CURL%"
|
||||
|
||||
set CURL_DIR=%CURL:~0,-4%
|
||||
|
||||
mklink /D "curl" "%CURL_DIR%"
|
||||
|
||||
copy /y CMakeLists.txt "%CURL_DIR%"
|
||||
CD "%CURL_DIR%"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
:: "%WORK_DIR%\fart.exe" -r -C "%WORK_DIR%\%CURL_DIR%\include\curl\curlbuild.h" LLU ULL
|
||||
NMAKE
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%CURL_DIR%\lib\libcurl.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%CURL_DIR%\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 "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%CURL%" goto file_not_found_bin
|
||||
|
||||
7z.exe x "%SOURCE_DIR%\%CURL%"
|
||||
|
||||
set CURL_DIR=%CURL:~0,-4%
|
||||
|
||||
move "%CURL_DIR%" "curl"
|
||||
|
||||
:: copy /y CMakeLists.txt "curl"
|
||||
CD "curl"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True -DCURL_ZLIB=True
|
||||
@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
|
||||
|
||||
|
@ -1,35 +1,35 @@
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%LIBXML2%" goto file_not_found_bin
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%LIBXML2%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set LIBXML2_DIR=%LIBXML2:~0,-7%
|
||||
|
||||
mklink /D "libxml2" "%LIBXML2_DIR%"
|
||||
|
||||
:: 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
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE -f Makefile.msvc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
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.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%LIBXML2%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%LIBXML2%" goto file_not_found_bin
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%LIBXML2%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set LIBXML2_DIR=%LIBXML2:~0,-7%
|
||||
|
||||
move "%LIBXML2_DIR%" "libxml2"
|
||||
|
||||
:: fart.exe -r -i -C "%WORK_DIR%\%LIBXML2_DIR%\win32\*.*" \x2Fopt:nowin98 " "
|
||||
cd "libxml2\win32"
|
||||
CSCRIPT configure.js iconv=no vcmanifest=yes zlib=yes
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE -f Makefile.msvc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd "%WORK%"
|
||||
|
||||
copy /y "%WORK_DIR%\libxml2\win32\bin.msvc\libxml2.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\libxml2\win32\bin.msvc\libxml2.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%LIBXML2%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
|
@ -1,39 +1,39 @@
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%LUA%" goto file_not_found_bin
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%LUA%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set LUA_DIR=%LUA:~0,-7%
|
||||
|
||||
mklink /D "lua" "%LUA_DIR%"
|
||||
|
||||
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
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
DEL lua.obj luac.obj
|
||||
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%LUA_DIR%\src\lua5.1.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%LUA%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%LUA%" goto file_not_found_bin
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%LUA%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set LUA_DIR=%LUA:~0,-7%
|
||||
|
||||
move "%LUA_DIR%" "lua"
|
||||
|
||||
cd "lua\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
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
DEL lua.obj luac.obj
|
||||
LINK /DLL /LTCG /DEBUG /OUT:lua5.1.dll *.obj
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
IF EXIST lua5.1.dll.manifest MT -manifest lua5.1.dll.manifest -outputresource:lua5.1.dll;2
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\lua\src\lua5.1.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\lua\src\lua5.1.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\lua\src\lua5.1.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%LUA%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
||||
|
@ -1,32 +1,32 @@
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%APACHE_BIN%" goto file_not_found_bin
|
||||
|
||||
7z.exe x "%SOURCE_DIR%\%PCRE%"
|
||||
set PCRE_DIR=%PCRE:~0,-4%
|
||||
|
||||
mklink /D "pcre" "%PCRE_DIR%"
|
||||
|
||||
cd "%PCRE_DIR%"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
cd "%WORK%"
|
||||
|
||||
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%PCRE_DIR%\pcre.lib" "%OUTPUT_DIR%"
|
||||
echo "a"
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%PCRE%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%APACHE_BIN%" goto file_not_found_bin
|
||||
|
||||
7z.exe x "%SOURCE_DIR%\%PCRE%"
|
||||
set PCRE_DIR=%PCRE:~0,-4%
|
||||
|
||||
move "%PCRE_DIR%" "pcre"
|
||||
|
||||
cd "pcre"
|
||||
CMAKE -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=True
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
NMAKE
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
cd "%WORK%"
|
||||
|
||||
copy /y "%WORK_DIR%\pcre\pcre.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\pcre\pcre.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\pcre\pcre.lib" "%OUTPUT_DIR%"
|
||||
echo "a"
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%PCRE%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
@ -1,34 +1,34 @@
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%ZLIB%" goto file_not_found_bin
|
||||
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%ZLIB%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set ZLIB_DIR=%ZLIB:~0,-7%
|
||||
|
||||
mklink /D "zlib" "%ZLIB_DIR%"
|
||||
|
||||
cd "%ZLIB_DIR%"
|
||||
nmake -f win32\Makefile.msc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
SET INCLUDE=%INCLUDE%;%WORK_DIR%\%ZLIB_DIR%
|
||||
SET LIB=%LIB%;%WORK_DIR%\%ZLIB_DIR%
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\%ZLIB_DIR%\zlib1.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%ZLIB_DIR%\zlib1.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\%ZLIB_DIR%\zdll.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%ZLIB%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
@if NOT EXIST "%SOURCE_DIR%\%ZLIB%" goto file_not_found_bin
|
||||
|
||||
|
||||
@7z.exe x "%SOURCE_DIR%\%ZLIB%" -so | 7z.exe x -aoa -si -ttar
|
||||
|
||||
set ZLIB_DIR=%ZLIB:~0,-7%
|
||||
|
||||
move "%ZLIB_DIR%" "zlib"
|
||||
|
||||
cd "zlib"
|
||||
nmake -f win32\Makefile.msc
|
||||
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
|
||||
SET INCLUDE=%INCLUDE%;%WORK_DIR%\zlib
|
||||
SET LIB=%LIB%;%WORK_DIR%\zlib
|
||||
cd "%WORK_DIR%"
|
||||
|
||||
copy /y "%WORK_DIR%\zlib\zlib1.dll" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\zlib\zlib1.pdb" "%OUTPUT_DIR%"
|
||||
copy /y "%WORK_DIR%\zlib\zdll.lib" "%OUTPUT_DIR%"
|
||||
|
||||
@exit /B 0
|
||||
|
||||
:file_not_found_bin
|
||||
@echo File not found: "%SOURCE_DIR%\%ZLIB%"
|
||||
@goto failed
|
||||
|
||||
:build_failed
|
||||
@echo Problems during the building phase
|
||||
@goto failed
|
||||
|
||||
:failed
|
||||
@exit /B 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user