Open AuroraNemoia opened 2 years ago
For the 2.0 SDK there exists the environment variable $KINECTSDK20_DIR
> echo $env:KINECTSDK20_DIR
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\
I'm guessing the 1.8 SDK also has something like that.
I don't have such an environment variable on 1.8.
I found a variable in the registry however, at HKLM\SOFTWARE\Microsoft\Kinect
in the REG_SZ
called SDKInstallPath
, with the value being the path to the SDK's install directory.
There is no way for the installer to detect edge cases where a user has the SDK somehow installed to a different folder than the default one. Often times, the Kinect might still be fully functioning even with those files in a different place. So it might be best to have multiple methods and let it go through if one of them returns true. There's also cases of Kinect V2 users with the 1905 runtime. It doesn't install anything to the SDK folders but still works fine with K2EX. We shouldn't make those users install 1409 on top, at the risk of breaking more things.
The detection code should look for: