Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Jul 15, 2024
2 parents 0f0bcca + 320efb0 commit 3cc9e32
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,41 @@ jobs:

- uses: SpecialKO/GA-setup-cpp-n20@master

- name: Uninstall MSVC Toolset (latest) components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.ATL"
"Microsoft.VisualStudio.Component.VC.ATLMFC"
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
"Microsoft.VisualStudio.Component.VC.CLI.Support"
)
[string]$workloadArgs = $componentsToRemove | ForEach-Object {" --remove " + $_}
$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: Install MSVC Toolset (v14.36-17.6) components
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToRemove= @(
"Microsoft.VisualStudio.Component.VC.14.36.17.6.ATL"
"Microsoft.VisualStudio.Component.VC.14.36.17.6.MFC"
"Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64"
"Microsoft.VisualStudio.Component.VC.14.36.17.6.CLI.Support"
)
[string]$workloadArgs = $componentsToRemove | 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
- uses: microsoft/setup-msbuild@v2
# with:
# vs-version: '[17.6]'

#- name: Restore the required Nuget packages
# run: |
Expand Down

0 comments on commit 3cc9e32

Please sign in to comment.