summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-11 13:37:48 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-11 13:37:48 (GMT)
commit5e68642d164f1634f3df452df8930b0ef163d3a1 (patch)
treefbf85ed56e6568ada3a61e2fc363c12dfbcae2cc
parent9c28eb8f492c4f504a25547c7f0a0374e75aaabb (diff)
downloadCMake-5e68642d164f1634f3df452df8930b0ef163d3a1.zip
CMake-5e68642d164f1634f3df452df8930b0ef163d3a1.tar.gz
CMake-5e68642d164f1634f3df452df8930b0ef163d3a1.tar.bz2
ENH: use @ file for winzip on windows
-rw-r--r--Source/CPack/cmCPackZIPGenerator.cxx31
1 files changed, 24 insertions, 7 deletions
diff --git a/Source/CPack/cmCPackZIPGenerator.cxx b/Source/CPack/cmCPackZIPGenerator.cxx
index d8ad47f..578fa0a 100644
--- a/Source/CPack/cmCPackZIPGenerator.cxx
+++ b/Source/CPack/cmCPackZIPGenerator.cxx
@@ -90,13 +90,16 @@ int cmCPackZIPGenerator::InitializeInternal()
int cmCPackZIPGenerator::CompressFiles(const char* outFileName,
const char* toplevel, const std::vector<std::string>& files)
{
+ std::string tempFileName;
cmOStringStream dmgCmd;
switch ( this->ZipStyle )
{
case cmCPackZIPGenerator::StyleWinZip:
+ tempFileName = toplevel;
+ tempFileName += "/winZip.filelist";
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
- << "\" -P \"" << outFileName
- << "\"";
+ << "\" -P \"" << outFileName
+ << "\" @\"" << tempFileName.c_str() << "\"";
break;
case cmCPackZIPGenerator::StyleUnixZip:
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
@@ -108,12 +111,26 @@ int cmCPackZIPGenerator::CompressFiles(const char* outFileName,
<< std::endl);
return 0;
}
- std::vector<std::string>::const_iterator fileIt;
- for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
+ if(tempFileName.size())
{
- dmgCmd << " \""
- << cmSystemTools::RelativePath(toplevel, fileIt->c_str())
- << "\"";
+ cmGeneratedFileStream out(tempFileName.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;
int retVal = -1;