diff options
author | David Cole <david.cole@kitware.com> | 2012-10-16 23:45:16 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-10-17 17:45:18 (GMT) |
commit | 668dda034f9dac763e3af745f5ca810d17d4a9a3 (patch) | |
tree | 999b78f7f2a854bb0245748ac3f072da4062c0a0 /Source/CPack/cmCPackNSISGenerator.cxx | |
parent | 5ca5a09e06131579a8137d91366279a255afdcae (diff) | |
download | CMake-668dda034f9dac763e3af745f5ca810d17d4a9a3.zip CMake-668dda034f9dac763e3af745f5ca810d17d4a9a3.tar.gz CMake-668dda034f9dac763e3af745f5ca810d17d4a9a3.tar.bz2 |
CPack: Add automatic detection of the Unicode makensis (#9629)
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index b2e57a2..fdbae35 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -356,18 +356,30 @@ int cmCPackNSISGenerator::InitializeInternal() << std::endl); std::vector<std::string> path; std::string nsisPath; - bool gotRegValue = true; + bool gotRegValue = false; #ifdef _WIN32 - if ( !cmsys::SystemTools::ReadRegistryValue( + if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath, + cmsys::SystemTools::KeyWOW64_32) ) + { + gotRegValue = true; + } + if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath) ) + { + gotRegValue = true; + } + if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue( "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath, cmsys::SystemTools::KeyWOW64_32) ) { - if ( !cmsys::SystemTools::ReadRegistryValue( - "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) - { - gotRegValue = false; - } + gotRegValue = true; + } + if ( !gotRegValue && cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) + { + gotRegValue = true; } if (gotRegValue) |