ENH: use @ file for winzip on windows
This commit is contained in:
parent
9c28eb8f49
commit
5e68642d16
|
@ -90,13 +90,16 @@ int cmCPackZIPGenerator::InitializeInternal()
|
||||||
int cmCPackZIPGenerator::CompressFiles(const char* outFileName,
|
int cmCPackZIPGenerator::CompressFiles(const char* outFileName,
|
||||||
const char* toplevel, const std::vector<std::string>& files)
|
const char* toplevel, const std::vector<std::string>& files)
|
||||||
{
|
{
|
||||||
|
std::string tempFileName;
|
||||||
cmOStringStream dmgCmd;
|
cmOStringStream dmgCmd;
|
||||||
switch ( this->ZipStyle )
|
switch ( this->ZipStyle )
|
||||||
{
|
{
|
||||||
case cmCPackZIPGenerator::StyleWinZip:
|
case cmCPackZIPGenerator::StyleWinZip:
|
||||||
|
tempFileName = toplevel;
|
||||||
|
tempFileName += "/winZip.filelist";
|
||||||
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
|
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
|
||||||
<< "\" -P \"" << outFileName
|
<< "\" -P \"" << outFileName
|
||||||
<< "\"";
|
<< "\" @\"" << tempFileName.c_str() << "\"";
|
||||||
break;
|
break;
|
||||||
case cmCPackZIPGenerator::StyleUnixZip:
|
case cmCPackZIPGenerator::StyleUnixZip:
|
||||||
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
|
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
|
||||||
|
@ -108,12 +111,26 @@ int cmCPackZIPGenerator::CompressFiles(const char* outFileName,
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::vector<std::string>::const_iterator fileIt;
|
if(tempFileName.size())
|
||||||
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
|
|
||||||
{
|
{
|
||||||
dmgCmd << " \""
|
cmGeneratedFileStream out(tempFileName.c_str());
|
||||||
<< cmSystemTools::RelativePath(toplevel, fileIt->c_str())
|
std::vector<std::string>::const_iterator fileIt;
|
||||||
<< "\"";
|
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
|
||||||
|
{
|
||||||
|
out << "\""
|
||||||
|
<< cmSystemTools::RelativePath(toplevel, fileIt->c_str())
|
||||||
|
<< "\"" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::vector<std::string>::const_iterator fileIt;
|
||||||
|
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
|
||||||
|
{
|
||||||
|
dmgCmd << " \""
|
||||||
|
<< cmSystemTools::RelativePath(toplevel, fileIt->c_str())
|
||||||
|
<< "\"";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = -1;
|
int retVal = -1;
|
||||||
|
|
Loading…
Reference in New Issue