File: build_release.bat

package info (click to toggle)
modsecurity-apache 2.9.12-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,444 kB
  • sloc: ansic: 53,551; sh: 5,249; perl: 2,341; cpp: 1,930; makefile: 618; xml: 6
file content (75 lines) | stat: -rwxr-xr-x 2,167 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

echo "Building release..."

set RELEASE_DIR=release
set OUTPUT_DIR=%cd%\dependencies\release_files
set CURRENT_DIR=%cd%

set AMD64=%RELEASE_DIR%\amd64
set X86=%RELEASE_DIR%\x86

mkdir "%RELEASE_DIR%"

mkdir "%AMD64%"

mkdir "%X86%"

set VCARGS32="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
set VCARGS64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsx86_amd64.bat"


set SSDEEP_ARCH="x64"
call build_dependencies.bat %VCARGS64%
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
call build_modsecurity.bat %VCARGS64%
@if NOT (%ERRORLEVEL%) == (0) goto build_failed

copy "%OUTPUT_DIR%\libapr-1.dll" "%AMD64%"
copy "%OUTPUT_DIR%\libapriconv-1.dll" "%AMD64%"
copy "%OUTPUT_DIR%\libaprutil-1.dll" "%AMD64%"
copy "%OUTPUT_DIR%\libcurl.dll" "%AMD64%"
copy "%OUTPUT_DIR%\libxml2.dll" "%AMD64%"
copy "%OUTPUT_DIR%\lua5.1.dll" "%AMD64%"
copy "%OUTPUT_DIR%\mlogc.exe" "%AMD64%"
copy "%OUTPUT_DIR%\ModSecurityIIS.dll" "%AMD64%"
copy "%OUTPUT_DIR%\pcre.dll" "%AMD64%"
copy "%OUTPUT_DIR%\zlib1.dll" "%AMD64%"
copy "%OUTPUT_DIR%\yajl.dll" "%AMD64%"
copy "%OUTPUT_DIR%\fuzzy.dll" "%AMD64%"

set SSDEEP_ARCH="x86"
call build_dependencies.bat %VCARGS32%
@if NOT (%ERRORLEVEL%) == (0) goto build_failed
call build_modsecurity.bat %VCARGS32%
@if NOT (%ERRORLEVEL%) == (0) goto build_failed

copy "%OUTPUT_DIR%\libapr-1.dll" "%X86%"
copy "%OUTPUT_DIR%\libapriconv-1.dll" "%X86%"
copy "%OUTPUT_DIR%\libaprutil-1.dll" "%X86%"
copy "%OUTPUT_DIR%\libcurl.dll" "%X86%"
copy "%OUTPUT_DIR%\libxml2.dll" "%X86%"
copy "%OUTPUT_DIR%\lua5.1.dll" "%X86%"
copy "%OUTPUT_DIR%\mlogc.exe" "%X86%"
copy "%OUTPUT_DIR%\ModSecurityIIS.dll" "%X86%"
copy "%OUTPUT_DIR%\pcre.dll" "%X86%"
copy "%OUTPUT_DIR%\zlib1.dll" "%X86%"
copy "%OUTPUT_DIR%\yajl.dll" "%X86%"
copy "%OUTPUT_DIR%\fuzzy.dll" "%X86%"


:: copy %OUTPUT_DIR%\Installer.exe %RELEASE_DIR%
:: copy %OUTPUT_DIR%\ModSecurity.xml %RELEASE_DIR%
:: copy %OUTPUT_DIR%\owasp_csr.zip %RELEASE_DIR%
:: copy %OUTPUT_DIR%\README.txt %RELEASE_DIR%


exit /B 0

:build_failed
@echo Problems during the building phase
@goto failed

:failed
@cd %CURRENT_DIR%
@exit /B 1