Skip to content

Commit

Permalink
Fixes #157: Compilation fails on Github Action with windows-2022 imag…
Browse files Browse the repository at this point in the history
…e: fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory

Squashed commit of the following:

commit afcf44bbb5f41235ce3f43800407812c79d48fd4
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 17:16:15 2024 -0400

    Revert "Adding a dummy file to a branch created from tag 0.9.0 to validate that ATL is missing in image windows-latest (windows-2022)"

    This reverts commit 7372ab9.

commit 89bcb6ba8cbe64a2e381b6dcc9ea4a187e163ff6
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 17:15:50 2024 -0400

    Revert "Trying to list CPack log file on error on github action. #157"

    This reverts commit f2ed5ac.

commit 49ee814b4652fb329e18d799bba30de8fd18225b
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 17:12:36 2024 -0400

    Fixes #157

commit 08f6edd
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 16:20:27 2024 -0400

    Trying to skip step `Delete Visual Studio components`. It may not be required for #157

commit f2ed5ac
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 16:07:15 2024 -0400

    Trying to list CPack log file on error on github action. #157

commit 9e32e1c
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 15:38:56 2024 -0400

    Converted yaml from Microsoft Azure `tasks` to Github Action `steps`.

commit 1eed630
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 14:52:47 2024 -0400

    Fixes #157: Compilation fails on Github Action with windows-2022 image: fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory

commit 7372ab9
Author: Antoine Beauchamp <[email protected]>
Date:   Sun Aug 11 14:26:33 2024 -0400

    Adding a dummy file to a branch created from tag 0.9.0 to validate that ATL is missing in image windows-latest (windows-2022)
  • Loading branch information
end2endzone committed Aug 11, 2024
1 parent 520370e commit e87e08d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ jobs:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified

# Force reinstall of ATL through update of Visual Studio 2022 VC components
# See https://github.com/actions/runner-images/issues/9873 for details.
# The step to `Delete Visual Studio components` is indeed unnecessary.
# Only the reinstallation of the following component is required to solve the error `fatal error C1083: Cannot open include file: 'atlbase.h': No such file or directory `.
- name: Install Visual Studio components
shell: pwsh
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.29.16.11.ATL"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL.Spectre"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC"
"Microsoft.VisualStudio.Component.VC.14.29.16.11.MFC.Spectre"
)
[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
- name: Create new environment variables
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
Expand Down

0 comments on commit e87e08d

Please sign in to comment.