*** cmCPackNSISGenerator.cxx 2012-11-01 02:32:05.000000000 +1100 --- cmCPackNSISGenerator.cxx_fixed 2012-11-05 08:33:36.000000000 +1100 *************** *** 404,414 **** int retVal = 1; bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); - cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)"); ! if ( !resS || retVal || !versionRex.find(output)) { ! std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); tmpFile += "/NSISOutput.log"; cmGeneratedFileStream ofs(tmpFile.c_str()); ofs << "# Run command: " << nsisCmd.c_str() << std::endl --- 404,417 ---- int retVal = 1; bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &retVal, 0, this->GeneratorVerbose, 0); cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)"); ! cmsys::RegularExpression versionRexCVS("v(.*)\\.cvs"); ! if ( !resS || retVal || ! (!versionRex.find(output) && !versionRexCVS.find(output)) ! ) { ! const char* topDir = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); ! std::string tmpFile = topDir ? topDir : "."; tmpFile += "/NSISOutput.log"; cmGeneratedFileStream ofs(tmpFile.c_str()); ofs << "# Run command: " << nsisCmd.c_str() << std::endl *************** *** 420,437 **** << "Please check " << tmpFile.c_str() << " for errors" << std::endl); return 0; } ! double nsisVersion = atof(versionRex.match(1).c_str()); ! double minNSISVersion = 2.09; ! cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " ! << nsisVersion << std::endl); ! if ( nsisVersion < minNSISVersion ) { ! cmCPackLogger(cmCPackLog::LOG_ERROR, ! "CPack requires NSIS Version 2.09 or greater. NSIS found on the system " ! "was: " << nsisVersion << std::endl); ! return 0; } this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin"); const char* cpackPackageExecutables --- 423,449 ---- << "Please check " << tmpFile.c_str() << " for errors" << std::endl); return 0; } ! if ( versionRex.find(output)) { ! double nsisVersion = atof(versionRex.match(1).c_str()); ! double minNSISVersion = 2.09; ! cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " << nsisVersion << std::endl); ! if ( nsisVersion < minNSISVersion ) ! { ! cmCPackLogger(cmCPackLog::LOG_ERROR, ! "CPack requires NSIS Version 2.09 or greater. NSIS found on the system " ! "was: " ! << nsisVersion << std::endl); ! return 0; ! } } + if ( versionRexCVS.find(output)) + { + // No version check for NSIS cvs build + cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS " + << versionRexCVS.match(1).c_str() << std::endl); + } this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str()); this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin"); const char* cpackPackageExecutables