Merge pull request #540 from al-cheb/al-cheb/update_boost_documentation
Update boost windows documentation section to add toolset and Cmake notes, remove BOOST_ROOT variable
This commit is contained in:
@@ -30,7 +30,8 @@
|
|||||||
"image_os": "win16",
|
"image_os": "win16",
|
||||||
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
|
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
|
||||||
"go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14",
|
"go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14",
|
||||||
"go_default": "1.14"
|
"go_default": "1.14",
|
||||||
|
"boost_default": "1.69.0"
|
||||||
},
|
},
|
||||||
"sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"],
|
"sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"],
|
||||||
"builders": [
|
"builders": [
|
||||||
@@ -516,8 +517,8 @@
|
|||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"BOOST_VERSIONS=1.69.0,1.72.0",
|
"ROOT_FOLDER={{user `root_folder`}}",
|
||||||
"BOOST_DEFAULT=1.69.0"
|
"BOOST_DEFAULT={{user `boost_default`}}"
|
||||||
],
|
],
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Boost.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Boost.ps1"
|
||||||
@@ -651,8 +652,8 @@
|
|||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"BOOST_VERSIONS=1.69.0,1.72.0",
|
"ROOT_FOLDER={{user `root_folder`}}",
|
||||||
"BOOST_DEFAULT=1.69.0"
|
"BOOST_DEFAULT={{user `boost_default`}}"
|
||||||
],
|
],
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Boost.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Boost.ps1"
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
"image_os": "win19",
|
"image_os": "win19",
|
||||||
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
|
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
|
||||||
"go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14",
|
"go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14",
|
||||||
"go_default": "1.14"
|
"go_default": "1.14",
|
||||||
|
"boost_default": "1.72.0"
|
||||||
},
|
},
|
||||||
"sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"],
|
"sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"],
|
||||||
"builders": [
|
"builders": [
|
||||||
@@ -497,8 +498,8 @@
|
|||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"BOOST_VERSIONS=1.69.0,1.72.0",
|
"ROOT_FOLDER={{user `root_folder`}}",
|
||||||
"BOOST_DEFAULT=1.72.0"
|
"BOOST_DEFAULT={{user `boost_default`}}"
|
||||||
],
|
],
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Boost.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-Boost.ps1"
|
||||||
@@ -638,8 +639,8 @@
|
|||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"environment_vars": [
|
"environment_vars": [
|
||||||
"BOOST_VERSIONS=1.69.0,1.72.0",
|
"ROOT_FOLDER={{user `root_folder`}}",
|
||||||
"BOOST_DEFAULT=1.72.0"
|
"BOOST_DEFAULT={{user `boost_default`}}"
|
||||||
],
|
],
|
||||||
"scripts":[
|
"scripts":[
|
||||||
"{{ template_dir }}/scripts/Installers/Validate-Boost.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-Boost.ps1"
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ Export-ModuleMember -Function @(
|
|||||||
'Set-SystemVariable'
|
'Set-SystemVariable'
|
||||||
'Install-MSI'
|
'Install-MSI'
|
||||||
'Install-EXE'
|
'Install-EXE'
|
||||||
|
'Get-ToolcachePackages'
|
||||||
|
'Get-ToolsByName'
|
||||||
'Add-ContentToMarkdown'
|
'Add-ContentToMarkdown'
|
||||||
'Add-SoftwareDetailsToMarkdown'
|
'Add-SoftwareDetailsToMarkdown'
|
||||||
'Stop-SvcWithErrHandling'
|
'Stop-SvcWithErrHandling'
|
||||||
|
|||||||
@@ -275,6 +275,28 @@ function Get-VSExtensionVersion
|
|||||||
return $packageVersion
|
return $packageVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function Get-ToolcachePackages {
|
||||||
|
$toolcachePath = Join-Path $env:ROOT_FOLDER "toolcache.json"
|
||||||
|
Get-Content -Raw $toolcachePath | ConvertFrom-Json
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-ToolsByName {
|
||||||
|
param (
|
||||||
|
[Parameter(Mandatory = $True)]
|
||||||
|
[string]$SoftwareName
|
||||||
|
)
|
||||||
|
|
||||||
|
(Get-ToolcachePackages).PSObject.Properties | Where-Object { $_.Name -match $SoftwareName } | ForEach-Object {
|
||||||
|
$packageNameParts = $_.Name.Split("-")
|
||||||
|
[PSCustomObject] @{
|
||||||
|
ToolName = $packageNameParts[1]
|
||||||
|
Versions = $_.Value
|
||||||
|
Architecture = $packageNameParts[3,4] -join "-"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Get-WinVersion
|
function Get-WinVersion
|
||||||
{
|
{
|
||||||
(Get-WmiObject -class Win32_OperatingSystem).Caption
|
(Get-WmiObject -class Win32_OperatingSystem).Caption
|
||||||
@@ -289,3 +311,4 @@ function Test-IsWin16
|
|||||||
{
|
{
|
||||||
(Get-WinVersion) -match "2016"
|
(Get-WinVersion) -match "2016"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,11 @@
|
|||||||
## Desc: Install boost using tool cache
|
## Desc: Install boost using tool cache
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
$BoostDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Boost"
|
Import-Module -Name ImageHelpers
|
||||||
$BoostVersions = $env:BOOST_VERSIONS.split(',')
|
|
||||||
|
$SoftwareName = "Boost"
|
||||||
|
$BoostDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName
|
||||||
|
$BoostVersions = (Get-ToolsByName -SoftwareName $SoftwareName).Versions | Foreach-Object {"{0}.0" -f $_}
|
||||||
$BoostDefault = $env:BOOST_DEFAULT
|
$BoostDefault = $env:BOOST_DEFAULT
|
||||||
|
|
||||||
foreach($BoostVersion in $BoostVersions)
|
foreach($BoostVersion in $BoostVersions)
|
||||||
@@ -20,7 +23,5 @@ foreach($BoostVersion in $BoostVersions)
|
|||||||
Write-Host "Adding Boost $BoostVersion to the path..."
|
Write-Host "Adding Boost $BoostVersion to the path..."
|
||||||
# Add the Boost binaries to the path
|
# Add the Boost binaries to the path
|
||||||
Add-MachinePathItem $BoostInstallationDir | Out-Null
|
Add-MachinePathItem $BoostInstallationDir | Out-Null
|
||||||
# Set the BOOSTROOT environment variable
|
|
||||||
setx BOOST_ROOT $BoostInstallationDir /M | Out-Null
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
## Desc: Validate Boost
|
## Desc: Validate Boost
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
Import-Module -Name ImageHelpers
|
||||||
|
|
||||||
function Validate-BoostVersion
|
function Validate-BoostVersion
|
||||||
{
|
{
|
||||||
Param
|
Param
|
||||||
@@ -37,7 +39,7 @@ else
|
|||||||
|
|
||||||
# Adding description of the software to Markdown
|
# Adding description of the software to Markdown
|
||||||
$tmplMark = @"
|
$tmplMark = @"
|
||||||
#### {0}
|
#### {0} [{2}]
|
||||||
|
|
||||||
_Environment:_
|
_Environment:_
|
||||||
* {1}: root directory of the Boost version {0} installation
|
* {1}: root directory of the Boost version {0} installation
|
||||||
@@ -45,18 +47,22 @@ _Environment:_
|
|||||||
"@
|
"@
|
||||||
|
|
||||||
$tmplMarkRoot = @"
|
$tmplMarkRoot = @"
|
||||||
#### {0}
|
#### {0} [{2}]
|
||||||
|
|
||||||
|
_Environment:_
|
||||||
* PATH: contains the location of Boost version {0}
|
* PATH: contains the location of Boost version {0}
|
||||||
* BOOST_ROOT: root directory of the Boost version {0} installation
|
|
||||||
* {1}: root directory of the Boost version {0} installation
|
* {1}: root directory of the Boost version {0} installation
|
||||||
"@
|
"@
|
||||||
|
|
||||||
$SoftwareName = 'Boost'
|
|
||||||
$Description = New-Object System.Text.StringBuilder
|
$Description = New-Object System.Text.StringBuilder
|
||||||
$BoostRootDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath "Boost"
|
$SoftwareName = 'Boost'
|
||||||
$BoostVersionsToInstall = $env:BOOST_VERSIONS.split(",")
|
$BoostRootDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName
|
||||||
|
$BoostTools = Get-ToolsByName -SoftwareName $SoftwareName
|
||||||
|
|
||||||
|
foreach ($BoostTool in $BoostTools)
|
||||||
|
{
|
||||||
|
$BoostToolsetName = $BoostTool.Architecture
|
||||||
|
$BoostVersionsToInstall = $BoostTool.Versions | Foreach-Object {"{0}.0" -f $_}
|
||||||
foreach($BoostVersion in $BoostVersionsToInstall)
|
foreach($BoostVersion in $BoostVersionsToInstall)
|
||||||
{
|
{
|
||||||
Validate-BoostVersion -BoostRootPath $BoostRootDirectory -BoostRelease $BoostVersion
|
Validate-BoostVersion -BoostRootPath $BoostRootDirectory -BoostRelease $BoostVersion
|
||||||
@@ -64,12 +70,28 @@ foreach($BoostVersion in $BoostVersionsToInstall)
|
|||||||
|
|
||||||
if($BoostVersion -eq $env:BOOST_DEFAULT)
|
if($BoostVersion -eq $env:BOOST_DEFAULT)
|
||||||
{
|
{
|
||||||
$null = $Description.AppendLine(($tmplMarkRoot -f $BoostVersion, $BoostVersionTag))
|
$null = $Description.AppendLine(($tmplMarkRoot -f $BoostVersion, $BoostVersionTag, $BoostToolsetName))
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$null = $Description.AppendLine(($tmplMark -f $BoostVersion, $BoostVersionTag))
|
$null = $Description.AppendLine(($tmplMark -f $BoostVersion, $BoostVersionTag, $BoostToolsetName))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$CMakeFindBoostInfo = @"
|
||||||
|
|
||||||
|
#### _Notes:_
|
||||||
|
Link: https://cmake.org/cmake/help/latest/module/FindBoost.html
|
||||||
|
|
||||||
|
If Boost was built using the ``boost-cmake`` project or from ``Boost 1.70.0`` on it provides a package
|
||||||
|
configuration file for use with find\_package's config mode. This module looks for the package
|
||||||
|
configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry "Boost_DIR".
|
||||||
|
If found, the package configuration file is loaded and this module returns with no further action.
|
||||||
|
See documentation of the Boost CMake package configuration for details on what it provides.
|
||||||
|
|
||||||
|
Set ``Boost_NO_BOOST_CMAKE to ON``, to disable the search for boost-cmake.
|
||||||
|
"@
|
||||||
|
|
||||||
|
$null = $Description.AppendLine($CMakeFindBoostInfo)
|
||||||
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
|
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description.ToString()
|
||||||
|
|||||||
Reference in New Issue
Block a user