Closed Bug 1003812 Opened 10 years ago Closed 10 years ago

WindowsGamepad.cpp(13) : fatal error C1083: Cannot open include file: 'hidsdi.h': No such file or directory

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: gcp, Assigned: ted)

References

Details

Attachments

(1 file)

Current m-c, building on Windows 7 with MSVC10.

 8:36.50 e:\mozilla\mozilla-central\hal\windows/WindowsGamepad.cpp(13) : fatal error C1083: Cannot open include file: 'hidsdi.h': No such file or directory

This looks like it's caused by bug 996078. I didn't see any indication in that bug that it's supposed to change the build prereqs and in fact it's removing some checks to see if the DirectX SDK is present and give the correct advice to use --disable-gamepad.

Ted, looks like removing that configure check was bad?
Blocks: 996078
That bug switched from using DirectInput (a DirectX API) to Raw Input (a Windows API), so removing the DirectX SDK check was intentional.

I don't actually know what SDK this file is coming from, everything builds with VC2013 on my machine, and it's building with VC2010 + whatever SDKs we have installed on the builders. We can add a configure test for this header, but it would be useful to know what SDK provides it so we can give that information in the error message.
Looks like this is in the Windows 8 SDK locally:
C:\Program Files (x86)\Windows Kits\8.0\Include\shared

Do you have a Windows SDK installed or just the stock SDK that comes with VC2010?
Here the Windows 7.0 SDK is installed (in addition to Express 2010), on a Windows 8.1 Pro machine.
Okay, then it seems like we can probably just add a check for the Windows 8 SDK, and error if it's not present.
Testing a patch, will have it up for you to test in a minute.
Assignee: nobody → ted
gcp, Archaeopteryx, can you test this and see if it errors in configure for you? If so I'll get it reviewed and landed.
Works as expected:

 0:19.31 configure: error: The Windows 8 SDK or newer is required to build Gamep
ad support. Please install a newer Windows SDK or reconfigure with --disable-gam
epad to disable gamepad support.

https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Windows_Prerequisites needs an update. Should it also be announced in m.d.platform (but the error message is self-explanatory)?
Comment on attachment 8415453 [details] [diff] [review]
Check for Windows 8 SDK for building Gamepad on Windows

Yeah, we should update the docs. It's nice to know what's needed to build without having to fiddle any options.
Attachment #8415453 - Flags: review?(mh+mozilla)
Comment on attachment 8415453 [details] [diff] [review]
Check for Windows 8 SDK for building Gamepad on Windows

Review of attachment 8415453 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +5969,5 @@
>          MOZ_GAMEPAD_BACKEND=cocoa
>          ;;
>      WINNT)
> +        case "$MOZ_WINSDK_MAXVER" in
> +        0x0601*)

That's Windows 7 sdk version, right?
Attachment #8415453 - Flags: review?(mh+mozilla) → review+
Correct, I should add a comment to that effect. That's the oldest SDK we support, apparently.
I cleaned up the docs and mentioned this there.
https://hg.mozilla.org/mozilla-central/rev/720a660bac20
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.