Merge pull request #1406 from zabbix/50_windows

Updated build process for Zabbix agent (windows)
This commit is contained in:
Alexey Pustovalov 2024-05-22 11:34:40 +09:00 committed by GitHub
commit 831a21e7b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 7 deletions

View File

@ -171,7 +171,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
exit 1; ` exit 1; `
}; ` }; `
` `
`
Write-Host ('Downloading {0} ...' -f $env:ZLIB_URL); ` Write-Host ('Downloading {0} ...' -f $env:ZLIB_URL); `
Invoke-WebRequest -OutFile $env:TEMP\zlib.tar.gz -Uri $env:ZLIB_URL; ` Invoke-WebRequest -OutFile $env:TEMP\zlib.tar.gz -Uri $env:ZLIB_URL; `
` `
@ -263,7 +262,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
/property:Platform=$env:BUILD_ARCH ` /property:Platform=$env:BUILD_ARCH `
/target:pcre; ` /target:pcre; `
` `
Write-Host 'PCRE is ready...';
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre | Out-Null; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre\include | Out-Null; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre\include | Out-Null; `
New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre\lib | Out-Null; ` New-Item -ItemType directory -Path $env:BUILD_OUTPUT\pcre\lib | Out-Null; `
@ -272,7 +270,6 @@ RUN Set-Location -Path $env:SystemDrive\.; `
Remove-Item -Path $env:BUILD_SRC\pcre\build\* -Force -Recurse; ` Remove-Item -Path $env:BUILD_SRC\pcre\build\* -Force -Recurse; `
Write-Host 'PCRE is ready...'; ` Write-Host 'PCRE is ready...'; `
` `
`
Write-Host 'Building Curl library...'; ` Write-Host 'Building Curl library...'; `
Set-Location -Path $env:BUILD_SRC\curl\winbuild; ` Set-Location -Path $env:BUILD_SRC\curl\winbuild; `
(Get-Content MakefileBuild.vc).replace(' wldap32.lib', '') | Set-Content MakefileBuild.vc; ` (Get-Content MakefileBuild.vc).replace(' wldap32.lib', '') | Set-Content MakefileBuild.vc; `

View File

@ -8,7 +8,7 @@ ARG OPENSSL_VERSION=1.1.1s
ARG GOLANG_VERSION=1.18.8 ARG GOLANG_VERSION=1.18.8
ARG SEVEN_ZIP_VERSION=2405 ARG SEVEN_ZIP_VERSION=2405
ARG MSYSTEM=UCRT64 ARG MSYSTEM=MINGW64
ARG BUILD_ARCH=x64 ARG BUILD_ARCH=x64
ARG CPU_MODEL=AMD64 ARG CPU_MODEL=AMD64
@ -19,7 +19,7 @@ ARG ZBX_VERSION=${MAJOR_VERSION}.42
ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip
ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi
ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-ucrt-rt_v11-rev1.7z ARG MINGW_URL=https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.7z
ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe
ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip
ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest
@ -92,9 +92,9 @@ RUN Set-Location -Path $env:SystemDrive\.; `
}; ` }; `
` `
Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); `
Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; ` (new-object System.Net.WebClient).DownloadFile("""$env:MINGW_URL""","""$env:TEMP\mingw.7z"""); `
` `
$sha256 = '74ca64c55220edd3196681782fbff653c2b9cb4f427f9e532ab6e9a0823dc997'; ` $sha256 = 'e8c65ddc655534b0330f66f7b480565621e8617cda9937d76ba141a22bf3b2fa'; `
$d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; ` $d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; `
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
if ($d_sha256 -ne $sha256) { ` if ($d_sha256 -ne $sha256) { `