summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-10-31 20:33:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-10-31 20:33:27 (GMT)
commit72632f885c904d8d76de47f284086eea02c4567e (patch)
tree8a0b5b55923f8951de65a8fdcd383514eeee987c /Source/CPack
parentaf304a1c6a510dacb3b5a480d8480fa5bf4e24f8 (diff)
parent668dda034f9dac763e3af745f5ca810d17d4a9a3 (diff)
downloadCMake-72632f885c904d8d76de47f284086eea02c4567e.zip
CMake-72632f885c904d8d76de47f284086eea02c4567e.tar.gz
CMake-72632f885c904d8d76de47f284086eea02c4567e.tar.bz2
Merge topic 'fix-9629-add-unicode-nsis-reg-key'
668dda0 CPack: Add automatic detection of the Unicode makensis (#9629)
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx26
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)