-
Notifications
You must be signed in to change notification settings - Fork 125
build: Add WOW6432Node to registry path lookups for EA App install path detection #1903
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
build: Add WOW6432Node to registry path lookups for EA App install path detection #1903
Conversation
|
This feature worked correctly for me already. Are you trying to cater it to the EA App install which uses different registry keys? Can you show how it looked before and after this change? What does your InstallPath registry key look like and what do you try to transform it to? |
Yes I have the EA App install. Registry entries: Current CMakeLists.txt checks HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Generals (not WOW6432Node), which doesn't have InstallPath. Maybe we should also add explicit WOW6432Node registry checks to CMakeLists.txt? |
And where are the root dirs of the games? |
"C:\Program Files\EA Games\Command and Conquer Generals Zero Hour\Command and Conquer Generals Zero Hour\Generals.exe" I love how they're both under a ZH parent directory |
|
Ok that appears to match the entries in your InstallPath keg keys. Then I do not understand why this change is modifying strings. It should read InstallPath and use that value. See the code above the one you touched. |
7ba2742 to
2025f85
Compare
That worked :) I amended the commit and pushed |
xezon
left a comment
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.
That looks much better
|
I realise this is already merged, but I do wonder why it needs the WOW6432 lookup, CMake is supposed to correctly infer if it should use that for registry queries based on if the compiler is targeting 32bit or 64bit. Indeed it seems to do so for the ZH path, just not the Generals path (since on 64bit windows its always in the WOW6432 key)? |
Good question - I just did some homework on this, and I think it's because I'm running 64-bit CMake while building 32-bit targets. With get_filename_component, Windows only automatically redirects the 32-bit build to WOW6432Node - not 64 bit build. #1943 makes this cleaner, we can replace get_filename_component() with cmake_host_system_information() for registry lookups. This gives us explicit control over registry views via VIEW 32_64, which checks both 32-bit and 64-bit registry views regardless of CMake architecture. |
Fixes CMake install path detection for EA App installations on 64-bit Windows
Tested on EA App install