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

Windows: upgrade from Visual Studio 2015 to 2022 #10

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

Conversation

dennisameling
Copy link

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 to v143 and only had to ensure HAVE_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 the mailsync.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 if APPVEYOR_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

@bengotow bengotow force-pushed the master branch 4 times, most recently from 6166ef8 to 610cf83 Compare December 31, 2024 22:53
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.

1 participant