Windows: upgrade from Visual Studio 2015 to 2022 #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades the build logic so it can build on Visual Studio 2022 as well.
VS-specific fixes
Upgrading to VS 2022 was relatively easy. In 3b5fdb8, you can see that I could upload the
PlatformToolset
tov143
and only had to ensureHAVE_STRUCT_TIMESPEC
and_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
were set during build time. This should also fix the Debug builds.In a7f1f12, I took the opportunity to update
mailsync.vcxproj
a bit to make it easier to follow. Instead of writing into..\..\app\dist
directly, I'm now writing to$(TargetDir)
instead, so that all the requirements end up in the same folder.I thought it make sense to split up the dependencies into direct ones (e.g.
libiconv2.dll
) and platform-related ones (e.g.msvcr120.dll
), of which the latter are added by AppVeyor, because not all machines have those old redistributable VC versions (2010 and 2013) installed. But happy to add them all back to themailsync.vcxproj
if you prefer.AppVeyor changes
I think it'd be nice if AppVeyor runs on every PR, so that you can be sure that the build keeps working before merging to
master
. I added a condition to only deploy ifAPPVEYOR_REPO_TAG
is set, meaning that it'll only deploy if you push a new tag to GitHub.I also added a quick test to ensure
mailsync.exe
can actually start, which it won't if any of the.dll
dependencies are missing. That should allow you to find out quickly if a breaking change is suggested by someone.Moving forward, may I suggest to switch to GitHub Actions instead for these builds? They support Ubuntu, Windows and macOS (all platforms you support) nowadays. Happy to create a follow-up PR to make the switch if you're up for that.
Successful build
Here's a successful build from my fork: https://ci.appveyor.com/project/dennisameling/mailspring-sync/builds/50605099