Updated build process for Zabbix agent (windows)

This commit is contained in:
Alexey Pustovalov 2024-05-22 17:30:01 +09:00
parent c4c0abaf87
commit d2aea3b240
4 changed files with 4 additions and 5 deletions

View File

@ -242,7 +242,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--prefix=$env:BUILD_OUTPUT\openssl `
--openssldir=$env:BUILD_OUTPUT\openssl_ssl; `
set CL=/MP; `
nmake /S build_sw; `
nmake /S build_libs; `
nmake /S install_dev; `
nmake /S clean | Out-Null; `
Write-Host 'OpenSSL is ready...'; `

View File

@ -269,7 +269,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
--libdir=lib `
--prefix=$env:BUILD_OUTPUT/openssl `
--openssldir=$env:BUILD_OUTPUT/openssl_ssl; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" build_sw; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" build_libs; `
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install_dev; `
mingw32-make -s clean | Out-Null; `
Write-Host 'OpenSSL is ready...'; `

View File

@ -57,7 +57,7 @@ RUN Set-Location -Path $env:SystemDrive\.; `
RFLAGS="""/D ZABBIX_VERSION_REVISION=$ZbxRevision /D ZABBIX_VERSION_RC_NUM=$env:ZABBIX_VERSION_RC_NUM""" `
TLSINCDIR=$env:BUILD_OUTPUT\openssl\include `
TLSLIBDIR=$env:BUILD_OUTPUT\openssl\lib `
LIBS="""$env:LIBS $env:BUILD_OUTPUT\curl\lib\libcurl_a.lib $env:BUILD_OUTPUT\zlib\lib\zlib.lib""" `
LIBS="""$env:LIBS Crypt32.lib $env:BUILD_OUTPUT\curl\lib\libcurl_a.lib $env:BUILD_OUTPUT\zlib\lib\zlib.lib""" `
all; `
`
Write-Host 'Verifying build ("zabbix_agentd.exe -V") ...'; `

View File

@ -13,7 +13,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.42
ARG ZABBIX_VERSION_RC_NUM=2400
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION}
ENV ZBX_SOURCES=$ZBX_SOURCES MAJOR_VERSION=$MAJOR_VERSION ZBX_VERSION=$ZBX_VERSION GIT_BRANCH=${GIT_BRANCH:-$ZBX_VERSION} `
ZABBIX_VERSION_RC_NUM=$ZABBIX_VERSION_RC_NUM
LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" `
@ -48,7 +48,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
(Get-Content src\go\pkg\version\version.go).replace('{ZABBIX_REVISION}', $ZbxRevision) | Set-Content src\go\pkg\version\version.go; `
Set-Location -Path $env:SystemDrive\zabbix_src\zabbix-$env:ZBX_VERSION\build\mingw; `
mingw32-make -j"""$env:NUMBER_OF_PROCESSORS""" `
# CGO_LDFLAGS="""-lcrypt32 -L$env:BUILD_OUTPUT\openssl\lib -L$env:BUILD_OUTPUT\pcre\lib""" `
PCRE=$env:BUILD_OUTPUT\pcre `
OPENSSL=$env:BUILD_OUTPUT\openssl `
RFLAGS="""-DZABBIX_VERSION_RC_NUM=$env:ZABBIX_VERSION_RC_NUM"""; `