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

Add Visual Studio 2022 Project Files for wolfSSL, Test, & Benchmark #8090

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

gojimmypi
Copy link
Contributor

@gojimmypi gojimmypi commented Oct 17, 2024

Description

This is a no-code PR that adds Visual Studio 2022 Project Files to the wolfCrypt test and benchmark apps, as well as a root-level wolfssl as a reference library project.

I've used Visual Studio for quite a long time, and even I struggled with the existing VS2010 files that attempt to convert when opening in VS2022, but in the end require some non-intuitive changes to actually compile and run.

This PR allows the test and benchmark apps to work out of the box for VS2022 users. Open the project file, run. The only thing that might need attention is the specific toolchain version, but VS2022 should handle this gracefully.

Note that although usually excluded in .gitignore, the respective [app]-VS2022.vcxproj.user file is needed for this line:

<LocalDebuggerWorkingDirectory>$(ProjectDir)../../</LocalDebuggerWorkingDirectory>

This is needed as the Linux command-line app usually runs from the root, and (for instance) the default certs location is currently hard-coded as ./certs, which is not found from the wolfssl\wolfcrypt\benchmark and wolfssl\wolfcrypt\test project directories. The code of course could be gated or changed, but including the the user settings file for VS2022 users is vastly simpler.

  • edit:

Background:

Opening the existing wolfssl.vcxproj results in an as-expected dialog box, warning of the old version:

image

The other examples mentioned in the above dialog box have not been addressed in this PR, but could be considered in a future PR.

The warning alone is perhaps just cosmetically undesired, but there are more serious problems, too.

Changing to DLL Release gives this warning:

image

However, even after compiling there, when opening the respective benchmark app and attempting to compile, this error is observed:

image

Yes, there are a variety of manual settings that can address these issues, but having the VS2022 files provides a much nicer first experience when first using wolfSSL.

A key, non-unintuitive edit needs to be made to the Working Directory when using the existing project files (not those in this PR):

image

Additionally, the enclosed project files includes both the root level wolfSSL project and the local project in the solution file:

image

For completeness: the wolfssl-gojimmgpi-pr portion of the solution file shown in my screen snip above, is not native to Visual Studio. For that I am using the File Explorer Extension for Visual Studio.

Fixes zd# n/a

Testing

Tested on Windows 11, Visual Studio 2022 v17.11.5

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gojimmypi gojimmypi force-pushed the pr-visual-studio-2022 branch from 2765687 to ee24446 Compare October 21, 2024 21:06
@gojimmypi
Copy link
Contributor Author

I've force-pushed a commit that appends manually-adding CR/LF at the end of Visual Studio project files.

The files were included in the original PR as-generated by Visual Studio.

The edit fixes the no-ending-linebreak warning.

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.

4 participants