Skip to content

Commit cc9d649

Browse files
authored
build: Add WOW6432Node to registry path lookups for EA App install path detection (#1903)
1 parent 94354fd commit cc9d649

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Generals/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ if("${CMAKE_HOST_SYSTEM}" MATCHES "Windows" AND "${CMAKE_SYSTEM}" MATCHES "Windo
2020
get_filename_component(RTS_INSTALL_PREFIX_GENERALS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Games\\Generals;InstallPath]" ABSOLUTE CACHE)
2121
endif()
2222

23+
# Check the WOW6432Node registry path (for EA App on 64-bit Windows)
24+
if(NOT RTS_INSTALL_PREFIX_GENERALS OR "${RTS_INSTALL_PREFIX_GENERALS}" STREQUAL "/registry")
25+
get_filename_component(RTS_INSTALL_PREFIX_GENERALS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Electronic Arts\\EA Games\\Generals;InstallPath]" ABSOLUTE CACHE)
26+
endif()
27+
2328
# Check the "First Decade" registry path
2429
if(NOT RTS_INSTALL_PREFIX_GENERALS OR "${RTS_INSTALL_PREFIX_GENERALS}" STREQUAL "/registry")
2530
get_filename_component(RTS_INSTALL_PREFIX_GENERALS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Games\\Command and Conquer The First Decade;gr_folder]" ABSOLUTE CACHE)

GeneralsMD/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ if("${CMAKE_HOST_SYSTEM}" MATCHES "Windows" AND "${CMAKE_SYSTEM}" MATCHES "Windo
1919
get_filename_component(RTS_INSTALL_PREFIX_ZEROHOUR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Games\\Command and Conquer Generals Zero Hour;InstallPath]" ABSOLUTE CACHE)
2020
endif()
2121

22+
# Check the WOW6432Node registry path (for EA App on 64-bit Windows)
23+
if(NOT RTS_INSTALL_PREFIX_ZEROHOUR OR "${RTS_INSTALL_PREFIX_ZEROHOUR}" STREQUAL "/registry")
24+
get_filename_component(RTS_INSTALL_PREFIX_ZEROHOUR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Electronic Arts\\EA Games\\Command and Conquer Generals Zero Hour;InstallPath]" ABSOLUTE CACHE)
25+
endif()
26+
2227
# Check the "First Decade" registry path
2328
if(NOT RTS_INSTALL_PREFIX_ZEROHOUR OR "${RTS_INSTALL_PREFIX_ZEROHOUR}" STREQUAL "/registry")
2429
get_filename_component(RTS_INSTALL_PREFIX_ZEROHOUR "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\EA Games\\Command and Conquer The First Decade;zh_folder]" ABSOLUTE CACHE)

0 commit comments

Comments
 (0)