mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 13:18:37 -06:00
CPack: Add automatic detection of the Unicode makensis (#9629)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user