stringapi: Use string for OS X resource names
This commit is contained in:
parent
a599611116
commit
473ca1ac4a
|
@ -227,7 +227,7 @@ int cmCPackOSXX11Generator::InitializeInternal()
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
/*
|
||||
bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name)
|
||||
bool cmCPackOSXX11Generator::CopyCreateResourceFile(const std::string& name)
|
||||
{
|
||||
std::string uname = cmSystemTools::UpperCase(name);
|
||||
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
|
||||
|
@ -271,7 +271,7 @@ bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name)
|
|||
*/
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool cmCPackOSXX11Generator::CopyResourcePlistFile(const char* name,
|
||||
bool cmCPackOSXX11Generator::CopyResourcePlistFile(const std::string& name,
|
||||
const char* dir, const char* outputFileName /* = 0 */,
|
||||
bool copyOnly /* = false */)
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(const char* name,
|
|||
|
||||
if ( !outputFileName )
|
||||
{
|
||||
outputFileName = name;
|
||||
outputFileName = name.c_str();
|
||||
}
|
||||
|
||||
std::string destFileName = dir;
|
||||
|
|
|
@ -37,8 +37,9 @@ protected:
|
|||
virtual const char* GetPackagingInstallPrefix();
|
||||
virtual const char* GetOutputExtension() { return ".dmg"; }
|
||||
|
||||
//bool CopyCreateResourceFile(const char* name, const char* dir);
|
||||
bool CopyResourcePlistFile(const char* name, const char* dir,
|
||||
//bool CopyCreateResourceFile(const std::string& name,
|
||||
// const std::string& dir);
|
||||
bool CopyResourcePlistFile(const std::string& name, const char* dir,
|
||||
const char* outputFileName = 0, bool copyOnly = false);
|
||||
std::string InstallPrefix;
|
||||
};
|
||||
|
|
|
@ -553,8 +553,9 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name,
|
||||
const char* dirName)
|
||||
bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(
|
||||
const std::string& name,
|
||||
const std::string& dirName)
|
||||
{
|
||||
std::string uname = cmSystemTools::UpperCase(name);
|
||||
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
|
||||
|
@ -563,7 +564,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name,
|
|||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str()
|
||||
<< " not specified. It should point to "
|
||||
<< (name ? name : "(NULL)")
|
||||
<< (!name.empty() ? name : "<empty>")
|
||||
<< ".rtf, " << name
|
||||
<< ".html, or " << name << ".txt file" << std::endl);
|
||||
return false;
|
||||
|
@ -571,7 +572,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name,
|
|||
if ( !cmSystemTools::FileExists(inFileName) )
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find "
|
||||
<< (name ? name : "(NULL)")
|
||||
<< (!name.empty() ? name : "<empty>")
|
||||
<< " resource file: " << inFileName << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,8 @@ protected:
|
|||
// CPACK_RESOURCE_FILE_${NAME} (where ${NAME} is the uppercased
|
||||
// version of name) specifies the input file to use for this file,
|
||||
// which will be configured via ConfigureFile.
|
||||
bool CopyCreateResourceFile(const char* name, const char *dirName);
|
||||
bool CopyCreateResourceFile(const std::string& name,
|
||||
const std::string& dirName);
|
||||
bool CopyResourcePlistFile(const char* name, const char* outName = 0);
|
||||
|
||||
// Run PackageMaker with the given command line, which will (if
|
||||
|
|
Loading…
Reference in New Issue