From f1931a4cde3c7b2ef80e0cc95e68bf641303f895 Mon Sep 17 00:00:00 2001 From: TheTank20 Date: Fri, 1 Sep 2023 18:21:34 -0400 Subject: [PATCH] Update windows.yml --- .github/workflows/windows.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index af02859..bb2cfef 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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