From b6915a609095033fd622eec946d5a4106825103f Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 1 Mar 2012 01:03:31 +0100 Subject: [PATCH 1/2] Forgot that IsWow64Process would return false on a native 64-bit application --- components/files/windowspath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/files/windowspath.cpp b/components/files/windowspath.cpp index cf73b3728..dfa8f20cc 100644 --- a/components/files/windowspath.cpp +++ b/components/files/windowspath.cpp @@ -75,7 +75,7 @@ boost::filesystem::path WindowsPath::getInstallPath() const BOOL f64 = FALSE; LPCTSTR regkey; - if (IsWow64Process(GetCurrentProcess(), &f64) && f64) + if ((IsWow64Process(GetCurrentProcess(), &f64) && f64) || sizeof(void*) == 8) { regkey = "SOFTWARE\\Wow6432Node\\Bethesda Softworks\\Morrowind"; } From 2c4ef5c6703ecf7eccb1182f31aa428a5c451110 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Thu, 1 Mar 2012 01:32:02 +0100 Subject: [PATCH 2/2] 64-bit install path on windows was easier to fix than expected. --- CMakeLists.txt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c686733b..57c582c93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,11 +347,17 @@ if(WIN32) SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_INSTALLED_ICON_NAME "omwlauncher.exe") - SET(VCREDIST "${OpenMW_BINARY_DIR}/vcredist_x86.exe") - if(EXISTS ${VCREDIST}) - INSTALL(FILES ${VCREDIST} DESTINATION "redist") + SET(VCREDIST32 "${OpenMW_BINARY_DIR}/vcredist_x86.exe") + if(EXISTS ${VCREDIST32}) + INSTALL(FILES ${VCREDIST32} DESTINATION "redist") SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x86.exe\\\" /q'" ) - endif(EXISTS ${VCREDIST}) + endif(EXISTS ${VCREDIST32}) + + SET(VCREDIST64 "${OpenMW_BINARY_DIR}/vcredist_x64.exe") + if(EXISTS ${VCREDIST64}) + INSTALL(FILES ${VCREDIST64} DESTINATION "redist") + SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\redist\\\\vcredist_x64.exe\\\" /q'" ) + endif(EXISTS ${VCREDIST64}) SET(OALREDIST "${OpenMW_BINARY_DIR}/oalinst.exe") if(EXISTS ${OALREDIST}) @@ -360,6 +366,10 @@ if(WIN32) ExecWait '\\\"$INSTDIR\\\\redist\\\\oalinst.exe\\\" /s'" ) endif(EXISTS ${OALREDIST}) + if(CMAKE_CL_64) + SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") + endif() + include(CPack) endif(WIN32)