chore(buildwin): remove old vs versions from build and progen scripts; update documentation

This commit is contained in:
Aleksandar Fabijanic 2024-01-31 16:21:18 +01:00
parent b89bd8dbfb
commit 9c5753d94d
4 changed files with 27 additions and 41 deletions

2
NEWS
View File

@ -1,2 +0,0 @@
As of release 1.4 this file is no longer maintained.
Please see the CHANGELOG for what's new in each release.

View File

@ -4,7 +4,7 @@
# Usage: # Usage:
# ------ # ------
# buildwin.ps1 [-poco_base dir] # buildwin.ps1 [-poco_base dir]
# [-vs 140 | 150 | 160| 170] # [-vs 160| 170]
# [-action build | rebuild | clean] # [-action build | rebuild | clean]
# [-linkmode shared | static_mt | static_md | all] # [-linkmode shared | static_mt | static_md | all]
# [-config release | debug | both] # [-config release | debug | both]
@ -26,8 +26,8 @@ Param
[string] $poco_base = $([System.Environment]::GetEnvironmentVariable('POCO_BASE')), [string] $poco_base = $([System.Environment]::GetEnvironmentVariable('POCO_BASE')),
[Parameter()] [Parameter()]
[ValidateSet(140, 150, 160, 170)] [ValidateSet(160, 170)]
[int] $vs = 140, [int] $vs = 170,
[Parameter()] [Parameter()]
[ValidateSet('build', 'rebuild', 'clean')] [ValidateSet('build', 'rebuild', 'clean')]
@ -73,7 +73,7 @@ Param
function Add-VSCOMNTOOLS([int] $vsver) function Add-VSCOMNTOOLS([int] $vsver)
{ {
if ($vsver -ge 150) if ($vsver -ge 160)
{ {
$vssetup= $([Environment]::GetFolderPath("MyDocuments")) $vssetup= $([Environment]::GetFolderPath("MyDocuments"))
$vssetup= Join-Path $vssetup "WindowsPowerShell" $vssetup= Join-Path $vssetup "WindowsPowerShell"
@ -83,10 +83,6 @@ function Add-VSCOMNTOOLS([int] $vsver)
{ {
Install-Module VSSetup -Scope CurrentUser -Force Install-Module VSSetup -Scope CurrentUser -Force
} }
if ($vsver -eq 150)
{
$range='[15.0,16.0)'
}
if ($vsver -eq 160) if ($vsver -eq 160)
{ {
$range='[16.0,17.0)' $range='[16.0,17.0)'
@ -110,14 +106,6 @@ function Add-VSCOMNTOOLS([int] $vsver)
} }
$vscomntools = $installationPath.psobject.properties.Value; $vscomntools = $installationPath.psobject.properties.Value;
if ($vsver -eq 150)
{
set-item -force -path "ENV:VS150COMNTOOLS" -value "$vscomntools\Common7\Tools\"
Write-Host "`n----------------------------------------" -ForegroundColor Yellow
Write-Host "VS150COMNTOOLS=$env:VS150COMNTOOLS" -ForegroundColor Yellow
Write-Host "----------------------------------------" -ForegroundColor Yellow
Write-Host ""
}
if ($vsver -eq 160) if ($vsver -eq 160)
{ {
set-item -force -path "ENV:VS160COMNTOOLS" -value "$vscomntools\Common7\Tools\" set-item -force -path "ENV:VS160COMNTOOLS" -value "$vscomntools\Common7\Tools\"
@ -154,11 +142,7 @@ function Set-Environment
{ {
if ($poco_base -eq '') { $script:poco_base = Get-Location } if ($poco_base -eq '') { $script:poco_base = Get-Location }
switch ( $vs ) Add-VSCOMNTOOLS $vs
{
140 { }
default { Add-VSCOMNTOOLS $vs }
}
if (-Not $Env:PATH.Contains("$Env:POCO_BASE\bin64;$Env:POCO_BASE\bin;")) if (-Not $Env:PATH.Contains("$Env:POCO_BASE\bin64;$Env:POCO_BASE\bin;"))
{ $Env:PATH = "$Env:POCO_BASE\bin64;$Env:POCO_BASE\bin;$Env:PATH" } { $Env:PATH = "$Env:POCO_BASE\bin64;$Env:POCO_BASE\bin;$Env:PATH" }
@ -191,11 +175,7 @@ function Set-Environment
if ($platform -eq 'x64') { $CommandArg = "amd64" } if ($platform -eq 'x64') { $CommandArg = "amd64" }
elseif ($platform -eq 'ARM64') { $CommandArg = "ARM64" } elseif ($platform -eq 'ARM64') { $CommandArg = "ARM64" }
else { $CommandArg = "x86" } else { $CommandArg = "x86" }
if ($vs -eq 150)
{
$Command = Resolve-Path "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
$script:msbuild_exe = Resolve-Path "$($vsdir)\..\..\MSBuild\15.0\Bin\MSBuild.exe"
} else {
if ($vs -eq 160) if ($vs -eq 160)
{ {
$Command = Resolve-Path "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat" $Command = Resolve-Path "$($vsdir)\..\..\VC\Auxiliary\Build\vcvarsall.bat"
@ -234,7 +214,7 @@ function Process-Input
Write-Host 'Usage:' Write-Host 'Usage:'
Write-Host '------' Write-Host '------'
Write-Host 'buildwin.ps1 [-poco_base <dir>]' Write-Host 'buildwin.ps1 [-poco_base <dir>]'
Write-Host ' [-vs 140 | 150 | 160 | 170]' Write-Host ' [-vs 160 | 170]'
Write-Host ' [-action build | rebuild | clean]' Write-Host ' [-action build | rebuild | clean]'
Write-Host ' [-linkmode shared | static_mt | static_md | all]' Write-Host ' [-linkmode shared | static_mt | static_md | all]'
Write-Host ' [-config release | debug | both]' Write-Host ' [-config release | debug | both]'
@ -562,9 +542,7 @@ function Build
{ {
Process-Input Process-Input
if ($vs -lt 100) { $extension = 'vcproj' } $extension = 'vcxproj'
else { $extension = 'vcxproj' }
BuildComponents $extension "lib" BuildComponents $extension "lib"
BuildComponents $extension "test" BuildComponents $extension "test"
BuildComponents $extension "sample" BuildComponents $extension "sample"

View File

@ -168,11 +168,21 @@ system. This requires Windows PowerShell.
Usage: Usage:
C:\%POCO_BASE%\openssl\build.ps1 [-openssl_release 1.0.0 | 1.1.0] C:\%POCO_BASE%\openssl\buildwin.ps1 [-poco_base dir]
[-vs_version 150 | 140 | 120 | 110 | 100 | 90] [-vs 160| 170]
[-action build | rebuild | clean]
[-linkmode shared | static_mt | static_md | all]
[-config release | debug | both] [-config release | debug | both]
[-platform Win32 | x64] [-platform Win32 | x64 | ARM64 | WEC2013]
[-library shared | static] [-samples]
[-tests]
[-omit "Lib1X,LibY,LibZ,..."]
[-components "Lib1X,LibY,LibZ,..."]
[-tool msbuild | devenv]
[-useenv env | noenv]
[-verbosity minimal | quiet | normal | detailed | diagnostic]
[-openssl_base dir]
[-mysql_base dir]
---- ----
Example: Building OpenSSL 1.1.0, DLL release build for x64 with Visual Studio 2015: Example: Building OpenSSL 1.1.0, DLL release build for x64 with Visual Studio 2015:

View File

@ -4,7 +4,7 @@
# Usage: # Usage:
# ------ # ------
# progen.ps1 [-poco_base dir] # progen.ps1 [-poco_base dir]
# [-vs 140 | 150 | 160| 170] # [-vs 160| 170]
# [-omit "Lib1X,LibY,LibZ,..."] # [-omit "Lib1X,LibY,LibZ,..."]
# [-components "Lib1X,LibY,LibZ,..."] # [-components "Lib1X,LibY,LibZ,..."]
# [-platform Win32 | x64 | ARM64 | WEC2013] # [-platform Win32 | x64 | ARM64 | WEC2013]
@ -19,7 +19,7 @@ Param
[string] $poco_base = $([System.Environment]::GetEnvironmentVariable('POCO_BASE')), [string] $poco_base = $([System.Environment]::GetEnvironmentVariable('POCO_BASE')),
[Parameter()] [Parameter()]
[ValidateSet(140, 150, 160, 170)] [ValidateSet(160, 170)]
[int] $vs = 170, [int] $vs = 170,
[string] $omit, [string] $omit,
@ -44,7 +44,7 @@ function ProcessInput
Write-Host 'Usage:' Write-Host 'Usage:'
Write-Host '------' Write-Host '------'
Write-Host 'progen.ps1 [-poco_base <dir>]' Write-Host 'progen.ps1 [-poco_base <dir>]'
Write-Host ' [-vs 140 | 150 | 160 | 170]' Write-Host ' [-vs 160 | 170]'
Write-Host ' [-omit "Lib1X,LibY,LibZ,..."]' Write-Host ' [-omit "Lib1X,LibY,LibZ,..."]'
Write-Host ' [-components "Lib1X,LibY,LibZ,..."]' Write-Host ' [-components "Lib1X,LibY,LibZ,..."]'
Write-Host ' [-samples]' Write-Host ' [-samples]'