Skip to content

Commit

Permalink
Merge pull request #5057 from maron2000/fix_lang
Browse files Browse the repository at this point in the history
Fix Windows XP Visual Studio versions build issue with the `windows-latest` runner
  • Loading branch information
joncampbell123 authored Jun 17, 2024
2 parents 6c8b51d + 9d136ab commit 0f38f55
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/vsbuild_xp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
contents: write # for actions/checkout to fetch code and softprops/action-gh-release
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
runs-on: windows-2019
runs-on: windows-latest
defaults:
run:
shell: pwsh
Expand All @@ -23,6 +23,20 @@ jobs:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v2
- name: Install v141 build tools
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd= @(
"Microsoft.VisualStudio.Component.VC.v141.x86.x64"
"Microsoft.VisualStudio.Component.VC.v141.MFC"
"Microsoft.VisualStudio.Component.WinXP"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
# should be run twice
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
- name: Prepare Visual Studio build for WinXP
shell: bash
run: |
Expand Down

0 comments on commit 0f38f55

Please sign in to comment.