Skip to content

Commit

Permalink
Update windows.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwrtank18 authored Sep 1, 2023
1 parent ce27f6d commit f1931a4
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,26 @@ jobs:
build:
runs-on: windows-latest
steps:

- name: Install v141_xp
uses: thepwrtank18/install-vs-components@v1.0.0
with:
components: Microsoft.VisualStudio.Component.WinXP
- name: Install Windows XP Support for Visual Studio
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
"Microsoft.VisualStudio.Component.WinXP"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
Write-Host "components have been successfully added"
Get-ChildItem C:\ProgramData\Microsoft\VisualStudio\Packages\Microsoft.Windows.XPSupport.*
}
else
{
Write-Host "components were not installed"
exit 1
}
- name: Checkout Source Tree
uses: actions/checkout@v3
Expand Down

0 comments on commit f1931a4

Please sign in to comment.