Skip to content

Added solution for Visual Studio 2022 #20

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

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from

Conversation

lg2de
Copy link

@lg2de lg2de commented Apr 8, 2025

We would like to build NTP with the latest version of Visual Studio.
I copied the VS2015 files into VS2022 and adopted for toolset vc143.
Further, I removed the configurations DebugXP and ReleaseXP because a toolset vc143_xp is not available.
Finally, I added a .gitignore file within the Windows folder.

@hart-NTP
Copy link
Collaborator

hart-NTP commented Apr 9, 2025

I use VS 2022 with the ports\winnt\vs2015 solution files for all my Windows ntpd work. There is an XP-compatible compiler toolchain that can be added from the Visual Studio Installer to 2022. Look for:

C++ Windows XP Support for VS 2017 (v141) tools [Deprecated]

You may also need to install the Windows 8 SDK download from Microsoft. You'll also need OpenSSL libraries and header files which can be downloaded from Shining Light as a binary installer. With that in place, you just need to hit Cancel when you first open the VS2015 ntp.sln and are asked to convert it.

There is a mechanism available in Visual Studio to mark needed add-ons within the solution files so a developer opening it will be prompted to install, for example, the XP toolchain, if they don't already have it. I've been busy digging into other things but have wanted to get that set up. If you can help on that front I'd appreciate it.

@hart-NTP
Copy link
Collaborator

hart-NTP commented Apr 9, 2025

FYI we are still using BitKeeper as our primary SCM, but Harlan Stenn has been hard at work getting an automated ongoing conversion of the BitKeeper repo to Git and into GitHub. I am inclined to follow your suggestion to pick up the recommended .gitignore file for Visual Studio. For credit in the ChangeLog file, would you prefer your name or an email or just a nickname like lg2de be listed? Feel free to follow up directly to [email protected] or [email protected] (which I get, but slower).

@lg2de
Copy link
Author

lg2de commented Apr 9, 2025

VS2015 and VS2017 are going out of support.
"C++ Windows XP Support for VS 2017 (v141) tools" is - as you have written - already deprecated.

I've added solution and toolset of VS2022 to have the component based on tooling which is supported as long as possible.

Crediting just by name would be fine.

@hart-NTP
Copy link
Collaborator

hart-NTP commented Apr 9, 2025

I am not using VS 2015 or VS 2017 -- but the I am using ports\winnt\vs2015\ntp.sln and friends. If you cancel out of the offer to convert the solution to VS 2022 when you first open it (just once) and you have the optional XP compatible toolchain, it works just spiffy with VS 2022 targetting x64 as well as x86 and XP x86. The reason to cancel the conversion is to avoid a bunch of changes to the .sln and .vcproj files which do not give you any useful benefit.

Meinberg provides signed 32-bit ntpd binaries with a GUI installer, and they want to continue supporting XP/2003 systems with the same ntpd.exe used for modern Windows versions, so we want to keep at least one configuration that can target XP. Each additional version-specific directory under ports\winnt creates maintenance overhead as source files change. I'm hoping to drop support for all the existing ones except vs2015, then have just two, vs2015 and vs2022 (w/o XP support).

@lg2de
Copy link
Author

lg2de commented Apr 9, 2025

The reason to cancel the conversion is to avoid a bunch of changes to the .sln and .vcproj files which do not give you any useful benefit.

These changes are these I want to achieve. I want to use the current toolset, not the old and even more not a deprecated one.
All unsupported toolsets should be removed from ntp.

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.

2 participants