-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: Add "or later" to debug print of Windows version 8 (because we can't know) #1060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks to be an improvement over the current codes. I am fine with the changes.
Ref: https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version
|
@mcuee Does it display "11" for you now? (Never mind the appveyor stuff, I just tested it in the same CI run) |
Not yet. How do I add the manifest file? Without the manifest file it still shows "Windows 8 (or later)" for Windows 10 or 11.
|
I guess the manifest must be declared in the .vcxproj as is done in libwdi. But maybe you can take an application that already has a Windows 11 manifest, and run-time link with your new libusb.dll? I have now updated the build version threshold to be 20000, like in libwdi. I also added a candidate for #1049 on top because then I can check in the appveyor artifacts that it worked correctly there, and we can test everything with one build. |
Adding the manifest file seems to be simpler than what I think.
Windows 10 output:
Windows 11 output:
|
I think the pull request is now good to be merged. The only question now is whether we want to include the manifest file in the libusb-1.0.dll build or not. It is trivial for the VS build. It seems to be possible with the MinGW as well. This is not so important though. Ref: git has similar manifest file like libwdi. |
I think the manifest belongs to the application but it would be an option to add one to our examples/ builds. |
I agree with you. I think you can merge this pull request. Then we can consider the option to add the manifest to probably the xusb example in the future. |
And guess "12" for whatever comes after. Although with macOS already at 12 this is not given :) Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Pre-releases of Windows 11 had build numbers from 20000. Thanks to Pete Batard for extensive explanation. Fixes libusb#1021 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Windows 10 and 11 is detected as Windows 8 unless there is an application manifest. We simply cannot tell by appropriate means. Note that we currently only use the detected version to check for the minimal version (Vista), so it doesn't matter much. Closes libusb#1021 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Merged. |
See also discussion in #1021.