Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: add script to allow updating scripts to VS2022 #199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ExternalLibraries/UpdateScriptsToVisualStudio2022.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
REM filepath: UpdateScriptsToVisualStudio2022.bat
powershell -executionpolicy bypass -File .\UpdateScriptsToVisualStudio2022.ps1
pause
21 changes: 21 additions & 0 deletions ExternalLibraries/UpdateScriptsToVisualStudio2022.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Updates Visual Studio version in all compilation scripts

$filestoUpdate = @(
"CompileZLib.ps1",
"CompileSundials.ps1",
"CompileHDF5.ps1",
"CompileGraphviz.ps1"
)

foreach ($file in $filestoUpdate) {
if (Test-Path $file) {
Write-Host "Updating $file..."
$content = Get-Content $file
$content = $content -replace "Visual Studio 16 2019", "Visual Studio 17 2022"
$content | Set-Content $file -Force
} else {
Write-Host "Warning: $file not found"
}
}

Write-Host "Update completed"