2021-09-17 22:35:50 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
# escape=`
|
2021-11-13 01:27:21 +01:00
|
|
|
ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022
|
2021-09-17 22:35:50 +02:00
|
|
|
FROM $BUILD_BASE_IMAGE as builder_base
|
|
|
|
|
2024-05-16 21:05:20 +02:00
|
|
|
ARG PCRE2_VERSION=10.43
|
|
|
|
ARG OPENSSL_VERSION=3.3.0
|
|
|
|
ARG GOLANG_VERSION=1.22.3
|
2024-05-18 06:55:00 +02:00
|
|
|
ARG SEVEN_ZIP_VERSION=2405
|
|
|
|
|
2021-09-17 22:35:50 +02:00
|
|
|
ARG BUILD_ARCH=x64
|
|
|
|
ARG CPU_MODEL=AMD64
|
|
|
|
|
2023-03-07 09:07:13 +01:00
|
|
|
ARG MAJOR_VERSION=7.0
|
2021-09-17 22:35:50 +02:00
|
|
|
ARG ZBX_VERSION=${MAJOR_VERSION}
|
|
|
|
|
|
|
|
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
|
2024-05-18 06:55:00 +02:00
|
|
|
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 VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe
|
2024-05-16 21:05:20 +02:00
|
|
|
ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip
|
|
|
|
ARG MSYS2_URL=https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20240507.sfx.exe
|
2024-05-18 06:55:00 +02:00
|
|
|
|
2022-01-21 21:56:51 +01:00
|
|
|
ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip
|
2021-09-17 22:35:50 +02:00
|
|
|
ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
|
|
|
|
|
2021-10-16 17:49:19 +02:00
|
|
|
ENV ZBX_VERSION=$ZBX_VERSION `
|
|
|
|
BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL `
|
2024-05-18 06:55:00 +02:00
|
|
|
GIT_URL=$GIT_URL SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION `
|
|
|
|
MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL `
|
2022-01-21 21:56:51 +01:00
|
|
|
PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION `
|
2024-05-18 06:55:00 +02:00
|
|
|
PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL
|
2021-09-17 22:35:50 +02:00
|
|
|
|
2021-09-18 03:08:26 +02:00
|
|
|
LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" `
|
|
|
|
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" `
|
2024-05-13 19:31:38 +02:00
|
|
|
org.opencontainers.image.vendor="Zabbix SIA" `
|
2021-09-18 03:08:26 +02:00
|
|
|
org.opencontainers.image.url="https://zabbix.com/" `
|
|
|
|
org.opencontainers.image.description="Zabbix build base image contains all required packages to build Zabbix agent 2 images" `
|
2024-05-13 19:31:38 +02:00
|
|
|
org.opencontainers.image.licenses="AGPL v3.0" `
|
2021-09-18 03:08:26 +02:00
|
|
|
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" `
|
2021-10-16 17:49:19 +02:00
|
|
|
org.opencontainers.image.version="${ZBX_VERSION}"
|
2021-09-17 22:35:50 +02:00
|
|
|
|
|
|
|
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
|
|
|
|
|
|
|
RUN Set-Location -Path $env:SystemDrive\.; `
|
2024-05-20 04:47:41 +02:00
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
$env:PATH = [string]::Format('{0}\mingw64\bin;{0}\go\bin;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;{1}\7-Zip;', $env:SystemDrive, ${env:ProgramFiles}) + $env:PATH; `
|
2024-05-18 06:55:00 +02:00
|
|
|
$env:PATH = $env:PATH + [string]::Format(';{0}\msys64\usr\bin;{0}\msys64\ucrt64\bin;{0}\msys64\mingw64\bin', $env:SystemDrive); `
|
2024-05-16 21:05:20 +02:00
|
|
|
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
$env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); `
|
|
|
|
[Environment]::SetEnvironmentVariable('BUILD_OUTPUT', $env:BUILD_OUTPUT, [EnvironmentVariableTarget]::Machine); `
|
|
|
|
$env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); `
|
|
|
|
[Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host ('Downloading {0} ...' -f $env:GIT_URL); `
|
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
|
|
|
$sha256 = '273f55e881094d00877d64f56570b0c997c4da5dedcb26738d56481033c1eba1'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum GIT for Windows ({0}) failed!' -f $d_sha256); `
|
2021-09-17 22:35:50 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
Write-Host ('Downloading {0} ...' -f $env:SEVEN_ZIP_URL); `
|
2024-05-16 21:05:20 +02:00
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\7z.msi -Uri $env:SEVEN_ZIP_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
$sha256 = '0F6AA6596D418B1694F62C8583DE05D24589B8D7FFACCE5A7DAB52AE71F832B6'; `
|
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\7z.msi -Algorithm sha256).Hash; `
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum 7-zip ({0}) failed!' -f $d_sha256); `
|
2024-05-16 21:05:20 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
|
|
|
Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); `
|
2024-05-18 06:55:00 +02:00
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
$sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; `
|
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum Go Lang ({0}) failed!' -f $d_sha256); `
|
2021-09-17 22:35:50 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); `
|
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-17 13:05:27 +02:00
|
|
|
$sha256 = '74ca64c55220edd3196681782fbff653c2b9cb4f427f9e532ab6e9a0823dc997'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); `
|
2024-05-17 13:05:27 +02:00
|
|
|
exit 1; `
|
2021-09-17 22:35:50 +02:00
|
|
|
}; `
|
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
Write-Host ('Downloading {0} ...' -f $env:MSYS2_URL); `
|
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\msys2.sfx.exe -Uri $env:MSYS2_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
$sha256 = 'D96C53ECBFA4B9D81F6C58077965BB2E31472A8BDA4D4446EF8F45F9C601B11D'; `
|
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\msys2.sfx.exe -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum MSYS2 ({0}) failed!' -f $d_sha256); `
|
2021-09-17 22:35:50 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); `
|
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; `
|
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'Installing GIT...'; `
|
|
|
|
Expand-Archive `
|
|
|
|
-Path $env:TEMP\git.zip `
|
|
|
|
-DestinationPath $env:SystemDrive\git\.; `
|
2021-09-24 22:55:53 +02:00
|
|
|
Write-Host 'Removing downloaded...'; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'Verifying install ("git version") ...'; `
|
|
|
|
git version; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'Installing 7z...'; `
|
|
|
|
Start-Process `
|
|
|
|
-FilePath $env:TEMP\7z.msi `
|
|
|
|
-Wait `
|
|
|
|
-ArgumentList '/qn /norestart'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Verifying install ("7z -h") ...'; `
|
|
|
|
7z -h | Select -first 2; `
|
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'Installing Go Lang...'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
Expand-Archive -Path $env:TEMP\go_lang.zip -DestinationPath $env:SystemDrive\; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'Verifying install ("go version") ...'; `
|
|
|
|
go version; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Installing Mingw-w64...'; `
|
2024-05-16 21:05:20 +02:00
|
|
|
7z x $env:TEMP\mingw.7z; `
|
2024-05-18 06:55:00 +02:00
|
|
|
compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; `
|
2024-05-16 21:05:20 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Verifying install ("gcc -v") ...'; `
|
|
|
|
gcc -v; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Installing MSYS2...'; `
|
|
|
|
& $env:TEMP\msys2.sfx.exe -y -o"""$env:SystemDrive\""" | Out-Null; `
|
|
|
|
sh --login -c 'pacman -Syuu --needed --noconfirm --ask=20'; `
|
|
|
|
sh --login -c 'pacman -Syu --noconfirm'; `
|
|
|
|
sh --login -c 'pacman --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake'; `
|
|
|
|
compact /c /i /s:$env:SystemDrive\msys64 | Out-Null; `
|
2024-05-16 21:05:20 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Verifying install ("sh --version") ...'; `
|
|
|
|
sh.exe --version; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); `
|
2024-05-16 21:05:20 +02:00
|
|
|
cmd /C start /w $env:TEMP\vs_buildtools.exe `
|
2021-09-17 22:35:50 +02:00
|
|
|
--quiet `
|
|
|
|
--wait `
|
|
|
|
--norestart `
|
2021-11-13 01:27:21 +01:00
|
|
|
--nocache `
|
2024-05-16 21:05:20 +02:00
|
|
|
--installPath """${env:ProgramFiles(x86)}\Microsoft Visual Studio\2022\BuildTools""" `
|
|
|
|
--channelUri https://aka.ms/vs/17/release/channel `
|
|
|
|
--installChannelUri https://aka.ms/vs/17/release/channel `
|
|
|
|
--channelId VisualStudio.17.Release `
|
|
|
|
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2022
|
|
|
|
--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64; `
|
2021-09-17 22:35:50 +02:00
|
|
|
if ($err = dir $Env:TEMP -Filter dd_setup_*_errors.log | where Length -gt 0 | Get-Content) { `
|
|
|
|
throw $err; `
|
|
|
|
}; `
|
|
|
|
Wait-Process -name msiexec; `
|
|
|
|
Write-Host ('{0} - Visual Studio components installed' -f $(Get-Date -format 'u')); `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
$env:VS_PATH = &(Join-Path ${env:ProgramFiles(x86)} """\Microsoft Visual Studio\Installer\vswhere.exe""") -latest -products Microsoft.VisualStudio.Product.BuildTools -property installationPath; `
|
2024-05-16 21:05:20 +02:00
|
|
|
[Environment]::SetEnvironmentVariable('VS_PATH', $env:VS_PATH, [EnvironmentVariableTarget]::Machine); `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Visual Studio components installation cleanup'; `
|
2021-11-13 18:42:56 +01:00
|
|
|
Get-ChildItem -Path """${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer""" -Directory -Recurse | Remove-Item -Force -Recurse; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Removing downloaded...'; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Remove-Item -Force -Recurse $env:TEMP\*; `
|
2024-05-20 11:17:51 +02:00
|
|
|
Write-Host 'Build environment is ready...'; `
|
|
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
|
2024-05-18 06:55:00 +02:00
|
|
|
`
|
|
|
|
New-Item -ItemType directory -Path $env:BUILD_OUTPUT -Force | Out-Null; `
|
|
|
|
New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; `
|
|
|
|
Set-Location -Path $env:BUILD_SRC; `
|
|
|
|
`
|
|
|
|
Write-Host ('Downloading {0} ...' -f $env:PCRE2_URL); `
|
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\pcre2.zip -Uri $env:PCRE2_URL; `
|
2024-05-16 21:05:20 +02:00
|
|
|
`
|
|
|
|
$sha256 = 'F2816E84DD7A402068797501BF69E24ECA18D882ADB2143DE9F831F39B850257'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\pcre2.zip -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum PCRE2 library ({0}) failed!' -f $d_sha256); `
|
2021-09-17 22:35:50 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
|
|
|
`
|
|
|
|
Write-Host ('Downloading {0} ...' -f $env:OPENSSL_URL); `
|
2024-05-16 21:05:20 +02:00
|
|
|
Invoke-WebRequest -OutFile $env:TEMP\openssl.tar.gz -Uri $env:OPENSSL_URL; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
2024-05-16 21:05:20 +02:00
|
|
|
$sha256 = '53E66B043322A606ABF0087E7699A0E033A37FA13FEB9742DF35C3A33B18FB02'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
$d_sha256 = (Get-FileHash $env:TEMP\openssl.tar.gz -Algorithm sha256).Hash; `
|
2021-09-17 22:35:50 +02:00
|
|
|
Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); `
|
2024-05-18 06:55:00 +02:00
|
|
|
if ($d_sha256 -ne $sha256) { `
|
|
|
|
Write-Host ('Checksum OpenSSL library ({0}) failed!' -f $d_sha256); `
|
2021-09-17 22:35:50 +02:00
|
|
|
exit 1; `
|
|
|
|
}; `
|
|
|
|
`
|
2024-05-18 06:55:00 +02:00
|
|
|
Write-Host 'Extracting PCRE2 archive ...'; `
|
|
|
|
Expand-Archive -Path $env:TEMP\pcre2.zip -DestinationPath $env:BUILD_SRC; `
|
|
|
|
`
|
|
|
|
Write-Host 'Removing downloaded ...'; `
|
|
|
|
Remove-Item -Force -Path $env:TEMP\pcre2.zip; `
|
|
|
|
Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; `
|
|
|
|
`
|
|
|
|
Write-Host 'Extracting OpenSSL archive ...'; `
|
|
|
|
$env:SystemDirectory = [Environment]::SystemDirectory; `
|
|
|
|
tar -zxf "$env:TEMP\openssl.tar.gz"; `
|
|
|
|
`
|
2021-09-24 22:55:53 +02:00
|
|
|
Write-Host 'Removing downloaded...'; `
|
2024-05-16 21:05:20 +02:00
|
|
|
Remove-Item -Force -Path $env:TEMP\openssl.tar.gz; `
|
|
|
|
Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; `
|
|
|
|
`
|
|
|
|
Write-Host 'Building PCRE2 library ...'; `
|
2024-05-18 06:55:00 +02:00
|
|
|
Set-Location -Path $env:BUILD_SRC\pcre2; `
|
2024-05-16 21:05:20 +02:00
|
|
|
cmake --log-level=ERROR `
|
|
|
|
-G 'MinGW Makefiles' `
|
|
|
|
-DBUILD_SHARED_LIBS=OFF `
|
2024-05-18 06:55:00 +02:00
|
|
|
-DBUILD_STATIC_LIBS=ON `
|
|
|
|
-DPCRE2_DEBUG=OFF `
|
|
|
|
-DPCRE2_BUILD_TESTS=OFF `
|
|
|
|
-DINSTALL_MSVC_PDB=OFF `
|
2024-05-16 21:05:20 +02:00
|
|
|
-DCMAKE_C_COMPILER=gcc `
|
|
|
|
-DCMAKE_C_FLAGS='-O2 -g' `
|
|
|
|
-DCMAKE_INSTALL_PREFIX="""$env:BUILD_OUTPUT\pcre2""" . ; `
|
|
|
|
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; `
|
|
|
|
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; `
|
2024-05-18 06:55:00 +02:00
|
|
|
mingw32-make -s clean | Out-Null; `
|
|
|
|
Remove-Item -Path $env:BUILD_OUTPUT\pcre2\man -Force -Recurse; `
|
|
|
|
Remove-Item -Path $env:BUILD_OUTPUT\pcre2\share -Force -Recurse; `
|
2024-05-16 21:05:20 +02:00
|
|
|
Write-Host 'PCRE2 is ready...'; `
|
2021-09-17 22:35:50 +02:00
|
|
|
`
|
|
|
|
Write-Host 'Building OpenSSL library...'; `
|
2024-05-16 21:05:20 +02:00
|
|
|
Set-Location -Path $env:BUILD_SRC\openssl; `
|
2021-09-17 22:35:50 +02:00
|
|
|
perl Configure `
|
|
|
|
mingw64 `
|
|
|
|
no-shared `
|
|
|
|
no-ui-console `
|
|
|
|
no-tests `
|
2024-05-18 06:55:00 +02:00
|
|
|
no-unit-test `
|
2021-09-17 22:35:50 +02:00
|
|
|
no-capieng `
|
|
|
|
--api=1.1.0 `
|
2022-05-09 13:19:26 +02:00
|
|
|
--libdir=lib `
|
2024-05-16 21:05:20 +02:00
|
|
|
--prefix=$env:BUILD_OUTPUT/openssl `
|
|
|
|
--openssldir=$env:BUILD_OUTPUT/openssl_ssl; `
|
2022-05-09 13:19:26 +02:00
|
|
|
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" build_sw; `
|
|
|
|
mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install_dev; `
|
2024-05-18 06:55:00 +02:00
|
|
|
mingw32-make -s clean | Out-Null; `
|
|
|
|
Write-Host 'OpenSSL is ready...'; `
|
|
|
|
`
|
|
|
|
Write-Host 'Removing downloaded...'; `
|
2024-05-20 11:17:51 +02:00
|
|
|
Remove-Item -Force -Recurse $env:SystemDrive\msys64; `
|
2024-05-20 12:28:38 +02:00
|
|
|
Remove-Item -Force -Recurse $env:SystemDrive\mingw64; `
|
2024-05-20 13:22:17 +02:00
|
|
|
Remove-Item -Force -Recurse $env:TEMP\*; `
|
|
|
|
Write-Host 'Building completed ...';
|