summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackNSISGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 62bfa91..0113698 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -83,10 +83,10 @@ int cmCPackNSISGenerator::PackageFiles()
fileN = fileN.substr(fileN.find('/')+1, std::string::npos);
}
cmSystemTools::ReplaceString(fileN, "/", "\\");
- str << " Delete \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
+ str << " Delete \"$INSTDIR\\" << fileN << "\"" << std::endl;
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: "
- << str.str().c_str() << std::endl);
+ << str.str() << std::endl);
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
std::vector<std::string> dirs;
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
@@ -117,14 +117,14 @@ int cmCPackNSISGenerator::PackageFiles()
}
}
cmSystemTools::ReplaceString(fileN, "/", "\\");
- dstr << " RMDir \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl;
+ dstr << " RMDir \"$INSTDIR\\" << fileN << "\"" << std::endl;
if (!componentName.empty())
{
this->Components[componentName].Directories.push_back(fileN);
}
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: "
- << dstr.str().c_str() << std::endl);
+ << dstr.str() << std::endl);
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES",
dstr.str().c_str());
@@ -320,7 +320,7 @@ int cmCPackNSISGenerator::PackageFiles()
std::string nsisCmd = "\"";
nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM");
nsisCmd += "\" \"" + nsisFileName + "\"";
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd.c_str()
+ cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd
<< std::endl);
std::string output;
int retVal = 1;
@@ -329,12 +329,12 @@ int cmCPackNSISGenerator::PackageFiles()
if ( !res || retVal )
{
cmGeneratedFileStream ofs(tmpFile.c_str());
- ofs << "# Run command: " << nsisCmd.c_str() << std::endl
+ ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
- << output.c_str() << std::endl;
+ << output << std::endl;
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
- << nsisCmd.c_str() << std::endl
- << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
+ << nsisCmd << std::endl
+ << "Please check " << tmpFile << " for errors" << std::endl);
return 0;
}
return 1;
@@ -427,7 +427,7 @@ int cmCPackNSISGenerator::InitializeInternal()
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: "
- << nsisCmd.c_str() << std::endl);
+ << nsisCmd << std::endl);
std::string output;
int retVal = 1;
bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(),
@@ -442,13 +442,13 @@ int cmCPackNSISGenerator::InitializeInternal()
std::string tmpFile = topDir ? topDir : ".";
tmpFile += "/NSISOutput.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
- ofs << "# Run command: " << nsisCmd.c_str() << std::endl
+ ofs << "# Run command: " << nsisCmd << std::endl
<< "# Output:" << std::endl
- << output.c_str() << std::endl;
+ << output << std::endl;
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Problem checking NSIS version with command: "
- << nsisCmd.c_str() << std::endl
- << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
+ << nsisCmd << std::endl
+ << "Please check " << tmpFile << " for errors" << std::endl);
return 0;
}
if ( versionRex.find(output))
@@ -470,7 +470,7 @@ int cmCPackNSISGenerator::InitializeInternal()
{
// No version check for NSIS cvs build
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
- << versionRexCVS.match(1).c_str() << std::endl);
+ << versionRexCVS.match(1) << std::endl);
}
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
@@ -629,7 +629,7 @@ void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
// if so add a desktop link
std::string desktop = "CPACK_CREATE_DESKTOP_LINK_";
desktop += linkName;
- if(this->IsSet(desktop.c_str()))
+ if(this->IsSet(desktop))
{
str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n";
str << " CreateShortCut \"$DESKTOP\\"
@@ -844,12 +844,12 @@ CreateComponentDescription(cmCPackComponent *component,
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/CompressZip.log";
cmGeneratedFileStream ofs(tmpFile.c_str());
- ofs << "# Run command: " << cmd.c_str() << std::endl
+ ofs << "# Run command: " << cmd << std::endl
<< "# Output:" << std::endl
- << output.c_str() << std::endl;
+ << output << std::endl;
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
- << cmd.c_str() << std::endl
- << "Please check " << tmpFile.c_str() << " for errors" << std::endl);
+ << cmd << std::endl
+ << "Please check " << tmpFile << " for errors" << std::endl);
return "";
}
@@ -891,7 +891,7 @@ CreateComponentDescription(cmCPackComponent *component,
path = *pathIt;
cmSystemTools::ReplaceString(path, "/", "\\");
macrosOut << " Delete \"$INSTDIR\\"
- << path.c_str()
+ << path
<< "\"\n";
}
for (pathIt = component->Directories.begin();
@@ -901,7 +901,7 @@ CreateComponentDescription(cmCPackComponent *component,
path = *pathIt;
cmSystemTools::ReplaceString(path, "/", "\\");
macrosOut << " RMDir \"$INSTDIR\\"
- << path.c_str()
+ << path
<< "\"\n";
}
macrosOut << " noremove_" << component->Name << ":\n";