Skip to content

Commit

Permalink
build_docs: windows 2022 enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin committed Aug 6, 2024
1 parent f18dd31 commit 610fb7f
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 3 deletions.
1 change: 1 addition & 0 deletions build_docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ cd _path_to_boost_library_
windowsdocs.ps1
```

windowsdocs.ps1 requires a version of Visual Studio C++ to be available. Optionally, see the scripts here in the [other/](other/) directory such as `windows-2022-clang.ps1` for a method to install that.
 
 
Further discussion about a small number of issues affecting certain libraries is continued in [compatibility.md](compatibility.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions build_docs/other/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

## Miscellanous files

- The 2020 folder contains an earlier copy of the build_docs scripts.

- windows-2022-clang.ps1 is a powershell script to install Visual Studio C++ on Windows 2022.


26 changes: 26 additions & 0 deletions build_docs/other/windows-2022-clang.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

echo "You may need to close and re-open your shell window."

choco install -y visualstudio2022buildtools --parameters \"--add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.CMake.Project\"
# choco install -y 7zip.install --version 22.1
# choco install -y cmake.install --installargs '\"ADD_CMAKE_TO_PATH=System\"' --version 3.27.9
# choco install -y curl --version 8.0.1
choco install -y dotnetfx --version 4.8.0.20220524
# choco install -y git.install --version 2.40.1
# choco install -y hashdeep --version 4.4
# choco install -y jq --version 1.6
# choco install -y llvm --version 16.0.3
choco install -y microsoft-build-tools --version 15.0.26320.2
# choco install -y mingw --version 12.2.0.03042023
# choco install -y notepadplusplus --version 8.5.2
# choco install -y notepadplusplus.install --version 8.5.2
# choco install -y rsync --version 6.2.8
# choco install -y ruby --version 3.1.3.1
choco install -y vcredist2017 --version 14.16.27033
# choco install -y Wget --version 1.21.3
choco install -y windows-sdk-10.1 --version 10.1.18362.1
# choco install -y winscp --version 5.21.8
# choco install -y winscp.install --version 5.21.8
choco upgrade visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64" "--add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64" "--add Microsoft.VisualStudio.Component.VC.v141.x86.x64" "--add Microsoft.VisualStudio.Component.VC.140" -y
18 changes: 15 additions & 3 deletions build_docs/windowsdocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ param (
)

$scriptname="windowsdocs.ps1"
$pythonvirtenvpath="${HOME}\venvboostdocs"

# Set-PSDebug -Trace 1

Expand Down Expand Up @@ -287,6 +288,12 @@ if ( -Not ${skip-packages} ) {

if ($typeoption -eq "main") {
$ghostversion="9.56.1"

if (!(Test-Path "${pythonvirtenvpath}\Scripts\activate")) {
python -m venv ${pythonvirtenvpath}
}
"${pythonvirtenvpath}\Scripts\activate"

choco install -y --no-progress ghostscript --version $ghostversion
choco install -y --no-progress texlive
choco install -y --no-progress graphviz
Expand Down Expand Up @@ -325,9 +332,9 @@ if ( -Not ${skip-packages} ) {

$file1="C:\Program Files\gs\gs9.56.1\bin\gswin32c.exe"
$file2="C:\Program Files\gs\gs9.56.1\bin\gswin64c.exe"
if (-not(Test-Path -Path $file1 -PathType Leaf)) {
if (-not(Test-Path -Path $file1 -PathType Leaf)) {
New-Item -ItemType SymbolicLink -Path $file1 -Target $file2
}
}

# Locking the version numbers in place offers a better guarantee of a known, good build.
# At the same time, it creates a perpetual outstanding task, to upgrade the gem and pip versions
Expand Down Expand Up @@ -383,6 +390,12 @@ if ( -Not ${skip-packages} ) {

}

# In the above 'packages' section a python virtenv was created. Activate it, if that has not been done already.

if ( Test-Path "${pythonvirtenvpath}\Scripts\activate" ) {
"${pythonvirtenvpath}\Scripts\activate"
}

# re-adding the path fix from above, even if skip-packages was set.
$newpathitem="C:\Program Files\Git\usr\bin"
if( (Test-Path -Path $newpathitem) -and -Not ( $env:Path -like "*$newpathitem*"))
Expand Down Expand Up @@ -647,4 +660,3 @@ else {
}

popd

0 comments on commit 610fb7f

Please sign in to comment.