BUG: Fix issue #7800. Enable CPack to find the NSIS installer on Windows 2000.

This commit is contained in:
David Cole 2008-10-10 17:08:00 -04:00
parent 5a82a0b108
commit c3976b0283
1 changed files with 11 additions and 7 deletions

View File

@ -348,13 +348,17 @@ int cmCPackNSISGenerator::InitializeInternal()
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
cmsys::SystemTools::KeyWOW64_32) )
{
cmCPackLogger
(cmCPackLog::LOG_ERROR,
"Cannot find NSIS registry value. This is usually caused by NSIS "
"not being installed. Please install NSIS from "
"http://nsis.sourceforge.net"
<< std::endl);
return 0;
if ( !cmsys::SystemTools::ReadRegistryValue(
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) )
{
cmCPackLogger
(cmCPackLog::LOG_ERROR,
"Cannot find NSIS registry value. This is usually caused by NSIS "
"not being installed. Please install NSIS from "
"http://nsis.sourceforge.net"
<< std::endl);
return 0;
}
}
path.push_back(nsisPath);
#endif