Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust CI and docker for VS2019 compatibility using VS2022 #2640

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ericoporto
Copy link
Member

@ericoporto ericoporto commented Dec 30, 2024

fix #1508

built on top of #2591


Some notes:

Visual Studio 2022 build tools image did not work with CMake. It seems the big issue is that Visual Studio 2022 Build Tools doesn't correctly installs all VC tools, the 142 (VS 2019, aka VC 14.29) vc tools seems to install most correctly but it doesn't seem to proper have the CLI/C++ tools working, and the VC 143 (VS 2022, aka VC 14.43) doesn't properly create the cl.exe in place.

I used VS 2022 community instead, which worked fine on the Windows container and properly install packages - though this means the image is slightly larger (21.96 GB in the base image). Here is the docker file for the base image

https://raw.githubusercontent.com/ericoporto/min-ags-dev-env/211537671e66f8e6df0c6fcd0826a529b535acd5/Dockerfile

I opted to build this package separately because installation of VS2022 takes a long time - a little more than an hour, enough to fail Cirrus CI. I built this image in my computer too, since the GHA that currently exists for docker fails with Windows Containers.

I also kept the Windows Server 2019, in theory it could work with a newer windows (and move from the LTSC2019 base), but the cirrus ci official windows container images are still those, so I opted to keep with what is currently tested.

The resulting image has

  • platform toolsets
    • v142 (14.29.30133)
    • v143 (14.42.34433)
  • .NET Framework functionality to build 4.6.2 but also 4.8.1
  • Should be possible to evolve to support newer .NET as needed (nom framework)

TO-DO:

  • test the windows binaries of editor in different Windows
    • Windows 7
    • Windows 10
    • Windows 11
  • verify in a clear machine (VM?) that the selected VC redist is indeed correct and working with the installer
  • maybe adding a "windows-container" repository right in the organization so that I can move the base image to there (using the GitHub Packages feature), this would also be an opportunity to document a how-to on windows containers to explain things

@ericoporto ericoporto marked this pull request as ready for review December 30, 2024 11:51
@ericoporto
Copy link
Member Author

ericoporto commented Dec 30, 2024

image

There is something wrong, I tried to run in a clean environment using the new Windows Sandbox feature, and got the above error. I also noticed that the AGS installer needs to be adjusted in the entry because the VC Redist is named as VC 2015, but it's the VC 2015+ now (also known as Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.29.30133). It does run on my machine though, just not in the clean one, so I guess it has to do with the VC Redist.

image

image

I don't know what is wrong yet... I think the important things it the following

Faulting module name: MSVCP140.dll, version: 14.29.30133.

But I don't get yet what is wrong.

Edit: turns out using the vc redist corresponding to v143, 14.42.34433, actually fixes this

https://download.visualstudio.microsoft.com/download/pr/5319f718-2a84-4aff-86be-8dbdefd92ca1/DD1A8BE03398367745A87A5E35BEBDAB00FDAD080CF42AF0C3F20802D08C25D4/VC_redist.x86.exe

@ericoporto ericoporto marked this pull request as draft December 31, 2024 13:35
@ericoporto ericoporto force-pushed the win-docker-vs2019 branch 3 times, most recently from 52b454d to 9ee1950 Compare December 31, 2024 17:49
@ericoporto ericoporto marked this pull request as ready for review December 31, 2024 19:06
ivan-mogilko and others added 5 commits January 1, 2025 14:04
- Upgraded PlatformToolset from v140 to v142
- Updated Windows SDK version from 8.1 to 10.0
- Upgraded PlatformToolset from v140 to v142; and v141_xp for _XP configs.
- Updated Windows SDK version from 8.1 to 10.0
- In .props files change references to LIB locations, by adding _VS19 prefix; this is to be able to have both VS15 and VS19 versions of libs in the same enviroment.
- adjust vc redistributables for used VC toolsets (and also adjust sha256 in verification script)
- upgrade nuget command line to 6.12.1
- new base docker with Visual Studio 2022 Community
- fix env vars for new vs2019 lib compatibility
- chocolatey deprecated shims, use proper `choco install`
- use VsDevCmd instead of vsvarall, but don't specify host arch
- drop Win8.1 sdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Visual Studio to a supported version in Windows Docker
2 participants